w-threejs-vue 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +55 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +15 -0
- package/dist/w-threejs-vue.umd.js +26 -0
- package/dist/w-threejs-vue.umd.js.map +1 -0
- package/docs/examples/app.html +66 -0
- package/docs/examples/app.umd.js +31 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/ex-AppBasicAutoRotateDeg.html +190 -0
- package/docs/examples/ex-AppBasicBackgroundColor.html +189 -0
- package/docs/examples/ex-AppBasicSize.html +170 -0
- package/docs/examples/ex-AppBasicUploadStl.html +237 -0
- package/docs/examples/ex-AppBasicUseAutoRotate.html +189 -0
- package/docs/examples/ex-AppCmCameraFar.html +191 -0
- package/docs/examples/ex-AppCmCameraFov.html +191 -0
- package/docs/examples/ex-AppCmCameraNear.html +191 -0
- package/docs/examples/ex-AppCmCameraOrthographicRatio.html +191 -0
- package/docs/examples/ex-AppCmCameraType.html +190 -0
- package/docs/examples/ex-AppCmGetCameraViewAngle.html +218 -0
- package/docs/examples/ex-AppCmSetCameraAzimuthAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraPolarAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraViewAngle.html +194 -0
- package/docs/examples/ex-AppHpHelperAxesLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridDensity.html +189 -0
- package/docs/examples/ex-AppHpHelperGridLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridPositionRatioZ.html +189 -0
- package/docs/examples/ex-AppHpUseHelperAxes.html +189 -0
- package/docs/examples/ex-AppHpUseHelperGrid.html +189 -0
- package/docs/examples/ex-AppLgLegnedBackgroundColor.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeight.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeightMax.html +189 -0
- package/docs/examples/ex-AppLtLightAmbientColor.html +189 -0
- package/docs/examples/ex-AppLtLightDirectionColor.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionIntensity.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionPos.html +191 -0
- package/docs/examples/ex-AppLtLightPointColor.html +192 -0
- package/docs/examples/ex-AppLtLightPointDecay.html +192 -0
- package/docs/examples/ex-AppLtLightPointDistance.html +192 -0
- package/docs/examples/ex-AppLtLightPointIntensity.html +192 -0
- package/docs/examples/ex-AppLtLightPointPoss.html +192 -0
- package/docs/examples/ex-AppLtUseLightAmbient.html +191 -0
- package/docs/examples/ex-AppLtUseLightDirection.html +191 -0
- package/docs/examples/ex-AppLtUseLightPoint.html +191 -0
- package/docs/examples/ex-AppMhGetMeshsInfor.html +198 -0
- package/docs/examples/ex-AppMhSetMeshColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelText.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontFamily.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontSize.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelVisible.html +198 -0
- package/docs/examples/ex-AppMhSetMeshVisible.html +198 -0
- package/docs/examples/ex-AppMuMenuIcons.html +217 -0
- package/docs/examples/ex-AppMuMenuTooltips.html +218 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +84 -0
- package/docs/module-WThreejsVue.html +216 -0
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +99 -0
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/package.json +74 -0
- package/public/index.html +42 -0
- package/src/App.vue +574 -0
- package/src/AppBasicAutoRotateDeg.vue +102 -0
- package/src/AppBasicBackgroundColor.vue +101 -0
- package/src/AppBasicSize.vue +90 -0
- package/src/AppBasicUploadStl.vue +159 -0
- package/src/AppBasicUseAutoRotate.vue +101 -0
- package/src/AppCmCameraFar.vue +103 -0
- package/src/AppCmCameraFov.vue +103 -0
- package/src/AppCmCameraNear.vue +103 -0
- package/src/AppCmCameraOrthographicRatio.vue +103 -0
- package/src/AppCmCameraType.vue +102 -0
- package/src/AppCmGetCameraViewAngle.vue +135 -0
- package/src/AppCmSetCameraAzimuthAngle.vue +104 -0
- package/src/AppCmSetCameraPolarAngle.vue +104 -0
- package/src/AppCmSetCameraViewAngle.vue +105 -0
- package/src/AppHpHelperAxesLengthRatio.vue +101 -0
- package/src/AppHpHelperGridDensity.vue +101 -0
- package/src/AppHpHelperGridLengthRatio.vue +101 -0
- package/src/AppHpHelperGridPositionRatioZ.vue +101 -0
- package/src/AppHpUseHelperAxes.vue +101 -0
- package/src/AppHpUseHelperGrid.vue +101 -0
- package/src/AppLgLegnedBackgroundColor.vue +101 -0
- package/src/AppLgLegnedHeight.vue +101 -0
- package/src/AppLgLegnedHeightMax.vue +101 -0
- package/src/AppLtLightAmbientColor.vue +101 -0
- package/src/AppLtLightDirectionColor.vue +103 -0
- package/src/AppLtLightDirectionIntensity.vue +103 -0
- package/src/AppLtLightDirectionPos.vue +103 -0
- package/src/AppLtLightPointColor.vue +104 -0
- package/src/AppLtLightPointDecay.vue +104 -0
- package/src/AppLtLightPointDistance.vue +104 -0
- package/src/AppLtLightPointIntensity.vue +104 -0
- package/src/AppLtLightPointPoss.vue +104 -0
- package/src/AppLtUseLightAmbient.vue +103 -0
- package/src/AppLtUseLightDirection.vue +103 -0
- package/src/AppLtUseLightPoint.vue +103 -0
- package/src/AppMhGetMeshsInfor.vue +112 -0
- package/src/AppMhSetMeshColor.vue +104 -0
- package/src/AppMhSetMeshLabelText.vue +104 -0
- package/src/AppMhSetMeshLabelTextColor.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontFamily.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontSize.vue +104 -0
- package/src/AppMhSetMeshLabelVisible.vue +106 -0
- package/src/AppMhSetMeshVisible.vue +106 -0
- package/src/AppMuMenuIcons.vue +130 -0
- package/src/AppMuMenuTooltips.vue +131 -0
- package/src/components/WThreejsVue.vue +955 -0
- package/src/js/addStl.mjs +83 -0
- package/src/js/getCsrdFromMeshs.mjs +85 -0
- package/src/js/plot3d.mjs +1407 -0
- package/src/main.js +8 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/gDistApp.mjs +38 -0
- package/toolg/gDistRollupComps.mjs +22 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +159 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +21 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* app v1.0.0
|
|
3
|
+
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";var e=Array.isArray,t="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,r=t||n||Function("return this")(),i=r.Symbol,o=Object.prototype,s=o.hasOwnProperty,a=o.toString,l=i?i.toStringTag:void 0;var c=Object.prototype.toString;var u="[object Null]",d="[object Undefined]",h=i?i.toStringTag:void 0;function p(e){return null==e?void 0===e?d:u:h&&h in Object(e)?function(e){var t=s.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[l]=n:delete e[l]),i}(e):function(e){return c.call(e)}(e)}function f(e){return null!=e&&"object"==typeof e}var m="[object Symbol]";function g(e){return"symbol"==typeof e||f(e)&&p(e)==m}var v=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y=/^\w*$/;function _(t,n){if(e(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!g(t))||(y.test(t)||!v.test(t)||null!=n&&t in Object(n))}function x(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var b="[object AsyncFunction]",S="[object Function]",w="[object GeneratorFunction]",C="[object Proxy]";function A(e){if(!x(e))return!1;var t=p(e);return t==S||t==w||t==b||t==C}var M,T=r["__core-js_shared__"],E=(M=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var L=Function.prototype.toString;function R(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var P=/^\[object .+?Constructor\]$/,k=Function.prototype,I=Object.prototype,O=k.toString,B=I.hasOwnProperty,D=RegExp("^"+O.call(B).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function U(e){return!(!x(e)||(t=e,E&&E in t))&&(A(e)?D:P).test(R(e));var t}function F(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return U(n)?n:void 0}var N=F(Object,"create");var z=Object.prototype.hasOwnProperty;var H=Object.prototype.hasOwnProperty;function V(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function W(e,t){return e===t||e!=e&&t!=t}function j(e,t){for(var n=e.length;n--;)if(W(e[n][0],t))return n;return-1}V.prototype.clear=function(){this.__data__=N?N(null):{},this.size=0},V.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},V.prototype.get=function(e){var t=this.__data__;if(N){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return z.call(t,e)?t[e]:void 0},V.prototype.has=function(e){var t=this.__data__;return N?void 0!==t[e]:H.call(t,e)},V.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=N&&void 0===t?"__lodash_hash_undefined__":t,this};var G=Array.prototype.splice;function $(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}$.prototype.clear=function(){this.__data__=[],this.size=0},$.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():G.call(t,n,1),--this.size,!0)},$.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},$.prototype.has=function(e){return j(this.__data__,e)>-1},$.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var X=F(r,"Map");function Y(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}q.prototype.clear=function(){this.size=0,this.__data__={hash:new V,map:new(X||$),string:new V}},q.prototype.delete=function(e){var t=Y(this,e).delete(e);return this.size-=t?1:0,t},q.prototype.get=function(e){return Y(this,e).get(e)},q.prototype.has=function(e){return Y(this,e).has(e)},q.prototype.set=function(e,t){var n=Y(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Z="Expected a function";function J(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Z);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(J.Cache||q),n}J.Cache=q;var K,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,re=(K=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,n,r,i){t.push(r?i.replace(ne,"$1"):n||e)})),t},Q=J(K,(function(e){return 500===ee.size&&ee.clear(),e})),ee=Q.cache,Q),ie=re;function oe(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var se=1/0,ae=i?i.prototype:void 0,le=ae?ae.toString:void 0;function ce(t){if("string"==typeof t)return t;if(e(t))return oe(t,ce)+"";if(g(t))return le?le.call(t):"";var n=t+"";return"0"==n&&1/t==-se?"-0":n}function ue(e){return null==e?"":ce(e)}function de(t,n){return e(t)?t:_(t,n)?[t]:ie(ue(t))}var he=1/0;function pe(e){if("string"==typeof e||g(e))return e;var t=e+"";return"0"==t&&1/e==-he?"-0":t}function fe(e,t){for(var n=0,r=(t=de(t,e)).length;null!=e&&n<r;)e=e[pe(t[n++])];return n&&n==r?e:void 0}function me(e,t,n){var r=null==e?void 0:fe(e,t);return void 0===r?n:r}function ge(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}var ve,ye=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[ve?s:++r];if(!1===t(i[a],a,i))break}return e},_e=ye;function xe(e){return f(e)&&"[object Arguments]"==p(e)}var be=Object.prototype,Se=be.hasOwnProperty,we=be.propertyIsEnumerable,Ce=xe(function(){return arguments}())?xe:function(e){return f(e)&&Se.call(e,"callee")&&!we.call(e,"callee")},Ae=Ce;var Me="object"==typeof exports&&exports&&!exports.nodeType&&exports,Te=Me&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=Te&&Te.exports===Me?r.Buffer:void 0,Le=(Ee?Ee.isBuffer:void 0)||function(){return!1},Re=9007199254740991,Pe=/^(?:0|[1-9]\d*)$/;function ke(e,t){var n=typeof e;return!!(t=null==t?Re:t)&&("number"==n||"symbol"!=n&&Pe.test(e))&&e>-1&&e%1==0&&e<t}var Ie=9007199254740991;function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ie}var Be={};function De(e){return function(t){return e(t)}}Be["[object Float32Array]"]=Be["[object Float64Array]"]=Be["[object Int8Array]"]=Be["[object Int16Array]"]=Be["[object Int32Array]"]=Be["[object Uint8Array]"]=Be["[object Uint8ClampedArray]"]=Be["[object Uint16Array]"]=Be["[object Uint32Array]"]=!0,Be["[object Arguments]"]=Be["[object Array]"]=Be["[object ArrayBuffer]"]=Be["[object Boolean]"]=Be["[object DataView]"]=Be["[object Date]"]=Be["[object Error]"]=Be["[object Function]"]=Be["[object Map]"]=Be["[object Number]"]=Be["[object Object]"]=Be["[object RegExp]"]=Be["[object Set]"]=Be["[object String]"]=Be["[object WeakMap]"]=!1;var Ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fe=Ue&&"object"==typeof module&&module&&!module.nodeType&&module,Ne=Fe&&Fe.exports===Ue&&t.process,ze=function(){try{var e=Fe&&Fe.require&&Fe.require("util").types;return e||Ne&&Ne.binding&&Ne.binding("util")}catch(e){}}(),He=ze&&ze.isTypedArray,Ve=He?De(He):function(e){return f(e)&&Oe(e.length)&&!!Be[p(e)]},We=Object.prototype.hasOwnProperty;function je(t,n){var r=e(t),i=!r&&Ae(t),o=!r&&!i&&Le(t),s=!r&&!i&&!o&&Ve(t),a=r||i||o||s,l=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(t.length,String):[],c=l.length;for(var u in t)!n&&!We.call(t,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ke(u,c))||l.push(u);return l}var Ge=Object.prototype;function $e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ge)}function Xe(e,t){return function(n){return e(t(n))}}var Ye=Xe(Object.keys,Object),qe=Object.prototype.hasOwnProperty;function Ze(e){if(!$e(e))return Ye(e);var t=[];for(var n in Object(e))qe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Je(e){return null!=e&&Oe(e.length)&&!A(e)}function Ke(e){return Je(e)?je(e):Ze(e)}var Qe=function(e,t){return function(n,r){if(null==n)return n;if(!Je(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}((function(e,t){return e&&_e(e,t,Ke)})),et=Qe;function tt(e){return e}function nt(t,n){var r;return(e(t)?ge:et)(t,"function"==typeof(r=n)?r:tt)}function rt(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function it(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:rt(e,t,n)}var ot=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function st(e){return ot.test(e)}function at(e,t,n){if(!x(n))return!1;var r=typeof t;return!!("number"==r?Je(n)&&ke(t,n.length):"string"==r&&t in n)&&W(n[t],e)}var lt=ze&&ze.isRegExp,ct=lt?De(lt):function(e){return f(e)&&"[object RegExp]"==p(e)};var ut="\\ud800-\\udfff",dt="["+ut+"]",ht="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",pt="\\ud83c[\\udffb-\\udfff]",ft="[^"+ut+"]",mt="(?:\\ud83c[\\udde6-\\uddff]){2}",gt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="(?:"+ht+"|"+pt+")"+"?",yt="[\\ufe0e\\ufe0f]?",_t=yt+vt+("(?:\\u200d(?:"+[ft,mt,gt].join("|")+")"+yt+vt+")*"),xt="(?:"+[ft+ht+"?",ht,mt,gt,dt].join("|")+")",bt=RegExp(pt+"(?="+pt+")|"+xt+_t,"g");function St(e){return st(e)?function(e){return e.match(bt)||[]}(e):function(e){return e.split("")}(e)}var wt=4294967295;function Ct(e,t,n){return n&&"number"!=typeof n&&at(e,t,n)&&(t=n=void 0),(n=void 0===n?wt:n>>>0)?(e=ue(e))&&("string"==typeof t||null!=t&&!ct(t))&&!(t=ce(t))&&st(e)?it(St(e),0,n):e.split(t,n):[]}function At(e){var t=this.__data__=new $(e);this.size=t.size}At.prototype.clear=function(){this.__data__=new $,this.size=0},At.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},At.prototype.get=function(e){return this.__data__.get(e)},At.prototype.has=function(e){return this.__data__.has(e)},At.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new q(r)}return n.set(e,t),this.size=n.size,this};function Mt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Et(e,t){return e.has(t)}Mt.prototype.add=Mt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Mt.prototype.has=function(e){return this.__data__.has(e)};var Lt=1,Rt=2;function Pt(e,t,n,r,i,o){var s=n&Lt,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=n&Rt?new Mt:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],m=t[d];if(r)var g=s?r(m,f,d,t,e,o):r(f,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!Tt(t,(function(e,t){if(!Et(p,t)&&(f===e||i(f,e,n,r,o)))return p.push(t)}))){h=!1;break}}else if(f!==m&&!i(f,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}var kt=r.Uint8Array;function It(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ot(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Bt=1,Dt=2,Ut="[object Boolean]",Ft="[object Date]",Nt="[object Error]",zt="[object Map]",Ht="[object Number]",Vt="[object RegExp]",Wt="[object Set]",jt="[object String]",Gt="[object Symbol]",$t="[object ArrayBuffer]",Xt="[object DataView]",Yt=i?i.prototype:void 0,qt=Yt?Yt.valueOf:void 0;function Zt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Jt(t,n,r){var i=n(t);return e(t)?i:Zt(i,r(t))}function Kt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Qt(){return[]}var en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?function(e){return null==e?[]:(e=Object(e),Kt(tn(e),(function(t){return en.call(e,t)})))}:Qt,rn=nn;function on(e){return Jt(e,Ke,rn)}var sn=1,an=Object.prototype.hasOwnProperty;var ln=F(r,"DataView"),cn=F(r,"Promise"),un=F(r,"Set"),dn=F(r,"WeakMap"),hn="[object Map]",pn="[object Promise]",fn="[object Set]",mn="[object WeakMap]",gn="[object DataView]",vn=R(ln),yn=R(X),_n=R(cn),xn=R(un),bn=R(dn),Sn=p;(ln&&Sn(new ln(new ArrayBuffer(1)))!=gn||X&&Sn(new X)!=hn||cn&&Sn(cn.resolve())!=pn||un&&Sn(new un)!=fn||dn&&Sn(new dn)!=mn)&&(Sn=function(e){var t=p(e),n="[object Object]"==t?e.constructor:void 0,r=n?R(n):"";if(r)switch(r){case vn:return gn;case yn:return hn;case _n:return pn;case xn:return fn;case bn:return mn}return t});var wn=Sn,Cn=1,An="[object Arguments]",Mn="[object Array]",Tn="[object Object]",En=Object.prototype.hasOwnProperty;function Ln(t,n,r,i,o,s){var a=e(t),l=e(n),c=a?Mn:wn(t),u=l?Mn:wn(n),d=(c=c==An?Tn:c)==Tn,h=(u=u==An?Tn:u)==Tn,p=c==u;if(p&&Le(t)){if(!Le(n))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new At),a||Ve(t)?Pt(t,n,r,i,o,s):function(e,t,n,r,i,o,s){switch(n){case Xt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $t:return!(e.byteLength!=t.byteLength||!o(new kt(e),new kt(t)));case Ut:case Ft:case Ht:return W(+e,+t);case Nt:return e.name==t.name&&e.message==t.message;case Vt:case jt:return e==t+"";case zt:var a=It;case Wt:var l=r&Bt;if(a||(a=Ot),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=Dt,s.set(e,t);var u=Pt(a(e),a(t),r,i,o,s);return s.delete(e),u;case Gt:if(qt)return qt.call(e)==qt.call(t)}return!1}(t,n,c,r,i,o,s);if(!(r&Cn)){var f=d&&En.call(t,"__wrapped__"),m=h&&En.call(n,"__wrapped__");if(f||m){var g=f?t.value():t,v=m?n.value():n;return s||(s=new At),o(g,v,r,i,s)}}return!!p&&(s||(s=new At),function(e,t,n,r,i,o){var s=n&sn,a=on(e),l=a.length;if(l!=on(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:an.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=s;++c<l;){var m=e[u=a[c]],g=t[u];if(r)var v=s?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,_=t.constructor;y==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(e),o.delete(t),p}(t,n,r,i,o,s))}function Rn(e,t,n,r,i){return e===t||(null==e||null==t||!f(e)&&!f(t)?e!=e&&t!=t:Ln(e,t,n,r,Rn,i))}var Pn=1,kn=2;function In(e){return e==e&&!x(e)}function On(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Bn(e){var t=function(e){for(var t=Ke(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,In(i)]}return t}(e);return 1==t.length&&t[0][2]?On(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var l=(a=n[i])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var d=new At;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?Rn(u,c,Pn|kn,r,d):h))return!1}}return!0}(n,e,t)}}function Dn(e,t){return null!=e&&t in Object(e)}function Un(t,n){return null!=t&&function(t,n,r){for(var i=-1,o=(n=de(n,t)).length,s=!1;++i<o;){var a=pe(n[i]);if(!(s=null!=t&&r(t,a)))break;t=t[a]}return s||++i!=o?s:!!(o=null==t?0:t.length)&&Oe(o)&&ke(a,o)&&(e(t)||Ae(t))}(t,n,Dn)}var Fn=1,Nn=2;function zn(e){return function(t){return null==t?void 0:t[e]}}function Hn(e){return _(e)?zn(pe(e)):function(e){return function(t){return fe(t,e)}}(e)}function Vn(t){return"function"==typeof t?t:null==t?tt:"object"==typeof t?e(t)?(n=t[0],r=t[1],_(n)&&In(r)?On(pe(n),r):function(e){var t=me(e,n);return void 0===t&&t===r?Un(e,n):Rn(r,t,Fn|Nn)}):Bn(t):Hn(t);var n,r}function Wn(e,t){var n=-1,r=Je(e)?Array(e.length):[];return et(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function jn(t,n){return(e(t)?oe:Wn)(t,Vn(n))}function Gn(e){return"[object String]"===Object.prototype.toString.call(e)}function $n(e){return!(!Gn(e)||""===e)}var Xn="[object String]";var Yn=zn("length"),qn="\\ud800-\\udfff",Zn="["+qn+"]",Jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Kn="\\ud83c[\\udffb-\\udfff]",Qn="[^"+qn+"]",er="(?:\\ud83c[\\udde6-\\uddff]){2}",tr="[\\ud800-\\udbff][\\udc00-\\udfff]",nr="(?:"+Jn+"|"+Kn+")"+"?",rr="[\\ufe0e\\ufe0f]?",ir=rr+nr+("(?:\\u200d(?:"+[Qn,er,tr].join("|")+")"+rr+nr+")*"),or="(?:"+[Qn+Jn+"?",Jn,er,tr,Zn].join("|")+")",sr=RegExp(Kn+"(?="+Kn+")|"+or+ir,"g");function ar(e){return st(e)?function(e){for(var t=sr.lastIndex=0;sr.test(e);)++t;return t}(e):Yn(e)}var lr="[object Map]",cr="[object Set]";function ur(t){if(null==t)return 0;if(Je(t))return"string"==typeof(n=t)||!e(n)&&f(n)&&p(n)==Xn?ar(t):t.length;var n,r=wn(t);return r==lr||r==cr?t.size:Ze(t).length}function dr(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hr(e,t){var n=!0;return et(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function pr(e,t){return Rn(e,t)}function fr(e){return"[object Object]"===Object.prototype.toString.call(e)}function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function gr(e){var t=function(e,t){if("object"!=mr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mr(t)?t:String(t)}function vr(e,t,n){return(t=gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yr=function(){try{var e=F(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_r=yr;function xr(e,t,n){"__proto__"==t&&_r?_r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var br=Object.prototype.hasOwnProperty;function Sr(e,t,n){var r=e[t];br.call(e,t)&&W(r,n)&&(void 0!==n||t in e)||xr(e,t,n)}function wr(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?xr(n,a,l):Sr(n,a,l)}return n}var Cr=Object.prototype.hasOwnProperty;function Ar(e){if(!x(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=$e(e),n=[];for(var r in e)("constructor"!=r||!t&&Cr.call(e,r))&&n.push(r);return n}function Mr(e){return Je(e)?je(e,!0):Ar(e)}var Tr="object"==typeof exports&&exports&&!exports.nodeType&&exports,Er=Tr&&"object"==typeof module&&module&&!module.nodeType&&module,Lr=Er&&Er.exports===Tr?r.Buffer:void 0,Rr=Lr?Lr.allocUnsafe:void 0;function Pr(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var kr=Xe(Object.getPrototypeOf,Object),Ir=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Zt(t,rn(e)),e=kr(e);return t}:Qt,Or=Ir;function Br(e){return Jt(e,Mr,Or)}var Dr=Object.prototype.hasOwnProperty;function Ur(e){var t=new e.constructor(e.byteLength);return new kt(t).set(new kt(e)),t}var Fr=/\w*$/;var Nr=i?i.prototype:void 0,zr=Nr?Nr.valueOf:void 0;var Hr="[object Boolean]",Vr="[object Date]",Wr="[object Map]",jr="[object Number]",Gr="[object RegExp]",$r="[object Set]",Xr="[object String]",Yr="[object Symbol]",qr="[object ArrayBuffer]",Zr="[object DataView]",Jr="[object Float32Array]",Kr="[object Float64Array]",Qr="[object Int8Array]",ei="[object Int16Array]",ti="[object Int32Array]",ni="[object Uint8Array]",ri="[object Uint8ClampedArray]",ii="[object Uint16Array]",oi="[object Uint32Array]";function si(e,t,n){var r,i=e.constructor;switch(t){case qr:return Ur(e);case Hr:case Vr:return new i(+e);case Zr:return function(e,t){var n=t?Ur(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Jr:case Kr:case Qr:case ei:case ti:case ni:case ri:case ii:case oi:return function(e,t){var n=t?Ur(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case Wr:return new i;case jr:case Xr:return new i(e);case Gr:return function(e){var t=new e.constructor(e.source,Fr.exec(e));return t.lastIndex=e.lastIndex,t}(e);case $r:return new i;case Yr:return r=e,zr?Object(zr.call(r)):{}}}var ai=Object.create,li=function(){function e(){}return function(t){if(!x(t))return{};if(ai)return ai(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),ci=li;var ui=ze&&ze.isMap,di=ui?De(ui):function(e){return f(e)&&"[object Map]"==wn(e)};var hi=ze&&ze.isSet,pi=hi?De(hi):function(e){return f(e)&&"[object Set]"==wn(e)},fi=1,mi=2,gi=4,vi="[object Arguments]",yi="[object Function]",_i="[object GeneratorFunction]",xi="[object Object]",bi={};function Si(t,n,r,i,o,s){var a,l=n&fi,c=n&mi,u=n&gi;if(r&&(a=o?r(t,i,o,s):r(t)),void 0!==a)return a;if(!x(t))return t;var d=e(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Dr.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return Pr(t,a)}else{var h=wn(t),p=h==yi||h==_i;if(Le(t))return function(e,t){if(t)return e.slice();var n=e.length,r=Rr?Rr(n):new e.constructor(n);return e.copy(r),r}(t,l);if(h==xi||h==vi||p&&!o){if(a=c||p?{}:function(e){return"function"!=typeof e.constructor||$e(e)?{}:ci(kr(e))}(t),!l)return c?function(e,t){return wr(e,Or(e),t)}(t,function(e,t){return e&&wr(t,Mr(t),e)}(a,t)):function(e,t){return wr(e,rn(e),t)}(t,function(e,t){return e&&wr(t,Ke(t),e)}(a,t))}else{if(!bi[h])return o?t:{};a=si(t,h,l)}}s||(s=new At);var f=s.get(t);if(f)return f;s.set(t,a),pi(t)?t.forEach((function(e){a.add(Si(e,n,r,e,t,s))})):di(t)&&t.forEach((function(e,i){a.set(i,Si(e,n,r,i,t,s))}));var m=d?void 0:(u?c?Br:on:c?Mr:Ke)(t);return ge(m||t,(function(e,i){m&&(e=t[i=e]),Sr(a,i,Si(e,n,r,i,t,s))})),a}bi[vi]=bi["[object Array]"]=bi["[object ArrayBuffer]"]=bi["[object DataView]"]=bi["[object Boolean]"]=bi["[object Date]"]=bi["[object Float32Array]"]=bi["[object Float64Array]"]=bi["[object Int8Array]"]=bi["[object Int16Array]"]=bi["[object Int32Array]"]=bi["[object Map]"]=bi["[object Number]"]=bi[xi]=bi["[object RegExp]"]=bi["[object Set]"]=bi["[object String]"]=bi["[object Symbol]"]=bi["[object Uint8Array]"]=bi["[object Uint8ClampedArray]"]=bi["[object Uint16Array]"]=bi["[object Uint32Array]"]=!0,bi["[object Error]"]=bi[yi]=bi["[object WeakMap]"]=!1;var wi=1,Ci=4;function Ai(e){return Si(e,wi|Ci)}var Mi=/\s/;var Ti=/^\s+/;function Ei(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Mi.test(e.charAt(t)););return t}(e)+1).replace(Ti,""):e}var Li=NaN,Ri=/^[-+]0x[0-9a-f]+$/i,Pi=/^0b[01]+$/i,ki=/^0o[0-7]+$/i,Ii=parseInt;function Oi(e){if("number"==typeof e)return e;if(g(e))return Li;if(x(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=x(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ei(e);var n=Pi.test(e);return n||ki.test(e)?Ii(e.slice(2),n?2:8):Ri.test(e)?Li:+e}var Bi=1/0,Di=17976931348623157e292;function Ui(e){return e?(e=Oi(e))===Bi||e===-Bi?(e<0?-1:1)*Di:e==e?e:0:0===e?e:0}function Fi(e){var t=Ui(e),n=t%1;return t==t?n?t-n:t:0}function Ni(e){return e!=e}function zi(e){let t=!1;if($n(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(Ni(e))return!1;t=!0}return t}function Hi(e){if(!zi(e))return 0;return Ui(e)}function Vi(e){return!!zi(e)&&(e=Hi(e),"number"==typeof(t=e)&&t==Fi(t));var t}var Wi=r.isFinite,ji=Math.min;var Gi=function(e){var t=Math[e];return function(e,n){if(e=Oi(e),(n=null==n?0:ji(Fi(n),292))&&Wi(e)){var r=(ue(e)+"e").split("e");return+((r=(ue(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}("round"),$i=Gi;function Xi(e){if(!zi(e))return 0;e=Hi(e);let t=$i(e);return"0"===String(t)?0:t}function Yi(e){if(!Vi(e))return!1;return Xi(e)>0}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zi={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var l,c,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,s),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==t||i&&!a[l].once||r&&a[l].context!==r)&&c.push(a[l]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a}(Zi);var Ji=qi(Zi.exports);function Ki(){return new Ji}function Qi(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function to(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=me(t,"timeInterval",null);Yi(n)||(n=20);let r=me(t,"tolerancePixel",null);Yi(r)||(r=1);let i,o=Ki(),s={offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,windowWidth:0,windowHeight:0},a=Ai(s),l={width:"",height:""};if(!Qi(e))return console.log("invalid f",e),null;i=setInterval((()=>{let t=e();if(t){let e={offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight},n=a.offsetWidth-e.offsetWidth,i=a.offsetHeight-e.offsetHeight,c=Math.abs(n)>r,u=Math.abs(i)>r,d="";n>0?d="smaller":n<0&&(d="larger");let h="";if(i>0?h="smaller":i<0&&(h="larger"),l={width:d,height:h},c||u){let n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(n),!0).forEach((function(t){vr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a);setTimeout((()=>{e.offsetWidth>0&&e.offsetHeight>0&&(o.emit("resize",{sold:n,snew:e,smode:l,ele:t}),o.emit("resizeWithWindow",{sold:n,snew:e,smode:l,ele:t,from:"dom"}))}),1)}s=a,a=e}}),n);let c=e=>{o.emit("resizeWithWindow",{sold:s,snew:a,smode:l,from:"window"})};return window.addEventListener("resize",c),o.clear=()=>{clearInterval(i),window.removeEventListener("resize",c)},o}let no="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ro=no.length;function io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,t=[];e=Yi(e)?Xi(e):32;for(let n=0;n<e;n++)t[n]=no[0|Math.random()*ro];return t.join("")}function oo(){let e={};return{bind:function(t,n,r){let i=`r${io()}`;t.setAttribute("ev-resize",i);let o=to((()=>t));o.on("resizeWithWindow",(e=>{!function(e,t,n){let r=e.data&&e.data.on||e.componentOptions&&e.componentOptions.listeners;r&&r[t]&&r[t].fns(n)}(r,"domresize",e)})),e[i]=o},unbind:function(t){let n=t.getAttribute("ev-resize");t.setAttribute("ev-resize",null),e[n]&&(e[n].clear(),e[n]=null,delete e[n])}}}var so,ao=(so="toUpperCase",function(e){var t=st(e=ue(e))?St(e):void 0,n=t?t[0]:e.charAt(0),r=t?it(t,1).join(""):e.slice(1);return n[so]()+r});var lo,co=(lo={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==lo?void 0:lo[e]}),uo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ho=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var po=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mo="\\ud800-\\udfff",go="\\u2700-\\u27bf",vo="a-z\\xdf-\\xf6\\xf8-\\xff",yo="A-Z\\xc0-\\xd6\\xd8-\\xde",_o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xo="["+_o+"]",bo="\\d+",So="["+go+"]",wo="["+vo+"]",Co="[^"+mo+_o+bo+go+vo+yo+"]",Ao="(?:\\ud83c[\\udde6-\\uddff]){2}",Mo="[\\ud800-\\udbff][\\udc00-\\udfff]",To="["+yo+"]",Eo="(?:"+wo+"|"+Co+")",Lo="(?:"+To+"|"+Co+")",Ro="(?:['’](?:d|ll|m|re|s|t|ve))?",Po="(?:['’](?:D|LL|M|RE|S|T|VE))?",ko="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Io="[\\ufe0e\\ufe0f]?",Oo=Io+ko+("(?:\\u200d(?:"+["[^"+mo+"]",Ao,Mo].join("|")+")"+Io+ko+")*"),Bo="(?:"+[So,Ao,Mo].join("|")+")"+Oo,Do=RegExp([To+"?"+wo+"+"+Ro+"(?="+[xo,To,"$"].join("|")+")",Lo+"+"+Po+"(?="+[xo,To+Eo,"$"].join("|")+")",To+"?"+Eo+"+"+Ro,To+"+"+Po,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bo,Bo].join("|"),"g");function Uo(e,t,n){return e=ue(e),void 0===(t=n?void 0:t)?function(e){return fo.test(e)}(e)?function(e){return e.match(Do)||[]}(e):function(e){return e.match(po)||[]}(e):e.match(t)||[]}var Fo=RegExp("['’]","g");var No,zo=(No=function(e,t,n){return t=t.toLowerCase(),e+(n?ao(ue(t).toLowerCase()):t)},function(e){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(Uo(function(e){return(e=ue(e))&&e.replace(uo,co).replace(ho,"")}(e).replace(Fo,"")),No,"")}),Ho=zo;let Vo={default:{red:{base:"#f44336",lighten5:"#ffebee",lighten4:"#ffcdd2",lighten3:"#ef9a9a",lighten2:"#e57373",lighten1:"#ef5350",darken1:"#e53935",darken2:"#d32f2f",darken3:"#c62828",darken4:"#b71c1c",accent1:"#ff8a80",accent2:"#ff5252",accent3:"#ff1744",accent4:"#d50000"},pink:{base:"#e91e63",lighten5:"#fce4ec",lighten4:"#f8bbd0",lighten3:"#f48fb1",lighten2:"#f06292",lighten1:"#ec407a",darken1:"#d81b60",darken2:"#c2185b",darken3:"#ad1457",darken4:"#880e4f",accent1:"#ff80ab",accent2:"#ff4081",accent3:"#f50057",accent4:"#c51162"},purple:{base:"#9c27b0",lighten5:"#f3e5f5",lighten4:"#e1bee7",lighten3:"#ce93d8",lighten2:"#ba68c8",lighten1:"#ab47bc",darken1:"#8e24aa",darken2:"#7b1fa2",darken3:"#6a1b9a",darken4:"#4a148c",accent1:"#ea80fc",accent2:"#e040fb",accent3:"#d500f9",accent4:"#aa00ff"},deepPurple:{base:"#673ab7",lighten5:"#ede7f6",lighten4:"#d1c4e9",lighten3:"#b39ddb",lighten2:"#9575cd",lighten1:"#7e57c2",darken1:"#5e35b1",darken2:"#512da8",darken3:"#4527a0",darken4:"#311b92",accent1:"#b388ff",accent2:"#7c4dff",accent3:"#651fff",accent4:"#6200ea"},indigo:{base:"#3f51b5",lighten5:"#e8eaf6",lighten4:"#c5cae9",lighten3:"#9fa8da",lighten2:"#7986cb",lighten1:"#5c6bc0",darken1:"#3949ab",darken2:"#303f9f",darken3:"#283593",darken4:"#1a237e",accent1:"#8c9eff",accent2:"#536dfe",accent3:"#3d5afe",accent4:"#304ffe"},blue:{base:"#2196f3",lighten5:"#e3f2fd",lighten4:"#bbdefb",lighten3:"#90caf9",lighten2:"#64b5f6",lighten1:"#42a5f5",darken1:"#1e88e5",darken2:"#1976d2",darken3:"#1565c0",darken4:"#0d47a1",accent1:"#82b1ff",accent2:"#448aff",accent3:"#2979ff",accent4:"#2962ff"},lightBlue:{base:"#03a9f4",lighten5:"#e1f5fe",lighten4:"#b3e5fc",lighten3:"#81d4fa",lighten2:"#4fc3f7",lighten1:"#29b6f6",darken1:"#039be5",darken2:"#0288d1",darken3:"#0277bd",darken4:"#01579b",accent1:"#80d8ff",accent2:"#40c4ff",accent3:"#00b0ff",accent4:"#0091ea"},cyan:{base:"#00bcd4",lighten5:"#e0f7fa",lighten4:"#b2ebf2",lighten3:"#80deea",lighten2:"#4dd0e1",lighten1:"#26c6da",darken1:"#00acc1",darken2:"#0097a7",darken3:"#00838f",darken4:"#006064",accent1:"#84ffff",accent2:"#18ffff",accent3:"#00e5ff",accent4:"#00b8d4"},teal:{base:"#009688",lighten5:"#e0f2f1",lighten4:"#b2dfdb",lighten3:"#80cbc4",lighten2:"#4db6ac",lighten1:"#26a69a",darken1:"#00897b",darken2:"#00796b",darken3:"#00695c",darken4:"#004d40",accent1:"#a7ffeb",accent2:"#64ffda",accent3:"#1de9b6",accent4:"#00bfa5"},green:{base:"#4caf50",lighten5:"#e8f5e9",lighten4:"#c8e6c9",lighten3:"#a5d6a7",lighten2:"#81c784",lighten1:"#66bb6a",darken1:"#43a047",darken2:"#388e3c",darken3:"#2e7d32",darken4:"#1b5e20",accent1:"#b9f6ca",accent2:"#69f0ae",accent3:"#00e676",accent4:"#00c853"},lightGreen:{base:"#8bc34a",lighten5:"#f1f8e9",lighten4:"#dcedc8",lighten3:"#c5e1a5",lighten2:"#aed581",lighten1:"#9ccc65",darken1:"#7cb342",darken2:"#689f38",darken3:"#558b2f",darken4:"#33691e",accent1:"#ccff90",accent2:"#b2ff59",accent3:"#76ff03",accent4:"#64dd17"},lime:{base:"#cddc39",lighten5:"#f9fbe7",lighten4:"#f0f4c3",lighten3:"#e6ee9c",lighten2:"#dce775",lighten1:"#d4e157",darken1:"#c0ca33",darken2:"#afb42b",darken3:"#9e9d24",darken4:"#827717",accent1:"#f4ff81",accent2:"#eeff41",accent3:"#c6ff00",accent4:"#aeea00"},yellow:{base:"#ffeb3b",lighten5:"#fffde7",lighten4:"#fff9c4",lighten3:"#fff59d",lighten2:"#fff176",lighten1:"#ffee58",darken1:"#fdd835",darken2:"#fbc02d",darken3:"#f9a825",darken4:"#f57f17",accent1:"#ffff8d",accent2:"#ffff00",accent3:"#ffea00",accent4:"#ffd600"},amber:{base:"#ffc107",lighten5:"#fff8e1",lighten4:"#ffecb3",lighten3:"#ffe082",lighten2:"#ffd54f",lighten1:"#ffca28",darken1:"#ffb300",darken2:"#ffa000",darken3:"#ff8f00",darken4:"#ff6f00",accent1:"#ffe57f",accent2:"#ffd740",accent3:"#ffc400",accent4:"#ffab00"},orange:{base:"#ff9800",lighten5:"#fff3e0",lighten4:"#ffe0b2",lighten3:"#ffcc80",lighten2:"#ffb74d",lighten1:"#ffa726",darken1:"#fb8c00",darken2:"#f57c00",darken3:"#ef6c00",darken4:"#e65100",accent1:"#ffd180",accent2:"#ffab40",accent3:"#ff9100",accent4:"#ff6d00"},deepOrange:{base:"#ff5722",lighten5:"#fbe9e7",lighten4:"#ffccbc",lighten3:"#ffab91",lighten2:"#ff8a65",lighten1:"#ff7043",darken1:"#f4511e",darken2:"#e64a19",darken3:"#d84315",darken4:"#bf360c",accent1:"#ff9e80",accent2:"#ff6e40",accent3:"#ff3d00",accent4:"#dd2c00"},brown:{base:"#795548",lighten5:"#efebe9",lighten4:"#d7ccc8",lighten3:"#bcaaa4",lighten2:"#a1887f",lighten1:"#8d6e63",darken1:"#6d4c41",darken2:"#5d4037",darken3:"#4e342e",darken4:"#3e2723"},blueGrey:{base:"#607d8b",lighten5:"#eceff1",lighten4:"#cfd8dc",lighten3:"#b0bec5",lighten2:"#90a4ae",lighten1:"#78909c",darken1:"#546e7a",darken2:"#455a64",darken3:"#37474f",darken4:"#263238"},grey:{base:"#9e9e9e",lighten5:"#fafafa",lighten4:"#f5f5f5",lighten3:"#eeeeee",lighten2:"#e0e0e0",lighten1:"#bdbdbd",darken1:"#757575",darken2:"#616161",darken3:"#424242",darken4:"#212121"},shades:{black:"#000000",white:"#ffffff",transparent:"transparent"}}};function Wo(e){if("white"===e)return"#fff";if("black"===e)return"#000";if("transparent"===e)return"rgba(0,0,0,0)";let t=function(e){let t=Ct(e," ");return 1===ur(t)&&(t[1]=null),t}(e),n=function(e,t,n){let r=me(Vo,`default.${e}.${t}`,null);return null===r&&(r=n),r}(function(e){let t=e.trim();return t=Ho(t),t}(t[0]),function(e){$n(e)||(e="base");let t=e.trim();return t=t.replace("-","").trim(),t}(t[1]),e);return n}function jo(e,t,n){if(!$n(e))return"";if(!$n(t))return"";if(!Gn(n))return"";return String(e).replaceAll(t,n)}function Go(e){if(fr(e)){for(let t in e)return!0;return!1}return!1}var $o="[object Object]",Xo=Function.prototype,Yo=Object.prototype,qo=Xo.toString,Zo=Yo.hasOwnProperty,Jo=qo.call(Object);function Ko(e){return f(e)&&1===e.nodeType&&!function(e){if(!f(e)||p(e)!=$o)return!1;var t=kr(e);if(null===t)return!0;var n=Zo.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qo.call(n)==Jo}(e)}function Qo(e){return Ko(e)}function es(e){function t(e){e.parentNode.removeChild(e)}if(Qo(e)){return void t(e)}if(!$n(e))return;let n=function(e){return document.querySelectorAll(e)}(e);nt(n,(function(e){t(e)}))}function ts(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=me(n,"timeDuration",null);Yi(r)||(r=1e3);let i=me(n,"color",null);if($n(i)||(i="rgba(255, 255, 255, 0.5)"),!Qo(e))return;e.style.position="relative",e.style.overflow="hidden";let o=e.getBoundingClientRect(),s=t.clientX-o.left,a=t.clientY-o.top,l=2*Math.max(e.clientWidth,e.clientHeight),c=document.createElement("div");c.style.width=`${l}px`,c.style.height=`${l}px`,c.style.transition=`all ${r/1e3}s linear`,c.style.position="absolute",c.style.zIndex=1,c.style.left=`${s}px`,c.style.top=`${a}px`,c.style.borderRadius="50%",c.style.transformOrigin="center",c.style.transform="translate(-50%,-50%) scale(0)",c.style.background=i,c.style.userSelect="none",c.style.pointerEvents="none",e.appendChild(c),setTimeout((()=>{c.style.transform="translate(-50%,-50%) scale(2)",c.style.opacity=0}),1),setTimeout((()=>{es(c)}),r)}function ns(){let e={};return{bind:function(t,n,r){let i=`r${io()}`;t.setAttribute("ev-ripple",i),function(t,n){let r=t.getAttribute("ev-ripple"),i=me(n,"value");if(i=Go(i),!i)return;let o=me(n,"value.color");if(!$n(o))return;o=Wo(o);let s=me(n,"value.timeDuration");zi(s)||(s=1e3);function a(e){ts(e.currentTarget,e,{color:o,timeDuration:s})}s=Hi(s),t.addEventListener("click",a,!1),e[r]=a}(t,n)},unbind:function(t){!function(t){let n=t.getAttribute("ev-ripple");if(e[n]){let r=e[n];t.removeEventListener("click",r,!1),delete e[n]}}(t),t.setAttribute("ev-ripple",null)}}}var rs="[object Boolean]";function is(e){return!0===e||!1===e||f(e)&&p(e)==rs}function os(e){return is(e)}var ss="[object Number]";function as(e){return"number"==typeof e||f(e)&&p(e)==ss}function ls(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=me(t,"parse");os(n)||(n=!0);let r=me(t,"ext");Go(r)||(r={});let i=me(t,"semicolon");os(i)||(i=!0);let o=me(t,"returnObj");os(o)||(o=!1);let s=0,a=0,l=0,c=0;if(n){let t=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=me(n,"def",""),i=me(n,"type","");"num"!==i&&"text"!==i&&(i="num"),"num"===i?t=as:"text"===i&&(t=Gn);let o=r,s=r,a=r,l=r;return t(me(e,"h"))&&(o=me(e,"h"),s=o),t(me(e,"v"))&&(a=me(e,"v"),l=a),t(me(e,"left"))&&(o=me(e,"left")),t(me(e,"right"))&&(s=me(e,"right")),t(me(e,"top"))&&(a=me(e,"top")),t(me(e,"bottom"))&&(l=me(e,"bottom")),{left:o,right:s,top:a,bottom:l}}(e);s=t.left,a=t.right,l=t.top,c=t.bottom}s+=me(r,"left",0),a+=me(r,"right",0),l+=me(r,"top",0),c+=me(r,"bottom",0);let u=null;return o?u={left:s,right:a,top:l,bottom:c}:(u=`${l}px ${a}px ${c}px ${s}px`,i&&(u=`${u};`)),u}function cs(e){return"[object Array]"===Object.prototype.toString.call(e)}function us(e){return!!function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e)||(!!function(e){return"[object Null]"===Object.prototype.toString.call(e)}(e)||(!!function(e){if(fr(e)){for(let t in e)return!1;return!0}return!1}(e)||(!!function(e){return!(!Gn(e)||""!==e)}(e)||(!!function(e){return!!cs(e)&&0===e.length}(e)||!!Ni(e)))))}function ds(e){return!!cs(e)&&(0!==e.length&&(1!==e.length||!us(e[0])))}var hs={components:{},props:{icon:{type:[String,Array],default:""},color:{type:String,default:"grey darken-1"},colorHover:{type:String,default:"grey darken-3"},sizeOriginal:{type:Number,default:24},size:{type:Number,default:24},timeTransition:{type:Number,default:.15}},data:function(){return{mouseEnter:!1,r:.83,paths:[]}},computed:{hasIcon:function(){return $n(this.icon)},isMdi:function(){return!!this.hasIcon&&this.icon.indexOf("mdi-")>=0},isFa:function(){return!!this.hasIcon&&this.icon.indexOf(" fa-")>=0},isSvg:function(){let e=this;if(e.isMdi||e.isFa)return!1;let t=$n(e.icon),n=ds(e.icon);return t||n},usePaths:function(){let e=this;if(!e.isSvg)return[];let t=e.icon;return $n(e.icon)&&(t=[e.icon]),t},useIconColor:function(){let e=this;return e.mouseEnter?Wo(e.colorHover):Wo(e.color)},useStyleSize:function(){let e=this;return{width:`${e.size}px`,height:`${e.size}px`,"line-height":`${e.size}px`,"max-height":`${e.size}px`,"min-height":`${e.size}px`}}},methods:{}};function ps(e,t,n,r,i,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);const u="function"==typeof n?n.options:n;let d;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=s?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),d)if(u.functional){const e=u.render;u.render=function(t,n){return d.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,d):[d]}return n}const fs="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function ms(e){return(e,t)=>function(e,t){const n=fs?t.media||"default":e,r=vs[n]||(vs[n]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",t.media&&r.element.setAttribute("media",t.media),void 0===gs&&(gs=document.head||document.getElementsByTagName("head")[0]),gs.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(n),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{const e=r.ids.size-1,t=document.createTextNode(n),i=r.element.childNodes;i[e]&&r.element.removeChild(i[e]),i.length?r.element.insertBefore(t,i[e]):r.element.appendChild(t)}}}(e,t)}let gs;const vs={};const ys=hs;var _s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.icon?n("div",{style:[e.useStyleSize,{display:"flex","align-items":"center","user-select":"none",border:"0px solid #ddd"}],on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){e.$emit("click",t)}.apply(null,arguments)},click:function(t){e.$emit("click",t)}}},[e.isSvg?n("svg",{style:"transition:all "+e.timeTransition+"s linear; fill:"+e.useIconColor+";",attrs:{width:e.size,height:e.size,viewBox:"0 0 "+e.sizeOriginal+" "+e.sizeOriginal},on:{mouseenter:function(t){e.mouseEnter=!0},mouseleave:function(t){e.mouseEnter=!1}}},e._l(e.usePaths,(function(t,r){return n("path",{key:r,attrs:{d:e.icon}})})),0):e._e(),e._v(" "),e.isMdi?n("div",{style:"transition:all "+e.timeTransition+"s linear; width:"+e.size+"px; height:"+e.size+"px; color:"+e.useIconColor+"; display:flex; align-items:center; justify-content:center;",on:{mouseenter:function(t){e.mouseEnter=!0},mouseleave:function(t){e.mouseEnter=!1}}},[n("span",{class:"mdi "+e.icon,style:"font-size:"+e.size+"px;"})]):e._e(),e._v(" "),e.isFa?n("div",{style:"transition:all "+e.timeTransition+"s linear; width:"+e.size+"px; height:"+e.size+"px; color:"+e.useIconColor+"; display:flex; align-items:center; justify-content:center;",on:{mouseenter:function(t){e.mouseEnter=!0},mouseleave:function(t){e.mouseEnter=!1}}},[n("div",{style:"width:"+e.size+"px; height:"+e.size+"px; _transform-origin:center; transform:translateX(0px) translateY(0px) scale("+e.r+");"},[n("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[n("i",{class:"fas "+e.icon,style:"font-size:"+e.size+"px;"})])])]):e._e()]):e._e()};_s._withStripped=!0;const xs=ps({render:_s,staticRenderFns:[]},(function(e){e&&e("data-v-0b5c1a37_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WIcon.vue"},media:void 0})}),ys,"data-v-0b5c1a37",false,undefined,!1,ms,void 0,void 0);const bs={directives:{domripple:ns()},components:{WIcon:xs},props:{text:{type:String,default:""},textFontSize:{type:String,default:"1rem"},active:{type:Boolean,default:!1},paddingStyle:{type:Object,default:()=>({v:10,h:12})},borderRadius:{type:Number,default:0},backgroundColor:{type:String,default:"white"},backgroundColorHover:{type:String,default:"rgba(200,200,200,0.2)"},backgroundColorActive:{type:String,default:"orange lighten-1"},backgroundColorDisabled:{type:String,default:"white"},textColor:{type:String,default:"#444"},textColorHover:{type:String,default:"#222"},textColorActive:{type:String,default:"white"},textColorDisabled:{type:String,default:"#444"},icon:{type:String,default:""},iconSize:{type:Number,default:22},iconColor:{type:String,default:"#444"},iconColorHover:{type:String,default:"#222"},iconColorActive:{type:String,default:"white"},iconColorDisabled:{type:String,default:"#444"},rippleColor:{type:String,default:"rgba(255,255,255,0.4)"},editable:{type:Boolean,default:!0},disabledColor:{type:String,default:"rgba(255,255,255,0.5)"},cursorPointer:{type:Boolean,default:!0}},data:function(){return{mouseEnter:!1}},computed:{useTextFontSize:function(){let e=this.textFontSize;return e=jo(e,";",""),`font-size:${e};`},hasIcon:function(){return""!==this.icon},usePadding:function(){let e=this;return`padding:${ls(e.paddingStyle,{ext:{left:e.shiftLeft,right:e.shiftRight}})};`},effBackgroundColor:function(){return Wo(this.backgroundColor)},effBackgroundColorHover:function(){return Wo(this.backgroundColorHover)},effBackgroundActive:function(){return Wo(this.backgroundColorActive)},effBackgroundColorDisabled:function(){return Wo(this.backgroundColorDisabled)},useBackgroundColor:function(){let e=this;return e.editable?e.active?e.effBackgroundActive:e.mouseEnter?e.effBackgroundColorHover:e.effBackgroundColor:e.effBackgroundColorDisabled},effTextColor:function(){return Wo(this.textColor)},effTextColorHover:function(){return Wo(this.textColorHover)},effTextActive:function(){return Wo(this.textColorActive)},effTextColorDisabled:function(){return Wo(this.textColorDisabled)},useTextColor:function(){let e=this;return e.editable?e.active?e.effTextActive:e.mouseEnter?e.effTextColorHover:e.effTextColor:e.effTextColorDisabled},effIconColor:function(){return Wo(this.iconColor)},effIconColorHover:function(){return Wo(this.iconColorHover)},effIconActive:function(){return Wo(this.iconColorActive)},effIconColorDisabled:function(){return Wo(this.iconColorDisabled)},useIconColor:function(){let e=this;return e.editable?e.active?e.effIconActive:e.mouseEnter?e.effIconColorHover:e.effIconColor:e.effIconColorDisabled},effDisabledColor:function(){return Wo(this.disabledColor)}},methods:{clickItem:function(){let e=this;e.editable&&e.$emit("click",{icon:e.icon,text:e.text})}}};var Ss=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"domripple",rawName:"v-domripple",value:{color:e.rippleColor},expression:"{color:rippleColor}"}],style:"position:relative; transition:all 0.3s; border-top-left-radius:"+e.borderRadius+"px; border-top-right-radius:"+e.borderRadius+"px; "+e.usePadding+" background:"+e.useBackgroundColor+"; "+(e.editable&&e.cursorPointer?"cursor:pointer;":""),on:{mouseenter:function(t){e.mouseEnter=!0},mouseleave:function(t){e.mouseEnter=!1},click:e.clickItem}},[n("div",{style:"transition:all 0.3s; color:"+e.useTextColor+"; "+e.useTextFontSize},[e._t("item",(function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[e._t("item-left",null,{isHover:e.mouseEnter,isActive:e.active}),e._v(" "),e._t("item-content",(function(){return[e.hasIcon?n("WIcon",{staticStyle:{"margin-right":"8px"},attrs:{icon:e.icon,color:e.useIconColor,colorHover:e.useIconColor,size:e.iconSize}}):e._e(),e._v(" "),n("div",[e._v("\n "+e._s(e.text)+"\n ")])]}),{isHover:e.mouseEnter,isActive:e.active}),e._v(" "),e._t("item-right",null,{isHover:e.mouseEnter,isActive:e.active})],2)]}),{isHover:e.mouseEnter,isActive:e.active}),e._v(" "),e.editable?e._e():n("div",{staticStyle:{position:"absolute",left:"0",right:"0",top:"0",bottom:"0"}},[n("div",{style:"overflow:hidden; width:100%; height:100%;"},[n("div",{style:"background:"+e.effDisabledColor+"; height:100%;"})])])],2)])};Ss._withStripped=!0;const ws=ps({render:Ss,staticRenderFns:[]},(function(e){e&&e("data-v-17787ae0_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WListItem.vue"},media:void 0})}),bs,"data-v-17787ae0",false,undefined,!1,ms,void 0,void 0);var Cs={directives:{domresize:oo()},components:{WListItem:ws},props:{items:{type:Array,default:()=>[]},enableActive:{type:Boolean,default:!0},itemActive:{type:[String,Object],default:null},itemTextFontSize:{type:String,default:"1rem"},keyText:{type:String,default:"text"},keyIcon:{type:String,default:"icon"},space:{type:Number,default:0},paddingStyle:{type:Object,default:()=>({v:10,h:12})},itemBorderRadius:{type:Number,default:0},itemBackgroundColor:{type:String,default:"transparent"},itemBackgroundColorHover:{type:String,default:"rgba(200,200,200,0.2)"},itemBackgroundColorActive:{type:String,default:"white"},itemBackgroundColorDisabled:{type:String,default:"white"},itemTextColor:{type:String,default:"#444"},itemTextColorHover:{type:String,default:"#222"},itemTextColorActive:{type:String,default:"orange darken-3"},itemTextColorDisabled:{type:String,default:"#444"},itemIconSize:{type:Number,default:22},itemIconColor:{type:String,default:"#444"},itemIconColorHover:{type:String,default:"#222"},itemIconColorActive:{type:String,default:"orange darken-3"},itemIconColorDisabled:{type:String,default:"#444"},itemRippleColor:{type:String,default:"rgba(245,124,0,0.4)"},borderBottom:{type:Boolean,default:!0},borderBottomSize:{type:Number,default:2},borderBottomColor:{type:String,default:"rgba(245,124,0,0.8)"},itemDisabledColor:{type:String,default:"transparent"},itemCursorPointer:{type:Boolean,default:!0}},data:function(){return{borderBottomLeft:0,borderBottomWidth:0,itemActiveTrans:null}},watch:{itemActiveTrans:{handler(e,t){this.updateBorderBottom()},immediate:!0}},computed:{changeItemActive:function(){let e=this;return e.enableActive&&(e.itemActiveTrans=e.itemActive),""},isObjValue:function(){return 0!==ur(this.items)&&function(t,n,r){var i=e(t)?dr:hr;return r&&at(t,n,r)&&(n=void 0),i(t,Vn(n))}(this.items,(e=>fr(e)))},effBorderBottomColor:function(){return Wo(this.borderBottomColor)}},methods:{resize:function(e){this.updateBorderBottom()},getIcon:function(e){let t=this;return t.isObjValue?me(e,t.keyIcon,""):""},getText:function(e){let t=this;if(t.isObjValue){return me(e,t.keyText,"")}return e},getActive:function(e){let t=this,n=!1;return t.enableActive&&(n=pr(e,t.itemActiveTrans)),n},getEditable:function(e){return me(e,"editable",!0)},updateBorderBottom:function(){let e=this;if(null==e.itemActiveTrans)return;let t=0,n=[];nt(me(e,"$refs.wli",[]),((r,i)=>{let o=r,s=me(o,"clientWidth",0),a=me(o,"clientHeight",0),l=t,c=s,u=a;i>0&&e.space>0&&(l+=e.space,c-=e.space),n.push({left:l,bottom:0,width:c,heiht:u}),t+=s}));let r=-1;if(nt(e.items,((t,n)=>{if(pr(t,e.itemActiveTrans))return r=n,!1})),-1===r)return;let i=n[r];e.borderBottomLeft=i.left,e.borderBottomWidth=i.width},ckItem:function(e,t){let n=this;if(!n.getEditable(e))return;n.itemActiveTrans=e;let r=null;r=n.isObjValue?{...e}:e,n.$emit("click",r,t),n.$emit("update:itemActive",r)}}};const As=Cs;var Ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],attrs:{changeItemActive:e.changeItemActive},on:{domresize:e.resize}},[n("div",{staticStyle:{position:"relative",display:"flex","align-items":"center","white-space":"nowrap"}},[e.borderBottom?n("div",{style:"transition:all 0.3s; position:absolute; z-index:1; bottom:0px; left:"+e.borderBottomLeft+"px; padding-left:"+e.borderBottomWidth+"px; border-bottom:"+e.borderBottomSize+"px solid "+e.effBorderBottomColor+";"}):e._e(),e._v(" "),e._l(e.items,(function(t,r){return n("div",{key:r},[n("div",{ref:"wli",refInFor:!0,style:e.space>0&&r>0?"padding-left:"+e.space+"px;":""},[n("WListItem",{attrs:{icon:e.getIcon(t),text:e.getText(t),textFontSize:e.itemTextFontSize,active:e.getActive(t),paddingStyle:e.paddingStyle,borderRadius:e.itemBorderRadius,backgroundColor:e.itemBackgroundColor,backgroundColorHover:e.itemBackgroundColorHover,backgroundColorActive:e.itemBackgroundColorActive,backgroundColorDisabled:e.itemBackgroundColorDisabled,textColor:e.itemTextColor,textColorHover:e.itemTextColorHover,textColorActive:e.itemTextColorActive,textColorDisabled:e.itemTextColorDisabled,iconSize:e.itemIconSize,iconColor:e.itemIconColor,iconColorHover:e.itemIconColorHover,iconColorActive:e.itemIconColorActive,iconColorDisabled:e.itemIconColorDisabled,rippleColor:e.getEditable(t)?e.itemRippleColor:null,editable:e.getEditable(t),disabledColor:e.itemDisabledColor,cursorPointer:e.itemCursorPointer},on:{click:function(n){return e.ckItem(t,r)}},scopedSlots:e._u([{key:"item",fn:function(n){return[e._t("item",null,{item:t,kitem:r,isHover:n.isHover,isActive:n.isActive})]}},{key:"item-left",fn:function(n){return[e._t("item-left",null,{item:t,kitem:r,isHover:n.isHover,isActive:n.isActive})]}},{key:"item-content",fn:function(n){return[e._t("item-content",null,{item:t,kitem:r,isHover:n.isHover,isActive:n.isActive})]}},{key:"item-right",fn:function(n){return[e._t("item-right",null,{item:t,kitem:r,isHover:n.isHover,isActive:n.isActive})]}}],null,!0)})],1)])}))],2)])};Ms._withStripped=!0;const Ts=ps({render:Ms,staticRenderFns:[]},(function(e){e&&e("data-v-0516b267_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WListHorizontal.vue"},media:void 0})}),As,"data-v-0516b267",false,undefined,!1,ms,void 0,void 0);function Es(e,t,n){return null==e?e:function(e,t,n,r){if(!x(e))return e;for(var i=-1,o=(t=de(t,e)).length,s=o-1,a=e;null!=a&&++i<o;){var l=pe(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=s){var u=a[l];void 0===(c=r?r(u,l,a):void 0)&&(c=x(u)?u:ke(t[i+1])?[]:{})}Sr(a,l,c),a=a[l]}return e}(e,t,n)}function Ls(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var Rs=Math.max;var Ps,ks=(Ps=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Fi(n);return i<0&&(i=Rs(r+i,0)),Ls(e,Vn(t),i)},function(e,t,n){var r=Object(e);if(!Je(e)){var i=Vn(t);e=Ke(e),t=function(e){return i(r[e],e,r)}}var o=Ps(e,t,n);return o>-1?r[i?e[o]:o]:void 0});function Is(e){return ue(e).toUpperCase()}function Os(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(null!=s&&(void 0===a?s==s&&!g(s):n(s,a)))var a=s,l=o}return l}function Bs(e,t){return e<t}function Ds(e){return e&&e.length?Os(e,tt,Bs):void 0}function Us(e,t){return e>t}function Fs(e){return e&&e.length?Os(e,tt,Us):void 0}var Ns=Math.max;var zs=_r?function(e,t){return _r(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:tt,Hs=zs,Vs=Date.now;var Ws=function(e){var t=0,n=0;return function(){var r=Vs(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Hs),js=Ws;function Gs(e,t){return js(function(e,t,n){return t=Ns(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Ns(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,tt),e+"")}function $s(e){return e!=e}function Xs(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ls(e,$s,n)}function Ys(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}var qs=Array.prototype.splice;var Zs=Gs((function(e,t){return e&&e.length&&t&&t.length?function(e,t,n,r){var i=r?Ys:Xs,o=-1,s=t.length,a=e;for(e===t&&(t=Pr(t)),n&&(a=oe(e,De(n)));++o<s;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(a,u,l,r))>-1;)a!==e&&qs.call(a,l,1),qs.call(e,l,1);return e}(e,t):e})),Js=i?i.isConcatSpreadable:void 0;function Ks(t){return e(t)||Ae(t)||!!(Js&&t&&t[Js])}function Qs(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=Ks),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Qs(a,t-1,n,r,i):Zt(i,a):r||(i[i.length]=a)}return i}function ea(){let e,t,n=new Promise((function(){e=arguments[0],t=arguments[1]}));return n.resolve=e,n.reject=t,n}async function ta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=ea();if(!Qi(e))return r.reject("waitfunction需輸入函數f"),r;let i=async()=>{let t=e();return function(e){let t,n=Object.prototype.toString.call(e);if(t="[object Promise]"===n,t)return!0;if("[object Function]"!==n)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}(t)&&(t=await t),t};if(n=await i(),!0===n)return r.resolve(),r;let o=me(t,"attemptNum",null);Yi(o)||(o=200);let s=me(t,"timeInterval",null);Yi(s)||(s=1e3);let a=0,l=setInterval((async()=>{a+=1,n=await i(),!0===n&&(clearInterval(l),r.resolve()),a>o&&(clearInterval(l),r.reject(`exceeded attemptNum[${o}]`))}),s);return r}function na(e,t){return!!fr(e)&&(!(!$n(t)&&!zi(t))&&t in e)}function ra(e,t){let n=ea();if(!cs(e)&&!fr(e))return n.reject("rs is not an array or object"),n;let r=!1;if(fr(e)){r=!0;let t=[];nt(e,((e,n)=>{t.push({k:n,v:e})})),e=t}Qi(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce((function(e,n){return e.then((function(e){o.push(e),i+=1;let s=i,a=n;return r&&(s=n.k,a=n.v),Qi(t)?t(a,s):a}))}),Promise.resolve()).then((function(e){var t,r,i,s;o.push(e),s=null==(t=o)?0:t.length,o=s?rt(t,(r=i||void 0===r?1:Fi(r))<0?0:r,s):[],n.resolve(o)})).catch((function(e){n.reject(e)})),n}function ia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;zi(e)||(e=10);let t=ea();return setTimeout((function(){t.resolve()}),e),t}function oa(e){if(!Vi(e))return!1;return Xi(e)>=0}function sa(e,t){return $n(e)&&oa(t)?0===(t=Xi(t))?"":e.substring(0,t):""}function aa(e,t){if(!$n(e))return"";if(!oa(t))return"";if(0===(t=Xi(t)))return"";let n=e.length-t;return n<0&&(n=0),e.substr(n,t)}function la(e,t){return $n(e)&&oa(t)?0===(t=Xi(t))?e:aa(e,e.length-t):""}function ca(e,t,n){if((e=ue(e))&&(n||void 0===t))return Ei(e);if(!e||!(t=ce(t)))return e;var r=St(e),i=St(t),o=function(e,t){for(var n=-1,r=e.length;++n<r&&Xs(t,e[n],0)>-1;);return n}(r,i),s=function(e,t){for(var n=e.length;n--&&Xs(t,e[n],0)>-1;);return n}(r,i)+1;return it(r,o,s).join("")}function ua(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=g(e),s=void 0!==t,a=null===t,l=t==t,c=g(t);if(!a&&!c&&!o&&e>t||o&&s&&l&&!a&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!l)return-1}return 0}function da(t,n,r){n=n.length?oe(n,(function(t){return e(t)?function(e){return fe(e,1===t.length?t[0]:t)}:t})):[tt];var i=-1;return n=oe(n,De(Vn)),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Wn(t,(function(e,t,r){return{criteria:oe(n,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var l=ua(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,r)}))}var ha=Gs((function(e,t){if(null==e)return[];var n=t.length;return n>1&&at(e,t[0],t[1])?t=[]:n>2&&at(t[0],t[1],t[2])&&(t=[t[0]]),da(e,Qs(t,1),[])}));function pa(e){return ue(e).toLowerCase()}function fa(e,t){if(!$n(e))return[];if(!$n(t))return[];let n=function(e,t){return $n(e)&&$n(t)?e.split(t):[]}(e,t);n=jn(n,ca);let r=[];return nt(n,(function(e){$n(e)&&r.push(e)})),r}function ma(e){if(!$n(e)&&!zi(e)&&!g(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function ga(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return $n(e)&&oa(t)?(n=Yi(n)?Xi(n):1,e.substring(t,t+n)):""}let va={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function ya(e){return xa(e,1)}function _a(e){return xa(e,360)}function xa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.indexOf("%")>=0){if(!zi(e=jo(e,"%","")))throw new Error("invalid color: value is not a number");e=Hi(e)/100}else{if(!zi(e))throw new Error("invalid color: value is not a number");e=Hi(e)/t}if(e>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function ba(e){if(!zi(e))throw new Error("invalid color: value is not a number");if((e=Hi(e))>1)throw new Error("invalid color: value > 1");if(e<0)throw new Error("invalid color: value < 0");return e}function Sa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgba";if(!cs(e))throw new Error("invalid colors array");let n=me(e,0,0),r=me(e,1,0),i=me(e,2,0),o=me(e,3,1);if(t=t.split(""),4!==ur(t))throw new Error("tar.length !== 4");return{[me(t,0)]:n,[me(t,1)]:r,[me(t,2)]:i,[me(t,3)]:o}}function wa(e){let t=ur(e=la(e,1));if(2===t)e=`${e}${e}${e}ff`;else if(3===t){let t=ga(e,0,1),n=ga(e,1,1),r=ga(e,2,1);e=`${t}${t}${n}${n}${r}${r}ff`}else if(6===t)e=`${e}ff`;else if(8!==t)throw new Error("invalid hex color");function n(e){if(2!==ur(e))throw new Error("hex.length of color is not equal to 2");if(!zi(e=parseInt(e,16)))throw new Error("invalid hex of color");return(e=Hi(e))/255}return{r:n(ga(e,0,2)),g:n(ga(e,2,2)),b:n(ga(e,4,2)),a:n(ga(e,6,2))}}function Ca(e){return e=Sa(e=jn(e,((e,t)=>t<=2?xa(e,255):3===t?ba(e):null)),"rgba")}function Aa(e){return e=Ia(e=Sa(e=jn(e,((e,t)=>0===t?_a(e):1===t||2===t?ya(e):3===t?ba(e):null)),"hsla"))}function Ma(e){return e=Oa(e=Sa(e=jn(e,((e,t)=>0===t?_a(e):1===t||2===t?ya(e):3===t?ba(e):null)),"hsva"))}function Ta(e){if("transparent"===e)return{r:0,g:0,b:0,a:0};if(function(e){return na(va,e)}(e))return wa(e=`#${va[e]}`);if(function(e){return"#"===sa(e,1)&&(!!/[0-9A-Fa-f]{2}/g.test(e)||(!!/[0-9A-Fa-f]{3}/g.test(e)||(!!/[0-9A-Fa-f]{6}/g.test(e)||!!/[0-9A-Fa-f]{8}/g.test(e))))}(e))return wa(e);if(function(e){return"rgb"===sa(e,3)||"rgba"===sa(e,4)}(e))return function(e){return e=jo(e,"rgba",""),e=jo(e,"rgb",""),Ca(fa(e=jo(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsl"===sa(e,3)||"hsla"===sa(e,4)}(e))return function(e){return e=jo(e,"hsla",""),e=jo(e,"hsl",""),Aa(fa(e=jo(e=e.replace(/[()]/g,""),","," ")," "))}(e);if(function(e){return"hsv"===sa(e,3)||"hsva"===sa(e,4)}(e))return function(e){return e=jo(e,"hsva",""),e=jo(e,"hsv",""),Ma(fa(e=jo(e=e.replace(/[()]/g,""),","," ")," "))}(e);throw new Error("format of color string is not hex-color, name-color, rgba, hsla, hsva")}function Ea(e,t){return!!na(e,t=pa(t))||!!na(e,t=Is(t))}function La(e,t,n){let r;return r=me(e,t,null),null!==r?r:(r=me(e,t=Is(t),null),null!==r?r:n)}function Ra(e){if(function(e){let t=Ea(e,"r"),n=Ea(e,"g"),r=Ea(e,"b");return t&&n&&r}(e))return function(e){let t=[La(e,"r",null),La(e,"g",null),La(e,"b",null),La(e,"a",1)];return t=jn(t,ma),Ca(t)}(e);if(function(e){let t=Ea(e,"h"),n=Ea(e,"s"),r=Ea(e,"l");return t&&n&&r}(e))return function(e){let t=[La(e,"h",null),La(e,"s",null),La(e,"l",null),La(e,"a",1)];return t=jn(t,ma),Aa(t)}(e);if(function(e){let t=Ea(e,"h"),n=Ea(e,"s"),r=Ea(e,"v");return t&&n&&r}(e))return function(e){let t=[La(e,"h",null),La(e,"s",null),La(e,"v",null),La(e,"a",1)];return t=jn(t,ma),Ma(t)}(e);throw new Error("color object is not one of rgba, hsla, hsva")}function Pa(e){let t,n,r=e.r,i=e.g,o=e.b,s=Math.max(r,i,o),a=Math.min(r,i,o),l=(s+a)/2;if(s===a)t=n=0;else{let e=s-a;switch(n=l>.5?e/(2-s-a):e/(s+a),s){case r:t=(i-o)/e+(i<o?6:0);break;case i:t=(o-r)/e+2;break;case o:t=(r-i)/e+4}t/=6}return{h:t,s:n,l:l,a:e.a}}function ka(e){let t,n,r=e.r,i=e.g,o=e.b,s=Math.max(r,i,o),a=Math.min(r,i,o),l=s,c=s-a;if(n=0===s?0:c/s,s===a)t=0;else{switch(s){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return{h:t,s:n,v:l,a:e.a}}function Ia(e){let t,n,r,i=e.h,o=e.s,s=e.l;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0===o)t=n=r=s;else{let e=s<.5?s*(1+o):s+o-s*o,l=2*s-e;t=a(l,e,i+1/3),n=a(l,e,i),r=a(l,e,i-1/3)}return{r:t,g:n,b:r,a:e.a}}function Oa(e){let t,n,r,i=e.h,o=e.s,s=e.v,a=Math.floor(6*i),l=6*i-a,c=s*(1-o),u=s*(1-l*o),d=s*(1-(1-l)*o);switch(a%6){case 0:t=s,n=d,r=c;break;case 1:t=u,n=s,r=c;break;case 2:t=c,n=s,r=d;break;case 3:t=c,n=u,r=s;break;case 4:t=d,n=c,r=s;break;case 5:t=s,n=c,r=u}return{r:t,g:n,b:r,a:e.a}}function Ba(e){let t=Math.round(255*e).toString(16);if(1===ur(t))return`0${t}`;if(2===ur(t))return t;throw new Error("invalid value")}function Da(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.r,r=e.g,i=e.b,o=e.a,s=`${Ba(n)}${Ba(r)}${Ba(i)}`;return t&&(s=`${s}${Ba(o)}`),s}function Ua(e){return Math.min(1,Math.max(0,e))}function Fa(e,t){if(!$n(t))throw new Error("fmtOutput is not a string");if(!yl[t])throw console.log(`fmtOutput must be [${Ke(yl)}]`),new Error("invalid fmtOutput");return e=yl[t](e)}function Na(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Pa(e);return r.h+=t,r.h=r.h%1,Fa(Ia(r),n)}function za(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"toRgbString";if(t<0||t>1)throw new Error("w1 < 0 or > 1");if(r<0||r>1)throw new Error("w1 < 0 or > 1");return Fa({r:e.r*t+n.r*r,g:e.g*t+n.g*r,b:e.b*t+n.b*r,a:e.a*t+n.a*r},i)}function Ha(e){return`${$i(100*e,1)}%`}function Va(e){return $i(e,0)}function Wa(e){return $i(e,3)}function ja(e){return{r:Va(255*e.r),g:Va(255*e.g),b:Va(255*e.b)}}function Ga(e){return`rgb(${Va(255*e.r)}, ${Va(255*e.g)}, ${Va(255*e.b)})`}function $a(e){return{r:Va(255*e.r),g:Va(255*e.g),b:Va(255*e.b),a:Wa(e.a)}}function Xa(e){return`rgba(${Va(255*e.r)}, ${Va(255*e.g)}, ${Va(255*e.b)}, ${Wa(e.a)})`}function Ya(e){let t=Pa(e);return{h:Va(360*t.h),s:Wa(t.s),l:Wa(t.l)}}function qa(e){let t=Pa(e);return`hsl(${Va(360*t.h)}, ${Wa(t.s)}, ${Wa(t.l)})`}function Za(e){let t=Pa(e);return{h:Va(360*t.h),s:Wa(t.s),l:Wa(t.l),a:Wa(t.a)}}function Ja(e){let t=Pa(e);return`hsla(${Va(360*t.h)}, ${Wa(t.s)}, ${Wa(t.l)}, ${Wa(t.a)})`}function Ka(e){let t=ka(e);return{h:Va(360*t.h),s:Wa(t.s),v:Wa(t.v)}}function Qa(e){let t=ka(e);return`hsv(${Va(360*t.h)}, ${Wa(t.s)}, ${Wa(t.v)})`}function el(e){let t=ka(e);return{h:Va(360*t.h),s:Wa(t.s),v:Wa(t.v),a:Wa(t.a)}}function tl(e){let t=ka(e);return`hsva(${Va(360*t.h)}, ${Wa(t.s)}, ${Wa(t.v)}, ${Wa(t.a)})`}function nl(e){return{r:Ha(e.r),g:Ha(e.g),b:Ha(e.b)}}function rl(e){return`rgb(${Ha(e.r)}, ${Ha(e.g)}, ${Ha(e.b)})`}function il(e){return{r:Ha(e.r),g:Ha(e.g),b:Ha(e.b),a:Wa(e.a)}}function ol(e){return`rgba(${Ha(e.r)}, ${Ha(e.g)}, ${Ha(e.b)}, ${Wa(e.a)})`}function sl(e){let t=Pa(e);return{h:Va(360*t.h),s:Ha(t.s),l:Ha(t.l)}}function al(e){let t=Pa(e);return`hsl(${Va(360*t.h)}, ${Ha(t.s)}, ${Ha(t.l)})`}function ll(e){let t=Pa(e);return{h:Va(360*t.h),s:Ha(t.s),l:Ha(t.l),a:Wa(t.a)}}function cl(e){let t=Pa(e);return`hsla(${Va(360*t.h)}, ${Ha(t.s)}, ${Ha(t.l)}, ${Wa(t.a)})`}function ul(e){let t=ka(e);return{h:Va(360*t.h),s:Ha(t.s),v:Ha(t.v)}}function dl(e){let t=ka(e);return`hsv(${Va(360*t.h)}, ${Ha(t.s)}, ${Ha(t.v)})`}function hl(e){let t=ka(e);return{h:Va(360*t.h),s:Ha(t.s),v:Ha(t.v),a:Wa(t.a)}}function pl(e){let t=ka(e);return`hsva(${Va(360*t.h)}, ${Ha(t.s)}, ${Ha(t.v)}, ${Wa(t.a)})`}function fl(e){let t=function(e){return Da(e,!1)}(e);return`#${t}`}function ml(e){return`#${Da(e)}`}function gl(e){let t=null,n=null,r=null;if($n(e))t=pa(ca(e));else{if(!Go(e))throw console.log("color=",e),new Error("color is not a string or an object");n=e}if(null!==t)try{r=Ta(t)}catch(e){throw console.log(e),new Error(`can not parse color: ${t}`)}else if(null!==n)try{r=Ra(n)}catch(e){throw console.log(e),new Error(`can not parse color: ${JSON.stringify(n)}`)}return r}function vl(e){if(!Go(e))return console.log("gradient is not an effective object"),e=>`rgb(${255*(e=Math.min(Math.max(e,0),1))},${255*e},${255*e})`;let t=[];return nt(e,((e,n)=>{t.push([Hi(n),$a(gl(e)),e])})),t=ha(t,0),function(e){let n=null;for(let r=1;r<t.length;r++){let i=t[r-1][0],o=t[r-1][1],s=t[r][0],a=t[r][1];if(i<=e&&s>=e){let t=(s-e)/(s-i),r=(e-i)/(s-i);n=za(gl(o),t,gl(a),r,"toRgbaString");break}}return n}}let yl={toRgb:ja,toRgbString:Ga,toRgba:$a,toRgbaString:Xa,toHsl:Ya,toHslString:qa,toHsla:Za,toHslaString:Ja,toHsv:Ka,toHsvString:Qa,toHsva:el,toHsvaString:tl,toRgbP:nl,toRgbPString:rl,toRgbaP:il,toRgbaPString:ol,toHslP:sl,toHslPString:al,toHslaP:ll,toHslaPString:cl,toHsvP:ul,toHsvPString:dl,toHsvaP:hl,toHsvaPString:pl,toHexString:fl,toHex8String:ml};var _l=function(){let e={toRgb:e=>ja(gl(e)),toRgbString:e=>Ga(gl(e)),toRgba:e=>$a(gl(e)),toRgbaString:e=>Xa(gl(e)),toHsl:e=>Ya(gl(e)),toHslString:e=>qa(gl(e)),toHsla:e=>Za(gl(e)),toHslaString:e=>Ja(gl(e)),toHsv:e=>Ka(gl(e)),toHsvString:e=>Qa(gl(e)),toHsva:e=>el(gl(e)),toHsvaString:e=>tl(gl(e)),toRgbP:e=>nl(gl(e)),toRgbPString:e=>rl(gl(e)),toRgbaP:e=>il(gl(e)),toRgbaPString:e=>ol(gl(e)),toHslP:e=>sl(gl(e)),toHslPString:e=>al(gl(e)),toHslaP:e=>ll(gl(e)),toHslaPString:e=>cl(gl(e)),toHsvP:e=>ul(gl(e)),toHsvPString:e=>dl(gl(e)),toHsvaP:e=>hl(gl(e)),toHsvaPString:e=>pl(gl(e)),toHexString:e=>fl(gl(e)),toHex8String:e=>ml(gl(e)),modSaturate:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Pa(e);return r.s+=t,r.s=Ua(r.s),Fa(Ia(r),n)}(gl(e),t,n),modGrey:(e,t)=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"toRgbString",n=Pa(e);return n.s=0,Fa(Ia(n),t)}(gl(e),t),modLighten:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(t<0||t>1)throw new Error("amount < 0 or > 1");let r=Pa(e);return r.l+=t,r.l=Ua(r.l),Fa(Ia(r),n)}(gl(e),t,n),modBrighten:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(t<0||t>1)throw new Error("amount < 0 or > 1");return e.r+=t,e.r=Ua(e.r),e.g+=t,e.g=Ua(e.g),e.b+=t,e.b=Ua(e.b),Fa(e,n)}(gl(e),t,n),modHue:(e,t,n)=>Na(gl(e),t,n),modComplement:(e,t)=>function(e){return Na(e,.5,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"toRgbString")}(gl(e),t),spreadHue:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(!Vi(t))throw new Error("num is not an integer");if((t=Xi(t))<=1)return[e];let r=Pa(e),i=1/t,o=[];for(let e=0;e<t;e++)o.push(Fa(Ia(r),n)),r.h+=i,r.h=r.h%1;return o}(gl(e),t,n),spreadMonochromatic:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"toRgbString";if(!Vi(t))throw new Error("num is not an integer");if((t=Xi(t))<=1)return[e];let r=ka(e);r.s=1,r.l=1;let i=1/t,o=[];for(let e=0;e<t;e++)o.push(Fa(Oa(r),n)),r.h-=i,r.l-=i;return o}(gl(e),t,n),mix:(e,t,n,r,i)=>za(gl(e),t,gl(n),r,i),getBrightness:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");return(299*e.r+587*e.g+114*e.b)/1e3}(gl(e)),getLuminance:e=>function(e){if(1!==e.a)throw new Error("alpha of color can not be equal to 1");let t,n,r,i=e.r,o=e.g,s=e.b;return t=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),n=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),r=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*n+.0722*r}(gl(e)),interp:vl};return e}();const xl={components:{},props:{name:{type:String,default:"cir-wave"},color:{type:String,default:"grey"},size:{type:Number,default:48}},data:function(){return{}},computed:{effColor:function(){return Wo(this.color)}},methods:{}};var bl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; vertical-align:middle; outline:none; user-select:none; height:"+e.size+"px; width:"+e.size+"px;"},["cir-wave"===e.name?[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:e.size,height:e.size}},[n("circle",{attrs:{cx:"50",cy:"50",r:"14.6699",fill:"none",stroke:"#420457","stroke-width":"10"}},[n("animate",{attrs:{attributeName:"r",repeatCount:"indefinite",dur:"1s",values:"0;40",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline",begin:"-0.5s"}}),e._v(" "),n("animate",{attrs:{attributeName:"opacity",repeatCount:"indefinite",dur:"1s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline",begin:"-0.5s"}})]),e._v(" "),n("circle",{attrs:{cx:"50",cy:"50",r:"33.9915",fill:"none",stroke:"#5a3faa","stroke-width":"10"}},[n("animate",{attrs:{attributeName:"r",repeatCount:"indefinite",dur:"1s",values:"0;40",keyTimes:"0;1",keySplines:"0 0.2 0.8 1",calcMode:"spline"}}),e._v(" "),n("animate",{attrs:{attributeName:"opacity",repeatCount:"indefinite",dur:"1s",values:"1;0",keyTimes:"0;1",keySplines:"0.2 0 0.8 1",calcMode:"spline"}})])])]:"cir-rotate"===e.name?[n("div",{style:"position:relative; display:inline-flex; align-items:center; justify-content:center; display:inline-block; height:"+e.size+"px; width:"+e.size+"px;"},[n("svg",{staticClass:"pgc-rotate",staticStyle:{transform:"rotate(0deg)"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"21.904761904761905 21.904761904761905 43.80952380952381 43.80952380952381"}},[n("circle",{staticClass:"pgc-dash",attrs:{fill:"transparent",cx:"43.80952380952381",cy:"43.80952380952381",r:"20","stroke-width":"4","stroke-dasharray":"100","stroke-dashoffset":"50px",stroke:e.effColor}})])])]:e._e()],2)};bl._withStripped=!0;const Sl=ps({render:bl,staticRenderFns:[]},(function(e){e&&e("data-v-6639a678_0",{source:"\n.pgc-rotate[data-v-6639a678] {\r\n width: 100%;\r\n height: 100%;\r\n margin: auto;\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n z-index: 1;\r\n transition: all .6s ease-in-out;\r\n animation: progress-circular-rotate-data-v-6639a678 1.4s linear infinite;\r\n transform-origin: center center;\n}\n.pgc-dash[data-v-6639a678] {\r\n animation: progress-circular-dash-data-v-6639a678 1.4s ease-in-out infinite;\r\n stroke-linecap: round;\r\n stroke-dasharray: 80,200;\r\n stroke-dashoffset: 0px;\n}\n@-webkit-keyframes progress-circular-dash-data-v-6639a678 {\n0% {\r\n stroke-dasharray: 1,200;\r\n stroke-dashoffset: 0px\n}\n50% {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -15px\n}\nto {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -124px\n}\n}\n@keyframes progress-circular-dash-data-v-6639a678 {\n0% {\r\n stroke-dasharray: 1,200;\r\n stroke-dashoffset: 0px\n}\n50% {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -15px\n}\nto {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -124px\n}\n}\n@-webkit-keyframes progress-circular-rotate-data-v-6639a678 {\nto {\r\n transform: rotate(1turn)\n}\n}\n@keyframes progress-circular-rotate-data-v-6639a678 {\nto {\r\n transform: rotate(1turn)\n}\n}\r\n\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\node_modules\\w-component-vue\\src\\components\\WIconLoading.vue"],names:[],mappings:";AA8FA;IACA,WAAA;IACA,YAAA;IACA,YAAA;IACA,kBAAA;IACA,MAAA;IACA,SAAA;IACA,OAAA;IACA,QAAA;IACA,UAAA;IACA,+BAAA;IACA,wEAAA;IACA,+BAAA;AACA;AAEA;IACA,2EAAA;IACA,qBAAA;IACA,wBAAA;IACA,sBAAA;AACA;AAEA;AACA;QACA,uBAAA;QACA;AACA;AAEA;QACA,yBAAA;QACA;AACA;AAEA;QACA,yBAAA;QACA;AACA;AACA;AAEA;AACA;QACA,uBAAA;QACA;AACA;AAEA;QACA,yBAAA;QACA;AACA;AAEA;QACA,yBAAA;QACA;AACA;AACA;AAEA;AACA;QACA;AACA;AACA;AAEA;AACA;QACA;AACA;AACA",file:"WIconLoading.vue",sourcesContent:['<template>\r\n <div :style="`display:inline-block; vertical-align:middle; outline:none; user-select:none; height:${size}px; width:${size}px;`">\r\n\r\n <template v-if="name===\'cir-wave\'">\r\n\r\n <svg\r\n xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"\r\n :width="size"\r\n :height="size"\r\n >\r\n <circle cx="50" cy="50" r="14.6699" fill="none" stroke="#420457" stroke-width="10">\r\n <animate attributeName="r" repeatCount="indefinite" dur="1s" values="0;40" keyTimes="0;1" keySplines="0 0.2 0.8 1" calcMode="spline" begin="-0.5s"></animate>\r\n <animate attributeName="opacity" repeatCount="indefinite" dur="1s" values="1;0" keyTimes="0;1" keySplines="0.2 0 0.8 1" calcMode="spline" begin="-0.5s"></animate>\r\n </circle>\r\n <circle cx="50" cy="50" r="33.9915" fill="none" stroke="#5a3faa" stroke-width="10">\r\n <animate attributeName="r" repeatCount="indefinite" dur="1s" values="0;40" keyTimes="0;1" keySplines="0 0.2 0.8 1" calcMode="spline"></animate>\r\n <animate attributeName="opacity" repeatCount="indefinite" dur="1s" values="1;0" keyTimes="0;1" keySplines="0.2 0 0.8 1" calcMode="spline"></animate>\r\n </circle>\r\n </svg>\r\n\r\n </template>\r\n\r\n <template v-else-if="name===\'cir-rotate\'">\r\n\r\n <div :style="`position:relative; display:inline-flex; align-items:center; justify-content:center; display:inline-block; height:${size}px; width:${size}px;`">\r\n <svg\r\n class="pgc-rotate"\r\n style="transform: rotate(0deg);"\r\n xmlns="http://www.w3.org/2000/svg"\r\n viewBox="21.904761904761905 21.904761904761905 43.80952380952381 43.80952380952381"\r\n >\r\n <circle\r\n class="pgc-dash"\r\n fill="transparent"\r\n cx="43.80952380952381"\r\n cy="43.80952380952381"\r\n r="20"\r\n stroke-width="4"\r\n stroke-dasharray="100"\r\n stroke-dashoffset="50px"\r\n :stroke="effColor"\r\n ></circle>\r\n </svg>\r\n </div>\r\n\r\n </template>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport convertColor from \'../js/convertColor.mjs\'\r\n\r\n\r\n/**\r\n * @vue-prop {String} [name=\'cir-wave\'] 輸入動畫名稱字串,預設\'cir-wave\'\r\n * @vue-prop {Number} [size=48] 輸入圖標欲顯示的尺寸浮點數,預設48\r\n */\r\nexport default {\r\n components: {\r\n },\r\n props: {\r\n name: {\r\n type: String,\r\n default: \'cir-wave\',\r\n },\r\n color: {\r\n type: String,\r\n default: \'grey\',\r\n },\r\n size: {\r\n type: Number,\r\n default: 48,\r\n },\r\n },\r\n data: function() {\r\n return {\r\n }\r\n },\r\n computed: {\r\n\r\n effColor: function() {\r\n let vo = this\r\n return convertColor(vo.color)\r\n },\r\n\r\n },\r\n methods: {\r\n },\r\n}\r\n<\/script>\r\n\r\n<style scoped>\r\n\r\n.pgc-rotate {\r\n width: 100%;\r\n height: 100%;\r\n margin: auto;\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n z-index: 1;\r\n transition: all .6s ease-in-out;\r\n animation: progress-circular-rotate 1.4s linear infinite;\r\n transform-origin: center center;\r\n}\r\n\r\n.pgc-dash {\r\n animation: progress-circular-dash 1.4s ease-in-out infinite;\r\n stroke-linecap: round;\r\n stroke-dasharray: 80,200;\r\n stroke-dashoffset: 0px;\r\n}\r\n\r\n@-webkit-keyframes progress-circular-dash {\r\n 0% {\r\n stroke-dasharray: 1,200;\r\n stroke-dashoffset: 0px\r\n }\r\n\r\n 50% {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -15px\r\n }\r\n\r\n to {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -124px\r\n }\r\n}\r\n\r\n@keyframes progress-circular-dash {\r\n 0% {\r\n stroke-dasharray: 1,200;\r\n stroke-dashoffset: 0px\r\n }\r\n\r\n 50% {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -15px\r\n }\r\n\r\n to {\r\n stroke-dasharray: 100,200;\r\n stroke-dashoffset: -124px\r\n }\r\n}\r\n\r\n@-webkit-keyframes progress-circular-rotate {\r\n to {\r\n transform: rotate(1turn)\r\n }\r\n}\r\n\r\n@keyframes progress-circular-rotate {\r\n to {\r\n transform: rotate(1turn)\r\n }\r\n}\r\n\r\n</style>\r\n']},media:void 0})}),xl,"data-v-6639a678",false,undefined,!1,ms,void 0,void 0);function wl(e,t){function n(e){return cs(e)?e:[e]}if(us(e))return!1;if(0===(e=n(e)).length)return!1;if(us(e))return!1;if(0===(t=n(t)).length)return!1;for(let n=0;n<e.length;n++)for(let r=0;r<t.length;r++)if(pr(e[n],t[r]))return!0;return!1}var Cl=Array.prototype.join;function Al(e,t){return null==e?"":Cl.call(e,t)}function Ml(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function Tl(e,t,n){if(!as(e))return void console.log("clientX is not a number",e);if(!as(t))return void console.log("clientY is not a number",t);if(!Qo(n))return void console.log("ele is not a HTMLElement",n);let r;try{r=n.getBoundingClientRect()}catch(e){return void console.log("invalid ele for getBoundingClientRect",e)}let i=!1;try{i=e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}catch(e){console.log("catch when calculating page information of element",e)}return i}function El(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ll(e){return e instanceof El(e).Element||e instanceof Element}function Rl(e){return e instanceof El(e).HTMLElement||e instanceof HTMLElement}function Pl(e){return"undefined"!=typeof ShadowRoot&&(e instanceof El(e).ShadowRoot||e instanceof ShadowRoot)}var kl=Math.max,Il=Math.min,Ol=Math.round;function Bl(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Dl(){return!/^((?!chrome|android).)*safari/i.test(Bl())}function Ul(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Rl(e)&&(i=e.offsetWidth>0&&Ol(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ol(r.height)/e.offsetHeight||1);var s=(Ll(e)?El(e):window).visualViewport,a=!Dl()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Fl(e){var t=El(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Nl(e){return e?(e.nodeName||"").toLowerCase():null}function zl(e){return((Ll(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return Ul(zl(e)).left+Fl(e).scrollLeft}function Vl(e){return El(e).getComputedStyle(e)}function Wl(e){var t=Vl(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function jl(e,t,n){void 0===n&&(n=!1);var r,i,o=Rl(t),s=Rl(t)&&function(e){var t=e.getBoundingClientRect(),n=Ol(t.width)/e.offsetWidth||1,r=Ol(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=zl(t),l=Ul(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==Nl(t)||Wl(a))&&(c=(r=t)!==El(r)&&Rl(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Fl(r)),Rl(t)?((u=Ul(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=Hl(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Gl(e){var t=Ul(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function $l(e){return"html"===Nl(e)?e:e.assignedSlot||e.parentNode||(Pl(e)?e.host:null)||zl(e)}function Xl(e){return["html","body","#document"].indexOf(Nl(e))>=0?e.ownerDocument.body:Rl(e)&&Wl(e)?e:Xl($l(e))}function Yl(e,t){var n;void 0===t&&(t=[]);var r=Xl(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=El(r),s=i?[o].concat(o.visualViewport||[],Wl(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Yl($l(s)))}function ql(e){return["table","td","th"].indexOf(Nl(e))>=0}function Zl(e){return Rl(e)&&"fixed"!==Vl(e).position?e.offsetParent:null}function Jl(e){for(var t=El(e),n=Zl(e);n&&ql(n)&&"static"===Vl(n).position;)n=Zl(n);return n&&("html"===Nl(n)||"body"===Nl(n)&&"static"===Vl(n).position)?t:n||function(e){var t=/firefox/i.test(Bl());if(/Trident/i.test(Bl())&&Rl(e)&&"fixed"===Vl(e).position)return null;var n=$l(e);for(Pl(n)&&(n=n.host);Rl(n)&&["html","body"].indexOf(Nl(n))<0;){var r=Vl(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Kl="top",Ql="bottom",ec="right",tc="left",nc="auto",rc=[Kl,Ql,ec,tc],ic="start",oc="end",sc="clippingParents",ac="viewport",lc="popper",cc="reference",uc=rc.reduce((function(e,t){return e.concat([t+"-"+ic,t+"-"+oc])}),[]),dc=[].concat(rc,[nc]).reduce((function(e,t){return e.concat([t,t+"-"+ic,t+"-"+oc])}),[]),hc=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function pc(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function fc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pl(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function gc(e,t,n){return t===ac?mc(function(e,t){var n=El(e),r=zl(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=Dl();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Hl(e),y:l}}(e,n)):Ll(t)?function(e,t){var n=Ul(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):mc(function(e){var t,n=zl(e),r=Fl(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=kl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=kl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Hl(e),l=-r.scrollTop;return"rtl"===Vl(i||n).direction&&(a+=kl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(zl(e)))}function vc(e,t,n,r){var i="clippingParents"===t?function(e){var t=Yl($l(e)),n=["absolute","fixed"].indexOf(Vl(e).position)>=0&&Rl(e)?Jl(e):e;return Ll(n)?t.filter((function(e){return Ll(e)&&fc(e,n)&&"body"!==Nl(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=gc(e,n,r);return t.top=kl(i.top,t.top),t.right=Il(i.right,t.right),t.bottom=Il(i.bottom,t.bottom),t.left=kl(i.left,t.left),t}),gc(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function yc(e){return e.split("-")[0]}function _c(e){return e.split("-")[1]}function xc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function bc(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?yc(i):null,s=i?_c(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Kl:t={x:a,y:n.y-r.height};break;case Ql:t={x:a,y:n.y+n.height};break;case ec:t={x:n.x+n.width,y:l};break;case tc:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?xc(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case ic:t[c]=t[c]-(n[u]/2-r[u]/2);break;case oc:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Sc(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function wc(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Cc(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?sc:a,c=n.rootBoundary,u=void 0===c?ac:c,d=n.elementContext,h=void 0===d?lc:d,p=n.altBoundary,f=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,v=Sc("number"!=typeof g?g:wc(g,rc)),y=h===lc?cc:lc,_=e.rects.popper,x=e.elements[f?y:h],b=vc(Ll(x)?x:x.contextElement||zl(e.elements.popper),l,u,s),S=Ul(e.elements.reference),w=bc({reference:S,element:_,strategy:"absolute",placement:i}),C=mc(Object.assign({},_,w)),A=h===lc?C:S,M={top:b.top-A.top+v.top,bottom:A.bottom-b.bottom+v.bottom,left:b.left-A.left+v.left,right:A.right-b.right+v.right},T=e.modifiersData.offset;if(h===lc&&T){var E=T[i];Object.keys(M).forEach((function(e){var t=[ec,Ql].indexOf(e)>=0?1:-1,n=[Kl,Ql].indexOf(e)>=0?"y":"x";M[e]+=E[n]*t}))}return M}var Ac={placement:"bottom",modifiers:[],strategy:"absolute"};function Mc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Tc(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Ac:i;return function(e,t,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ac,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:Ll(e)?Yl(e):e.contextElement?Yl(e.contextElement):[],popper:Yl(t)};var s,c,h=function(e){var t=pc(e);return hc.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),c=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return a.orderedModifiers=h.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:a,name:t,instance:u,options:r}),s=function(){};l.push(o||s)}})),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Mc(t,n)){a.rects={reference:jl(t,Jl(n),"fixed"===a.options.strategy),popper:Gl(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,l=void 0===s?{}:s,d=i.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){d(),c=!0}};if(!Mc(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Ec={passive:!0};var Lc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Rc(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,p=void 0===h?0:h,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),_=tc,x=Kl,b=window;if(c){var S=Jl(n),w="clientHeight",C="clientWidth";if(S===El(n)&&"static"!==Vl(S=zl(n)).position&&"absolute"===a&&(w="scrollHeight",C="scrollWidth"),i===Kl||(i===tc||i===ec)&&o===oc)x=Ql,m-=(d&&S===b&&b.visualViewport?b.visualViewport.height:S[w])-r.height,m*=l?1:-1;if(i===tc||(i===Kl||i===Ql)&&o===oc)_=ec,p-=(d&&S===b&&b.visualViewport?b.visualViewport.width:S[C])-r.width,p*=l?1:-1}var A,M=Object.assign({position:a},c&&Lc),T=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ol(n*i)/i||0,y:Ol(r*i)/i||0}}({x:p,y:m},El(n)):{x:p,y:m};return p=T.x,m=T.y,l?Object.assign({},M,((A={})[x]=y?"0":"",A[_]=v?"0":"",A.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",A)):Object.assign({},M,((t={})[x]=y?m+"px":"",t[_]=v?p+"px":"",t.transform="",t))}var Pc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:yc(t.placement),variation:_c(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Rc(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Rc(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var kc={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Rl(i)&&Nl(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Rl(r)&&Nl(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Ic=Tc({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=El(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ec)})),a&&l.addEventListener("resize",n.update,Ec),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ec)})),a&&l.removeEventListener("resize",n.update,Ec)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=bc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Pc,kc]}),Oc={left:"right",right:"left",bottom:"top",top:"bottom"};function Bc(e){return e.replace(/left|right|bottom|top/g,(function(e){return Oc[e]}))}var Dc={start:"end",end:"start"};function Uc(e){return e.replace(/start|end/g,(function(e){return Dc[e]}))}function Fc(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?dc:l,u=_c(r),d=u?a?uc:uc.filter((function(e){return _c(e)===u})):rc,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=Cc(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[yc(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}var Nc={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=yc(g),y=l||(v===g||!f?[Bc(g)]:function(e){if(yc(e)===nc)return[];var t=Bc(e);return[Uc(e),t,Uc(t)]}(g)),_=[g].concat(y).reduce((function(e,n){return e.concat(yc(n)===nc?Fc(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,b=t.rects.popper,S=new Map,w=!0,C=_[0],A=0;A<_.length;A++){var M=_[A],T=yc(M),E=_c(M)===ic,L=[Kl,Ql].indexOf(T)>=0,R=L?"width":"height",P=Cc(t,{placement:M,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),k=L?E?ec:tc:E?Ql:Kl;x[R]>b[R]&&(k=Bc(k));var I=Bc(k),O=[];if(o&&O.push(P[T]<=0),a&&O.push(P[k]<=0,P[I]<=0),O.every((function(e){return e}))){C=M,w=!1;break}S.set(M,O)}if(w)for(var B=function(e){var t=_.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=f?3:1;D>0;D--){if("break"===B(D))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};var zc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=dc.reduce((function(e,n){return e[n]=function(e,t,n){var r=yc(e),i=[tc,Kl].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[tc,ec].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}};function Hc(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Vc(e){return[Kl,ec,Ql,tc].some((function(t){return e[t]>=0}))}var Wc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Cc(t,{elementContext:"reference"}),a=Cc(t,{altBoundary:!0}),l=Hc(s,r),c=Hc(a,i,o),u=Vc(l),d=Vc(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};function jc(e,t,n){return kl(e,Il(t,n))}var Gc={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,p=void 0===h||h,f=n.tetherOffset,m=void 0===f?0:f,g=Cc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=yc(t.placement),y=_c(t.placement),_=!y,x=xc(v),b="x"===x?"y":"x",S=t.modifiersData.popperOffsets,w=t.rects.reference,C=t.rects.popper,A="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,M="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(S){if(o){var L,R="y"===x?Kl:tc,P="y"===x?Ql:ec,k="y"===x?"height":"width",I=S[x],O=I+g[R],B=I-g[P],D=p?-C[k]/2:0,U=y===ic?w[k]:C[k],F=y===ic?-C[k]:-w[k],N=t.elements.arrow,z=p&&N?Gl(N):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=H[R],W=H[P],j=jc(0,w[k],z[k]),G=_?w[k]/2-D-j-V-M.mainAxis:U-j-V-M.mainAxis,$=_?-w[k]/2+D+j+W+M.mainAxis:F+j+W+M.mainAxis,X=t.elements.arrow&&Jl(t.elements.arrow),Y=X?"y"===x?X.clientTop||0:X.clientLeft||0:0,q=null!=(L=null==T?void 0:T[x])?L:0,Z=I+$-q,J=jc(p?Il(O,I+G-q-Y):O,I,p?kl(B,Z):B);S[x]=J,E[x]=J-I}if(a){var K,Q="x"===x?Kl:tc,ee="x"===x?Ql:ec,te=S[b],ne="y"===b?"height":"width",re=te+g[Q],ie=te-g[ee],oe=-1!==[Kl,tc].indexOf(v),se=null!=(K=null==T?void 0:T[b])?K:0,ae=oe?re:te-w[ne]-C[ne]-se+M.altAxis,le=oe?te+w[ne]+C[ne]-se-M.altAxis:ie,ce=p&&oe?function(e,t,n){var r=jc(e,t,n);return r>n?n:r}(ae,te,le):jc(p?ae:re,te,p?le:ie);S[b]=ce,E[b]=ce-te}t.modifiersData[r]=E}},requiresIfExists:["offset"]};let $c={tooltip:[],popup:[]};const Xc={directives:{domresize:oo()},props:{mode:{type:String,default:"tooltip"},value:{type:Boolean,default:!1},displayType:{type:String,default:"block"},cmpZIndex:{type:Number,default:3e3},isolated:{type:Boolean,default:!1},minWidth:{type:Number,default:null},maxWidth:{type:Number,default:null},autoFitMinWidth:{type:Boolean,default:!1},autoFitMaxWidth:{type:Boolean,default:!1},placement:{type:String,default:"bottom"},placementDist:{type:Number,default:5},borderRadius:{type:Number,default:4},textFontSize:{type:String,default:"0.85rem"},textColor:{type:String,default:"white"},backgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},paddingStyle:{type:Object,default:()=>({v:2,h:10})},shadow:{type:Boolean,default:!0},shadowStyle:{type:String,default:"0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12)"},transitionTime:{type:Number,default:200},editable:{type:Boolean,default:!0}},data:function(){return{mmkey:io(),valueTrans:!1,triggerWidth:null,cursorTriggerInner:!1,clickContentInner:!1,windowMousedown:null,windowMouseup:null,windowScroll:null,popperInstance:null,popperShow:!1,contentStyle:"",mouseClientX:0,mouseClientY:0}},mounted:function(){let e=this;e.windowMousemove=t=>{e.mouseClientX=t.clientX,e.mouseClientY=t.clientY},window.addEventListener("mousemove",e.windowMousemove,!1),e.windowMousedown=t=>{let n=me(e,"$refs.divTrigger",null);e.cursorTriggerInner=!!n&&Tl(t.clientX,t.clientY,n);let r=me(e,"$refs.divContent",null);e.valueTrans&&r?e.clickContentInner=Tl(t.clientX,t.clientY,r):e.clickContentInner=!1},window.addEventListener("mousedown",e.windowMousedown,!1),e.windowMouseup=t=>{e.checkTriggerEff(e.mmkey)&&(!e.valueTrans||e.cursorTriggerInner||e.clickContentInner?(e.cursorTriggerInner=!1,e.clickContentInner=!1):e.evHide("click","windowMouseup"))},window.addEventListener("mouseup",e.windowMouseup,!1),e.windowScroll=t=>{if("hover"!==e.kind)return;let n=me(e,"$refs.divTrigger",null);n&&(e.cursorTriggerInner=!!n&&Tl(e.mouseClientX,e.mouseClientY,n),e.cursorTriggerInner?e.valueTrans||e.evShow("hover","windowScroll"):e.valueTrans&&e.evHide("hover","windowScroll"))},window.addEventListener("scroll",e.windowScroll,!1)},beforeDestroy:function(){let e=this;window.removeEventListener("mousemove",e.windowMousemove,!1),window.removeEventListener("mousedown",e.windowMousedown,!1),window.removeEventListener("mouseup",e.windowMouseup,!1),window.removeEventListener("scroll",e.windowMouseup,!1),e.triggerEvent(!1),clearInterval(e.trt)},computed:{changeValue:function(){let e=this,t=e.value;return e.isolated||e.updateValue(t,"changeValue"),""},useDisplayType:function(){return"line"===this.displayType?"display:block;":"display:inline-block;"},useMinWidth:function(){let e=this;return as(e.minWidth)?`min-width:${e.minWidth}px;`:e.autoFitMinWidth?`min-width:${e.triggerWidth}px;`:""},useMaxWidth:function(){let e=this;return as(e.maxWidth)?`max-width:${e.maxWidth}px;`:e.autoFitMaxWidth?`max-width:${e.triggerWidth}px;`:""},useBorderRadius:function(){let e=this;return as(e.borderRadius)?`border-radius:${e.borderRadius}px;`:""},useTextFontSize:function(){let e=this.textFontSize;return e=jo(e,";",""),`font-size:${e};`},useTextColor:function(){return Wo(this.textColor)},useBackgroundColor:function(){return Wo(this.backgroundColor)},usePadding:function(){return`padding:${ls(this.paddingStyle)};`},useShadow:function(){if(!this.shadow)return"";let e=jo(this.shadowStyle,";","");return""!==e?`box-shadow:${e};`:""},kind:function(){return"popup"===this.mode?"click":"hover"}},methods:{addTrigger:function(e){return function(e,t){$c[e].push(t)}(this.mode,e)},checkTriggerEff:function(e){return function(e,t){return Ml($c[e])===t}(this.mode,e)},removeTrigger:function(e){return function(e,t){Zs($c[e],t)}(this.mode,e)},showPopper:function(e){let t=this,n=me(t,"$refs.divTrigger",null);if(null===n)return;t.$nextTick((()=>{t.triggerWidth=n.offsetWidth}));let r=me(t,"$refs.divContent",null);if(null===r)return;t.addTrigger(t.mmkey);let i={strategy:"fixed",placement:t.placement,modifiers:[Gc,Pc,{name:"computeStyles",options:{gpuAcceleration:!1}},Nc,{name:"flip",options:{fallbackPlacements:["bottom-start","bottom-end","top-start","top-end","top","right-start","right-end","right","left-start","left-end","left"]}},zc,{name:"offset",options:{offset:[0,t.placementDist]}},Wc]};t.popperInstance=Ic(n,r,i)},hidePopper:function(e){let t=this;t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null),setTimeout((()=>{t.removeTrigger(t.mmkey)}),20)},updatePopper:function(e){let t=this;t.popperInstance&&t.popperInstance.update(),t.$emit("resize",e)},displayPopper:function(){let e=this;e.$nextTick((()=>{let t=e.editable&&e.valueTrans;if(t&&!e.popperShow){let t=-15;e.contentStyle=`opacity:0; pointer-events:none; transform:translateY(${t}px);`,e.showPopper("displayPopper"),e.popperShow=!0,e.$emit("show"),setTimeout((()=>{e.contentStyle=`transition:all ${e.transitionTime}ms ease-out; opacity:1; pointer-events:none;`}),1),setTimeout((()=>{e.contentStyle=""}),e.transitionTime)}else!t&&e.popperShow&&(e.hidePopper("displayPopper"),e.popperShow=!1,e.$emit("hide"))}))},updateValue:function(e,t){let n=this;n.editable&&(n.valueTrans=e,n.displayPopper())},triggerEvent:function(e){let t=this;t.editable&&(t.isolated&&t.updateValue(e,"triggerEvent"),t.$nextTick((()=>{t.$emit("input",e)})))},evShow:function(e,t){let n=this;n.editable&&(n.valueTrans||n.kind===e&&n.triggerEvent(!0))},evHide:function(e,t){let n=this;n.editable&&n.valueTrans&&n.kind===e&&n.triggerEvent(!1)}}};var Yc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:""+e.useDisplayType,attrs:{changeValue:e.changeValue}},[n("div",{ref:"divTrigger",staticStyle:{outline:"none"},attrs:{tabindex:"0"},on:{click:function(t){return e.evShow("click","click")},mouseenter:function(t){return e.evShow("hover","mouseenter")},mouseleave:function(t){return e.evHide("hover","mouseleave")}}},[e._t("trigger")],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.valueTrans,expression:"valueTrans"},{name:"domresize",rawName:"v-domresize"}],ref:"divContent",staticClass:"WPopup-Content",style:"z-index:"+e.cmpZIndex+";",on:{domresize:e.updatePopper}},[e.valueTrans?n("div",{style:e.contentStyle+" "+e.usePadding+" "+e.useTextFontSize+" color:"+e.useTextColor+"; background:"+e.useBackgroundColor+"; "+e.useMinWidth+" "+e.useMaxWidth+" "+e.useBorderRadius+" "+e.useShadow},[e._t("content",null,{funHide:function(){e.updateValue(!1,"slot")}})],2):e._e()])])};Yc._withStripped=!0;const qc=ps({render:Yc,staticRenderFns:[]},(function(e){e&&e("data-v-059d708c_0",{source:"\n.WPopup-Content[data-popper-reference-hidden][data-v-059d708c] {\r\n visibility: hidden;\r\n pointer-events: none;\n}\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\node_modules\\w-component-vue\\src\\components\\WTooltip.vue"],names:[],mappings:";AAizBA;IACA,kBAAA;IACA,oBAAA;AACA",file:"WTooltip.vue",sourcesContent:["<template>\r\n <div\r\n :style=\"`${useDisplayType}`\"\r\n :changeValue=\"changeValue\"\r\n >\r\n\r\n <div\r\n ref=\"divTrigger\"\r\n style=\"outline:none;\"\r\n tabindex=\"0\"\r\n @click=\"evShow('click','click')\"\r\n @mouseenter=\"evShow('hover','mouseenter')\"\r\n @mouseleave=\"evHide('hover','mouseleave')\"\r\n >\r\n\r\n <slot name=\"trigger\"></slot>\r\n\r\n </div>\r\n\r\n \x3c!-- 不能給予position因會被popupjs洗掉, 但可給z-index, 且popupjs會改用transform:translate定位 --\x3e\r\n \x3c!-- 若使用minWidth, 會使popupjs重算給予minWidth用以自動撐開彈窗寬度失效, 若於其內slot外添加div給予minWidth, 亦會使popupjs給予minWidth機制失效, 待研究 --\x3e\r\n <div\r\n ref=\"divContent\"\r\n class=\"WPopup-Content\"\r\n :style=\"`z-index:${cmpZIndex};`\"\r\n v-show=\"valueTrans\"\r\n v-domresize\r\n @domresize=\"updatePopper\"\r\n >\r\n <div\r\n :style=\"`${contentStyle} ${usePadding} ${useTextFontSize} color:${useTextColor}; background:${useBackgroundColor}; ${useMinWidth} ${useMaxWidth} ${useBorderRadius} ${useShadow}`\"\r\n v-if=\"valueTrans\"\r\n >\r\n <slot\r\n name=\"content\"\r\n :funHide=\"()=>{updateValue(false,'slot')}\"\r\n ></slot>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport get from 'lodash-es/get'\r\nimport last from 'lodash-es/last'\r\nimport pull from 'lodash-es/pull'\r\nimport isNumber from 'lodash-es/isNumber'\r\nimport genID from 'wsemi/src/genID.mjs'\r\nimport replace from 'wsemi/src/replace.mjs'\r\nimport domIsClientXYIn from 'wsemi/src/domIsClientXYIn.mjs'\r\nimport convertColor from '../js/convertColor.mjs'\r\nimport parseSpace from '../js/parseSpace.mjs'\r\nimport domResize from '../js/domResize.mjs'\r\nimport { createPopper } from '@popperjs/core/lib/popper-lite.js' //不用安裝@popperjs/core, 因wsemi安裝tippy.js內有依賴@popperjs/core\r\nimport flip from '@popperjs/core/lib/modifiers/flip.js'\r\nimport offset from '@popperjs/core/lib/modifiers/offset.js'\r\nimport hide from '@popperjs/core/lib/modifiers/hide.js'\r\nimport preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow.js'\r\nimport computeStyles from '@popperjs/core/lib/modifiers/computeStyles'\r\n\r\n\r\n//tootip與popup不共用已出現項目清單, 避免互相影響\r\nlet kpRespList = {\r\n tooltip: [],\r\n popup: [],\r\n}\r\nfunction addTriggerMode(mode, mmkey) {\r\n kpRespList[mode].push(mmkey)\r\n}\r\nfunction checkTriggerEffMode(mode, mmkey) {\r\n return last(kpRespList[mode]) === mmkey\r\n}\r\nfunction removeTriggerMode(mode, mmkey) {\r\n pull(kpRespList[mode], mmkey)\r\n}\r\n\r\n\r\n/**\r\n * @vue-prop {String} [mode='tooltip'] 輸入組件模式字串,可選'tooltip'與'popup',預設'tooltip'\r\n * @vue-prop {Boolean} [value=false] 輸入是否顯示布林值,預設false\r\n * @vue-prop {String} [displayType='block'] 輸入display設定字串,可選'block'與'line',預設'block'\r\n * @vue-prop {Number} [cmpZIndex=3000] 輸入提示窗或彈窗使用z-index數字,預設3000\r\n * @vue-prop {Boolean} [isolated=false] 輸入提示窗或彈窗當mode為'popup'時是否為獨立顯引狀態布林值,也就是可不接收外部傳入value值,預設false\r\n * @vue-prop {Number} [minWidth=null] 輸入提示窗或彈窗最小寬度數字,單位為px,預設null\r\n * @vue-prop {Number} [maxWidth=null] 輸入提示窗或彈窗最大寬度數字,單位為px,預設null\r\n * @vue-prop {Boolean} [autoFitMinWidth=false] 輸入是否使用驅動區寬度作為提示窗或彈窗之最小寬度布林值,預設false\r\n * @vue-prop {Boolean} [autoFitMaxWidth=false] 輸入是否使用驅動區寬度作為提示窗或彈窗之最大寬度布林值,預設false\r\n * @vue-prop {String} [placement='bottom'] 輸入提示窗或彈窗出現位置字串,可選'top-start'、'top'、'top-end'、'bottom-start'、'bottom'、'bottom-end'、'left-start'、'left'、'left-end'、'right-start'、'right'、'right-end'、,預設'bottom'\r\n * @vue-prop {Number} [placementDist=5] 輸入提示窗或彈窗距離觸發元素距離數字,單位為px,預設5\r\n * @vue-prop {Number} [borderRadius=4] 輸入提示窗或彈窗框圓角度數字,單位為px,預設4\r\n * @vue-prop {String} [textFontSize='0.85rem'] 輸入提示窗或彈窗文字字型大小字串,預設'0.85rem'\r\n * @vue-prop {String} [textColor='white'] 輸入提示窗或彈窗文字顏色字串,預設'white'\r\n * @vue-prop {String} [backgroundColor='rgba(60,60,60,0.75)'] 輸入提示窗或彈窗背景顏色字串,預設'rgba(60,60,60,0.75)'\r\n * @vue-prop {Object} [paddingStyle={v:2,h:10}] 輸入提示窗或彈窗內寬距離設定物件,可用鍵值為v、h、left、right、top、bottom,v代表同時設定top與bottom,h代表設定left與right,若有重複設定時後面鍵值會覆蓋前面,各鍵值為寬度數字,單位為px,預設{v:2,h:10}\r\n * @vue-prop {Boolean} [shadow=true] 輸入提示窗或彈窗是否顯示陰影布林值,預設true\r\n * @vue-prop {String} [shadowStyle=''] 輸入提示窗或彈窗陰影顏色字串,預設值詳見props\r\n * @vue-prop {Number} [transitionTime=200] 輸入提示窗或彈窗淡入出現時間數字,單位為ms,預設200\r\n * @vue-prop {Boolean} [editable=true] 輸入是否為編輯模式布林值,預設true\r\n */\r\nexport default {\r\n directives: {\r\n domresize: domResize(),\r\n },\r\n props: {\r\n mode: {\r\n type: String,\r\n default: 'tooltip', //tooltip, popup\r\n },\r\n value: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n displayType: {\r\n type: String,\r\n default: 'block', //line, block\r\n },\r\n cmpZIndex: {\r\n type: Number,\r\n default: 3000,\r\n },\r\n isolated: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n minWidth: {\r\n type: Number,\r\n default: null,\r\n },\r\n maxWidth: {\r\n type: Number,\r\n default: null,\r\n },\r\n autoFitMinWidth: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n autoFitMaxWidth: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n placement: {\r\n type: String,\r\n default: 'bottom',\r\n },\r\n placementDist: {\r\n type: Number,\r\n default: 5,\r\n },\r\n borderRadius: {\r\n type: Number,\r\n default: 4,\r\n },\r\n textFontSize: {\r\n type: String,\r\n default: '0.85rem',\r\n },\r\n textColor: {\r\n type: String,\r\n default: 'white',\r\n },\r\n backgroundColor: {\r\n type: String,\r\n default: 'rgba(60,60,60,0.75)',\r\n },\r\n paddingStyle: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n v: 2,\r\n h: 10,\r\n }\r\n },\r\n },\r\n shadow: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n shadowStyle: {\r\n type: String,\r\n default: '0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12)',\r\n },\r\n transitionTime: {\r\n type: Number,\r\n default: 200,\r\n },\r\n editable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n },\r\n data: function() {\r\n return {\r\n\r\n mmkey: genID(), //beforeMount內無法變更data, mounted內會晚於computed, 故優先放於data生成\r\n // mmkey: (() => {\r\n // let id = genID()\r\n // console.log('data gen mmkey', id)\r\n // return id\r\n // })(),\r\n\r\n valueTrans: false,\r\n\r\n triggerWidth: null,\r\n cursorTriggerInner: false,\r\n clickContentInner: false,\r\n windowMousedown: null,\r\n windowMouseup: null,\r\n windowScroll: null,\r\n\r\n popperInstance: null,\r\n popperShow: false,\r\n\r\n contentStyle: '',\r\n\r\n mouseClientX: 0,\r\n mouseClientY: 0,\r\n\r\n }\r\n },\r\n mounted: function() {\r\n //console.log('mounted')\r\n\r\n let vo = this\r\n\r\n //windowMousemove\r\n vo.windowMousemove = (e) => {\r\n // console.log(vo.mmkey, 'windowMousemove', e)\r\n\r\n //save\r\n vo.mouseClientX = e.clientX\r\n vo.mouseClientY = e.clientY\r\n\r\n }\r\n window.addEventListener('mousemove', vo.windowMousemove, false)\r\n\r\n //windowMousedown\r\n vo.windowMousedown = (e) => {\r\n // console.log(vo.mmkey, 'windowMousedown', e)\r\n\r\n //divTrigger\r\n let divTrigger = get(vo, '$refs.divTrigger', null)\r\n\r\n //cursorTriggerInner, 滑鼠游標是否點擊於觸發區內\r\n if (divTrigger) {\r\n vo.cursorTriggerInner = domIsClientXYIn(e.clientX, e.clientY, divTrigger)\r\n }\r\n else {\r\n vo.cursorTriggerInner = false\r\n }\r\n\r\n //divContent\r\n let divContent = get(vo, '$refs.divContent', null)\r\n\r\n //clickContentInner, 是否當前為顯示且擊於內容區內\r\n if (vo.valueTrans && divContent) {\r\n vo.clickContentInner = domIsClientXYIn(e.clientX, e.clientY, divContent)\r\n }\r\n else {\r\n vo.clickContentInner = false\r\n }\r\n\r\n }\r\n window.addEventListener('mousedown', vo.windowMousedown, false)\r\n\r\n //windowMouseup\r\n vo.windowMouseup = (e) => {\r\n // console.log(vo.mmkey, 'windowMouseup', e, vo.checkTriggerEff(vo.mmkey))\r\n\r\n //check\r\n if (!vo.checkTriggerEff(vo.mmkey)) {\r\n return\r\n }\r\n\r\n //當前為顯示時, 非點擊於觸發區與內容區, 才觸發隱藏事件\r\n if (vo.valueTrans && !vo.cursorTriggerInner && !vo.clickContentInner) {\r\n //console.log(vo.mmkey, 'click隱藏')\r\n\r\n //evHide\r\n vo.evHide('click', 'windowMouseup')\r\n\r\n }\r\n else {\r\n //console.log(vo.mmkey, 'click不隱藏')\r\n vo.cursorTriggerInner = false\r\n vo.clickContentInner = false\r\n }\r\n\r\n }\r\n window.addEventListener('mouseup', vo.windowMouseup, false)\r\n\r\n //windowScroll\r\n vo.windowScroll = (e) => {\r\n // console.log(vo.mmkey, 'windowScroll', e, vo.checkTriggerEff(vo.mmkey))\r\n\r\n // //check, 不能偵測checkTriggerEff, 因須支援由隱藏但通過捲動而滑鼠進入組件而顯示機制\r\n // if (!vo.checkTriggerEff(vo.mmkey)) {\r\n // return\r\n // }\r\n\r\n //check, 只針對hover做處理\r\n if (vo.kind !== 'hover') {\r\n return\r\n }\r\n\r\n //divTrigger\r\n let divTrigger = get(vo, '$refs.divTrigger', null)\r\n\r\n //check\r\n if (!divTrigger) {\r\n return\r\n }\r\n\r\n //cursorTriggerInner, 滑鼠游標是否點擊於觸發區內\r\n if (divTrigger) {\r\n vo.cursorTriggerInner = domIsClientXYIn(vo.mouseClientX, vo.mouseClientY, divTrigger)\r\n // console.log('domIsClientXYIn vo.cursorTriggerInner', vo.cursorTriggerInner)\r\n }\r\n else {\r\n vo.cursorTriggerInner = false\r\n // console.log('force vo.cursorTriggerInner', vo.cursorTriggerInner)\r\n }\r\n\r\n if (vo.cursorTriggerInner) {\r\n //滑鼠位於於觸發區\r\n\r\n if (vo.valueTrans) {\r\n //當前為顯示\r\n\r\n //不處理\r\n\r\n }\r\n else {\r\n //當前為隱藏\r\n // console.log(vo.mmkey, 'scroll顯示')\r\n\r\n //evShow\r\n vo.evShow('hover', 'windowScroll')\r\n\r\n }\r\n\r\n }\r\n else {\r\n //滑鼠非位於於觸發區\r\n\r\n if (vo.valueTrans) {\r\n //當前為顯示\r\n // console.log(vo.mmkey, 'scroll隱藏')\r\n\r\n //evHide\r\n vo.evHide('hover', 'windowScroll')\r\n\r\n }\r\n else {\r\n //當前為隱藏\r\n\r\n //不處理\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n window.addEventListener('scroll', vo.windowScroll, false)\r\n\r\n },\r\n beforeDestroy: function() {\r\n //console.log('beforeDestroy')\r\n\r\n let vo = this\r\n\r\n //window remove mousemove, mousedown, mouseup, scroll\r\n window.removeEventListener('mousemove', vo.windowMousemove, false)\r\n window.removeEventListener('mousedown', vo.windowMousedown, false)\r\n window.removeEventListener('mouseup', vo.windowMouseup, false)\r\n window.removeEventListener('scroll', vo.windowMouseup, false)\r\n\r\n // //hidePopper, 不論click或hover一律隱藏\r\n // vo.hidePopper('beforeDestroy')\r\n\r\n //triggerEvent for hide\r\n vo.triggerEvent(false)\r\n\r\n //bbb\r\n clearInterval(vo.trt)\r\n\r\n },\r\n computed: {\r\n\r\n changeValue: function () {\r\n //console.log('computed changeValue')\r\n\r\n let vo = this\r\n\r\n //trigger\r\n let value = vo.value\r\n let isolated = vo.isolated\r\n\r\n //updateValue\r\n if (!isolated) {\r\n vo.updateValue(value, 'changeValue')\r\n }\r\n\r\n return ''\r\n },\r\n\r\n useDisplayType: function() {\r\n let vo = this\r\n if (vo.displayType === 'line') {\r\n return 'display:block;'\r\n }\r\n return 'display:inline-block;'\r\n },\r\n\r\n useMinWidth: function() {\r\n //console.log('computed useMinWidth')\r\n\r\n let vo = this\r\n\r\n if (isNumber(vo.minWidth)) {\r\n return `min-width:${vo.minWidth}px;`\r\n }\r\n else if (vo.autoFitMinWidth) {\r\n return `min-width:${vo.triggerWidth}px;`\r\n }\r\n return ''\r\n },\r\n\r\n useMaxWidth: function() {\r\n //console.log('computed useMaxWidth')\r\n\r\n let vo = this\r\n\r\n if (isNumber(vo.maxWidth)) {\r\n return `max-width:${vo.maxWidth}px;`\r\n }\r\n else if (vo.autoFitMaxWidth) {\r\n return `max-width:${vo.triggerWidth}px;`\r\n }\r\n return ''\r\n },\r\n\r\n useBorderRadius: function() {\r\n //console.log('computed useBorderRadius')\r\n\r\n let vo = this\r\n\r\n if (isNumber(vo.borderRadius)) {\r\n return `border-radius:${vo.borderRadius}px;`\r\n }\r\n return ''\r\n },\r\n\r\n useTextFontSize: function() {\r\n let vo = this\r\n let s = vo.textFontSize\r\n s = replace(s, ';', '')\r\n return `font-size:${s};`\r\n },\r\n\r\n useTextColor: function() {\r\n //console.log('computed useTextColor')\r\n\r\n let vo = this\r\n\r\n return convertColor(vo.textColor)\r\n },\r\n\r\n useBackgroundColor: function() {\r\n //console.log('computed useBackgroundColor')\r\n\r\n let vo = this\r\n\r\n return convertColor(vo.backgroundColor)\r\n },\r\n\r\n usePadding: function() {\r\n //console.log('computed usePadding')\r\n\r\n let vo = this\r\n\r\n //parseSpace\r\n let cs = parseSpace(vo.paddingStyle)\r\n\r\n //padding\r\n let padding = `padding:${cs};`\r\n\r\n return padding\r\n },\r\n\r\n useShadow: function() {\r\n //console.log('computed useShadow')\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.shadow) {\r\n return ''\r\n }\r\n\r\n //shadowStyle\r\n let s = replace(vo.shadowStyle, ';', '')\r\n if (s !== '') {\r\n return `box-shadow:${s};`\r\n }\r\n\r\n return ''\r\n },\r\n\r\n kind: function() {\r\n let vo = this\r\n if (vo.mode === 'popup') {\r\n return 'click'\r\n }\r\n return 'hover'\r\n },\r\n\r\n },\r\n methods: {\r\n\r\n addTrigger: function(mmkey) {\r\n let vo = this\r\n return addTriggerMode(vo.mode, mmkey)\r\n },\r\n\r\n checkTriggerEff: function(mmkey) {\r\n let vo = this\r\n return checkTriggerEffMode(vo.mode, mmkey)\r\n },\r\n\r\n removeTrigger: function(mmkey) {\r\n let vo = this\r\n return removeTriggerMode(vo.mode, mmkey)\r\n },\r\n\r\n showPopper: function(from) {\r\n // console.log('methods showPopper', this.mmkey, from)\r\n\r\n let vo = this\r\n\r\n //divTrigger\r\n let divTrigger = get(vo, '$refs.divTrigger', null)\r\n if (divTrigger === null) {\r\n return //console.log('無法找到點擊區元素')\r\n }\r\n\r\n //$nextTick, 因顯示後popperjs會用divContent撐開導致divTrigger寬度等同於divContent, 需延遲取得offsetWidth才是正確寬度\r\n vo.$nextTick(() => {\r\n\r\n //update triggerWidth\r\n vo.triggerWidth = divTrigger.offsetWidth\r\n\r\n })\r\n\r\n //divContent\r\n let divContent = get(vo, '$refs.divContent', null)\r\n\r\n //check\r\n if (divContent === null) {\r\n return //console.log('無法找到顯示元素')\r\n }\r\n\r\n //addTrigger, 採同步方式添加, popup顯示前就會mmkey就會進清單\r\n vo.addTrigger(vo.mmkey)\r\n\r\n //@popperjs/core 2.x\r\n let opt = {\r\n strategy: 'fixed', //盡量使用'fixed'而不用'absolute', 否則位於多層dialog或多層drawer內popup顯示會異常\r\n placement: vo.placement,\r\n modifiers: [\r\n preventOverflow,\r\n computeStyles,\r\n {\r\n name: 'computeStyles',\r\n options: {\r\n gpuAcceleration: false, //預設true, 可關閉GPU加速\r\n },\r\n },\r\n flip,\r\n {\r\n name: 'flip',\r\n options: {\r\n fallbackPlacements: ['bottom-start', 'bottom-end', 'top-start', 'top-end', 'top', 'right-start', 'right-end', 'right', 'left-start', 'left-end', 'left'],\r\n },\r\n },\r\n offset,\r\n {\r\n name: 'offset',\r\n options: {\r\n offset: [0, vo.placementDist],\r\n //因popperjs會自動調位置, 故得通過callback函數處理指定位置時的偏移量\r\n // offset: ({ placement, reference, popper }) => {\r\n // console.log('offset', placement, reference, popper, vo.placementDist)\r\n // if (placement === 'bottom-start' || placement === 'bottom' || placement === 'bottom-end') {\r\n // return [0, vo.placementDist]\r\n // }\r\n // else if (placement === 'top-start' || placement === 'top' || placement === 'top-end') {\r\n // return [0, vo.placementDist]\r\n // }\r\n // else if (placement === 'left-start' || placement === 'left' || placement === 'left-end') {\r\n // return [0, vo.placementDist]\r\n // }\r\n // else if (placement === 'right-start' || placement === 'right' || placement === 'right-end') {\r\n // return [0, vo.placementDist]\r\n // }\r\n // else {\r\n // return []\r\n // }\r\n // // return [0, vo.placementDist] //[Skidding, Distance]\r\n // },\r\n },\r\n },\r\n hide,\r\n ],\r\n }\r\n vo.popperInstance = createPopper(divTrigger, divContent, opt)\r\n // console.log('popperInstance', vo.popperInstance)\r\n\r\n },\r\n\r\n hidePopper: function(from) {\r\n // console.log('methods hidePopper', from, this.mmkey)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (vo.popperInstance) {\r\n\r\n //destroy\r\n vo.popperInstance.destroy()\r\n vo.popperInstance = null\r\n\r\n }\r\n\r\n //非同步移除用nextTick會太快, 得使用setTimeout\r\n //不管有沒有popperInstance都進行移除, 於開發階段避免熱更新問題\r\n setTimeout(() => {\r\n\r\n //removeTrigger, 需採非同步移除, 避免window事件結束後, 此時會繼續觸發前面popup內的window事件, 若採同步移除就無法讓前面popup判斷是否需屏蔽\r\n vo.removeTrigger(vo.mmkey)\r\n\r\n }, 20)\r\n\r\n },\r\n\r\n updatePopper: function(msg) {\r\n //console.log('methods updatePopper', msg)\r\n\r\n let vo = this\r\n\r\n //update\r\n if (vo.popperInstance) {\r\n vo.popperInstance.update()\r\n }\r\n\r\n //emit\r\n vo.$emit('resize', msg)\r\n\r\n },\r\n\r\n displayPopper: function() {\r\n //console.log('methods displayPopper')\r\n\r\n let vo = this\r\n\r\n //showPopper or hidePopper\r\n vo.$nextTick(() => {\r\n\r\n //b\r\n let b = vo.editable && vo.valueTrans //顯示時valueTrans=true與可編輯時才顯示, 否則一律隱藏\r\n\r\n if (b && !vo.popperShow) {\r\n // console.log('call showPopper', vo.mmkey)\r\n\r\n //shift, 暫時無法取得popper自動變更的placement, shift無法即時連動, 待研究\r\n let shift = -15\r\n // if (vo.placement.indexOf('top') >= 0) {\r\n // shift = 15\r\n // }\r\n // console.log('vo.placement', vo.placement, vo.placement.indexOf('top'))\r\n // console.log('shift', shift)\r\n\r\n //contentStyle, 初始化使用pointer-events:none避免彈出區遮蔽驅動區導致觸發隱藏\r\n vo.contentStyle = `opacity:0; pointer-events:none; transform:translateY(${shift}px);`\r\n\r\n vo.showPopper('displayPopper')\r\n vo.popperShow = true\r\n vo.$emit('show')\r\n // console.log('emit show')\r\n\r\n //contentStyle, 顯示才給予transition用以驅動動畫, 動畫期間使用pointer-events:none避免彈出區遮蔽驅動區導致觸發隱藏\r\n setTimeout(() => {\r\n vo.contentStyle = `transition:all ${vo.transitionTime}ms ease-out; opacity:1; pointer-events:none;`\r\n }, 1)\r\n\r\n //contentStyle, 動畫結束清除pointer-events:none, 使內部能接收事件\r\n setTimeout(() => {\r\n vo.contentStyle = ``\r\n }, vo.transitionTime)\r\n\r\n }\r\n else if (!b && vo.popperShow) {\r\n // console.log('call hidePopper', vo.mmkey)\r\n\r\n vo.hidePopper('displayPopper')\r\n vo.popperShow = false\r\n vo.$emit('hide')\r\n // console.log('emit hide')\r\n\r\n }\r\n\r\n })\r\n\r\n },\r\n\r\n updateValue: function (value, from) {\r\n // console.log('methods updateValue', value, from)\r\n\r\n let vo = this\r\n\r\n //check, 不可編輯時跳出\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //save\r\n vo.valueTrans = value\r\n // console.log('updateValue', vo.valueTrans, from, vo.mmkey)\r\n\r\n //displayPopper\r\n vo.displayPopper()\r\n\r\n },\r\n\r\n triggerEvent: function(value) {\r\n // console.log('methods triggerEvent', value)\r\n\r\n let vo = this\r\n\r\n //check, 不可編輯時跳出\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //check\r\n if (vo.isolated) {\r\n\r\n //updateValue\r\n vo.updateValue(value, 'triggerEvent')\r\n\r\n }\r\n\r\n //$nextTick, 不論是否isolated都須emit\r\n vo.$nextTick(() => {\r\n\r\n //emit\r\n vo.$emit('input', value)\r\n\r\n })\r\n\r\n },\r\n\r\n evShow: function(kind, from) {\r\n // console.log('methods evShow', kind, from)\r\n\r\n let vo = this\r\n\r\n //check, 不可編輯時跳出\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //check, 已經顯示就不再顯示\r\n if (vo.valueTrans) {\r\n return\r\n }\r\n\r\n //check, 只允許限制模式\r\n if (vo.kind !== kind) {\r\n return\r\n }\r\n\r\n //triggerEvent for show\r\n vo.triggerEvent(true)\r\n\r\n },\r\n\r\n evHide: function(kind, from) {\r\n // console.log('methods evHide', kind, from)\r\n\r\n let vo = this\r\n\r\n //check, 不可編輯時跳出\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //check, 已經隱藏就不再隱藏\r\n if (!vo.valueTrans) {\r\n return\r\n }\r\n\r\n //check, 只允許限制模式\r\n if (vo.kind !== kind) {\r\n return\r\n }\r\n\r\n //triggerEvent for hide\r\n vo.triggerEvent(false)\r\n\r\n },\r\n\r\n },\r\n}\r\n<\/script>\r\n\r\n<style scoped>\r\n.WPopup-Content[data-popper-reference-hidden] {\r\n visibility: hidden;\r\n pointer-events: none;\r\n}\r\n</style>\r\n\r\n"]},media:void 0})}),Xc,"data-v-059d708c",false,undefined,!1,ms,void 0,void 0);var Zc={components:{WIcon:xs,WIconLoading:Sl,WTooltip:qc},props:{tooltip:{type:String,default:""},icon:{type:String,default:""},iconSize:{type:Number,default:22},iconColor:{type:String,default:"grey darken-1"},iconColorHover:{type:String,default:"grey darken-2"},iconColorFocus:{type:String,default:"grey darken-3"},iconColorActive:{type:String,default:"grey darken-3"},borderRadius:{type:[Number,String],default:"50%"},borderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorFocus:{type:String,default:"transparent"},borderColorActive:{type:String,default:"transparent"},backgroundColor:{type:String,default:"rgb(241,241,241)"},backgroundColorHover:{type:String,default:"rgb(236,236,236)"},backgroundColorFocus:{type:String,default:"rgb(230,230,230)"},backgroundColorActive:{type:String,default:"rgb(230,230,230)"},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},rippleColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},paddingStyle:{type:Object,default:()=>({v:4,h:4})},shadow:{type:Boolean,default:!0},shadowStyle:{type:String,default:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},active:{type:Boolean,default:!1},cursorPointer:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingColor:{type:String,default:"grey darken-2"},promiseUnlock:{type:Boolean,default:!1},role:{type:String,default:"button"},editable:{type:Boolean,default:!0},disabledColor:{type:String,default:"rgba(255,255,255,0.5)"}},data:function(){return{activeTrans:!1,hoverTrans:!1,focusTrans:!1,loadingTrans:!1}},mounted:function(){},computed:{changeActive:function(){return this.activeTrans=this.active,""},changeLoading:function(){return this.loadingTrans=this.loading,""},effIconColor:function(){return Wo(this.iconColor)},effIconColorHover:function(){return Wo(this.iconColorHover)},effIconColorFocus:function(){return Wo(this.iconColorFocus)},effIconColorActive:function(){return Wo(this.iconColorActive)},useIconColor:function(){let e,t=this;return t.loadingTrans?t.effIconColor:(e=t.activeTrans?t.effIconColorActive:t.focusTrans?t.effIconColorFocus:t.hoverTrans?t.effIconColorHover:t.effIconColor,t.editable||(e=t.activeTrans?t.effIconColorActive:t.effIconColor),e)},useBorderRadius:function(){let e=this,t="0px";if(zi(e.borderRadius)){t=`${Hi(e.borderRadius)}px;`}else $n(e.borderRadius)&&(t=e.borderRadius);let n="0px",r="0px",i="0px",o="0px";return!0===me(e,"borderRadiusStyle.left")&&(n=t,i=t),!0===me(e,"borderRadiusStyle.right")&&(r=t,o=t),!0===me(e,"borderRadiusStyle.top")&&(n=t,r=t),!0===me(e,"borderRadiusStyle.bottom")&&(i=t,o=t),!0!==me(e,"borderRadiusStyle.topLeft")&&!0!==me(e,"borderRadiusStyle.top-left")||(n=t),!0!==me(e,"borderRadiusStyle.topRight")&&!0!==me(e,"borderRadiusStyle.top-right")||(r=t),!0!==me(e,"borderRadiusStyle.bottomLeft")&&!0!==me(e,"borderRadiusStyle.bottom-left")||(i=t),!0!==me(e,"borderRadiusStyle.bottomRight")&&!0!==me(e,"borderRadiusStyle.bottom-right")||(o=t),`border-top-left-radius:${n}; border-top-right-radius:${r}; border-bottom-left-radius:${i}; border-bottom-right-radius:${o};`},effBorderColor:function(){return Wo(this.borderColor)},effBorderColorHover:function(){return Wo(this.borderColorHover)},effBorderColorFocus:function(){return Wo(this.borderColorFocus)},effBorderColorActive:function(){return Wo(this.borderColorActive)},useBorderColor:function(){let e,t=this;return t.loadingTrans?t.effBorderColor:(e=t.activeTrans?t.effBorderColorActive:t.focusTrans?t.effBorderColorFocus:t.hoverTrans?t.effBorderColorHover:t.effBorderColor,t.editable||(e=t.activeTrans?t.effBorderColorActive:t.effBorderColor),e)},effBackgroundColor:function(){return Wo(this.backgroundColor)},effBackgroundColorHover:function(){return Wo(this.backgroundColorHover)},effBackgroundColorFocus:function(){return Wo(this.backgroundColorFocus)},effBackgroundColorActive:function(){return Wo(this.backgroundColorActive)},useBackgroundColor:function(){let e,t=this;return t.loadingTrans?t.effBackgroundColor:(e=t.activeTrans?t.effBackgroundColorActive:t.focusTrans?t.effBackgroundColorFocus:t.hoverTrans?t.effBackgroundColorHover:t.effBackgroundColor,t.editable||(e=t.activeTrans?t.effBackgroundColorActive:t.effBackgroundColor),e)},effRippleColor:function(){return Wo(this.rippleColor)},effLoadingColor:function(){return Wo(this.loadingColor)},effDisabledColor:function(){return Wo(this.disabledColor)},usePadding:function(){let e=this;return`padding:${ls(e.paddingStyle,{ext:{left:e.shiftLeft,right:e.shiftRight}})};`},useShadow:function(){let e=this;return e.shadow&&$n(e.shadowStyle)?"box-shadow:"+function(e,t,n){let r=Ct(e=jo(e,"}","{"),"{");return r=jn(r,(e=>{if(e.indexOf(t)>=0){let t=fa(e,"=")[1];return t=zi(t)?Hi(t):.2,function(e,t){let n=Wo(e),r=_l.toRgba(n);return r.a=t,_l.toRgbaString(r)}(n,t)}return e})),Al(r,"")}(e.shadowStyle,"backgroundColorAlpha",e.backgroundColor):""},hasTooltop:function(){return $n(this.tooltip)}},methods:{ripple:function(e){let t=this;t.editable&&(t.loadingTrans||t.$nextTick((()=>{ts(e.currentTarget,e,{color:t.effRippleColor,timeDuration:500})})))},clickBtn:function(e){let t=this;if(t.editable&&!t.loadingTrans)if(t.promiseUnlock){t.loadingTrans=!0,t.$nextTick((()=>{t.$emit("update:loading",t.loadingTrans)}));let e=ea();t.$nextTick((()=>{t.$emit("click",{pm:e})})),e.catch().finally((()=>{t.loadingTrans=!1,t.$nextTick((()=>{t.$emit("update:loading",t.loadingTrans)}))}))}else t.$nextTick((()=>{t.$emit("click")}))}}};const Jc=Zc;var Kc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{display:"inline-block","vertical-align":"middle",outline:"none","user-select":"none"},attrs:{role:e.editable?e.role:"",changeActive:e.changeActive,changeLoading:e.changeLoading}},[n("WTooltip",{attrs:{displayType:"line",isolated:!0,borderRadius:e.tooltipBorderRadius,paddingStyle:e.tooltipPaddingStyle,textFontSize:e.tooltipTextFontSize,textColor:e.tooltipTextColor,backgroundColor:e.tooltipBackgroundColor,editable:e.hasTooltop},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("div",{style:"position:relative; transition:all 0.3s; "+e.usePadding+" "+e.useBorderRadius+" border:"+e.borderWidth+"px solid "+e.useBorderColor+"; background:"+e.useBackgroundColor+"; "+(e.editable&&e.cursorPointer?"cursor:pointer;":"")+" "+e.useShadow+"; outline:none; user-select:none; overflow:hidden;",attrs:{tabindex:"0"},on:{mouseenter:function(t){e.hoverTrans=!0,e.$emit("mouseenter",t)},mouseleave:function(t){e.hoverTrans=!1,e.$emit("mouseleave",t)},focus:function(t){e.focusTrans=!0},blur:function(t){e.focusTrans=!1},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickBtn(t)},click:function(t){e.ripple(t),e.clickBtn(t)}}},[n("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[e.loadingTrans?e._e():n("WIcon",{attrs:{icon:e.icon,color:e.useIconColor,colorHover:e.useIconColor,size:e.iconSize}}),e._v(" "),e.loadingTrans?n("WIconLoading",{attrs:{name:"cir-rotate",color:e.effLoadingColor,size:e.iconSize}}):e._e()],1),e._v(" "),e.editable?e._e():n("div",{staticStyle:{position:"absolute",left:"0",right:"0",top:"0",bottom:"0"}},[n("div",{style:e.useBorderRadius+" overflow:hidden; width:100%; height:100%;"},[n("div",{style:"background:"+e.effDisabledColor+"; height:100%;"})])])])]},proxy:!0},{key:"content",fn:function(){return[e._v("\n "+e._s(e.tooltip)+"\n ")]},proxy:!0}])})],1)};Kc._withStripped=!0;var Qc={components:{WButtonCircle:ps({render:Kc,staticRenderFns:[]},(function(e){e&&e("data-v-1589afba_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WButtonCircle.vue"},media:void 0})}),Jc,"data-v-1589afba",false,undefined,!1,ms,void 0,void 0)},props:{multiCheck:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},value:{type:[Array,Object],default:null},keyIcon:{type:String,default:"icon"},keyTooltip:{type:String,default:"tooltip"},dir:{type:String,default:"horizontal"},iconColor:{type:String,default:"#222"},iconColorHover:{type:String,default:"#444"},iconColorFocus:{type:String,default:"#666"},iconColorActive:{type:String,default:"#333"},iconSize:{type:Number,default:22},borderWidth:{type:Number,default:0},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorFocus:{type:String,default:"transparent"},borderColorActive:{type:String,default:"transparent"},backgroundColor:{type:String,default:"#f2f2f2"},backgroundColorHover:{type:String,default:"#eaeaea"},backgroundColorFocus:{type:String,default:"#e2e2e2"},backgroundColorActive:{type:String,default:"#cecece"},seplineWidth:{type:Number,default:1},seplineColor:{type:String,default:"#ddd"},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},rippleColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},paddingStyle:{type:Object,default:()=>({v:4,h:4})},shadow:{type:Boolean,default:!1},shadowStyle:{type:String,default:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},editable:{type:Boolean,default:!0}},data:function(){return{get:me,itemsTrans:[]}},mounted:function(){},computed:{changeItems:function(){let e=this;let t=Ai(e.items),n=jn(t,(t=>{let n=function(t){let n;return n=e.multiCheck?wl(e.value,t):pr(t,e.value),n}(t);return{active:n,hover:!1}})),r=jn(t,((e,t)=>{let r={data:e},i=n[t];return r.ia=i,r.active=i.active,r.hover=!1,r}));return e.itemsTrans=r,""},useFlexDirection:function(){return"horizontal"===this.dir?"row":"column"},useSeplineStype:function(){let e=this,t="";return t="horizontal"===e.dir?`height:100%; border-left:${e.seplineWidth}px solid ${e.useSeplineColor};`:`width:100%; border-top:${e.seplineWidth}px solid ${e.useSeplineColor};`,t},useSeplineColor:function(){return Wo(this.seplineColor)},useShadow:function(){let e=this;return e.shadow&&$n(e.shadowStyle)?"box-shadow:"+function(e,t,n){let r=Ct(e=jo(e,"}","{"),"{");return r=jn(r,(e=>{if(e.indexOf(t)>=0){let t=fa(e,"=")[1];return t=zi(t)?Hi(t):.2,function(e,t){let n=Wo(e),r=_l.toRgba(n);return r.a=t,_l.toRgbaString(r)}(n,t)}return e})),Al(r,"")}(e.shadowStyle,"backgroundColorAlpha",e.backgroundColor):""}},methods:{getBorderRadiusStyle:function(e){let t=ur(this.itemsTrans)-1,n={};return"horizontal"===this.dir?(0===e&&(n={...n,topLeft:!0,bottomLeft:!0}),e===t&&(n={...n,topRight:!0,bottomRight:!0})):(0===e&&(n={...n,topLeft:!0,topRight:!0}),e===t&&(n={...n,bottomLeft:!0,bottomRight:!0})),n},toggleState:function(e){let t=this;if(!1!==t.editable)if(t.multiCheck){let n=Ai(t.value);if(e.active){let t=[];nt(n,(n=>{pr(n,e.data)||t.push(n)})),n=t}else n.push(e.data);t.$nextTick((()=>{t.$emit("input",n),t.$emit("click",e.data,""+(e.active?"hide":"show"))}))}else t.$nextTick((()=>{t.$emit("input",e.data),t.$emit("click",e.data)}))}}};const eu=Qc;var tu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeItems:e.changeItems}},[n("div",{style:"display:inline-block; border-radius:"+e.borderRadius+"px; "+e.useShadow},[n("div",{style:"display:flex; flex-direction:"+e.useFlexDirection+";"},[e._l(e.itemsTrans,(function(t,r){return[n("div",{key:"kitem-"+r,style:"display:flex; flex-direction:"+e.useFlexDirection+"; align-items:stretch;"},[r>0?n("div",{style:""+e.useSeplineStype}):e._e(),e._v(" "),n("WButtonCircle",{key:r,attrs:{tooltip:e.get(t,"data."+e.keyTooltip),icon:e.get(t,"data."+e.keyIcon),iconColor:e.iconColor,iconColorHover:e.iconColorHover,iconColorFocus:e.iconColorFocus,iconColorActive:e.iconColorActive,iconSize:e.iconSize,borderWidth:e.borderWidth,borderRadius:e.borderRadius,borderRadiusStyle:e.getBorderRadiusStyle(r),borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorFocus:e.borderColorFocus,borderColorActive:e.borderColorActive,backgroundColor:e.backgroundColor,backgroundColorHover:e.backgroundColorHover,backgroundColorFocus:e.backgroundColorFocus,backgroundColorActive:e.backgroundColorActive,tooltipBorderRadius:e.tooltipBorderRadius,tooltipPaddingStyle:e.tooltipPaddingStyle,tooltipTextFontSize:e.tooltipTextFontSize,tooltipTextColor:e.tooltipTextColor,tooltipBackgroundColor:e.tooltipBackgroundColor,rippleColor:e.rippleColor,paddingStyle:e.paddingStyle,shadow:!1,_shadowStyle:"shadowStyle",editable:e.editable,disabledColor:"rgba(255,255,255,0.4)",active:t.active},on:{click:function(n){return e.toggleState(t)}}})],1)]}))],2)])])};tu._withStripped=!0;const nu=ps({render:tu,staticRenderFns:[]},(function(e){e&&e("data-v-354ea539_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WGroupIconCheck.vue"},media:void 0})}),eu,"data-v-354ea539",false,undefined,!1,ms,void 0,void 0);const ru={components:{WTooltip:qc},props:{value:{type:Boolean,default:!1},displayType:{type:String,default:"block"},cmpZIndex:{type:Number,default:3e3},isolated:{type:Boolean,default:!1},minWidth:{type:Number,default:null},maxWidth:{type:Number,default:null},autoFitMinWidth:{type:Boolean,default:!1},autoFitMaxWidth:{type:Boolean,default:!1},placement:{type:String,default:"bottom-start"},placementDist:{type:Number,default:5},borderRadius:{type:Number,default:4},textFontSize:{type:String,default:"inherit"},textColor:{type:String,default:"black"},backgroundColor:{type:String,default:"white"},paddingStyle:{type:Object,default:()=>({v:0,h:0})},shadow:{type:Boolean,default:!0},shadowStyle:{type:String,default:"0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12)"},transitionTime:{type:Number,default:200},editable:{type:Boolean,default:!0}},data:function(){return{}},mounted:function(){},computed:{},methods:{}};var iu=function(){var e=this,t=e.$createElement;return(e._self._c||t)("WTooltip",e._g(e._b({scopedSlots:e._u([{key:"trigger",fn:function(){return[e._t("trigger")]},proxy:!0},{key:"content",fn:function(t){return[e._t("content",null,{funHide:t.funHide})]}}],null,!0)},"WTooltip",Object.assign({},e.$props,{mode:"popup"}),!1),e.$listeners))};iu._withStripped=!0;const ou=ps({render:iu,staticRenderFns:[]},(function(e){e&&e("data-v-4642e044_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WPopup.vue"},media:void 0})}),ru,"data-v-4642e044",false,undefined,!1,ms,void 0,void 0);var su={components:{},props:{value:{type:String,default:"#FFFFFF"},size:{type:Number,default:200}},data:function(){let e=function(e){let t=e,n=t/2*Math.sqrt(3),r=t/4*3,i=jn((()=>{let e=[];for(let n=0;n<6;n++){let r=Math.PI/3*(n+.5),i=.5+.5*Math.cos(r),o=.5+.5*Math.sin(r);i*=t,o*=t,e.push({x:i,y:o})}return e})(),(e=>`${e.x},${e.y}`));i=Al(i," ");let o=[];nt([{dx:6,cs:["#003366","#336699","#3366CC","#003399","#000099","#0000CC","#000066"]},{dx:5,cs:["#006666","#006699","#0099CC","#0066CC","#0033CC","#0000FF","#3333FF","#333399"]},{dx:4,cs:["#669999","#009999","#33CCCC","#00CCFF","#0099FF","#0066FF","#3366FF","#3333CC","#666699"]},{dx:3,cs:["#339966","#00CC99","#00FFCC","#00FFFF","#33CCFF","#3399FF","#6699FF","#6666FF","#6600FF","#6600CC"]},{dx:2,cs:["#339933","#00CC66","#00FF99","#66FFCC","#66FFFF","#66CCFF","#99CCFF","#9999FF","#9966FF","#9933FF","#9900FF"]},{dx:1,cs:["#006600","#00CC00","#00FF00","#66FF99","#99FFCC","#CCFFFF","#CCCCFF","#CC99FF","#CC66FF","#CC33FF","#CC00FF","#9900CC"]},{dx:0,cs:["#003300","#009933","#33CC33","#66FF66","#99FF99","#CCFFCC","#FFFFFF","#FFCCFF","#FF99FF","#FF66FF","#FF00FF","#CC00CC","#660066"]},{dx:1,cs:["#336600","#009900","#66FF33","#99FF66","#CCFF99","#FFFFCC","#FFCCCC","#FF99CC","#FF66CC","#FF33CC","#CC0099","#993399"]},{dx:2,cs:["#333300","#669900","#99FF33","#CCFF66","#FFFF99","#FFCC99","#FF9999","#FF6699","#FF3399","#CC3399","#990099"]},{dx:3,cs:["#666633","#99CC00","#CCFF33","#FFFF66","#FFCC66","#FF9966","#FF6666","#FF0066","#CC6699","#993366"]},{dx:4,cs:["#999966","#CCCC00","#FFFF00","#FFCC00","#FF9933","#FF6600","#FF5050","#CC0066","#660033"]},{dx:5,cs:["#996633","#CC9900","#FF9900","#CC6600","#FF3300","#FF0000","#CC0000","#990033"]},{dx:6,cs:["#663300","#996600","#CC3300","#993300","#990000","#800000","#993333"]}],((e,t)=>{nt(e.cs,((i,s)=>{let a={x:(n+0)*s+e.dx*(n/2),y:(r+0)*t,color:i};$n(i)&&o.push(a)}))}));let s=Ds(jn(o,"x")),a=Fs(jn(o,"x")),l=Ds(jn(o,"y")),c=Fs(jn(o,"y"));return a+=n+2,c+=t+1,{cpgs:i,colors:o,xmin:s,xmax:a,ymin:l,ymax:c}}(18);return{valueTrans:null,cpgs:e.cpgs,colors:e.colors,xmin:e.xmin,xmax:e.xmax,ymin:e.ymin,ymax:e.ymax,pick:null}},computed:{changeValue:function(){return this.valueTrans=Wo(this.value),""},changePick:function(){let e=this,t=null;return nt(e.colors,(n=>{e.jdColor2(n.color,e.valueTrans)&&(t=n)})),e.pick=t,""},width:function(){return this.size},height:function(){return this.width/10*9}},methods:{jdColor2:function(e,t){return _l.toRgbString(e)===_l.toRgbString(t)},ckColor:function(e){this.valueTrans=e.color,this.$emit("input",e.color)}}};const au=su;var lu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.width+"px; height:"+e.height+"px;",attrs:{changeValue:e.changeValue,changePick:e.changePick}},[n("div",{staticStyle:{display:"flex"}},[n("svg",{attrs:{viewBox:"0 0 "+e.xmax+" "+e.ymax,width:e.width,height:e.height,xmlns:"http://www.w3.org/2000/svg"}},[e._l(e.colors,(function(t,r){return n("polygon",{key:"kc-"+r,style:"fill:"+t.color+"; stroke:"+t.color+"; stroke-width:1px; cursor:pointer; user-select:none;",attrs:{transform:"translate("+t.x+", "+t.y+")",points:e.cpgs},on:{click:function(n){return e.ckColor(t)}}})})),e._v(" "),e.pick?[n("polygon",{style:"fill:transparent; stroke:#000; stroke-width:4px; cursor:pointer; user-select:none;",attrs:{transform:"translate("+e.pick.x+", "+e.pick.y+")",points:e.cpgs},on:{click:function(t){return e.ckColor(e.pick)}}}),e._v(" "),n("polygon",{style:"fill:transparent; stroke:#fff; stroke-width:2px; cursor:pointer; user-select:none;",attrs:{transform:"translate("+e.pick.x+", "+e.pick.y+")",points:e.cpgs},on:{click:function(t){return e.ckColor(e.pick)}}})]:e._e()],2)])])};lu._withStripped=!0;const cu=ps({render:lu,staticRenderFns:[]},(function(e){e&&e("data-v-d9aed7a8_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickHexagon.vue"},media:void 0})}),au,"data-v-d9aed7a8",false,undefined,!1,ms,void 0,void 0);var uu={components:{},props:{value:{type:String,default:"#FFFFFF"},colorLeft:{type:String,default:"#FFFFFF"},colorRight:{type:String,default:"#000000"},colorNum:{type:Number,default:10},width:{type:Number,default:200},height:{type:Number,default:20}},data:function(){return{aimg:"data:image/svg+xml;base64,ICAgICAgICAgICAgICAgIDxzdmcgdmlld0JveD0iMCAwIDEwIDEwIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNkZGQiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNmZmYiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjUiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNmZmYiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNkZGQiIC8+DQogICAgICAgICAgICAgICAgPC9zdmc+",valueTrans:null,colorLeftTrans:null,colorRightTrans:null,s:20,pick:null}},computed:{changeValue:function(){let e=this;return e.valueTrans=Wo(e.value),e.colorLeftTrans=Wo(e.colorLeft),e.colorRightTrans=Wo(e.colorRight),""},colors:function(){let e=this,t={0:e.colorLeftTrans,1:e.colorRightTrans},n=_l.interp(t),r=[];for(let t=0;t<e.colorNum;t++){let i=t/Math.max(e.colorNum-1,1),o=n(i);r.push({r:i,x:t*e.s,y:0,color:o})}return r},changePick:function(){let e=this,t=null;return nt(e.colors,(n=>{e.jdColor2(n.color,e.valueTrans)&&(t=n)})),e.pick=t,""}},methods:{jdColor2:function(e,t){return _l.toRgbString(e)===_l.toRgbString(t)},ckColor:function(e){this.valueTrans=e.color,this.$emit("input",e.color)}}};const du=uu;var hu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.width+"px; height:"+e.height+"px;",attrs:{changeValue:e.changeValue,changePick:e.changePick}},[n("div",{style:"position:relative; width:"+e.width+"px; height:"+e.height+"px;"},[n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n background-image: url("+e.aimg+");\n background-repeat:repeat;\n "}),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n "},[n("div",{staticStyle:{display:"flex"}},[n("svg",{attrs:{viewBox:"0 0 "+e.colors.length*e.s+" "+e.s,width:e.width,height:e.height,preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg"}},[e._l(e.colors,(function(t,r){return n("rect",{key:"kc-"+r,style:"fill:"+t.color+"; stroke-width:0px; cursor:pointer; user-select:none;",attrs:{x:t.x,y:t.y,width:e.s,height:e.s},on:{click:function(n){return e.ckColor(t)}}})})),e._v(" "),e.pick?[n("rect",{style:"fill:transparent; stroke:#000; stroke-width:1px; cursor:pointer; user-select:none;",attrs:{x:e.pick.x,y:e.pick.y,width:e.s,height:e.s}}),e._v(" "),n("rect",{style:"fill:transparent; stroke:#fff; stroke-width:2px; cursor:pointer; user-select:none;",attrs:{x:e.pick.x+2,y:e.pick.y+2,width:e.s-4,height:e.s-4}})]:e._e()],2)])])])])};hu._withStripped=!0;const pu={components:{WColorPickHexagon:cu,WColorPickStripe:ps({render:hu,staticRenderFns:[]},(function(e){e&&e("data-v-a033fb78_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickStripe.vue"},media:void 0})}),du,"data-v-a033fb78",false,undefined,!1,ms,void 0,void 0)},props:{value:{type:String,default:"#FFFFFF"},size:{type:Number,default:200},space:{type:Number,default:5}},data:function(){return{valueTrans:null}},computed:{changeValue:function(){return this.valueTrans=Wo(this.value),""},hexagonSize:function(){return this.size},hexagonWidth:function(){return this.size},hexagonHeight:function(){return this.hexagonWidth/10*9},stripeWidth:function(){return this.size},stripeHeight:function(){return this.stripeWidth/10},width:function(){return this.size},height:function(){let e=this;return e.hexagonHeight+e.space+e.stripeHeight}},methods:{ckColor:function(e){e=(e=_l.toHexString(e)).toUpperCase(),this.valueTrans=e,this.$emit("input",e)}}};var fu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.width+"px; height:"+e.height+"px;",attrs:{changeValue:e.changeValue}},[n("div",{staticStyle:{display:"flex"}},[n("WColorPickHexagon",{attrs:{size:e.hexagonSize,value:e.valueTrans},on:{input:e.ckColor}})],1),e._v(" "),n("div",{style:"height:"+e.space+"px;"}),e._v(" "),n("div",{staticStyle:{display:"flex"}},[n("WColorPickStripe",{attrs:{width:e.stripeWidth,height:e.stripeHeight,colorNum:10,value:e.valueTrans},on:{input:e.ckColor}})],1)])};fu._withStripped=!0;const mu=ps({render:fu,staticRenderFns:[]},(function(e){e&&e("data-v-18cec008_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickHexagonGray.vue"},media:void 0})}),pu,"data-v-18cec008",false,undefined,!1,ms,void 0,void 0);const gu={components:{},props:{value:{type:Number,default:1},color:{type:String,default:"#000000"},width:{type:Number,default:200},height:{type:Number,default:20},cursorSize:{type:Number,default:7}},data:function(){return{aimg:"data:image/svg+xml;base64,ICAgICAgICAgICAgICAgIDxzdmcgdmlld0JveD0iMCAwIDEwIDEwIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNkZGQiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNmZmYiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjUiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNmZmYiIC8+DQogICAgICAgICAgICAgICAgICAgIDxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IiNkZGQiIC8+DQogICAgICAgICAgICAgICAgPC9zdmc+",valueTrans:1,colorTrans:"#000",curMousedown:!1,curLocLeft:0}},mounted:function(){let e=this;e.windowMousemove=t=>{e.curMousedown&&e.updateCurLocByEvent(t)},window.addEventListener("mousemove",e.windowMousemove,!1),e.windowMouseup=t=>{e.curMousedown=!1},window.addEventListener("mouseup",e.windowMouseup,!1)},beforeDestroy:function(){window.removeEventListener("mousemove",this.windowMousemove,!1),window.removeEventListener("mouseup",this.windowMouseup,!1)},computed:{changeValue:function(){let e=this;return e.valueTrans=e.value,e.updateCurLocByValue(),""},changeColor:function(){return this.colorTrans=Wo(this.color),""}},methods:{updateCurLocByEvent:function(e){let t=this,n=t.$el.getBoundingClientRect(),r=e.clientX-n.left;r=Math.min(Math.max(r,0),t.width-1),t.curLocLeft=r,t.updateAlpha()},updateCurLocByValue:function(){let e=this,t=e.valueTrans*(e.width-1);e.curLocLeft=t},updateAlpha:function(){let e=this,t=e.width-1,n=0;t-0-1>0&&(n=(e.curLocLeft-0)/(t-0));let r=n;e.$emit("input",r)},mousedownCur:function(e){this.curMousedown=!0,this.updateCurLocByEvent(e)}}};var vu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block;",attrs:{changeValue:e.changeValue,changeColor:e.changeColor}},[n("div",{style:"position:relative; width:"+e.width+"px; height:"+e.height+"px;"},[n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n background-image: url("+e.aimg+");\n background-repeat:repeat;\n "},[e._e()]),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n background:linear-gradient(to left, "+e.colorTrans+", transparent);\n "}),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2)-1)+"px; top:-1px;\n width:"+(e.cursorSize+2)+"px; height:"+(e.height+2)+"px;\n background:transparent;\n border:1px solid #666;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2))+"px; top:0px;\n width:"+e.cursorSize+"px; height:"+e.height+"px;\n background:transparent;\n border:1px solid #fff;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}})])])};vu._withStripped=!0;const yu=ps({render:vu,staticRenderFns:[]},(function(e){e&&e("data-v-1c777884_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickAlpha.vue"},media:void 0})}),gu,"data-v-1c777884",false,undefined,!1,ms,void 0,void 0);var _u={components:{WColorPickHexagonGray:mu,WColorPickAlpha:yu},props:{value:{type:String,default:"#FFFFFF"},size:{type:Number,default:200},spaceGray:{type:Number,default:5},spaceAlpha:{type:Number,default:8}},data:function(){return{colorPure:"#fff",colorAlpha:1,pick:null}},computed:{changeValue:function(){let e=this,t=Wo(e.value),n=_l.toRgba(t),r={r:n.r,g:n.g,b:n.b},i=_l.toRgbString(r),o=n.a;return e.colorPure=i,e.colorAlpha=o,""},hexagonGrayWidth:function(){return this.size},hexagonGrayHeight:function(){return this.hexagonGrayWidth+this.spaceGray},alphaWidth:function(){return this.size},alphaHeight:function(){return this.alphaWidth/10},width:function(){return this.size},height:function(){let e=this;return e.hexagonGrayHeight+e.spaceAlpha+e.alphaHeight}},methods:{updateColor:function(e,t,n){let r=_l.toRgba(e);r.a=t;let i=_l.toRgbaString(r);this.$emit("input",i)}}};const xu=_u;var bu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.width+"px; height:"+e.height+"px;",attrs:{changeValue:e.changeValue}},[n("div",{staticStyle:{display:"flex"}},[n("WColorPickHexagonGray",{attrs:{size:e.size,space:e.spaceGray,value:e.colorPure},on:{input:function(t){e.colorPure=t,e.updateColor(e.colorPure,e.colorAlpha,"hexagonGray")}}})],1),e._v(" "),n("div",{style:"height:"+e.spaceAlpha+"px;"}),e._v(" "),n("div",{staticStyle:{display:"flex"}},[n("WColorPickAlpha",{attrs:{width:e.alphaWidth,height:e.alphaHeight,cursorSize:7,value:e.colorAlpha,color:e.colorPure},on:{input:function(t){e.colorAlpha=t,e.updateColor(e.colorPure,e.colorAlpha,"alpha")}}})],1)])};bu._withStripped=!0;const Su=ps({render:bu,staticRenderFns:[]},(function(e){e&&e("data-v-2fd05b6d_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorSelectPanelBlock.vue"},media:void 0})}),xu,"data-v-2fd05b6d",false,undefined,!1,ms,void 0,void 0);const wu={components:{},props:{value:{type:String,default:"#FFFFFF"},color:{type:String,default:"#FFFFFF"},colorLeftTop:{type:String,default:"#FFFFFF"},colorBottom:{type:String,default:"#000000"},width:{type:Number,default:200},height:{type:Number,default:200},cursorSize:{type:Number,default:14}},data:function(){return{valueTrans:"#fff",colorTrans:"#fff",colorLeftTopTrans:"#fff",colorBottomTrans:"#fff",curMousedown:!1,curLocLeft:0,curLocTop:0}},mounted:function(){let e=this;e.windowMousemove=t=>{e.curMousedown&&e.updateCurLocByEvent(t)},window.addEventListener("mousemove",e.windowMousemove,!1),e.windowMouseup=t=>{e.curMousedown=!1},window.addEventListener("mouseup",e.windowMouseup,!1)},beforeDestroy:function(){window.removeEventListener("mousemove",this.windowMousemove,!1),window.removeEventListener("mouseup",this.windowMouseup,!1)},computed:{changeParams:function(){let e=this;e.valueTrans=Wo(e.value);let t=Wo(e.color);return t={h:_l.toHsv(t).h,s:1,v:1},t=_l.toHexString(t),e.colorTrans=t,e.colorLeftTopTrans=Wo(e.colorLeftTop),e.colorBottomTrans=Wo(e.colorBottom),e.updateCurLocByValue(),""},changeColor:function(){return this.updateColor(this.color),""}},methods:{updateCurLocByEvent:function(e){let t=this,n=t.$el.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;r=Math.min(Math.max(r,0),t.width-1),i=Math.min(Math.max(i,0),t.height-1),t.curLocLeft=r,t.curLocTop=i,t.updateColor()},updateCurLocByValue:function(){let e=this,t=_l.toHsv(e.valueTrans),n=t.s*(e.width-1),r=(1-t.v)*(e.height-1),i=_l.toHsv(e.colorTrans);t.h===i.h&&(e.curLocLeft=n,e.curLocTop=r)},updateColor:function(){let e=this,t=e.width-1,n=0;t-0>0&&(n=(e.curLocLeft-0)/(t-0));let r,i,o,s=e.height-1,a=0;s-0>0&&(a=(e.curLocTop-0)/(s-0)),r=e.colorTrans,i=e.colorLeftTopTrans,o=_l.mix(r,n,i,1-n,"toRgbString"),r=o,i=e.colorBottomTrans,o=_l.mix(r,1-a,i,a,"toHexString"),o=o.toUpperCase(),e.$emit("input",o)},mousedownCur:function(e){this.curMousedown=!0,this.updateCurLocByEvent(e)}}};var Cu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block;",attrs:{changeParams:e.changeParams,changeColor:e.changeColor}},[n("div",{style:"position:relative; width:"+e.width+"px; height:"+e.height+"px;"},[n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n background:linear-gradient(to right, "+e.colorLeftTop+", "+e.colorTrans+");\n "}),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n background:linear-gradient(to top, "+e.colorBottom+", transparent);\n "}),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2)-1)+"px; top:"+(e.curLocTop-Math.floor(e.cursorSize/2)-1)+"px;\n width:"+(e.cursorSize+2)+"px; height:"+(e.cursorSize+2)+"px;\n background:transparent;\n border-radius:50%;\n border:1px solid #666;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2))+"px; top:"+(e.curLocTop-Math.floor(e.cursorSize/2))+"px;\n width:"+e.cursorSize+"px; height:"+e.cursorSize+"px;\n background:transparent;\n border-radius:50%;\n border:1px solid #fff;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}})])])};Cu._withStripped=!0;const Au=ps({render:Cu,staticRenderFns:[]},(function(e){e&&e("data-v-6e10d83c_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickHsv.vue"},media:void 0})}),wu,"data-v-6e10d83c",false,undefined,!1,ms,void 0,void 0);const Mu={components:{},props:{value:{type:String,default:"#FF0000"},width:{type:Number,default:200},height:{type:Number,default:20},cursorSize:{type:Number,default:7}},data:function(){return{valueTrans:"#fff",curMousedown:!1,curLocLeft:0}},mounted:function(){let e=this;e.plotBackground(),e.windowMousemove=t=>{e.curMousedown&&e.updateCurLocByEvent(t)},window.addEventListener("mousemove",e.windowMousemove,!1),e.windowMouseup=t=>{e.curMousedown=!1},window.addEventListener("mouseup",e.windowMouseup,!1)},beforeDestroy:function(){window.removeEventListener("mousemove",this.windowMousemove,!1),window.removeEventListener("mouseup",this.windowMouseup,!1)},computed:{changeValue:function(){let e=this;return e.valueTrans=Wo(e.value),e.updateCurLocByValue(),""}},methods:{plotBackground:function(){let e=this;(async function(){await ta((()=>Qo(e.$refs.cvs)));let t=e.$refs.cvs;t.width=e.width,t.height=e.height;let n=t.getContext("2d"),r=e.width-1;for(let t=0;t<=r;t++){let i={h:t/r*360,s:1,v:1};i=_l.toHexString(i),n.fillStyle=i,n.fillRect(t,0,1,e.height)}})().catch((e=>{console.log(e)}))},updateCurLocByEvent:function(e){let t=this,n=t.$el.getBoundingClientRect(),r=e.clientX-n.left;r=Math.min(Math.max(r,0),t.width-1),t.curLocLeft=r,t.updateColor()},updateCurLocByValue:function(){let e=this,t=_l.toHsv(e.valueTrans).h/360*(e.width-1);e.curLocLeft=t},updateColor:function(){let e=this,t=e.width-1,n=0;t-0-1>0&&(n=(e.curLocLeft-0)/(t-0));let r={h:360*n,s:1,v:1};r=_l.toHexString(r),r=r.toUpperCase(),e.$emit("input",r)},mousedownCur:function(e){this.curMousedown=!0,this.updateCurLocByEvent(e)}}};var Tu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block;",attrs:{changeValue:e.changeValue}},[n("div",{style:"position:relative; width:"+e.width+"px; height:"+e.height+"px;"},[n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n overflow:hidden;\n "},[n("div",{staticStyle:{display:"flex"}},[n("canvas",{ref:"cvs",style:"width:"+e.width+"px; height:"+e.height+"px;"})])]),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2)-1)+"px; top:-1px;\n width:"+(e.cursorSize+2)+"px; height:"+(e.height+2)+"px;\n background:transparent;\n border:1px solid #666;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:"+(e.curLocLeft-Math.floor(e.cursorSize/2))+"px; top:0px;\n width:"+e.cursorSize+"px; height:"+e.height+"px;\n background:transparent;\n border:1px solid #fff;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}}),e._v(" "),n("div",{style:"\n position:absolute; left:0px; top:0px;\n width:"+e.width+"px; height:"+e.height+"px;\n cursor:pointer;\n user-select:none;\n _pointer-events:none;\n ",on:{mousedown:e.mousedownCur}})])])};Tu._withStripped=!0;const Eu={components:{WColorPickHsv:Au,WColorPickHue:ps({render:Tu,staticRenderFns:[]},(function(e){e&&e("data-v-6ca56ab4_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorPickHue.vue"},media:void 0})}),Mu,"data-v-6ca56ab4",false,undefined,!1,ms,void 0,void 0),WColorPickAlpha:yu},props:{value:{type:String,default:"#FFFFFF"},size:{type:Number,default:200},space:{type:Number,default:10}},data:function(){return{lock:!1,valueTrans:null,colorHue:"#f00",colorPure:"#fff",colorAlpha:1}},computed:{changeParams:function(){let e=this;if(e.value===e.valueTrans)return;if(e.lock)return;e.lock=!0,e.valueTrans=Wo(e.value);let t=_l.toHsva(e.value),n="#f00";{let e={h:t.h,s:1,v:1};n=_l.toHexString(e)}let r="#fff";{let e={h:t.h,s:t.s,v:t.v};r=_l.toHexString(e)}let i=1;return i=t.a,e.colorHue=n,e.colorPure=r,e.colorAlpha=i,""},hsvWidth:function(){return this.size},hsvHeight:function(){return this.hsvWidth},hueWidth:function(){return this.size},hueHeight:function(){return this.hueWidth/10},alphaWidth:function(){return this.size},alphaHeight:function(){return this.alphaWidth/10},width:function(){return this.size},height:function(){let e=this;return e.hsvHeight+e.space+e.hueHeight+e.space+e.alphaHeight}},methods:{updateColor:function(e,t){let n=this;if(n.lock&&"hsv"===t)return void(n.lock=!1);let r=_l.toHsva(n.colorHue),i=_l.toHsva(n.colorPure),o={h:r.h,s:i.s,v:i.v,a:n.colorAlpha};o=_l.toRgbaString(o),n.valueTrans=o,n.$emit("input",o)}}};var Lu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.width+"px; height:"+e.height+"px;",attrs:{changeParams:e.changeParams}},[n("div",{staticStyle:{display:"flex"}},[n("WColorPickHsv",{attrs:{width:e.hsvWidth,height:e.hsvHeight,cursorSize:14,color:e.colorHue},on:{input:function(t){e.updateColor(t,"hsv")}},model:{value:e.colorPure,callback:function(t){e.colorPure=t},expression:"colorPure"}})],1),e._v(" "),n("div",{style:"height:"+e.space+"px;"}),e._v(" "),n("div",{staticStyle:{display:"flex"}},[n("WColorPickHue",{attrs:{width:e.hueWidth,height:e.hueHeight,cursorSize:7},on:{input:function(t){e.updateColor(t,"hue")}},model:{value:e.colorHue,callback:function(t){e.colorHue=t},expression:"colorHue"}})],1),e._v(" "),n("div",{style:"height:"+e.space+"px;"}),e._v(" "),n("div",{staticStyle:{display:"flex"}},[n("WColorPickAlpha",{attrs:{width:e.alphaWidth,height:e.alphaHeight,colorNum:10,color:e.colorPure},on:{input:function(t){e.updateColor(t,"alpha")}},model:{value:e.colorAlpha,callback:function(t){e.colorAlpha=t},expression:"colorAlpha"}})],1)])};Lu._withStripped=!0;const Ru={components:{WColorSelectPanelBlock:Su,WColorSelectPanelHsva:ps({render:Lu,staticRenderFns:[]},(function(e){e&&e("data-v-4010dad8_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorSelectPanelHsva.vue"},media:void 0})}),Eu,"data-v-4010dad8",false,undefined,!1,ms,void 0,void 0)},props:{value:{type:String,default:"#FFFFFF"},type:{type:String,default:"LUMP"},size:{type:Number,default:200},space:{type:Number,default:10},backgroundColor:{type:String,default:"transparent"}},data:function(){return{valueTrans:"#fff",typeTrans:"LUMP"}},computed:{changeValue:function(){return this.valueTrans=Wo(this.value),""},changeType:function(){return this.typeTrans=this.type,""},useBackgroundColor:function(){return Wo(this.backgroundColor)}},methods:{updateColor:function(e,t){this.valueTrans=e,this.$emit("input",e)}}};var Pu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; background:"+e.useBackgroundColor+";",attrs:{changeValue:e.changeValue,changeType:e.changeType}},[n("div",{style:"padding:"+e.space+"px;"},["LUMP"===e.typeTrans?n("div",{staticStyle:{display:"flex"}},[n("WColorSelectPanelBlock",{attrs:{size:e.size,spaceGray:5,spaceAlpha:8,value:e.valueTrans},on:{input:function(t){e.updateColor(t,"block")}}})],1):e._e(),e._v(" "),"HSVA"===e.typeTrans?n("div",{staticStyle:{display:"flex"}},[n("WColorSelectPanelHsva",{attrs:{_size:"size*0.8875",size:e.size,space:10,value:e.valueTrans},on:{input:function(t){e.updateColor(t,"hsva")}}})],1):e._e()])])};Pu._withStripped=!0;const ku=ps({render:Pu,staticRenderFns:[]},(function(e){e&&e("data-v-733d7b14_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorSelectPanel.vue"},media:void 0})}),Ru,"data-v-733d7b14",false,undefined,!1,ms,void 0,void 0);function Iu(e){if(!zi(e))return!1;return Hi(e)>=0}function Ou(e){if(!e)return"invalid event";if(!e.cancelable)return"event is not cancelable";try{null!==navigator.userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)?e.cancelBubble=!0:e.stopPropagation(),e.preventDefault()}catch(e){}}var Bu={directives:{domripple:ns()},components:{WIcon:xs,WIconLoading:Sl,WTooltip:qc},props:{text:{type:String,default:""},tooltip:{type:String,default:""},icon:{type:String,default:""},iconColor:{type:String,default:"black"},iconColorHover:{type:String,default:"grey darken-3"},iconColorActive:{type:String,default:"white"},iconSize:{type:Number,default:22},prog:{type:Number,default:null},progColor:{type:String,default:"rgba(150,150,150,0.4)"},progBackgroundColor:{type:String,default:"rgba(150,150,150,0.075)"},textColor:{type:String,default:"black"},textColorHover:{type:String,default:"grey darken-3"},textColorActive:{type:String,default:"white"},textFontSize:{type:String,default:"0.85rem"},borderUsed:{type:Object,default:()=>({top:!0,bottom:!0,left:!0,right:!0})},borderWidth:{type:Object,default:()=>({top:1,bottom:1,left:1,right:1})},borderRadius:{type:Number,default:30},borderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorActive:{type:String,default:"transparent"},backgroundColor:{type:String,default:"rgb(241,241,241)"},backgroundColorHover:{type:String,default:"rgb(236,236,236)"},backgroundColorActive:{type:String,default:"orange"},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},shadow:{type:Boolean,default:!0},shadowStyle:{type:String,default:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},shadowActive:{type:Boolean,default:!0},shadowActiveStyle:{type:String,default:"0 12px 20px -10px {backgroundColorActiveAlpha=0.28}, 0 4px 20px 0 rgba(0,0,0,.12), 0 7px 8px -5px {backgroundColorActiveAlpha=0.2}"},rippleColor:{type:String,default:"rgba(255,255,255,0.4)"},paddingStyle:{type:Object,default:()=>({v:3,h:15})},shiftLeft:{type:Number,default:0},shiftRight:{type:Number,default:0},active:{type:Boolean,default:!1},close:{type:Boolean,default:!1},cursorPointer:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingColor:{type:String,default:"grey darken-2"},promiseUnlock:{type:Boolean,default:!1},role:{type:String,default:"button"},editable:{type:Boolean,default:!0},disabledColor:{type:String,default:"rgba(255,255,255,0.5)"}},data:function(){return{mdiCloseCircle:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z",activeTrans:!1,hoverTrans:!1,loadingTrans:!1,progTrans:null}},mounted:function(){},computed:{changeActive:function(){return this.activeTrans=this.active,""},changeProg:function(){return this.progTrans=this.prog,""},changeLoading:function(){return this.loadingTrans=this.loading,""},usePadding:function(){let e=this;return`padding:${ls(e.paddingStyle,{ext:{left:e.shiftLeft,right:e.shiftRight}})};`},effIconColor:function(){return Wo(this.iconColor)},effIconColorHover:function(){return Wo(this.iconColorHover)},effIconColorActive:function(){return Wo(this.iconColorActive)},hasIcon:function(){return""!==this.icon},hasText:function(){return""!==this.text},useIconColor:function(){let e,t=this;return t.loadingTrans||t.isProging?t.effIconColor:(e=t.activeTrans?t.effIconColorActive:t.hoverTrans?t.effIconColorHover:t.effIconColor,t.editable||(e=t.activeTrans?t.effIconColorActive:t.effIconColor),e)},effDisabledColor:function(){return Wo(this.disabledColor)},effProgColor:function(){return Wo(this.progColor)},effProgBackgroundColor:function(){return Wo(this.progBackgroundColor)},effTextColor:function(){return Wo(this.textColor)},effTextColorHover:function(){return Wo(this.textColorHover)},effTextColorActive:function(){return Wo(this.textColorActive)},useTextColor:function(){let e,t=this;return t.loadingTrans||t.isProging?t.effTextColor:(e=t.activeTrans?t.effTextColorActive:t.hoverTrans?t.effTextColorHover:t.effTextColor,t.editable||(e=t.activeTrans?t.effTextColorActive:t.effTextColor),e)},useTextFontSize:function(){let e=this.textFontSize;return e=jo(e,";",""),`font-size:${e};`},effBorderColor:function(){return Wo(this.borderColor)},effBorderColorHover:function(){return Wo(this.borderColorHover)},effBorderColorActive:function(){return Wo(this.borderColorActive)},useBorderColor:function(){let e,t=this;return(t.loadingTrans||t.isProging)&&(e=t.effBorderColor),e=t.activeTrans?t.effBorderColorActive:t.hoverTrans?t.effBorderColorHover:t.effBorderColor,t.editable||(e=t.activeTrans?t.effBorderColorActive:t.effBorderColor),Al(jn(t.useBorderUsed,((t,n)=>`border-${n}-color:${t?e:"transparent"};`))," ")},useBorderUsed:function(){let e=this,t=!0,n=!0,r=!0,i=!0;return os(me(e,"borderUsed.left"))&&(t=me(e,"borderUsed.left")),os(me(e,"borderUsed.right"))&&(n=me(e,"borderUsed.right")),os(me(e,"borderUsed.top"))&&(r=me(e,"borderUsed.top")),os(me(e,"borderUsed.bottom"))&&(i=me(e,"borderUsed.bottom")),{left:t,right:n,top:r,bottom:i}},useBorderWidth:function(){return`border-width:${ls(this.borderWidth)};`},useBorderRadius:function(){let e=this,t=0,n=0,r=0,i=0;return!0===me(e,"borderRadiusStyle.left")&&(t=e.borderRadius,r=e.borderRadius),!0===me(e,"borderRadiusStyle.right")&&(n=e.borderRadius,i=e.borderRadius),!0===me(e,"borderRadiusStyle.top")&&(t=e.borderRadius,n=e.borderRadius),!0===me(e,"borderRadiusStyle.bottom")&&(r=e.borderRadius,i=e.borderRadius),!0!==me(e,"borderRadiusStyle.topLeft")&&!0!==me(e,"borderRadiusStyle.top-left")||(t=e.borderRadius),!0!==me(e,"borderRadiusStyle.topRight")&&!0!==me(e,"borderRadiusStyle.top-right")||(n=e.borderRadius),!0!==me(e,"borderRadiusStyle.bottomLeft")&&!0!==me(e,"borderRadiusStyle.bottom-left")||(r=e.borderRadius),!0!==me(e,"borderRadiusStyle.bottomRight")&&!0!==me(e,"borderRadiusStyle.bottom-right")||(i=e.borderRadius),`border-top-left-radius:${t}px; border-top-right-radius:${n}px; border-bottom-left-radius:${r}px; border-bottom-right-radius:${i}px;`},effBackgroundColor:function(){return Wo(this.backgroundColor)},effBackgroundColorHover:function(){return Wo(this.backgroundColorHover)},effBackgroundColorActive:function(){return Wo(this.backgroundColorActive)},useBackgroundColor:function(){let e,t=this;return t.loadingTrans||t.isProging?t.effBackgroundColor:(e=t.activeTrans?t.effBackgroundColorActive:t.hoverTrans?t.effBackgroundColorHover:t.effBackgroundColor,t.editable||(e=t.activeTrans?t.effBackgroundColorActive:t.effBackgroundColor),e)},useShadow:function(){let e=this;function t(e,t,n){let r=Ct(e=jo(e,"}","{"),"{");return r=jn(r,(e=>{if(e.indexOf(t)>=0){let t=fa(e,"=")[1];return t=zi(t)?Hi(t):.2,function(e,t){let n=Wo(e),r=_l.toRgba(n);return r.a=t,_l.toRgbaString(r)}(n,t)}return e})),Al(r,"")}return e.activeTrans&&e.shadowActive?$n(e.shadowActiveStyle)?"box-shadow:"+t(e.shadowActiveStyle,"backgroundColorActiveAlpha",e.backgroundColorActive):"":e.shadow&&$n(e.shadowStyle)?"box-shadow:"+t(e.shadowStyle,"backgroundColorAlpha",e.backgroundColor):""},isProging:function(){return zi(this.useProg)},useProg:function(){let e=this.progTrans;return zi(e)?(e=Hi(e),e<0||e>100?null:e):null},effLoadingColor:function(){return Wo(this.loadingColor)},useRipple:function(){let e=this;if(e.editable&&!e.loadingTrans&&!e.isProging)return{color:e.rippleColor,timeDuration:700}},hasTooltop:function(){return $n(this.tooltip)}},methods:{clickBtn:function(e){let t=this;if(!t.editable)return;if(t.isProging)return;if(t.loadingTrans)return;let n={setProg:e=>{null===e||zi(e)?(zi(e)&&(e=Hi(e)),t.progTrans=e,t.$nextTick((()=>{t.$emit("update:prog",t.progTrans)})),e>=100&&t.$nextTick((()=>{t.progTrans=null,t.$emit("update:prog",t.progTrans)}))):console.log("prog is not number")},setLoading:e=>{os(e)?(t.loadingTrans=e,t.$nextTick((()=>{t.$emit("update:loading",t.loadingTrans)}))):console.log("loading is not boolean")}};if(t.promiseUnlock){t.loadingTrans=!0,t.$nextTick((()=>{t.$emit("update:loading",t.loadingTrans)}));let e=ea();n.pm=e,e.catch().finally((()=>{t.loadingTrans=!1,t.$nextTick((()=>{t.$emit("update:loading",t.loadingTrans)}))}))}t.$nextTick((()=>{t.$emit("click",n)}))},clickClose:function(e){let t=this;Ou(e),t.editable&&t.$nextTick((()=>{t.$emit("click-close")}))}}};const Du=Bu;var Uu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{display:"inline-block","vertical-align":"middle",outline:"none","user-select":"none"},attrs:{role:e.editable?e.role:"",changeActive:e.changeActive,changeProg:e.changeProg,changeLoading:e.changeLoading}},[n("div",{staticStyle:{position:"relative"}},[n("WTooltip",{attrs:{displayType:"line",isolated:!0,borderRadius:e.tooltipBorderRadius,paddingStyle:e.tooltipPaddingStyle,textFontSize:e.tooltipTextFontSize,textColor:e.tooltipTextColor,backgroundColor:e.tooltipBackgroundColor,editable:e.hasTooltop},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("div",{directives:[{name:"domripple",rawName:"v-domripple",value:e.useRipple,expression:"useRipple"}],style:"transition:all 0.3s; "+e.useBorderRadius+" background:"+e.useBackgroundColor+"; "+(e.editable&&e.cursorPointer?"cursor:pointer;":"")+" "+e.useShadow+"; outline:none; user-select:none; overflow:hidden;",attrs:{tabindex:"0"},on:{mouseenter:function(t){e.hoverTrans=!0,e.$emit("mouseenter",t)},mouseleave:function(t){e.hoverTrans=!1,e.$emit("mouseleave",t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickBtn(t)},click:function(t){return e.clickBtn(t)}}},[n("div",{style:"transition:all 0.3s; "+e.usePadding+" "+e.useBorderRadius+" "+e.useBorderWidth+" "+e.useBorderColor+" border-style:solid; outline:none; user-select:none;",attrs:{tabindex:"1"}},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("div",[e._t("default",(function(){return[n("div",{staticStyle:{display:"flex","align-items":"center","white-space":"nowrap"}},[e.hasIcon?n("WIcon",{style:"margin-left:-6px; margin-right:"+(e.hasText?5:-6)+"px;",attrs:{icon:e.icon,color:e.useIconColor,colorHover:e.useIconColor,size:e.iconSize}}):e._e(),e._v(" "),e.hasText?n("div",{style:"transition:all 0.3s; text-transform:none; color:"+e.useTextColor+"; "+e.useTextFontSize+" "+(e.hasIcon?"min-height:"+e.iconSize+"px":"")+"; display:flex; align-items:center;"},[e._v("\n "+e._s(e.text)+"\n ")]):e._e()],1)]}))],2),e._v(" "),e.close?n("div",{style:"margin:0px -9px 0px 5px; display:inline-block; outline:none; user-select:none;",attrs:{tabindex:"2"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickClose(t)},click:function(t){return e.clickClose(t)}}},[n("WIcon",{attrs:{icon:e.mdiCloseCircle,color:e.useIconColor,colorHover:e.useIconColor,size:e.iconSize}})],1):e._e()])])])]},proxy:!0},{key:"content",fn:function(){return[e._v("\n "+e._s(e.tooltip)+"\n ")]},proxy:!0}],null,!0)}),e._v(" "),e.isProging?n("div",{staticStyle:{position:"absolute",left:"0",right:"0",top:"0",bottom:"0"}},[n("div",{style:e.useBorderRadius+" overflow:hidden; width:100%; height:100%;"},[n("div",{style:"background:"+e.effProgBackgroundColor+"; height:100%;"},[n("div",{style:"background:"+e.effProgColor+"; width:"+e.useProg+"%; height:100%;"})])])]):e._e(),e._v(" "),!e.editable||e.loadingTrans?n("div",{staticStyle:{position:"absolute",left:"0",right:"0",top:"0",bottom:"0"}},[n("div",{style:e.useBorderRadius+" overflow:hidden; width:100%; height:100%;"},[n("div",{style:"background:"+e.effDisabledColor+"; height:100%;"})])]):e._e(),e._v(" "),!e.isProging&&e.loadingTrans?n("div",{staticStyle:{position:"absolute",left:"0",right:"0",top:"0",bottom:"0"}},[n("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",height:"100%"}},[n("WIconLoading",{attrs:{name:"cir-rotate",color:e.effLoadingColor,size:e.iconSize}})],1)]):e._e()],1)])};Uu._withStripped=!0;const Fu=ps({render:Uu,staticRenderFns:[]},(function(e){e&&e("data-v-03107f1d_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WButtonChip.vue"},media:void 0})}),Du,"data-v-03107f1d",false,undefined,!1,ms,void 0,void 0);const Nu={components:{WButtonChip:Fu},props:{multiCheck:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},value:{type:[Array,String,Object],default:null},keyText:{type:String,default:"text"},keyIcon:{type:String,default:"icon"},keyTooltip:{type:String,default:"tooltip"},iconColor:{type:String,default:"black"},iconColorHover:{type:String,default:"grey darken-3"},iconColorActive:{type:String,default:"white"},iconSize:{type:Number,default:22},textColor:{type:String,default:"black"},textColorHover:{type:String,default:"grey darken-3"},textColorActive:{type:String,default:"white"},textFontSize:{type:String,default:"0.85rem"},borderWidth:{type:Object,default:()=>({top:1,bottom:1,left:1,right:1})},borderRadius:{type:Number,default:30},borderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorActive:{type:String,default:"transparent"},backgroundColor:{type:String,default:"transparent"},backgroundColorHover:{type:String,default:"rgba(200,200,200,0.25)"},backgroundColorActive:{type:String,default:"orange"},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},marginStyle:{type:Object,default:()=>({top:10,bottom:10,left:0,right:10})},shadow:{type:Boolean,default:!1},shadowStyle:{type:String,default:"0 12px 20px -10px {backgroundColorAlpha=0.28}, 0 4px 20px 0 rgba(0,0,0,.12), 0 7px 8px -5px {backgroundColorAlpha=0.2}"},shadowActive:{type:Boolean,default:!0},shadowActiveStyle:{type:String,default:"0 12px 20px -10px {backgroundColorActiveAlpha=0.28}, 0 4px 20px 0 rgba(0,0,0,.12), 0 7px 8px -5px {backgroundColorActiveAlpha=0.2}"},paddingStyle:{type:Object,default:()=>({v:3,h:15})},shiftLeft:{type:Number,default:0},shiftRight:{type:Number,default:0},group:{type:Boolean,default:!1},groupBorderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},groupShift:{type:Number,default:5},close:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingColor:{type:String,default:"black"},editable:{type:Boolean,default:!0}},data:function(){return{get:me,itemsTrans:[],borderUsed:{top:!0,bottom:!0,left:!0,right:!0}}},mounted:function(){},computed:{changeItems:function(){let e=this;let t=Ai(e.items),n=jn(t,(t=>{let n=function(t){let n;return n=e.multiCheck?wl(e.value,t):pr(t,e.value),n}(t);return{active:n,hover:!1,borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorActive:e.borderColorActive}})),r=jn(t,((r,i)=>{let o={data:r},s=n[i];o.ia=s,o.active=s.active,o.hover=!1;let a=null;i>0&&(a=n[i-1]);let l=null;i<t.length-1&&(l=n[i+1]);let c={};e.group&&(0===i&&(!0===me(e,"groupBorderRadiusStyle.left")&&(c.left=!0),!0!==me(e,"groupBorderRadiusStyle.topLeft")&&!0!==me(e,"groupBorderRadiusStyle.top-left")||(c.topLeft=!0),!0!==me(e,"groupBorderRadiusStyle.bottomLeft")&&!0!==me(e,"groupBorderRadiusStyle.bottom-left")||(c.bottomLeft=!0),!0===me(e,"groupBorderRadiusStyle.top")&&(c.topLeft=!0),!0===me(e,"groupBorderRadiusStyle.bottom")&&(c.bottomLeft=!0)),i===t.length-1&&(!0===me(e,"groupBorderRadiusStyle.right")&&(c.right=!0),!0!==me(e,"groupBorderRadiusStyle.topRight")&&!0!==me(e,"groupBorderRadiusStyle.top-right")||(c.topRight=!0),!0!==me(e,"groupBorderRadiusStyle.bottomRight")&&!0!==me(e,"groupBorderRadiusStyle.bottom-right")||(c.bottomRight=!0),!0===me(e,"groupBorderRadiusStyle.top")&&(c.topRight=!0),!0===me(e,"groupBorderRadiusStyle.bottom")&&(c.bottomRight=!0))),o.spcBorderRadiusStyle=c;let u={};e.group&&(u={top:e.borderWidth.top,bottom:e.borderWidth.bottom,left:1,right:1},0===i&&(u.left=e.borderWidth.left),i===t.length-1&&(u.right=e.borderWidth.right)),o.spcBorderWidth=u;let d={};e.group&&(d=e.getSpcBorderUsed(i,!1,a,s,l)),o.spcBorderUsed=d,o.spcBorderUsedBackup=Ai(d);let h=0,p=0;return e.group&&(0===i?h=e.groupShift:i===t.length-1&&(p=e.groupShift)),o.spcShiftLeft=h,o.spcShiftRight=p,o}));return e.itemsTrans=r,""},useMarginStyle:function(){return`margin:${ls(this.marginStyle,{parse:!this.group})};`}},methods:{getSpcBorderUsed:function(e,t,n,r,i){let o={top:!0,bottom:!0,left:!0,right:!0};if(n){let e=null;e=n.hover?n.borderColorHover:n.borderColor,e=n.active?n.borderColorActive:e;let t=null;t=r.hover?r.borderColorHover:r.borderColor,t=r.active?r.borderColorActive:t;let i=!1;e===t&&(i=!0);let s=!1;n.active&&!r.active&&(s=!0);let a=!1;r.hover&&(a=!0);let l=!1;a||(l=s),l=l||i,o.left=!l}if(i){let e=!1;i.active&&!r.active&&(e=!0);let t=!1;r.hover&&(t=!0);let n=!1;t||(n=e),o.right=!n}return o},mouseenter:function(e,t){let n=this;nt(n.itemsTrans,((e,r)=>{n.itemsTrans[r].ia.hover=r===t})),nt(n.itemsTrans,((e,r)=>{let i=me(n,`itemsTrans[${r}].ia`,null),o=me(n,`itemsTrans[${r-1}].ia`,null),s=me(n,`itemsTrans[${r+1}].ia`,null),a=n.getSpcBorderUsed(r,r===t,o,i,s);n.itemsTrans[r].spcBorderUsed=a}))},mouseleave:function(e,t){let n=this;nt(n.itemsTrans,((e,t)=>{n.itemsTrans[t].spcBorderUsed=Ai(n.itemsTrans[t].spcBorderUsedBackup)}))},toggleState:function(e){let t=this;if(!1!==t.editable)if(t.multiCheck){let n=Ai(t.value);if(e.active){let t=[];nt(n,(n=>{pr(n,e.data)||t.push(n)})),n=t}else n.push(e.data);t.$nextTick((()=>{t.$emit("input",n),t.$emit("click",e.data,""+(e.active?"hide":"show"))}))}else t.$nextTick((()=>{t.$emit("input",e.data),t.$emit("click",e.data)}))}}};var zu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeItems:e.changeItems}},[e._l(e.itemsTrans,(function(t,r){return[n("WButtonChip",{key:r,style:""+e.useMarginStyle,attrs:{text:e.get(t,"data."+e.keyText)||e.get(t,"data"),tooltip:e.get(t,"data."+e.keyTooltip),icon:e.get(t,"data."+e.keyIcon),iconColor:e.iconColor,iconColorHover:e.iconColorHover,iconColorActive:e.iconColorActive,iconSize:e.iconSize,textColor:e.textColor,textColorHover:e.textColorHover,textColorActive:e.textColorActive,textFontSize:e.textFontSize,borderUsed:e.group?t.spcBorderUsed:e.borderUsed,borderWidth:e.group?t.spcBorderWidth:e.borderWidth,borderRadius:e.borderRadius,borderRadiusStyle:e.group?t.spcBorderRadiusStyle:e.borderRadiusStyle,borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorActive:e.borderColorActive,backgroundColor:e.backgroundColor,backgroundColorHover:e.backgroundColorHover,backgroundColorActive:e.backgroundColorActive,tooltipBorderRadius:e.tooltipBorderRadius,tooltipPaddingStyle:e.tooltipPaddingStyle,tooltipTextFontSize:e.tooltipTextFontSize,tooltipTextColor:e.tooltipTextColor,tooltipBackgroundColor:e.tooltipBackgroundColor,shadow:e.shadow,shadowStyle:e.shadowStyle,shadowActive:e.shadowActive,shadowActiveStyle:e.shadowActiveStyle,paddingStyle:e.paddingStyle,shiftLeft:e.shiftLeft+t.spcShiftLeft,shiftRight:e.shiftRight+t.spcShiftRight,_close:"close",loading:e.loading,loadingColor:e.loadingColor,editable:e.editable,disabledColor:"rgba(255,255,255,0.4)",active:t.active},on:{click:function(n){return e.toggleState(t)},mouseenter:function(n){return e.mouseenter(t,r)},mouseleave:function(n){return e.mouseleave(t,r)}}},[e._t("default",null,{item:t,kitem:r})],2)]}))],2)};zu._withStripped=!0;const Hu={components:{WGroupChipCheck:ps({render:zu,staticRenderFns:[]},(function(e){e&&e("data-v-433eeb06_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WGroupChipCheck.vue"},media:void 0})}),Nu,"data-v-433eeb06",false,undefined,!1,ms,void 0,void 0)},props:{items:{type:Array,default:()=>[]},value:{type:[String,Object],default:null},keyText:{type:String,default:"text"},keyIcon:{type:String,default:"icon"},keyTooltip:{type:String,default:"tooltip"},iconColor:{type:String,default:"black"},iconColorHover:{type:String,default:"grey darken-3"},iconColorActive:{type:String,default:"white"},iconSize:{type:Number,default:22},textColor:{type:String,default:"black"},textColorHover:{type:String,default:"grey darken-3"},textColorActive:{type:String,default:"white"},textFontSize:{type:String,default:"0.85rem"},borderWidth:{type:Object,default:()=>({top:1,bottom:1,left:1,right:1})},borderRadius:{type:Number,default:30},borderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorActive:{type:String,default:"transparent"},backgroundColor:{type:String,default:"transparent"},backgroundColorHover:{type:String,default:"rgba(200,200,200,0.25)"},backgroundColorActive:{type:String,default:"orange"},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},marginStyle:{type:Object,default:()=>({top:10,bottom:10,left:0,right:10})},shadow:{type:Boolean,default:!1},shadowStyle:{type:String,default:"0 12px 20px -10px {backgroundColorAlpha=0.28}, 0 4px 20px 0 rgba(0,0,0,.12), 0 7px 8px -5px {backgroundColorAlpha=0.2}"},shadowActive:{type:Boolean,default:!0},shadowActiveStyle:{type:String,default:"0 12px 20px -10px {backgroundColorActiveAlpha=0.28}, 0 4px 20px 0 rgba(0,0,0,.12), 0 7px 8px -5px {backgroundColorActiveAlpha=0.2}"},paddingStyle:{type:Object,default:()=>({v:3,h:15})},shiftLeft:{type:Number,default:0},shiftRight:{type:Number,default:0},group:{type:Boolean,default:!1},groupBorderRadiusStyle:{type:Object,default:()=>({left:!0,right:!0})},groupShift:{type:Number,default:5},close:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingColor:{type:String,default:"black"},editable:{type:Boolean,default:!0}},data:function(){return{}},mounted:function(){},computed:{},methods:{}};var Vu=function(){var e=this,t=e.$createElement;return(e._self._c||t)("WGroupChipCheck",e._g(e._b({scopedSlots:e._u([{key:"default",fn:function(t){return[e._t("default",null,{item:t.item,kitem:t.kitem})]}}],null,!0)},"WGroupChipCheck",Object.assign({},e.$props,{multiCheck:!1}),!1),e.$listeners))};Vu._withStripped=!0;const Wu=ps({render:Vu,staticRenderFns:[]},(function(e){e&&e("data-v-30b87bf9_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WGroupChipRadio.vue"},media:void 0})}),Hu,"data-v-30b87bf9",false,undefined,!1,ms,void 0,void 0);const ju={components:{},props:{label:{type:String,default:""},labelWidth:{type:Number,default:null},labelHeight:{type:Number,default:null},labelColor:{type:String,default:"#666"},labelFontSize:{type:String,default:"0.8rem"},labelHorizontalAlign:{type:String,default:"left"},labelVerticalAlign:{type:String,default:"center"},labelShiftTop:{type:Number,default:0},space:{type:Number,default:0},seplines:{type:Boolean,default:!1},floatForItemSub:{type:Boolean,default:!0}},data:function(){return{}},computed:{useLabelWidth:function(){let e=this;if(zi(e.labelWidth)){return{width:`${Hi(e.labelWidth)}px`}}return{}},useLabelHeight:function(){let e=this;if(zi(e.labelHeight)){return{height:`${Hi(e.labelHeight)}px`}}return{}},useLabelVerticalAlign:function(){let e=this,t="middle";return"top"!==e.labelVerticalAlign&&"bottom"!==e.labelVerticalAlign||(t=e.labelVerticalAlign),t},useLabelColor:function(){return Wo(this.labelColor)}},methods:{}};var Gu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{},[e.seplines?[e._t("label",(function(){return[n("div",{style:[e.useLabelWidth,e.useLabelHeight,{color:e.useLabelColor,fontSize:e.labelFontSize,textAlign:e.labelHorizontalAlign,paddingTop:e.labelShiftTop+"px",paddingBottom:e.space+"px"}]},[e._v("\n "+e._s(e.label)+"\n ")])]})),e._v(" "),n("div",{},[e._t("item"),e._v(" "),n("div",{staticStyle:{position:"relative"}},[n("div",{style:e.floatForItemSub?"position:absolute; top:0; left:0;":""},[e._t("item-sub")],2)])],2)]:[n("table",{staticStyle:{width:"100%","border-collapse":"collapse"}},[n("tr",[n("td",{style:[{verticalAlign:e.useLabelVerticalAlign,whiteSpace:"nowrap",color:e.useLabelColor,fontSize:e.labelFontSize,textAlign:e.labelHorizontalAlign}]},[e._t("label",(function(){return[n("div",{style:[e.useLabelWidth,e.useLabelHeight,{paddingTop:e.labelShiftTop+"px"}]},[e._v("\n "+e._s(e.label)+":\n ")])]}))],2),e._v(" "),n("td",{style:[{paddingRight:e.space+8+"px"}]}),e._v(" "),n("td",{style:[{width:"100%"}]},[e._t("item"),e._v(" "),e.floatForItemSub?n("div",{staticStyle:{position:"relative"}},[n("div",{staticStyle:{position:"absolute",top:"0",left:"0"}},[e._t("item-sub")],2)]):e._e()],2)]),e._v(" "),e.floatForItemSub?e._e():n("tr",[n("td"),e._v(" "),n("td"),e._v(" "),n("td",[e._t("item-sub")],2)])])]],2)};Gu._withStripped=!0;const $u=ps({render:Gu,staticRenderFns:[]},(function(e){e&&e("data-v-f3a740cc_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WPanelLabelItem.vue"},media:void 0})}),ju,"data-v-f3a740cc",false,undefined,!1,ms,void 0,void 0);const Xu={components:{WIcon:xs,WTooltip:qc},props:{paddingStyle:{type:Object,default:()=>({v:0,h:15})},backgroundColor:{type:String,default:"transparent"},backgroundColorHover:{type:String,default:"transparent"},backgroundColorFocus:{type:String,default:"transparent"},borderWidth:{type:Number,default:1},borderRadius:{type:Number,default:30},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorFocus:{type:String,default:"transparent"},shadow:{type:Boolean,default:!0},leftIcon:{type:String,default:""},leftIconSize:{type:Number,default:24},leftIconColor:{type:String,default:"deep-orange lighten-2"},leftIconColorHover:{type:String,default:"deep-orange lighten-1"},leftIconColorFocus:{type:String,default:"deep-orange lighten-1"},leftIconTooltip:{type:String,default:""},rightIcon:{type:String,default:""},rightIconSize:{type:Number,default:24},rightIconColor:{type:String,default:"deep-orange lighten-2"},rightIconColorHover:{type:String,default:"deep-orange lighten-2"},rightIconColorFocus:{type:String,default:"deep-orange lighten-1"},rightIconTooltip:{type:String,default:""},iconShiftOuter:{type:Number,default:-10},iconShiftInner:{type:Number,default:5},tooltipBorderRadius:{type:Number,default:4},tooltipPaddingStyle:{type:Object,default:()=>({v:5,h:8})},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"rgba(60,60,60,0.75)"},verticalAlign:{type:String,default:"center"},editable:{type:Boolean,default:!0},hovered:{type:Boolean,default:!1},focused:{type:Boolean,default:!1}},data:function(){return{hoveredTrans:!1,focusedTrans:!1}},computed:{changeParam:function(){let e=this;return e.hoveredTrans=e.hovered,e.focusedTrans=e.focused,""},useBackgroundColor:function(){let e=this,t={};return e.focusedTrans?(t["background-color"]=Wo(e.backgroundColorFocus),t):e.hoveredTrans?(t["background-color"]=Wo(e.backgroundColorHover),t):(t["background-color"]=Wo(e.backgroundColor),t)},useBorder:function(){let e=this,t={};return e.focusedTrans?(t.border=`${e.borderWidth}px solid ${Wo(e.borderColorFocus)}`,t):e.hoveredTrans?(t.border=`${e.borderWidth}px solid ${Wo(e.borderColorHover)}`,t):(t.border=`${e.borderWidth}px solid ${Wo(e.borderColor)}`,t)},useShadow:function(){let e={};return this.shadow&&(e["box-shadow"]="0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12)"),e},useLeftIconColor:function(){let e=this;return e.hoveredTrans?Wo(e.leftIconColorHover):e.focusedTrans?Wo(e.leftIconColorFocus):Wo(e.leftIconColor)},useRightIconColor:function(){let e=this;return e.hoveredTrans?Wo(e.rightIconColorHover):e.focusedTrans?Wo(e.rightIconColorFocus):Wo(e.rightIconColor)},useTitleColor:function(){let e={};return e.color=Wo(this.titleColor),e},usePadding:function(){return{padding:ls(this.paddingStyle,{semicolon:!1})}},hasLeftIconTooltop:function(){return $n(this.leftIconTooltip)},hasRightIconTooltop:function(){return $n(this.rightIconTooltip)},useVerticalAlign:function(){let e=this,t={};return"center"===e.verticalAlign?t["align-items"]="center":"top"===e.verticalAlign?t["align-items"]="flex-start":"bottom"===e.verticalAlign&&(t["align-items"]="flex-end"),t}},methods:{clickIcon:function(e){let t=this;!1!==t.editable&&t.$nextTick((()=>{t.$emit("click-"+e)}))},mouseenter:function(){let e=this;e.hoveredTrans=!0,e.$nextTick((()=>{e.$emit("update:hovered",!0)}))},mouseleave:function(){let e=this;e.hoveredTrans=!1,e.$nextTick((()=>{e.$emit("update:hovered",!1)}))}}};var Yu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeParam:e.changeParam}},[n("div",{style:[{transition:"all 0.3s",display:"flex","justify-content":"flex-start","border-radius":e.borderRadius+"px",opacity:e.editable?1:.6},e.usePadding,e.useBackgroundColor,e.useBorder,e.useShadow,e.useVerticalAlign],on:{mouseenter:e.mouseenter,mouseleave:e.mouseleave}},[e.leftIcon?n("div",{style:"margin-left:"+e.iconShiftOuter+"px; margin-right:"+e.iconShiftInner+"px; user-select:none; cursor:pointer; outline:none;",attrs:{tabindex:"0"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickIcon("left")},click:function(t){return e.clickIcon("left")}}},[n("WTooltip",{attrs:{displayType:"line",isolated:!0,borderRadius:e.tooltipBorderRadius,paddingStyle:e.tooltipPaddingStyle,textFontSize:e.tooltipTextFontSize,textColor:e.tooltipTextColor,backgroundColor:e.tooltipBackgroundColor,editable:e.hasLeftIconTooltop},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("div",{attrs:{ShellEllipse:"leftIcon"}},[n("WIcon",{attrs:{icon:e.leftIcon,size:e.leftIconSize,color:e.useLeftIconColor,colorHover:e.useLeftIconColor}})],1)]},proxy:!0},{key:"content",fn:function(){return[e._v("\n "+e._s(e.leftIconTooltip)+"\n ")]},proxy:!0}],null,!1,3849071383)})],1):e._e(),e._v(" "),n("div",{style:[{width:"100%"}]},[e._t("default")],2),e._v(" "),e.rightIcon?n("div",{style:"margin-right:"+e.iconShiftOuter+"px; margin-left:"+e.iconShiftInner+"px; user-select:none; cursor:pointer; outline:none;",attrs:{tabindex:"0"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickIcon("right")},click:function(t){return e.clickIcon("right")}}},[n("WTooltip",{attrs:{displayType:"line",isolated:!0,borderRadius:e.tooltipBorderRadius,paddingStyle:e.tooltipPaddingStyle,textFontSize:e.tooltipTextFontSize,textColor:e.tooltipTextColor,backgroundColor:e.tooltipBackgroundColor,editable:e.hasRightIconTooltop},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("div",{attrs:{ShellEllipse:"rightIcon"}},[n("WIcon",{attrs:{icon:e.rightIcon,size:e.rightIconSize,color:e.useRightIconColor,colorHover:e.useRightIconColor}})],1)]},proxy:!0},{key:"content",fn:function(){return[e._v("\n "+e._s(e.rightIconTooltip)+"\n ")]},proxy:!0}],null,!1,1563142679)})],1):e._e()])])};Yu._withStripped=!0;const qu=ps({render:Yu,staticRenderFns:[]},(function(e){e&&e("data-v-4c752dd2_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WShellEllipse.vue"},media:void 0})}),Xu,"data-v-4c752dd2",false,undefined,!1,ms,void 0,void 0);const Zu={components:{},props:{borderColor:{type:String,default:"grey lighten-1"},borderColorHover:{type:String,default:"grey"},borderColorFocus:{type:String,default:"blue darken-2"},borderWidth:{type:Number,default:1},borderWidthHover:{type:Number,default:1},borderWidthFocus:{type:Number,default:2},focused:{type:Boolean,default:!1}},data:function(){return{focusedTrans:!1,hoverTrans:!1}},computed:{changeParam:function(){return this.focusedTrans=this.focused,""},useBorderWidth:function(){let e=this;return e.hoverTrans?e.borderWidthHover:e.borderWidth},useBorderColor:function(){let e=this;return e.hoverTrans?Wo(e.borderColorHover):Wo(e.borderColor)},useBorderColorFocus:function(){return Wo(this.borderColorFocus)}},methods:{}};var Ju=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeParam:e.changeParam}},[n("div",{staticStyle:{position:"relative"},on:{mouseenter:function(t){e.hoverTrans=!0},mouseleave:function(t){e.hoverTrans=!1}}},[e._t("default"),e._v(" "),n("div",{style:"position:absolute; left:0px; right:0px; bottom:0px; z-index:1; border-bottom:"+e.useBorderWidth+"px solid "+e.useBorderColor+";"}),e._v(" "),n("transition",{attrs:{name:"fade"}},[e.focused?n("div",{style:"position:absolute; left:0px; right:0px; bottom:0px; z-index:2; border-bottom:"+e.borderWidthFocus+"px solid "+e.useBorderColorFocus+";"}):e._e()])],2)])};Ju._withStripped=!0;const Ku=ps({render:Ju,staticRenderFns:[]},(function(e){e&&e("data-v-cea78b16_0",{source:"\n.fade-enter-active[data-v-cea78b16], .fade-leave-active[data-v-cea78b16] {\r\n transition: all 0.3s;\n}\n.fade-enter[data-v-cea78b16], .fade-leave-to[data-v-cea78b16] {\r\n transform: scaleX(0);\n}\n.fade-enter-to[data-v-cea78b16], .fade-leave[data-v-cea78b16] {\r\n transform: scaleX(100%);\n}\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\node_modules\\w-component-vue\\src\\components\\WShellBottomLine.vue"],names:[],mappings:";AAiIA;IACA,oBAAA;AACA;AACA;IACA,oBAAA;AACA;AACA;IACA,uBAAA;AACA",file:"WShellBottomLine.vue",sourcesContent:["<template>\r\n <div :changeParam=\"changeParam\">\r\n\r\n <div\r\n style=\"position:relative;\"\r\n @mouseenter=\"hoverTrans=true\"\r\n @mouseleave=\"hoverTrans=false\"\r\n >\r\n\r\n <slot></slot>\r\n\r\n <div\r\n :style=\"`position:absolute; left:0px; right:0px; bottom:0px; z-index:1; border-bottom:${useBorderWidth}px solid ${useBorderColor};`\"\r\n ></div>\r\n\r\n <transition name=\"fade\">\r\n <div\r\n :style=\"`position:absolute; left:0px; right:0px; bottom:0px; z-index:2; border-bottom:${borderWidthFocus}px solid ${useBorderColorFocus};`\"\r\n v-if=\"focused\"\r\n ></div>\r\n </transition>\r\n\r\n </div>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport convertColor from '../js/convertColor.mjs'\r\n\r\n\r\n/**\r\n * @vue-prop {Number} [borderWidth=1] 輸入線寬度數字,單位為px,預設1\r\n * @vue-prop {String} [borderColor='grey lighten-1'] 輸入線顏色字串,預設'grey lighten-1'\r\n * @vue-prop {String} [borderColorHover='grey'] 輸入滑鼠移入時線顏色字串,預設'grey'\r\n * @vue-prop {String} [borderColorFocus='blue darken-2'] 輸入取得焦點時線顏色字串,預設'blue darken-2'\r\n * @vue-prop {Number} [borderWidthHover=1] 輸入滑鼠移入時線寬度數字,單位為px,預設1\r\n * @vue-prop {Number} [borderWidthFocus=2] 輸入取得焦點時線寬度數字,單位為px,預設2\r\n * @vue-prop {Boolean} [focused=false] 輸入是否為取得焦點狀態,預設false\r\n */\r\nexport default {\r\n components: {\r\n },\r\n props: {\r\n borderColor: {\r\n type: String,\r\n default: 'grey lighten-1',\r\n },\r\n borderColorHover: {\r\n type: String,\r\n default: 'grey',\r\n },\r\n borderColorFocus: {\r\n type: String,\r\n default: 'blue darken-2',\r\n },\r\n borderWidth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n borderWidthHover: {\r\n type: Number,\r\n default: 1,\r\n },\r\n borderWidthFocus: {\r\n type: Number,\r\n default: 2,\r\n },\r\n focused: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n data: function() {\r\n return {\r\n focusedTrans: false,\r\n hoverTrans: false,\r\n }\r\n },\r\n computed: {\r\n\r\n changeParam: function () {\r\n //console.log('computed changeParam')\r\n\r\n let vo = this\r\n\r\n //focusedTrans\r\n vo.focusedTrans = vo.focused\r\n\r\n return ''\r\n },\r\n\r\n useBorderWidth: function() {\r\n //console.log('computed useBorderWidth')\r\n\r\n let vo = this\r\n\r\n if (vo.hoverTrans) {\r\n return vo.borderWidthHover\r\n }\r\n return vo.borderWidth\r\n },\r\n\r\n useBorderColor: function() {\r\n //console.log('computed useBorderColor')\r\n\r\n let vo = this\r\n\r\n if (vo.hoverTrans) {\r\n return convertColor(vo.borderColorHover)\r\n }\r\n return convertColor(vo.borderColor)\r\n },\r\n\r\n useBorderColorFocus: function() {\r\n //console.log('computed useBorderColorFocus')\r\n\r\n let vo = this\r\n\r\n return convertColor(vo.borderColorFocus)\r\n },\r\n\r\n },\r\n methods: {\r\n },\r\n}\r\n<\/script>\r\n\r\n<style scoped>\r\n.fade-enter-active, .fade-leave-active {\r\n transition: all 0.3s;\r\n}\r\n.fade-enter, .fade-leave-to {\r\n transform: scaleX(0);\r\n}\r\n.fade-enter-to, .fade-leave {\r\n transform: scaleX(100%);\r\n}\r\n</style>\r\n"]},media:void 0})}),Zu,"data-v-cea78b16",false,undefined,!1,ms,void 0,void 0);function Qu(e,t){let n=!1,r="";if("isstr"===t)Gn(e)||(n=!0,r="需要為字串",e="");else if("isnum"===t)zi(e)||(n=!0,r="需要為數字",e=0);else if("isp0num"===t)Iu(e)||(n=!0,r="需要為含0的正浮點數",e=0);else if("isn0num"===t)zi(i=e)&&Hi(i)<=0||(n=!0,r="需要為含0的負浮點數",e=0);else if("isint"===t)Vi(e)||(n=!0,r="需要為整數",e=0);else if("ispint"===t)Yi(e)||(n=!0,r="需要為不含0正整數",e=0);else if("isp0int"===t)oa(e)||(n=!0,r="需要為含0正整數",e=0);else if("isnint"===t)(function(e){return!!Vi(e)&&Xi(e)<0})(e)||(n=!0,r="需要為不含0負整數",e=0);else if("isn0int"===t)(function(e){return!!Vi(e)&&Xi(e)<=0})(e)||(n=!0,r="需要為含0負整數",e=0);else if(Qi(t)){e=t(e)}else"any"===t?zi(e)||Gn(e)||(n=!0,r="需要為字串或數字",e=""):(n=!0,r="需要指定驗證類型",e=null);var i;return{value:e,err:n,errmsg:r}}const ed={props:{type:{type:[String,Function],default:"any"},value:{type:[String,Number],default:""},textFontSize:{type:String,default:"1rem"},textColor:{type:String,default:"black"},textAlign:{type:String,default:"left"},placeholder:{type:String,default:""},height:{type:[Number,String],default:""},editable:{type:Boolean,default:!0},focused:{type:Boolean,default:!1}},data:function(){return{valueTrans:"",errmsg:""}},mounted:function(){},computed:{changeValue:function(){return this.valueTrans=this.value,""},useHeight:function(){let e=this,t="";return zi(e.height)?t=`height:${e.height}px;`:$n(e.height)&&(t=`height:${e.height}; line-height:${e.height};`),t},useTextFontSize:function(){let e=this.textFontSize;return e=jo(e,";",""),`font-size:${e};`},useTextColor:function(){return Wo(this.textColor)}},methods:{setValue:function(e){this.valueTrans=e},setFocus:function(){this.$refs.inp.focus()},updateFocused:function(e){let t=this;t.focused!==e&&t.$nextTick((()=>{t.$emit("update:focused",e)}))},updateValue:function(e){let t=this,n=Qu(t.valueTrans,t.type);t.valueTrans=n.value,t.errmsg=n.errmsg},trigger:function(e,t){let n=this;n.$nextTick((()=>{n.$emit(e,n.valueTrans,n.errmsg,t)}))}}};var td=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeValue:e.changeValue}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.valueTrans,expression:"valueTrans"}],ref:"inp",style:"transition:all 0.3s; display:block; outline:none; width:100%; box-sizing:border-box; border-style:none; background:transparent; color:"+e.useTextColor+"; "+e.useHeight+" text-align:"+e.textAlign+"; "+e.useTextFontSize+" opacity:"+(""!==e.valueTrans||e.focused?1:.6)+";",attrs:{type:"text",readonly:!e.editable,placeholder:e.placeholder},domProps:{value:e.valueTrans},on:{input:[function(t){t.target.composing||(e.valueTrans=t.target.value)},function(t){e.updateValue(t),e.trigger("input",t),e.updateFocused(!0)}],change:function(t){e.trigger("change",t)},focus:function(t){return e.updateFocused(!0)},blur:function(t){e.trigger("blur",t),e.updateFocused(!1)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){e.trigger("enter",t)}.apply(null,arguments)},select:function(t){e.trigger("select",t)}}})])};td._withStripped=!0;const nd={components:{WShellEllipse:qu,WShellBottomLine:Ku,WTextCore:ps({render:td,staticRenderFns:[]},(function(e){e&&e("data-v-5b18e29a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WTextCore.vue"},media:void 0})}),ed,"data-v-5b18e29a",false,undefined,!1,ms,void 0,void 0)},props:{paddingStyle:{type:Object,default:()=>({v:0,h:0})},borderRadius:{type:Number,default:30},shadow:{type:Boolean,default:!1},type:{type:[String,Function],default:"any"},value:{type:[String,Number]},textFontSize:{type:String,default:"1rem"},textColor:{type:String,default:"black"},textAlign:{type:String,default:"left"},leftIcon:{type:String,default:""},leftIconSize:{type:Number,default:24},leftIconColor:{type:String,default:"blue"},leftIconColorHover:{type:String,default:"blue darken-1"},leftIconColorFocus:{type:String,default:"blue darken-1"},leftIconTooltip:{type:String,default:""},rightIcon:{type:String,default:""},rightIconSize:{type:Number,default:24},rightIconColor:{type:String,default:"blue"},rightIconColorHover:{type:String,default:"blue darken-1"},rightIconColorFocus:{type:String,default:"blue darken-1"},rightIconTooltip:{type:String,default:""},iconShiftOuter:{type:Number,default:0},iconShiftInner:{type:Number,default:5},backgroundColor:{type:String,default:"transparent"},backgroundColorHover:{type:String,default:"transparent"},backgroundColorFocus:{type:String,default:"transparent"},borderColor:{type:String,default:"transparent"},borderColorHover:{type:String,default:"transparent"},borderColorFocus:{type:String,default:"transparent"},bottomLineBorderColor:{type:String,default:"grey lighten-1"},bottomLineBorderColorHover:{type:String,default:"grey"},bottomLineBorderColorFocus:{type:String,default:"blue darken-1"},bottomLineBorderWidth:{type:Number,default:1},bottomLineBorderWidthHover:{type:Number,default:1},bottomLineBorderWidthFocus:{type:Number,default:2},placeholder:{type:String,default:""},height:{type:Number,default:28},editable:{type:Boolean,default:!0},focused:{type:Boolean,default:!1}},data:function(){return{focusedTrans:!1}},mounted:function(){},computed:{changeFocused:function(){return this.focusedTrans=this.focused,""}},methods:{modifyFocused:function(e){let t=this;t.focusedTrans=e,t.$nextTick((()=>{t.$emit("update:focused",e)}))}}};var rd=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeFocused:e.changeFocused}},[n("WShellBottomLine",{attrs:{borderColor:e.bottomLineBorderColor,borderColorHover:e.bottomLineBorderColorHover,borderColorFocus:e.bottomLineBorderColorFocus,borderWidth:e.bottomLineBorderWidth,borderWidthHover:e.bottomLineBorderWidthHover,borderWidthFocus:e.bottomLineBorderWidthFocus,focused:e.focusedTrans}},[n("WShellEllipse",{attrs:{paddingStyle:e.paddingStyle,borderRadius:e.borderRadius,shadow:e.shadow,leftIcon:e.leftIcon,leftIconSize:e.leftIconSize,leftIconColor:e.leftIconColor,leftIconColorHover:e.leftIconColorHover,leftIconColorFocus:e.leftIconColorFocus,leftIconTooltip:e.leftIconTooltip,rightIcon:e.rightIcon,rightIconSize:e.rightIconSize,rightIconColor:e.rightIconColor,rightIconColorHover:e.rightIconColorHover,rightIconColorFocus:e.rightIconColorFocus,rightIconTooltip:e.rightIconTooltip,iconShiftOuter:e.iconShiftOuter,iconShiftInner:e.iconShiftInner,backgroundColor:e.backgroundColor,backgroundColorHover:e.backgroundColorHover,backgroundColorFocus:e.backgroundColorFocus,borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorFocus:e.borderColorFocus,editable:e.editable,focused:e.focusedTrans},on:{"click-left":function(t){return e.$emit("click-left")},"click-right":function(t){return e.$emit("click-right")}}},[n("WTextCore",{attrs:{type:e.type,textFontSize:e.textFontSize,textColor:e.textColor,textAlign:e.textAlign,placeholder:e.placeholder,height:e.height,editable:e.editable,value:e.value,focused:e.focusedTrans},on:{"update:focused":e.modifyFocused,select:function(t,n,r){e.$emit("select",t,n,r)},blur:function(t,n,r){e.$emit("blur",t,n,r)},enter:function(t,n,r){e.$emit("enter",t,n,r)},input:function(t,n,r){e.$emit("input",t,n,r)},change:function(t,n,r){e.$emit("change",t,n,r)}}})],1)],1)],1)};rd._withStripped=!0;const id=ps({render:rd,staticRenderFns:[]},(function(e){e&&e("data-v-399c9556_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WText.vue"},media:void 0})}),nd,"data-v-399c9556",false,undefined,!1,ms,void 0,void 0);
|
|
7
|
+
/*!
|
|
8
|
+
* decimal.js v10.4.3
|
|
9
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
10
|
+
* https://github.com/MikeMcl/decimal.js
|
|
11
|
+
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
12
|
+
* MIT Licence
|
|
13
|
+
*/
|
|
14
|
+
var od,sd,ad=9e15,ld=1e9,cd="0123456789abcdef",ud="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",dd="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hd={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ad,maxE:ad,crypto:!1},pd=!0,fd="[DecimalError] ",md=fd+"Invalid argument: ",gd=fd+"Precision limit exceeded",vd=fd+"crypto unavailable",yd="[object Decimal]",_d=Math.floor,xd=Math.pow,bd=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Sd=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,wd=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Cd=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ad=1e7,Md=7,Td=ud.length-1,Ed=dd.length-1,Ld={toStringTag:yd};function Rd(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)r=e[t]+"",(n=Md-r.length)&&(o+=Hd(n)),o+=r;s=e[t],(n=Md-(r=s+"").length)&&(o+=Hd(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function Pd(e,t,n){if(e!==~~e||e<t||e>n)throw Error(md+e)}function kd(e,t,n,r){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=Md,i=0):(i=Math.ceil((t+1)/Md),t%=Md),o=xd(10,Md-t),a=e[i]%o|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[i+1]/o/100|0)==xd(10,t-2)-1||(a==o/2||0==a)&&0==(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==xd(10,t-3)-1,s}function Id(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=cd.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Ld.absoluteValue=Ld.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Bd(e)},Ld.ceil=function(){return Bd(new this.constructor(this),this.e+1,2)},Ld.clampedTo=Ld.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(md+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},Ld.comparedTo=Ld.cmp=function(e){var t,n,r,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,c=e.s;if(!s||!a)return l&&c?l!==c?l:s===a?0:!s^l<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?l:a[0]?-c:0;if(l!==c)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(t=0,n=(r=s.length)<(i=a.length)?r:i;t<n;++t)if(s[t]!==a[t])return s[t]>a[t]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1},Ld.cosine=Ld.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+Md,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/Jd(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=Zd(e,1,t.times(i),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(r,Kd(r,n)),r.precision=e,r.rounding=t,Bd(2==sd||3==sd?n.neg():n,e,t,!0)):new r(1):new r(NaN)},Ld.cubeRoot=Ld.cbrt=function(){var e,t,n,r,i,o,s,a,l,c,u=this,d=u.constructor;if(!u.isFinite()||u.isZero())return new d(u);for(pd=!1,(o=u.s*xd(u.s*u,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=Rd(u.d),(o=((e=u.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=xd(n,1/3),e=_d((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),s=(e=d.precision)+3;;)if(c=(l=(a=r).times(a).times(a)).plus(u),r=Od(c.plus(u).times(a),c.plus(l),s+2,1),Rd(a.d).slice(0,s)===(n=Rd(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Bd(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!i&&(Bd(a,e+1,0),a.times(a).times(a).eq(u))){r=a;break}s+=4,i=1}return pd=!0,Bd(r,e,d.rounding,t)},Ld.decimalPlaces=Ld.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-_d(this.e/Md))*Md,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},Ld.dividedBy=Ld.div=function(e){return Od(this,new this.constructor(e))},Ld.dividedToIntegerBy=Ld.divToInt=function(e){var t=this.constructor;return Bd(Od(this,new t(e),0,1,1),t.precision,t.rounding)},Ld.equals=Ld.eq=function(e){return 0===this.cmp(e)},Ld.floor=function(){return Bd(new this.constructor(this),this.e+1,3)},Ld.greaterThan=Ld.gt=function(e){return this.cmp(e)>0},Ld.greaterThanOrEqualTo=Ld.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Ld.hyperbolicCosine=Ld.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/Jd(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Zd(s,1,o.times(t),new s(1),!0);for(var l,c=e,u=new s(8);c--;)l=o.times(o),o=a.minus(l.times(u.minus(l.times(u))));return Bd(o,s.precision=n,s.rounding=r,!0)},Ld.hyperbolicSine=Ld.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Zd(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=Zd(o,2,i=i.times(1/Jd(5,e)),i,!0);for(var s,a=new o(5),l=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(c))))}return o.precision=t,o.rounding=n,Bd(i,t,n,!0)},Ld.hyperbolicTangent=Ld.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,Od(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},Ld.inverseCosine=Ld.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?Nd(n,i,o):new n(0):new n(NaN):t.isZero()?Nd(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=Nd(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},Ld.inverseHyperbolicCosine=Ld.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,pd=!1,n=n.times(n).minus(1).sqrt().plus(n),pd=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},Ld.inverseHyperbolicSine=Ld.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,pd=!1,n=n.times(n).plus(1).sqrt().plus(n),pd=!0,r.precision=e,r.rounding=t,n.ln())},Ld.inverseHyperbolicTangent=Ld.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?Bd(new o(i),e,t,!0):(o.precision=n=r-i.e,i=Od(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},Ld.inverseSine=Ld.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=Nd(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Ld.inverseTangent=Ld.atan=function(){var e,t,n,r,i,o,s,a,l,c=this,u=c.constructor,d=u.precision,h=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);if(c.abs().eq(1)&&d+4<=Ed)return(s=Nd(u,d+4,h).times(.25)).s=c.s,s}else{if(!c.s)return new u(NaN);if(d+4<=Ed)return(s=Nd(u,d+4,h).times(.5)).s=c.s,s}for(u.precision=a=d+10,u.rounding=1,e=n=Math.min(28,a/Md+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(pd=!1,t=Math.ceil(a/Md),r=1,l=c.times(c),s=new u(c),i=c;-1!==e;)if(i=i.times(l),o=s.minus(i.div(r+=2)),i=i.times(l),void 0!==(s=o.plus(i.div(r+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),pd=!0,Bd(s,u.precision=d,u.rounding=h,!0)},Ld.isFinite=function(){return!!this.d},Ld.isInteger=Ld.isInt=function(){return!!this.d&&_d(this.e/Md)>this.d.length-2},Ld.isNaN=function(){return!this.s},Ld.isNegative=Ld.isNeg=function(){return this.s<0},Ld.isPositive=Ld.isPos=function(){return this.s>0},Ld.isZero=function(){return!!this.d&&0===this.d[0]},Ld.lessThan=Ld.lt=function(e){return this.cmp(e)<0},Ld.lessThanOrEqualTo=Ld.lte=function(e){return this.cmp(e)<1},Ld.logarithm=Ld.log=function(e){var t,n,r,i,o,s,a,l,c=this,u=c.constructor,d=u.precision,h=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new u(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(pd=!1,s=$d(c,a=d+5),r=t?Fd(u,a+10):$d(e,a),kd((l=Od(s,r,a,1)).d,i=d,h))do{if(s=$d(c,a+=10),r=t?Fd(u,a+10):$d(e,a),l=Od(s,r,a,1),!o){+Rd(l.d).slice(i+1,i+15)+1==1e14&&(l=Bd(l,d+1,0));break}}while(kd(l.d,i+=10,h));return pd=!0,Bd(l,d,h)},Ld.minus=Ld.sub=function(e){var t,n,r,i,o,s,a,l,c,u,d,h,p=this,f=p.constructor;if(e=new f(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new f(e.d||p.s!==e.s?p:NaN):e=new f(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,h=e.d,a=f.precision,l=f.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!c[0])return new f(3===l?-0:0);e=new f(p)}return pd?Bd(e,a,l):e}if(n=_d(e.e/Md),u=_d(p.e/Md),c=c.slice(),o=u-n){for((d=o<0)?(t=c,o=-o,s=h.length):(t=h,n=u,s=c.length),o>(r=Math.max(Math.ceil(a/Md),s)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=c.length)<(s=h.length))&&(s=r),r=0;r<s;r++)if(c[r]!=h[r]){d=c[r]<h[r];break}o=0}for(d&&(t=c,c=h,h=t,e.s=-e.s),s=c.length,r=h.length-s;r>0;--r)c[s++]=0;for(r=h.length;r>o;){if(c[--r]<h[r]){for(i=r;i&&0===c[--i];)c[i]=Ad-1;--c[i],c[r]+=Ad}c[r]-=h[r]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=Ud(c,n),pd?Bd(e,a,l):e):new f(3===l?-0:0)},Ld.modulo=Ld.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?Bd(new r(n),r.precision,r.rounding):(pd=!1,9==r.modulo?(t=Od(n,e.abs(),0,3,1)).s*=e.s:t=Od(n,e,0,r.modulo,1),t=t.times(e),pd=!0,n.minus(t))},Ld.naturalExponential=Ld.exp=function(){return Gd(this)},Ld.naturalLogarithm=Ld.ln=function(){return $d(this)},Ld.negated=Ld.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Bd(e)},Ld.plus=Ld.add=function(e){var t,n,r,i,o,s,a,l,c,u,d=this,h=d.constructor;if(e=new h(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new h(e.d||d.s===e.s?d:NaN)):e=new h(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(c=d.d,u=e.d,a=h.precision,l=h.rounding,!c[0]||!u[0])return u[0]||(e=new h(d)),pd?Bd(e,a,l):e;if(o=_d(d.e/Md),r=_d(e.e/Md),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,s=u.length):(n=u,r=o,s=c.length),i>(s=(o=Math.ceil(a/Md))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=c.length)-(i=u.length)<0&&(i=s,n=u,u=c,c=n),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/Ad|0,c[i]%=Ad;for(t&&(c.unshift(t),++r),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=Ud(c,r),pd?Bd(e,a,l):e},Ld.precision=Ld.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(md+e);return n.d?(t=zd(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},Ld.round=function(){var e=this,t=e.constructor;return Bd(new t(e),e.e+1,t.rounding)},Ld.sine=Ld.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+Md,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Zd(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/Jd(5,n)),t=Zd(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(r,Kd(r,n)),r.precision=e,r.rounding=t,Bd(sd>2?n.neg():n,e,t,!0)):new r(NaN)},Ld.squareRoot=Ld.sqrt=function(){var e,t,n,r,i,o,s=this,a=s.d,l=s.e,c=s.s,u=s.constructor;if(1!==c||!a||!a[0])return new u(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);for(pd=!1,0==(c=Math.sqrt(+s))||c==1/0?(((t=Rd(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(t),l=_d((l+1)/2)-(l<0||l%2),r=new u(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new u(c.toString()),n=(l=u.precision)+3;;)if(r=(o=r).plus(Od(s,o,n+2,1)).times(.5),Rd(o.d).slice(0,n)===(t=Rd(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Bd(r,l+1,1),e=!r.times(r).eq(s));break}if(!i&&(Bd(o,l+1,0),o.times(o).eq(s))){r=o;break}n+=4,i=1}return pd=!0,Bd(r,l,u.rounding,e)},Ld.tangent=Ld.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=Od(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,Bd(2==sd||4==sd?n.neg():n,e,t,!0)):new r(NaN)},Ld.times=Ld.mul=function(e){var t,n,r,i,o,s,a,l,c,u=this,d=u.constructor,h=u.d,p=(e=new d(e)).d;if(e.s*=u.s,!(h&&h[0]&&p&&p[0]))return new d(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:h&&p?0*e.s:e.s/0);for(n=_d(u.e/Md)+_d(e.e/Md),(l=h.length)<(c=p.length)&&(o=h,h=p,p=o,s=l,l=c,c=s),o=[],r=s=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)a=o[i]+p[r]*h[i-r-1]+t,o[i--]=a%Ad|0,t=a/Ad|0;o[i]=(o[i]+t)%Ad|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=Ud(o,n),pd?Bd(e,d.precision,d.rounding):e},Ld.toBinary=function(e,t){return Qd(this,2,e,t)},Ld.toDecimalPlaces=Ld.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(Pd(e,0,ld),void 0===t?t=r.rounding:Pd(t,0,8),Bd(n,e+n.e+1,t))},Ld.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Dd(r,!0):(Pd(e,0,ld),void 0===t?t=i.rounding:Pd(t,0,8),n=Dd(r=Bd(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Ld.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=Dd(i):(Pd(e,0,ld),void 0===t?t=o.rounding:Pd(t,0,8),n=Dd(r=Bd(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Ld.toFraction=function(e){var t,n,r,i,o,s,a,l,c,u,d,h,p=this,f=p.d,m=p.constructor;if(!f)return new m(p);if(c=n=new m(1),r=l=new m(0),s=(o=(t=new m(r)).e=zd(f)-p.e-1)%Md,t.d[0]=xd(10,s<0?Md+s:s),null==e)e=o>0?t:c;else{if(!(a=new m(e)).isInt()||a.lt(c))throw Error(md+a);e=a.gt(t)?o>0?t:c:a}for(pd=!1,a=new m(Rd(f)),u=m.precision,m.precision=o=f.length*Md*2;d=Od(a,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(d.times(i)),l=i,i=t,t=a.minus(d.times(i)),a=i;return i=Od(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=p.s,h=Od(c,r,o,1).minus(p).abs().cmp(Od(l,n,o,1).minus(p).abs())<1?[c,r]:[l,n],m.precision=u,pd=!0,h},Ld.toHexadecimal=Ld.toHex=function(e,t){return Qd(this,16,e,t)},Ld.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:Pd(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(pd=!1,n=Od(n,e,0,t,1).times(e),pd=!0,Bd(n)):(e.s=n.s,n=e),n},Ld.toNumber=function(){return+this},Ld.toOctal=function(e,t){return Qd(this,8,e,t)},Ld.toPower=Ld.pow=function(e){var t,n,r,i,o,s,a=this,l=a.constructor,c=+(e=new l(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new l(xd(+a,c));if((a=new l(a)).eq(1))return a;if(r=l.precision,o=l.rounding,e.eq(1))return Bd(a,r,o);if((t=_d(e.e/Md))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Vd(l,a,n,r),e.s<0?new l(1).div(i):Bd(i,r,o);if((s=a.s)<0){if(t<e.d.length-1)return new l(NaN);if(0==(1&e.d[t])&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(n=xd(+a,c))&&isFinite(n)?new l(n+"").e:_d(c*(Math.log("0."+Rd(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(pd=!1,l.rounding=a.s=1,n=Math.min(12,(t+"").length),(i=Gd(e.times($d(a,r+n)),r)).d&&kd((i=Bd(i,r+5,1)).d,r,o)&&(t=r+10,+Rd((i=Bd(Gd(e.times($d(a,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Bd(i,r+1,0))),i.s=s,pd=!0,l.rounding=o,Bd(i,r,o))},Ld.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Dd(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Pd(e,1,ld),void 0===t?t=i.rounding:Pd(t,0,8),n=Dd(r=Bd(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},Ld.toSignificantDigits=Ld.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(Pd(e,1,ld),void 0===t?t=n.rounding:Pd(t,0,8)),Bd(new n(this),e,t)},Ld.toString=function(){var e=this,t=e.constructor,n=Dd(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},Ld.truncated=Ld.trunc=function(){return Bd(new this.constructor(this),this.e+1,1)},Ld.valueOf=Ld.toJSON=function(){var e=this,t=e.constructor,n=Dd(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var Od=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s,a,l){var c,u,d,h,p,f,m,g,v,y,_,x,b,S,w,C,A,M,T,E,L=r.constructor,R=r.s==i.s?1:-1,P=r.d,k=i.d;if(!(P&&P[0]&&k&&k[0]))return new L(r.s&&i.s&&(P?!k||P[0]!=k[0]:k)?P&&0==P[0]||!k?0*R:R/0:NaN);for(l?(p=1,u=r.e-i.e):(l=Ad,p=Md,u=_d(r.e/p)-_d(i.e/p)),T=k.length,A=P.length,y=(v=new L(R)).d=[],d=0;k[d]==(P[d]||0);d++);if(k[d]>(P[d]||0)&&u--,null==o?(S=o=L.precision,s=L.rounding):S=a?o+(r.e-i.e)+1:o,S<0)y.push(1),f=!0;else{if(S=S/p+2|0,d=0,1==T){for(h=0,k=k[0],S++;(d<A||h)&&S--;d++)w=h*l+(P[d]||0),y[d]=w/k|0,h=w%k|0;f=h||d<A}else{for((h=l/(k[0]+1)|0)>1&&(k=e(k,h,l),P=e(P,h,l),T=k.length,A=P.length),C=T,x=(_=P.slice(0,T)).length;x<T;)_[x++]=0;(E=k.slice()).unshift(0),M=k[0],k[1]>=l/2&&++M;do{h=0,(c=t(k,_,T,x))<0?(b=_[0],T!=x&&(b=b*l+(_[1]||0)),(h=b/M|0)>1?(h>=l&&(h=l-1),1==(c=t(m=e(k,h,l),_,g=m.length,x=_.length))&&(h--,n(m,T<g?E:k,g,l))):(0==h&&(c=h=1),m=k.slice()),(g=m.length)<x&&m.unshift(0),n(_,m,x,l),-1==c&&(c=t(k,_,T,x=_.length))<1&&(h++,n(_,T<x?E:k,x,l)),x=_.length):0===c&&(h++,_=[0]),y[d++]=h,c&&_[0]?_[x++]=P[C]||0:(_=[P[C]],x=1)}while((C++<A||void 0!==_[0])&&S--);f=void 0!==_[0]}y[0]||y.shift()}if(1==p)v.e=u,od=f;else{for(d=1,h=y[0];h>=10;h/=10)d++;v.e=d+u*p-1,Bd(v,a?o+v.e+1:o,s,f)}return v}}();function Bd(e,t,n,r){var i,o,s,a,l,c,u,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,a=d[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=Md,s=t,l=(u=d[h=0])/xd(10,i-s-1)%10|0;else if((h=Math.ceil((o+1)/Md))>=(a=d.length)){if(!r)break e;for(;a++<=h;)d.push(0);u=l=0,i=1,s=(o%=Md)-Md+1}else{for(u=a=d[h],i=1;a>=10;a/=10)i++;l=(s=(o%=Md)-Md+i)<0?0:u/xd(10,i-s-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(s<0?u:u%xd(10,i-s-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?s>0?u/xd(10,i-s):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=xd(10,(Md-t%Md)%Md),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,a=1,h--):(d.length=h+1,a=xd(10,Md-o),d[h]=s>0?(u/xd(10,i-s)%xd(10,s)|0)*a:0),c)for(;;){if(0==h){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,d[0]==Ad&&(d[0]=1));break}if(d[h]+=a,d[h]!=Ad)break;d[h--]=0,a=1}for(o=d.length;0===d[--o];)d.pop()}return pd&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function Dd(e,t,n){if(!e.isFinite())return Xd(e);var r,i=e.e,o=Rd(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+Hd(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Hd(-i-1)+o,n&&(r=n-s)>0&&(o+=Hd(r))):i>=s?(o+=Hd(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+Hd(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=Hd(r))),o}function Ud(e,t){var n=e[0];for(t*=Md;n>=10;n/=10)t++;return t}function Fd(e,t,n){if(t>Td)throw pd=!0,n&&(e.precision=n),Error(gd);return Bd(new e(ud),t,1,!0)}function Nd(e,t,n){if(t>Ed)throw Error(gd);return Bd(new e(dd),t,n,!0)}function zd(e){var t=e.length-1,n=t*Md+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Hd(e){for(var t="";e--;)t+="0";return t}function Vd(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/Md+4);for(pd=!1;;){if(n%2&&eh((o=o.times(t)).d,s)&&(i=!0),0===(n=_d(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}eh((t=t.times(t)).d,s)}return pd=!0,o}function Wd(e){return 1&e.d[e.d.length-1]}function jd(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function Gd(e,t){var n,r,i,o,s,a,l,c=0,u=0,d=0,h=e.constructor,p=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(pd=!1,l=f):l=t,a=new h(.03125);e.e>-2;)e=e.times(a),d+=5;for(l+=r=Math.log(xd(2,d))/Math.LN10*2+5|0,n=o=s=new h(1),h.precision=l;;){if(o=Bd(o.times(e),l,1),n=n.times(++u),Rd((a=s.plus(Od(o,n,l,1))).d).slice(0,l)===Rd(s.d).slice(0,l)){for(i=d;i--;)s=Bd(s.times(s),l,1);if(null!=t)return h.precision=f,s;if(!(c<3&&kd(s.d,l-r,p,c)))return Bd(s,h.precision=f,p,pd=!0);h.precision=l+=10,n=o=a=new h(1),u=0,c++}s=a}}function $d(e,t){var n,r,i,o,s,a,l,c,u,d,h,p=1,f=e,m=f.d,g=f.constructor,v=g.rounding,y=g.precision;if(f.s<0||!m||!m[0]||!f.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=f.s?NaN:m?0:f);if(null==t?(pd=!1,u=y):u=t,g.precision=u+=10,r=(n=Rd(m)).charAt(0),!(Math.abs(o=f.e)<15e14))return c=Fd(g,u+2,y).times(o+""),f=$d(new g(r+"."+n.slice(1)),u-10).plus(c),g.precision=y,null==t?Bd(f,y,v,pd=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Rd((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new g("0."+n),o++):f=new g(r+"."+n.slice(1)),d=f,l=s=f=Od(f.minus(1),f.plus(1),u,1),h=Bd(f.times(f),u,1),i=3;;){if(s=Bd(s.times(h),u,1),Rd((c=l.plus(Od(s,new g(i),u,1))).d).slice(0,u)===Rd(l.d).slice(0,u)){if(l=l.times(2),0!==o&&(l=l.plus(Fd(g,u+2,y).times(o+""))),l=Od(l,new g(p),u,1),null!=t)return g.precision=y,l;if(!kd(l.d,u-10,v,a))return Bd(l,g.precision=y,v,pd=!0);g.precision=u+=10,c=s=f=Od(d.minus(1),d.plus(1),u,1),h=Bd(f.times(f),u,1),i=a=1}l=c,i+=2}}function Xd(e){return String(e.s*e.s/0)}function Yd(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%Md,n<0&&(r+=Md),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Md;r<i;)e.d.push(+t.slice(r,r+=Md));t=t.slice(r),r=Md-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),pd&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function qd(e,t){var n,r,i,o,s,a,l,c,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Cd.test(t))return Yd(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Sd.test(t))n=16,t=t.toLowerCase();else if(bd.test(t))n=2;else{if(!wd.test(t))throw Error(md+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(a=(t=t.replace(".","")).length)-o,i=Vd(r,new r(n),o,2*o)),o=u=(c=Id(t,n,Ad)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=Ud(c,u),e.d=c,pd=!1,s&&(e=Od(e,i,4*a)),l&&(e=e.times(Math.abs(l)<54?xd(2,l):Hh.pow(2,l))),pd=!0,e)}function Zd(e,t,n,r,i){var o,s,a,l,c=e.precision,u=Math.ceil(c/Md);for(pd=!1,l=n.times(n),a=new e(r);;){if(s=Od(a.times(l),new e(t++*t++),c,1),a=i?r.plus(s):r.minus(s),r=Od(s.times(l),new e(t++*t++),c,1),void 0!==(s=a.plus(r)).d[u]){for(o=u;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=r,r=s,s=o}return pd=!0,s.d.length=u+1,s}function Jd(e,t){for(var n=e;--t;)n*=e;return n}function Kd(e,t){var n,r=t.s<0,i=Nd(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return sd=r?4:1,t;if((n=t.divToInt(i)).isZero())sd=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return sd=Wd(n)?r?2:3:r?4:1,t;sd=Wd(n)?r?1:4:r?3:2}return t.minus(i).abs()}function Qd(e,t,n,r){var i,o,s,a,l,c,u,d,h,p=e.constructor,f=void 0!==n;if(f?(Pd(n,1,ld),void 0===r?r=p.rounding:Pd(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(s=(u=Dd(e)).indexOf("."))>=0&&(u=u.replace(".",""),(h=new p(1)).e=u.length-s,h.d=Id(Dd(h),10,i),h.e=h.d.length),o=l=(d=Id(u,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(s<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=Od(e,h,n,r,0,i)).d,o=e.e,c=od),s=d[n],a=i/2,c=c||void 0!==d[n+1],c=r<4?(void 0!==s||c)&&(0===r||r===(e.s<0?3:2)):s>a||s===a&&(4===r||c||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,c)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,u="";s<l;s++)u+=cd.charAt(d[s]);if(f){if(l>1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)u+="0";for(l=(d=Id(u,i,t)).length;!d[l-1];--l);for(s=1,u="1.";s<l;s++)u+=cd.charAt(d[s])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>l)for(o-=l;o--;)u+="0";else o<l&&(u=u.slice(0,o)+"."+u.slice(o))}else u=f?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=Xd(e);return e.s<0?"-"+u:u}function eh(e,t){if(e.length>t)return e.length=t,!0}function th(e){return new this(e).abs()}function nh(e){return new this(e).acos()}function rh(e){return new this(e).acosh()}function ih(e,t){return new this(e).plus(t)}function oh(e){return new this(e).asin()}function sh(e){return new this(e).asinh()}function ah(e){return new this(e).atan()}function lh(e){return new this(e).atanh()}function ch(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?Nd(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=Nd(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(Od(e,t,o,1)),t=Nd(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Od(e,t,o,1)):(n=Nd(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function uh(e){return new this(e).cbrt()}function dh(e){return Bd(e=new this(e),e.e+1,2)}function hh(e,t,n){return new this(e).clamp(t,n)}function ph(e){if(!e||"object"!=typeof e)throw Error(fd+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,ld,"rounding",0,8,"toExpNeg",-ad,0,"toExpPos",0,ad,"maxE",0,ad,"minE",-ad,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=hd[n]),void 0!==(r=e[n])){if(!(_d(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(md+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=hd[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(md+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(vd);this[n]=!0}else this[n]=!1}return this}function fh(e){return new this(e).cos()}function mh(e){return new this(e).cosh()}function gh(e,t){return new this(e).div(t)}function vh(e){return new this(e).exp()}function yh(e){return Bd(e=new this(e),e.e+1,3)}function _h(){var e,t,n=new this(0);for(pd=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return pd=!0,new this(1/0);n=t}return pd=!0,n.sqrt()}function xh(e){return e instanceof Hh||e&&e.toStringTag===yd||!1}function bh(e){return new this(e).ln()}function Sh(e,t){return new this(e).log(t)}function wh(e){return new this(e).log(2)}function Ch(e){return new this(e).log(10)}function Ah(){return jd(this,arguments,"lt")}function Mh(){return jd(this,arguments,"gt")}function Th(e,t){return new this(e).mod(t)}function Eh(e,t){return new this(e).mul(t)}function Lh(e,t){return new this(e).pow(t)}function Rh(e){var t,n,r,i,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:Pd(e,1,ld),r=Math.ceil(e/Md),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(vd);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=r/4}else for(;o<r;)a[o++]=1e7*Math.random()|0;for(r=a[--o],e%=Md,r&&e&&(i=xd(10,Md-e),a[o]=(r/i|0)*i);0===a[o];o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=Md)a.shift();for(r=1,i=a[0];i>=10;i/=10)r++;r<Md&&(n-=Md-r)}return s.e=n,s.d=a,s}function Ph(e){return Bd(e=new this(e),e.e+1,this.rounding)}function kh(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ih(e){return new this(e).sin()}function Oh(e){return new this(e).sinh()}function Bh(e){return new this(e).sqrt()}function Dh(e,t){return new this(e).sub(t)}function Uh(){var e=0,t=arguments,n=new this(t[e]);for(pd=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return pd=!0,Bd(n,this.precision,this.rounding)}function Fh(e){return new this(e).tan()}function Nh(e){return new this(e).tanh()}function zh(e){return Bd(e=new this(e),e.e+1,1)}Ld[Symbol.for("nodejs.util.inspect.custom")]=Ld.toString,Ld[Symbol.toStringTag]="Decimal";var Hh=Ld.constructor=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,xh(e))return i.s=e.s,void(pd?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(pd?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):Yd(i,e.toString())}if("string"!==r)throw Error(md+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),Cd.test(e)?Yd(i,e):qd(i,e)}if(o.prototype=Ld,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=ph,o.clone=e,o.isDecimal=xh,o.abs=th,o.acos=nh,o.acosh=rh,o.add=ih,o.asin=oh,o.asinh=sh,o.atan=ah,o.atanh=lh,o.atan2=ch,o.cbrt=uh,o.ceil=dh,o.clamp=hh,o.cos=fh,o.cosh=mh,o.div=gh,o.exp=vh,o.floor=yh,o.hypot=_h,o.ln=bh,o.log=Sh,o.log10=Ch,o.log2=wh,o.max=Ah,o.min=Mh,o.mod=Th,o.mul=Eh,o.pow=Lh,o.random=Rh,o.round=Ph,o.sign=kh,o.sin=Ih,o.sinh=Oh,o.sqrt=Bh,o.sub=Dh,o.sum=Uh,o.tan=Fh,o.tanh=Nh,o.trunc=zh,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(hd);ud=new Hh(ud),dd=new Hh(dd);var Vh={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=yc(n.placement),l=xc(a),c=[tc,ec].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return Sc("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:wc(e,rc))}(i.padding,n),d=Gl(o),h="y"===l?Kl:tc,p="y"===l?Ql:ec,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=Jl(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,_=u[h],x=v-d[c]-u[p],b=v/2-d[c]/2+y,S=jc(_,b,x),w=l;n.modifiersData[r]=((t={})[w]=S,t.centerOffset=S-b,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&fc(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},Wh={directives:{domresize:oo()},components:{},props:{value:{type:Number,default:0},valueMin:{type:Number,default:0},valueMax:{type:Number,default:100},valueStep:{type:Number,default:1},valueDecimal:{type:Number,default:0},progBorderRadius:{type:Number,default:5},progHeight:{type:Number,default:4},progColor:{type:String,default:"#74a4d9"},progColorDisabled:{type:String,default:"#c5c5c5"},progBackgroundColor:{type:String,default:"#eee"},progBackgroundColorDisabled:{type:String,default:"#f2f2f2"},sliderSize:{type:Number,default:20},sliderBackgroundColor:{type:String,default:"blue darken-3"},sliderBackgroundColorHover:{type:String,default:"blue darken-2"},sliderBackgroundColorDisabled:{type:String,default:"#aaa"},cmpZIndex:{type:Number,default:3e3},tooltipPlacementDist:{type:Number,default:5},tooltipBorderRadius:{type:Number,default:4},tooltipTextFontSize:{type:String,default:"0.85rem"},tooltipTextColor:{type:String,default:"white"},tooltipBackgroundColor:{type:String,default:"#666"},editable:{type:Boolean,default:!0}},data:function(){return{panelWidth:0,panelHeight:0,das:null,hoverTrans:!1,dragTrans:!1,popperInstance:null,popperShow:!1,r:null,rt:null}},mounted:function(){let e=this,t=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=null,o=null,s=null,a=null,l=null,c=null,u=null,d=null,h=null,p=null,f=null,m=null,g=null,v=null,y=!1,_=me(n,"getHeighRatio",null);A(_)||(_=()=>1);let x=me(n,"getWidthRatio",null);A(x)||(x=()=>1);let b=me(n,"stopScrollPropagationForPanel",null);is(b)||(b=!1);let S=me(n,"stopTouchDragPropagationForPanel",null);is(S)||(S=!1);let w=me(n,"useTouchDragForPanel",null);is(w)||(w=!0);let C=e,M=t,T=Ki();return r=e=>{let t=e.deltaY/Math.abs(e.deltaY),n=e.deltaX/Math.abs(e.deltaX);T.emit("scrollPanel",{ratioY:t,ratioX:n}),b&&Ou(e)},C.addEventListener("wheel",r),i=e=>{if(w){let t=me(e,"touches.0.clientY",0),n=me(e,"touches.0.clientX",0),r=-t*_(),i=-n*x();y=!0,T.emit("pressBar",{clientY:r,clientX:i}),S&&Ou(e)}},C.addEventListener("touchstart",i),o=e=>{if(w&&y){let t=me(e,"touches.0.clientY",0),n=me(e,"touches.0.clientX",0),r=-t*_(),i=-n*x();T.emit("dragBar",{clientY:r,clientX:i}),S&&Ou(e)}},C.addEventListener("touchmove",o,{passive:!1}),s=e=>{w&&y&&(y=!1,T.emit("freeBar"),S&&Ou(e))},C.addEventListener("touchend",s),a=e=>{y=!0,T.emit("pressBar",{clientY:e.clientY,clientX:e.clientX})},M.addEventListener("mousedown",a),l=e=>{y&&(y=!1,T.emit("freeBar"))},M.addEventListener("mouseup",l),c=e=>{y=!0,T.emit("pressBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX})},M.addEventListener("touchstart",c),u=e=>{y&&(T.emit("dragBar",{clientY:e.touches[0].clientY,clientX:e.touches[0].clientX}),Ou(e))},M.addEventListener("touchmove",u,{passive:!1}),d=e=>{y&&(y=!1,T.emit("freeBar"))},M.addEventListener("touchend",d),h=e=>{y&&T.emit("dragBar",{clientY:e.clientY,clientX:e.clientX})},window.addEventListener("mousemove",h),p=e=>{y&&(y=!1,T.emit("freeBar"),b&&Ou(e))},window.addEventListener("mouseup",p),f=e=>{},window.addEventListener("scroll",f,{passive:!1}),m=e=>{},window.addEventListener("wheel",m,{passive:!1}),g=e=>{},document.addEventListener("scroll",g,{passive:!1}),v=e=>{},document.addEventListener("wheel",v,{passive:!1}),T.clear=function(){C.removeEventListener("wheel",r),C.removeEventListener("touchstart",i),C.removeEventListener("touchmove",o),C.removeEventListener("touchend",s),M.removeEventListener("mousedown",a),M.removeEventListener("mouseup",l),M.removeEventListener("touchstart",c),M.removeEventListener("touchmove",u),M.removeEventListener("touchend",d),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",p),window.removeEventListener("scroll",f),window.removeEventListener("wheel",m),document.removeEventListener("scroll",g),document.removeEventListener("wheel",v)},T}(e.$refs.divPanel,e.$refs.divBar,{useTouchDragForPanel:!1});t.on("dragBar",e.dragBar),t.on("pressBar",e.pressBar),t.on("freeBar",e.freeBar),e.das=t},beforeDestroy:function(){let e=this;e.das&&e.das.clear()},computed:{changeParam:function(){let e=this,t=0;try{t=(e.value-e.valueMin)/(e.valueMax-e.valueMin)}catch(e){}t=e.limitRatio(t);let n=e.tickRatio(t);return e.r=t,e.rt=n,""},heightCir:function(){return this.sliderSize},widthCir:function(){return this.heightCir},effecting:function(){let e=this;if(!e.editable)return;let t=e.hoverTrans||e.dragTrans;return t?e.showPopper():(e.hidePopper(),e.r=e.rt),t},progWidth:function(){return this.panelWidth-this.sliderSize},useProgBorderRadius:function(){return`border-radius:${this.progBorderRadius}px;`},effProgColor:function(){return Wo(this.progColor)},effProgColorDisabled:function(){return Wo(this.progColorDisabled)},useProgColor:function(){let e=this;return e.editable?e.effProgColor:e.effProgColorDisabled},effProgBackgroundColor:function(){return Wo(this.progBackgroundColor)},effProgBackgroundColorDisabled:function(){return Wo(this.progBackgroundColorDisabled)},useProgBackgroundColor:function(){let e=this;return e.editable?e.effProgBackgroundColor:e.effProgBackgroundColorDisabled},effSliderBackgroundColor:function(){return Wo(this.sliderBackgroundColor)},effSliderBackgroundColorHover:function(){return Wo(this.sliderBackgroundColorHover)},effSliderBackgroundColorDisabled:function(){return Wo(this.sliderBackgroundColorDisabled)},useSliderBackgroundColor:function(){let e=this;return e.editable?e.effecting?e.effSliderBackgroundColorHover:e.effSliderBackgroundColor:e.effSliderBackgroundColorDisabled},useTooltipBorderRadius:function(){let e=this;return as(e.tooltipBorderRadius)?`border-radius:${e.tooltipBorderRadius}px;`:""},useTooltipTextFontSize:function(){let e=this.tooltipTextFontSize;return e=jo(e,";",""),`font-size:${e};`},useTooltipTextColor:function(){return Wo(this.tooltipTextColor)},useTooltipBackgroundColor:function(){return Wo(this.tooltipBackgroundColor)},valueDig:function(){let e=this,t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return zi(e)&&oa(t)?(e=Hi(e),$i(e,t).toFixed(t)):""}(e.rt*(e.valueMax-e.valueMin)+e.valueMin,e.valueDecimal);return t}},methods:{resizePanel:function(e){this.panelWidth=e.snew.offsetWidth,this.panelHeight=e.snew.offsetHeight},limitRatio:function(e){return e=Math.min(e,1),e=Math.max(e,0)},tickRatio:function(e){let t=this,n=0;try{let r=t.valueMax-t.valueMin,i=t.valueStep/r,o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};oa(t)||(t=0),t=Xi(t);let r=me(n,"rounding","");if("ROUND_HALF_UP"!==r&&"ROUND_HALF_EVEN"!==r&&(r="ROUND_HALF_UP"),!zi(e))return"";e=Hi(e);let i=Hh.clone();return i.set({rounding:Hh[r]}),new i(e).toDecimalPlaces(t).toNumber()}(e/i);n=o*i}catch(e){}return n},dragBar:function(e){let t=this;if(!t.editable)return;let n=t.$el.getBoundingClientRect(),r=e.clientX-t.sliderSize/2,i=t.progWidth,o=0;i>0&&(o=(r-n.left)/i),o=t.limitRatio(o);let s=t.tickRatio(o);t.r=o,t.rt=s;let a=Hi(t.valueDig);t.updatePopper(),t.$emit("input",a)},pressBar:function(){this.dragTrans=!0},freeBar:function(){this.dragTrans=!1},showPopper:function(e){let t=this;if(!t.editable)return;let n=me(t,"$refs.divTrigger",null);if(null===n)return;let r=me(t,"$refs.divContent",null);if(null===r)return;let i={strategy:"fixed",placement:"top",modifiers:[Vh,{name:"arrow",options:{padding:5}},Nc,{name:"flip",options:{fallbackPlacements:["top","top-start","top-end","bottom","bottom-start","bottom-end"]}},zc,{name:"offset",options:{offset:({placement:e,reference:n,popper:r})=>[0,t.tooltipPlacementDist]}},Wc]};t.popperInstance=Ic(n,r,i)},updatePopper:function(e){let t=this;t.editable&&t.popperInstance&&t.popperInstance.update()},hidePopper:function(e){let t=this;t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)}}};const jh=Wh;var Gh=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],style:"user-select:none;",attrs:{changeParam:e.changeParam},on:{domresize:e.resizePanel}},[n("div",{style:"position:relative; width:100%; height:"+e.sliderSize+"px;"},[n("div",{style:"position:absolute; top:"+(e.sliderSize/2-e.progHeight/2)+"px; left:"+e.sliderSize/2+"px; width:"+e.progWidth+"px;"},[n("div",{ref:"divPanel",style:"position:relative; width:"+e.progWidth+"px;",attrs:{_click:"clickProg"}},[n("div",{style:e.useProgBorderRadius+" overflow:hidden; width:"+e.progWidth+"px; height:"+e.progHeight+"px;"},[n("div",{style:"background:"+e.useProgBackgroundColor+"; height:"+e.progHeight+"px;"},[n("div",{style:"background:"+e.useProgColor+"; width:"+e.rt*e.progWidth+"px; height:"+e.progHeight+"px;"})])]),e._v(" "),n("div",{style:"position:absolute; left:"+(e.rt*e.progWidth-e.widthCir/2)+"px; top:"+(e.progHeight/2-e.heightCir/2)+"px; z-index:1; "+(e.editable?"cursor:pointer;":"")},[n("div",{ref:"divTrigger",staticClass:"ts bs",style:"width:"+e.widthCir+"px; height:"+e.heightCir+"px; border-radius:50%; background:"+e.useSliderBackgroundColor+"; outline:none;"})]),e._v(" "),n("div",{ref:"divBar",style:"position:absolute; left:"+(e.r*e.progWidth-e.widthCir/2)+"px; top:"+(e.progHeight/2-e.heightCir/2)+"px; z-index:2; "+(e.editable?"cursor:pointer;":"")},[n("div",{style:"width:"+e.widthCir+"px; height:"+e.heightCir+"px; border-radius:50%; opacity:0; outline:none;",on:{mouseenter:function(t){e.hoverTrans=!0},mouseleave:function(t){e.hoverTrans=!1}}})])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.effecting,expression:"effecting"},{name:"domresize",rawName:"v-domresize"}],ref:"divContent",staticClass:"WPopup-Content",style:"z-index:"+e.cmpZIndex+";",on:{domresize:e.updatePopper}},[n("div",{style:"padding:2px 5px; font-size:0.8rem; "+e.useTooltipTextFontSize+" color:"+e.useTooltipTextColor+"; background:"+e.useTooltipBackgroundColor+"; "+e.useTooltipBorderRadius},[e._v("\n "+e._s(e.valueDig)+"\n "),n("div",{staticClass:"arrow",attrs:{"data-popper-arrow":""}})])])])};Gh._withStripped=!0;const $h={components:{WGroupChipRadio:Wu,WPanelLabelItem:$u,WText:id,WSlider:ps({render:Gh,staticRenderFns:[]},(function(e){e&&e("data-v-eb456a54_0",{source:"\n.ts[data-v-eb456a54] {\r\n transition:all 0.3s;\n}\n.bs[data-v-eb456a54] {\r\n box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);\n}\n.WPopup-Content[data-popper-reference-hidden][data-v-eb456a54] {\r\n visibility: hidden;\r\n pointer-events: none;\n}\n.arrow[data-v-eb456a54],\r\n.arrow[data-v-eb456a54]::before {\r\n position: absolute;\r\n width: 5px;\r\n height: 5px;\r\n background: inherit;\n}\n.arrow[data-v-eb456a54] {\r\n visibility: hidden;\n}\n.arrow[data-v-eb456a54]::before {\r\n visibility: visible;\r\n content: '';\r\n transform: rotate(45deg);\n}\r\n/* .arrow::after {\r\n content: \"\";\r\n position: absolute;\r\n top: 100%;\r\n left: 50%;\r\n margin-left: -5px;\r\n border-width: 5px;\r\n border-style: solid;\r\n border-color: black transparent transparent transparent;\r\n} */\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\node_modules\\w-component-vue\\src\\components\\WSlider.vue"],names:[],mappings:";AA6qBA;IACA,mBAAA;AACA;AACA;IACA,kHAAA;AACA;AACA;IACA,kBAAA;IACA,oBAAA;AACA;AACA;;IAEA,kBAAA;IACA,UAAA;IACA,WAAA;IACA,mBAAA;AACA;AACA;IACA,kBAAA;AACA;AACA;IACA,mBAAA;IACA,WAAA;IACA,wBAAA;AACA;AACA;;;;;;;;;GASA",file:"WSlider.vue",sourcesContent:["<template>\r\n <div\r\n :style=\"`user-select:none;`\"\r\n :changeParam=\"changeParam\"\r\n v-domresize\r\n @domresize=\"resizePanel\"\r\n >\r\n\r\n <div\r\n :style=\"`position:relative; width:100%; height:${sliderSize}px;`\"\r\n >\r\n\r\n <div :style=\"`position:absolute; top:${sliderSize/2-progHeight/2}px; left:${sliderSize/2}px; width:${progWidth}px;`\">\r\n\r\n <div\r\n ref=\"divPanel\"\r\n :style=\"`position:relative; width:${progWidth}px;`\"\r\n _click=\"clickProg\"\r\n >\r\n\r\n <div :style=\"`${useProgBorderRadius} overflow:hidden; width:${progWidth}px; height:${progHeight}px;`\">\r\n <div :style=\"`background:${useProgBackgroundColor}; height:${progHeight}px;`\">\r\n <div :style=\"`background:${useProgColor}; width:${(rt)*progWidth}px; height:${progHeight}px;`\"></div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n :style=\"`position:absolute; left:${(rt)*progWidth-widthCir/2}px; top:${progHeight/2-heightCir/2}px; z-index:1; ${editable?'cursor:pointer;':''}`\"\r\n >\r\n\r\n <div\r\n ref=\"divTrigger\"\r\n class=\"ts bs\"\r\n :style=\"`width:${widthCir}px; height:${heightCir}px; border-radius:50%; background:${useSliderBackgroundColor}; outline:none;`\"\r\n ></div>\r\n\r\n </div>\r\n\r\n <div\r\n ref=\"divBar\"\r\n :style=\"`position:absolute; left:${(r)*progWidth-widthCir/2}px; top:${progHeight/2-heightCir/2}px; z-index:2; ${editable?'cursor:pointer;':''}`\"\r\n >\r\n\r\n <div\r\n :style=\"`width:${widthCir}px; height:${heightCir}px; border-radius:50%; opacity:0; outline:none;`\"\r\n @mouseenter=\"hoverTrans=true\"\r\n @mouseleave=\"hoverTrans=false\"\r\n ></div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n \x3c!-- 不能給予position因會被popupjs洗掉, 但可給z-index, 且popupjs會改用transform:translate定位 --\x3e\r\n \x3c!-- 若使用minWidth, 會使popupjs重算給予minWidth用以自動撐開彈窗寬度失效, 若於其內slot外添加div給予minWidth, 亦會使popupjs給予minWidth機制失效, 待研究 --\x3e\r\n <div\r\n ref=\"divContent\"\r\n class=\"WPopup-Content\"\r\n :style=\"`z-index:${cmpZIndex};`\"\r\n v-show=\"effecting\"\r\n v-domresize\r\n @domresize=\"updatePopper\"\r\n >\r\n \x3c!-- 不使用v-if來重產dom, 因開啟arrow會有顯示後來不及定位問題 --\x3e\r\n <div\r\n :style=\"`padding:2px 5px; font-size:0.8rem; ${useTooltipTextFontSize} color:${useTooltipTextColor}; background:${useTooltipBackgroundColor}; ${useTooltipBorderRadius}`\"\r\n >\r\n {{valueDig}}\r\n <div class=\"arrow\" data-popper-arrow></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport get from 'lodash-es/get'\r\nimport isNumber from 'lodash-es/isNumber'\r\nimport dig from 'wsemi/src/dig.mjs'\r\nimport round from 'wsemi/src/round.mjs'\r\nimport cdbl from 'wsemi/src/cdbl.mjs'\r\nimport replace from 'wsemi/src/replace.mjs'\r\nimport domDragBarAndScroll from 'wsemi/src/domDragBarAndScroll.mjs'\r\nimport domResize from '../js/domResize.mjs'\r\nimport convertColor from '../js/convertColor.mjs'\r\nimport { createPopper } from '@popperjs/core/lib/popper-lite.js' //不用安裝@popperjs/core, 因wsemi安裝tippy.js內有依賴@popperjs/core\r\nimport flip from '@popperjs/core/lib/modifiers/flip.js'\r\nimport offset from '@popperjs/core/lib/modifiers/offset.js'\r\nimport arrow from '@popperjs/core/lib/modifiers/arrow.js'\r\nimport hide from '@popperjs/core/lib/modifiers/hide.js'\r\n//import preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow.js'\r\n//import computeStyles from '@popperjs/core/lib/modifiers/computeStyles'\r\n\r\n\r\n/**\r\n * @vue-prop {Number} [value=0] 輸入值數字,介於valueMin與valueMax之間,預設0\r\n * @vue-prop {Number} [valueMin=0] 輸入最小值數字,預設0\r\n * @vue-prop {Number} [valueMax=100] 輸入最大值數字,預設100\r\n * @vue-prop {Number} [valueStep=1] 輸入間隔數字,預設1\r\n * @vue-prop {Number} [valueDecimal=0] 輸入值取小數位數字,用於可拖選值具有小數時,預設0\r\n * @vue-prop {Number} [progBorderRadius=5] 輸入值域條框圓角度數字,單位為px,預設5\r\n * @vue-prop {Number} [progHeight=4] 輸入值域條高度數字,單位為px,預設4\r\n * @vue-prop {String} [progColor='#74a4d9'] 輸入值域條顏色字串,預設'#74a4d9'\r\n * @vue-prop {String} [progColorDisabled='#c5c5c5'] 輸入不可編輯時值域條顏色字串,預設'#c5c5c5'\r\n * @vue-prop {String} [progBackgroundColor='#eee'] 輸入值域條背景顏色字串,預設'#eee'\r\n * @vue-prop {String} [progBackgroundColorDisabled='#f2f2f2'] 輸入不可編輯時值域條背景顏色字串,預設'#f2f2f2'\r\n * @vue-prop {Number} [sliderSize=20] 輸入拖曳球尺寸數字,單位為px,預設20\r\n * @vue-prop {String} [sliderBackgroundColor='blue darken-3'] 輸入拖曳球背景顏色字串,預設'blue darken-3'\r\n * @vue-prop {String} [sliderBackgroundColorHover='blue darken-2'] 輸入滑鼠移入時拖曳球背景顏色字串,預設'blue darken-2'\r\n * @vue-prop {String} [sliderBackgroundColorDisabled='#aaa'] 輸入不可編輯時拖曳球背景顏色字串,預設'#aaa'\r\n * @vue-prop {Number} [cmpZIndex=3000] 輸入提示窗使用z-index數字,預設3000\r\n * @vue-prop {Number} [tooltipPlacementDist=5] 輸入提示窗距離觸發元素距離數字,單位為px,預設5\r\n * @vue-prop {Number} [tooltipBorderRadius=5] 輸入提示窗框圓角度數字,單位為px,預設4\r\n * @vue-prop {String} [tooltipTextFontSize='0.85rem'] 輸入提示窗框文字字型大小字串,預設'0.85rem'\r\n * @vue-prop {String} [tooltipTextColor='white'] 輸入提示窗框文字顏色字串,預設'white'\r\n * @vue-prop {String} [tooltipBackgroundColor='#666'] 輸入值域條背景顏色字串,預設'#666'\r\n * @vue-prop {Boolean} [editable=true] 輸入是否為編輯模式,預設true\r\n */\r\nexport default {\r\n directives: {\r\n domresize: domResize(),\r\n },\r\n components: {\r\n },\r\n props: {\r\n value: {\r\n type: Number,\r\n default: 0,\r\n },\r\n valueMin: {\r\n type: Number,\r\n default: 0,\r\n },\r\n valueMax: {\r\n type: Number,\r\n default: 100,\r\n },\r\n valueStep: {\r\n type: Number,\r\n default: 1,\r\n },\r\n valueDecimal: {\r\n type: Number,\r\n default: 0,\r\n },\r\n progBorderRadius: {\r\n type: Number,\r\n default: 5,\r\n },\r\n progHeight: {\r\n type: Number,\r\n default: 4,\r\n },\r\n progColor: {\r\n type: String,\r\n default: '#74a4d9',\r\n },\r\n progColorDisabled: {\r\n type: String,\r\n default: '#c5c5c5',\r\n },\r\n progBackgroundColor: {\r\n type: String,\r\n default: '#eee',\r\n },\r\n progBackgroundColorDisabled: {\r\n type: String,\r\n default: '#f2f2f2',\r\n },\r\n sliderSize: {\r\n type: Number,\r\n default: 20,\r\n },\r\n sliderBackgroundColor: {\r\n type: String,\r\n default: 'blue darken-3',\r\n },\r\n sliderBackgroundColorHover: {\r\n type: String,\r\n default: 'blue darken-2',\r\n },\r\n sliderBackgroundColorDisabled: {\r\n type: String,\r\n default: '#aaa',\r\n },\r\n cmpZIndex: {\r\n type: Number,\r\n default: 3000,\r\n },\r\n tooltipPlacementDist: {\r\n type: Number,\r\n default: 5,\r\n },\r\n tooltipBorderRadius: {\r\n type: Number,\r\n default: 4,\r\n },\r\n tooltipTextFontSize: {\r\n type: String,\r\n default: '0.85rem',\r\n },\r\n tooltipTextColor: {\r\n type: String,\r\n default: 'white',\r\n },\r\n tooltipBackgroundColor: {\r\n type: String,\r\n default: '#666', //rgba(60,60,60,0.75) //因arrow是通過div與旋轉成菱形來繪製, 因此可支援外部指定背景色, 但若有透明就會出現arrow的菱形問題\r\n },\r\n editable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n },\r\n data: function() {\r\n return {\r\n\r\n panelWidth: 0,\r\n panelHeight: 0,\r\n\r\n das: null,\r\n\r\n hoverTrans: false,\r\n dragTrans: false,\r\n\r\n popperInstance: null,\r\n popperShow: false,\r\n\r\n r: null,\r\n rt: null,\r\n\r\n }\r\n },\r\n mounted: function() {\r\n //console.log('mounted')\r\n\r\n let vo = this\r\n\r\n //das\r\n let das = domDragBarAndScroll(vo.$refs.divPanel, vo.$refs.divBar, { useTouchDragForPanel: false })\r\n das.on('dragBar', vo.dragBar)\r\n das.on('pressBar', vo.pressBar)\r\n das.on('freeBar', vo.freeBar)\r\n\r\n //save\r\n vo.das = das\r\n\r\n },\r\n beforeDestroy: function() {\r\n //console.log('beforeDestroy')\r\n\r\n let vo = this\r\n\r\n //clear\r\n if (vo.das) {\r\n vo.das.clear()\r\n }\r\n\r\n },\r\n computed: {\r\n\r\n changeParam: function() {\r\n // console.log('computed changeParam')\r\n\r\n let vo = this\r\n\r\n //ratio\r\n let r = 0\r\n try {\r\n r = (vo.value - vo.valueMin) / (vo.valueMax - vo.valueMin)\r\n }\r\n catch (err) {}\r\n\r\n //limitRatio\r\n r = vo.limitRatio(r)\r\n\r\n //rt\r\n let rt = vo.tickRatio(r)\r\n\r\n //save\r\n vo.r = r\r\n vo.rt = rt\r\n\r\n return ''\r\n },\r\n\r\n heightCir: function() {\r\n let vo = this\r\n return vo.sliderSize\r\n },\r\n\r\n widthCir: function() {\r\n let vo = this\r\n return vo.heightCir\r\n },\r\n\r\n effecting: function() {\r\n //console.log('computed effecting')\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //b\r\n let b = vo.hoverTrans || vo.dragTrans\r\n\r\n if (b) {\r\n\r\n //showPopper\r\n vo.showPopper()\r\n\r\n }\r\n else {\r\n\r\n //hidePopper\r\n vo.hidePopper()\r\n\r\n //同步\r\n vo.r = vo.rt\r\n\r\n }\r\n\r\n return b\r\n },\r\n\r\n progWidth: function() {\r\n let vo = this\r\n return vo.panelWidth - vo.sliderSize\r\n },\r\n\r\n useProgBorderRadius: function() {\r\n let vo = this\r\n return `border-radius:${vo.progBorderRadius}px;`\r\n },\r\n\r\n effProgColor: function() {\r\n let vo = this\r\n return convertColor(vo.progColor)\r\n },\r\n\r\n effProgColorDisabled: function() {\r\n let vo = this\r\n return convertColor(vo.progColorDisabled)\r\n },\r\n\r\n useProgColor: function() {\r\n let vo = this\r\n if (!vo.editable) {\r\n return vo.effProgColorDisabled\r\n }\r\n return vo.effProgColor\r\n },\r\n\r\n effProgBackgroundColor: function() {\r\n let vo = this\r\n return convertColor(vo.progBackgroundColor)\r\n },\r\n\r\n effProgBackgroundColorDisabled: function() {\r\n let vo = this\r\n return convertColor(vo.progBackgroundColorDisabled)\r\n },\r\n\r\n useProgBackgroundColor: function() {\r\n let vo = this\r\n if (!vo.editable) {\r\n return vo.effProgBackgroundColorDisabled\r\n }\r\n return vo.effProgBackgroundColor\r\n },\r\n\r\n effSliderBackgroundColor: function() {\r\n let vo = this\r\n return convertColor(vo.sliderBackgroundColor)\r\n },\r\n\r\n effSliderBackgroundColorHover: function() {\r\n let vo = this\r\n return convertColor(vo.sliderBackgroundColorHover)\r\n },\r\n\r\n effSliderBackgroundColorDisabled: function() {\r\n let vo = this\r\n return convertColor(vo.sliderBackgroundColorDisabled)\r\n },\r\n\r\n useSliderBackgroundColor: function() {\r\n let vo = this\r\n if (!vo.editable) {\r\n return vo.effSliderBackgroundColorDisabled\r\n }\r\n if (vo.effecting) {\r\n return vo.effSliderBackgroundColorHover\r\n }\r\n return vo.effSliderBackgroundColor\r\n },\r\n\r\n useTooltipBorderRadius: function() {\r\n //console.log('computed useTooltipBorderRadius')\r\n\r\n let vo = this\r\n\r\n if (isNumber(vo.tooltipBorderRadius)) {\r\n return `border-radius:${vo.tooltipBorderRadius}px;`\r\n }\r\n return ''\r\n },\r\n\r\n useTooltipTextFontSize: function() {\r\n let vo = this\r\n let s = vo.tooltipTextFontSize\r\n s = replace(s, ';', '')\r\n return `font-size:${s};`\r\n },\r\n\r\n useTooltipTextColor: function() {\r\n //console.log('computed useTooltipTextColor')\r\n\r\n let vo = this\r\n\r\n return convertColor(vo.tooltipTextColor)\r\n },\r\n\r\n useTooltipBackgroundColor: function() {\r\n //console.log('computed useTooltipBackgroundColor')\r\n\r\n let vo = this\r\n\r\n return convertColor(vo.tooltipBackgroundColor)\r\n },\r\n\r\n valueDig: function() {\r\n // console.log('computed valueDig')\r\n\r\n let vo = this\r\n\r\n //t\r\n let t = (vo.rt) * (vo.valueMax - vo.valueMin) + vo.valueMin\r\n\r\n //dig\r\n let c = dig(t, vo.valueDecimal)\r\n\r\n return c\r\n },\r\n\r\n },\r\n methods: {\r\n\r\n resizePanel: function(msg) {\r\n //console.log('methods resizePanel', msg)\r\n\r\n let vo = this\r\n\r\n //update\r\n vo.panelWidth = msg.snew.offsetWidth\r\n vo.panelHeight = msg.snew.offsetHeight\r\n\r\n // //emit\r\n // vo.$emit('resize', msg)\r\n\r\n },\r\n\r\n limitRatio: function(r) {\r\n // console.log('methods limitRatio', r)\r\n\r\n // let vo = this\r\n\r\n r = Math.min(r, 1)\r\n r = Math.max(r, 0)\r\n\r\n return r\r\n },\r\n\r\n tickRatio: function(r) {\r\n // console.log('methods tickRatio', r)\r\n\r\n let vo = this\r\n\r\n //rt\r\n let rt = 0\r\n try {\r\n\r\n //rtk\r\n let rng = vo.valueMax - vo.valueMin\r\n let rtk = vo.valueStep / rng\r\n\r\n //round\r\n let i = round(r / rtk)\r\n\r\n //rt\r\n rt = i * rtk\r\n // console.log('r', r, 'rt', rt)\r\n\r\n }\r\n catch (err) { }\r\n\r\n\r\n return rt\r\n },\r\n\r\n dragBar: function(msg) {\r\n // console.log('methods dragBar', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //r\r\n let bd = vo.$el.getBoundingClientRect()\r\n let x = msg.clientX - vo.sliderSize / 2\r\n let w = vo.progWidth //vo.$el.offsetWidth\r\n let r = 0\r\n if (w > 0) {\r\n r = (x - bd.left) / w //clientX需扣除元件的left位置\r\n }\r\n\r\n //limitRatio\r\n r = vo.limitRatio(r)\r\n // console.log(vo.r, 'r', r)\r\n\r\n //rt\r\n let rt = vo.tickRatio(r)\r\n\r\n //save\r\n vo.r = r\r\n vo.rt = rt\r\n\r\n //v\r\n let v = cdbl(vo.valueDig)\r\n\r\n //updatePopper\r\n vo.updatePopper()\r\n\r\n //emit\r\n vo.$emit('input', v)\r\n\r\n },\r\n\r\n pressBar: function() {\r\n let vo = this\r\n vo.dragTrans = true\r\n },\r\n\r\n freeBar: function() {\r\n let vo = this\r\n vo.dragTrans = false\r\n },\r\n\r\n showPopper: function(from) {\r\n // console.log('methods showPopper', from)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //divTrigger\r\n let divTrigger = get(vo, '$refs.divTrigger', null)\r\n if (divTrigger === null) {\r\n return //console.log('無法找到點擊區元素')\r\n }\r\n\r\n //divContent\r\n let divContent = get(vo, '$refs.divContent', null)\r\n\r\n //check\r\n if (divContent === null) {\r\n return //console.log('無法找到顯示元素')\r\n }\r\n\r\n //@popperjs/core 2.x\r\n let opt = {\r\n strategy: 'fixed', //盡量使用'fixed'而不用'absolute', 否則位於多層dialog或多層drawer內popup顯示會異常\r\n placement: 'top', //預設top, 因arrow不好給故僅提供top\r\n modifiers: [\r\n // preventOverflow,\r\n // computeStyles,\r\n // {\r\n // name: 'computeStyles',\r\n // options: {\r\n // gpuAcceleration: false, //預設true, 可關閉GPU加速\r\n // },\r\n // },\r\n arrow,\r\n {\r\n name: 'arrow',\r\n options: {\r\n padding: 5,\r\n },\r\n },\r\n flip,\r\n {\r\n name: 'flip',\r\n options: {\r\n fallbackPlacements: ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end'],\r\n },\r\n },\r\n offset,\r\n {\r\n name: 'offset',\r\n options: {\r\n // offset: [0, vo.tooltipPlacementDist], //[Skidding, Distance]\r\n // offset: [0, 5], //因popperjs會自動調位置, 故得通過callback函數處理指定位置時的偏移量\r\n offset: ({ placement, reference, popper }) => {\r\n // console.log('offset', placement, reference, popper, vo.tooltipPlacementDist)\r\n // if (placement === 'bottom-start' || placement === 'bottom' || placement === 'bottom-end') {\r\n // return [0, vo.tooltipPlacementDist]\r\n // }\r\n // else if (placement === 'top-start' || placement === 'top' || placement === 'top-end') {\r\n // return [0, vo.tooltipPlacementDist]\r\n // }\r\n // else if (placement === 'left-start' || placement === 'left' || placement === 'left-end') {\r\n // return [0, vo.tooltipPlacementDist]\r\n // }\r\n // else if (placement === 'right-start' || placement === 'right' || placement === 'right-end') {\r\n // return [0, vo.tooltipPlacementDist]\r\n // }\r\n // else {\r\n // return []\r\n // }\r\n return [0, vo.tooltipPlacementDist] //[Skidding, Distance]\r\n },\r\n },\r\n },\r\n hide,\r\n ],\r\n }\r\n vo.popperInstance = createPopper(divTrigger, divContent, opt)\r\n // console.log('popperInstance', vo.popperInstance)\r\n\r\n },\r\n\r\n updatePopper: function(msg) {\r\n //console.log('methods updatePopper', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //update\r\n if (vo.popperInstance) {\r\n vo.popperInstance.update()\r\n }\r\n\r\n // //emit\r\n // vo.$emit('resize', msg)\r\n\r\n },\r\n\r\n hidePopper: function(from) {\r\n // console.log('methods hidePopper', from, this.mmkey)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (vo.popperInstance) {\r\n\r\n //destroy\r\n vo.popperInstance.destroy()\r\n vo.popperInstance = null\r\n\r\n }\r\n\r\n },\r\n\r\n },\r\n}\r\n<\/script>\r\n\r\n<style scoped>\r\n.ts {\r\n transition:all 0.3s;\r\n}\r\n.bs {\r\n box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);\r\n}\r\n.WPopup-Content[data-popper-reference-hidden] {\r\n visibility: hidden;\r\n pointer-events: none;\r\n}\r\n.arrow,\r\n.arrow::before {\r\n position: absolute;\r\n width: 5px;\r\n height: 5px;\r\n background: inherit;\r\n}\r\n.arrow {\r\n visibility: hidden;\r\n}\r\n.arrow::before {\r\n visibility: visible;\r\n content: '';\r\n transform: rotate(45deg);\r\n}\r\n/* .arrow::after {\r\n content: \"\";\r\n position: absolute;\r\n top: 100%;\r\n left: 50%;\r\n margin-left: -5px;\r\n border-width: 5px;\r\n border-style: solid;\r\n border-color: black transparent transparent transparent;\r\n} */\r\n</style>\r\n"]},media:void 0})}),jh,"data-v-eb456a54",false,undefined,!1,ms,void 0,void 0)},props:{value:{type:String,default:"#FFFFFF"},size:{type:Number,default:200},borderColor:{type:String,default:"#ddd"},borderColorHover:{type:String,default:"#ccc"},borderColorActive:{type:String,default:"#777"},backgroundColor:{type:String,default:"transparent"},menuBorderRadius:{type:Number,default:4},menuBackgroundColor:{type:String,default:"#fff"},menuBackgroundColorHover:{type:String,default:"#f9f9f9"},menuBackgroundColorActive:{type:String,default:"#f2f2f2"},menuTextColor:{type:String,default:"#444"},menuTextColorHover:{type:String,default:"#222"},menuTextColorActive:{type:String,default:"#000"},menuTextFontSize:{type:String,default:"0.8rem"},inputBorderRadius:{type:Number,default:4},inputBorderColor:{type:String,default:"#ccc"},inputBorderColorHover:{type:String,default:"#b5b5b5"},inputBorderColorActive:{type:String,default:"#aaa"},inputBackgroundColor:{type:String,default:"#fff"},inputBackgroundColorHover:{type:String,default:"#fafafa"},inputBackgroundColorActive:{type:String,default:"#f2f2f2"},inputTextColor:{type:String,default:"#000"},inputTextFontSize:{type:String,default:"0.8rem"},inputTextWidth:{type:Number,default:38},inputTextHeight:{type:Number,default:18},inputLabelWidth:{type:Number,default:12},inputLabelColor:{type:String,default:"#666"},inputLabelFontSize:{type:String,default:"0.8rem"},barProgHeight:{type:Number,default:4},barProgColor:{type:String,default:"#74a4d9"},barProgBackgroundColor:{type:String,default:"#eee"},barSliderSize:{type:Number,default:10},barSliderBackgroundColor:{type:String,default:"#1565C0"},barSliderBackgroundColorHover:{type:String,default:"#1976D2"}},data:function(){return{methods:[{text:"RGBA"},{text:"HSVA"}],methodSelect:{text:"RGBA"},lock:!1,valueTrans:null,r:255,g:255,b:255,h:360,s:1,v:1,a:1,rt:255,gt:255,bt:255,ht:360,st:1,vt:1,at:1}},computed:{changeValue:function(){let e=this;e.valueTrans=Wo(e.value);let t=_l.toRgba(e.valueTrans),n=_l.toHsva(e.valueTrans);return e.r=t.r,e.rt=t.r,e.g=t.g,e.gt=t.g,e.b=t.b,e.bt=t.b,e.a=t.a,e.at=t.a,e.h=n.h,e.ht=n.h,e.s=n.s,e.st=n.s,e.v=n.v,e.vt=n.v,""},sliderWidth:function(){let e=this,t=e.size-e.inputTextWidth-e.inputLabelWidth-13;return t=Math.max(t,0),t},useBorderColor:function(){return Wo(this.borderColor)},useBackgroundColor:function(){return Wo(this.backgroundColor)}},methods:{cki255:function(e){if(!oa(e))return 0;let t=e;return(e=Xi(e))<0?e=0:e>255&&(e=255),e===Xi(t)?t:e},cki360:function(e){if(!oa(e))return 0;let t=e;return(e=Xi(e))<0?e=0:e>360&&(e=360),e===Xi(t)?t:e},ckd1:function(e){if(!Iu(e))return 0;let t=e;return(e=Hi(e))<0?e=0:e>1&&(e=1),e===Hi(t)?t:e},updateColorCore:function(){let e=this,t=!1,n=!1;{let n=Xi(e.rt);e.r!==n&&(e.r=n,t=!0)}{let n=Xi(e.gt);e.g!==n&&(e.g=n,t=!0)}{let n=Xi(e.bt);e.b!==n&&(e.b=n,t=!0)}{let n=Hi(e.at);e.a!==n&&(e.a=n,t=!0)}{let t=Xi(e.ht);e.h!==t&&(e.h=t,n=!0)}{let t=Hi(e.st);e.s!==t&&(e.s=t,n=!0)}{let t=Hi(e.vt);e.v!==t&&(e.v=t,n=!0)}let r=null;t?r={r:e.r,g:e.g,b:e.b,a:e.a}:n&&(r={h:e.h,s:e.s,v:e.v,a:e.a}),Go(r)&&(r=_l.toRgbaString(r),e.valueTrans=r,e.$emit("input",r))},updateColor:function(e,t,n){let r=this;setTimeout((()=>{r.updateColorCore()}),1)}}};var Xh=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block;",attrs:{changeValue:e.changeValue}},[n("div",{style:"padding-left:10px; margin-bottom:-1px;"},[n("WGroupChipRadio",{attrs:{items:e.methods,paddingStyle:{v:1,h:6},group:!0,groupBorderRadiusStyle:{top:!0},groupShift:0,borderRadius:e.menuBorderRadius,borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorActive:e.borderColorActive,backgroundColor:e.menuBackgroundColor,backgroundColorHover:e.menuBackgroundColorHover,backgroundColorActive:e.menuBackgroundColorActive,textColor:e.menuTextColor,textColorHover:e.menuTextColorHover,textColorActive:e.menuTextColorActive,textFontSize:e.menuTextFontSize,marginStyle:{},shadowActive:!1},model:{value:e.methodSelect,callback:function(t){e.methodSelect=t},expression:"methodSelect"}})],1),e._v(" "),n("div",{style:"padding:10px; border:1px solid "+e.useBorderColor+"; background:"+e.useBackgroundColor+";"},[n("div",{directives:[{name:"show",rawName:"v-show",value:"RGBA"===e.methodSelect.text,expression:"methodSelect.text==='RGBA'"}]},[n("WPanelLabelItem",{attrs:{label:"R",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.cki255,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"r")}},model:{value:e.rt,callback:function(t){e.rt=t},expression:"rt"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:255,valueStep:1,valueDecimal:0,value:e.r},on:{input:function(t){e.rt=t,e.updateColor(t,"","rs")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"G",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.cki255,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"g")}},model:{value:e.gt,callback:function(t){e.gt=t},expression:"gt"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:255,valueStep:1,valueDecimal:0,value:e.g},on:{input:function(t){e.gt=t,e.updateColor(t,"","gs")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"B",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.cki255,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"b")}},model:{value:e.bt,callback:function(t){e.bt=t},expression:"bt"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:255,valueStep:1,valueDecimal:0,value:e.b},on:{input:function(t){e.bt=t,e.updateColor(t,"","bs")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"A",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.ckd1,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"a")}},model:{value:e.at,callback:function(t){e.at=t},expression:"at"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:1,valueStep:.01,valueDecimal:2,value:e.a},on:{input:function(t){e.at=t,e.updateColor(t,"","as")}}})],1)]},proxy:!0}])})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"HSVA"===e.methodSelect.text,expression:"methodSelect.text==='HSVA'"}]},[n("WPanelLabelItem",{attrs:{label:"H",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.cki360,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"h")}},model:{value:e.ht,callback:function(t){e.ht=t},expression:"ht"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:360,valueStep:1,valueDecimal:0,value:e.h},on:{input:function(t){e.ht=t,e.updateColor(t,"","hs")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"S",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.ckd1,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"s")}},model:{value:e.st,callback:function(t){e.st=t},expression:"st"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:1,valueStep:.01,valueDecimal:2,value:e.s},on:{input:function(t){e.st=t,e.updateColor(t,"","ss")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"V",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.ckd1,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"v")}},model:{value:e.vt,callback:function(t){e.vt=t},expression:"vt"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:1,valueStep:.01,valueDecimal:2,value:e.v},on:{input:function(t){e.vt=t,e.updateColor(t,"","bs")}}})],1)]},proxy:!0}])}),e._v(" "),n("div",{staticStyle:{height:"10px"}}),e._v(" "),n("WPanelLabelItem",{attrs:{label:"A",labelFontSize:e.inputLabelFontSize,labelWidth:e.inputLabelWidth,labelColor:e.inputLabelColor},scopedSlots:e._u([{key:"item",fn:function(){return[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("WText",{style:"width:"+e.inputTextWidth+"px;",attrs:{type:e.ckd1,shadow:!1,bottomLineBorderColor:"transparent",bottomLineBorderColorHover:"transparent",bottomLineBorderColorFocus:"transparent",paddingStyle:{v:0,h:5},iconShiftOuter:-10,borderRadius:e.inputBorderRadius,borderColor:e.inputBorderColor,borderColorHover:e.inputBorderColorHover,borderColorFocus:e.inputBorderColorActive,backgroundColor:e.inputBackgroundColor,backgroundColorHover:e.inputBackgroundColorHover,backgroundColorFocus:e.inputBackgroundColorActive,textColor:e.inputTextColor,textFontSize:e.inputTextFontSize,height:e.inputTextHeight},on:{input:function(t,n){e.updateColor(t,n,"a")}},model:{value:e.at,callback:function(t){e.at=t},expression:"at"}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WSlider",{style:"width:"+e.sliderWidth+"px;",attrs:{progHeight:e.barProgHeight,progColor:e.barProgColor,progBackgroundColor:e.barProgBackgroundColor,sliderSize:e.barSliderSize,sliderBackgroundColor:e.barSliderBackgroundColor,sliderBackgroundColorHover:e.barSliderBackgroundColorHover,valueMin:0,valueMax:1,valueStep:.01,valueDecimal:2,value:e.a},on:{input:function(t){e.at=t,e.updateColor(t,"","as")}}})],1)]},proxy:!0}])})],1)])])};Xh._withStripped=!0;const Yh=ps({render:Xh,staticRenderFns:[]},(function(e){e&&e("data-v-e1922134_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WColorSelectInput.vue"},media:void 0})}),$h,"data-v-e1922134",false,undefined,!1,ms,void 0,void 0);const qh={directives:{domresize:oo()},components:{WPopup:ou,WColorSelectPanel:ku,WColorSelectInput:Yh,WButtonChip:Fu,WIcon:xs},props:{value:{type:String,default:"#FFFFFF"},type:{type:String,default:"HSVA"},size:{type:Number,default:200},space:{type:Number,default:10},colorBlockSize:{type:Number,default:20},colorBlockBorderWidth:{type:Number,default:1},colorBlockBorderColor:{type:String,default:"#ddd"},showColorText:{type:Boolean,default:!0},colorTextColor:{type:String,default:"#000"},colorTextFontSize:{type:String,default:"0.8rem"},panelBackgroundColor:{type:String,default:"#fff"},toolBackgroundColor:{type:String,default:"#f5f5f5"},menuIconLump:{type:String,default:"M12,5.32L18,8.69V15.31L12,18.68L6,15.31V8.69L12,5.32M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L5,8.09V15.91L12,19.85L19,15.91V8.09L12,4.15Z"},menuIconHsva:{type:String,default:"M19 3V21H15V3H19M14 3V21H10V3H14M9 3V21H5V3H9Z"},menuIconEyeDropper:{type:String,default:"M19.35,11.72L17.22,13.85L15.81,12.43L8.1,20.14L3.5,22L2,20.5L3.86,15.9L11.57,8.19L10.15,6.78L12.28,4.65L19.35,11.72M16.76,3C17.93,1.83 19.83,1.83 21,3C22.17,4.17 22.17,6.07 21,7.24L19.08,9.16L14.84,4.92L16.76,3M5.56,17.03L4.5,19.5L6.97,18.44L14.4,11L13,9.6L5.56,17.03Z"},menuIconColor:{type:String,default:"#aaa"},menuIconColorHover:{type:String,default:"#999"},menuIconColorActive:{type:String,default:"#666"},menuIconSize:{type:Number,default:20},borderColor:{type:String,default:"#ddd"},borderColorHover:{type:String,default:"#ccc"},borderColorActive:{type:String,default:"#777"},menuBorderRadius:{type:Number,default:4},menuTextColor:{type:String,default:"#444"},menuTextColorHover:{type:String,default:"#222"},menuTextColorActive:{type:String,default:"#000"},menuTextFontSize:{type:String,default:"0.8rem"},menuBackgroundColor:{type:String,default:"#fff"},menuBackgroundColorHover:{type:String,default:"#f9f9f9"},menuBackgroundColorActive:{type:String,default:"#f2f2f2"},inputBorderRadius:{type:Number,default:4},inputBorderColor:{type:String,default:"#ccc"},inputBorderColorHover:{type:String,default:"#b5b5b5"},inputBorderColorActive:{type:String,default:"#aaa"},inputBackgroundColor:{type:String,default:"#fff"},inputBackgroundColorHover:{type:String,default:"#fafafa"},inputBackgroundColorActive:{type:String,default:"#f2f2f2"},inputTextColor:{type:String,default:"#000"},inputTextFontSize:{type:String,default:"0.8rem"},inputTextWidth:{type:Number,default:38},inputTextHeight:{type:Number,default:18},inputLabelWidth:{type:Number,default:12},inputLabelColor:{type:String,default:"#666"},inputLabelFontSize:{type:String,default:"0.8rem"},barProgHeight:{type:Number,default:4},barProgColor:{type:String,default:"#74a4d9"},barProgBackgroundColor:{type:String,default:"#eee"},barSliderSize:{type:Number,default:10},barSliderBackgroundColor:{type:String,default:"#1565C0"},barSliderBackgroundColorHover:{type:String,default:"#1976D2"},popupPlacementDist:{type:Number,default:5},btnText:{type:String,default:"OK"},btnRippleColor:{type:String,default:"rgba(255,255,255,0.4)"},btnPaddingStyle:{type:Object,default:()=>({v:1,h:5})},btnTextColor:{type:String,default:"#000"},btnTextColorHover:{type:String,default:"#222"},btnTextColorActive:{type:String,default:"#222"},btnTextFontSize:{type:String,default:"0.8rem"},btnBorderRadius:{type:Number,default:4},btnBackgroundColor:{type:String,default:"rgb(241,241,241)"},btnBackgroundColorHover:{type:String,default:"rgb(236,236,236)"},btnBackgroundColorActive:{type:String,default:"rgb(236,236,236)"},btnShadow:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}},data:function(){return{mdiLoading:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",show:!1,typeTrans:"HSVA",loadingEyeDropper:!1,layoutType:"horizontal",layoutOverflowY:!1,layoutMinY:300,layoutMaxY:300,selectPanelHeight:0,selectInputHeight:0,valueOri:null,valueNew:null}},computed:{changeValue:function(){let e=this;return e.valueOri=Wo(e.value),e.valueNew=e.valueOri,""},changeType:function(){return this.typeTrans=this.type,""},hasEyeDropper:function(){return Qi(window.EyeDropper)},useColorBlockBorderColor:function(){return Wo(this.colorBlockBorderColor)},useColorTextColor:function(){return Wo(this.colorTextColor)},usePanelBackgroundColor:function(){return Wo(this.panelBackgroundColor)},useToolBackgroundColor:function(){return Wo(this.toolBackgroundColor)},useBorderColor:function(){return Wo(this.borderColor)},usePanelOverflow:function(){let e=this,t=`overflow-y:auto; min-height:${e.layoutMinY}px;`;return e.layoutOverflowY&&(t+=`max-height:${e.layoutMaxY}px;`),t}},methods:{resize:function(e){let t=this;if(!t.show)return;let n=me(e,"snew.windowWidth",0)>=2*(t.size+20)+3*t.space;t.layoutType=n?"horizontal":"vertical"},resizeContent:function(e){let t=this;if(!t.show)return;let n=me(e,"snew.windowHeight",0);try{let e=function(e){if(!Qo(e))return null;try{return e.getBoundingClientRect()}catch(e){}return null}(t.$refs.ct),r=500;t.layoutOverflowY=e.top+r>n,t.layoutMaxY=Math.max(n-e.top-30,t.layoutMinY)}catch(e){}},resizeSelectPanel:function(e){if(!this.show)return;let t=me(e,"snew.clientHeight",0);this.selectPanelHeight=t},resizeSelectInput:function(e){if(!this.show)return;let t=me(e,"snew.clientHeight",0);this.selectInputHeight=t},openEyeDropper:function(){let e=this;e.hasEyeDropper&&(e.loadingEyeDropper=!0,(new window.EyeDropper).open().then((t=>{let n=me(t,"sRGBHex","#fff");e.valueNew=n})).catch((e=>{console.log(e)})).finally((()=>{e.loadingEyeDropper=!1})))},clickColor:function(){let e=this;e.editable&&(e.$emit("input",e.valueNew),e.show=!1)}}};var Zh=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("WPopup",{directives:[{name:"domresize",rawName:"v-domresize"}],attrs:{minWidth:null,maxWidth:null,autoFitMinWidth:!1,autoFitMaxWidth:!1,placementDist:e.popupPlacementDist,editable:e.editable,changeValue:e.changeValue,changeType:e.changeType},on:{domresize:e.resize},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("div",{},[n("div",{staticStyle:{display:"flex","align-items":"center",cursor:"pointer",outline:"none"},on:{click:e.clickColor}},[n("div",{style:"border:"+e.colorBlockBorderWidth+"px solid "+e.useColorBlockBorderColor+"; width:"+e.colorBlockSize+"px; height:"+e.colorBlockSize+"px; background:"+e.valueOri+";"}),e._v(" "),e.showColorText?[n("div",{style:"padding-left:5px;"}),e._v(" "),n("div",{style:"font-size:"+e.colorTextFontSize+"; color:"+e.useColorTextColor+";"},[e._v("\n "+e._s(e.valueOri)+"\n ")])]:e._e()],2)])]},proxy:!0},{key:"content",fn:function(){return[n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],ref:"ct",style:"background:"+e.usePanelBackgroundColor+"; "+e.usePanelOverflow,on:{domresize:e.resizeContent}},[n("div",{style:"display:flex; padding:"+e.space+"px; border-bottom:1px solid "+e.useBorderColor+"; background:"+e.useToolBackgroundColor+";"},[n("div",{},[n("WIcon",{staticStyle:{cursor:"pointer"},attrs:{icon:e.menuIconHsva,color:"HSVA"===e.typeTrans?e.menuIconColorActive:e.menuIconColor,colorHover:"HSVA"===e.typeTrans?e.menuIconColorActive:e.menuIconColorHover,size:e.menuIconSize},on:{click:function(t){e.typeTrans="HSVA",e.$emit("update:type","HSVA")}}})],1),e._v(" "),n("div",{},[n("WIcon",{staticStyle:{cursor:"pointer"},attrs:{icon:e.menuIconLump,color:"LUMP"===e.typeTrans?e.menuIconColorActive:e.menuIconColor,colorHover:"LUMP"===e.typeTrans?e.menuIconColorActive:e.menuIconColorHover,size:e.menuIconSize},on:{click:function(t){e.typeTrans="LUMP",e.$emit("update:type","LUMP")}}})],1),e._v(" "),e.hasEyeDropper?n("div",{},[n("WIcon",{class:{"icon-spinner":e.loadingEyeDropper},staticStyle:{cursor:"pointer"},attrs:{icon:e.loadingEyeDropper?e.mdiLoading:e.menuIconEyeDropper,color:e.loadingEyeDropper?e.menuIconColor:e.menuIconColorActive,colorHover:e.loadingEyeDropper?e.menuIconColor:e.menuIconColorActive,size:e.menuIconSize},on:{click:e.openEyeDropper}})],1):e._e(),e._v(" "),n("div",{style:"width:100%;"}),e._v(" "),n("div",{ref:"mtb",style:"display:flex; align-items:center;"},[n("div",{style:"display:flex; align-items:center; border:"+e.colorBlockBorderWidth+"px solid "+e.useColorBlockBorderColor+";"},[n("div",{style:"width:"+e.colorBlockSize+"px; min-width:"+e.colorBlockSize+"px; height:"+e.colorBlockSize+"px; background:"+e.valueOri+";"}),e._v(" "),n("div",{style:"width:"+e.colorBlockSize+"px; min-width:"+e.colorBlockSize+"px; height:"+e.colorBlockSize+"px; background:"+e.valueNew+";"})]),e._v(" "),n("div",{style:"padding-left:"+e.space+"px;"}),e._v(" "),n("WButtonChip",{attrs:{text:e.btnText,rippleColor:e.btnRippleColor,paddingStyle:e.btnPaddingStyle,textColor:e.btnTextColor,textColorHover:e.btnTextColorHover,textColorActive:e.btnTextColorActive,textFontSize:e.btnTextFontSize,borderRadius:e.btnBorderRadius,_borderColor:"btnBorderColor",_borderColorHover:"btnBorderColorHover",_borderColorActive:"btnBorderColorActive",backgroundColor:e.btnBackgroundColor,backgroundColorHover:e.btnBackgroundColorHover,backgroundColorActive:e.btnBackgroundColorActive,shadow:e.btnShadow},on:{click:e.clickColor}})],1)]),e._v(" "),n("div",{style:"padding:"+e.space+"px;"},[n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{display:"flex"},on:{domresize:e.resizeSelectPanel}},[n("WColorSelectPanel",{attrs:{type:e.typeTrans,size:e.size,space:0,backgroundColor:"transparent",menuIconLump:e.menuIconLump,menuIconHsva:e.menuIconHsva,menuIconColor:e.menuIconColor,menuIconColorHover:e.menuIconColorHover,menuIconColorActive:e.menuIconColorActive,menuIconSize:e.menuIconSize},model:{value:e.valueNew,callback:function(t){e.valueNew=t},expression:"valueNew"}})],1),e._v(" "),n("div",{style:"height:"+e.space+"px;"}),e._v(" "),n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{display:"flex"},on:{domresize:e.resizeSelectInput}},[n("WColorSelectInput",{attrs:{size:Math.max(e.size-22,0),backgroundColor:"transparent",borderColor:e.borderColor,borderColorHover:e.borderColorHover,borderColorActive:e.borderColorActive,menuBorderRadius:e.menuBorderRadius,menuBackgroundColor:e.menuBackgroundColor,menuBackgroundColorHover:e.menuBackgroundColorHover,menuBackgroundColorActive:e.menuBackgroundColorActive,menuTextColor:e.menuTextColor,menuTextColorHover:e.menuTextColorHover,menuTextColorActive:e.menuTextColorActive,menuTextFontSize:e.menuTextFontSize,inputBorderRadius:e.inputBorderRadius,inputBorderColor:e.inputBorderColor,inputBorderColorHover:e.inputBorderColorHover,inputBorderColorActive:e.inputBorderColorActive,inputBackgroundColor:e.inputBackgroundColor,inputBackgroundColorHover:e.inputBackgroundColorHover,inputBackgroundColorActive:e.inputBackgroundColorActive,inputTextColor:e.inputTextColor,inputTextFontSize:e.inputTextFontSize,inputTextWidth:e.inputTextWidth,inputTextHeight:e.inputTextHeight,inputLabelWidth:e.inputLabelWidth,inputLabelColor:e.inputLabelColor,inputLabelFontSize:e.inputLabelFontSize,barProgHeight:e.barProgHeight,barProgColor:e.barProgColor,barProgBackgroundColor:e.barProgBackgroundColor,barSliderSize:e.barSliderSize,barSliderBackgroundColor:e.barSliderBackgroundColor,barSliderBackgroundColorHover:e.barSliderBackgroundColorHover},model:{value:e.valueNew,callback:function(t){e.valueNew=t},expression:"valueNew"}})],1)])])]},proxy:!0}]),model:{value:e.show,callback:function(t){e.show=t},expression:"show"}})};Zh._withStripped=!0;const Jh=ps({render:Zh,staticRenderFns:[]},(function(e){e&&e("data-v-776154e8_0",{source:"\n.icon-spinner[data-v-776154e8] {\r\n animation: spin-animation-data-v-776154e8 1.5s infinite;\r\n display: inline-block;\n}\n@keyframes spin-animation-data-v-776154e8 {\n0% {\r\n transform: rotate(0deg);\n}\n100% {\r\n transform: rotate(359deg);\n}\n}\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\node_modules\\w-component-vue\\src\\components\\WColorSelect.vue"],names:[],mappings:";AA+wBA;IACA,uDAAA;IACA,qBAAA;AACA;AACA;AACA;QACA,uBAAA;AACA;AACA;QACA,yBAAA;AACA;AACA",file:"WColorSelect.vue",sourcesContent:["<template>\r\n <WPopup\r\n :minWidth=\"null\"\r\n :maxWidth=\"null\"\r\n :autoFitMinWidth=\"false\"\r\n :autoFitMaxWidth=\"false\"\r\n :placementDist=\"popupPlacementDist\"\r\n :editable=\"editable\"\r\n v-model=\"show\"\r\n :changeValue=\"changeValue\"\r\n :changeType=\"changeType\"\r\n v-domresize\r\n @domresize=\"resize\"\r\n >\r\n\r\n <template v-slot:trigger>\r\n\r\n <div style=\"\">\r\n \x3c!-- 盡量不要讓display:flex暴露至外層 --\x3e\r\n <div\r\n style=\"display:flex; align-items:center; cursor:pointer; outline:none;\"\r\n @click=\"clickColor\"\r\n >\r\n\r\n <div :style=\"`border:${colorBlockBorderWidth}px solid ${useColorBlockBorderColor}; width:${colorBlockSize}px; height:${colorBlockSize}px; background:${valueOri};`\"></div>\r\n\r\n <template v-if=\"showColorText\">\r\n\r\n <div :style=\"`padding-left:5px;`\"></div>\r\n\r\n <div :style=\"`font-size:${colorTextFontSize}; color:${useColorTextColor};`\">\r\n {{valueOri}}\r\n </div>\r\n\r\n </template>\r\n\r\n </div>\r\n </div>\r\n\r\n </template>\r\n\r\n <template v-slot:content>\r\n\r\n <div\r\n ref=\"ct\"\r\n :style=\"`background:${usePanelBackgroundColor}; ${usePanelOverflow}`\"\r\n v-domresize\r\n @domresize=\"resizeContent\"\r\n >\r\n\r\n \x3c!-- 上方選單區 --\x3e\r\n <div :style=\"`display:flex; padding:${space}px; border-bottom:1px solid ${useBorderColor}; background:${useToolBackgroundColor};`\">\r\n\r\n <div style=\"\">\r\n <WIcon\r\n style=\"cursor:pointer;\"\r\n :icon=\"menuIconHsva\"\r\n :color=\"typeTrans==='HSVA'?menuIconColorActive:menuIconColor\"\r\n :colorHover=\"typeTrans==='HSVA'?menuIconColorActive:menuIconColorHover\"\r\n :size=\"menuIconSize\"\r\n @click=\"typeTrans='HSVA';$emit('update:type','HSVA')\"\r\n ></WIcon>\r\n </div>\r\n\r\n <div style=\"\">\r\n <WIcon\r\n style=\"cursor:pointer;\"\r\n :icon=\"menuIconLump\"\r\n :color=\"typeTrans==='LUMP'?menuIconColorActive:menuIconColor\"\r\n :colorHover=\"typeTrans==='LUMP'?menuIconColorActive:menuIconColorHover\"\r\n :size=\"menuIconSize\"\r\n @click=\"typeTrans='LUMP';$emit('update:type','LUMP')\"\r\n ></WIcon>\r\n </div>\r\n\r\n <div style=\"\" v-if=\"hasEyeDropper\">\r\n <WIcon\r\n :class=\"{'icon-spinner':loadingEyeDropper}\"\r\n style=\"cursor:pointer;\"\r\n :icon=\"loadingEyeDropper?mdiLoading:menuIconEyeDropper\"\r\n :color=\"loadingEyeDropper?menuIconColor:menuIconColorActive\"\r\n :colorHover=\"loadingEyeDropper?menuIconColor:menuIconColorActive\"\r\n :size=\"menuIconSize\"\r\n @click=\"openEyeDropper\"\r\n ></WIcon>\r\n </div>\r\n\r\n <div :style=\"`width:100%;`\"></div>\r\n\r\n <div\r\n ref=\"mtb\"\r\n :style=\"`display:flex; align-items:center;`\"\r\n >\r\n\r\n <div :style=\"`display:flex; align-items:center; border:${colorBlockBorderWidth}px solid ${useColorBlockBorderColor};`\">\r\n\r\n <div :style=\"`width:${colorBlockSize}px; min-width:${colorBlockSize}px; height:${colorBlockSize}px; background:${valueOri};`\"></div>\r\n\r\n <div :style=\"`width:${colorBlockSize}px; min-width:${colorBlockSize}px; height:${colorBlockSize}px; background:${valueNew};`\"></div>\r\n\r\n </div>\r\n\r\n <div :style=\"`padding-left:${space}px;`\"></div>\r\n\r\n <WButtonChip\r\n :text=\"btnText\"\r\n :rippleColor=\"btnRippleColor\"\r\n :paddingStyle=\"btnPaddingStyle\"\r\n :textColor=\"btnTextColor\"\r\n :textColorHover=\"btnTextColorHover\"\r\n :textColorActive=\"btnTextColorActive\"\r\n :textFontSize=\"btnTextFontSize\"\r\n :borderRadius=\"btnBorderRadius\"\r\n _borderColor=\"btnBorderColor\"\r\n _borderColorHover=\"btnBorderColorHover\"\r\n _borderColorActive=\"btnBorderColorActive\"\r\n :backgroundColor=\"btnBackgroundColor\"\r\n :backgroundColorHover=\"btnBackgroundColorHover\"\r\n :backgroundColorActive=\"btnBackgroundColorActive\"\r\n :shadow=\"btnShadow\"\r\n @click=\"clickColor\"\r\n ></WButtonChip>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <div :style=\"`padding:${space}px;`\">\r\n\r\n \x3c!-- 顏色選擇區 --\x3e\r\n <div\r\n style=\"display:flex;\"\r\n v-domresize\r\n @domresize=\"resizeSelectPanel\"\r\n >\r\n <WColorSelectPanel\r\n :type=\"typeTrans\"\r\n :size=\"size\"\r\n :space=\"0\"\r\n :backgroundColor=\"'transparent'\"\r\n :menuIconLump=\"menuIconLump\"\r\n :menuIconHsva=\"menuIconHsva\"\r\n :menuIconColor=\"menuIconColor\"\r\n :menuIconColorHover=\"menuIconColorHover\"\r\n :menuIconColorActive=\"menuIconColorActive\"\r\n :menuIconSize=\"menuIconSize\"\r\n v-model=\"valueNew\"\r\n ></WColorSelectPanel>\r\n </div>\r\n\r\n <div :style=\"`height:${space}px;`\"></div>\r\n\r\n \x3c!-- 顏色數值區 --\x3e\r\n <div\r\n style=\"display:flex;\"\r\n v-domresize\r\n @domresize=\"resizeSelectInput\"\r\n >\r\n <WColorSelectInput\r\n :size=\"Math.max(size-22,0)\"\r\n :backgroundColor=\"'transparent'\"\r\n :borderColor=\"borderColor\"\r\n :borderColorHover=\"borderColorHover\"\r\n :borderColorActive=\"borderColorActive\"\r\n :menuBorderRadius=\"menuBorderRadius\"\r\n :menuBackgroundColor=\"menuBackgroundColor\"\r\n :menuBackgroundColorHover=\"menuBackgroundColorHover\"\r\n :menuBackgroundColorActive=\"menuBackgroundColorActive\"\r\n :menuTextColor=\"menuTextColor\"\r\n :menuTextColorHover=\"menuTextColorHover\"\r\n :menuTextColorActive=\"menuTextColorActive\"\r\n :menuTextFontSize=\"menuTextFontSize\"\r\n :inputBorderRadius=\"inputBorderRadius\"\r\n :inputBorderColor=\"inputBorderColor\"\r\n :inputBorderColorHover=\"inputBorderColorHover\"\r\n :inputBorderColorActive=\"inputBorderColorActive\"\r\n :inputBackgroundColor=\"inputBackgroundColor\"\r\n :inputBackgroundColorHover=\"inputBackgroundColorHover\"\r\n :inputBackgroundColorActive=\"inputBackgroundColorActive\"\r\n :inputTextColor=\"inputTextColor\"\r\n :inputTextFontSize=\"inputTextFontSize\"\r\n :inputTextWidth=\"inputTextWidth\"\r\n :inputTextHeight=\"inputTextHeight\"\r\n :inputLabelWidth=\"inputLabelWidth\"\r\n :inputLabelColor=\"inputLabelColor\"\r\n :inputLabelFontSize=\"inputLabelFontSize\"\r\n :barProgHeight=\"barProgHeight\"\r\n :barProgColor=\"barProgColor\"\r\n :barProgBackgroundColor=\"barProgBackgroundColor\"\r\n :barSliderSize=\"barSliderSize\"\r\n :barSliderBackgroundColor=\"barSliderBackgroundColor\"\r\n :barSliderBackgroundColorHover=\"barSliderBackgroundColorHover\"\r\n v-model=\"valueNew\"\r\n ></WColorSelectInput>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </template>\r\n\r\n </WPopup>\r\n</template>\r\n\r\n<script>\r\nimport { mdiHexagonSlice6, mdiViewParallel, mdiEyedropper, mdiLoading } from '@mdi/js'\r\nimport get from 'lodash-es/get'\r\nimport isfun from 'wsemi/src/isfun.mjs'\r\nimport domGetBoudRect from 'wsemi/src/domGetBoudRect.mjs'\r\nimport convertColor from '../js/convertColor.mjs'\r\nimport domResize from '../js/domResize.mjs'\r\nimport WPopup from './WPopup.vue'\r\nimport WColorSelectPanel from './WColorSelectPanel.vue'\r\nimport WColorSelectInput from './WColorSelectInput.vue'\r\nimport WButtonChip from './WButtonChip.vue'\r\nimport WIcon from './WIcon.vue'\r\n\r\n\r\n/**\r\n * @vue-prop {String} [value='#FFFFFF'] 輸入顏色字串,預設'#FFFFFF'\r\n * @vue-prop {String} [type='HSVA'] 輸入選擇顏色方式字串,可選'LUMP'、'HSVA',預設'HSVA'\r\n * @vue-prop {Number} [size=200] 輸入尺寸數字,代表組件基礎寬度與將自動計算高度,單位px,預設200\r\n * @vue-prop {Number} [space=10] 輸入子組件間距數字,單位px,預設10\r\n * @vue-prop {Number} [colorBlockSize=20] 輸入色塊長與寬度數字,單位px,預設20\r\n * @vue-prop {Number} [colorBlockBorderWidth=1] 輸入色塊框線寬度數字,單位px,預設1\r\n * @vue-prop {String} [colorBlockBorderColor='#ddd'] 輸入色塊框線顏色字串,預設'#ddd'\r\n * @vue-prop {Boolean} [showColorText=true] 輸入是否顯示當前RGBA顏色文字布林值,預設true\r\n * @vue-prop {String} [colorTextColor='#000'] 輸入當前RGBA顏色文字顏色字串,預設'#000'\r\n * @vue-prop {String} [colorTextFontSize='0.8rem'] 輸入當前RGBA顏色文字字型大小字串,預設'0.8rem'\r\n * @vue-prop {String} [panelBackgroundColor='#fff'] 輸入彈窗背景顏色字串,預設'#fff'\r\n * @vue-prop {String} [toolBackgroundColor='#f5f5f5'] 輸入彈窗背景顏色字串,預設'#f5f5f5'\r\n * @vue-prop {String} [menuIconLump=mdiHexagonSlice6] 輸入選單LUMP模式圖標字串,預設mdiHexagonSlice6\r\n * @vue-prop {String} [menuIconHsva=mdiViewParallel] mdiViewParallel\r\n * @vue-prop {String} [menuIconEyeDropper=mdiEyedropper] 輸入取色滴管圖標字串,可為mdi,md,fa代號或mdi/js路徑,預設使用mdi的圖標(mdiEyedropper)\r\n * @vue-prop {String} [menuIconColor='#aaa'] 輸入選單圖標顏色字串,預設'#aaa'\r\n * @vue-prop {String} [menuIconColorHover='#999'] 輸入滑鼠移入時選單圖標顏色字串,預設'#999'\r\n * @vue-prop {String} [menuIconColorActive='#666'] 輸入主動模式時選單圖標顏色字串,預設'#666'\r\n * @vue-prop {Number} [menuIconSize=20] 輸入選單圖標尺寸數字,單位為px,預設20\r\n * @vue-prop {String} [borderColor='#ddd'] 輸入邊框顏色字串,預設'#ddd'\r\n * @vue-prop {String} [borderColorHover='#ccc'] 輸入滑鼠移入時邊框顏色字串,預設'#ccc'\r\n * @vue-prop {String} [borderColorActive='#777'] 輸入主動模式時邊框顏色字串,預設'#777'\r\n * @vue-prop {Number} [menuBorderRadius=4] 輸入框圓角度數字,單位為px,預設4\r\n * @vue-prop {String} [menuTextColor='#444'] 輸入選單文字顏色字串,預設'#444'\r\n * @vue-prop {String} [menuTextColorHover='#222'] 輸入滑鼠移入時選單文字顏色字串,預設'#222'\r\n * @vue-prop {String} [menuTextColorActive='#000'] 輸入主動模式時選單文字顏色字串,預設'#000'\r\n * @vue-prop {String} [menuTextFontSize='0.8rem'] 輸入選單文字字型大小字串,預設'0.8rem'\r\n * @vue-prop {String} [menuBackgroundColor='#fff'] 輸入選單背景顏色字串,預設'#fff'\r\n * @vue-prop {String} [menuBackgroundColorHover='#f9f9f9'] 輸入滑鼠移入時選單背景顏色字串,預設'#f9f9f9'\r\n * @vue-prop {String} [menuBackgroundColorActive='#f2f2f2'] 輸入主動模式時選單背景顏色字串,預設'#f2f2f2'\r\n * @vue-prop {Number} [inputBorderRadius=4] 輸入顏色數字輸入區邊框圓角度數字,單位為px,預設4\r\n * @vue-prop {String} [inputBorderColor='#ccc'] 輸入顏色數字輸入區邊框顏色字串,預設'#ccc'\r\n * @vue-prop {String} [inputBorderColorHover='#b5b5b5'] 輸入滑鼠移入時顏色數字輸入區邊框顏色字串,預設'#b5b5b5'\r\n * @vue-prop {String} [inputBorderColorActive='#aaa'] 輸入主動模式時顏色數字輸入區邊框顏色字串,預設'#aaa'\r\n * @vue-prop {String} [inputBackgroundColor='#fff'] 輸入顏色數字輸入區背景顏色字串,預設'#fff'\r\n * @vue-prop {String} [inputBackgroundColorHover='#fafafa'] 輸入滑鼠移入時顏色數字輸入區背景顏色字串,預設'#fafafa'\r\n * @vue-prop {String} [inputBackgroundColorActive='#f2f2f2'] 輸入主動模式時顏色數字輸入區背景顏色字串,預設'#f2f2f2'\r\n * @vue-prop {String} [inputTextColor='#000'] 輸入顏色數字輸入區文字顏色字串,預設'#000'\r\n * @vue-prop {String} [inputTextFontSize='0.8rem'] 輸入顏色數字輸入區文字字型大小字串,預設'0.8rem'\r\n * @vue-prop {Number} [inputTextWidth=38] 輸入顏色數字輸入區寬度數字,單位為px,預設38\r\n * @vue-prop {Number} [inputTextHeight=18] 輸入顏色數字輸入區高度數字,單位為px,預設18\r\n * @vue-prop {Number} [inputLabelWidth=12] 輸入顏色數字輸入區標題寬度數字,單位為px,預設12\r\n * @vue-prop {String} [inputLabelColor='#666'] 輸入文字顏色字串,預設'#666'\r\n * @vue-prop {String} [inputLabelFontSize='0.8rem'] 輸入文字字型大小字串,預設'0.8rem'\r\n * @vue-prop {Number} [barProgHeight=4] 輸入值域條高度數字,單位為px,預設4\r\n * @vue-prop {String} [barProgColor='#74a4d9'] 輸入值域條顏色字串,預設'#74a4d9'\r\n * @vue-prop {String} [barProgBackgroundColor='#eee'] 輸入值域條背景顏色字串,預設'#eee'\r\n * @vue-prop {Number} [barSliderSize=10] 輸入拖曳球尺寸數字,單位為px,預設10\r\n * @vue-prop {String} [barSliderBackgroundColor='#1565C0'] 輸入拖曳球背景顏色字串,預設'#1565C0'\r\n * @vue-prop {String} [barSliderBackgroundColorHover='#1976D2'] 輸入滑鼠移入時拖曳球背景顏色字串,預設'#1976D2'\r\n * @vue-prop {Number} [popupPlacementDist=5] 輸入彈窗距離觸發元素距離數字,單位為px,預設5\r\n * @vue-prop {String} [btnText='OK'] 輸入確認按鈕之文字字串,預設'OK'\r\n * @vue-prop {String} [btnRippleColor='rgba(255,255,255,0.4)'] 輸入確認按鈕之ripple效果顏色字串,預設'rgba(255,255,255,0.4)'\r\n * @vue-prop {Object} [btnPaddingStyle={v:1,h:5}] 輸入確認按鈕之內寬距離設定物件,可用鍵值為v、h、left、right、top、bottom,v代表同時設定top與bottom,h代表設定left與right,若有重複設定時後面鍵值會覆蓋前面,各鍵值為寬度數字,單位為px,預設{v:1,h:5}\r\n * @vue-prop {String} [btnTextColor='#000'] 輸入確認按鈕之文字顏色字串,預設'#000'\r\n * @vue-prop {String} [btnTextColorHover='#222'] 輸入滑鼠移入時確認按鈕之文字顏色字串,預設'#222'\r\n * @vue-prop {String} [btnTextColorActive='#222'] 輸入主動模式時確認按鈕之文字顏色字串,預設'#222'\r\n * @vue-prop {String} [btnTextFontSize='0.8rem'] 輸入確認按鈕之文字字型大小字串,預設'0.8rem'\r\n * @vue-prop {Number} [btnBorderRadius=4] 輸入確認按鈕之框圓角度數字,單位為px,預設4\r\n * @vue-prop {String} [btnBackgroundColor='rgb(241,241,241)'] 輸入確認按鈕之背景顏色字串,預設'rgb(241,241,241)'\r\n * @vue-prop {String} [btnBackgroundColorHover='rgb(236,236,236)'] 輸入滑鼠移入時確認按鈕之背景顏色字串,預設'rgb(236,236,236)'\r\n * @vue-prop {String} [btnBackgroundColorActive='rgb(236,236,236)'] 輸入主動模式時確認按鈕之背景顏色字串,預設'rgb(236,236,236)'\r\n * @vue-prop {Boolean} [btnShadow=true] 輸入確認按鈕之是否顯示陰影布林值,預設true\r\n * @vue-prop {Boolean} [editable=true] 輸入是否為編輯模式布林值,預設true\r\n */\r\nexport default {\r\n directives: {\r\n domresize: domResize(),\r\n },\r\n components: {\r\n WPopup,\r\n WColorSelectPanel,\r\n WColorSelectInput,\r\n WButtonChip,\r\n WIcon,\r\n },\r\n props: {\r\n value: {\r\n type: String,\r\n default: '#FFFFFF',\r\n },\r\n type: {\r\n type: String,\r\n default: 'HSVA',\r\n },\r\n size: {\r\n type: Number,\r\n default: 200,\r\n },\r\n space: {\r\n type: Number,\r\n default: 10,\r\n },\r\n colorBlockSize: {\r\n type: Number,\r\n default: 20,\r\n },\r\n colorBlockBorderWidth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n colorBlockBorderColor: {\r\n type: String,\r\n default: '#ddd',\r\n },\r\n showColorText: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n colorTextColor: {\r\n type: String,\r\n default: '#000',\r\n },\r\n colorTextFontSize: {\r\n type: String,\r\n default: '0.8rem',\r\n },\r\n panelBackgroundColor: {\r\n type: String,\r\n default: '#fff',\r\n },\r\n toolBackgroundColor: {\r\n type: String,\r\n default: '#f5f5f5',\r\n },\r\n menuIconLump: {\r\n type: String,\r\n default: mdiHexagonSlice6,\r\n },\r\n menuIconHsva: {\r\n type: String,\r\n default: mdiViewParallel,\r\n },\r\n menuIconEyeDropper: {\r\n type: String,\r\n default: mdiEyedropper,\r\n },\r\n menuIconColor: {\r\n type: String,\r\n default: '#aaa',\r\n },\r\n menuIconColorHover: {\r\n type: String,\r\n default: '#999',\r\n },\r\n menuIconColorActive: {\r\n type: String,\r\n default: '#666',\r\n },\r\n menuIconSize: {\r\n type: Number,\r\n default: 20,\r\n },\r\n borderColor: {\r\n type: String,\r\n default: '#ddd',\r\n },\r\n borderColorHover: {\r\n type: String,\r\n default: '#ccc',\r\n },\r\n borderColorActive: {\r\n type: String,\r\n default: '#777',\r\n },\r\n menuBorderRadius: {\r\n type: Number,\r\n default: 4,\r\n },\r\n menuTextColor: {\r\n type: String,\r\n default: '#444',\r\n },\r\n menuTextColorHover: {\r\n type: String,\r\n default: '#222',\r\n },\r\n menuTextColorActive: {\r\n type: String,\r\n default: '#000',\r\n },\r\n menuTextFontSize: {\r\n type: String,\r\n default: '0.8rem',\r\n },\r\n menuBackgroundColor: {\r\n type: String,\r\n default: '#fff',\r\n },\r\n menuBackgroundColorHover: {\r\n type: String,\r\n default: '#f9f9f9',\r\n },\r\n menuBackgroundColorActive: {\r\n type: String,\r\n default: '#f2f2f2',\r\n },\r\n inputBorderRadius: {\r\n type: Number,\r\n default: 4,\r\n },\r\n inputBorderColor: {\r\n type: String,\r\n default: '#ccc',\r\n },\r\n inputBorderColorHover: {\r\n type: String,\r\n default: '#b5b5b5',\r\n },\r\n inputBorderColorActive: {\r\n type: String,\r\n default: '#aaa',\r\n },\r\n inputBackgroundColor: {\r\n type: String,\r\n default: '#fff',\r\n },\r\n inputBackgroundColorHover: {\r\n type: String,\r\n default: '#fafafa',\r\n },\r\n inputBackgroundColorActive: {\r\n type: String,\r\n default: '#f2f2f2',\r\n },\r\n inputTextColor: {\r\n type: String,\r\n default: '#000',\r\n },\r\n inputTextFontSize: {\r\n type: String,\r\n default: '0.8rem',\r\n },\r\n inputTextWidth: {\r\n type: Number,\r\n default: 38,\r\n },\r\n inputTextHeight: {\r\n type: Number,\r\n default: 18,\r\n },\r\n inputLabelWidth: {\r\n type: Number,\r\n default: 12,\r\n },\r\n inputLabelColor: {\r\n type: String,\r\n default: '#666',\r\n },\r\n inputLabelFontSize: {\r\n type: String,\r\n default: '0.8rem',\r\n },\r\n barProgHeight: {\r\n type: Number,\r\n default: 4,\r\n },\r\n barProgColor: {\r\n type: String,\r\n default: '#74a4d9',\r\n },\r\n barProgBackgroundColor: {\r\n type: String,\r\n default: '#eee',\r\n },\r\n barSliderSize: {\r\n type: Number,\r\n default: 10,\r\n },\r\n barSliderBackgroundColor: {\r\n type: String,\r\n default: '#1565C0',\r\n },\r\n barSliderBackgroundColorHover: {\r\n type: String,\r\n default: '#1976D2',\r\n },\r\n popupPlacementDist: {\r\n type: Number,\r\n default: 5,\r\n },\r\n btnText: {\r\n type: String,\r\n default: 'OK',\r\n },\r\n btnRippleColor: {\r\n type: String,\r\n default: 'rgba(255,255,255,0.4)',\r\n },\r\n btnPaddingStyle: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n v: 1,\r\n h: 5,\r\n }\r\n },\r\n },\r\n btnTextColor: {\r\n type: String,\r\n default: '#000',\r\n },\r\n btnTextColorHover: {\r\n type: String,\r\n default: '#222',\r\n },\r\n btnTextColorActive: {\r\n type: String,\r\n default: '#222',\r\n },\r\n btnTextFontSize: {\r\n type: String,\r\n default: '0.8rem',\r\n },\r\n btnBorderRadius: {\r\n type: Number,\r\n default: 4,\r\n },\r\n btnBackgroundColor: {\r\n type: String,\r\n default: 'rgb(241,241,241)',\r\n },\r\n btnBackgroundColorHover: {\r\n type: String,\r\n default: 'rgb(236,236,236)',\r\n },\r\n btnBackgroundColorActive: {\r\n type: String,\r\n default: 'rgb(236,236,236)',\r\n },\r\n btnShadow: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n editable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n },\r\n data: function() {\r\n return {\r\n mdiLoading,\r\n\r\n show: false,\r\n\r\n typeTrans: 'HSVA',\r\n\r\n loadingEyeDropper: false,\r\n\r\n layoutType: 'horizontal',\r\n layoutOverflowY: false,\r\n layoutMinY: 300,\r\n layoutMaxY: 300,\r\n\r\n selectPanelHeight: 0,\r\n selectInputHeight: 0,\r\n\r\n valueOri: null,\r\n valueNew: null,\r\n\r\n }\r\n },\r\n computed: {\r\n\r\n changeValue: function() {\r\n let vo = this\r\n vo.valueOri = convertColor(vo.value)\r\n vo.valueNew = vo.valueOri\r\n return ''\r\n },\r\n\r\n changeType: function() {\r\n let vo = this\r\n vo.typeTrans = vo.type\r\n return ''\r\n },\r\n\r\n hasEyeDropper: function() {\r\n // let vo = this\r\n let b = isfun(window.EyeDropper)\r\n // console.log('window.EyeDropper', window.EyeDropper)\r\n return b\r\n },\r\n\r\n useColorBlockBorderColor: function() {\r\n let vo = this\r\n return convertColor(vo.colorBlockBorderColor)\r\n },\r\n\r\n useColorTextColor: function() {\r\n let vo = this\r\n return convertColor(vo.colorTextColor)\r\n },\r\n\r\n usePanelBackgroundColor: function() {\r\n let vo = this\r\n return convertColor(vo.panelBackgroundColor)\r\n },\r\n\r\n useToolBackgroundColor: function() {\r\n let vo = this\r\n return convertColor(vo.toolBackgroundColor)\r\n },\r\n\r\n useBorderColor: function() {\r\n let vo = this\r\n return convertColor(vo.borderColor)\r\n },\r\n\r\n usePanelOverflow: function() {\r\n let vo = this\r\n let of = `overflow-y:auto; min-height:${vo.layoutMinY}px;`\r\n if (vo.layoutOverflowY) {\r\n of += `max-height:${vo.layoutMaxY}px;`\r\n }\r\n return of\r\n },\r\n\r\n },\r\n methods: {\r\n\r\n resize: function(msg) {\r\n // console.log('methods resize', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.show) {\r\n return\r\n }\r\n\r\n let w = get(msg, 'snew.windowWidth', 0)\r\n // let h = get(msg, 'snew.windowHeight', 0)\r\n // console.log('w', w, 'h', h, b)\r\n\r\n //layoutType\r\n let b = w >= 2 * (vo.size + 20) + 3 * vo.space //20為組件設定, 不提供外部更改故可直接給\r\n vo.layoutType = b ? 'horizontal' : 'vertical'\r\n // console.log('layoutType', vo.layoutType)\r\n\r\n },\r\n\r\n resizeContent: function(msg) {\r\n // console.log('methods resizeContent', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.show) {\r\n return\r\n }\r\n\r\n // let w = get(msg, 'snew.windowWidth', 0)\r\n let h = get(msg, 'snew.windowHeight', 0)\r\n\r\n try {\r\n\r\n // console.log('vo.$refs.ct', vo.$refs.ct)\r\n let rt = domGetBoudRect(vo.$refs.ct)\r\n // console.log('rt', rt)\r\n\r\n //hc, 概估組件size=200時高度\r\n let hc = 500\r\n\r\n //layoutOverflowY\r\n vo.layoutOverflowY = rt.top + hc > h\r\n // console.log('layoutOverflowY', vo.layoutOverflowY)\r\n\r\n //layoutMaxY\r\n vo.layoutMaxY = Math.max(h - rt.top - 30, vo.layoutMinY) //30是概估與底部的留白距離\r\n // console.log('layoutMaxY', vo.layoutMaxY)\r\n\r\n }\r\n catch (err) {}\r\n\r\n },\r\n\r\n resizeSelectPanel: function(msg) {\r\n // console.log('methods resizeSelectPanel', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.show) {\r\n return\r\n }\r\n\r\n let h = get(msg, 'snew.clientHeight', 0)\r\n\r\n //save\r\n vo.selectPanelHeight = h\r\n\r\n },\r\n\r\n resizeSelectInput: function(msg) {\r\n // console.log('methods resizeSelectInput', msg)\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.show) {\r\n return\r\n }\r\n\r\n let h = get(msg, 'snew.clientHeight', 0)\r\n\r\n //save\r\n vo.selectInputHeight = h\r\n\r\n },\r\n\r\n openEyeDropper: function() {\r\n // console.log('methods openEyeDropper')\r\n\r\n let vo = this\r\n\r\n //check\r\n if (!vo.hasEyeDropper) {\r\n return\r\n }\r\n\r\n vo.loadingEyeDropper = true\r\n\r\n let eyeDropper = new window.EyeDropper()\r\n eyeDropper\r\n .open()\r\n .then((res) => {\r\n // console.log('res', res)\r\n let hex = get(res, 'sRGBHex', '#fff')\r\n vo.valueNew = hex\r\n })\r\n .catch((err) => {\r\n console.log(err)\r\n })\r\n .finally(() => {\r\n vo.loadingEyeDropper = false\r\n })\r\n\r\n },\r\n\r\n clickColor: function() {\r\n // console.log('methods clickColor')\r\n\r\n let vo = this\r\n\r\n //check, 不可編輯時跳出\r\n if (!vo.editable) {\r\n return\r\n }\r\n\r\n //emit\r\n vo.$emit('input', vo.valueNew)\r\n\r\n //hide\r\n vo.show = false\r\n\r\n },\r\n\r\n },\r\n}\r\n<\/script>\r\n\r\n<style scoped>\r\n.icon-spinner {\r\n animation: spin-animation 1.5s infinite;\r\n display: inline-block;\r\n}\r\n@keyframes spin-animation {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(359deg);\r\n }\r\n}\r\n</style>\r\n"]},media:void 0})}),qh,"data-v-776154e8",false,undefined,!1,ms,void 0,void 0);function Kh(e,t){return $n(e)&&oa(t)?0===(t=Xi(t))?e:sa(e,e.length-t):""}function Qh(e){if(!$n(e))return"";let t=function(e){if(!$n(e))return{path:"",isRoot:!1};for(;e.indexOf("\\\\")>=0;)e=e.replace("\\\\","\\");for(;e.indexOf("//")>=0;)e=e.replace("//","/");if(":"===aa(e,1))return{path:`${e}\\`,isRoot:!0};if("\\"===aa(e,1)){let t=Kh(e,1);return":"===aa(t,1)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}if("/"===aa(e,1)){let t=Kh(e,1);return 0===ur(t)?{path:e,isRoot:!0}:{path:t,isRoot:!1}}return{path:e,isRoot:!1}}(e);if(t.isRoot)return t.path;let n=t.path;try{n=n.split("\\").pop().split("/").pop()}catch(e){}return n}function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ep(Object(n),!0).forEach((function(t){vr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2010-2023 Three.js Authors
|
|
18
|
+
* SPDX-License-Identifier: MIT
|
|
19
|
+
*/const np="159",rp=1,ip=2,op=3,sp=0,ap=1,lp=100,cp=204,up=205,dp=0,hp=1,pp=2,fp=0,mp=1,gp=2,vp=3,yp=4,_p=5,xp="attached",bp="detached",Sp=300,wp=301,Cp=302,Ap=303,Mp=304,Tp=306,Ep=1e3,Lp=1001,Rp=1002,Pp=1003,kp=1004,Ip=1005,Op=1006,Bp=1007,Dp=1008,Up=1009,Fp=1012,Np=1013,zp=1014,Hp=1015,Vp=1016,Wp=1017,jp=1018,Gp=1020,$p=1023,Xp=1026,Yp=1027,qp=1029,Zp=1031,Jp=1033,Kp=33776,Qp=33777,ef=33778,tf=33779,nf=35840,rf=35841,of=35842,sf=35843,af=36196,lf=37492,cf=37496,uf=37808,df=37809,hf=37810,pf=37811,ff=37812,mf=37813,gf=37814,vf=37815,yf=37816,_f=37817,xf=37818,bf=37819,Sf=37820,wf=37821,Cf=36492,Af=36494,Mf=36495,Tf=36284,Ef=36285,Lf=36286,Rf=2300,Pf=2301,kf=2302,If=2400,Of=2401,Bf=2402,Df=2500,Uf=2501,Ff=3e3,Nf=3001,zf="",Hf="srgb",Vf="srgb-linear",Wf="display-p3",jf="display-p3-linear",Gf="linear",$f="srgb",Xf="rec709",Yf="p3",qf=7680,Zf=35044,Jf="300 es",Kf=1035,Qf=2e3,em=2001;let tm=class{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}};const nm=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let rm=1234567;const im=Math.PI/180,om=180/Math.PI;function sm(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(nm[255&e]+nm[e>>8&255]+nm[e>>16&255]+nm[e>>24&255]+"-"+nm[255&t]+nm[t>>8&255]+"-"+nm[t>>16&15|64]+nm[t>>24&255]+"-"+nm[63&n|128]+nm[n>>8&255]+"-"+nm[n>>16&255]+nm[n>>24&255]+nm[255&r]+nm[r>>8&255]+nm[r>>16&255]+nm[r>>24&255]).toLowerCase()}function am(e,t,n){return Math.max(t,Math.min(n,e))}function lm(e,t){return(e%t+t)%t}function cm(e,t,n){return(1-n)*e+n*t}function um(e){return 0==(e&e-1)&&0!==e}function dm(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function hm(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function pm(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const fm={DEG2RAD:im,RAD2DEG:om,generateUUID:sm,clamp:am,euclideanModulo:lm,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:cm,damp:function(e,t,n,r){return cm(e,t,1-Math.exp(-n*r))},pingpong:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs(lm(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(rm=e);let t=rm+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*im},radToDeg:function(e){return e*om},isPowerOfTwo:um,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:dm,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((t+r)/2),u=s((t+r)/2),d=o((t-r)/2),h=s((t-r)/2),p=o((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(a*u,l*d,l*h,a*c);break;case"YZY":e.set(l*h,a*u,l*d,a*c);break;case"ZXZ":e.set(l*d,l*h,a*u,a*c);break;case"XZX":e.set(a*u,l*f,l*p,a*c);break;case"YXY":e.set(l*p,a*u,l*f,a*c);break;case"ZYZ":e.set(l*f,l*p,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:pm,denormalize:hm};class mm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;mm.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(am(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class gm{constructor(e,t,n,r,i,o,s,a,l){gm.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,o,s,a,l)}set(e,t,n,r,i,o,s,a,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=i,c[5]=a,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[3],a=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],x=r[2],b=r[5],S=r[8];return i[0]=o*f+s*v+a*x,i[3]=o*m+s*y+a*b,i[6]=o*g+s*_+a*S,i[1]=l*f+c*v+u*x,i[4]=l*m+c*y+u*b,i[7]=l*g+c*_+u*S,i[2]=d*f+h*v+p*x,i[5]=d*m+h*y+p*b,i[8]=d*g+h*_+p*S,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*o*c-t*s*l-n*i*c+n*s*a+r*i*l-r*o*a}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=c*o-s*l,d=s*a-c*i,h=l*i-o*a,p=t*u+n*d+r*h;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=u*f,e[1]=(r*l-c*n)*f,e[2]=(s*n-r*o)*f,e[3]=d*f,e[4]=(c*t-r*a)*f,e[5]=(r*i-s*t)*f,e[6]=h*f,e[7]=(n*a-l*t)*f,e[8]=(o*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,s){const a=Math.cos(i),l=Math.sin(i);return this.set(n*a,n*l,-n*(a*o+l*s)+o+e,-r*l,r*a,-r*(-l*o+a*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(vm.makeScale(e,t)),this}rotate(e){return this.premultiply(vm.makeRotation(-e)),this}translate(e,t){return this.premultiply(vm.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const vm=new gm;function ym(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const _m={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function xm(e,t){return new _m[e](t)}function bm(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Sm(){const e=bm("canvas");return e.style.display="block",e}const wm={};function Cm(e){e in wm||(wm[e]=!0,console.warn(e))}const Am=(new gm).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Mm=(new gm).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Tm={[Vf]:{transfer:Gf,primaries:Xf,toReference:e=>e,fromReference:e=>e},[Hf]:{transfer:$f,primaries:Xf,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[jf]:{transfer:Gf,primaries:Yf,toReference:e=>e.applyMatrix3(Mm),fromReference:e=>e.applyMatrix3(Am)},[Wf]:{transfer:$f,primaries:Yf,toReference:e=>e.convertSRGBToLinear().applyMatrix3(Mm),fromReference:e=>e.applyMatrix3(Am).convertLinearToSRGB()}},Em=new Set([Vf,jf]),Lm={enabled:!0,_workingColorSpace:Vf,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!Em.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=Tm[t].toReference;return(0,Tm[n].fromReference)(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return Tm[e].primaries},getTransfer:function(e){return e===zf?Gf:Tm[e].transfer}};function Rm(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Pm(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let km;class Im{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===km&&(km=bm("canvas")),km.width=e.width,km.height=e.height;const n=km.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=km}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=bm("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*Rm(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Rm(t[e]/255)):t[e]=Rm(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Om=0;class Bm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.isSource=!0,Object.defineProperty(this,"id",{value:Om++}),this.uuid=sm(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(Dm(r[t].image)):e.push(Dm(r[t]))}else e=Dm(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function Dm(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Im.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Um=0;class Fm extends tm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fm.DEFAULT_IMAGE,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fm.DEFAULT_MAPPING,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lp,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lp,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Op,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Dp,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:$p,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Up,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Fm.DEFAULT_ANISOTROPY,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:zf;super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Um++}),this.uuid=sm(),this.name="",this.source=new Bm(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=a,this.offset=new mm(0,0),this.repeat=new mm(1,1),this.center=new mm(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new gm,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof c?this.colorSpace=c:(Cm("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===Nf?Hf:zf),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){void 0===e&&(e=null),this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Sp)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ep:e.x=e.x-Math.floor(e.x);break;case Lp:e.x=e.x<0?0:1;break;case Rp:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Ep:e.y=e.y-Math.floor(e.y);break;case Lp:e.y=e.y<0?0:1;break;case Rp:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Cm("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Hf?Nf:Ff}set encoding(e){Cm("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Nf?Hf:zf}}Fm.DEFAULT_IMAGE=null,Fm.DEFAULT_MAPPING=Sp,Fm.DEFAULT_ANISOTROPY=1;class Nm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;Nm.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=.01,s=.1,a=e.elements,l=a[0],c=a[4],u=a[8],d=a[1],h=a[5],p=a[9],f=a[2],m=a[6],g=a[10];if(Math.abs(c-d)<o&&Math.abs(u-f)<o&&Math.abs(p-m)<o){if(Math.abs(c+d)<s&&Math.abs(u+f)<s&&Math.abs(p+m)<s&&Math.abs(l+h+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,a=(h+1)/2,v=(g+1)/2,y=(c+d)/4,_=(u+f)/4,x=(p+m)/4;return e>a&&e>v?e<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=_/n):a>v?a<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(a),n=y/r,i=x/r):v<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=_/i,r=x/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-p)*(m-p)+(u-f)*(u-f)+(d-c)*(d-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(u-f)/v,this.z=(d-c)/v,this.w=Math.acos((l+h+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class zm extends tm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Nm(0,0,e,t),this.scissorTest=!1,this.viewport=new Nm(0,0,e,t);const r={width:e,height:t,depth:1};void 0!==n.encoding&&(Cm("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Nf?Hf:zf),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Op,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},n),this.texture=new Fm(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps,this.texture.internalFormat=n.internalFormat,this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}setSize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Bm(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Hm extends zm{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),this.isWebGLRenderTarget=!0}}class Vm extends Fm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Pp,this.minFilter=Pp,this.wrapR=Lp,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Wm extends Fm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Pp,this.minFilter=Pp,this.wrapR=Lp,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class jm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,o,s){let a=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const d=i[o+0],h=i[o+1],p=i[o+2],f=i[o+3];if(0===s)return e[t+0]=a,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===s)return e[t+0]=d,e[t+1]=h,e[t+2]=p,void(e[t+3]=f);if(u!==f||a!==d||l!==h||c!==p){let e=1-s;const t=a*d+l*h+c*p+u*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,s=Math.sin(s*o)/i}const i=s*n;if(a=a*e+d*i,l=l*e+h*i,c=c*e+p*i,u=u*e+f*i,e===1-s){const e=1/Math.sqrt(a*a+l*l+c*c+u*u);a*=e,l*=e,c*=e,u*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const s=n[r],a=n[r+1],l=n[r+2],c=n[r+3],u=i[o],d=i[o+1],h=i[o+2],p=i[o+3];return e[t]=s*p+c*u+a*h-l*d,e[t+1]=a*p+c*d+l*u-s*h,e[t+2]=l*p+c*h+s*d-a*u,e[t+3]=c*p-s*u-a*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,o=e._order,s=Math.cos,a=Math.sin,l=s(n/2),c=s(r/2),u=s(i/2),d=a(n/2),h=a(r/2),p=a(i/2);switch(o){case"XYZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"YXZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"ZXY":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"ZYX":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"YZX":this._x=d*c*u+l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u-d*h*p;break;case"XZY":this._x=d*c*u-l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u+d*h*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],u=t[10],d=n+s+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-a)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-a)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(am(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,s=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+o*s+r*l-i*a,this._y=r*c+o*a+i*s-n*l,this._z=i*c+o*l+n*a-r*s,this._w=o*c-n*s-r*a-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let s=o*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const a=1-s*s;if(a<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,s),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Gm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Gm.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Xm.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Xm.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,s=e.z,a=e.w,l=2*(o*r-s*n),c=2*(s*t-i*r),u=2*(i*n-o*t);return this.x=t+a*l+o*u-s*c,this.y=n+a*c+s*l-i*u,this.z=r+a*u+i*c-o*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,s=t.y,a=t.z;return this.x=r*a-i*s,this.y=i*o-n*a,this.z=n*s-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return $m.copy(this).projectOnVector(e),this.sub($m)}reflect(e){return this.sub($m.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(am(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const $m=new Gm,Xm=new jm;class Ym{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm(1/0,1/0,1/0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm(-1/0,-1/0,-1/0);this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Zm.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Zm.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Zm.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n){const r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,Zm):Zm.fromBufferAttribute(r,t),Zm.applyMatrix4(e.matrixWorld),this.expandByPoint(Zm);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),Jm.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),Jm.copy(n.boundingBox)),Jm.applyMatrix4(e.matrixWorld),this.union(Jm)}const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Zm),Zm.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ig),og.subVectors(this.max,ig),Km.subVectors(e.a,ig),Qm.subVectors(e.b,ig),eg.subVectors(e.c,ig),tg.subVectors(Qm,Km),ng.subVectors(eg,Qm),rg.subVectors(Km,eg);let t=[0,-tg.z,tg.y,0,-ng.z,ng.y,0,-rg.z,rg.y,tg.z,0,-tg.x,ng.z,0,-ng.x,rg.z,0,-rg.x,-tg.y,tg.x,0,-ng.y,ng.x,0,-rg.y,rg.x,0];return!!lg(t,Km,Qm,eg,og)&&(t=[1,0,0,0,1,0,0,0,1],!!lg(t,Km,Qm,eg,og)&&(sg.crossVectors(tg,ng),t=[sg.x,sg.y,sg.z],lg(t,Km,Qm,eg,og)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Zm).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Zm).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(qm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qm)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const qm=[new Gm,new Gm,new Gm,new Gm,new Gm,new Gm,new Gm,new Gm],Zm=new Gm,Jm=new Ym,Km=new Gm,Qm=new Gm,eg=new Gm,tg=new Gm,ng=new Gm,rg=new Gm,ig=new Gm,og=new Gm,sg=new Gm,ag=new Gm;function lg(e,t,n,r,i){for(let o=0,s=e.length-3;o<=s;o+=3){ag.fromArray(e,o);const s=i.x*Math.abs(ag.x)+i.y*Math.abs(ag.y)+i.z*Math.abs(ag.z),a=t.dot(ag),l=n.dot(ag),c=r.dot(ag);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>s)return!1}return!0}const cg=new Ym,ug=new Gm,dg=new Gm;class hg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):cg.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ug.subVectors(e,this.center);const t=ug.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(ug,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(dg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ug.copy(e.center).add(dg)),this.expandByPoint(ug.copy(e.center).sub(dg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const pg=new Gm,fg=new Gm,mg=new Gm,gg=new Gm,vg=new Gm,yg=new Gm,_g=new Gm;class xg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm(0,0,-1);this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,pg)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=pg.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pg.copy(this.origin).addScaledVector(this.direction,t),pg.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){fg.copy(e).add(t).multiplyScalar(.5),mg.copy(t).sub(e).normalize(),gg.copy(this.origin).sub(fg);const i=.5*e.distanceTo(t),o=-this.direction.dot(mg),s=gg.dot(this.direction),a=-gg.dot(mg),l=gg.lengthSq(),c=Math.abs(1-o*o);let u,d,h,p;if(c>0)if(u=o*a-s,d=o*s-a,p=i*c,u>=0)if(d>=-p)if(d<=p){const e=1/c;u*=e,d*=e,h=u*(u+o*d+2*s)+d*(o*u+d+2*a)+l}else d=i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d=-i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d<=-p?(u=Math.max(0,-(-o*i+s)),d=u>0?-i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l):d<=p?(u=0,d=Math.min(Math.max(-i,-a),i),h=d*(d+2*a)+l):(u=Math.max(0,-(o*i+s)),d=u>0?i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l);else d=o>0?-i:i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(fg).addScaledVector(mg,d),h}intersectSphere(e,t){pg.subVectors(e.center,this.origin);const n=pg.dot(this.direction),r=pg.dot(pg)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),s=n-o,a=n+o;return a<0?null:s<0?this.at(a,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,s,a;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,o=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,o=(e.min.y-d.y)*c),n>o||i>r?null:((i>n||isNaN(n))&&(n=i),(o<r||isNaN(r))&&(r=o),u>=0?(s=(e.min.z-d.z)*u,a=(e.max.z-d.z)*u):(s=(e.max.z-d.z)*u,a=(e.min.z-d.z)*u),n>a||s>r?null:((s>n||n!=n)&&(n=s),(a<r||r!=r)&&(r=a),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,pg)}intersectTriangle(e,t,n,r,i){vg.subVectors(t,e),yg.subVectors(n,e),_g.crossVectors(vg,yg);let o,s=this.direction.dot(_g);if(s>0){if(r)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}gg.subVectors(this.origin,e);const a=o*this.direction.dot(yg.crossVectors(gg,yg));if(a<0)return null;const l=o*this.direction.dot(vg.cross(gg));if(l<0)return null;if(a+l>s)return null;const c=-o*gg.dot(_g);return c<0?null:this.at(c/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class bg{constructor(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m){bg.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m)}set(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new bg).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/Sg.setFromMatrixColumn(e,0).length(),i=1/Sg.setFromMatrixColumn(e,1).length(),o=1/Sg.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=-a*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*a,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*a}else if("YXZ"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=o*a}else if("ZXY"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e-i*s,t[4]=-o*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=o*c,t[9]=i-e*s,t[2]=-o*l,t[6]=s,t[10]=o*a}else if("ZYX"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=a*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*a,t[10]=o*a}else if("YZX"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=s*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Cg,e,Ag)}lookAt(e,t,n){const r=this.elements;return Eg.subVectors(e,t),0===Eg.lengthSq()&&(Eg.z=1),Eg.normalize(),Mg.crossVectors(n,Eg),0===Mg.lengthSq()&&(1===Math.abs(n.z)?Eg.x+=1e-4:Eg.z+=1e-4,Eg.normalize(),Mg.crossVectors(n,Eg)),Mg.normalize(),Tg.crossVectors(Eg,Mg),r[0]=Mg.x,r[4]=Tg.x,r[8]=Eg.x,r[1]=Mg.y,r[5]=Tg.y,r[9]=Eg.y,r[2]=Mg.z,r[6]=Tg.z,r[10]=Eg.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],b=r[0],S=r[4],w=r[8],C=r[12],A=r[1],M=r[5],T=r[9],E=r[13],L=r[2],R=r[6],P=r[10],k=r[14],I=r[3],O=r[7],B=r[11],D=r[15];return i[0]=o*b+s*A+a*L+l*I,i[4]=o*S+s*M+a*R+l*O,i[8]=o*w+s*T+a*P+l*B,i[12]=o*C+s*E+a*k+l*D,i[1]=c*b+u*A+d*L+h*I,i[5]=c*S+u*M+d*R+h*O,i[9]=c*w+u*T+d*P+h*B,i[13]=c*C+u*E+d*k+h*D,i[2]=p*b+f*A+m*L+g*I,i[6]=p*S+f*M+m*R+g*O,i[10]=p*w+f*T+m*P+g*B,i[14]=p*C+f*E+m*k+g*D,i[3]=v*b+y*A+_*L+x*I,i[7]=v*S+y*M+_*R+x*O,i[11]=v*w+y*T+_*P+x*B,i[15]=v*C+y*E+_*k+x*D,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],s=e[5],a=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+i*a*u-r*l*u-i*s*d+n*l*d+r*s*h-n*a*h)+e[7]*(+t*a*h-t*l*d+i*o*d-r*o*h+r*l*c-i*a*c)+e[11]*(+t*l*u-t*s*h-i*o*u+n*o*h+i*s*c-n*l*c)+e[15]*(-r*s*c-t*a*u+t*s*d+r*o*u-n*o*d+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=u*m*l-f*d*l+f*a*h-s*m*h-u*a*g+s*d*g,y=p*d*l-c*m*l-p*a*h+o*m*h+c*a*g-o*d*g,_=c*f*l-p*u*l+p*s*h-o*f*h-c*s*g+o*u*g,x=p*u*a-c*f*a-p*s*d+o*f*d+c*s*m-o*u*m,b=t*v+n*y+r*_+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/b;return e[0]=v*S,e[1]=(f*d*i-u*m*i-f*r*h+n*m*h+u*r*g-n*d*g)*S,e[2]=(s*m*i-f*a*i+f*r*l-n*m*l-s*r*g+n*a*g)*S,e[3]=(u*a*i-s*d*i-u*r*l+n*d*l+s*r*h-n*a*h)*S,e[4]=y*S,e[5]=(c*m*i-p*d*i+p*r*h-t*m*h-c*r*g+t*d*g)*S,e[6]=(p*a*i-o*m*i-p*r*l+t*m*l+o*r*g-t*a*g)*S,e[7]=(o*d*i-c*a*i+c*r*l-t*d*l-o*r*h+t*a*h)*S,e[8]=_*S,e[9]=(p*u*i-c*f*i-p*n*h+t*f*h+c*n*g-t*u*g)*S,e[10]=(o*f*i-p*s*i+p*n*l-t*f*l-o*n*g+t*s*g)*S,e[11]=(c*s*i-o*u*i-c*n*l+t*u*l+o*n*h-t*s*h)*S,e[12]=x*S,e[13]=(c*f*r-p*u*r+p*n*d-t*f*d-c*n*m+t*u*m)*S,e[14]=(p*s*r-o*f*r-p*n*a+t*f*a+o*n*m-t*s*m)*S,e[15]=(o*u*r-c*s*r+c*n*a-t*u*a-o*n*d+t*s*d)*S,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,s=e.y,a=e.z,l=i*o,c=i*s;return this.set(l*o+n,l*s-r*a,l*a+r*s,0,l*s+r*a,c*s+n,c*a-r*o,0,l*a-r*s,c*a+r*o,i*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,s=t._z,a=t._w,l=i+i,c=o+o,u=s+s,d=i*l,h=i*c,p=i*u,f=o*c,m=o*u,g=s*u,v=a*l,y=a*c,_=a*u,x=n.x,b=n.y,S=n.z;return r[0]=(1-(f+g))*x,r[1]=(h+_)*x,r[2]=(p-y)*x,r[3]=0,r[4]=(h-_)*b,r[5]=(1-(d+g))*b,r[6]=(m+v)*b,r[7]=0,r[8]=(p+y)*S,r[9]=(m-v)*S,r[10]=(1-(d+f))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=Sg.set(r[0],r[1],r[2]).length();const o=Sg.set(r[4],r[5],r[6]).length(),s=Sg.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],wg.copy(this);const a=1/i,l=1/o,c=1/s;return wg.elements[0]*=a,wg.elements[1]*=a,wg.elements[2]*=a,wg.elements[4]*=l,wg.elements[5]*=l,wg.elements[6]*=l,wg.elements[8]*=c,wg.elements[9]*=c,wg.elements[10]*=c,t.setFromRotationMatrix(wg),n.x=i,n.y=o,n.z=s,this}makePerspective(e,t,n,r,i,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Qf;const a=this.elements,l=2*i/(t-e),c=2*i/(n-r),u=(t+e)/(t-e),d=(n+r)/(n-r);let h,p;if(s===Qf)h=-(o+i)/(o-i),p=-2*o*i/(o-i);else{if(s!==em)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);h=-o/(o-i),p=-o*i/(o-i)}return a[0]=l,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Qf;const a=this.elements,l=1/(t-e),c=1/(n-r),u=1/(o-i),d=(t+e)*l,h=(n+r)*c;let p,f;if(s===Qf)p=(o+i)*u,f=-2*u;else{if(s!==em)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=i*u,f=-1*u}return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=f,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Sg=new Gm,wg=new bg,Cg=new Gm(0,0,0),Ag=new Gm(1,1,1),Mg=new Gm,Tg=new Gm,Eg=new Gm,Lg=new bg,Rg=new jm;class Pg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Pg.DEFAULT_ORDER;this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.elements,i=r[0],o=r[4],s=r[8],a=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(am(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-am(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(am(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,i));break;case"ZYX":this._y=Math.asin(-am(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(a,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(am(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-am(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Lg.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Lg,t,n)}setFromVector3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}reorder(e){return Rg.setFromEuler(this),this.setFromQuaternion(Rg,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Pg.DEFAULT_ORDER="XYZ";class kg{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let Ig=0;const Og=new Gm,Bg=new jm,Dg=new bg,Ug=new Gm,Fg=new Gm,Ng=new Gm,zg=new jm,Hg=new Gm(1,0,0),Vg=new Gm(0,1,0),Wg=new Gm(0,0,1),jg={type:"added"},Gg={type:"removed"};class $g extends tm{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Ig++}),this.uuid=sm(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=$g.DEFAULT_UP.clone();const e=new Gm,t=new Pg,n=new jm,r=new Gm(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new bg},normalMatrix:{value:new gm}}),this.matrix=new bg,this.matrixWorld=new bg,this.matrixAutoUpdate=$g.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=$g.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new kg,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Bg.setFromAxisAngle(e,t),this.quaternion.multiply(Bg),this}rotateOnWorldAxis(e,t){return Bg.setFromAxisAngle(e,t),this.quaternion.premultiply(Bg),this}rotateX(e){return this.rotateOnAxis(Hg,e)}rotateY(e){return this.rotateOnAxis(Vg,e)}rotateZ(e){return this.rotateOnAxis(Wg,e)}translateOnAxis(e,t){return Og.copy(e).applyQuaternion(this.quaternion),this.position.add(Og.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Hg,e)}translateY(e){return this.translateOnAxis(Vg,e)}translateZ(e){return this.translateOnAxis(Wg,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Dg.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ug.copy(e):Ug.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Fg.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Dg.lookAt(Fg,Ug,this.up):Dg.lookAt(Ug,Fg,this.up),this.quaternion.setFromRotationMatrix(Dg),r&&(Dg.extractRotation(r.matrixWorld),Bg.setFromRotationMatrix(Dg),this.quaternion.premultiply(Bg.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(jg)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Gg)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Dg.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Dg.multiply(e.parent.matrixWorld)),e.applyMatrix4(Dg),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this[e]===t&&n.push(this);const r=this.children;for(let i=0,o=r.length;i<o;i++)r[i].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Fg,e,Ng),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Fg,zg,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++){const r=t[n];!0!==r.matrixWorldAutoUpdate&&!0!==e||r.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map((e=>({boxInitialized:e.boxInitialized,boxMin:e.box.min.toArray(),boxMax:e.box.max.toArray(),sphereInitialized:e.sphereInitialized,sphereRadius:e.sphere.radius,sphereCenter:e.sphere.center.toArray()}))),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),null!==this.boundingSphere&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),null!==this.boundingBox&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),s=o(e.images),a=o(e.shapes),l=o(e.skeletons),c=o(e.animations),u=o(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}$g.DEFAULT_UP=new Gm(0,1,0),$g.DEFAULT_MATRIX_AUTO_UPDATE=!0,$g.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Xg=new Gm,Yg=new Gm,qg=new Gm,Zg=new Gm,Jg=new Gm,Kg=new Gm,Qg=new Gm,ev=new Gm,tv=new Gm,nv=new Gm;let rv=!1;class iv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Gm;this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Xg.subVectors(e,t),r.cross(Xg);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Xg.subVectors(r,t),Yg.subVectors(n,t),qg.subVectors(e,t);const o=Xg.dot(Xg),s=Xg.dot(Yg),a=Xg.dot(qg),l=Yg.dot(Yg),c=Yg.dot(qg),u=o*l-s*s;if(0===u)return i.set(-2,-1,-1);const d=1/u,h=(l*a-s*c)*d,p=(o*c-s*a)*d;return i.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Zg),Zg.x>=0&&Zg.y>=0&&Zg.x+Zg.y<=1}static getUV(e,t,n,r,i,o,s,a){return!1===rv&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),rv=!0),this.getInterpolation(e,t,n,r,i,o,s,a)}static getInterpolation(e,t,n,r,i,o,s,a){return this.getBarycoord(e,t,n,r,Zg),a.setScalar(0),a.addScaledVector(i,Zg.x),a.addScaledVector(o,Zg.y),a.addScaledVector(s,Zg.z),a}static isFrontFacing(e,t,n,r){return Xg.subVectors(n,t),Yg.subVectors(e,t),Xg.cross(Yg).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Xg.subVectors(this.c,this.b),Yg.subVectors(this.a,this.b),.5*Xg.cross(Yg).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return iv.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return iv.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===rv&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),rv=!0),iv.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return iv.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return iv.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return iv.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,s;Jg.subVectors(r,n),Kg.subVectors(i,n),ev.subVectors(e,n);const a=Jg.dot(ev),l=Kg.dot(ev);if(a<=0&&l<=0)return t.copy(n);tv.subVectors(e,r);const c=Jg.dot(tv),u=Kg.dot(tv);if(c>=0&&u<=c)return t.copy(r);const d=a*u-c*l;if(d<=0&&a>=0&&c<=0)return o=a/(a-c),t.copy(n).addScaledVector(Jg,o);nv.subVectors(e,i);const h=Jg.dot(nv),p=Kg.dot(nv);if(p>=0&&h<=p)return t.copy(i);const f=h*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(Kg,s);const m=c*p-h*u;if(m<=0&&u-c>=0&&h-p>=0)return Qg.subVectors(i,r),s=(u-c)/(u-c+(h-p)),t.copy(r).addScaledVector(Qg,s);const g=1/(m+f+d);return o=f*g,s=d*g,t.copy(n).addScaledVector(Jg,o).addScaledVector(Kg,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const ov={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sv={h:0,s:0,l:0},av={h:0,s:0,l:0};function lv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class cv{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hf;return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Lm.toWorkingColorSpace(this,t),this}setRGB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lm.workingColorSpace;return this.r=e,this.g=t,this.b=n,Lm.toWorkingColorSpace(this,r),this}setHSL(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lm.workingColorSpace;if(e=lm(e,1),t=am(t,0,1),n=am(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=lv(i,r,e+1/3),this.g=lv(i,r,e),this.b=lv(i,r,e-1/3)}return Lm.toWorkingColorSpace(this,r),this}setStyle(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hf;function r(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(t=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const o=t[1],s=t[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,n);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,n);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=t[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(6===i)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hf;const n=ov[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Rm(e.r),this.g=Rm(e.g),this.b=Rm(e.b),this}copyLinearToSRGB(e){return this.r=Pm(e.r),this.g=Pm(e.g),this.b=Pm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hf;return Lm.fromWorkingColorSpace(uv.copy(this),e),65536*Math.round(am(255*uv.r,0,255))+256*Math.round(am(255*uv.g,0,255))+Math.round(am(255*uv.b,0,255))}getHexString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hf;return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lm.workingColorSpace;Lm.fromWorkingColorSpace(uv.copy(this),t);const n=uv.r,r=uv.g,i=uv.b,o=Math.max(n,r,i),s=Math.min(n,r,i);let a,l;const c=(s+o)/2;if(s===o)a=0,l=0;else{const e=o-s;switch(l=c<=.5?e/(o+s):e/(2-o-s),o){case n:a=(r-i)/e+(r<i?6:0);break;case r:a=(i-n)/e+2;break;case i:a=(n-r)/e+4}a/=6}return e.h=a,e.s=l,e.l=c,e}getRGB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lm.workingColorSpace;return Lm.fromWorkingColorSpace(uv.copy(this),t),e.r=uv.r,e.g=uv.g,e.b=uv.b,e}getStyle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hf;Lm.fromWorkingColorSpace(uv.copy(this),e);const t=uv.r,n=uv.g,r=uv.b;return e!==Hf?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(sv),this.setHSL(sv.h+e,sv.s+t,sv.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(sv),e.getHSL(av);const n=cm(sv.h,av.h,t),r=cm(sv.s,av.s,t),i=cm(sv.l,av.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const uv=new cv;cv.NAMES=ov;let dv=0;class hv extends tm{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:dv++}),this.uuid=sm(),this.name="",this.type="Material",this.blending=1,this.side=sp,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=cp,this.blendDst=up,this.blendEquation=lp,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new cv(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=qf,this.stencilZFail=qf,this.stencilZPass=qf,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==sp&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==cp&&(n.blendSrc=this.blendSrc),this.blendDst!==up&&(n.blendDst=this.blendDst),this.blendEquation!==lp&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==qf&&(n.stencilFail=this.stencilFail),this.stencilZFail!==qf&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==qf&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class pv extends hv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new cv(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dp,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const fv=mv();function mv(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(r[e]=0,r[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,i[e]=24,i[256|e]=24):(r[e]=31744,r[256|e]=64512,i[e]=13,i[256|e]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),a=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,o[e]=t|n}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(a[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function gv(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=am(e,-65504,65504),fv.floatView[0]=e;const t=fv.uint32View[0],n=t>>23&511;return fv.baseTable[n]+((8388607&t)>>fv.shiftTable[n])}function vv(e){const t=e>>10;return fv.uint32View[0]=fv.mantissaTable[fv.offsetTable[t]+(1023&e)]+fv.exponentTable[t],fv.floatView[0]}const yv={toHalfFloat:gv,fromHalfFloat:vv},_v=new Gm,xv=new mm;class bv{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=Zf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Hp,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)xv.fromBufferAttribute(this,t),xv.applyMatrix3(e),this.setXY(t,xv.x,xv.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)_v.fromBufferAttribute(this,t),_v.applyMatrix3(e),this.setXYZ(t,_v.x,_v.y,_v.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)_v.fromBufferAttribute(this,t),_v.applyMatrix4(e),this.setXYZ(t,_v.x,_v.y,_v.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)_v.fromBufferAttribute(this,t),_v.applyNormalMatrix(e),this.setXYZ(t,_v.x,_v.y,_v.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)_v.fromBufferAttribute(this,t),_v.transformDirection(e),this.setXYZ(t,_v.x,_v.y,_v.z);return this}set(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=hm(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=pm(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=hm(t,this.array)),t}setX(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=hm(t,this.array)),t}setY(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=hm(t,this.array)),t}setZ(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=hm(t,this.array)),t}setW(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array),i=pm(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==Zf&&(e.usage=this.usage),e}}class Sv extends bv{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class wv extends bv{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Cv extends bv{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Av=0;const Mv=new bg,Tv=new $g,Ev=new Gm,Lv=new Ym,Rv=new Ym,Pv=new Gm;class kv extends tm{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Av++}),this.uuid=sm(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(ym(e)?wv:Sv)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new gm).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Mv.makeRotationFromQuaternion(e),this.applyMatrix4(Mv),this}rotateX(e){return Mv.makeRotationX(e),this.applyMatrix4(Mv),this}rotateY(e){return Mv.makeRotationY(e),this.applyMatrix4(Mv),this}rotateZ(e){return Mv.makeRotationZ(e),this.applyMatrix4(Mv),this}translate(e,t,n){return Mv.makeTranslation(e,t,n),this.applyMatrix4(Mv),this}scale(e,t,n){return Mv.makeScale(e,t,n),this.applyMatrix4(Mv),this}lookAt(e){return Tv.lookAt(e),Tv.updateMatrix(),this.applyMatrix4(Tv.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ev).negate(),this.translate(Ev.x,Ev.y,Ev.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new Cv(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Ym);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Gm(-1/0,-1/0,-1/0),new Gm(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Lv.setFromBufferAttribute(n),this.morphTargetsRelative?(Pv.addVectors(this.boundingBox.min,Lv.min),this.boundingBox.expandByPoint(Pv),Pv.addVectors(this.boundingBox.max,Lv.max),this.boundingBox.expandByPoint(Pv)):(this.boundingBox.expandByPoint(Lv.min),this.boundingBox.expandByPoint(Lv.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new hg);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new Gm,1/0);if(e){const n=this.boundingSphere.center;if(Lv.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Rv.setFromBufferAttribute(n),this.morphTargetsRelative?(Pv.addVectors(Lv.min,Rv.min),Lv.expandByPoint(Pv),Pv.addVectors(Lv.max,Rv.max),Lv.expandByPoint(Pv)):(Lv.expandByPoint(Rv.min),Lv.expandByPoint(Rv.max))}Lv.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)Pv.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(Pv));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],s=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)Pv.fromBufferAttribute(o,t),s&&(Ev.fromBufferAttribute(e,t),Pv.add(Ev)),r=Math.max(r,n.distanceToSquared(Pv))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,s=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new bv(new Float32Array(4*s),4));const a=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<s;e++)l[e]=new Gm,c[e]=new Gm;const u=new Gm,d=new Gm,h=new Gm,p=new mm,f=new mm,m=new mm,g=new Gm,v=new Gm;function y(e,t,n){u.fromArray(r,3*e),d.fromArray(r,3*t),h.fromArray(r,3*n),p.fromArray(o,2*e),f.fromArray(o,2*t),m.fromArray(o,2*n),d.sub(u),h.sub(u),f.sub(p),m.sub(p);const i=1/(f.x*m.y-m.x*f.y);isFinite(i)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(h,-f.y).multiplyScalar(i),v.copy(h).multiplyScalar(f.x).addScaledVector(d,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let _=this.groups;0===_.length&&(_=[{start:0,count:n.length}]);for(let e=0,t=_.length;e<t;++e){const t=_[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)y(n[e+0],n[e+1],n[e+2])}const x=new Gm,b=new Gm,S=new Gm,w=new Gm;function C(e){S.fromArray(i,3*e),w.copy(S);const t=l[e];x.copy(t),x.sub(S.multiplyScalar(S.dot(t))).normalize(),b.crossVectors(w,t);const n=b.dot(c[e])<0?-1:1;a[4*e]=x.x,a[4*e+1]=x.y,a[4*e+2]=x.z,a[4*e+3]=n}for(let e=0,t=_.length;e<t;++e){const t=_[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)C(n[e+0]),C(n[e+1]),C(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new bv(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new Gm,i=new Gm,o=new Gm,s=new Gm,a=new Gm,l=new Gm,c=new Gm,u=new Gm;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),p=e.getX(d+1),f=e.getX(d+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,p),o.fromBufferAttribute(t,f),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),s.fromBufferAttribute(n,h),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),a.add(c),l.add(c),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Pv.fromBufferAttribute(e,t),Pv.normalize(),e.setXYZ(t,Pv.x,Pv.y,Pv.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let s=0,a=0;for(let i=0,l=t.length;i<l;i++){s=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)o[a++]=n[s++]}return new bv(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new kv,n=this.index.array,r=this.attributes;for(const i in r){const o=e(r[i],n);t.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],s=i[r];for(let t=0,r=s.length;t<r;t++){const r=e(s[t],n);o.push(r)}t.morphAttributes[r]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];o.push(r.toJSON(e.data))}o.length>0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const a=e.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Iv=new bg,Ov=new xg,Bv=new hg,Dv=new Gm,Uv=new Gm,Fv=new Gm,Nv=new Gm,zv=new Gm,Hv=new Gm,Vv=new mm,Wv=new mm,jv=new mm,Gv=new Gm,$v=new Gm,Xv=new Gm,Yv=new Gm,qv=new Gm;class Zv extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new kv,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new pv;super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(i&&s){Hv.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],a=i[n];0!==r&&(zv.fromBufferAttribute(a,e),o?Hv.addScaledVector(zv,r):Hv.addScaledVector(zv.sub(t),r))}t.add(Hv)}return t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(i),Ov.copy(e.ray).recast(e.near),!1===Bv.containsPoint(Ov.origin)){if(null===Ov.intersectSphere(Bv,Dv))return;if(Ov.origin.distanceToSquared(Dv)>(e.far-e.near)**2)return}Iv.copy(i).invert(),Ov.copy(e.ray).applyMatrix4(Iv),null!==n.boundingBox&&!1===Ov.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,Ov)}}_computeIntersections(e,t,n){let r;const i=this.geometry,o=this.material,s=i.index,a=i.attributes.position,l=i.attributes.uv,c=i.attributes.uv1,u=i.attributes.normal,d=i.groups,h=i.drawRange;if(null!==s)if(Array.isArray(o))for(let i=0,a=d.length;i<a;i++){const a=d[i],p=o[a.materialIndex];for(let i=Math.max(a.start,h.start),o=Math.min(s.count,Math.min(a.start+a.count,h.start+h.count));i<o;i+=3){r=Jv(this,p,e,n,l,c,u,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=a.materialIndex,t.push(r))}}else{for(let i=Math.max(0,h.start),a=Math.min(s.count,h.start+h.count);i<a;i+=3){r=Jv(this,o,e,n,l,c,u,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}else if(void 0!==a)if(Array.isArray(o))for(let i=0,s=d.length;i<s;i++){const s=d[i],p=o[s.materialIndex];for(let i=Math.max(s.start,h.start),o=Math.min(a.count,Math.min(s.start+s.count,h.start+h.count));i<o;i+=3){r=Jv(this,p,e,n,l,c,u,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=s.materialIndex,t.push(r))}}else{for(let i=Math.max(0,h.start),s=Math.min(a.count,h.start+h.count);i<s;i+=3){r=Jv(this,o,e,n,l,c,u,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}}}function Jv(e,t,n,r,i,o,s,a,l,c){e.getVertexPosition(a,Uv),e.getVertexPosition(l,Fv),e.getVertexPosition(c,Nv);const u=function(e,t,n,r,i,o,s,a){let l;if(l=t.side===ap?r.intersectTriangle(s,o,i,!0,a):r.intersectTriangle(i,o,s,t.side===sp,a),null===l)return null;qv.copy(a),qv.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(qv);return c<n.near||c>n.far?null:{distance:c,point:qv.clone(),object:e}}(e,t,n,r,Uv,Fv,Nv,Yv);if(u){i&&(Vv.fromBufferAttribute(i,a),Wv.fromBufferAttribute(i,l),jv.fromBufferAttribute(i,c),u.uv=iv.getInterpolation(Yv,Uv,Fv,Nv,Vv,Wv,jv,new mm)),o&&(Vv.fromBufferAttribute(o,a),Wv.fromBufferAttribute(o,l),jv.fromBufferAttribute(o,c),u.uv1=iv.getInterpolation(Yv,Uv,Fv,Nv,Vv,Wv,jv,new mm),u.uv2=u.uv1),s&&(Gv.fromBufferAttribute(s,a),$v.fromBufferAttribute(s,l),Xv.fromBufferAttribute(s,c),u.normal=iv.getInterpolation(Yv,Uv,Fv,Nv,Gv,$v,Xv,new Gm),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const e={a:a,b:l,c:c,normal:new Gm,materialIndex:0};iv.getNormal(Uv,Fv,Nv,e.normal),u.face=e}return u}class Kv extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const s=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const a=[],l=[],c=[],u=[];let d=0,h=0;function p(e,t,n,r,i,o,p,f,m,g,v){const y=o/m,_=p/g,x=o/2,b=p/2,S=f/2,w=m+1,C=g+1;let A=0,M=0;const T=new Gm;for(let o=0;o<C;o++){const s=o*_-b;for(let a=0;a<w;a++){const d=a*y-x;T[e]=d*r,T[t]=s*i,T[n]=S,l.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=f>0?1:-1,c.push(T.x,T.y,T.z),u.push(a/m),u.push(1-o/g),A+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=d+t+w*e,r=d+t+w*(e+1),i=d+(t+1)+w*(e+1),o=d+(t+1)+w*e;a.push(n,r,o),a.push(r,i,o),M+=6}s.addGroup(h,M,v),h+=M,d+=A}p("z","y","x",-1,-1,n,t,e,o,i,0),p("z","y","x",1,-1,n,t,-e,o,i,1),p("x","z","y",1,1,e,n,t,r,o,2),p("x","z","y",1,-1,e,n,-t,r,o,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(a),this.setAttribute("position",new Cv(l,3)),this.setAttribute("normal",new Cv(c,3)),this.setAttribute("uv",new Cv(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Kv(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Qv(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function ey(e){const t={};for(let n=0;n<e.length;n++){const r=Qv(e[n]);for(const e in r)t[e]=r[e]}return t}function ty(e){return null===e.getRenderTarget()?e.outputColorSpace:Lm.workingColorSpace}const ny={clone:Qv,merge:ey};class ry extends hv{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Qv(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class iy extends $g{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new bg,this.projectionMatrix=new bg,this.projectionMatrixInverse=new bg,this.coordinateSystem=Qf}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class oy extends iy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e3;super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*om*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*im*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*om*Math.atan(Math.tan(.5*im*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*im*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/s,r*=o.width/e,n*=o.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const sy=-90;class ay extends $g{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new oy(sy,1,e,t);r.layers=this.layers,this.add(r);const i=new oy(sy,1,e,t);i.layers=this.layers,this.add(i);const o=new oy(sy,1,e,t);o.layers=this.layers,this.add(o);const s=new oy(sy,1,e,t);s.layers=this.layers,this.add(s);const a=new oy(sy,1,e,t);a.layers=this.layers,this.add(a);const l=new oy(sy,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,o,s,a]=t;for(const e of t)this.remove(e);if(e===Qf)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),a.up.set(0,1,0),a.lookAt(0,0,-1);else{if(e!==em)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),a.up.set(0,-1,0),a.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,o,s,a,l,c]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,o),e.setRenderTarget(n,2,r),e.render(t,s),e.setRenderTarget(n,3,r),e.render(t,a),e.setRenderTarget(n,4,r),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),e.render(t,c),e.setRenderTarget(u,d,h),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class ly extends Fm{constructor(e,t,n,r,i,o,s,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:wp,n,r,i,o,s,a,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class cy extends Hm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(Cm("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Nf?Hf:zf),this.texture=new ly(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Op}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Kv(5,5,5),i=new ry({name:"CubemapFromEquirect",uniforms:Qv(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:ap,blending:0});i.uniforms.tEquirect.value=t;const o=new Zv(r,i),s=t.minFilter;t.minFilter===Dp&&(t.minFilter=Op);return new ay(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}const uy=new Gm,dy=new Gm,hy=new gm;class py{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm(1,0,0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=uy.subVectors(n,t).cross(dy.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(uy),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||hy.getNormalMatrix(e),r=this.coplanarPoint(uy).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const fy=new hg,my=new Gm;class gy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new py,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new py,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new py,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new py,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new py,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new py;this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qf;const n=this.planes,r=e.elements,i=r[0],o=r[1],s=r[2],a=r[3],l=r[4],c=r[5],u=r[6],d=r[7],h=r[8],p=r[9],f=r[10],m=r[11],g=r[12],v=r[13],y=r[14],_=r[15];if(n[0].setComponents(a-i,d-l,m-h,_-g).normalize(),n[1].setComponents(a+i,d+l,m+h,_+g).normalize(),n[2].setComponents(a+o,d+c,m+p,_+v).normalize(),n[3].setComponents(a-o,d-c,m-p,_-v).normalize(),n[4].setComponents(a-s,d-u,m-f,_-y).normalize(),t===Qf)n[5].setComponents(a+s,d+u,m+f,_+y).normalize();else{if(t!==em)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(s,u,f,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),fy.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),fy.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(fy)}intersectsSprite(e){return fy.center.set(0,0,0),fy.radius=.7071067811865476,fy.applyMatrix4(e.matrixWorld),this.intersectsSphere(fy)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(my.x=r.normal.x>0?e.max.x:e.min.x,my.y=r.normal.y>0?e.max.y:e.min.y,my.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(my)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function vy(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function yy(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);if(void 0===o)r.set(t,function(t,r){const i=t.array,o=t.usage,s=i.byteLength,a=e.createBuffer();let l;if(e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback(),i instanceof Float32Array)l=e.FLOAT;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");l=e.HALF_FLOAT}else l=e.UNSIGNED_SHORT;else if(i instanceof Int16Array)l=e.SHORT;else if(i instanceof Uint32Array)l=e.UNSIGNED_INT;else if(i instanceof Int32Array)l=e.INT;else if(i instanceof Int8Array)l=e.BYTE;else if(i instanceof Uint8Array)l=e.UNSIGNED_BYTE;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);l=e.UNSIGNED_BYTE}return{buffer:a,type:l,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version,size:s}}(t,i));else if(o.version<t.version){if(o.size!==t.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function(t,r,i){const o=r.array,s=r._updateRange,a=r.updateRanges;if(e.bindBuffer(i,t),-1===s.count&&0===a.length&&e.bufferSubData(i,0,o),0!==a.length){for(let t=0,r=a.length;t<r;t++){const r=a[t];n?e.bufferSubData(i,r.start*o.BYTES_PER_ELEMENT,o,r.start,r.count):e.bufferSubData(i,r.start*o.BYTES_PER_ELEMENT,o.subarray(r.start,r.start+r.count))}r.clearUpdateRanges()}-1!==s.count&&(n?e.bufferSubData(i,s.offset*o.BYTES_PER_ELEMENT,o,s.offset,s.count):e.bufferSubData(i,s.offset*o.BYTES_PER_ELEMENT,o.subarray(s.offset,s.offset+s.count)),s.count=-1),r.onUploadCallback()}(o.buffer,t,i),o.version=t.version}}}}class _y extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,s=Math.floor(n),a=Math.floor(r),l=s+1,c=a+1,u=e/s,d=t/a,h=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*d-o;for(let n=0;n<l;n++){const r=n*u-i;p.push(r,-t,0),f.push(0,0,1),m.push(n/s),m.push(1-e/a)}}for(let e=0;e<a;e++)for(let t=0;t<s;t++){const n=t+l*e,r=t+l*(e+1),i=t+1+l*(e+1),o=t+1+l*e;h.push(n,r,o),h.push(r,i,o)}this.setIndex(h),this.setAttribute("position",new Cv(p,3)),this.setAttribute("normal",new Cv(f,3)),this.setAttribute("uv",new Cv(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new _y(e.width,e.height,e.widthSegments,e.heightSegments)}}const xy={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},by={common:{diffuse:{value:new cv(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new gm},alphaMap:{value:null},alphaMapTransform:{value:new gm},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new gm}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new gm}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new gm}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new gm},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new gm},normalScale:{value:new mm(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new gm},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new gm}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new gm}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new gm}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new cv(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new cv(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new gm},alphaTest:{value:0},uvTransform:{value:new gm}},sprite:{diffuse:{value:new cv(16777215)},opacity:{value:1},center:{value:new mm(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new gm},alphaMap:{value:null},alphaMapTransform:{value:new gm},alphaTest:{value:0}}},Sy={basic:{uniforms:ey([by.common,by.specularmap,by.envmap,by.aomap,by.lightmap,by.fog]),vertexShader:xy.meshbasic_vert,fragmentShader:xy.meshbasic_frag},lambert:{uniforms:ey([by.common,by.specularmap,by.envmap,by.aomap,by.lightmap,by.emissivemap,by.bumpmap,by.normalmap,by.displacementmap,by.fog,by.lights,{emissive:{value:new cv(0)}}]),vertexShader:xy.meshlambert_vert,fragmentShader:xy.meshlambert_frag},phong:{uniforms:ey([by.common,by.specularmap,by.envmap,by.aomap,by.lightmap,by.emissivemap,by.bumpmap,by.normalmap,by.displacementmap,by.fog,by.lights,{emissive:{value:new cv(0)},specular:{value:new cv(1118481)},shininess:{value:30}}]),vertexShader:xy.meshphong_vert,fragmentShader:xy.meshphong_frag},standard:{uniforms:ey([by.common,by.envmap,by.aomap,by.lightmap,by.emissivemap,by.bumpmap,by.normalmap,by.displacementmap,by.roughnessmap,by.metalnessmap,by.fog,by.lights,{emissive:{value:new cv(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:xy.meshphysical_vert,fragmentShader:xy.meshphysical_frag},toon:{uniforms:ey([by.common,by.aomap,by.lightmap,by.emissivemap,by.bumpmap,by.normalmap,by.displacementmap,by.gradientmap,by.fog,by.lights,{emissive:{value:new cv(0)}}]),vertexShader:xy.meshtoon_vert,fragmentShader:xy.meshtoon_frag},matcap:{uniforms:ey([by.common,by.bumpmap,by.normalmap,by.displacementmap,by.fog,{matcap:{value:null}}]),vertexShader:xy.meshmatcap_vert,fragmentShader:xy.meshmatcap_frag},points:{uniforms:ey([by.points,by.fog]),vertexShader:xy.points_vert,fragmentShader:xy.points_frag},dashed:{uniforms:ey([by.common,by.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:xy.linedashed_vert,fragmentShader:xy.linedashed_frag},depth:{uniforms:ey([by.common,by.displacementmap]),vertexShader:xy.depth_vert,fragmentShader:xy.depth_frag},normal:{uniforms:ey([by.common,by.bumpmap,by.normalmap,by.displacementmap,{opacity:{value:1}}]),vertexShader:xy.meshnormal_vert,fragmentShader:xy.meshnormal_frag},sprite:{uniforms:ey([by.sprite,by.fog]),vertexShader:xy.sprite_vert,fragmentShader:xy.sprite_frag},background:{uniforms:{uvTransform:{value:new gm},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:xy.background_vert,fragmentShader:xy.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:xy.backgroundCube_vert,fragmentShader:xy.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:xy.cube_vert,fragmentShader:xy.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:xy.equirect_vert,fragmentShader:xy.equirect_frag},distanceRGBA:{uniforms:ey([by.common,by.displacementmap,{referencePosition:{value:new Gm},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:xy.distanceRGBA_vert,fragmentShader:xy.distanceRGBA_frag},shadow:{uniforms:ey([by.lights,by.fog,{color:{value:new cv(0)},opacity:{value:1}}]),vertexShader:xy.shadow_vert,fragmentShader:xy.shadow_frag}};Sy.physical={uniforms:ey([Sy.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new gm},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new gm},clearcoatNormalScale:{value:new mm(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new gm},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new gm},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new gm},sheen:{value:0},sheenColor:{value:new cv(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new gm},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new gm},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new gm},transmissionSamplerSize:{value:new mm},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new gm},attenuationDistance:{value:0},attenuationColor:{value:new cv(0)},specularColor:{value:new cv(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new gm},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new gm},anisotropyVector:{value:new mm},anisotropyMap:{value:null},anisotropyMapTransform:{value:new gm}}]),vertexShader:xy.meshphysical_vert,fragmentShader:xy.meshphysical_frag};const wy={r:0,b:0,g:0};function Cy(e,t,n,r,i,o,s){const a=new cv(0);let l,c,u=!0===o?0:1,d=null,h=0,p=null;function f(t,n){t.getRGB(wy,ty(e)),r.buffers.color.setClear(wy.r,wy.g,wy.b,n,s)}return{getClearColor:function(){return a},setClearColor:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;a.set(e),u=t,f(a,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,f(a,u)},render:function(o,m){let g=!1,v=!0===m.isScene?m.background:null;if(v&&v.isTexture){v=(m.backgroundBlurriness>0?n:t).get(v)}null===v?f(a,u):v&&v.isColor&&(f(v,1),g=!0);const y=e.xr.getEnvironmentBlendMode();"additive"===y?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===y&&r.buffers.color.setClear(0,0,0,0,s),(e.autoClear||g)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.mapping===Tp)?(void 0===c&&(c=new Zv(new Kv(1,1,1),new ry({name:"BackgroundCubeMaterial",uniforms:Qv(Sy.backgroundCube.uniforms),vertexShader:Sy.backgroundCube.vertexShader,fragmentShader:Sy.backgroundCube.fragmentShader,side:ap,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=v,c.material.uniforms.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,c.material.toneMapped=Lm.getTransfer(v.colorSpace)!==$f,d===v&&h===v.version&&p===e.toneMapping||(c.material.needsUpdate=!0,d=v,h=v.version,p=e.toneMapping),c.layers.enableAll(),o.unshift(c,c.geometry,c.material,0,0,null)):v&&v.isTexture&&(void 0===l&&(l=new Zv(new _y(2,2),new ry({name:"BackgroundMaterial",uniforms:Qv(Sy.background.uniforms),vertexShader:Sy.background.vertexShader,fragmentShader:Sy.background.fragmentShader,side:sp,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=v,l.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,l.material.toneMapped=Lm.getTransfer(v.colorSpace)!==$f,!0===v.matrixAutoUpdate&&v.updateMatrix(),l.material.uniforms.uvTransform.value.copy(v.matrix),d===v&&h===v.version&&p===e.toneMapping||(l.material.needsUpdate=!0,d=v,h=v.version,p=e.toneMapping),l.layers.enableAll(),o.unshift(l,l.geometry,l.material,0,0,null))}}}function Ay(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==o,a={},l=p(null);let c=l,u=!1;function d(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function m(e){g(e,0)}function g(n,i){const o=c.newAttributes,s=c.enabledAttributes,a=c.attributeDivisors;if(o[n]=1,0===s[n]&&(e.enableVertexAttribArray(n),s[n]=1),a[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),a[n]=i}}function v(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function y(t,n,r,i,o,s,a){!0===a?e.vertexAttribIPointer(t,n,r,o,s):e.vertexAttribPointer(t,n,r,i,o,s)}function _(){x(),u=!0,c!==l&&(c=l,d(c.object))}function x(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,_,x){let b=!1;if(s){const t=function(t,n,i){const s=!0===i.wireframe;let l=a[t.id];void 0===l&&(l={},a[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[s];void 0===u&&(u=p(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[s]=u);return u}(_,h,l);c!==t&&(c=t,d(c.object)),b=function(e,t,n,r){const i=c.attributes,o=t.attributes;let s=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){const n=i[t];let r=o[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;s++}}return c.attributesNum!==s||c.index!==r}(i,_,h,x),b&&function(e,t,n,r){const i={},o=t.attributes;let s=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){let n=o[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}}c.attributes=i,c.attributesNum=s,c.index=r}(i,_,h,x)}else{const e=!0===l.wireframe;c.geometry===_.id&&c.program===h.id&&c.wireframe===e||(c.geometry=_.id,c.program=h.id,c.wireframe=e,b=!0)}null!==x&&n.update(x,e.ELEMENT_ARRAY_BUFFER),(b||u)&&(u=!1,function(i,o,s,a){if(!1===r.isWebGL2&&(i.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=a.attributes,c=s.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const o=c[t];if(o.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){const t=s.normalized,l=s.itemSize,c=n.get(s);if(void 0===c)continue;const u=c.buffer,d=c.type,h=c.bytesPerElement,p=!0===r.isWebGL2&&(d===e.INT||d===e.UNSIGNED_INT||s.gpuType===Np);if(s.isInterleavedBufferAttribute){const n=s.data,r=n.stride,c=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<o.locationSize;e++)g(o.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<o.locationSize;e++)m(o.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<o.locationSize;e++)y(o.location+e,l/o.locationSize,d,t,r*h,(c+l/o.locationSize*e)*h,p)}else{if(s.isInstancedBufferAttribute){for(let e=0;e<o.locationSize;e++)g(o.location+e,s.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e<o.locationSize;e++)m(o.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<o.locationSize;e++)y(o.location+e,l/o.locationSize,d,t,l*h,l/o.locationSize*e*h,p)}}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(o.location,n);break;case 3:e.vertexAttrib3fv(o.location,n);break;case 4:e.vertexAttrib4fv(o.location,n);break;default:e.vertexAttrib1fv(o.location,n)}}}}v()}(i,l,h,_),null!==x&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.get(x).buffer))},reset:_,resetDefaultState:x,dispose:function(){_();for(const e in a){const t=a[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete a[e]}},releaseStatesOfGeometry:function(e){if(void 0===a[e.id])return;const t=a[e.id];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete a[e.id]},releaseStatesOfProgram:function(e){for(const t in a){const n=a[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:m,disableUnusedAttributes:v}}function My(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,s,a){if(0===a)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,s,a),n.update(s,o,a)},this.renderMultiDraw=function(e,r,i){if(0===i)return;const s=t.get("WEBGL_multi_draw");if(null===s)for(let t=0;t<i;t++)this.render(e[t],r[t]);else{s.multiDrawArraysWEBGL(o,e,0,r,0,i);let t=0;for(let e=0;e<i;e++)t+=r[e];n.update(t,o,1)}}}function Ty(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let s=void 0!==n.precision?n.precision:"highp";const a=i(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),y=d>0,_=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:s,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:_,floatVertexTextures:y&&_,maxSamples:o?e.getParameter(e.MAX_SAMPLES):0}}function Ey(e){const t=this;let n=null,r=0,i=!1,o=!1;const s=new py,a=new gm,l={value:null,needsUpdate:!1};function c(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;a.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=r;t!==o;++t,n+=4)s.copy(e[t]).applyMatrix4(i,a),s.normal.toArray(c,n),c[n+3]=s.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){const n=0!==e.length||t||0!==r||i;return i=t,r=e.length,n},this.beginShadows=function(){o=!0,c(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(e,t){n=c(e,t,0)},this.setState=function(s,a,u){const d=s.clippingPlanes,h=s.clipIntersection,p=s.clipShadows,f=e.get(s);if(!i||null===d||0===d.length||o&&!p)o?c(null):function(){l.value!==n&&(l.value=n,l.needsUpdate=r>0);t.numPlanes=r,t.numIntersection=0}();else{const e=o?0:r,t=4*e;let i=f.clippingState||null;l.value=i,i=c(d,a,t,u);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function Ly(e){let t=new WeakMap;function n(e,t){return t===Ap?e.mapping=wp:t===Mp&&(e.mapping=Cp),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(o===Ap||o===Mp){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const s=new cy(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class Ry extends iy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2e3;super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,s=r+t,a=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,s-=t*this.view.offsetY,a=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,s,a,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Py=[.125,.215,.35,.446,.526,.582],ky=20,Iy=new Ry,Oy=new cv;let By=null,Dy=0,Uy=0;const Fy=(1+Math.sqrt(5))/2,Ny=1/Fy,zy=[new Gm(1,1,1),new Gm(-1,1,1),new Gm(1,1,-1),new Gm(-1,1,-1),new Gm(0,Fy,Ny),new Gm(0,Fy,-Ny),new Gm(Ny,0,Fy),new Gm(-Ny,0,Fy),new Gm(Fy,Ny,0),new Gm(-Fy,Ny,0)];class Hy{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;By=this._renderer.getRenderTarget(),Dy=this._renderer.getActiveCubeFace(),Uy=this._renderer.getActiveMipmapLevel(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}fromCubemap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Gy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=jy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(By,Dy,Uy),e.scissorTest=!1,Wy(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===wp||e.mapping===Cp?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),By=this._renderer.getRenderTarget(),Dy=this._renderer.getActiveCubeFace(),Uy=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Op,minFilter:Op,generateMipmaps:!1,type:Vp,format:$p,colorSpace:Vf,depthBuffer:!1},r=Vy(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Vy(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const o=e-4+1+Py.length;for(let s=0;s<o;s++){const o=Math.pow(2,i);n.push(o);let a=1/o;s>e-4?a=Py[s-e+4-1]:0===s&&(a=0),r.push(a);const l=1/(o-2),c=-l,u=1+l,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*h),y=new Float32Array(m*p*h),_=new Float32Array(g*p*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(r,f*p*e),y.set(d,m*p*e);const i=[e,e,e,e,e,e];_.set(i,g*p*e)}const x=new kv;x.setAttribute("position",new bv(v,f)),x.setAttribute("uv",new bv(y,m)),x.setAttribute("faceIndex",new bv(_,g)),t.push(x),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(ky),i=new Gm(0,1,0),o=new ry({name:"SphericalGaussianBlur",defines:{n:ky,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:$y(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return o}(r,e,t)}return r}_compileMaterial(e){const t=new Zv(this._lodPlanes[0],e);this._renderer.compile(t,Iy)}_sceneToCubeUV(e,t,n,r){const i=new oy(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Oy),a.toneMapping=fp,a.autoClear=!1;const u=new pv({name:"PMREM.Background",side:ap,depthWrite:!1,depthTest:!1}),d=new Zv(new Kv,u);let h=!1;const p=e.background;p?p.isColor&&(u.color.copy(p),e.background=null,h=!0):(u.color.copy(Oy),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,o[t],0),i.lookAt(s[t],0,0)):1===n?(i.up.set(0,0,o[t]),i.lookAt(0,s[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,s[t]));const l=this._cubeSize;Wy(r,n*l,t>2?l:0,l,l),a.setRenderTarget(r),h&&a.render(d,i),a.render(e,i)}d.geometry.dispose(),d.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===wp||e.mapping===Cp;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Gy()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=jy());const i=r?this._cubemapMaterial:this._equirectMaterial,o=new Zv(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const s=this._cubeSize;Wy(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(o,Iy)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=zy[(t-1)%zy.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,s){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new Zv(this._lodPlanes[r],l),u=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,p=i/h,f=isFinite(i)?1+Math.floor(3*p):ky;f>ky&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<ky;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=m,u.latitudinal.value="latitudinal"===o,s&&(u.poleAxis.value=s);const{_lodMax:v}=this;u.dTheta.value=h,u.mipInt.value=v-n;const y=this._sizeLods[r];Wy(t,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),a.setRenderTarget(t),a.render(c,Iy)}}function Vy(e,t,n){const r=new Hm(e,t,n);return r.texture.mapping=Tp,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Wy(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function jy(){return new ry({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:$y(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Gy(){return new ry({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:$y(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function $y(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Xy(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,s=o===Ap||o===Mp,a=o===wp||o===Cp;if(s||a){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Hy(e)),r=s?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const o=i.image;if(s&&o&&o.height>0||a&&o&&function(e){let t=0;const n=6;for(let r=0;r<n;r++)void 0!==e[r]&&t++;return t===n}(o)){null===n&&(n=new Hy(e));const o=s?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,o),i.addEventListener("dispose",r),o.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Yy(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function qy(e,t,n,r){const i={},o=new WeakMap;function s(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);for(const e in a.morphAttributes){const n=a.morphAttributes[e];for(let e=0,r=n.length;e<r;e++)t.remove(n[e])}a.removeEventListener("dispose",s),delete i[a.id];const l=o.get(a);l&&(t.remove(l),o.delete(a)),r.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],r=e.index,i=e.attributes.position;let s=0;if(null!==r){const e=r.array;s=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{if(void 0===i)return;{const e=i.array;s=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}}const a=new(ym(n)?wv:Sv)(n,1);a.version=s;const l=o.get(e);l&&t.remove(l),o.set(e,a)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",s),i[t.id]=!0,n.memory.geometries++),t},update:function(n){const r=n.attributes;for(const n in r)t.update(r[n],e.ARRAY_BUFFER);const i=n.morphAttributes;for(const n in i){const r=i[n];for(let n=0,i=r.length;n<i;n++)t.update(r[n],e.ARRAY_BUFFER)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&a(e)}else a(e);return o.get(e)}}}function Zy(e,t,n,r){const i=r.isWebGL2;let o,s,a;this.setMode=function(e){o=e},this.setIndex=function(e){s=e.type,a=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,s,t*a),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,d;if(i)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](o,l,s,r*a,c),n.update(l,o,c)},this.renderMultiDraw=function(e,r,i){if(0===i)return;const l=t.get("WEBGL_multi_draw");if(null===l)for(let t=0;t<i;t++)this.render(e[t]/a,r[t]);else{l.multiDrawElementsWEBGL(o,r,0,s,e,0,i);let t=0;for(let e=0;e<i;e++)t+=r[e];n.update(t,o,1)}}}function Jy(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(n,r,i){switch(t.calls++,r){case e.TRIANGLES:t.triangles+=i*(n/3);break;case e.LINES:t.lines+=i*(n/2);break;case e.LINE_STRIP:t.lines+=i*(n-1);break;case e.LINE_LOOP:t.lines+=i*n;break;case e.POINTS:t.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}function Ky(e,t){return e[0]-t[0]}function Qy(e,t){return Math.abs(t[1])-Math.abs(e[1])}function e_(e,t,n){const r={},i=new Float32Array(8),o=new WeakMap,s=new Nm,a=[];for(let e=0;e<8;e++)a[e]=[e,0];return{update:function(l,c,u){const d=l.morphTargetInfluences;if(!0===t.isWebGL2){const h=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=void 0!==h?h.length:0;let f=o.get(c);if(void 0===f||f.count!==p){void 0!==f&&f.texture.dispose();const v=void 0!==c.morphAttributes.position,y=void 0!==c.morphAttributes.normal,_=void 0!==c.morphAttributes.color,x=c.morphAttributes.position||[],b=c.morphAttributes.normal||[],S=c.morphAttributes.color||[];let w=0;!0===v&&(w=1),!0===y&&(w=2),!0===_&&(w=3);let C=c.attributes.position.count*w,A=1;C>t.maxTextureSize&&(A=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const M=new Float32Array(C*A*4*p),T=new Vm(M,C,A,p);T.type=Hp,T.needsUpdate=!0;const E=4*w;for(let R=0;R<p;R++){const P=x[R],k=b[R],I=S[R],O=C*A*4*R;for(let B=0;B<P.count;B++){const D=B*E;!0===v&&(s.fromBufferAttribute(P,B),M[O+D+0]=s.x,M[O+D+1]=s.y,M[O+D+2]=s.z,M[O+D+3]=0),!0===y&&(s.fromBufferAttribute(k,B),M[O+D+4]=s.x,M[O+D+5]=s.y,M[O+D+6]=s.z,M[O+D+7]=0),!0===_&&(s.fromBufferAttribute(I,B),M[O+D+8]=s.x,M[O+D+9]=s.y,M[O+D+10]=s.z,M[O+D+11]=4===I.itemSize?s.w:1)}}function L(){T.dispose(),o.delete(c),c.removeEventListener("dispose",L)}f={count:p,texture:T,size:new mm(C,A)},o.set(c,f),c.addEventListener("dispose",L)}let m=0;for(let U=0;U<d.length;U++)m+=d[U];const g=c.morphTargetsRelative?1:1-m;u.getUniforms().setValue(e,"morphTargetBaseInfluence",g),u.getUniforms().setValue(e,"morphTargetInfluences",d),u.getUniforms().setValue(e,"morphTargetsTexture",f.texture,n),u.getUniforms().setValue(e,"morphTargetsTextureSize",f.size)}else{const F=void 0===d?0:d.length;let N=r[c.id];if(void 0===N||N.length!==F){N=[];for(let j=0;j<F;j++)N[j]=[j,0];r[c.id]=N}for(let G=0;G<F;G++){const $=N[G];$[0]=G,$[1]=d[G]}N.sort(Qy);for(let X=0;X<8;X++)X<F&&N[X][1]?(a[X][0]=N[X][0],a[X][1]=N[X][1]):(a[X][0]=Number.MAX_SAFE_INTEGER,a[X][1]=0);a.sort(Ky);const z=c.morphAttributes.position,H=c.morphAttributes.normal;let V=0;for(let Y=0;Y<8;Y++){const q=a[Y],Z=q[0],J=q[1];Z!==Number.MAX_SAFE_INTEGER&&J?(z&&c.getAttribute("morphTarget"+Y)!==z[Z]&&c.setAttribute("morphTarget"+Y,z[Z]),H&&c.getAttribute("morphNormal"+Y)!==H[Z]&&c.setAttribute("morphNormal"+Y,H[Z]),i[Y]=J,V+=J):(z&&!0===c.hasAttribute("morphTarget"+Y)&&c.deleteAttribute("morphTarget"+Y),H&&!0===c.hasAttribute("morphNormal"+Y)&&c.deleteAttribute("morphNormal"+Y),i[Y]=0)}const W=c.morphTargetsRelative?1:1-V;u.getUniforms().setValue(e,"morphTargetBaseInfluence",W),u.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function t_(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(s){const a=r.render.frame,l=s.geometry,c=t.get(s,l);if(i.get(c)!==a&&(t.update(c),i.set(c,a)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",o)&&s.addEventListener("dispose",o),i.get(s)!==a&&(n.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,e.ARRAY_BUFFER),i.set(s,a))),s.isSkinnedMesh){const e=s.skeleton;i.get(e)!==a&&(e.update(),i.set(e,a))}return c},dispose:function(){i=new WeakMap}}}class n_ extends Fm{constructor(e,t,n,r,i,o,s,a,l,c){if((c=void 0!==c?c:Xp)!==Xp&&c!==Yp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Xp&&(n=zp),void 0===n&&c===Yp&&(n=Gp),super(null,r,i,o,s,a,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==s?s:Pp,this.minFilter=void 0!==a?a:Pp,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}const r_=new Fm,i_=new n_(1,1);i_.compareFunction=515;const o_=new Vm,s_=new Wm,a_=new ly,l_=[],c_=[],u_=new Float32Array(16),d_=new Float32Array(9),h_=new Float32Array(4);function p_(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=l_[i];if(void 0===o&&(o=new Float32Array(i),l_[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function f_(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function m_(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function g_(e,t){let n=c_[t];void 0===n&&(n=new Int32Array(t),c_[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function v_(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function y_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(f_(n,t))return;e.uniform2fv(this.addr,t),m_(n,t)}}function __(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(f_(n,t))return;e.uniform3fv(this.addr,t),m_(n,t)}}function x_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(f_(n,t))return;e.uniform4fv(this.addr,t),m_(n,t)}}function b_(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(f_(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),m_(n,t)}else{if(f_(n,r))return;h_.set(r),e.uniformMatrix2fv(this.addr,!1,h_),m_(n,r)}}function S_(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(f_(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),m_(n,t)}else{if(f_(n,r))return;d_.set(r),e.uniformMatrix3fv(this.addr,!1,d_),m_(n,r)}}function w_(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(f_(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),m_(n,t)}else{if(f_(n,r))return;u_.set(r),e.uniformMatrix4fv(this.addr,!1,u_),m_(n,r)}}function C_(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function A_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(f_(n,t))return;e.uniform2iv(this.addr,t),m_(n,t)}}function M_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(f_(n,t))return;e.uniform3iv(this.addr,t),m_(n,t)}}function T_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(f_(n,t))return;e.uniform4iv(this.addr,t),m_(n,t)}}function E_(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function L_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(f_(n,t))return;e.uniform2uiv(this.addr,t),m_(n,t)}}function R_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(f_(n,t))return;e.uniform3uiv(this.addr,t),m_(n,t)}}function P_(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(f_(n,t))return;e.uniform4uiv(this.addr,t),m_(n,t)}}function k_(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i);const o=this.type===e.SAMPLER_2D_SHADOW?i_:r_;n.setTexture2D(t||o,i)}function I_(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||s_,i)}function O_(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||a_,i)}function B_(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||o_,i)}function D_(e,t){e.uniform1fv(this.addr,t)}function U_(e,t){const n=p_(t,this.size,2);e.uniform2fv(this.addr,n)}function F_(e,t){const n=p_(t,this.size,3);e.uniform3fv(this.addr,n)}function N_(e,t){const n=p_(t,this.size,4);e.uniform4fv(this.addr,n)}function z_(e,t){const n=p_(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function H_(e,t){const n=p_(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function V_(e,t){const n=p_(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function W_(e,t){e.uniform1iv(this.addr,t)}function j_(e,t){e.uniform2iv(this.addr,t)}function G_(e,t){e.uniform3iv(this.addr,t)}function $_(e,t){e.uniform4iv(this.addr,t)}function X_(e,t){e.uniform1uiv(this.addr,t)}function Y_(e,t){e.uniform2uiv(this.addr,t)}function q_(e,t){e.uniform3uiv(this.addr,t)}function Z_(e,t){e.uniform4uiv(this.addr,t)}function J_(e,t,n){const r=this.cache,i=t.length,o=g_(n,i);f_(r,o)||(e.uniform1iv(this.addr,o),m_(r,o));for(let e=0;e!==i;++e)n.setTexture2D(t[e]||r_,o[e])}function K_(e,t,n){const r=this.cache,i=t.length,o=g_(n,i);f_(r,o)||(e.uniform1iv(this.addr,o),m_(r,o));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||s_,o[e])}function Q_(e,t,n){const r=this.cache,i=t.length,o=g_(n,i);f_(r,o)||(e.uniform1iv(this.addr,o),m_(r,o));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||a_,o[e])}function ex(e,t,n){const r=this.cache,i=t.length,o=g_(n,i);f_(r,o)||(e.uniform1iv(this.addr,o),m_(r,o));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||o_,o[e])}class tx{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return v_;case 35664:return y_;case 35665:return __;case 35666:return x_;case 35674:return b_;case 35675:return S_;case 35676:return w_;case 5124:case 35670:return C_;case 35667:case 35671:return A_;case 35668:case 35672:return M_;case 35669:case 35673:return T_;case 5125:return E_;case 36294:return L_;case 36295:return R_;case 36296:return P_;case 35678:case 36198:case 36298:case 36306:case 35682:return k_;case 35679:case 36299:case 36307:return I_;case 35680:case 36300:case 36308:case 36293:return O_;case 36289:case 36303:case 36311:case 36292:return B_}}(t.type)}}class nx{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return D_;case 35664:return U_;case 35665:return F_;case 35666:return N_;case 35674:return z_;case 35675:return H_;case 35676:return V_;case 5124:case 35670:return W_;case 35667:case 35671:return j_;case 35668:case 35672:return G_;case 35669:case 35673:return $_;case 5125:return X_;case 36294:return Y_;case 36295:return q_;case 36296:return Z_;case 35678:case 36198:case 36298:case 36306:case 35682:return J_;case 35679:case 36299:case 36307:return K_;case 35680:case 36300:case 36308:case 36293:return Q_;case 36289:case 36303:case 36311:case 36292:return ex}}(t.type)}}class rx{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}}}const ix=/(\w+)(\])?(\[|\.)?/g;function ox(e,t){e.seq.push(t),e.map[t.id]=t}function sx(e,t,n){const r=e.name,i=r.length;for(ix.lastIndex=0;;){const o=ix.exec(r),s=ix.lastIndex;let a=o[1];const l="]"===o[2],c=o[3];if(l&&(a|=0),void 0===c||"["===c&&s+2===i){ox(n,void 0===c?new tx(a,e,t):new nx(a,e,t));break}{let e=n.map[a];void 0===e&&(e=new rx(a),ox(n,e)),n=e}}}class ax{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);sx(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],s=n[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n}}function lx(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}const cx=37297;let ux=0;function dx(e,t,n){const r=e.getShaderParameter(t,e.COMPILE_STATUS),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const r=parseInt(o[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),o=Math.min(t+6,n.length);for(let e=i;e<o;e++){const i=e+1;r.push(`${i===t?">":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function hx(e,t){const n=function(e){const t=Lm.getPrimaries(Lm.workingColorSpace),n=Lm.getPrimaries(e);let r;switch(t===n?r="":t===Yf&&n===Xf?r="LinearDisplayP3ToLinearSRGB":t===Xf&&n===Yf&&(r="LinearSRGBToLinearDisplayP3"),e){case Vf:case jf:return[r,"LinearTransferOETF"];case Hf:case Wf:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[r,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function px(e,t){let n;switch(t){case mp:n="Linear";break;case gp:n="Reinhard";break;case vp:n="OptimizedCineon";break;case yp:n="ACESFilmic";break;case _p:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function fx(e){return""!==e}function mx(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function gx(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const vx=/^[ \t]*#include +<([\w\d./]+)>/gm;function yx(e){return e.replace(vx,xx)}const _x=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function xx(e,t){let n=xy[t];if(void 0===n){const e=_x.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=xy[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return yx(n)}const bx=/#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 Sx(e){return e.replace(bx,wx)}function wx(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function Cx(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Ax(e,t,n,r){const i=e.getContext(),o=n.defines;let s=n.vertexShader,a=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===rp?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===ip?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===op&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case wp:case Cp:t="ENVMAP_TYPE_CUBE";break;case Tp:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";e.envMap&&e.envMapMode===Cp&&(t="ENVMAP_MODE_REFRACTION");return t}(n),d=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case dp:t="ENVMAP_BLENDING_MULTIPLY";break;case hp:t="ENVMAP_BLENDING_MIX";break;case pp:t="ENVMAP_BLENDING_ADD"}return t}(n),h=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),p=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.normalMapTangentSpace||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(fx).join("\n")}(n),f=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f].filter(fx).join("\n"),g.length>0&&(g+="\n"),v=[p,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f].filter(fx).join("\n"),v.length>0&&(v+="\n")):(g=[Cx(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(fx).join("\n"),v=[p,Cx(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==fp?"#define TONE_MAPPING":"",n.toneMapping!==fp?xy.tonemapping_pars_fragment:"",n.toneMapping!==fp?px("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",xy.colorspace_pars_fragment,hx("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(fx).join("\n")),s=yx(s),s=mx(s,n),s=gx(s,n),a=yx(a),a=mx(a,n),a=gx(a,n),s=Sx(s),a=Sx(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===Jf?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Jf?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const _=y+g+s,x=y+v+a,b=lx(i,i.VERTEX_SHADER,_),S=lx(i,i.FRAGMENT_SHADER,x);function w(t){if(e.debug.checkShaderErrors){const n=i.getProgramInfoLog(m).trim(),r=i.getShaderInfoLog(b).trim(),o=i.getShaderInfoLog(S).trim();let s=!0,a=!0;if(!1===i.getProgramParameter(m,i.LINK_STATUS))if(s=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,m,b,S);else{const e=dx(i,b,"vertex"),t=dx(i,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(m,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+t)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==r&&""!==o||(a=!1);a&&(t.diagnostics={runnable:s,programLog:n,vertexShader:{log:r,prefix:g},fragmentShader:{log:o,prefix:v}})}i.deleteShader(b),i.deleteShader(S),C=new ax(i,m),A=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),o=r.name;let s=1;r.type===e.FLOAT_MAT2&&(s=2),r.type===e.FLOAT_MAT3&&(s=3),r.type===e.FLOAT_MAT4&&(s=4),n[o]={type:r.type,location:e.getAttribLocation(t,o),locationSize:s}}return n}(i,m)}let C,A;i.attachShader(m,b),i.attachShader(m,S),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),this.getUniforms=function(){return void 0===C&&w(this),C},this.getAttributes=function(){return void 0===A&&w(this),A};let M=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===M&&(M=i.getProgramParameter(m,cx)),M},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=ux++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=b,this.fragmentShader=S,this}let Mx=0;class Tx{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(i)&&(o.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new Ex(e),t.set(e,n)),n}}class Ex{constructor(e){this.id=Mx++,this.code=e,this.usedTimes=0}}function Lx(e,t,n,r,i,o,s){const a=new kg,l=new Tx,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let p=i.precision;const f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(e){return 0===e?"uv":`uv${e}`}return{getParameters:function(o,a,c,g,v){const y=g.fog,_=v.geometry,x=o.isMeshStandardMaterial?g.environment:null,b=(o.isMeshStandardMaterial?n:t).get(o.envMap||x),S=b&&b.mapping===Tp?b.image.height:null,w=f[o.type];null!==o.precision&&(p=i.getMaxPrecision(o.precision),p!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",p,"instead."));const C=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,A=void 0!==C?C.length:0;let M,T,E,L,R=0;if(void 0!==_.morphAttributes.position&&(R=1),void 0!==_.morphAttributes.normal&&(R=2),void 0!==_.morphAttributes.color&&(R=3),w){const e=Sy[w];M=e.vertexShader,T=e.fragmentShader}else M=o.vertexShader,T=o.fragmentShader,l.update(o),E=l.getVertexShaderID(o),L=l.getFragmentShaderID(o);const P=e.getRenderTarget(),k=!0===v.isInstancedMesh,I=!0===v.isBatchedMesh,O=!!o.map,B=!!o.matcap,D=!!b,U=!!o.aoMap,F=!!o.lightMap,N=!!o.bumpMap,z=!!o.normalMap,H=!!o.displacementMap,V=!!o.emissiveMap,W=!!o.metalnessMap,j=!!o.roughnessMap,G=o.anisotropy>0,$=o.clearcoat>0,X=o.iridescence>0,Y=o.sheen>0,q=o.transmission>0,Z=G&&!!o.anisotropyMap,J=$&&!!o.clearcoatMap,K=$&&!!o.clearcoatNormalMap,Q=$&&!!o.clearcoatRoughnessMap,ee=X&&!!o.iridescenceMap,te=X&&!!o.iridescenceThicknessMap,ne=Y&&!!o.sheenColorMap,re=Y&&!!o.sheenRoughnessMap,ie=!!o.specularMap,oe=!!o.specularColorMap,se=!!o.specularIntensityMap,ae=q&&!!o.transmissionMap,le=q&&!!o.thicknessMap,ce=!!o.gradientMap,ue=!!o.alphaMap,de=o.alphaTest>0,he=!!o.alphaHash,pe=!!o.extensions,fe=!!_.attributes.uv1,me=!!_.attributes.uv2,ge=!!_.attributes.uv3;let ve=fp;return o.toneMapped&&(null!==P&&!0!==P.isXRRenderTarget||(ve=e.toneMapping)),{isWebGL2:u,shaderID:w,shaderType:o.type,shaderName:o.name,vertexShader:M,fragmentShader:T,defines:o.defines,customVertexShaderID:E,customFragmentShaderID:L,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,batching:I,instancing:k,instancingColor:k&&null!==v.instanceColor,supportsVertexTextures:h,outputColorSpace:null===P?e.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:Vf,map:O,matcap:B,envMap:D,envMapMode:D&&b.mapping,envMapCubeUVHeight:S,aoMap:U,lightMap:F,bumpMap:N,normalMap:z,displacementMap:h&&H,emissiveMap:V,normalMapObjectSpace:z&&1===o.normalMapType,normalMapTangentSpace:z&&0===o.normalMapType,metalnessMap:W,roughnessMap:j,anisotropy:G,anisotropyMap:Z,clearcoat:$,clearcoatMap:J,clearcoatNormalMap:K,clearcoatRoughnessMap:Q,iridescence:X,iridescenceMap:ee,iridescenceThicknessMap:te,sheen:Y,sheenColorMap:ne,sheenRoughnessMap:re,specularMap:ie,specularColorMap:oe,specularIntensityMap:se,transmission:q,transmissionMap:ae,thicknessMap:le,gradientMap:ce,opaque:!1===o.transparent&&1===o.blending,alphaMap:ue,alphaTest:de,alphaHash:he,combine:o.combine,mapUv:O&&m(o.map.channel),aoMapUv:U&&m(o.aoMap.channel),lightMapUv:F&&m(o.lightMap.channel),bumpMapUv:N&&m(o.bumpMap.channel),normalMapUv:z&&m(o.normalMap.channel),displacementMapUv:H&&m(o.displacementMap.channel),emissiveMapUv:V&&m(o.emissiveMap.channel),metalnessMapUv:W&&m(o.metalnessMap.channel),roughnessMapUv:j&&m(o.roughnessMap.channel),anisotropyMapUv:Z&&m(o.anisotropyMap.channel),clearcoatMapUv:J&&m(o.clearcoatMap.channel),clearcoatNormalMapUv:K&&m(o.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Q&&m(o.clearcoatRoughnessMap.channel),iridescenceMapUv:ee&&m(o.iridescenceMap.channel),iridescenceThicknessMapUv:te&&m(o.iridescenceThicknessMap.channel),sheenColorMapUv:ne&&m(o.sheenColorMap.channel),sheenRoughnessMapUv:re&&m(o.sheenRoughnessMap.channel),specularMapUv:ie&&m(o.specularMap.channel),specularColorMapUv:oe&&m(o.specularColorMap.channel),specularIntensityMapUv:se&&m(o.specularIntensityMap.channel),transmissionMapUv:ae&&m(o.transmissionMap.channel),thicknessMapUv:le&&m(o.thicknessMap.channel),alphaMapUv:ue&&m(o.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(z||G),vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!_.attributes.color&&4===_.attributes.color.itemSize,vertexUv1s:fe,vertexUv2s:me,vertexUv3s:ge,pointsUvs:!0===v.isPoints&&!!_.attributes.uv&&(O||ue),fog:!!y,useFog:!0===o.fog,fogExp2:y&&y.isFogExp2,flatShading:!0===o.flatShading,sizeAttenuation:!0===o.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==_.morphAttributes.position,morphNormals:void 0!==_.morphAttributes.normal,morphColors:void 0!==_.morphAttributes.color,morphTargetsCount:A,morphTextureStride:R,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numSpotLightMaps:a.spotLightMap.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numSpotLightShadowsWithMaps:a.numSpotLightShadowsWithMaps,numLightProbes:a.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:ve,useLegacyLights:e._useLegacyLights,decodeVideoTexture:O&&!0===o.map.isVideoTexture&&Lm.getTransfer(o.map.colorSpace)===$f,premultipliedAlpha:o.premultipliedAlpha,doubleSided:2===o.side,flipSided:o.side===ap,useDepthPacking:o.depthPacking>=0,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionDerivatives:pe&&!0===o.extensions.derivatives,extensionFragDepth:pe&&!0===o.extensions.fragDepth,extensionDrawBuffers:pe&&!0===o.extensions.drawBuffers,extensionShaderTextureLOD:pe&&!0===o.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0);t.supportsVertexTextures&&a.enable(1);t.instancing&&a.enable(2);t.instancingColor&&a.enable(3);t.matcap&&a.enable(4);t.envMap&&a.enable(5);t.normalMapObjectSpace&&a.enable(6);t.normalMapTangentSpace&&a.enable(7);t.clearcoat&&a.enable(8);t.iridescence&&a.enable(9);t.alphaTest&&a.enable(10);t.vertexColors&&a.enable(11);t.vertexAlphas&&a.enable(12);t.vertexUv1s&&a.enable(13);t.vertexUv2s&&a.enable(14);t.vertexUv3s&&a.enable(15);t.vertexTangents&&a.enable(16);t.anisotropy&&a.enable(17);t.alphaHash&&a.enable(18);t.batching&&a.enable(19);e.push(a.mask),a.disableAll(),t.fog&&a.enable(0);t.useFog&&a.enable(1);t.flatShading&&a.enable(2);t.logarithmicDepthBuffer&&a.enable(3);t.skinning&&a.enable(4);t.morphTargets&&a.enable(5);t.morphNormals&&a.enable(6);t.morphColors&&a.enable(7);t.premultipliedAlpha&&a.enable(8);t.shadowMapEnabled&&a.enable(9);t.useLegacyLights&&a.enable(10);t.doubleSided&&a.enable(11);t.flipSided&&a.enable(12);t.useDepthPacking&&a.enable(13);t.dithering&&a.enable(14);t.transmission&&a.enable(15);t.sheen&&a.enable(16);t.opaque&&a.enable(17);t.pointsUvs&&a.enable(18);t.decodeVideoTexture&&a.enable(19);e.push(a.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=Sy[t];n=ny.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e<t;e++){const t=c[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Ax(e,n,t,o),c.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function Rx(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Px(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function kx(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Ix(){const e=[];let t=0;const n=[],r=[],i=[];function o(n,r,i,o,s,a){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:o,renderOrder:n.renderOrder,z:s,group:a},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=o,l.renderOrder=n.renderOrder,l.z=s,l.group=a),t++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?r.unshift(u):!0===s.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Px),r.length>1&&r.sort(t||kx),i.length>1&&i.sort(t||kx)}}}function Ox(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new Ix,e.set(t,[i])):n>=r.length?(i=new Ix,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function Bx(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Gm,color:new cv};break;case"SpotLight":n={position:new Gm,direction:new Gm,color:new cv,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Gm,color:new cv,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Gm,skyColor:new cv,groundColor:new cv};break;case"RectAreaLight":n={color:new cv,position:new Gm,halfWidth:new Gm,halfHeight:new Gm}}return e[t.id]=n,n}}}let Dx=0;function Ux(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function Fx(e,t){const n=new Bx,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new mm};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new mm,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)i.probe.push(new Gm);const o=new Gm,s=new bg,a=new bg;return{setup:function(o,s){let a=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,d=0,h=0,p=0,f=0,m=0,g=0,v=0,y=0,_=0,x=0;o.sort(Ux);const b=!0===s?Math.PI:1;for(let e=0,t=o.length;e<t;e++){const t=o[e],s=t.color,S=t.intensity,w=t.distance,C=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=s.r*S*b,l+=s.g*S*b,c+=s.b*S*b;else if(t.isLightProbe){for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],S);x++}else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[u]=n,i.directionalShadowMap[u]=C,i.directionalShadowMatrix[u]=t.shadow.matrix,m++}i.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(s).multiplyScalar(S*b),e.distance=w,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,i.spot[h]=e;const o=t.shadow;if(t.map&&(i.spotLightMap[y]=t.map,y++,o.updateMatrices(t),t.castShadow&&_++),i.spotLightMatrix[h]=o.matrix,t.castShadow){const e=r.get(t);e.shadowBias=o.bias,e.shadowNormalBias=o.normalBias,e.shadowRadius=o.radius,e.shadowMapSize=o.mapSize,i.spotShadow[h]=e,i.spotShadowMap[h]=C,v++}h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(s).multiplyScalar(S),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[p]=e,p++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[d]=n,i.pointShadowMap[d]=C,i.pointShadowMatrix[d]=t.shadow.matrix,g++}i.point[d]=e,d++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(S*b),e.groundColor.copy(t.groundColor).multiplyScalar(S*b),i.hemi[f]=e,f++}}p>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=by.LTC_FLOAT_1,i.rectAreaLTC2=by.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=by.LTC_HALF_1,i.rectAreaLTC2=by.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=l,i.ambient[2]=c;const S=i.hash;S.directionalLength===u&&S.pointLength===d&&S.spotLength===h&&S.rectAreaLength===p&&S.hemiLength===f&&S.numDirectionalShadows===m&&S.numPointShadows===g&&S.numSpotShadows===v&&S.numSpotMaps===y&&S.numLightProbes===x||(i.directional.length=u,i.spot.length=h,i.rectArea.length=p,i.point.length=d,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=v+y-_,i.spotLightMap.length=y,i.numSpotLightShadowsWithMaps=_,i.numLightProbes=x,S.directionalLength=u,S.pointLength=d,S.spotLength=h,S.rectAreaLength=p,S.hemiLength=f,S.numDirectionalShadows=m,S.numPointShadows=g,S.numSpotShadows=v,S.numSpotMaps=y,S.numLightProbes=x,i.version=Dx++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),n++}else if(h.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),a.identity(),s.copy(h.matrixWorld),s.premultiply(d),a.extractRotation(s),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(a),e.halfHeight.applyMatrix4(a),c++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),r++}else if(h.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),u++}}},state:i}}function Nx(e,t){const n=new Fx(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function zx(e,t){let n=new WeakMap;return{get:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=n.get(r);let s;return void 0===o?(s=new Nx(e,t),n.set(r,[s])):i>=o.length?(s=new Nx(e,t),o.push(s)):s=o[i],s},dispose:function(){n=new WeakMap}}}class Hx extends hv{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Vx extends hv{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function Wx(e,t,n){let r=new gy;const i=new mm,o=new mm,s=new Nm,a=new Hx({depthPacking:3201}),l=new Vx,c={},u=n.maxTextureSize,d={[sp]:ap,[ap]:sp,2:2},h=new ry({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new mm},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=h.clone();p.defines.HORIZONTAL_PASS=1;const f=new kv;f.setAttribute("position",new bv(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new Zv(f,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=rp;let v=this.type;function y(n,r){const o=t.update(m);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new Hm(i.x,i.y)),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,o,h,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,o,p,m,null)}function _(t,n,r,i){let o=null;const s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)o=s;else if(o=!0===r.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=o.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=o.clone(),r[t]=i),o=i}if(o.visible=n.visible,o.wireframe=n.wireframe,o.side=i===op?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],o.alphaMap=n.alphaMap,o.alphaTest=n.alphaTest,o.map=n.map,o.clipShadows=n.clipShadows,o.clippingPlanes=n.clippingPlanes,o.clipIntersection=n.clipIntersection,o.displacementMap=n.displacementMap,o.displacementScale=n.displacementScale,o.displacementBias=n.displacementBias,o.wireframeLinewidth=n.wireframeLinewidth,o.linewidth=n.linewidth,!0===r.isPointLight&&!0===o.isMeshDistanceMaterial){e.properties.get(o).light=r}return o}function x(n,i,o,s,a){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&a===op)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),l=n.material;if(Array.isArray(l)){const t=r.groups;for(let c=0,u=t.length;c<u;c++){const u=t[c],d=l[u.materialIndex];if(d&&d.visible){const t=_(n,d,s,a);n.onBeforeShadow(e,n,i,o,r,t,u),e.renderBufferDirect(o,null,r,t,n,u),n.onAfterShadow(e,n,i,o,r,t,u)}}}else if(l.visible){const t=_(n,l,s,a);n.onBeforeShadow(e,n,i,o,r,t,null),e.renderBufferDirect(o,null,r,t,n,null),n.onAfterShadow(e,n,i,o,r,t,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)x(l[e],i,o,s,a)}this.render=function(t,n,a){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);const p=v!==op&&this.type===op,f=v===op&&this.type!==op;for(let l=0,c=t.length;l<c;l++){const c=t[l],d=c.shadow;if(void 0===d){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===d.autoUpdate&&!1===d.needsUpdate)continue;i.copy(d.mapSize);const m=d.getFrameExtents();if(i.multiply(m),o.copy(d.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/m.x),i.x=o.x*m.x,d.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/m.y),i.y=o.y*m.y,d.mapSize.y=o.y)),null===d.map||!0===p||!0===f){const e=this.type!==op?{minFilter:Pp,magFilter:Pp}:{};null!==d.map&&d.map.dispose(),d.map=new Hm(i.x,i.y,e),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();const g=d.getViewportCount();for(let e=0;e<g;e++){const t=d.getViewport(e);s.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(s),d.updateMatrices(c,e),r=d.getFrustum(),x(n,a,d.camera,c,this.type)}!0!==d.isPointLightShadow&&this.type===op&&y(d,a),d.needsUpdate=!1}v=this.type,g.needsUpdate=!1,e.setRenderTarget(l,c,d)}}function jx(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new Nm;let r=null;const i=new Nm(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,s,a){!0===a&&(t*=s,r*=s,o*=s),n.set(t,r,o,s),!1===i.equals(n)&&(e.clearColor(t,r,o,s),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(t){t?V(e.DEPTH_TEST):W(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},s=new function(){let t=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,c=null;return{setTest:function(n){t||(n?V(e.STENCIL_TEST):W(e.STENCIL_TEST))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,s){r===t&&i===n&&o===s||(e.stencilFunc(t,n,s),r=t,i=n,o=s)},setOp:function(t,n,r){s===t&&a===n&&l===r||(e.stencilOp(t,n,r),s=t,a=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,c=null}}},a=new WeakMap,l=new WeakMap;let c={},u={},d=new WeakMap,h=[],p=null,f=!1,m=null,g=null,v=null,y=null,_=null,x=null,b=null,S=new cv(0,0,0),w=0,C=!1,A=null,M=null,T=null,E=null,L=null;const R=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let P=!1,k=0;const I=e.getParameter(e.VERSION);-1!==I.indexOf("WebGL")?(k=parseFloat(/^WebGL (\d)/.exec(I)[1]),P=k>=1):-1!==I.indexOf("OpenGL ES")&&(k=parseFloat(/^OpenGL ES (\d)/.exec(I)[1]),P=k>=2);let O=null,B={};const D=e.getParameter(e.SCISSOR_BOX),U=e.getParameter(e.VIEWPORT),F=(new Nm).fromArray(D),N=(new Nm).fromArray(U);function z(t,n,i,o){const s=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let a=0;a<i;a++)!r||t!==e.TEXTURE_3D&&t!==e.TEXTURE_2D_ARRAY?e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage3D(n,0,e.RGBA,1,1,o,0,e.RGBA,e.UNSIGNED_BYTE,s);return a}const H={};function V(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function W(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}H[e.TEXTURE_2D]=z(e.TEXTURE_2D,e.TEXTURE_2D,1),H[e.TEXTURE_CUBE_MAP]=z(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),r&&(H[e.TEXTURE_2D_ARRAY]=z(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),H[e.TEXTURE_3D]=z(e.TEXTURE_3D,e.TEXTURE_3D,1,1)),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),V(e.DEPTH_TEST),o.setFunc(3),X(!1),Y(1),V(e.CULL_FACE),$(0);const j={[lp]:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};if(r)j[103]=e.MIN,j[104]=e.MAX;else{const e=t.get("EXT_blend_minmax");null!==e&&(j[103]=e.MIN_EXT,j[104]=e.MAX_EXT)}const G={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,[cp]:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,[up]:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function $(t,n,r,i,o,s,a,l,c,u){if(0!==t){if(!1===f&&(V(e.BLEND),f=!0),5===t)o=o||n,s=s||r,a=a||i,n===g&&o===_||(e.blendEquationSeparate(j[n],j[o]),g=n,_=o),r===v&&i===y&&s===x&&a===b||(e.blendFuncSeparate(G[r],G[i],G[s],G[a]),v=r,y=i,x=s,b=a),!1!==l.equals(S)&&c===w||(e.blendColor(l.r,l.g,l.b,c),S.copy(l),w=c),m=t,C=!1;else if(t!==m||u!==C){if(g===lp&&_===lp||(e.blendEquation(e.FUNC_ADD),g=lp,_=lp),u)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}v=null,y=null,x=null,b=null,S.set(0,0,0),w=0,m=t,C=u}}else!0===f&&(W(e.BLEND),f=!1)}function X(t){A!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),A=t)}function Y(t){0!==t?(V(e.CULL_FACE),t!==M&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):W(e.CULL_FACE),M=t}function q(t,n,r){t?(V(e.POLYGON_OFFSET_FILL),E===n&&L===r||(e.polygonOffset(n,r),E=n,L=r)):W(e.POLYGON_OFFSET_FILL)}return{buffers:{color:i,depth:o,stencil:s},enable:V,disable:W,bindFramebuffer:function(t,n){return u[t]!==n&&(e.bindFramebuffer(t,n),u[t]=n,r&&(t===e.DRAW_FRAMEBUFFER&&(u[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(u[e.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function(r,i){let o=h,s=!1;if(r)if(o=d.get(i),void 0===o&&(o=[],d.set(i,o)),r.isWebGLMultipleRenderTargets){const t=r.texture;if(o.length!==t.length||o[0]!==e.COLOR_ATTACHMENT0){for(let n=0,r=t.length;n<r;n++)o[n]=e.COLOR_ATTACHMENT0+n;o.length=t.length,s=!0}}else o[0]!==e.COLOR_ATTACHMENT0&&(o[0]=e.COLOR_ATTACHMENT0,s=!0);else o[0]!==e.BACK&&(o[0]=e.BACK,s=!0);s&&(n.isWebGL2?e.drawBuffers(o):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(o))},useProgram:function(t){return p!==t&&(e.useProgram(t),p=t,!0)},setBlending:$,setMaterial:function(t,n){2===t.side?W(e.CULL_FACE):V(e.CULL_FACE);let r=t.side===ap;n&&(r=!r),X(r),1===t.blending&&!1===t.transparent?$(0):$(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),o.setFunc(t.depthFunc),o.setTest(t.depthTest),o.setMask(t.depthWrite),i.setMask(t.colorWrite);const a=t.stencilWrite;s.setTest(a),a&&(s.setMask(t.stencilWriteMask),s.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),s.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),q(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?V(e.SAMPLE_ALPHA_TO_COVERAGE):W(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:X,setCullFace:Y,setLineWidth:function(t){t!==T&&(P&&e.lineWidth(t),T=t)},setPolygonOffset:q,setScissorTest:function(t){t?V(e.SCISSOR_TEST):W(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+R-1),O!==t&&(e.activeTexture(t),O=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===O?e.TEXTURE0+R-1:O);let i=B[r];void 0===i&&(i={type:void 0,texture:void 0},B[r]=i),i.type===t&&i.texture===n||(O!==r&&(e.activeTexture(r),O=r),e.bindTexture(t,n||H[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=B[O];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},updateUBOMapping:function(t,n){let r=l.get(n);void 0===r&&(r=new WeakMap,l.set(n,r));let i=r.get(t);void 0===i&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))},uniformBlockBinding:function(t,n){const r=l.get(n).get(t);a.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),a.set(n,r))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===F.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),F.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),!0===r&&(e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),c={},O=null,B={},u={},d=new WeakMap,h=[],p=null,f=!1,m=null,g=null,v=null,y=null,_=null,x=null,b=null,S=new cv(0,0,0),w=0,C=!1,A=null,M=null,T=null,E=null,L=null,F.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),s.reset()}}}function Gx(e,t,n,r,i,o,s){const a=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,d=i.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,p="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),f=new WeakMap;let m;const g=new WeakMap;let v=!1;try{v="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function y(e,t){return v?new OffscreenCanvas(e,t):bm("canvas")}function _(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?dm:Math.floor,o=r(i*e.width),s=r(i*e.height);void 0===m&&(m=y(o,s));const a=n?y(o,s):m;a.width=o,a.height=s;return a.getContext("2d").drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),a}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return um(e.width)&&um(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==Pp&&e.minFilter!==Op}function S(t){e.generateMipmap(t)}function w(n,r,i,o){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!1===a)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;if(r===e.RED&&(i===e.FLOAT&&(l=e.R32F),i===e.HALF_FLOAT&&(l=e.R16F),i===e.UNSIGNED_BYTE&&(l=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(l=e.R8UI),i===e.UNSIGNED_SHORT&&(l=e.R16UI),i===e.UNSIGNED_INT&&(l=e.R32UI),i===e.BYTE&&(l=e.R8I),i===e.SHORT&&(l=e.R16I),i===e.INT&&(l=e.R32I)),r===e.RG&&(i===e.FLOAT&&(l=e.RG32F),i===e.HALF_FLOAT&&(l=e.RG16F),i===e.UNSIGNED_BYTE&&(l=e.RG8)),r===e.RGBA){const t=s?Gf:Lm.getTransfer(o);i===e.FLOAT&&(l=e.RGBA32F),i===e.HALF_FLOAT&&(l=e.RGBA16F),i===e.UNSIGNED_BYTE&&(l=t===$f?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)}return l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function C(e,t,n){return!0===b(e,n)||e.isFramebufferTexture&&e.minFilter!==Pp&&e.minFilter!==Op?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function A(t){return t===Pp||t===kp||t===Ip?e.NEAREST:e.LINEAR}function M(e){const t=e.target;t.removeEventListener("dispose",M),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&E(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function T(t){const n=t.target;n.removeEventListener("dispose",T),function(t){const n=t.texture,i=r.get(t),o=r.get(n);void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),s.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n<i.__webglFramebuffer[t].length;n++)e.deleteFramebuffer(i.__webglFramebuffer[t][n]);else e.deleteFramebuffer(i.__webglFramebuffer[t]);i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t])}else{if(Array.isArray(i.__webglFramebuffer))for(let t=0;t<i.__webglFramebuffer.length;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer);if(i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t<i.__webglColorRenderbuffer.length;t++)i.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[t]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),s.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function E(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete g.get(i)[n.__cacheKey],s.memory.textures--}let L=0;function R(t,i){const o=r.get(t);if(t.isVideoTexture&&function(e){const t=s.render.frame;f.get(e)!==t&&(f.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&t.version>0&&o.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(o,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,o.__webglTexture,e.TEXTURE0+i)}const P={[Ep]:e.REPEAT,[Lp]:e.CLAMP_TO_EDGE,[Rp]:e.MIRRORED_REPEAT},k={[Pp]:e.NEAREST,[kp]:e.NEAREST_MIPMAP_NEAREST,[Ip]:e.NEAREST_MIPMAP_LINEAR,[Op]:e.LINEAR,[Bp]:e.LINEAR_MIPMAP_NEAREST,[Dp]:e.LINEAR_MIPMAP_LINEAR},I={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function O(n,o,s){if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,P[o.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,P[o.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,P[o.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,k[o.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,k[o.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),o.wrapS===Lp&&o.wrapT===Lp||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,A(o.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,A(o.minFilter)),o.minFilter!==Pp&&o.minFilter!==Op&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),o.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,I[o.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const s=t.get("EXT_texture_filter_anisotropic");if(o.magFilter===Pp)return;if(o.minFilter!==Ip&&o.minFilter!==Dp)return;if(o.type===Hp&&!1===t.has("OES_texture_float_linear"))return;if(!1===a&&o.type===Vp&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function B(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M));const i=n.source;let o=g.get(i);void 0===o&&(o={},g.set(i,o));const a=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(a!==t.__cacheKey){void 0===o[a]&&(o[a]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),o[a].usedTimes++;const i=o[t.__cacheKey];void 0!==i&&(o[t.__cacheKey].usedTimes--,0===i.usedTimes&&E(n)),t.__cacheKey=a,t.__webglTexture=o[a].texture}return r}function D(t,i,s){let l=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(l=e.TEXTURE_3D);const c=B(t,i),d=i.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+s);const h=r.get(d);if(d.version!==h.__version||!0===c){n.activeTexture(e.TEXTURE0+s);const t=Lm.getPrimaries(Lm.workingColorSpace),r=i.colorSpace===zf?null:Lm.getPrimaries(i.colorSpace),p=i.colorSpace===zf||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);const f=function(e){return!a&&(e.wrapS!==Lp||e.wrapT!==Lp||e.minFilter!==Pp&&e.minFilter!==Op)}(i)&&!1===x(i.image);let m=_(i.image,f,!1,u);m=V(i,m);const g=x(m)||a,v=o.convert(i.format,i.colorSpace);let y,A=o.convert(i.type),M=w(i.internalFormat,v,A,i.colorSpace,i.isVideoTexture);O(l,i,g);const T=i.mipmaps,E=a&&!0!==i.isVideoTexture&&M!==af,L=void 0===h.__version||!0===c,R=C(i,m,g);if(i.isDepthTexture)M=e.DEPTH_COMPONENT,a?M=i.type===Hp?e.DEPTH_COMPONENT32F:i.type===zp?e.DEPTH_COMPONENT24:i.type===Gp?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===Hp&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Xp&&M===e.DEPTH_COMPONENT&&i.type!==Fp&&i.type!==zp&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=zp,A=o.convert(i.type)),i.format===Yp&&M===e.DEPTH_COMPONENT&&(M=e.DEPTH_STENCIL,i.type!==Gp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Gp,A=o.convert(i.type))),L&&(E?n.texStorage2D(e.TEXTURE_2D,1,M,m.width,m.height):n.texImage2D(e.TEXTURE_2D,0,M,m.width,m.height,0,v,A,null));else if(i.isDataTexture)if(T.length>0&&g){E&&L&&n.texStorage2D(e.TEXTURE_2D,R,M,T[0].width,T[0].height);for(let t=0,r=T.length;t<r;t++)y=T[t],E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,y.width,y.height,v,A,y.data):n.texImage2D(e.TEXTURE_2D,t,M,y.width,y.height,0,v,A,y.data);i.generateMipmaps=!1}else E?(L&&n.texStorage2D(e.TEXTURE_2D,R,M,m.width,m.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,m.width,m.height,v,A,m.data)):n.texImage2D(e.TEXTURE_2D,0,M,m.width,m.height,0,v,A,m.data);else if(i.isCompressedTexture)if(i.isCompressedArrayTexture){E&&L&&n.texStorage3D(e.TEXTURE_2D_ARRAY,R,M,T[0].width,T[0].height,m.depth);for(let t=0,r=T.length;t<r;t++)y=T[t],i.format!==$p?null!==v?E?n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,y.width,y.height,m.depth,v,y.data,0,0):n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,M,y.width,y.height,m.depth,0,y.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):E?n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,y.width,y.height,m.depth,v,A,y.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,M,y.width,y.height,m.depth,0,v,A,y.data)}else{E&&L&&n.texStorage2D(e.TEXTURE_2D,R,M,T[0].width,T[0].height);for(let t=0,r=T.length;t<r;t++)y=T[t],i.format!==$p?null!==v?E?n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,y.width,y.height,v,y.data):n.compressedTexImage2D(e.TEXTURE_2D,t,M,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,y.width,y.height,v,A,y.data):n.texImage2D(e.TEXTURE_2D,t,M,y.width,y.height,0,v,A,y.data)}else if(i.isDataArrayTexture)E?(L&&n.texStorage3D(e.TEXTURE_2D_ARRAY,R,M,m.width,m.height,m.depth),n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,m.width,m.height,m.depth,v,A,m.data)):n.texImage3D(e.TEXTURE_2D_ARRAY,0,M,m.width,m.height,m.depth,0,v,A,m.data);else if(i.isData3DTexture)E?(L&&n.texStorage3D(e.TEXTURE_3D,R,M,m.width,m.height,m.depth),n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,m.width,m.height,m.depth,v,A,m.data)):n.texImage3D(e.TEXTURE_3D,0,M,m.width,m.height,m.depth,0,v,A,m.data);else if(i.isFramebufferTexture){if(L)if(E)n.texStorage2D(e.TEXTURE_2D,R,M,m.width,m.height);else{let t=m.width,r=m.height;for(let i=0;i<R;i++)n.texImage2D(e.TEXTURE_2D,i,M,t,r,0,v,A,null),t>>=1,r>>=1}}else if(T.length>0&&g){E&&L&&n.texStorage2D(e.TEXTURE_2D,R,M,T[0].width,T[0].height);for(let t=0,r=T.length;t<r;t++)y=T[t],E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,v,A,y):n.texImage2D(e.TEXTURE_2D,t,M,v,A,y);i.generateMipmaps=!1}else E?(L&&n.texStorage2D(e.TEXTURE_2D,R,M,m.width,m.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,v,A,m)):n.texImage2D(e.TEXTURE_2D,0,M,v,A,m);b(i,g)&&S(l),h.__version=d.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function U(t,i,s,a,l,c){const u=o.convert(s.format,s.colorSpace),d=o.convert(s.type),p=w(s.internalFormat,u,d,s.colorSpace);if(!r.get(i).__hasExternalTextures){const t=Math.max(1,i.width>>c),r=Math.max(1,i.height>>c);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,c,p,t,r,i.depth,0,u,d,null):n.texImage2D(l,c,p,t,r,0,u,d,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),H(i)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,a,l,r.get(s).__webglTexture,0,z(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,a,l,r.get(s).__webglTexture,c),n.bindFramebuffer(e.FRAMEBUFFER,null)}function F(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=!0===a?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(r||H(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Hp?i=e.DEPTH_COMPONENT32F:t.type===zp&&(i=e.DEPTH_COMPONENT24));const r=z(n);H(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=z(n);r&&!1===H(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):H(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i<t.length;i++){const s=t[i],a=o.convert(s.format,s.colorSpace),l=o.convert(s.type),c=w(s.internalFormat,a,l,s.colorSpace),u=z(n);r&&!1===H(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,c,n.width,n.height):H(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,c,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,c,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function N(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(e.FRAMEBUFFER,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),R(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture,s=z(i);if(i.depthTexture.format===Xp)H(i)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,o,0);else{if(i.depthTexture.format!==Yp)throw new Error("Unknown depthTexture format");H(i)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,o,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),F(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),F(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(e.FRAMEBUFFER,null)}function z(e){return Math.min(d,e.samples)}function H(e){const n=r.get(e);return a&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function V(e,n){const r=e.colorSpace,i=e.format,o=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===Kf||r!==Vf&&r!==zf&&(Lm.getTransfer(r)===$f?!1===a?!0===t.has("EXT_sRGB")&&i===$p?(e.format=Kf,e.minFilter=Op,e.generateMipmaps=!1):n=Im.sRGBToLinear(n):i===$p&&o===Up||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){const e=L;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),L+=1,e},this.resetTextureUnits=function(){L=0},this.setTexture2D=R,this.setTexture2DArray=function(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?D(o,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,o.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?D(o,t,i):n.bindTexture(e.TEXTURE_3D,o.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?function(t,i,s){if(6!==i.image.length)return;const l=B(t,i),u=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);const d=r.get(u);if(u.version!==d.__version||!0===l){n.activeTexture(e.TEXTURE0+s);const t=Lm.getPrimaries(Lm.workingColorSpace),r=i.colorSpace===zf?null:Lm.getPrimaries(i.colorSpace),h=i.colorSpace===zf||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);const p=i.isCompressedTexture||i.image[0].isCompressedTexture,f=i.image[0]&&i.image[0].isDataTexture,m=[];for(let e=0;e<6;e++)m[e]=p||f?f?i.image[e].image:i.image[e]:_(i.image[e],!1,!0,c),m[e]=V(i,m[e]);const g=m[0],v=x(g)||a,y=o.convert(i.format,i.colorSpace),A=o.convert(i.type),M=w(i.internalFormat,y,A,i.colorSpace),T=a&&!0!==i.isVideoTexture,E=void 0===d.__version||!0===l;let L,R=C(i,g,v);if(O(e.TEXTURE_CUBE_MAP,i,v),p){T&&E&&n.texStorage2D(e.TEXTURE_CUBE_MAP,R,M,g.width,g.height);for(let t=0;t<6;t++){L=m[t].mipmaps;for(let r=0;r<L.length;r++){const o=L[r];i.format!==$p?null!==y?T?n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,o.width,o.height,y,o.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,M,o.width,o.height,0,o.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):T?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,o.width,o.height,y,A,o.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,M,o.width,o.height,0,y,A,o.data)}}}else{L=i.mipmaps,T&&E&&(L.length>0&&R++,n.texStorage2D(e.TEXTURE_CUBE_MAP,R,M,m[0].width,m[0].height));for(let t=0;t<6;t++)if(f){T?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,y,A,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,M,m[t].width,m[t].height,0,y,A,m[t].data);for(let r=0;r<L.length;r++){const i=L[r].image[t].image;T?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,i.width,i.height,y,A,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,M,i.width,i.height,0,y,A,i.data)}}else{T?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,y,A,m[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,M,y,A,m[t]);for(let r=0;r<L.length;r++){const i=L[r];T?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,y,A,i.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,M,y,A,i.image[t])}}}b(i,v)&&S(e.TEXTURE_CUBE_MAP),d.__version=u.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}(s,t,i):n.bindTexture(e.TEXTURE_CUBE_MAP,s.__webglTexture,e.TEXTURE0+i)},this.rebindTextures=function(t,n,i){const o=r.get(t);void 0!==n&&U(o.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==i&&N(t)},this.setupRenderTarget=function(t){const l=t.texture,c=r.get(t),u=r.get(l);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=l.version,s.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,p=x(t)||a;if(d){c.__webglFramebuffer=[];for(let t=0;t<6;t++)if(a&&l.mipmaps&&l.mipmaps.length>0){c.__webglFramebuffer[t]=[];for(let n=0;n<l.mipmaps.length;n++)c.__webglFramebuffer[t][n]=e.createFramebuffer()}else c.__webglFramebuffer[t]=e.createFramebuffer()}else{if(a&&l.mipmaps&&l.mipmaps.length>0){c.__webglFramebuffer=[];for(let t=0;t<l.mipmaps.length;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else c.__webglFramebuffer=e.createFramebuffer();if(h)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&t.samples>0&&!1===H(t)){const r=h?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n<r.length;n++){const i=r[n];c.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const s=o.convert(i.format,i.colorSpace),a=o.convert(i.type),l=w(i.internalFormat,s,a,i.colorSpace,!0===t.isXRRenderTarget),u=z(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,u,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,c.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),F(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(d){n.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),O(e.TEXTURE_CUBE_MAP,l,p);for(let n=0;n<6;n++)if(a&&l.mipmaps&&l.mipmaps.length>0)for(let r=0;r<l.mipmaps.length;r++)U(c.__webglFramebuffer[n][r],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else U(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);b(l,p)&&S(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(h){const i=t.texture;for(let o=0,s=i.length;o<s;o++){const s=i[o],a=r.get(s);n.bindTexture(e.TEXTURE_2D,a.__webglTexture),O(e.TEXTURE_2D,s,p),U(c.__webglFramebuffer,t,s,e.COLOR_ATTACHMENT0+o,e.TEXTURE_2D,0),b(s,p)&&S(e.TEXTURE_2D)}n.unbindTexture()}else{let r=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(a?r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(r,u.__webglTexture),O(r,l,p),a&&l.mipmaps&&l.mipmaps.length>0)for(let n=0;n<l.mipmaps.length;n++)U(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,r,n);else U(c.__webglFramebuffer,t,l,e.COLOR_ATTACHMENT0,r,0);b(l,p)&&S(r),n.unbindTexture()}t.depthBuffer&&N(t)},this.updateRenderTargetMipmap=function(t){const i=x(t)||a,o=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let s=0,a=o.length;s<a;s++){const a=o[s];if(b(a,i)){const i=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,o=r.get(a).__webglTexture;n.bindTexture(i,o),S(i),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(a&&t.samples>0&&!1===H(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],o=t.width,s=t.height;let a=e.COLOR_BUFFER_BIT;const l=[],c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=!0===t.isWebGLMultipleRenderTargets;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){l.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&l.push(c);const h=void 0!==u.__ignoreDepthValues&&u.__ignoreDepthValues;if(!1===h&&(t.depthBuffer&&(a|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&(a|=e.STENCIL_BUFFER_BIT)),d&&e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRenderbuffer[n]),!0===h&&(e.invalidateFramebuffer(e.READ_FRAMEBUFFER,[c]),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[c])),d){const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,o,s,0,0,o,s,a,e.NEAREST),p&&e.invalidateFramebuffer(e.READ_FRAMEBUFFER,l)}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);const o=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,o,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=N,this.setupFrameBufferTexture=U,this.useMultisampledRTT=H}function $x(e,t,n){const r=n.isWebGL2;return{convert:function(n){let i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zf;const s=Lm.getTransfer(o);if(n===Up)return e.UNSIGNED_BYTE;if(n===Wp)return e.UNSIGNED_SHORT_4_4_4_4;if(n===jp)return e.UNSIGNED_SHORT_5_5_5_1;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(n===Fp)return e.UNSIGNED_SHORT;if(n===Np)return e.INT;if(n===zp)return e.UNSIGNED_INT;if(n===Hp)return e.FLOAT;if(n===Vp)return r?e.HALF_FLOAT:(i=t.get("OES_texture_half_float"),null!==i?i.HALF_FLOAT_OES:null);if(1021===n)return e.ALPHA;if(n===$p)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(n===Xp)return e.DEPTH_COMPONENT;if(n===Yp)return e.DEPTH_STENCIL;if(n===Kf)return i=t.get("EXT_sRGB"),null!==i?i.SRGB_ALPHA_EXT:null;if(1028===n)return e.RED;if(n===qp)return e.RED_INTEGER;if(1030===n)return e.RG;if(n===Zp)return e.RG_INTEGER;if(n===Jp)return e.RGBA_INTEGER;if(n===Kp||n===Qp||n===ef||n===tf)if(s===$f){if(i=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===i)return null;if(n===Kp)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Qp)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===ef)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===tf)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(i=t.get("WEBGL_compressed_texture_s3tc"),null===i)return null;if(n===Kp)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Qp)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ef)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===tf)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===nf||n===rf||n===of||n===sf){if(i=t.get("WEBGL_compressed_texture_pvrtc"),null===i)return null;if(n===nf)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===rf)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===of)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sf)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===af)return i=t.get("WEBGL_compressed_texture_etc1"),null!==i?i.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===lf||n===cf){if(i=t.get("WEBGL_compressed_texture_etc"),null===i)return null;if(n===lf)return s===$f?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===cf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}if(n===uf||n===df||n===hf||n===pf||n===ff||n===mf||n===gf||n===vf||n===yf||n===_f||n===xf||n===bf||n===Sf||n===wf){if(i=t.get("WEBGL_compressed_texture_astc"),null===i)return null;if(n===uf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===df)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===pf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===ff)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===mf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===gf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===vf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===yf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_f)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===xf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===bf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Sf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===wf)return s===$f?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===Cf||n===Af||n===Mf){if(i=t.get("EXT_texture_compression_bptc"),null===i)return null;if(n===Cf)return s===$f?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Af)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Mf)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===n||n===Tf||n===Ef||n===Lf){if(i=t.get("EXT_texture_compression_rgtc"),null===i)return null;if(n===Cf)return i.COMPRESSED_RED_RGTC1_EXT;if(n===Tf)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Ef)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Lf)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===Gp?r?e.UNSIGNED_INT_24_8:(i=t.get("WEBGL_depth_texture"),null!==i?i.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Xx extends oy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.isArrayCamera=!0,this.cameras=e}}class Yx extends $g{constructor(){super(),this.isGroup=!0,this.type="Group"}}const qx={type:"move"};class Zx{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Yx,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Yx,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Gm,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Gm),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Yx,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Gm,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Gm),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n),i=this._getHandJoint(l,r);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),a=.02,c=.005;l.inputState.pinching&&s>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1));null!==s&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(qx)))}return null!==s&&(s.visible=null!==r),null!==a&&(a.visible=null!==i),null!==l&&(l.visible=null!==o),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new Yx;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Jx extends tm{constructor(e,t){super();const n=this;let r=null,i=1,o=null,s="local-floor",a=1,l=null,c=null,u=null,d=null,h=null,p=null;const f=t.getContextAttributes();let m=null,g=null;const v=[],y=[],_=new mm;let x=null;const b=new oy;b.layers.enable(1),b.viewport=new Nm;const S=new oy;S.layers.enable(2),S.viewport=new Nm;const w=[b,S],C=new Xx;C.layers.enable(1),C.layers.enable(2);let A=null,M=null;function T(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const n=v[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||o),n.dispatchEvent({type:e.type,data:e.inputSource}))}function E(){r.removeEventListener("select",T),r.removeEventListener("selectstart",T),r.removeEventListener("selectend",T),r.removeEventListener("squeeze",T),r.removeEventListener("squeezestart",T),r.removeEventListener("squeezeend",T),r.removeEventListener("end",E),r.removeEventListener("inputsourceschange",L);for(let e=0;e<v.length;e++){const t=y[e];null!==t&&(y[e]=null,v[e].disconnect(t))}A=null,M=null,e.setRenderTarget(m),h=null,d=null,u=null,r=null,g=null,O.stop(),n.isPresenting=!1,e.setPixelRatio(x),e.setSize(_.width,_.height,!1),n.dispatchEvent({type:"sessionend"})}function L(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=y.indexOf(n);r>=0&&(y[r]=null,v[r].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let r=y.indexOf(n);if(-1===r){for(let e=0;e<v.length;e++){if(e>=y.length){y.push(n),r=e;break}if(null===y[e]){y[e]=n,r=e;break}}if(-1===r)break}const i=v[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return void 0===t&&(t=new Zx,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new Zx,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new Zx,v[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||o},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==d?d:h},this.getBinding=function(){return u},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(c){if(r=c,null!==r){if(m=e.getRenderTarget(),r.addEventListener("select",T),r.addEventListener("selectstart",T),r.addEventListener("selectend",T),r.addEventListener("squeeze",T),r.addEventListener("squeezestart",T),r.addEventListener("squeezeend",T),r.addEventListener("end",E),r.addEventListener("inputsourceschange",L),!0!==f.xrCompatible&&await t.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(_),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),g=new Hm(h.framebufferWidth,h.framebufferHeight,{format:$p,type:Up,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,o=null,s=null;f.depth&&(s=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=f.stencil?Yp:Xp,o=f.stencil?Gp:zp);const a={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};u=new XRWebGLBinding(r,t),d=u.createProjectionLayer(a),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),g=new Hm(d.textureWidth,d.textureHeight,{format:$p,type:Up,depthTexture:new n_(d.textureWidth,d.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0});e.properties.get(g).__ignoreDepthValues=d.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(a),l=null,o=await r.requestReferenceSpace(s),O.setContext(r),O.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const R=new Gm,P=new Gm;function k(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;C.near=S.near=b.near=e.near,C.far=S.far=b.far=e.far,A===C.near&&M===C.far||(r.updateRenderState({depthNear:C.near,depthFar:C.far}),A=C.near,M=C.far);const t=e.parent,n=C.cameras;k(C,t);for(let e=0;e<n.length;e++)k(n[e],t);2===n.length?function(e,t,n){R.setFromMatrixPosition(t.matrixWorld),P.setFromMatrixPosition(n.matrixWorld);const r=R.distanceTo(P),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,s=i[14]/(i[10]-1),a=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(o[8]+1)/o[0],h=s*u,p=s*d,f=r/(-u+d),m=f*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+f,v=a+f,y=h-m,_=p+(r-m),x=l*a/v*g,b=c*a/v*g;e.projectionMatrix.makePerspective(y,_,x,b,g,v),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}(C,b,S):C.projectionMatrix.copy(b.projectionMatrix),function(e,t,n){null===n?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld));e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=2*om*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}(e,C,t)},this.getCamera=function(){return C},this.getFoveation=function(){if(null!==d||null!==h)return a},this.setFoveation=function(e){a=e,null!==d&&(d.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)};let I=null;const O=new vy;O.setAnimationLoop((function(t,r){if(c=r.getViewerPose(l||o),p=r,null!==c){const t=c.views;null!==h&&(e.setRenderTargetFramebuffer(g,h.framebuffer),e.setRenderTarget(g));let n=!1;t.length!==C.cameras.length&&(C.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let o=null;if(null!==h)o=h.getViewport(i);else{const t=u.getViewSubImage(d,i);o=t.viewport,0===r&&(e.setRenderTargetTextures(g,t.colorTexture,d.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(g))}let s=w[r];void 0===s&&(s=new oy,s.layers.enable(r),s.viewport=new Nm,w[r]=s),s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(i.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(o.x,o.y,o.width,o.height),0===r&&(C.matrix.copy(s.matrix),C.matrix.decompose(C.position,C.quaternion,C.scale)),!0===n&&C.cameras.push(s)}}for(let e=0;e<v.length;e++){const t=y[e],n=v[e];null!==t&&void 0!==n&&n.update(t,r,l||o)}I&&I(t,r),r.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:r}),p=null})),this.setAnimationLoop=function(e){I=e},this.dispose=function(){}}}function Kx(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function r(r,i){r.opacity.value=i.opacity,i.color&&r.diffuse.value.copy(i.color),i.emissive&&r.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(r.map.value=i.map,n(i.map,r.mapTransform)),i.alphaMap&&(r.alphaMap.value=i.alphaMap,n(i.alphaMap,r.alphaMapTransform)),i.bumpMap&&(r.bumpMap.value=i.bumpMap,n(i.bumpMap,r.bumpMapTransform),r.bumpScale.value=i.bumpScale,i.side===ap&&(r.bumpScale.value*=-1)),i.normalMap&&(r.normalMap.value=i.normalMap,n(i.normalMap,r.normalMapTransform),r.normalScale.value.copy(i.normalScale),i.side===ap&&r.normalScale.value.negate()),i.displacementMap&&(r.displacementMap.value=i.displacementMap,n(i.displacementMap,r.displacementMapTransform),r.displacementScale.value=i.displacementScale,r.displacementBias.value=i.displacementBias),i.emissiveMap&&(r.emissiveMap.value=i.emissiveMap,n(i.emissiveMap,r.emissiveMapTransform)),i.specularMap&&(r.specularMap.value=i.specularMap,n(i.specularMap,r.specularMapTransform)),i.alphaTest>0&&(r.alphaTest.value=i.alphaTest);const o=t.get(i).envMap;if(o&&(r.envMap.value=o,r.flipEnvMap.value=o.isCubeTexture&&!1===o.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,ty(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,o,s,a){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform));e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform));const i=t.get(r).envMap;i&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===ap&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,a)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,o,s):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function Qx(e,t,n,r){let i={},o={},s=[];const a=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t<e.length;t++)i.push(e[t].clone());n[t]=i}return!0}if("number"==typeof r){if(n[t]!==r)return n[t]=r,!0}else{const e=Array.isArray(n[t])?n[t]:[n[t]],i=Array.isArray(r)?r:[r];for(let t=0;t<e.length;t++){const n=e[t];if(!1===n.equals(i[t]))return n.copy(i[t]),!0}}return!1}function c(e){const t={boundary:0,storage:0};return"number"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){const n=t.target;n.removeEventListener("dispose",u);const r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete o[n.id]}return{bind:function(e,t){const n=t.program;r.uniformBlockBinding(e,n)},update:function(n,d){let h=i[n.id];void 0===h&&(!function(e){const t=e.uniforms;let n=0;const r=16;let i=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s={boundary:0,storage:0},a=Array.isArray(o.value)?o.value:[o.value];for(let e=0,t=a.length;e<t;e++){const t=c(a[e]);s.boundary+=t.boundary,s.storage+=t.storage}if(o.__data=new Float32Array(s.storage/Float32Array.BYTES_PER_ELEMENT),o.__offset=n,e>0){i=n%r;0!==i&&r-i-s.boundary<0&&(n+=r-i,o.__offset=n)}n+=s.storage}i=n%r,i>0&&(n+=r-i);e.__size=n,e.__cache={}}(n),h=function(t){const n=function(){for(let e=0;e<a;e++)if(-1===s.indexOf(e))return s.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const r=e.createBuffer(),i=t.__size,o=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,o),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}(n),i[n.id]=h,n.addEventListener("dispose",u));const p=d.program;r.updateUBOMapping(n,p);const f=t.render.frame;o[n.id]!==f&&(!function(t){const n=i[t.id],r=t.uniforms,o=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=r.length;t<n;t++){const n=r[t];if(!0===l(n,t,o)){const t=n.__offset,r=Array.isArray(n.value)?n.value:[n.value];let i=0;for(let o=0;o<r.length;o++){const s=r[o],a=c(s);"number"==typeof s?(n.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,t+i,n.__data)):s.isMatrix3?(n.__data[0]=s.elements[0],n.__data[1]=s.elements[1],n.__data[2]=s.elements[2],n.__data[3]=s.elements[0],n.__data[4]=s.elements[3],n.__data[5]=s.elements[4],n.__data[6]=s.elements[5],n.__data[7]=s.elements[0],n.__data[8]=s.elements[6],n.__data[9]=s.elements[7],n.__data[10]=s.elements[8],n.__data[11]=s.elements[0]):(s.toArray(n.__data,i),i+=a.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,n.__data)}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),o[n.id]=f)},dispose:function(){for(const t in i)e.deleteBuffer(i[t]);s=[],i={},o={}}}}class eb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{canvas:t=Sm(),context:n=null,depth:r=!0,stencil:i=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:a=!0,preserveDrawingBuffer:l=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:u=!1}=e;let d;this.isWebGLRenderer=!0,d=null!==n?n.getContextAttributes().alpha:o;const h=new Uint32Array(4),p=new Int32Array(4);let f=null,m=null;const g=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Hf,this._useLegacyLights=!1,this.toneMapping=fp,this.toneMappingExposure=1;const y=this;let _=!1,x=0,b=0,S=null,w=-1,C=null;const A=new Nm,M=new Nm;let T=null;const E=new cv(0);let L=0,R=t.width,P=t.height,k=1,I=null,O=null;const B=new Nm(0,0,R,P),D=new Nm(0,0,R,P);let U=!1;const F=new gy;let N=!1,z=!1,H=null;const V=new bg,W=new mm,j=new Gm,G={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function $(){return null===S?k:1}let X,Y,q,Z,J,K,Q,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:!0,depth:r,stencil:i,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${np}`),t.addEventListener("webglcontextlost",be,!1),t.addEventListener("webglcontextrestored",Se,!1),t.addEventListener("webglcontextcreationerror",we,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===y.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}"undefined"!=typeof WebGLRenderingContext&&ve instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function _e(){X=new Yy(ve),Y=new Ty(ve,X,e),X.init(Y),fe=new $x(ve,X,Y),q=new jx(ve,X,Y),Z=new Jy(ve),J=new Rx,K=new Gx(ve,X,q,J,Y,fe,Z),Q=new Ly(y),ee=new Xy(y),te=new yy(ve,Y),me=new Ay(ve,X,te,Y),ne=new qy(ve,te,Z,me),re=new t_(ve,ne,te,Z),de=new e_(ve,Y,K),le=new Ey(J),ie=new Lx(y,Q,ee,X,Y,me,le),oe=new Kx(y,J),se=new Ox,ae=new zx(X,Y),ue=new Cy(y,Q,ee,q,re,d,a),ce=new Wx(y,re,Y),ge=new Qx(ve,Z,Y,q),he=new My(ve,X,Z,Y),pe=new Zy(ve,X,Z,Y),Z.programs=ie.programs,y.capabilities=Y,y.extensions=X,y.properties=J,y.renderLists=se,y.shadowMap=ce,y.state=q,y.info=Z}_e();const xe=new Jx(y,ve);function be(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function Se(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;const e=Z.autoReset,t=ce.enabled,n=ce.autoUpdate,r=ce.needsUpdate,i=ce.type;_e(),Z.autoReset=e,ce.enabled=t,ce.autoUpdate=n,ce.needsUpdate=r,ce.type=i}function we(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Ce(e){const t=e.target;t.removeEventListener("dispose",Ce),function(e){(function(e){const t=J.get(e).programs;void 0!==t&&(t.forEach((function(e){ie.releaseProgram(e)})),e.isShaderMaterial&&ie.releaseShaderCache(e))})(e),J.remove(e)}(t)}function Ae(e,t,n){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=ap,e.needsUpdate=!0,Oe(e,t,n),e.side=sp,e.needsUpdate=!0,Oe(e,t,n),e.side=2):Oe(e,t,n)}this.xr=xe,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=X.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=X.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return k},this.setPixelRatio=function(e){void 0!==e&&(k=e,this.setSize(R,P,!1))},this.getSize=function(e){return e.set(R,P)},this.setSize=function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];xe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,P=n,t.width=Math.floor(e*k),t.height=Math.floor(n*k),!0===r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(R*k,P*k).floor()},this.setDrawingBufferSize=function(e,n,r){R=e,P=n,k=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(B)},this.setViewport=function(e,t,n,r){e.isVector4?B.set(e.x,e.y,e.z,e.w):B.set(e,t,n,r),q.viewport(A.copy(B).multiplyScalar(k).floor())},this.getScissor=function(e){return e.copy(D)},this.setScissor=function(e,t,n,r){e.isVector4?D.set(e.x,e.y,e.z,e.w):D.set(e,t,n,r),q.scissor(M.copy(D).multiplyScalar(k).floor())},this.getScissorTest=function(){return U},this.setScissorTest=function(e){q.setScissorTest(U=e)},this.setOpaqueSort=function(e){I=e},this.setTransparentSort=function(e){O=e},this.getClearColor=function(e){return e.copy(ue.getClearColor())},this.setClearColor=function(){ue.setClearColor.apply(ue,arguments)},this.getClearAlpha=function(){return ue.getClearAlpha()},this.setClearAlpha=function(){ue.setClearAlpha.apply(ue,arguments)},this.clear=function(){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=0;if(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]){let e=!1;if(null!==S){const t=S.texture.format;e=t===Jp||t===Zp||t===qp}if(e){const e=S.texture.type,t=e===Up||e===zp||e===Fp||e===Gp||e===Wp||e===jp,n=ue.getClearColor(),r=ue.getClearAlpha(),i=n.r,o=n.g,s=n.b;t?(h[0]=i,h[1]=o,h[2]=s,h[3]=r,ve.clearBufferuiv(ve.COLOR,0,h)):(p[0]=i,p[1]=o,p[2]=s,p[3]=r,ve.clearBufferiv(ve.COLOR,0,p))}else n|=ve.COLOR_BUFFER_BIT}e&&(n|=ve.DEPTH_BUFFER_BIT),t&&(n|=ve.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),ve.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",be,!1),t.removeEventListener("webglcontextrestored",Se,!1),t.removeEventListener("webglcontextcreationerror",we,!1),se.dispose(),ae.dispose(),J.dispose(),Q.dispose(),ee.dispose(),re.dispose(),me.dispose(),ge.dispose(),ie.dispose(),xe.dispose(),xe.removeEventListener("sessionstart",Te),xe.removeEventListener("sessionend",Ee),H&&(H.dispose(),H=null),Le.stop()},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=G);const s=i.isMesh&&i.matrixWorld.determinant()<0,a=function(e,t,n,r,i){!0!==t.isScene&&(t=G);K.resetTextureUnits();const o=t.fog,s=r.isMeshStandardMaterial?t.environment:null,a=null===S?y.outputColorSpace:!0===S.isXRRenderTarget?S.texture.colorSpace:Vf,l=(r.isMeshStandardMaterial?ee:Q).get(r.envMap||s),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),d=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let f=fp;r.toneMapped&&(null!==S&&!0!==S.isXRRenderTarget||(f=y.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,_=J.get(r),x=m.state.lights;if(!0===N&&(!0===z||e!==C)){const t=e===C&&r.id===w;le.setState(r,e,t)}let b=!1;r.version===_.__version?_.needsLights&&_.lightsStateVersion!==x.state.version||_.outputColorSpace!==a||i.isBatchedMesh&&!1===_.batching?b=!0:i.isBatchedMesh||!0!==_.batching?i.isInstancedMesh&&!1===_.instancing?b=!0:i.isInstancedMesh||!0!==_.instancing?i.isSkinnedMesh&&!1===_.skinning?b=!0:i.isSkinnedMesh||!0!==_.skinning?i.isInstancedMesh&&!0===_.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===_.instancingColor&&null!==i.instanceColor||_.envMap!==l||!0===r.fog&&_.fog!==o?b=!0:void 0===_.numClippingPlanes||_.numClippingPlanes===le.numPlanes&&_.numIntersection===le.numIntersection?(_.vertexAlphas!==c||_.vertexTangents!==u||_.morphTargets!==d||_.morphNormals!==h||_.morphColors!==p||_.toneMapping!==f||!0===Y.isWebGL2&&_.morphTargetsCount!==v)&&(b=!0):b=!0:b=!0:b=!0:b=!0:(b=!0,_.__version=r.version);let A=_.currentProgram;!0===b&&(A=Oe(r,t,i));let M=!1,T=!1,E=!1;const L=A.getUniforms(),R=_.uniforms;q.useProgram(A.program)&&(M=!0,T=!0,E=!0);r.id!==w&&(w=r.id,T=!0);if(M||C!==e){L.setValue(ve,"projectionMatrix",e.projectionMatrix),L.setValue(ve,"viewMatrix",e.matrixWorldInverse);const t=L.map.cameraPosition;void 0!==t&&t.setValue(ve,j.setFromMatrixPosition(e.matrixWorld)),Y.logarithmicDepthBuffer&&L.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&L.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),C!==e&&(C=e,T=!0,E=!0)}if(i.isSkinnedMesh){L.setOptional(ve,i,"bindMatrix"),L.setOptional(ve,i,"bindMatrixInverse");const e=i.skeleton;e&&(Y.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),L.setValue(ve,"boneTexture",e.boneTexture,K)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}i.isBatchedMesh&&(L.setOptional(ve,i,"batchingTexture"),L.setValue(ve,"batchingTexture",i._matricesTexture,K));const I=n.morphAttributes;(void 0!==I.position||void 0!==I.normal||void 0!==I.color&&!0===Y.isWebGL2)&&de.update(i,n,A);(T||_.receiveShadow!==i.receiveShadow)&&(_.receiveShadow=i.receiveShadow,L.setValue(ve,"receiveShadow",i.receiveShadow));r.isMeshGouraudMaterial&&null!==r.envMap&&(R.envMap.value=l,R.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);T&&(L.setValue(ve,"toneMappingExposure",y.toneMappingExposure),_.needsLights&&(B=E,(O=R).ambientLightColor.needsUpdate=B,O.lightProbe.needsUpdate=B,O.directionalLights.needsUpdate=B,O.directionalLightShadows.needsUpdate=B,O.pointLights.needsUpdate=B,O.pointLightShadows.needsUpdate=B,O.spotLights.needsUpdate=B,O.spotLightShadows.needsUpdate=B,O.rectAreaLights.needsUpdate=B,O.hemisphereLights.needsUpdate=B),o&&!0===r.fog&&oe.refreshFogUniforms(R,o),oe.refreshMaterialUniforms(R,r,k,P,H),ax.upload(ve,Be(_),R,K));var O,B;r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(ax.upload(ve,Be(_),R,K),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&L.setValue(ve,"center",i.center);if(L.setValue(ve,"modelViewMatrix",i.modelViewMatrix),L.setValue(ve,"normalMatrix",i.normalMatrix),L.setValue(ve,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if(Y.isWebGL2){const n=e[t];ge.update(n,A),ge.bind(n,A)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return A}(e,t,n,r,i);q.setMaterial(r,s);let l=n.index,c=1;if(!0===r.wireframe){if(l=ne.getWireframeAttribute(n),void 0===l)return;c=2}const u=n.drawRange,d=n.attributes.position;let h=u.start*c,p=(u.start+u.count)*c;null!==o&&(h=Math.max(h,o.start*c),p=Math.min(p,(o.start+o.count)*c)),null!==l?(h=Math.max(h,0),p=Math.min(p,l.count)):null!=d&&(h=Math.max(h,0),p=Math.min(p,d.count));const f=p-h;if(f<0||f===1/0)return;let g;me.setup(i,r,a,n,l);let v=he;if(null!==l&&(g=te.get(l),v=pe,v.setIndex(g)),i.isMesh)!0===r.wireframe?(q.setLineWidth(r.wireframeLinewidth*$()),v.setMode(ve.LINES)):v.setMode(ve.TRIANGLES);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),q.setLineWidth(e*$()),i.isLineSegments?v.setMode(ve.LINES):i.isLineLoop?v.setMode(ve.LINE_LOOP):v.setMode(ve.LINE_STRIP)}else i.isPoints?v.setMode(ve.POINTS):i.isSprite&&v.setMode(ve.TRIANGLES);if(i.isBatchedMesh)v.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else if(i.isInstancedMesh)v.renderInstances(h,f,i.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);v.renderInstances(h,f,t)}else v.render(h,f)},this.compile=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=e),m=ae.get(n),m.init(),v.push(m),n.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(m.pushLight(e),e.castShadow&&m.pushShadow(e))})),e!==n&&e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(m.pushLight(e),e.castShadow&&m.pushShadow(e))})),m.setupLights(y._useLegacyLights);const r=new Set;return e.traverse((function(e){const t=e.material;if(t)if(Array.isArray(t))for(let i=0;i<t.length;i++){const o=t[i];Ae(o,n,e),r.add(o)}else Ae(t,n,e),r.add(t)})),v.pop(),m=null,r},this.compileAsync=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=this.compile(e,t,n);return new Promise((t=>{function n(){r.forEach((function(e){J.get(e).currentProgram.isReady()&&r.delete(e)})),0!==r.size?setTimeout(n,10):t(e)}null!==X.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let Me=null;function Te(){Le.stop()}function Ee(){Le.start()}const Le=new vy;function Re(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)m.pushLight(e),e.castShadow&&m.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||F.intersectsSprite(e)){r&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=re.update(e),i=e.material;i.visible&&f.push(e,t,i,n,j.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||F.intersectsObject(e))){const t=re.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),j.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),j.copy(t.boundingSphere.center)),j.applyMatrix4(e.matrixWorld).applyMatrix4(V)),Array.isArray(i)){const r=t.groups;for(let o=0,s=r.length;o<s;o++){const s=r[o],a=i[s.materialIndex];a&&a.visible&&f.push(e,t,a,n,j.z,s)}}else i.visible&&f.push(e,t,i,n,j.z,null)}const i=e.children;for(let e=0,o=i.length;e<o;e++)Re(i[e],t,n,r)}function Pe(e,t,n,r){const i=e.opaque,o=e.transmissive,s=e.transparent;m.setupLightsView(n),!0===N&&le.setGlobalState(y.clippingPlanes,n),o.length>0&&function(e,t,n,r){const i=!0===n.isScene?n.overrideMaterial:null;if(null!==i)return;const o=Y.isWebGL2;null===H&&(H=new Hm(1,1,{generateMipmaps:!0,type:X.has("EXT_color_buffer_half_float")?Vp:Up,minFilter:Dp,samples:o?4:0}));y.getDrawingBufferSize(W),o?H.setSize(W.x,W.y):H.setSize(dm(W.x),dm(W.y));const s=y.getRenderTarget();y.setRenderTarget(H),y.getClearColor(E),L=y.getClearAlpha(),L<1&&y.setClearColor(16777215,.5);y.clear();const a=y.toneMapping;y.toneMapping=fp,ke(e,n,r),K.updateMultisampleRenderTarget(H),K.updateRenderTargetMipmap(H);let l=!1;for(let e=0,i=t.length;e<i;e++){const i=t[e],o=i.object,s=i.geometry,a=i.material,c=i.group;if(2===a.side&&o.layers.test(r.layers)){const e=a.side;a.side=ap,a.needsUpdate=!0,Ie(o,n,r,s,a,c),a.side=e,a.needsUpdate=!0,l=!0}}!0===l&&(K.updateMultisampleRenderTarget(H),K.updateRenderTargetMipmap(H));y.setRenderTarget(s),y.setClearColor(E,L),y.toneMapping=a}(i,o,t,n),r&&q.viewport(A.copy(r)),i.length>0&&ke(i,t,n),o.length>0&&ke(o,t,n),s.length>0&&ke(s,t,n),q.buffers.depth.setTest(!0),q.buffers.depth.setMask(!0),q.buffers.color.setMask(!0),q.setPolygonOffset(!1)}function ke(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],s=o.object,a=o.geometry,l=null===r?o.material:r,c=o.group;s.layers.test(n.layers)&&Ie(s,t,n,a,l,c)}}function Ie(e,t,n,r,i,o){e.onBeforeRender(y,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(y,t,n,r,e,o),!0===i.transparent&&2===i.side&&!1===i.forceSinglePass?(i.side=ap,i.needsUpdate=!0,y.renderBufferDirect(n,t,r,i,e,o),i.side=sp,i.needsUpdate=!0,y.renderBufferDirect(n,t,r,i,e,o),i.side=2):y.renderBufferDirect(n,t,r,i,e,o),e.onAfterRender(y,t,n,r,i,o)}function Oe(e,t,n){!0!==t.isScene&&(t=G);const r=J.get(e),i=m.state.lights,o=m.state.shadowsArray,s=i.state.version,a=ie.getParameters(e,i.state,o,t,n),l=ie.getProgramCacheKey(a);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ee:Q).get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",Ce),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===s)return De(e,a),u}else a.uniforms=ie.getUniforms(e),e.onBuild(n,a,y),e.onBeforeCompile(a,y),u=ie.acquireProgram(a,l),c.set(l,u),r.uniforms=a.uniforms;const d=r.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=le.uniform),De(e,a),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=s,r.needsLights&&(d.ambientLightColor.value=i.state.ambient,d.lightProbe.value=i.state.probe,d.directionalLights.value=i.state.directional,d.directionalLightShadows.value=i.state.directionalShadow,d.spotLights.value=i.state.spot,d.spotLightShadows.value=i.state.spotShadow,d.rectAreaLights.value=i.state.rectArea,d.ltc_1.value=i.state.rectAreaLTC1,d.ltc_2.value=i.state.rectAreaLTC2,d.pointLights.value=i.state.point,d.pointLightShadows.value=i.state.pointShadow,d.hemisphereLights.value=i.state.hemi,d.directionalShadowMap.value=i.state.directionalShadowMap,d.directionalShadowMatrix.value=i.state.directionalShadowMatrix,d.spotShadowMap.value=i.state.spotShadowMap,d.spotLightMatrix.value=i.state.spotLightMatrix,d.spotLightMap.value=i.state.spotLightMap,d.pointShadowMap.value=i.state.pointShadowMap,d.pointShadowMatrix.value=i.state.pointShadowMatrix),r.currentProgram=u,r.uniformsList=null,u}function Be(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=ax.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function De(e,t){const n=J.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Le.setAnimationLoop((function(e){Me&&Me(e)})),"undefined"!=typeof self&&Le.setContext(self),this.setAnimationLoop=function(e){Me=e,xe.setAnimationLoop(e),null===e?Le.stop():Le.start()},xe.addEventListener("sessionstart",Te),xe.addEventListener("sessionend",Ee),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===_)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===xe.enabled&&!0===xe.isPresenting&&(!0===xe.cameraAutoUpdate&&xe.updateCamera(t),t=xe.getCamera()),!0===e.isScene&&e.onBeforeRender(y,e,t,S),m=ae.get(e,v.length),m.init(),v.push(m),V.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),F.setFromProjectionMatrix(V),z=this.localClippingEnabled,N=le.init(this.clippingPlanes,z),f=se.get(e,g.length),f.init(),g.push(f),Re(e,t,0,y.sortObjects),f.finish(),!0===y.sortObjects&&f.sort(I,O),this.info.render.frame++,!0===N&&le.beginShadows();const n=m.state.shadowsArray;if(ce.render(n,e,t),!0===N&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),ue.render(f,e),m.setupLights(y._useLegacyLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Pe(f,e,r,r.viewport)}}else Pe(f,e,t);null!==S&&(K.updateMultisampleRenderTarget(S),K.updateRenderTargetMipmap(S)),!0===e.isScene&&e.onAfterRender(y,e,t),me.resetDefaultState(),w=-1,C=null,v.pop(),m=v.length>0?v[v.length-1]:null,g.pop(),f=g.length>0?g[g.length-1]:null},this.getActiveCubeFace=function(){return x},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return S},this.setRenderTargetTextures=function(e,t,n){J.get(e.texture).__webglTexture=t,J.get(e.depthTexture).__webglTexture=n;const r=J.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===X.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=J.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;S=e,x=t,b=n;let r=!0,i=null,o=!1,s=!1;if(e){const a=J.get(e);void 0!==a.__useDefaultFramebuffer?(q.bindFramebuffer(ve.FRAMEBUFFER,null),r=!1):void 0===a.__webglFramebuffer?K.setupRenderTarget(e):a.__hasExternalTextures&&K.rebindTextures(e,J.get(e.texture).__webglTexture,J.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(s=!0);const c=J.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=Array.isArray(c[t])?c[t][n]:c[t],o=!0):i=Y.isWebGL2&&e.samples>0&&!1===K.useMultisampledRTT(e)?J.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,A.copy(e.viewport),M.copy(e.scissor),T=e.scissorTest}else A.copy(B).multiplyScalar(k).floor(),M.copy(D).multiplyScalar(k).floor(),T=U;if(q.bindFramebuffer(ve.FRAMEBUFFER,i)&&Y.drawBuffers&&r&&q.drawBuffers(e,i),q.viewport(A),q.scissor(M),q.setScissorTest(T),o){const r=J.get(e.texture);ve.framebufferTexture2D(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,ve.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(s){const r=J.get(e.texture),i=t||0;ve.framebufferTextureLayer(ve.FRAMEBUFFER,ve.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,o,s){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=J.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){q.bindFramebuffer(ve.FRAMEBUFFER,a);try{const s=e.texture,a=s.format,l=s.type;if(a!==$p&&fe.convert(a)!==ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Vp&&(X.has("EXT_color_buffer_half_float")||Y.isWebGL2&&X.has("EXT_color_buffer_float"));if(!(l===Up||fe.convert(l)===ve.getParameter(ve.IMPLEMENTATION_COLOR_READ_TYPE)||l===Hp&&(Y.isWebGL2||X.has("OES_texture_float")||X.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,fe.convert(a),fe.convert(l),o)}finally{const e=null!==S?J.get(S).__webglFramebuffer:null;q.bindFramebuffer(ve.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);K.setTexture2D(t,0),ve.copyTexSubImage2D(ve.TEXTURE_2D,n,0,0,e.x,e.y,i,o),q.unbindTexture()},this.copyTextureToTexture=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=t.image.width,o=t.image.height,s=fe.convert(n.format),a=fe.convert(n.type);K.setTexture2D(n,0),ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,n.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(ve.TEXTURE_2D,r,e.x,e.y,i,o,s,a,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(ve.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):ve.texSubImage2D(ve.TEXTURE_2D,r,e.x,e.y,s,a,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(ve.TEXTURE_2D),q.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(y.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=fe.convert(r.format),c=fe.convert(r.type);let u;if(r.isData3DTexture)K.setTexture3D(r,0),u=ve.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");K.setTexture2DArray(r,0),u=ve.TEXTURE_2D_ARRAY}ve.pixelStorei(ve.UNPACK_FLIP_Y_WEBGL,r.flipY),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),ve.pixelStorei(ve.UNPACK_ALIGNMENT,r.unpackAlignment);const d=ve.getParameter(ve.UNPACK_ROW_LENGTH),h=ve.getParameter(ve.UNPACK_IMAGE_HEIGHT),p=ve.getParameter(ve.UNPACK_SKIP_PIXELS),f=ve.getParameter(ve.UNPACK_SKIP_ROWS),m=ve.getParameter(ve.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(ve.UNPACK_ROW_LENGTH,g.width),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,g.height),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,e.min.x),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,e.min.y),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?ve.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,g.data)):ve.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g),ve.pixelStorei(ve.UNPACK_ROW_LENGTH,d),ve.pixelStorei(ve.UNPACK_IMAGE_HEIGHT,h),ve.pixelStorei(ve.UNPACK_SKIP_PIXELS,p),ve.pixelStorei(ve.UNPACK_SKIP_ROWS,f),ve.pixelStorei(ve.UNPACK_SKIP_IMAGES,m),0===i&&r.generateMipmaps&&ve.generateMipmap(u),q.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?K.setTextureCube(e,0):e.isData3DTexture?K.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?K.setTexture2DArray(e,0):K.setTexture2D(e,0),q.unbindTexture()},this.resetState=function(){x=0,b=0,S=null,q.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qf}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Wf?"display-p3":"srgb",t.unpackColorSpace=Lm.workingColorSpace===jf?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Hf?Nf:Ff}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Nf?Hf:Vf}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class tb extends eb{}tb.prototype.isWebGL1Renderer=!0;class nb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25e-5;this.isFogExp2=!0,this.name="",this.color=new cv(e),this.density=t}clone(){return new nb(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class rb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;this.isFog=!0,this.name="",this.color=new cv(e),this.near=t,this.far=n}clone(){return new rb(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class ib extends $g{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class ob{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Zf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=sm()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=sm()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=sm()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const sb=new Gm;class ab{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)sb.fromBufferAttribute(this,t),sb.applyMatrix4(e),this.setXYZ(t,sb.x,sb.y,sb.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)sb.fromBufferAttribute(this,t),sb.applyNormalMatrix(e),this.setXYZ(t,sb.x,sb.y,sb.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)sb.fromBufferAttribute(this,t),sb.transformDirection(e),this.setXYZ(t,sb.x,sb.y,sb.z);return this}setX(e,t){return this.normalized&&(t=pm(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=pm(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=pm(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=pm(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=hm(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=hm(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=hm(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=hm(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array),i=pm(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new bv(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new ab(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class lb extends hv{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new cv(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let cb;const ub=new Gm,db=new Gm,hb=new Gm,pb=new mm,fb=new mm,mb=new bg,gb=new Gm,vb=new Gm,yb=new Gm,_b=new mm,xb=new mm,bb=new mm;class Sb extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new lb;if(super(),this.isSprite=!0,this.type="Sprite",void 0===cb){cb=new kv;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new ob(e,5);cb.setIndex([0,1,2,0,2,3]),cb.setAttribute("position",new ab(t,3,0,!1)),cb.setAttribute("uv",new ab(t,2,3,!1))}this.geometry=cb,this.material=e,this.center=new mm(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),db.setFromMatrixScale(this.matrixWorld),mb.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),hb.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&db.multiplyScalar(-hb.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;wb(gb.set(-.5,-.5,0),hb,o,db,r,i),wb(vb.set(.5,-.5,0),hb,o,db,r,i),wb(yb.set(.5,.5,0),hb,o,db,r,i),_b.set(0,0),xb.set(1,0),bb.set(1,1);let s=e.ray.intersectTriangle(gb,vb,yb,!1,ub);if(null===s&&(wb(vb.set(-.5,.5,0),hb,o,db,r,i),xb.set(0,1),s=e.ray.intersectTriangle(gb,yb,vb,!1,ub),null===s))return;const a=e.ray.origin.distanceTo(ub);a<e.near||a>e.far||t.push({distance:a,point:ub.clone(),uv:iv.getInterpolation(ub,gb,vb,yb,_b,xb,bb,new mm),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function wb(e,t,n,r,i,o){pb.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(fb.x=o*pb.x-i*pb.y,fb.y=i*pb.x+o*pb.y):fb.copy(pb),e.copy(t),e.x+=fb.x,e.y+=fb.y,e.applyMatrix4(mb)}const Cb=new Gm,Ab=new Gm;class Mb extends $g{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Cb.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Cb);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Cb.setFromMatrixPosition(e.matrixWorld),Ab.setFromMatrixPosition(this.matrixWorld);const n=Cb.distanceTo(Ab)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,r=n.length;e<r;e++){const r=n[e];t.object.levels.push({object:r.object.uuid,distance:r.distance,hysteresis:r.hysteresis})}return t}}const Tb=new Gm,Eb=new Nm,Lb=new Nm,Rb=new Gm,Pb=new bg,kb=new Gm,Ib=new hg,Ob=new bg,Bb=new xg;class Db extends Zv{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=xp,this.bindMatrix=new bg,this.bindMatrixInverse=new bg,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new Ym),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,kb),this.boundingBox.expandByPoint(kb)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new hg),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,kb),this.boundingSphere.expandByPoint(kb)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),Ib.copy(this.boundingSphere),Ib.applyMatrix4(r),!1!==e.ray.intersectsSphere(Ib)&&(Ob.copy(r).invert(),Bb.copy(e.ray).applyMatrix4(Ob),null!==this.boundingBox&&!1===Bb.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,Bb)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Nm,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===xp?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===bp?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;Eb.fromBufferAttribute(r.attributes.skinIndex,e),Lb.fromBufferAttribute(r.attributes.skinWeight,e),Tb.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Lb.getComponent(e);if(0!==r){const i=Eb.getComponent(e);Pb.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(Rb.copy(Tb).applyMatrix4(Pb),r)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class Ub extends $g{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Fb extends Fm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(null,arguments.length>5?arguments[5]:void 0,arguments.length>6?arguments[6]:void 0,arguments.length>7?arguments[7]:void 0,arguments.length>8&&void 0!==arguments[8]?arguments[8]:Pp,arguments.length>9&&void 0!==arguments[9]?arguments[9]:Pp,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0,arguments.length>10?arguments[10]:void 0,arguments.length>11?arguments[11]:void 0),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Nb=new bg,zb=new bg;class Hb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.uuid=sm(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new bg)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new bg;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:zb;Nb.multiplyMatrices(i,t[r]),Nb.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new Hb(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Fb(t,e,e,$p,Hp);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new Ub),this.bones.push(i),this.boneInverses.push((new bg).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const o=n[r];e.boneInverses.push(o.toArray())}return e}}class Vb extends bv{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Wb=new bg,jb=new bg,Gb=[],$b=new Ym,Xb=new bg,Yb=new Zv,qb=new hg;class Zb extends Zv{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Vb(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<n;e++)this.setMatrixAt(e,Xb)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new Ym),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Wb),$b.copy(e.boundingBox).applyMatrix4(Wb),this.boundingBox.union($b)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new hg),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Wb),qb.copy(e.boundingSphere).applyMatrix4(Wb),this.boundingSphere.union(qb)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Yb.geometry=this.geometry,Yb.material=this.material,void 0!==Yb.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),qb.copy(this.boundingSphere),qb.applyMatrix4(n),!1!==e.ray.intersectsSphere(qb)))for(let i=0;i<r;i++){this.getMatrixAt(i,Wb),jb.multiplyMatrices(n,Wb),Yb.matrixWorld=jb,Yb.raycast(e,Gb);for(let e=0,n=Gb.length;e<n;e++){const n=Gb[e];n.instanceId=i,n.object=this,t.push(n)}Gb.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Vb(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}function Jb(e,t){return e.z-t.z}function Kb(e,t){return t.z-e.z}class Qb{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t){const n=this.pool,r=this.list;this.index>=n.length&&n.push({start:-1,count:-1,z:-1});const i=n[this.index];r.push(i),this.index++,i.start=e.start,i.count=e.count,i.z=t}reset(){this.list.length=0,this.index=0}}const eS="batchId",tS=new bg,nS=new bg,rS=new bg,iS=new bg,oS=new gy,sS=new Ym,aS=new hg,lS=new Gm,cS=new Qb,uS=new Zv,dS=[];function hS(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const i=e.count;for(let o=0;o<i;o++)for(let i=0;i<r;i++)t.setComponent(o+n,i,e.getComponent(o,i))}else t.array.set(e.array,n*r);t.needsUpdate=!0}class pS extends Zv{get maxGeometryCount(){return this._maxGeometryCount}constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2*t,r=arguments.length>3?arguments[3]:void 0;super(new kv,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._drawRanges=[],this._reservedRanges=[],this._visibility=[],this._active=[],this._bounds=[],this._maxGeometryCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._geometryInitialized=!1,this._geometryCount=0,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._visibilityChanged=!0,this._matricesTexture=null,this._initMatricesTexture()}_initMatricesTexture(){let e=Math.sqrt(4*this._maxGeometryCount);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new Fb(t,e,e,$p,Hp);this._matricesTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxGeometryCount,i=this._maxIndexCount;if(!1===this._geometryInitialized){for(const r in e.attributes){const i=e.getAttribute(r),{array:o,itemSize:s,normalized:a}=i,l=new o.constructor(n*s),c=new i.constructor(l,s,a);c.setUsage(i.usage),t.setAttribute(r,c)}if(null!==e.getIndex()){const e=n>65536?new Uint32Array(i):new Uint16Array(i);t.setIndex(new bv(e,1))}const o=r>65536?new Uint32Array(n):new Uint16Array(n);t.setAttribute(eS,new bv(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(eS))throw new Error(`BatchedMesh: Geometry cannot use attribute "${eS}"`);const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(n===eS)continue;if(!e.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Ym);const e=this._geometryCount,t=this.boundingBox,n=this._active;t.makeEmpty();for(let r=0;r<e;r++)!1!==n[r]&&(this.getMatrixAt(r,tS),this.getBoundingBoxAt(r,sS).applyMatrix4(tS),t.union(sS))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new hg);const e=this._geometryCount,t=this.boundingSphere,n=this._active;t.makeEmpty();for(let r=0;r<e;r++)!1!==n[r]&&(this.getMatrixAt(r,tS),this.getBoundingSphereAt(r,aS).applyMatrix4(tS),t.union(aS))}addGeometry(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(this._initializeGeometry(e),this._validateGeometry(e),this._geometryCount>=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let i=null;const o=this._reservedRanges,s=this._drawRanges,a=this._bounds;0!==this._geometryCount&&(i=o[o.length-1]),r.vertexCount=-1===t?e.getAttribute("position").count:t,r.vertexStart=null===i?0:i.vertexStart+i.vertexCount;const l=e.getIndex(),c=null!==l;if(c&&(r.indexCount=-1===n?l.count:n,r.indexStart=null===i?0:i.indexStart+i.indexCount),-1!==r.indexStart&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const u=this._visibility,d=this._active,h=this._matricesTexture,p=this._matricesTexture.image.data;u.push(!0),d.push(!0);const f=this._geometryCount;this._geometryCount++,rS.toArray(p,16*f),h.needsUpdate=!0,o.push(r),s.push({start:c?r.indexStart:r.vertexStart,count:-1}),a.push({boxInitialized:!1,box:new Ym,sphereInitialized:!1,sphere:new hg});const m=this.geometry.getAttribute(eS);for(let e=0;e<r.vertexCount;e++)m.setX(r.vertexStart+e,f);return m.needsUpdate=!0,this.setGeometryAt(f,e),f}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),o=t.getIndex(),s=this._reservedRanges[e];if(r&&o.count>s.indexCount||t.attributes.position.count>s.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const a=s.vertexStart,l=s.vertexCount;for(const e in n.attributes){if(e===eS)continue;const r=t.getAttribute(e),i=n.getAttribute(e);hS(r,i,a);const o=r.itemSize;for(let e=r.count,t=l;e<t;e++){const t=a+e;for(let e=0;e<o;e++)i.setComponent(t,e,0)}i.needsUpdate=!0}if(r){const e=s.indexStart;for(let t=0;t<o.count;t++)i.setX(e+t,a+o.getX(t));for(let t=o.count,n=s.indexCount;t<n;t++)i.setX(e+t,a);i.needsUpdate=!0}const c=this._bounds[e];null!==t.boundingBox?(c.box.copy(t.boundingBox),c.boxInitialized=!0):c.boxInitialized=!1,null!==t.boundingSphere?(c.sphere.copy(t.boundingSphere),c.sphereInitialized=!0):c.sphereInitialized=!1;const u=this._drawRanges[e],d=t.getAttribute("position");return u.count=r?o.count:d.count,this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._active;return e>=t.length||!1===t[e]||(t[e]=!1,this._visibilityChanged=!0),this}getBoundingBoxAt(e,t){if(!1===this._active[e])return this;const n=this._bounds[e],r=n.box,i=this.geometry;if(!1===n.boxInitialized){r.makeEmpty();const t=i.index,o=i.attributes.position,s=this._drawRanges[e];for(let e=s.start,n=s.start+s.count;e<n;e++){let n=e;t&&(n=t.getX(n)),r.expandByPoint(lS.fromBufferAttribute(o,n))}n.boxInitialized=!0}return t.copy(r),t}getBoundingSphereAt(e,t){if(!1===this._active[e])return this;const n=this._bounds[e],r=n.sphere,i=this.geometry;if(!1===n.sphereInitialized){r.makeEmpty(),this.getBoundingBoxAt(e,sS),sS.getCenter(r.center);const t=i.index,o=i.attributes.position,s=this._drawRanges[e];let a=0;for(let e=s.start,n=s.start+s.count;e<n;e++){let n=e;t&&(n=t.getX(n)),lS.fromBufferAttribute(o,n),a=Math.max(a,r.center.distanceToSquared(lS))}r.radius=Math.sqrt(a),n.sphereInitialized=!0}return t.copy(r),t}setMatrixAt(e,t){const n=this._active,r=this._matricesTexture,i=this._matricesTexture.image.data;return e>=this._geometryCount||!1===n[e]||(t.toArray(i,16*e),r.needsUpdate=!0),this}getMatrixAt(e,t){const n=this._active,r=this._matricesTexture.image.data;return e>=this._geometryCount||!1===n[e]?null:t.fromArray(r,16*e)}setVisibleAt(e,t){const n=this._visibility,r=this._active;return e>=this._geometryCount||!1===r[e]||n[e]===t||(n[e]=t,this._visibilityChanged=!0),this}getVisibleAt(e){const t=this._visibility,n=this._active;return!(e>=this._geometryCount||!1===n[e])&&t[e]}raycast(e,t){const n=this._visibility,r=this._active,i=this._drawRanges,o=this._geometryCount,s=this.matrixWorld,a=this.geometry;uS.material=this.material,uS.geometry.index=a.index,uS.geometry.attributes=a.attributes,null===uS.geometry.boundingBox&&(uS.geometry.boundingBox=new Ym),null===uS.geometry.boundingSphere&&(uS.geometry.boundingSphere=new hg);for(let a=0;a<o;a++){if(!n[a]||!r[a])continue;const o=i[a];uS.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(a,uS.matrixWorld).premultiply(s),this.getBoundingBoxAt(a,uS.geometry.boundingBox),this.getBoundingSphereAt(a,uS.geometry.boundingSphere),uS.raycast(e,dS);for(let e=0,n=dS.length;e<n;e++){const n=dS[e];n.object=this,n.batchId=a,t.push(n)}dS.length=0}uS.material=null,uS.geometry.index=null,uS.geometry.attributes={},uS.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._drawRanges=e._drawRanges.map((e=>tp({},e))),this._reservedRanges=e._reservedRanges.map((e=>tp({},e))),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map((e=>({boxInitialized:e.boxInitialized,box:e.box.clone(),sphereInitialized:e.sphereInitialized,sphere:e.sphere.clone()}))),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),s=null===o?1:o.array.BYTES_PER_ELEMENT,a=this._visibility,l=this._multiDrawStarts,c=this._multiDrawCounts,u=this._drawRanges,d=this.perObjectFrustumCulled;d&&(iS.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),oS.setFromProjectionMatrix(iS,e.isWebGPURenderer?em:Qf));let h=0;if(this.sortObjects){nS.copy(this.matrixWorld).invert(),lS.setFromMatrixPosition(n.matrixWorld).applyMatrix4(nS);for(let e=0,t=a.length;e<t;e++)if(a[e]){this.getMatrixAt(e,tS),this.getBoundingSphereAt(e,aS).applyMatrix4(tS);let t=!1;if(d&&(t=!oS.intersectsSphere(aS)),!t){const t=lS.distanceTo(aS.center);cS.push(u[e],t)}}const e=cS.list,t=this.customSort;null===t?e.sort(i.transparent?Kb:Jb):t.call(this,e,n);for(let t=0,n=e.length;t<n;t++){const n=e[t];l[h]=n.start*s,c[h]=n.count,h++}cS.reset()}else for(let e=0,t=a.length;e<t;e++)if(a[e]){let t=!1;if(d&&(this.getMatrixAt(e,tS),this.getBoundingSphereAt(e,aS).applyMatrix4(tS),t=!oS.intersectsSphere(aS)),!t){const t=u[e];l[h]=t.start*s,c[h]=t.count,h++}}this._multiDrawCount=h,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,i,o){this.onBeforeRender(e,null,r,i,o)}}class fS extends hv{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new cv(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const mS=new Gm,gS=new Gm,vS=new bg,yS=new xg,_S=new hg;class xS extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new kv,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new fS;super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)mS.fromBufferAttribute(t,e-1),gS.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=mS.distanceTo(gS);e.setAttribute("lineDistance",new Cv(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),_S.copy(n.boundingSphere),_S.applyMatrix4(r),_S.radius+=i,!1===e.ray.intersectsSphere(_S))return;vS.copy(r).invert(),yS.copy(e.ray).applyMatrix4(vS);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s,l=new Gm,c=new Gm,u=new Gm,d=new Gm,h=this.isLineSegments?2:1,p=n.index,f=n.attributes.position;if(null!==p){for(let n=Math.max(0,o.start),r=Math.min(p.count,o.start+o.count)-1;n<r;n+=h){const r=p.getX(n),i=p.getX(n+1);l.fromBufferAttribute(f,r),c.fromBufferAttribute(f,i);if(yS.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const o=e.ray.origin.distanceTo(d);o<e.near||o>e.far||t.push({distance:o,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(f.count,o.start+o.count)-1;n<r;n+=h){l.fromBufferAttribute(f,n),c.fromBufferAttribute(f,n+1);if(yS.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(d);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}const bS=new Gm,SS=new Gm;class wS extends xS{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)bS.fromBufferAttribute(t,e),SS.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+bS.distanceTo(SS);e.setAttribute("lineDistance",new Cv(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class CS extends xS{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class AS extends hv{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new cv(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const MS=new bg,TS=new xg,ES=new hg,LS=new Gm;class RS extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new kv,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new AS;super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ES.copy(n.boundingSphere),ES.applyMatrix4(r),ES.radius+=i,!1===e.ray.intersectsSphere(ES))return;MS.copy(r).invert(),TS.copy(e.ray).applyMatrix4(MS);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s,l=n.index,c=n.attributes.position;if(null!==l){for(let n=Math.max(0,o.start),i=Math.min(l.count,o.start+o.count);n<i;n++){const i=l.getX(n);LS.fromBufferAttribute(c,i),PS(LS,i,a,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(c.count,o.start+o.count);n<i;n++)LS.fromBufferAttribute(c,n),PS(LS,n,a,r,e,t,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function PS(e,t,n,r,i,o,s){const a=TS.distanceSqToPoint(e);if(a<n){const n=new Gm;TS.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:t,face:null,object:s})}}class kS extends Fm{constructor(e,t,n,r,i,o,s,a,l,c,u,d){super(null,o,s,a,l,c,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class IS{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.arcLengthDivisions;if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let s,a=0,l=i-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),s=n[r]-o,s<0)a=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),s=this.getPoint(i),a=t||(o.isVector2?new mm:new Gm);return a.copy(s).sub(o).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new Gm,r=[],i=[],o=[],s=new Gm,a=new bg;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new Gm)}i[0]=new Gm,o[0]=new Gm;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(am(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(a.makeRotationAxis(s,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(am(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(a.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class OS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=s,this.aRotation=a}getPoint(e,t){const n=t||new mm,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let a=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=a-this.aX,r=l-this.aY;a=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(a,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class BS extends OS{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.isArcCurve=!0,this.type="ArcCurve"}}function DS(){let e=0,t=0,n=0,r=0;function i(i,o,s,a){e=i,t=s,n=-3*i+3*o-2*s-a,r=2*i-2*o+s+a}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,s,a){let l=(t-e)/o-(n-e)/(o+s)+(n-t)/s,c=(n-t)/s-(r-t)/(s+a)+(r-n)/a;l*=s,c*=s,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}const US=new Gm,FS=new DS,NS=new DS,zS=new DS;class HS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"centripetal",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=this.points,r=n.length,i=(r-(this.closed?0:1))*e;let o,s,a=Math.floor(i),l=i-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:0===l&&a===r-1&&(a=r-2,l=1),this.closed||a>0?o=n[(a-1)%r]:(US.subVectors(n[0],n[1]).add(n[0]),o=US);const c=n[a%r],u=n[(a+1)%r];if(this.closed||a+2<r?s=n[(a+2)%r]:(US.subVectors(n[r-1],n[r-2]).add(n[r-1]),s=US),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(o.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),FS.initNonuniformCatmullRom(o.x,c.x,u.x,s.x,t,n,r),NS.initNonuniformCatmullRom(o.y,c.y,u.y,s.y,t,n,r),zS.initNonuniformCatmullRom(o.z,c.z,u.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(FS.initCatmullRom(o.x,c.x,u.x,s.x,this.tension),NS.initCatmullRom(o.y,c.y,u.y,s.y,this.tension),zS.initCatmullRom(o.z,c.z,u.z,s.z,this.tension));return t.set(FS.calc(l),NS.calc(l),zS.calc(l)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Gm).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function VS(e,t,n,r,i){const o=.5*(r-t),s=.5*(i-n),a=e*e;return(2*n-2*r+o+s)*(e*a)+(-3*n+3*r-2*o-s)*a+o*e+n}function WS(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function jS(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}class GS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new mm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new mm,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new mm;super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm,n=this.v0,r=this.v1,i=this.v2,o=this.v3;return t.set(jS(e,n.x,r.x,i.x,o.x),jS(e,n.y,r.y,i.y,o.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class $S extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Gm,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Gm;super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=this.v0,r=this.v1,i=this.v2,o=this.v3;return t.set(jS(e,n.x,r.x,i.x,o.x),jS(e,n.y,r.y,i.y,o.y),jS(e,n.z,r.z,i.z,o.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class XS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new mm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm;super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm).subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class YS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm;super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm).subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class qS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new mm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new mm;super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm,n=this.v0,r=this.v1,i=this.v2;return t.set(WS(e,n.x,r.x,i.x),WS(e,n.y,r.y,i.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class ZS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Gm;super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm,n=this.v0,r=this.v1,i=this.v2;return t.set(WS(e,n.x,r.x,i.x),WS(e,n.y,r.y,i.y),WS(e,n.z,r.z,i.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class JS extends IS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm,n=this.points,r=(n.length-1)*e,i=Math.floor(r),o=r-i,s=n[0===i?i:i-1],a=n[i],l=n[i>n.length-2?n.length-1:i+1],c=n[i>n.length-3?n.length-1:i+2];return t.set(VS(o,s.x,a.x,l.x,c.x),VS(o,s.y,a.y,l.y,c.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new mm).fromArray(n))}return this}}var KS=Object.freeze({__proto__:null,ArcCurve:BS,CatmullRomCurve3:HS,CubicBezierCurve:GS,CubicBezierCurve3:$S,EllipseCurve:OS,LineCurve:XS,LineCurve3:YS,QuadraticBezierCurve:qS,QuadraticBezierCurve3:ZS,SplineCurve:JS});class QS extends IS{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new KS[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,o=this.curves[i],s=o.getLength(),a=0===s?0:1-e/s;return o.getPointAt(a,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40;const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12;const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],s=o.isEllipseCurve?2*e:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,a=o.getPoints(s);for(let e=0;e<a.length;e++){const r=a[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new KS[n.type]).fromJSON(n))}return this}}class ew extends QS{constructor(e){super(),this.type="Path",this.currentPoint=new mm,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new XS(this.currentPoint.clone(),new mm(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new qS(this.currentPoint.clone(),new mm(e,t),new mm(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const s=new GS(this.currentPoint.clone(),new mm(e,t),new mm(n,r),new mm(i,o));return this.curves.push(s),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new JS(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const s=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(e+s,t+a,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,s,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,s,a),this}absellipse(e,t,n,r,i,o,s,a){const l=new OS(e,t,n,r,i,o,s,a);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class tw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[new mm(0,-.5),new mm(.5,0),new mm(0,.5)],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=am(r,0,2*Math.PI);const i=[],o=[],s=[],a=[],l=[],c=1/t,u=new Gm,d=new mm,h=new Gm,p=new Gm,f=new Gm;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.normalize(),a.push(h.x,h.y,h.z);break;case e.length-1:a.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.x+=f.x,h.y+=f.y,h.z+=f.z,h.normalize(),a.push(h.x,h.y,h.z),f.copy(p)}for(let i=0;i<=t;i++){const h=n+i*c*r,p=Math.sin(h),f=Math.cos(h);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,o.push(u.x,u.y,u.z),d.x=i/t,d.y=n/(e.length-1),s.push(d.x,d.y);const r=a[3*n+0]*p,c=a[3*n+1],h=a[3*n+0]*f;l.push(r,c,h)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const r=t+n*e.length,o=r,s=r+e.length,a=r+e.length+1,l=r+1;i.push(o,s,l),i.push(a,l,s)}this.setIndex(i),this.setAttribute("position",new Cv(o,3)),this.setAttribute("uv",new Cv(s,2)),this.setAttribute("normal",new Cv(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tw(e.points,e.segments,e.phiStart,e.phiLength)}}class nw extends tw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8;const i=new ew;i.absarc(0,-t/2,e,1.5*Math.PI,0),i.absarc(0,t/2,e,0,.5*Math.PI),super(i.getPoints(n),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:t,capSegments:n,radialSegments:r}}static fromJSON(e){return new nw(e.radius,e.length,e.capSegments,e.radialSegments)}}class rw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],o=[],s=[],a=[],l=new Gm,c=new mm;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);for(let i=0,u=3;i<=t;i++,u+=3){const d=n+i/t*r;l.x=e*Math.cos(d),l.y=e*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[u]/e+1)/2,c.y=(o[u+1]/e+1)/2,a.push(c.x,c.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new Cv(o,3)),this.setAttribute("normal",new Cv(s,3)),this.setAttribute("uv",new Cv(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rw(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class iw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:32,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:2*Math.PI;super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:s,thetaLength:a};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],d=[],h=[];let p=0;const f=[],m=n/2;let g=0;function v(n){const i=p,o=new mm,f=new Gm;let v=0;const y=!0===n?e:t,_=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*_,0),d.push(0,_,0),h.push(.5,.5),p++;const x=p;for(let e=0;e<=r;e++){const t=e/r*a+s,n=Math.cos(t),i=Math.sin(t);f.x=y*i,f.y=m*_,f.z=y*n,u.push(f.x,f.y,f.z),d.push(0,_,0),o.x=.5*n+.5,o.y=.5*i*_+.5,h.push(o.x,o.y),p++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new Gm,v=new Gm;let y=0;const _=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*a+s,l=Math.sin(i),f=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*f,u.push(v.x,v.y,v.z),o.set(l,_,f).normalize(),d.push(o.x,o.y,o.z),h.push(t,1-g),c.push(p++)}f.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=f[t][e],r=f[t+1][e],i=f[t+1][e+1],o=f[t][e+1];c.push(n,r,o),c.push(r,i,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new Cv(u,3)),this.setAttribute("normal",new Cv(d,3)),this.setAttribute("uv",new Cv(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iw(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ow extends iw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2*Math.PI;super(0,e,t,n,r,i,o,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:s}}static fromJSON(e){return new ow(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class sw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],o=[];function s(e,t,n,r){const i=r+1,o=[];for(let r=0;r<=i;r++){o[r]=[];const s=e.clone().lerp(n,r/i),a=t.clone().lerp(n,r/i),l=i-r;for(let e=0;e<=l;e++)o[r][e]=0===e&&r===i?s:s.clone().lerp(a,e/l)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){const n=Math.floor(t/2);t%2==0?(a(o[e][n+1]),a(o[e+1][n]),a(o[e][n])):(a(o[e][n+1]),a(o[e+1][n+1]),a(o[e+1][n]))}}function a(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new Gm,r=new Gm,i=new Gm;for(let o=0;o<t.length;o+=3)l(t[o+0],n),l(t[o+1],r),l(t[o+2],i),s(n,r,i,e)}(r),function(e){const t=new Gm;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new Gm;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=u(e)/2/Math.PI+.5,s=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);o.push(r,1-s)}var t;(function(){const e=new Gm,t=new Gm,n=new Gm,r=new Gm,s=new mm,a=new mm,l=new mm;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),n.set(i[d+6],i[d+7],i[d+8]),s.set(o[h+0],o[h+1]),a.set(o[h+2],o[h+3]),l.set(o[h+4],o[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const p=u(r);c(s,h+0,e,p),c(a,h+2,t,p),c(l,h+4,n,p)}})(),function(){for(let e=0;e<o.length;e+=6){const t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new Cv(i,3)),this.setAttribute("normal",new Cv(i.slice(),3)),this.setAttribute("uv",new Cv(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sw(e.vertices,e.indices,e.radius,e.details)}}class aw extends sw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new aw(e.radius,e.detail)}}const lw=new Gm,cw=new Gm,uw=new Gm,dw=new iv;class hw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(im*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e<a;e+=3){o?(l[0]=o.getX(e),l[1]=o.getX(e+1),l[2]=o.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:a}=dw;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),a.fromBufferAttribute(s,l[2]),dw.getNormal(uw),u[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,u[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,u[2]=`${Math.round(a.x*r)},${Math.round(a.y*r)},${Math.round(a.z*r)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],r=u[t],o=dw[c[e]],s=dw[c[t]],a=`${n}_${r}`,p=`${r}_${n}`;p in d&&d[p]?(uw.dot(d[p].normal)<=i&&(h.push(o.x,o.y,o.z),h.push(s.x,s.y,s.z)),d[p]=null):a in d||(d[a]={index0:l[e],index1:l[t],normal:uw.clone()})}}for(const e in d)if(d[e]){const{index0:t,index1:n}=d[e];lw.fromBufferAttribute(s,t),cw.fromBufferAttribute(s,n),h.push(lw.x,lw.y,lw.z),h.push(cw.x,cw.y,cw.z)}this.setAttribute("position",new Cv(h,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class pw extends ew{constructor(e){super(e),this.uuid=sm(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new ew).fromJSON(n))}return this}}const fw=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const r=t&&t.length,i=r?t[0]*n:e.length;let o=mw(e,0,i,n,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,c,u,d,h,p;if(r&&(o=function(e,t,n,r){const i=[];let o,s,a,l,c;for(o=0,s=t.length;o<s;o++)a=t[o]*r,l=o<s-1?t[o+1]*r:e.length,c=mw(e,a,l,r,!1),c===c.next&&(c.steiner=!0),i.push(Mw(c));for(i.sort(Sw),o=0;o<i.length;o++)n=ww(i[o],n);return n}(e,t,o,n)),e.length>80*n){a=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)d=e[t],h=e[t+1],d<a&&(a=d),h<l&&(l=h),d>c&&(c=d),h>u&&(u=h);p=Math.max(c-a,u-l),p=0!==p?32767/p:0}return vw(o,s,n,a,l,p,0),s};function mw(e,t,n,r,i){let o,s;if(i===function(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)s=Dw(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=Dw(o,e[o],e[o+1],s);return s&&Rw(s,s.next)&&(Uw(s),s=s.next),s}function gw(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Rw(r,r.next)&&0!==Lw(r.prev,r,r.next))r=r.next;else{if(Uw(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function vw(e,t,n,r,i,o,s){if(!e)return;!s&&o&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=Aw(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ,r);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}(e,r,i,o);let a,l,c=e;for(;e.prev!==e.next;)if(a=e.prev,l=e.next,o?_w(e,r,i,o):yw(e))t.push(a.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),Uw(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?vw(e=xw(gw(e),t,n),t,n,r,i,o,2):2===s&&bw(e,t,n,r,i,o):vw(gw(e),t,n,r,i,o,1);break}}function yw(e){const t=e.prev,n=e,r=e.next;if(Lw(t,n,r)>=0)return!1;const i=t.x,o=n.x,s=r.x,a=t.y,l=n.y,c=r.y,u=i<o?i<s?i:s:o<s?o:s,d=a<l?a<c?a:c:l<c?l:c,h=i>o?i>s?i:s:o>s?o:s,p=a>l?a>c?a:c:l>c?l:c;let f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=h&&f.y>=d&&f.y<=p&&Tw(i,a,o,l,s,c,f.x,f.y)&&Lw(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function _w(e,t,n,r){const i=e.prev,o=e,s=e.next;if(Lw(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,d=o.y,h=s.y,p=a<l?a<c?a:c:l<c?l:c,f=u<d?u<h?u:h:d<h?d:h,m=a>l?a>c?a:c:l>c?l:c,g=u>d?u>h?u:h:d>h?d:h,v=Aw(p,f,t,n,r),y=Aw(m,g,t,n,r);let _=e.prevZ,x=e.nextZ;for(;_&&_.z>=v&&x&&x.z<=y;){if(_.x>=p&&_.x<=m&&_.y>=f&&_.y<=g&&_!==i&&_!==s&&Tw(a,u,l,d,c,h,_.x,_.y)&&Lw(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==s&&Tw(a,u,l,d,c,h,x.x,x.y)&&Lw(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;_&&_.z>=v;){if(_.x>=p&&_.x<=m&&_.y>=f&&_.y<=g&&_!==i&&_!==s&&Tw(a,u,l,d,c,h,_.x,_.y)&&Lw(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;x&&x.z<=y;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==s&&Tw(a,u,l,d,c,h,x.x,x.y)&&Lw(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function xw(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Rw(i,o)&&Pw(i,r,r.next,o)&&Ow(i,o)&&Ow(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),Uw(r),Uw(r.next),r=e=o),r=r.next}while(r!==e);return gw(r)}function bw(e,t,n,r,i,o){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&Ew(s,e)){let a=Bw(s,e);return s=gw(s,s.next),a=gw(a,a.next),vw(s,t,n,r,i,o,0),void vw(a,t,n,r,i,o,0)}e=e.next}s=s.next}while(s!==e)}function Sw(e,t){return e.x-t.x}function ww(e,t){const n=function(e,t){let n,r=t,i=-1/0;const o=e.x,s=e.y;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){const e=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=o&&e>i&&(i=e,n=r.x<r.next.x?r:r.next,e===o))return n}r=r.next}while(r!==t);if(!n)return null;const a=n,l=n.x,c=n.y;let u,d=1/0;r=n;do{o>=r.x&&r.x>=l&&o!==r.x&&Tw(s<c?o:i,s,l,c,s<c?i:o,s,r.x,r.y)&&(u=Math.abs(s-r.y)/(o-r.x),Ow(r,e)&&(u<d||u===d&&(r.x>n.x||r.x===n.x&&Cw(n,r)))&&(n=r,d=u)),r=r.next}while(r!==a);return n}(e,t);if(!n)return t;const r=Bw(n,e);return gw(r,r.next),gw(n,n.next)}function Cw(e,t){return Lw(e.prev,e,t.prev)<0&&Lw(t.next,e,e.next)<0}function Aw(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Mw(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Tw(e,t,n,r,i,o,s,a){return(i-s)*(t-a)>=(e-s)*(o-a)&&(e-s)*(r-a)>=(n-s)*(t-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Ew(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Pw(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ow(e,t)&&Ow(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Lw(e.prev,e,t.prev)||Lw(e,t.prev,t))||Rw(e,t)&&Lw(e.prev,e,e.next)>0&&Lw(t.prev,t,t.next)>0)}function Lw(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Rw(e,t){return e.x===t.x&&e.y===t.y}function Pw(e,t,n,r){const i=Iw(Lw(e,t,n)),o=Iw(Lw(e,t,r)),s=Iw(Lw(n,r,e)),a=Iw(Lw(n,r,t));return i!==o&&s!==a||(!(0!==i||!kw(e,n,t))||(!(0!==o||!kw(e,r,t))||(!(0!==s||!kw(n,e,r))||!(0!==a||!kw(n,t,r)))))}function kw(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Iw(e){return e>0?1:e<0?-1:0}function Ow(e,t){return Lw(e.prev,e,e.next)<0?Lw(e,t,e.next)>=0&&Lw(e,e.prev,t)>=0:Lw(e,t,e.prev)<0||Lw(e,e.next,t)<0}function Bw(e,t){const n=new Fw(e.i,e.x,e.y),r=new Fw(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Dw(e,t,n,r){const i=new Fw(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Uw(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Fw(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Nw{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return Nw.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];zw(e),Hw(n,e);let o=e.length;t.forEach(zw);for(let e=0;e<t.length;e++)r.push(o),o+=t[e].length,Hw(n,t[e]);const s=fw(n,r);for(let e=0;e<s.length;e+=3)i.push(s.slice(e,e+3));return i}}function zw(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Hw(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Vw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new pw([new mm(.5,.5),new mm(-.5,.5),new mm(-.5,-.5),new mm(.5,-.5)]),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++){o(e[t])}function o(e){const o=[],s=void 0!==t.curveSegments?t.curveSegments:12,a=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,d=void 0!==t.bevelSize?t.bevelSize:u-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Ww;let g,v,y,_,x,b=!1;f&&(g=f.getSpacedPoints(a),b=!0,c=!1,v=f.computeFrenetFrames(a,!1),y=new Gm,_=new Gm,x=new Gm),c||(p=0,u=0,d=0,h=0);const S=e.extractPoints(s);let w=S.shape;const C=S.holes;if(!Nw.isClockWise(w)){w=w.reverse();for(let e=0,t=C.length;e<t;e++){const t=C[e];Nw.isClockWise(t)&&(C[e]=t.reverse())}}const A=Nw.triangulateShape(w,C),M=w;for(let e=0,t=C.length;e<t;e++){const t=C[e];w=w.concat(t)}function T(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}const E=w.length,L=A.length;function R(e,t,n){let r,i,o;const s=e.x-t.x,a=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=s*s+a*a,d=s*c-a*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-a/d,f=t.y+s/d,m=((n.x-c/h-p)*c-(n.y+l/h-f)*l)/(s*c-a*l);r=p+s*m-e.x,i=f+a*m-e.y;const g=r*r+i*i;if(g<=2)return new mm(r,i);o=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(a)===Math.sign(c)&&(e=!0),e?(r=-a,i=s,o=Math.sqrt(u)):(r=s,i=a,o=Math.sqrt(u/2))}return new mm(r/o,i/o)}const P=[];for(let e=0,t=M.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),P[e]=R(M[e],M[n],M[r]);const k=[];let I,O=P.concat();for(let e=0,t=C.length;e<t;e++){const t=C[e];I=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),I[e]=R(t[e],t[r],t[i]);k.push(I),O=O.concat(I)}for(let e=0;e<p;e++){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=M.length;e<t;e++){const t=T(M[e],P[e],r);U(t.x,t.y,-n)}for(let e=0,t=C.length;e<t;e++){const t=C[e];I=k[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],I[e],r);U(i.x,i.y,-n)}}}const B=d+h;for(let e=0;e<E;e++){const t=c?T(w[e],O[e],B):w[e];b?(_.copy(v.normals[0]).multiplyScalar(t.x),y.copy(v.binormals[0]).multiplyScalar(t.y),x.copy(g[0]).add(_).add(y),U(x.x,x.y,x.z)):U(t.x,t.y,0)}for(let e=1;e<=a;e++)for(let t=0;t<E;t++){const n=c?T(w[t],O[t],B):w[t];b?(_.copy(v.normals[e]).multiplyScalar(n.x),y.copy(v.binormals[e]).multiplyScalar(n.y),x.copy(g[e]).add(_).add(y),U(x.x,x.y,x.z)):U(n.x,n.y,l/a*e)}for(let e=p-1;e>=0;e--){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=M.length;e<t;e++){const t=T(M[e],P[e],r);U(t.x,t.y,l+n)}for(let e=0,t=C.length;e<t;e++){const t=C[e];I=k[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],I[e],r);b?U(i.x,i.y+g[a-1].y,g[a-1].x+n):U(i.x,i.y,l+n)}}}function D(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=a+2*p;e<n;e++){const n=E*e,o=E*(e+1);N(t+r+n,t+i+n,t+i+o,t+r+o)}}}function U(e,t,n){o.push(e),o.push(t),o.push(n)}function F(e,t,i){z(e),z(t),z(i);const o=r.length/3,s=m.generateTopUV(n,r,o-3,o-2,o-1);H(s[0]),H(s[1]),H(s[2])}function N(e,t,i,o){z(e),z(t),z(o),z(t),z(i),z(o);const s=r.length/3,a=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);H(a[0]),H(a[1]),H(a[3]),H(a[1]),H(a[2]),H(a[3])}function z(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function H(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=E*e;for(let e=0;e<L;e++){const n=A[e];F(n[2]+t,n[1]+t,n[0]+t)}e=a+2*p,t=E*e;for(let e=0;e<L;e++){const n=A[e];F(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<L;e++){const t=A[e];F(t[2],t[1],t[0])}for(let e=0;e<L;e++){const t=A[e];F(t[0]+E*a,t[1]+E*a,t[2]+E*a)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;D(M,t),t+=M.length;for(let e=0,n=C.length;e<n;e++){const n=C[e];D(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new Cv(r,3)),this.setAttribute("uv",new Cv(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new KS[r.type]).fromJSON(r)),new Vw(n,e.options)}}const Ww={generateTopUV:function(e,t,n,r,i){const o=t[3*n],s=t[3*n+1],a=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new mm(o,s),new mm(a,l),new mm(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const s=t[3*n],a=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],d=t[3*r+2],h=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(a-u)<Math.abs(s-c)?[new mm(s,1-l),new mm(c,1-d),new mm(h,1-f),new mm(m,1-v)]:[new mm(a,1-l),new mm(u,1-d),new mm(p,1-f),new mm(g,1-v)]}};class jw extends sw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new jw(e.radius,e.detail)}}class Gw extends sw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Gw(e.radius,e.detail)}}class $w extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI;super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},n=Math.max(3,n),r=Math.max(1,r);const s=[],a=[],l=[],c=[];let u=e;const d=(t-e)/r,h=new Gm,p=new mm;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*o;h.x=u*Math.cos(r),h.y=u*Math.sin(r),a.push(h.x,h.y,h.z),l.push(0,0,1),p.x=(h.x/t+1)/2,p.y=(h.y/t+1)/2,c.push(p.x,p.y)}u+=d}for(let e=0;e<r;e++){const t=e*(n+1);for(let e=0;e<n;e++){const r=e+t,i=r,o=r+n+1,a=r+n+2,l=r+1;s.push(i,o,l),s.push(o,a,l)}}this.setIndex(s),this.setAttribute("position",new Cv(a,3)),this.setAttribute("normal",new Cv(l,3)),this.setAttribute("uv",new Cv(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $w(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Xw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new pw([new mm(0,.5),new mm(-.5,-.5),new mm(.5,-.5)]),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let s=0,a=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,a,t),s+=a,a=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===Nw.isClockWise(c)&&(c=c.reverse());for(let e=0,t=u.length;e<t;e++){const t=u[e];!0===Nw.isClockWise(t)&&(u[e]=t.reverse())}const d=Nw.triangulateShape(c,u);for(let e=0,t=u.length;e<t;e++){const t=u[e];c=c.concat(t)}for(let e=0,t=c.length;e<t;e++){const t=c[e];r.push(t.x,t.y,0),i.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){const t=d[e],r=t[0]+s,i=t[1]+s,o=t[2]+s;n.push(r,i,o),a+=3}}this.setIndex(n),this.setAttribute("position",new Cv(r,3)),this.setAttribute("normal",new Cv(i,3)),this.setAttribute("uv",new Cv(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Xw(n,e.curveSegments)}}class Yw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Math.PI;super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const a=Math.min(o+s,Math.PI);let l=0;const c=[],u=new Gm,d=new Gm,h=[],p=[],f=[],m=[];for(let h=0;h<=n;h++){const g=[],v=h/n;let y=0;0===h&&0===o?y=.5/t:h===n&&a===Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const a=n/t;u.x=-e*Math.cos(r+a*i)*Math.sin(o+v*s),u.y=e*Math.cos(o+v*s),u.z=e*Math.sin(r+a*i)*Math.sin(o+v*s),p.push(u.x,u.y,u.z),d.copy(u).normalize(),f.push(d.x,d.y,d.z),m.push(a+y,1-v),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=c[e][r+1],i=c[e][r],s=c[e+1][r],l=c[e+1][r+1];(0!==e||o>0)&&h.push(t,i,l),(e!==n-1||a<Math.PI)&&h.push(i,s,l)}this.setIndex(h),this.setAttribute("position",new Cv(p,3)),this.setAttribute("normal",new Cv(f,3)),this.setAttribute("uv",new Cv(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yw(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class qw extends sw{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new qw(e.radius,e.detail)}}class Zw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:48,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI;super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const o=[],s=[],a=[],l=[],c=new Gm,u=new Gm,d=new Gm;for(let o=0;o<=n;o++)for(let h=0;h<=r;h++){const p=h/r*i,f=o/n*Math.PI*2;u.x=(e+t*Math.cos(f))*Math.cos(p),u.y=(e+t*Math.cos(f))*Math.sin(p),u.z=t*Math.sin(f),s.push(u.x,u.y,u.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),d.subVectors(u,c).normalize(),a.push(d.x,d.y,d.z),l.push(h/r),l.push(o/n)}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*e+t-1,i=(r+1)*(e-1)+t-1,s=(r+1)*(e-1)+t,a=(r+1)*e+t;o.push(n,i,a),o.push(i,s,a)}this.setIndex(o),this.setAttribute("position",new Cv(s,3)),this.setAttribute("normal",new Cv(a,3)),this.setAttribute("uv",new Cv(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Zw(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Jw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:64,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3;super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},n=Math.floor(n),r=Math.floor(r);const s=[],a=[],l=[],c=[],u=new Gm,d=new Gm,h=new Gm,p=new Gm,f=new Gm,m=new Gm,g=new Gm;for(let s=0;s<=n;++s){const y=s/n*i*Math.PI*2;v(y,i,o,e,h),v(y+.01,i,o,e,p),m.subVectors(p,h),g.addVectors(p,h),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,o=-t*Math.cos(i),p=t*Math.sin(i);u.x=h.x+(o*g.x+p*f.x),u.y=h.y+(o*g.y+p*f.y),u.z=h.z+(o*g.z+p*f.z),a.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(s/n),c.push(e/r)}}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;s.push(n,i,a),s.push(i,o,a)}function v(e,t,n,r,i){const o=Math.cos(e),s=Math.sin(e),a=n/t*e,l=Math.cos(a);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(a)*.5}this.setIndex(s),this.setAttribute("position",new Cv(a,3)),this.setAttribute("normal",new Cv(l,3)),this.setAttribute("uv",new Cv(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Jw(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Kw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ZS(new Gm(-1,-1,0),new Gm(-1,1,0),new Gm(1,1,0)),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new Gm,a=new Gm,l=new mm;let c=new Gm;const u=[],d=[],h=[],p=[];function f(i){c=e.getPointAt(i/t,c);const l=o.normals[i],h=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);a.x=o*l.x+i*h.x,a.y=o*l.y+i*h.y,a.z=o*l.z+i*h.z,a.normalize(),d.push(a.x,a.y,a.z),s.x=c.x+n*a.x,s.y=c.y+n*a.y,s.z=c.z+n*a.z,u.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,s=(r+1)*(e-1)+t;p.push(n,i,s),p.push(i,o,s)}}()}(),this.setIndex(p),this.setAttribute("position",new Cv(u,3)),this.setAttribute("normal",new Cv(d,3)),this.setAttribute("uv",new Cv(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Kw((new KS[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Qw extends kv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new Gm,i=new Gm;if(null!==e.index){const o=e.attributes.position,s=e.index;let a=e.groups;0===a.length&&(a=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=a.length;e<l;++e){const l=a[e],c=l.start;for(let e=c,a=c+l.count;e<a;e+=3)for(let a=0;a<3;a++){const l=s.getX(e+a),c=s.getX(e+(a+1)%3);r.fromBufferAttribute(o,l),i.fromBufferAttribute(o,c),!0===eC(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const o=e.attributes.position;for(let e=0,s=o.count/3;e<s;e++)for(let s=0;s<3;s++){const a=3*e+s,l=3*e+(s+1)%3;r.fromBufferAttribute(o,a),i.fromBufferAttribute(o,l),!0===eC(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new Cv(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function eC(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var tC=Object.freeze({__proto__:null,BoxGeometry:Kv,CapsuleGeometry:nw,CircleGeometry:rw,ConeGeometry:ow,CylinderGeometry:iw,DodecahedronGeometry:aw,EdgesGeometry:hw,ExtrudeGeometry:Vw,IcosahedronGeometry:jw,LatheGeometry:tw,OctahedronGeometry:Gw,PlaneGeometry:_y,PolyhedronGeometry:sw,RingGeometry:$w,ShapeGeometry:Xw,SphereGeometry:Yw,TetrahedronGeometry:qw,TorusGeometry:Zw,TorusKnotGeometry:Jw,TubeGeometry:Kw,WireframeGeometry:Qw});class nC extends hv{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new cv(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class rC extends ry{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class iC extends hv{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new cv(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new cv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class oC extends iC{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new mm(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return am(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new cv(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new cv(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new cv(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class sC extends hv{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new cv(16777215),this.specular=new cv(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new cv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dp,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class aC extends hv{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new cv(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new cv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class lC extends hv{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class cC extends hv{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new cv(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new cv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dp,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class uC extends hv{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new cv(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new mm(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class dC extends fS{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function hC(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function pC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fC(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n}function mC(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,s=0;s!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function gC(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let s=o[r];if(void 0!==s)if(Array.isArray(s))do{s=o[r],void 0!==s&&(t.push(o.time),n.push.apply(n,s)),o=e[i++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[r],void 0!==s&&(t.push(o.time),s.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{s=o[r],void 0!==s&&(t.push(o.time),n.push(s)),o=e[i++]}while(void 0!==o)}const vC={convertArray:hC,isTypedArray:pC,getKeyframeOrder:fC,sortedArray:mC,flattenJSON:gC,subclip:function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30;const o=e.clone();o.name=t;const s=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],a=t.getValueSize(),l=[],c=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*i;if(!(o<n||o>=r)){l.push(t.times[e]);for(let n=0;n<a;++n)c.push(t.values[e*a+n])}}0!==l.length&&(t.times=hC(l,t.times.constructor),t.values=hC(c,t.values.constructor),s.push(t))}o.tracks=s;let a=1/0;for(let e=0;e<o.tracks.length;++e)a>o.tracks[e].times[0]&&(a=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const s=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===s)continue;let a=0;const l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=r.times.length-1;let h;if(o<=r.times[0]){const e=a,t=l-a;h=r.values.slice(e,t)}else if(o>=r.times[d]){const e=d*l+a,t=e+l-a;h=r.values.slice(e,t)}else{const e=r.createInterpolant(),t=a,n=l-a;e.evaluate(o),h=e.resultBuffer.slice(t,n)}if("quaternion"===i){(new jm).fromArray(h).normalize().conjugate().toArray(h)}const p=s.times.length;for(let e=0;e<p;++e){const t=e*u+c;if("quaternion"===i)jm.multiplyQuaternionsFlat(s.values,t,h,0,s.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)s.values[t+n]-=h[n]}}}return e.blendMode=Uf,e}};class yC{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const s=t[1];e<s&&(n=2,i=s);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class _C extends yC{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:If,endingEnd:If}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,s=r[i],a=r[o];if(void 0===s)switch(this.getSettings_().endingStart){case Of:i=e,s=2*t-n;break;case Bf:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===a)switch(this.getSettings_().endingEnd){case Of:o=e,a=2*n-t;break;case Bf:o=1,a=n+r[1]-r[0];break;default:o=e-1,a=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(a-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-d*m+2*d*f-d*p,v=(1+d)*m+(-1.5-2*d)*f+(-.5+d)*p+1,y=(-1-h)*m+(1.5+h)*f+.5*p,_=h*m-h*f;for(let e=0;e!==s;++e)i[e]=g*o[c+e]+v*o[l+e]+y*o[a+e]+_*o[u+e];return i}}class xC extends yC{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=(n-t)/(r-t),u=1-c;for(let e=0;e!==s;++e)i[e]=o[l+e]*u+o[a+e]*c;return i}}class bC extends yC{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class SC{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=hC(t,this.TimeBufferType),this.values=hC(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:hC(e.times,Array),values:hC(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new bC(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new xC(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new _C(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Rf:t=this.InterpolantFactoryMethodDiscrete;break;case Pf:t=this.InterpolantFactoryMethodLinear;break;case kf:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Rf;case this.InterpolantFactoryMethodLinear:return Pf;case this.InterpolantFactoryMethodSmooth:return kf}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=n.slice(i,o),this.values=this.values.slice(i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,o),e=!1;break}o=r}if(void 0!==r&&pC(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===kf,i=e.length-1;let o=1;for(let s=1;s<i;++s){let i=!1;const a=e[s];if(a!==e[s+1]&&(1!==s||a!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,o=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[o+s]){i=!0;break}}}if(i){if(s!==o){e[o]=e[s];const r=s*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,s=0;s!==n;++s)t[r+s]=t[e+s];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}SC.prototype.TimeBufferType=Float32Array,SC.prototype.ValueBufferType=Float32Array,SC.prototype.DefaultInterpolation=Pf;class wC extends SC{}wC.prototype.ValueTypeName="bool",wC.prototype.ValueBufferType=Array,wC.prototype.DefaultInterpolation=Rf,wC.prototype.InterpolantFactoryMethodLinear=void 0,wC.prototype.InterpolantFactoryMethodSmooth=void 0;class CC extends SC{}CC.prototype.ValueTypeName="color";class AC extends SC{}AC.prototype.ValueTypeName="number";class MC extends yC{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-t)/(r-t);let l=e*s;for(let e=l+s;l!==e;l+=4)jm.slerpFlat(i,0,o,l-s,o,l,a);return i}}class TC extends SC{InterpolantFactoryMethodLinear(e){return new MC(this.times,this.values,this.getValueSize(),e)}}TC.prototype.ValueTypeName="quaternion",TC.prototype.DefaultInterpolation=Pf,TC.prototype.InterpolantFactoryMethodSmooth=void 0;class EC extends SC{}EC.prototype.ValueTypeName="string",EC.prototype.ValueBufferType=Array,EC.prototype.DefaultInterpolation=Rf,EC.prototype.InterpolantFactoryMethodLinear=void 0,EC.prototype.InterpolantFactoryMethodSmooth=void 0;class LC extends SC{}LC.prototype.ValueTypeName="vector";class RC{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Df;this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=sm(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(PC(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(SC.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e<i;e++){let s=[],a=[];s.push((e+i-1)%i,e,(e+1)%i),a.push(0,1,0);const l=fC(s);s=mC(s,1,l),a=mC(a,1,l),r||0!==s[0]||(s.push(i),a.push(a[0])),o.push(new AC(".morphTargetInfluences["+t[e].name+"]",s,a).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(i);if(o&&o.length>1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],s=[];gC(n,o,s,r),0!==o.length&&i.push(new e(t,o,s))}},r=[],i=e.name||"default",o=e.fps||30,s=e.blendMode;let a=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const i=l[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new AC(".morphTargetInfluence["+n+"]",e,o))}a=e.length*o}else{const o=".bones["+t[e].name+"]";n(LC,o+".position",i,"pos",r),n(TC,o+".quaternion",i,"rot",r),n(LC,o+".scale",i,"scl",r)}}if(0===r.length)return null;return new this(i,a,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function PC(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return AC;case"vector":case"vector2":case"vector3":case"vector4":return LC;case"color":return CC;case"quaternion":return TC;case"bool":case"boolean":return wC;case"string":return EC}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];gC(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const kC={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class IC{constructor(e,t,n){const r=this;let i,o=!1,s=0,a=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===o&&void 0!==r.onStart&&r.onStart(e,s,a),o=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,a),s===a&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const OC=new IC;class BC{constructor(e){this.manager=void 0!==e?e:OC,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}BC.DEFAULT_MATERIAL_NAME="__DEFAULT";const DC={};class UC extends Error{constructor(e,t){super(e),this.response=t}}class FC extends BC{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=kC.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==DC[e])return void DC[e].push({onLoad:t,onProgress:n,onError:r});DC[e]=[],DC[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,a=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=DC[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),o=i?parseInt(i):0,s=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){r.read().then((r=>{let{done:i,value:l}=r;if(i)e.close();else{a+=l.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:a,total:o});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(l),t()}}))}()}});return new Response(l)}throw new UC(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)})).then((e=>{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,s)));case"json":return e.json();default:if(void 0===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{kC.add(e,t);const n=DC[e];delete DC[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=DC[e];if(void 0===n)throw this.manager.itemError(e),t;delete DC[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class NC extends BC{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=kC.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const s=bm("img");function a(){c(),kC.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){c(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",a,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),i.manager.itemStart(e),s.src=e,s}}class zC extends $g{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;super(),this.isLight=!0,this.type="Light",this.color=new cv(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}class HC extends zC{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy($g.DEFAULT_UP),this.updateMatrix(),this.groundColor=new cv(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const VC=new bg,WC=new Gm,jC=new Gm;class GC{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new mm(512,512),this.map=null,this.mapPass=null,this.matrix=new bg,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new gy,this._frameExtents=new mm(1,1),this._viewportCount=1,this._viewports=[new Nm(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;WC.setFromMatrixPosition(e.matrixWorld),t.position.copy(WC),jC.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(jC),t.updateMatrixWorld(),VC.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(VC),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(VC)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class $C extends GC{constructor(){super(new oy(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*om*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class XC extends zC{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Math.PI/3,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2;super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($g.DEFAULT_UP),this.updateMatrix(),this.target=new $g,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.map=null,this.shadow=new $C}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const YC=new bg,qC=new Gm,ZC=new Gm;class JC extends GC{constructor(){super(new oy(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new mm(4,2),this._viewportCount=6,this._viewports=[new Nm(2,1,1,1),new Nm(0,1,1,1),new Nm(3,1,1,1),new Nm(1,1,1,1),new Nm(3,0,1,1),new Nm(1,0,1,1)],this._cubeDirections=[new Gm(1,0,0),new Gm(-1,0,0),new Gm(0,0,1),new Gm(0,0,-1),new Gm(0,1,0),new Gm(0,-1,0)],this._cubeUps=[new Gm(0,1,0),new Gm(0,1,0),new Gm(0,1,0),new Gm(0,1,0),new Gm(0,0,1),new Gm(0,0,-1)]}updateMatrices(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),qC.setFromMatrixPosition(e.matrixWorld),n.position.copy(qC),ZC.copy(n.position),ZC.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ZC),n.updateMatrixWorld(),r.makeTranslation(-qC.x,-qC.y,-qC.z),YC.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(YC)}}class KC extends zC{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new JC}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class QC extends GC{constructor(){super(new Ry(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class eA extends zC{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($g.DEFAULT_UP),this.updateMatrix(),this.target=new $g,this.shadow=new QC}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class tA extends zC{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class nA extends zC{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class rA{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Gm)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class iA extends zC{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new rA;super(void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class oA extends BC{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,o=new FC(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=oA.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new cv).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new cv).setHex(i.value);break;case"v2":r.uniforms[t].value=(new mm).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new Gm).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new Nm).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new gm).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new bg).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new mm).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new mm).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:nC,SpriteMaterial:lb,RawShaderMaterial:rC,ShaderMaterial:ry,PointsMaterial:AS,MeshPhysicalMaterial:oC,MeshStandardMaterial:iC,MeshPhongMaterial:sC,MeshToonMaterial:aC,MeshNormalMaterial:lC,MeshLambertMaterial:cC,MeshDepthMaterial:Hx,MeshDistanceMaterial:Vx,MeshBasicMaterial:pv,MeshMatcapMaterial:uC,LineDashedMaterial:dC,LineBasicMaterial:fS,Material:hv}[e]}}class sA{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class aA extends kv{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class lA extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new FC(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers,i=r[t],o=new Uint32Array(i).buffer;return n[t]=o,o}(e,i.buffer),s=xm(i.type,o),a=new ob(s,i.stride);return a.uuid=i.uuid,t[r]=a,a}const i=e.isInstancedBufferGeometry?new aA:new kv,o=e.data.index;if(void 0!==o){const e=xm(o.type,o.array);i.setIndex(new bv(e,1))}const s=e.data.attributes;for(const t in s){const n=s[t];let o;if(n.isInterleavedBufferAttribute){const t=r(e.data,n.data);o=new ab(t,n.itemSize,n.offset,n.normalized)}else{const e=xm(n.type,n.array);o=new(n.isInstancedBufferAttribute?Vb:bv)(e,n.itemSize,n.normalized)}void 0!==n.name&&(o.name=n.name),void 0!==n.usage&&o.setUsage(n.usage),i.setAttribute(t,o)}const a=e.data.morphAttributes;if(a)for(const t in a){const n=a[t],o=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];let s;if(i.isInterleavedBufferAttribute){const t=r(e.data,i.data);s=new ab(t,i.itemSize,i.offset,i.normalized)}else{const e=xm(i.type,i.array);s=new bv(e,i.itemSize,i.normalized)}void 0!==i.name&&(s.name=i.name),o.push(s)}i.morphAttributes[t]=o}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];i.addGroup(t.start,t.count,t.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new Gm;void 0!==c.center&&e.fromArray(c.center),i.boundingSphere=new hg(e,c.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}const cA={UVMapping:Sp,CubeReflectionMapping:wp,CubeRefractionMapping:Cp,EquirectangularReflectionMapping:Ap,EquirectangularRefractionMapping:Mp,CubeUVReflectionMapping:Tp},uA={RepeatWrapping:Ep,ClampToEdgeWrapping:Lp,MirroredRepeatWrapping:Rp},dA={NearestFilter:Pp,NearestMipmapNearestFilter:kp,NearestMipmapLinearFilter:Ip,LinearFilter:Op,LinearMipmapNearestFilter:Bp,LinearMipmapLinearFilter:Dp};let hA;class pA{static getContext(){return void 0===hA&&(hA=new(window.AudioContext||window.webkitAudioContext)),hA}static setContext(e){hA=e}}const fA=new bg,mA=new bg,gA=new bg;class vA{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=yA(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=yA();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function yA(){return("undefined"==typeof performance?Date:performance).now()}const _A=new Gm,xA=new jm,bA=new Gm,SA=new Gm;class wA extends $g{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(!1!==this._connected){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const CA=new Gm,AA=new jm,MA=new Gm,TA=new Gm;class EA{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){jm.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;jm.multiplyQuaternionsFlat(e,o,e,t,e,n),jm.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*o+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const LA="\\[\\]\\.:\\/",RA=new RegExp("["+LA+"]","g"),PA="[^"+LA+"]",kA="[^"+LA.replace("\\.","")+"]",IA=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",PA)+/(WCOD+)?/.source.replace("WCOD",kA)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",PA)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",PA)+"$"),OA=["material","materials","bones","map"];class BA{constructor(e,t,n){this.path=t,this.parsedPath=n||BA.parseTrackName(t),this.node=BA.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new BA.Composite(e,t,n):new BA(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(RA,"")}static parseTrackName(e){const t=IA.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==OA.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=BA.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}a=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(a=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}BA.Composite=class{constructor(e,t,n){const r=n||BA.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},BA.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},BA.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},BA.prototype.GetterByBindingType=[BA.prototype._getValue_direct,BA.prototype._getValue_array,BA.prototype._getValue_arrayElement,BA.prototype._getValue_toArray],BA.prototype.SetterByBindingTypeAndVersioning=[[BA.prototype._setValue_direct,BA.prototype._setValue_direct_setNeedsUpdate,BA.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[BA.prototype._setValue_array,BA.prototype._setValue_array_setNeedsUpdate,BA.prototype._setValue_array_setMatrixWorldNeedsUpdate],[BA.prototype._setValue_arrayElement,BA.prototype._setValue_arrayElement_setNeedsUpdate,BA.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[BA.prototype._setValue_fromArray,BA.prototype._setValue_fromArray_setNeedsUpdate,BA.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class DA{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.blendMode;this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,s=new Array(o),a={endingStart:If,endingEnd:If};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);s[e]=t,t.settings=a}this._interpolantSettings=a,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=i,a[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const o=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Uf)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Of,r.endingEnd=Of):(r.endingStart=e?this.zeroSlopeAtStart?Of:If:Bf,r.endingEnd=t?this.zeroSlopeAtEnd?Of:If:Bf)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,a=o.sampleValues;return s[0]=i,a[0]=t,s[1]=i+e,a[1]=n,this}}const UA=new Float32Array(1);class FA{constructor(e){this.value=e}clone(){return new FA(void 0===this.value.clone?this.value:this.value.clone())}}let NA=0;function zA(e,t){return e.distance-t.distance}function HA(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)HA(r[e],t,n,!0)}}const VA=new mm;const WA=new Gm,jA=new Gm;const GA=new Gm;const $A=new Gm,XA=new bg,YA=new bg;function qA(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,qA(e.children[n]));return t}const ZA=new Gm,JA=new cv,KA=new cv;class QA extends wS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4473924,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8947848;n=new cv(n),r=new cv(r);const i=t/2,o=e/t,s=e/2,a=[],l=[];for(let e=0,c=0,u=-s;e<=t;e++,u+=o){a.push(-s,0,u,s,0,u),a.push(u,0,-s,u,0,s);const t=e===i?n:r;t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3}const c=new kv;c.setAttribute("position",new Cv(a,3)),c.setAttribute("color",new Cv(l,3));super(c,new fS({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const eM=new Gm,tM=new Gm,nM=new Gm;const rM=new Gm,iM=new iy;function oM(e,t,n,r,i,o,s){rM.set(i,o,s).unproject(r);const a=t[e];if(void 0!==a){const e=n.getAttribute("position");for(let t=0,n=a.length;t<n;t++)e.setXYZ(a[t],rM.x,rM.y,rM.z)}}const sM=new Ym;const aM=new Gm;let lM,cM;class uM extends wS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new kv;n.setAttribute("position",new Cv(t,3)),n.setAttribute("color",new Cv([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new fS({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new cv,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:np}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=np);var dM=Object.freeze({__proto__:null,ACESFilmicToneMapping:yp,AddEquation:lp,AddOperation:pp,AdditiveAnimationBlendMode:Uf,AdditiveBlending:2,AlphaFormat:1021,AlwaysCompare:519,AlwaysDepth:1,AlwaysStencilFunc:519,AmbientLight:tA,AnimationAction:DA,AnimationClip:RC,AnimationLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new FC(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=RC.parse(e[n]);t.push(r)}return t}},AnimationMixer:class extends tm{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,s=e._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let e=0;e!==i;++e){const i=r[e],l=i.name;let u=c[l];if(void 0!==u)++u.referenceCount,o[e]=u;else{if(u=o[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,a,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;u=new EA(BA.create(n,l,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,a,l),o[e]=u}s[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,s=o[i],a=s.knownActions,l=a[a.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),e._byClipCacheIndex=null;delete s.actionByRoot[(e._localRoot||this._root).uuid],0===a.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,s=o[r],a=t[t.length-1],l=e._cacheIndex;a._cacheIndex=l,t[l]=a,t.pop(),delete s[i],0===Object.keys(s).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new xC(new Float32Array(2),new Float32Array(2),1,UA),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?RC.findByName(r,e):e;const s=null!==o?o.uuid:e,a=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:Df),void 0!==a){const e=a.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=a.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new DA(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?RC.findByName(n,e):e,o=i?i.uuid:e,s=this._actionsByClip[o];return void 0!==s&&s.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let s=0;s!==n;++s){t[s]._update(r,e,i,o)}const s=this._bindings,a=this._nActiveBindings;for(let e=0;e!==a;++e)s[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}},AnimationObjectGroup:class{constructor(){this.isAnimationObjectGroup=!0,this.uuid=sm(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let s,a=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=a++,t[d]=h,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new BA(u,n[e],r[e]))}else if(h<l){s=e[h];const a=--l,c=e[a];t[c.uuid]=h,e[h]=c,t[d]=a,e[a]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[a];let s=t[h];t[h]=o,void 0===s&&(s=new BA(u,n[e],r[e])),t[a]=s}}else e[h]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o],a=s.uuid,l=t[a];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[a]=o,e[o]=s;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s].uuid,l=t[a];if(void 0!==l)if(delete t[a],l<i){const s=--i,a=e[s],c=--o,u=e[c];t[a.uuid]=l,e[l]=a,t[u.uuid]=s,e[s]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[c];t[l]=r,t[s]=i,t.pop()}}else{const i=--o,s=e[i];i>0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,s=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),s.push(t),i.push(u);for(let n=c,r=a.length;n!==r;++n){const r=a[n];u[n]=new BA(r,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];t[e[s]]=n,o[n]=a,o.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}},AnimationUtils:vC,ArcCurve:BS,ArrayCamera:Xx,ArrowHelper:class extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm(0,0,1),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm(0,0,0),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16776960,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.2*n,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.2*i;super(),this.type="ArrowHelper",void 0===lM&&(lM=new kv,lM.setAttribute("position",new Cv([0,0,0,0,1,0],3)),cM=new iw(0,.5,1,5,1),cM.translate(0,-.5,0)),this.position.copy(t),this.line=new xS(lM,new fS({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Zv(cM,new pv({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{aM.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(aM,t)}}setLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2*e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.2*t;this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},AttachedBindMode:xp,Audio:wA,AudioAnalyser:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2048;this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}},AudioContext:pA,AudioListener:class extends $g{constructor(){super(),this.type="AudioListener",this.context=pA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new vA}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_A,xA,bA),SA.set(0,0,-1).applyQuaternion(xA),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(_A.x,e),t.positionY.linearRampToValueAtTime(_A.y,e),t.positionZ.linearRampToValueAtTime(_A.z,e),t.forwardX.linearRampToValueAtTime(SA.x,e),t.forwardY.linearRampToValueAtTime(SA.y,e),t.forwardZ.linearRampToValueAtTime(SA.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(_A.x,_A.y,_A.z),t.setOrientation(SA.x,SA.y,SA.z,n.x,n.y,n.z)}},AudioLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new FC(this.manager);function s(t){r?r(t):console.error(t),i.manager.itemError(e)}o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(e){try{const n=e.slice(0);pA.getContext().decodeAudioData(n,(function(e){t(e)})).catch(s)}catch(e){s(e)}}),n,r)}},AxesHelper:uM,BackSide:ap,BasicDepthPacking:3200,BasicShadowMap:0,BatchedMesh:pS,Bone:Ub,BooleanKeyframeTrack:wC,Box2:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new mm(1/0,1/0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new mm(-1/0,-1/0);this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=VA.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,VA).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},Box3:Ym,Box3Helper:class extends wS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16776960;const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new kv;r.setIndex(new bv(n,1)),r.setAttribute("position",new Cv([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new fS({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}},BoxGeometry:Kv,BoxHelper:class extends wS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16776960;const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new kv;i.setIndex(new bv(n,1)),i.setAttribute("position",new bv(r,3)),super(i,new fS({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&sM.setFromObject(this.object),sM.isEmpty())return;const t=sM.min,n=sM.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},BufferAttribute:bv,BufferGeometry:kv,BufferGeometryLoader:lA,ByteType:1010,Cache:kC,Camera:iy,CameraHelper:class extends wS{constructor(e){const t=new kv,n=new fS({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],o={};function s(e,t){a(e),a(t)}function a(e){r.push(0,0,0),i.push(0,0,0),void 0===o[e]&&(o[e]=[]),o[e].push(r.length/3-1)}s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4"),t.setAttribute("position",new Cv(r,3)),t.setAttribute("color",new Cv(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const l=new cv(16755200),c=new cv(16711680),u=new cv(43775),d=new cv(16777215),h=new cv(3355443);this.setColors(l,c,u,d,h)}setColors(e,t,n,r,i){const o=this.geometry.getAttribute("color");o.setXYZ(0,e.r,e.g,e.b),o.setXYZ(1,e.r,e.g,e.b),o.setXYZ(2,e.r,e.g,e.b),o.setXYZ(3,e.r,e.g,e.b),o.setXYZ(4,e.r,e.g,e.b),o.setXYZ(5,e.r,e.g,e.b),o.setXYZ(6,e.r,e.g,e.b),o.setXYZ(7,e.r,e.g,e.b),o.setXYZ(8,e.r,e.g,e.b),o.setXYZ(9,e.r,e.g,e.b),o.setXYZ(10,e.r,e.g,e.b),o.setXYZ(11,e.r,e.g,e.b),o.setXYZ(12,e.r,e.g,e.b),o.setXYZ(13,e.r,e.g,e.b),o.setXYZ(14,e.r,e.g,e.b),o.setXYZ(15,e.r,e.g,e.b),o.setXYZ(16,e.r,e.g,e.b),o.setXYZ(17,e.r,e.g,e.b),o.setXYZ(18,e.r,e.g,e.b),o.setXYZ(19,e.r,e.g,e.b),o.setXYZ(20,e.r,e.g,e.b),o.setXYZ(21,e.r,e.g,e.b),o.setXYZ(22,e.r,e.g,e.b),o.setXYZ(23,e.r,e.g,e.b),o.setXYZ(24,t.r,t.g,t.b),o.setXYZ(25,t.r,t.g,t.b),o.setXYZ(26,t.r,t.g,t.b),o.setXYZ(27,t.r,t.g,t.b),o.setXYZ(28,t.r,t.g,t.b),o.setXYZ(29,t.r,t.g,t.b),o.setXYZ(30,t.r,t.g,t.b),o.setXYZ(31,t.r,t.g,t.b),o.setXYZ(32,n.r,n.g,n.b),o.setXYZ(33,n.r,n.g,n.b),o.setXYZ(34,n.r,n.g,n.b),o.setXYZ(35,n.r,n.g,n.b),o.setXYZ(36,n.r,n.g,n.b),o.setXYZ(37,n.r,n.g,n.b),o.setXYZ(38,r.r,r.g,r.b),o.setXYZ(39,r.r,r.g,r.b),o.setXYZ(40,i.r,i.g,i.b),o.setXYZ(41,i.r,i.g,i.b),o.setXYZ(42,i.r,i.g,i.b),o.setXYZ(43,i.r,i.g,i.b),o.setXYZ(44,i.r,i.g,i.b),o.setXYZ(45,i.r,i.g,i.b),o.setXYZ(46,i.r,i.g,i.b),o.setXYZ(47,i.r,i.g,i.b),o.setXYZ(48,i.r,i.g,i.b),o.setXYZ(49,i.r,i.g,i.b),o.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap;iM.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),oM("c",t,e,iM,0,0,-1),oM("t",t,e,iM,0,0,1),oM("n1",t,e,iM,-1,-1,-1),oM("n2",t,e,iM,1,-1,-1),oM("n3",t,e,iM,-1,1,-1),oM("n4",t,e,iM,1,1,-1),oM("f1",t,e,iM,-1,-1,1),oM("f2",t,e,iM,1,-1,1),oM("f3",t,e,iM,-1,1,1),oM("f4",t,e,iM,1,1,1),oM("u1",t,e,iM,.7,1.1,-1),oM("u2",t,e,iM,-.7,1.1,-1),oM("u3",t,e,iM,0,2,-1),oM("cf1",t,e,iM,-1,0,1),oM("cf2",t,e,iM,1,0,1),oM("cf3",t,e,iM,0,-1,1),oM("cf4",t,e,iM,0,1,1),oM("cn1",t,e,iM,-1,0,-1),oM("cn2",t,e,iM,1,0,-1),oM("cn3",t,e,iM,0,-1,-1),oM("cn4",t,e,iM,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},CanvasTexture:class extends Fm{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},CapsuleGeometry:nw,CatmullRomCurve3:HS,CineonToneMapping:vp,CircleGeometry:rw,ClampToEdgeWrapping:Lp,Clock:vA,Color:cv,ColorKeyframeTrack:CC,ColorManagement:Lm,CompressedArrayTexture:class extends kS{constructor(e,t,n,r,i,o){super(e,t,n,i,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Lp}},CompressedCubeTexture:class extends kS{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,wp),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},CompressedTexture:kS,CompressedTextureLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=[],s=new kS,a=new FC(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(i.withCredentials);let l=0;function c(c){a.load(e[c],(function(e){const n=i.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=Op),s.image=o,s.format=n.format,s.needsUpdate=!0,t&&t(s))}),n,r)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)c(t);else a.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){o[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)o[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),o[t].format=n.format,o[t].width=n.width,o[t].height=n.height}s.image=o}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=Op),s.format=n.format,s.needsUpdate=!0,t&&t(s)}),n,r);return s}},ConeGeometry:ow,ConstantAlphaFactor:213,ConstantColorFactor:211,CubeCamera:ay,CubeReflectionMapping:wp,CubeRefractionMapping:Cp,CubeTexture:ly,CubeTextureLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=new ly;i.colorSpace=Hf;const o=new NC(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let s=0;function a(n){o.load(e[n],(function(e){i.images[n]=e,s++,6===s&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)a(t);return i}},CubeUVReflectionMapping:Tp,CubicBezierCurve:GS,CubicBezierCurve3:$S,CubicInterpolant:_C,CullFaceBack:1,CullFaceFront:2,CullFaceFrontBack:3,CullFaceNone:0,Curve:IS,CurvePath:QS,CustomBlending:5,CustomToneMapping:_p,CylinderGeometry:iw,Cylindrical:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}},Data3DTexture:Wm,DataArrayTexture:Vm,DataTexture:Fb,DataTextureLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Fb,s=new FC(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(i.withCredentials),s.load(e,(function(e){let n;try{n=i.parse(e)}catch(e){if(void 0===r)return void console.error(e);r(e)}void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Lp,o.wrapT=void 0!==n.wrapT?n.wrapT:Lp,o.magFilter=void 0!==n.magFilter?n.magFilter:Op,o.minFilter=void 0!==n.minFilter?n.minFilter:Op,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.colorSpace?o.colorSpace=n.colorSpace:void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=Dp),1===n.mipmapCount&&(o.minFilter=Op),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,t&&t(o,n)}),n,r),o}},DataUtils:yv,DecrementStencilOp:7683,DecrementWrapStencilOp:34056,DefaultLoadingManager:OC,DepthFormat:Xp,DepthStencilFormat:Yp,DepthTexture:n_,DetachedBindMode:bp,DirectionalLight:eA,DirectionalLightHelper:class extends $g{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===t&&(t=1);let r=new kv;r.setAttribute("position",new Cv([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new fS({fog:!1,toneMapped:!1});this.lightPlane=new xS(r,i),this.add(this.lightPlane),r=new kv,r.setAttribute("position",new Cv([0,0,0,0,0,1],3)),this.targetLine=new xS(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),eM.setFromMatrixPosition(this.light.matrixWorld),tM.setFromMatrixPosition(this.light.target.matrixWorld),nM.subVectors(tM,eM),this.lightPlane.lookAt(tM),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(tM),this.targetLine.scale.z=nM.length()}},DiscreteInterpolant:bC,DisplayP3ColorSpace:Wf,DodecahedronGeometry:aw,DoubleSide:2,DstAlphaFactor:206,DstColorFactor:208,DynamicCopyUsage:35050,DynamicDrawUsage:35048,DynamicReadUsage:35049,EdgesGeometry:hw,EllipseCurve:OS,EqualCompare:514,EqualDepth:4,EqualStencilFunc:514,EquirectangularReflectionMapping:Ap,EquirectangularRefractionMapping:Mp,Euler:Pg,EventDispatcher:tm,ExtrudeGeometry:Vw,FileLoader:FC,Float16BufferAttribute:class extends bv{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=vv(this.array[e*this.itemSize]);return this.normalized&&(t=hm(t,this.array)),t}setX(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize]=gv(t),this}getY(e){let t=vv(this.array[e*this.itemSize+1]);return this.normalized&&(t=hm(t,this.array)),t}setY(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+1]=gv(t),this}getZ(e){let t=vv(this.array[e*this.itemSize+2]);return this.normalized&&(t=hm(t,this.array)),t}setZ(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+2]=gv(t),this}getW(e){let t=vv(this.array[e*this.itemSize+3]);return this.normalized&&(t=hm(t,this.array)),t}setW(e,t){return this.normalized&&(t=pm(t,this.array)),this.array[e*this.itemSize+3]=gv(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array)),this.array[e+0]=gv(t),this.array[e+1]=gv(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array)),this.array[e+0]=gv(t),this.array[e+1]=gv(n),this.array[e+2]=gv(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=pm(t,this.array),n=pm(n,this.array),r=pm(r,this.array),i=pm(i,this.array)),this.array[e+0]=gv(t),this.array[e+1]=gv(n),this.array[e+2]=gv(r),this.array[e+3]=gv(i),this}},Float32BufferAttribute:Cv,Float64BufferAttribute:class extends bv{constructor(e,t,n){super(new Float64Array(e),t,n)}},FloatType:Hp,Fog:rb,FogExp2:nb,FramebufferTexture:class extends Fm{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Pp,this.minFilter=Pp,this.generateMipmaps=!1,this.needsUpdate=!0}},FrontSide:sp,Frustum:gy,GLBufferAttribute:class{constructor(e,t,n,r,i){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}},GLSL1:"100",GLSL3:Jf,GreaterCompare:516,GreaterDepth:6,GreaterEqualCompare:518,GreaterEqualDepth:5,GreaterEqualStencilFunc:518,GreaterStencilFunc:516,GridHelper:QA,Group:Yx,HalfFloatType:Vp,HemisphereLight:HC,HemisphereLightHelper:class extends $g{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new Gw(t);r.rotateY(.5*Math.PI),this.material=new pv({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.setAttribute("color",new bv(o,3)),this.add(new Zv(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");JA.copy(this.light.color),KA.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?JA:KA;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(ZA.setFromMatrixPosition(this.light.matrixWorld).negate())}},IcosahedronGeometry:jw,ImageBitmapLoader:class extends BC{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=kC.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){kC.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}},ImageLoader:NC,ImageUtils:Im,IncrementStencilOp:7682,IncrementWrapStencilOp:34055,InstancedBufferAttribute:Vb,InstancedBufferGeometry:aA,InstancedInterleavedBuffer:class extends ob{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}},InstancedMesh:Zb,Int16BufferAttribute:class extends bv{constructor(e,t,n){super(new Int16Array(e),t,n)}},Int32BufferAttribute:class extends bv{constructor(e,t,n){super(new Int32Array(e),t,n)}},Int8BufferAttribute:class extends bv{constructor(e,t,n){super(new Int8Array(e),t,n)}},IntType:Np,InterleavedBuffer:ob,InterleavedBufferAttribute:ab,Interpolant:yC,InterpolateDiscrete:Rf,InterpolateLinear:Pf,InterpolateSmooth:kf,InvertStencilOp:5386,KeepStencilOp:qf,KeyframeTrack:SC,LOD:Mb,LatheGeometry:tw,Layers:kg,LessCompare:513,LessDepth:2,LessEqualCompare:515,LessEqualDepth:3,LessEqualStencilFunc:515,LessStencilFunc:513,Light:zC,LightProbe:iA,Line:xS,Line3:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Gm;this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){WA.subVectors(e,this.start),jA.subVectors(this.end,this.start);const n=jA.dot(jA);let r=jA.dot(WA)/n;return t&&(r=am(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}},LineBasicMaterial:fS,LineCurve:XS,LineCurve3:YS,LineDashedMaterial:dC,LineLoop:CS,LineSegments:wS,LinearDisplayP3ColorSpace:jf,LinearEncoding:Ff,LinearFilter:Op,LinearInterpolant:xC,LinearMipMapLinearFilter:1008,LinearMipMapNearestFilter:1007,LinearMipmapLinearFilter:Dp,LinearMipmapNearestFilter:Bp,LinearSRGBColorSpace:Vf,LinearToneMapping:mp,LinearTransfer:Gf,Loader:BC,LoaderUtils:sA,LoadingManager:IC,LoopOnce:2200,LoopPingPong:2202,LoopRepeat:2201,LuminanceAlphaFormat:1025,LuminanceFormat:1024,MOUSE:{LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Material:hv,MaterialLoader:oA,MathUtils:fm,Matrix3:gm,Matrix4:bg,MaxEquation:104,Mesh:Zv,MeshBasicMaterial:pv,MeshDepthMaterial:Hx,MeshDistanceMaterial:Vx,MeshLambertMaterial:cC,MeshMatcapMaterial:uC,MeshNormalMaterial:lC,MeshPhongMaterial:sC,MeshPhysicalMaterial:oC,MeshStandardMaterial:iC,MeshToonMaterial:aC,MinEquation:103,MirroredRepeatWrapping:Rp,MixOperation:hp,MultiplyBlending:4,MultiplyOperation:dp,NearestFilter:Pp,NearestMipMapLinearFilter:1005,NearestMipMapNearestFilter:1004,NearestMipmapLinearFilter:Ip,NearestMipmapNearestFilter:kp,NeverCompare:512,NeverDepth:0,NeverStencilFunc:512,NoBlending:0,NoColorSpace:zf,NoToneMapping:fp,NormalAnimationBlendMode:Df,NormalBlending:1,NotEqualCompare:517,NotEqualDepth:7,NotEqualStencilFunc:517,NumberKeyframeTrack:AC,Object3D:$g,ObjectLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=""===this.path?sA.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const s=new FC(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){let o=null;try{o=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const s=o.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())return void 0!==r&&r(new Error("THREE.ObjectLoader: Can't load "+e)),void console.error("THREE.ObjectLoader: Can't load "+e);i.parse(o,t)}),n,r)}async loadAsync(e,t){const n=""===this.path?sA.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new FC(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const i=await r.loadAsync(e,t),o=JSON.parse(i),s=o.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(o)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),s=this.parseTextures(e.textures,o),a=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,a,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in o)if(o[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),i=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,i),s=this.parseMaterials(e.materials,o),a=this.parseObject(e.object,r,s,o,t),l=this.parseSkeletons(e.skeletons,a);return this.bindSkeletons(a,l),a}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new pw).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let t=0,i=e.length;t<i;t++){const i=(new Hb).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new lA;for(let i=0,o=e.length;i<o;i++){let o;const s=e[i];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":o=r.parse(s);break;default:s.type in tC?o=tC[s.type].fromJSON(s,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${s.type}"`)}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),void 0!==s.userData&&(o.userData=s.userData),n[s.uuid]=o}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new oA;i.setTextures(t);for(let t=0,o=e.length;t<o;t++){const o=e[t];void 0===n[o.uuid]&&(n[o.uuid]=i.parse(o)),r[o.uuid]=n[o.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=RC.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function o(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:xm(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new IC(t);i=new NC(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.url;if(Array.isArray(i)){const e=[];for(let t=0,n=i.length;t<n;t++){const n=o(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new Fb(n.data,n.width,n.height)))}r[n.uuid]=new Bm(e)}else{const e=o(n.url);r[n.uuid]=new Bm(e)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;async function i(e){if("string"==typeof e){const n=e,i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await r.loadAsync(i)}return e.data?{data:xm(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){r=new NC(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){const r=e[t],o=r.url;if(Array.isArray(o)){const e=[];for(let t=0,n=o.length;t<n;t++){const n=o[t],r=await i(n);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new Fb(r.data,r.width,r.height)))}n[r.uuid]=new Bm(e)}else{const e=await i(r.url);n[r.uuid]=new Bm(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,o=e.length;i<o;i++){const o=e[i];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=t[o.image],a=s.data;let l;Array.isArray(a)?(l=new ly,6===a.length&&(l.needsUpdate=!0)):(l=a&&a.data?new Fb:new Fm,a&&(l.needsUpdate=!0)),l.source=s,l.uuid=o.uuid,void 0!==o.name&&(l.name=o.name),void 0!==o.mapping&&(l.mapping=n(o.mapping,cA)),void 0!==o.channel&&(l.channel=o.channel),void 0!==o.offset&&l.offset.fromArray(o.offset),void 0!==o.repeat&&l.repeat.fromArray(o.repeat),void 0!==o.center&&l.center.fromArray(o.center),void 0!==o.rotation&&(l.rotation=o.rotation),void 0!==o.wrap&&(l.wrapS=n(o.wrap[0],uA),l.wrapT=n(o.wrap[1],uA)),void 0!==o.format&&(l.format=o.format),void 0!==o.internalFormat&&(l.internalFormat=o.internalFormat),void 0!==o.type&&(l.type=o.type),void 0!==o.colorSpace&&(l.colorSpace=o.colorSpace),void 0!==o.encoding&&(l.encoding=o.encoding),void 0!==o.minFilter&&(l.minFilter=n(o.minFilter,dA)),void 0!==o.magFilter&&(l.magFilter=n(o.magFilter,dA)),void 0!==o.anisotropy&&(l.anisotropy=o.anisotropy),void 0!==o.flipY&&(l.flipY=o.flipY),void 0!==o.generateMipmaps&&(l.generateMipmaps=o.generateMipmaps),void 0!==o.premultiplyAlpha&&(l.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(l.unpackAlignment=o.unpackAlignment),void 0!==o.compareFunction&&(l.compareFunction=o.compareFunction),void 0!==o.userData&&(l.userData=o.userData),r[o.uuid]=l}return r}parseObject(e,t,n,r,i){let o,s,a;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}function u(e){return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),r[e]}switch(e.type){case"Scene":o=new ib,void 0!==e.background&&(Number.isInteger(e.background)?o.background=new cv(e.background):o.background=u(e.background)),void 0!==e.environment&&(o.environment=u(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?o.fog=new rb(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(o.fog=new nb(e.fog.color,e.fog.density)),""!==e.fog.name&&(o.fog.name=e.fog.name)),void 0!==e.backgroundBlurriness&&(o.backgroundBlurriness=e.backgroundBlurriness),void 0!==e.backgroundIntensity&&(o.backgroundIntensity=e.backgroundIntensity);break;case"PerspectiveCamera":o=new oy(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(o.focus=e.focus),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.filmGauge&&(o.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(o.filmOffset=e.filmOffset),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new Ry(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new tA(e.color,e.intensity);break;case"DirectionalLight":o=new eA(e.color,e.intensity);break;case"PointLight":o=new KC(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new nA(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new XC(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new HC(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=(new iA).fromJSON(e);break;case"SkinnedMesh":s=l(e.geometry),a=c(e.material),o=new Db(s,a),void 0!==e.bindMode&&(o.bindMode=e.bindMode),void 0!==e.bindMatrix&&o.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(o.skeleton=e.skeleton);break;case"Mesh":s=l(e.geometry),a=c(e.material),o=new Zv(s,a);break;case"InstancedMesh":s=l(e.geometry),a=c(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;o=new Zb(s,a,t),o.instanceMatrix=new Vb(new Float32Array(n.array),16),void 0!==r&&(o.instanceColor=new Vb(new Float32Array(r.array),r.itemSize));break;case"BatchedMesh":s=l(e.geometry),a=c(e.material),o=new pS(e.maxGeometryCount,e.maxVertexCount,e.maxIndexCount,a),o.geometry=s,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._visibility=e.visibility,o._active=e.active,o._bounds=e.bounds.map((e=>{const t=new Ym;t.min.fromArray(e.boxMin),t.max.fromArray(e.boxMax);const n=new hg;return n.radius=e.sphereRadius,n.center.fromArray(e.sphereCenter),{boxInitialized:e.boxInitialized,box:t,sphereInitialized:e.sphereInitialized,sphere:n}})),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=u(e.matricesTexture.uuid);break;case"LOD":o=new Mb;break;case"Line":o=new xS(l(e.geometry),c(e.material));break;case"LineLoop":o=new CS(l(e.geometry),c(e.material));break;case"LineSegments":o=new wS(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":o=new RS(l(e.geometry),c(e.material));break;case"Sprite":o=new Sb(c(e.material));break;case"Group":o=new Yx;break;case"Bone":o=new Ub;break;default:o=new $g}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(o.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.quaternion&&o.quaternion.fromArray(e.quaternion),void 0!==e.scale&&o.scale.fromArray(e.scale)),void 0!==e.up&&o.up.fromArray(e.up),void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(o.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(o.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(o.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&o.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(o.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.frustumCulled&&(o.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(o.renderOrder=e.renderOrder),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.layers&&(o.layers.mask=e.layers),void 0!==e.children){const s=e.children;for(let e=0;e<s.length;e++)o.add(this.parseObject(s[e],t,n,r,i))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];o.animations.push(i[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(o.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=o.getObjectByProperty("uuid",n.object);void 0!==r&&o.addLevel(r,n.distance,n.hysteresis)}}return o}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}},ObjectSpaceNormalMap:1,OctahedronGeometry:Gw,OneFactor:201,OneMinusConstantAlphaFactor:214,OneMinusConstantColorFactor:212,OneMinusDstAlphaFactor:207,OneMinusDstColorFactor:209,OneMinusSrcAlphaFactor:up,OneMinusSrcColorFactor:203,OrthographicCamera:Ry,P3Primaries:Yf,PCFShadowMap:rp,PCFSoftShadowMap:ip,PMREMGenerator:Hy,Path:ew,PerspectiveCamera:oy,Plane:py,PlaneGeometry:_y,PlaneHelper:class extends xS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16776960,r=new kv;r.setAttribute("position",new Cv([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),r.computeBoundingSphere(),super(r,new fS({color:n,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const i=new kv;i.setAttribute("position",new Cv([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),i.computeBoundingSphere(),this.add(new Zv(i,new pv({color:n,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}},PointLight:KC,PointLightHelper:class extends Zv{constructor(e,t,n){super(new Yw(t,4,2),new pv({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},Points:RS,PointsMaterial:AS,PolarGridHelper:class extends wS{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4473924,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8947848;i=new cv(i),o=new cv(o);const s=[],a=[];if(t>1)for(let n=0;n<t;n++){const r=n/t*(2*Math.PI),l=Math.sin(r)*e,c=Math.cos(r)*e;s.push(0,0,0),s.push(l,0,c);const u=1&n?i:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(let t=0;t<n;t++){const l=1&t?i:o,c=e-e/n*t;for(let e=0;e<r;e++){let t=e/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c;s.push(n,0,i),a.push(l.r,l.g,l.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c,s.push(n,0,i),a.push(l.r,l.g,l.b)}}const l=new kv;l.setAttribute("position",new Cv(s,3)),l.setAttribute("color",new Cv(a,3));super(l,new fS({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},PolyhedronGeometry:sw,PositionalAudio:class extends wA{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(CA,AA,MA),TA.set(0,0,1).applyQuaternion(AA);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(CA.x,e),t.positionY.linearRampToValueAtTime(CA.y,e),t.positionZ.linearRampToValueAtTime(CA.z,e),t.orientationX.linearRampToValueAtTime(TA.x,e),t.orientationY.linearRampToValueAtTime(TA.y,e),t.orientationZ.linearRampToValueAtTime(TA.z,e)}else t.setPosition(CA.x,CA.y,CA.z),t.setOrientation(TA.x,TA.y,TA.z)}},PropertyBinding:BA,PropertyMixer:EA,QuadraticBezierCurve:qS,QuadraticBezierCurve3:ZS,Quaternion:jm,QuaternionKeyframeTrack:TC,QuaternionLinearInterpolant:MC,RED_GREEN_RGTC2_Format:Ef,RED_RGTC1_Format:36283,REVISION:np,RGBADepthPacking:3201,RGBAFormat:$p,RGBAIntegerFormat:Jp,RGBA_ASTC_10x10_Format:bf,RGBA_ASTC_10x5_Format:yf,RGBA_ASTC_10x6_Format:_f,RGBA_ASTC_10x8_Format:xf,RGBA_ASTC_12x10_Format:Sf,RGBA_ASTC_12x12_Format:wf,RGBA_ASTC_4x4_Format:uf,RGBA_ASTC_5x4_Format:df,RGBA_ASTC_5x5_Format:hf,RGBA_ASTC_6x5_Format:pf,RGBA_ASTC_6x6_Format:ff,RGBA_ASTC_8x5_Format:mf,RGBA_ASTC_8x6_Format:gf,RGBA_ASTC_8x8_Format:vf,RGBA_BPTC_Format:Cf,RGBA_ETC2_EAC_Format:cf,RGBA_PVRTC_2BPPV1_Format:sf,RGBA_PVRTC_4BPPV1_Format:of,RGBA_S3TC_DXT1_Format:Qp,RGBA_S3TC_DXT3_Format:ef,RGBA_S3TC_DXT5_Format:tf,RGB_BPTC_SIGNED_Format:Af,RGB_BPTC_UNSIGNED_Format:Mf,RGB_ETC1_Format:af,RGB_ETC2_Format:lf,RGB_PVRTC_2BPPV1_Format:rf,RGB_PVRTC_4BPPV1_Format:nf,RGB_S3TC_DXT1_Format:Kp,RGFormat:1030,RGIntegerFormat:Zp,RawShaderMaterial:rC,Ray:xg,Raycaster:class{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;this.ray=new xg(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new kg,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return HA(e,this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),t.sort(zA),t}intersectObjects(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let r=0,i=e.length;r<i;r++)HA(e[r],this,n,t);return n.sort(zA),n}},Rec709Primaries:Xf,RectAreaLight:nA,RedFormat:1028,RedIntegerFormat:qp,ReinhardToneMapping:gp,RenderTarget:zm,RepeatWrapping:Ep,ReplaceStencilOp:7681,ReverseSubtractEquation:102,RingGeometry:$w,SIGNED_RED_GREEN_RGTC2_Format:Lf,SIGNED_RED_RGTC1_Format:Tf,SRGBColorSpace:Hf,SRGBTransfer:$f,Scene:ib,ShaderChunk:xy,ShaderLib:Sy,ShaderMaterial:ry,ShadowMaterial:nC,Shape:pw,ShapeGeometry:Xw,ShapePath:class{constructor(){this.type="ShapePath",this.color=new cv,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ew,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],s=t[o],a=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],a=-a,s=t[i],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-a*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r}const n=Nw.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,o,s;const a=[];if(1===r.length)return o=r[0],s=new pw,s.curves=o.curves,a.push(s),a;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],u=[];let d,h,p=[],f=0;u[f]=void 0,p[f]=[];for(let t=0,s=r.length;t<s;t++)o=r[t],d=o.getPoints(),i=n(d),i=e?!i:i,i?(!l&&u[f]&&f++,u[f]={s:new pw,p:d},u[f].s.curves=o.curves,l&&f++,p[f]=[]):p[f].push({h:o,p:d[0]});if(!u[0])return function(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new pw;i.curves=r.curves,t.push(i)}return t}(r);if(u.length>1){let e=!1,n=0;for(let e=0,t=u.length;e<t;e++)c[e]=[];for(let r=0,i=u.length;r<i;r++){const i=p[r];for(let o=0;o<i.length;o++){const s=i[o];let a=!0;for(let i=0;i<u.length;i++)t(s.p,u[i].p)&&(r!==i&&n++,a?(a=!1,c[i].push(s)):e=!0);a&&c[r].push(s)}}n>0&&!1===e&&(p=c)}for(let e=0,t=u.length;e<t;e++){s=u[e].s,a.push(s),h=p[e];for(let e=0,t=h.length;e<t;e++)s.holes.push(h[e].h)}return a}},ShapeUtils:Nw,ShortType:1011,Skeleton:Hb,SkeletonHelper:class extends wS{constructor(e){const t=qA(e),n=new kv,r=[],i=[],o=new cv(0,0,1),s=new cv(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(s.r,s.g,s.b))}n.setAttribute("position",new Cv(r,3)),n.setAttribute("color",new Cv(i,3));super(n,new fS({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");YA.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(XA.multiplyMatrices(YA,i.matrixWorld),$A.setFromMatrixPosition(XA),r.setXYZ(n,$A.x,$A.y,$A.z),XA.multiplyMatrices(YA,i.parent.matrixWorld),$A.setFromMatrixPosition(XA),r.setXYZ(n+1,$A.x,$A.y,$A.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}},SkinnedMesh:Db,Source:Bm,Sphere:hg,SphereGeometry:Yw,Spherical:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(am(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}},SphericalHarmonics3:rA,SplineCurve:JS,SpotLight:XC,SpotLightHelper:class extends $g{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new kv,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const i=e/n*Math.PI*2,o=t/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(o),Math.sin(o),1)}n.setAttribute("position",new Cv(r,3));const i=new fS({fog:!1,toneMapped:!1});this.cone=new wS(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),GA.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(GA),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},Sprite:Sb,SpriteMaterial:lb,SrcAlphaFactor:cp,SrcAlphaSaturateFactor:210,SrcColorFactor:202,StaticCopyUsage:35046,StaticDrawUsage:Zf,StaticReadUsage:35045,StereoCamera:class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new oy,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new oy,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,gA.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(im*t.fov*.5)/t.zoom;let o,s;mA.elements[12]=-n,fA.elements[12]=n,o=-i*t.aspect+r,s=i*t.aspect+r,gA.elements[0]=2*t.near/(s-o),gA.elements[8]=(s+o)/(s-o),this.cameraL.projectionMatrix.copy(gA),o=-i*t.aspect-r,s=i*t.aspect-r,gA.elements[0]=2*t.near/(s-o),gA.elements[8]=(s+o)/(s-o),this.cameraR.projectionMatrix.copy(gA)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(mA),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(fA)}},StreamCopyUsage:35042,StreamDrawUsage:35040,StreamReadUsage:35041,StringKeyframeTrack:EC,SubtractEquation:101,SubtractiveBlending:3,TOUCH:{ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},TangentSpaceNormalMap:0,TetrahedronGeometry:qw,Texture:Fm,TextureLoader:class extends BC{constructor(e){super(e)}load(e,t,n,r){const i=new Fm,o=new NC(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}},TorusGeometry:Zw,TorusKnotGeometry:Jw,Triangle:iv,TriangleFanDrawMode:2,TriangleStripDrawMode:1,TrianglesDrawMode:0,TubeGeometry:Kw,TwoPassDoubleSide:2,UVMapping:Sp,Uint16BufferAttribute:Sv,Uint32BufferAttribute:wv,Uint8BufferAttribute:class extends bv{constructor(e,t,n){super(new Uint8Array(e),t,n)}},Uint8ClampedBufferAttribute:class extends bv{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}},Uniform:FA,UniformsGroup:class extends tm{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:NA++}),this.name="",this.usage=Zf,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return-1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let e=0,n=t.length;e<n;e++)this.uniforms.push(t[e].clone());return this}clone(){return(new this.constructor).copy(this)}},UniformsLib:by,UniformsUtils:ny,UnsignedByteType:Up,UnsignedInt248Type:Gp,UnsignedIntType:zp,UnsignedShort4444Type:Wp,UnsignedShort5551Type:jp,UnsignedShortType:Fp,VSMShadowMap:op,Vector2:mm,Vector3:Gm,Vector4:Nm,VectorKeyframeTrack:LC,VideoTexture:class extends Fm{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.isVideoTexture=!0,this.minFilter=void 0!==o?o:Op,this.magFilter=void 0!==i?i:Op,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},WebGL1Renderer:tb,WebGL3DRenderTarget:class extends Hm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new Wm(null,e,t,n),this.texture.isRenderTargetTexture=!0}},WebGLArrayRenderTarget:class extends Hm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Vm(null,e,t,n),this.texture.isRenderTargetTexture=!0}},WebGLCoordinateSystem:Qf,WebGLCubeRenderTarget:cy,WebGLMultipleRenderTargets:class extends Hm{constructor(){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),this.isWebGLMultipleRenderTargets=!0;const t=this.texture;this.texture=[];for(let n=0;n<e;n++)this.texture[n]=t.clone(),this.texture[n].isRenderTargetTexture=!0}setSize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}},WebGLRenderTarget:Hm,WebGLRenderer:eb,WebGLUtils:$x,WebGPUCoordinateSystem:em,WireframeGeometry:Qw,WrapAroundEnding:Bf,ZeroCurvatureEnding:If,ZeroFactor:200,ZeroSlopeEnding:Of,ZeroStencilOp:0,_SRGBAFormat:Kf,createCanvasElement:Sm,sRGBEncoding:Nf});class hM extends $g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.createElement("div");super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new mm(.5,.5),this.addEventListener("removed",(function(){this.traverse((function(e){e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const pM=new Gm,fM=new bg,mM=new bg,gM=new Gm,vM=new Gm;class yM{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this;let n,r,i,o;const s={objects:new WeakMap},a=void 0!==e.element?e.element:document.createElement("div");function l(e,n,r){if(e.isCSS2DObject){pM.setFromMatrixPosition(e.matrixWorld),pM.applyMatrix4(mM);const l=!0===e.visible&&pM.z>=-1&&pM.z<=1&&!0===e.layers.test(r.layers);if(e.element.style.display=!0===l?"":"none",!0===l){e.onBeforeRender(t,n,r);const s=e.element;s.style.transform="translate("+-100*e.center.x+"%,"+-100*e.center.y+"%)translate("+(pM.x*i+i)+"px,"+(-pM.y*o+o)+"px)",s.parentNode!==a&&a.appendChild(s),e.onAfterRender(t,n,r)}const u={distanceToCameraSquared:c(r,e)};s.objects.set(e,u)}for(let t=0,i=e.children.length;t<i;t++)l(e.children[t],n,r)}function c(e,t){return gM.setFromMatrixPosition(e.matrixWorld),vM.setFromMatrixPosition(t.matrixWorld),gM.distanceToSquared(vM)}a.style.overflow="hidden",this.domElement=a,this.getSize=function(){return{width:n,height:r}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),fM.copy(t.matrixWorldInverse),mM.multiplyMatrices(t.projectionMatrix,fM),l(e,e,t),function(e){const t=function(e){const t=[];return e.traverse((function(e){e.isCSS2DObject&&t.push(e)})),t}(e).sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return s.objects.get(e).distanceToCameraSquared-s.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,r=t.length;e<r;e++)t[e].element.style.zIndex=n-e}(e)},this.setSize=function(e,t){n=e,r=t,i=n/2,o=r/2,a.style.width=e+"px",a.style.height=t+"px"}}}
|
|
20
|
+
/*!
|
|
21
|
+
* camera-controls
|
|
22
|
+
* https://github.com/yomotsu/camera-controls
|
|
23
|
+
* (c) 2017 @yomotsu
|
|
24
|
+
* Released under the MIT License.
|
|
25
|
+
*/const _M=1,xM=2,bM=4,SM=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),wM=0,CM=1,AM=-1;function MM(e){return e.isPerspectiveCamera}function TM(e){return e.isOrthographicCamera}const EM=2*Math.PI,LM=Math.PI/2,RM=1e-5,PM=Math.PI/180;function kM(e,t,n){return Math.max(t,Math.min(n,e))}function IM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:RM;return Math.abs(e)<t}function OM(e,t){return IM(e-t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:RM)}function BM(e,t){return Math.round(e/t)*t}function DM(e){return isFinite(e)?e:e<0?-Number.MAX_VALUE:Number.MAX_VALUE}function UM(e){return Math.abs(e)<Number.MAX_VALUE?e:e*(1/0)}function FM(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,o=arguments.length>5?arguments[5]:void 0;const s=2/(r=Math.max(1e-4,r)),a=s*o,l=1/(1+a+.48*a*a+.235*a*a*a);let c=e-t;const u=t,d=i*r;c=kM(c,-d,d),t=e-c;const h=(n.value+s*c)*o;n.value=(n.value-s*h)*l;let p=t+(c+h)*l;return u-e>0==p>u&&(p=u,n.value=(p-u)/o),p}function NM(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;const a=2/(r=Math.max(1e-4,r)),l=a*o,c=1/(1+l+.48*l*l+.235*l*l*l);let u=t.x,d=t.y,h=t.z,p=e.x-u,f=e.y-d,m=e.z-h;const g=u,v=d,y=h,_=i*r,x=p*p+f*f+m*m;if(x>_*_){const e=Math.sqrt(x);p=p/e*_,f=f/e*_,m=m/e*_}u=e.x-p,d=e.y-f,h=e.z-m;const b=(n.x+a*p)*o,S=(n.y+a*f)*o,w=(n.z+a*m)*o;n.x=(n.x-a*b)*c,n.y=(n.y-a*S)*c,n.z=(n.z-a*w)*c,s.x=u+(p+b)*c,s.y=d+(f+S)*c,s.z=h+(m+w)*c;const C=g-e.x,A=v-e.y,M=y-e.z;return C*(s.x-g)+A*(s.y-v)+M*(s.z-y)>0&&(s.x=g,s.y=v,s.z=y,n.x=(s.x-g)/o,n.y=(s.y-v)/o,n.z=(s.z-y)/o),s}function zM(e,t){t.set(0,0),e.forEach((e=>{t.x+=e.clientX,t.y+=e.clientY})),t.x/=e.length,t.y/=e.length}function HM(e,t){return!!TM(e)&&(console.warn(`${t} is not supported in OrthographicCamera`),!0)}class VM{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}removeAllEventListeners(e){e?Array.isArray(this._listeners[e])&&(this._listeners[e].length=0):this._listeners={}}dispatchEvent(e){const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e)}}}const WM=1/8,jM="undefined"!=typeof window,GM=jM&&/Mac/.test(navigator.platform),$M=!(jM&&"PointerEvent"in window);let XM,YM,qM,ZM,JM,KM,QM,eT,tT,nT,rT,iT,oT,sT,aT,lT,cT,uT,dT,hT,pT,fT,mT;class gT extends VM{static install(e){XM=e.THREE,YM=Object.freeze(new XM.Vector3(0,0,0)),qM=Object.freeze(new XM.Vector3(0,1,0)),ZM=Object.freeze(new XM.Vector3(0,0,1)),JM=new XM.Vector2,KM=new XM.Vector3,QM=new XM.Vector3,eT=new XM.Vector3,tT=new XM.Vector3,nT=new XM.Vector3,rT=new XM.Vector3,iT=new XM.Vector3,oT=new XM.Vector3,sT=new XM.Vector3,aT=new XM.Spherical,lT=new XM.Spherical,cT=new XM.Box3,uT=new XM.Box3,dT=new XM.Sphere,hT=new XM.Quaternion,pT=new XM.Quaternion,fT=new XM.Matrix4,mT=new XM.Raycaster}static get ACTION(){return SM}constructor(e,t){super(),this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.minDistance=Number.EPSILON,this.maxDistance=1/0,this.infinityDolly=!1,this.minZoom=.01,this.maxZoom=1/0,this.smoothTime=.25,this.draggingSmoothTime=.125,this.maxSpeed=1/0,this.azimuthRotateSpeed=1,this.polarRotateSpeed=1,this.dollySpeed=1,this.dollyDragInverted=!1,this.truckSpeed=2,this.dollyToCursor=!1,this.dragToOffset=!1,this.verticalDragToForward=!1,this.boundaryFriction=0,this.restThreshold=.01,this.colliderMeshes=[],this.cancel=()=>{},this._enabled=!0,this._state=SM.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=wM,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new XM.Vector3,this._focalOffsetVelocity=new XM.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,n)=>{let r,i;if(MM(this._camera)){const n=KM.copy(this._camera.position).sub(this._target),o=this._camera.getEffectiveFOV()*PM,s=n.length()*Math.tan(.5*o);r=this.truckSpeed*e*s/this._elementRect.height,i=this.truckSpeed*t*s/this._elementRect.height}else{if(!TM(this._camera))return;{const n=this._camera;r=e*(n.right-n.left)/n.zoom/this._elementRect.width,i=t*(n.top-n.bottom)/n.zoom/this._elementRect.height}}this.verticalDragToForward?(n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(r,0,!0),this.forward(-i,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+r,this._focalOffsetEnd.y+i,this._focalOffsetEnd.z,!0):this.truck(r,i,!0)},this._rotateInternal=(e,t)=>{const n=EM*this.azimuthRotateSpeed*e/this._elementRect.height,r=EM*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,r,!0)},this._dollyInternal=(e,t,n)=>{const r=Math.pow(.95,-e*this.dollySpeed),i=this._sphericalEnd.radius,o=this._sphericalEnd.radius*r,s=kM(o,this.minDistance,this.maxDistance),a=s-o;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(o,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(a,!0),this._dollyToNoClamp(s,!0)):this._dollyToNoClamp(s,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?o:s)-i,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)},this._zoomInternal=(e,t,n)=>{const r=Math.pow(.95,e*this.dollySpeed),i=this._zoom,o=this._zoom*r;this.zoomTo(o,!0),this.dollyToCursor&&(this._changedZoom+=o-i,this._dollyControlCoord.set(t,n))},void 0===XM&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=(new XM.Quaternion).setFromUnitVectors(this._camera.up,qM),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=SM.NONE,this._target=new XM.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new XM.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=(new XM.Spherical).setFromVector3(KM.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new XM.Vector3,new XM.Vector3,new XM.Vector3,new XM.Vector3],this._updateNearPlaneCorners(),this._boundary=new XM.Box3(new XM.Vector3(-1/0,-1/0,-1/0),new XM.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new XM.Vector2,this.mouseButtons={left:SM.ROTATE,middle:SM.DOLLY,right:SM.TRUCK,wheel:MM(this._camera)?SM.DOLLY:TM(this._camera)?SM.ZOOM:SM.NONE},this.touches={one:SM.TOUCH_ROTATE,two:MM(this._camera)?SM.TOUCH_DOLLY_TRUCK:TM(this._camera)?SM.TOUCH_ZOOM_TRUCK:SM.NONE,three:SM.TOUCH_TRUCK};const n=new XM.Vector2,r=new XM.Vector2,i=new XM.Vector2,o=e=>{if(!this._enabled||!this._domElement)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||r<this._interactiveArea.top||r>this._interactiveArea.bottom)return}const t="mouse"!==e.pointerType?null:(e.buttons&_M)===_M?_M:(e.buttons&bM)===bM?bM:(e.buttons&xM)===xM?xM:null;if(null!==t){const e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&_M)===_M&&this._lockedPointer)return;const n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",c),this._isDragging=!0,f(e)},s=e=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||r<this._interactiveArea.top||r>this._interactiveArea.bottom)return}const t=(e.buttons&_M)===_M?_M:(e.buttons&bM)===bM?bM:(e.buttons&xM)===xM?xM:null;if(null!==t){const e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}const n={pointerId:1,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:(e.buttons&_M)===_M?_M:(e.buttons&bM)===_M?bM:(e.buttons&xM)===_M?xM:null};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",u),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",u),this._isDragging=!0,f(e)},a=e=>{e.cancelable&&e.preventDefault();const t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&_M)===_M)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(e.buttons&bM)===bM&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(e.buttons&xM)===xM&&(this._state=this._state|this.mouseButtons.right);m()}},l=e=>{const t=this._lockedPointer||this._findPointerById(1);t&&(t.clientX=e.clientX,t.clientY=e.clientY,t.deltaX=e.movementX,t.deltaY=e.movementY,this._state=0,(this._lockedPointer||(e.buttons&_M)===_M)&&(this._state=this._state|this.mouseButtons.left),(e.buttons&bM)===bM&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&xM)===xM&&(this._state=this._state|this.mouseButtons.right),m())},c=e=>{const t=this._findPointerById(e.pointerId);if(!t||t!==this._lockedPointer){if(t&&this._disposePointer(t),"touch"===e.pointerType)switch(this._activePointers.length){case 0:this._state=SM.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=SM.NONE;g()}},u=()=>{const e=this._findPointerById(1);e&&e===this._lockedPointer||(e&&this._disposePointer(e),this._state=SM.NONE,g())};let d=-1;const h=e=>{if(!this._domElement)return;if(!this._enabled||this.mouseButtons.wheel===SM.NONE)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,r=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||r<this._interactiveArea.top||r>this._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===SM.ROTATE||this.mouseButtons.wheel===SM.TRUCK){const e=performance.now();d-e<1e3&&this._getClientRect(this._elementRect),d=e}const t=GM?-1:-3,n=1===e.deltaMode?e.deltaY/t:e.deltaY/(10*t),r=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,i=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case SM.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case SM.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case SM.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case SM.DOLLY:this._dollyInternal(-n,r,i),this._isUserControllingDolly=!0;break;case SM.ZOOM:this._zoomInternal(-n,r,i),this._isUserControllingZoom=!0}this.dispatchEvent({type:"control"})},p=e=>{if(this._domElement&&this._enabled){if(this.mouseButtons.right===gT.ACTION.NONE){const t=e instanceof PointerEvent?e.pointerId:(MouseEvent,0),n=this._findPointerById(t);return n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mousemove",l),void this._domElement.ownerDocument.removeEventListener("mouseup",u)}e.preventDefault()}},f=e=>{if(!this._enabled)return;zM(this._activePointers,JM),this._getClientRect(this._elementRect),n.copy(JM),r.copy(JM);if(this._activePointers.length>=2){const e=JM.x-this._activePointers[1].clientX,t=JM.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);i.set(0,n);const o=.5*(this._activePointers[0].clientX+this._activePointers[1].clientX),s=.5*(this._activePointers[0].clientY+this._activePointers[1].clientY);r.set(o,s)}if(this._state=0,e)if("pointerType"in e&&"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._lockedPointer||(e.buttons&_M)!==_M||(this._state=this._state|this.mouseButtons.left),(e.buttons&bM)===bM&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&xM)===xM&&(this._state=this._state|this.mouseButtons.right);else this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);(this._state&SM.ROTATE)!==SM.ROTATE&&(this._state&SM.TOUCH_ROTATE)!==SM.TOUCH_ROTATE&&(this._state&SM.TOUCH_DOLLY_ROTATE)!==SM.TOUCH_DOLLY_ROTATE&&(this._state&SM.TOUCH_ZOOM_ROTATE)!==SM.TOUCH_ZOOM_ROTATE||(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),(this._state&SM.TRUCK)!==SM.TRUCK&&(this._state&SM.TOUCH_TRUCK)!==SM.TOUCH_TRUCK&&(this._state&SM.TOUCH_DOLLY_TRUCK)!==SM.TOUCH_DOLLY_TRUCK&&(this._state&SM.TOUCH_ZOOM_TRUCK)!==SM.TOUCH_ZOOM_TRUCK||(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),(this._state&SM.DOLLY)!==SM.DOLLY&&(this._state&SM.TOUCH_DOLLY)!==SM.TOUCH_DOLLY&&(this._state&SM.TOUCH_DOLLY_TRUCK)!==SM.TOUCH_DOLLY_TRUCK&&(this._state&SM.TOUCH_DOLLY_OFFSET)!==SM.TOUCH_DOLLY_OFFSET&&(this._state&SM.TOUCH_DOLLY_ROTATE)!==SM.TOUCH_DOLLY_ROTATE||(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),(this._state&SM.ZOOM)!==SM.ZOOM&&(this._state&SM.TOUCH_ZOOM)!==SM.TOUCH_ZOOM&&(this._state&SM.TOUCH_ZOOM_TRUCK)!==SM.TOUCH_ZOOM_TRUCK&&(this._state&SM.TOUCH_ZOOM_OFFSET)!==SM.TOUCH_ZOOM_OFFSET&&(this._state&SM.TOUCH_ZOOM_ROTATE)!==SM.TOUCH_ZOOM_ROTATE||(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),(this._state&SM.OFFSET)!==SM.OFFSET&&(this._state&SM.TOUCH_OFFSET)!==SM.TOUCH_OFFSET&&(this._state&SM.TOUCH_DOLLY_OFFSET)!==SM.TOUCH_DOLLY_OFFSET&&(this._state&SM.TOUCH_ZOOM_OFFSET)!==SM.TOUCH_ZOOM_OFFSET||(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},m=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,zM(this._activePointers,JM);const e=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:r.x-JM.x,o=e?-e.deltaY:r.y-JM.y;if(r.copy(JM),(this._state&SM.ROTATE)!==SM.ROTATE&&(this._state&SM.TOUCH_ROTATE)!==SM.TOUCH_ROTATE&&(this._state&SM.TOUCH_DOLLY_ROTATE)!==SM.TOUCH_DOLLY_ROTATE&&(this._state&SM.TOUCH_ZOOM_ROTATE)!==SM.TOUCH_ZOOM_ROTATE||(this._rotateInternal(t,o),this._isUserControllingRotate=!0),(this._state&SM.DOLLY)===SM.DOLLY||(this._state&SM.ZOOM)===SM.ZOOM){const e=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,r=this.dollyDragInverted?-1:1;(this._state&SM.DOLLY)===SM.DOLLY?(this._dollyInternal(r*o*WM,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(r*o*WM,e,t),this._isUserControllingZoom=!0)}if((this._state&SM.TOUCH_DOLLY)===SM.TOUCH_DOLLY||(this._state&SM.TOUCH_ZOOM)===SM.TOUCH_ZOOM||(this._state&SM.TOUCH_DOLLY_TRUCK)===SM.TOUCH_DOLLY_TRUCK||(this._state&SM.TOUCH_ZOOM_TRUCK)===SM.TOUCH_ZOOM_TRUCK||(this._state&SM.TOUCH_DOLLY_OFFSET)===SM.TOUCH_DOLLY_OFFSET||(this._state&SM.TOUCH_ZOOM_OFFSET)===SM.TOUCH_ZOOM_OFFSET||(this._state&SM.TOUCH_DOLLY_ROTATE)===SM.TOUCH_DOLLY_ROTATE||(this._state&SM.TOUCH_ZOOM_ROTATE)===SM.TOUCH_ZOOM_ROTATE){const e=JM.x-this._activePointers[1].clientX,t=JM.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),o=i.y-n;i.set(0,n);const s=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,a=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&SM.TOUCH_DOLLY)===SM.TOUCH_DOLLY||(this._state&SM.TOUCH_DOLLY_ROTATE)===SM.TOUCH_DOLLY_ROTATE||(this._state&SM.TOUCH_DOLLY_TRUCK)===SM.TOUCH_DOLLY_TRUCK||(this._state&SM.TOUCH_DOLLY_OFFSET)===SM.TOUCH_DOLLY_OFFSET?(this._dollyInternal(o*WM,s,a),this._isUserControllingDolly=!0):(this._zoomInternal(o*WM,s,a),this._isUserControllingZoom=!0)}(this._state&SM.TRUCK)!==SM.TRUCK&&(this._state&SM.TOUCH_TRUCK)!==SM.TOUCH_TRUCK&&(this._state&SM.TOUCH_DOLLY_TRUCK)!==SM.TOUCH_DOLLY_TRUCK&&(this._state&SM.TOUCH_ZOOM_TRUCK)!==SM.TOUCH_ZOOM_TRUCK||(this._truckInternal(t,o,!1),this._isUserControllingTruck=!0),(this._state&SM.OFFSET)!==SM.OFFSET&&(this._state&SM.TOUCH_OFFSET)!==SM.TOUCH_OFFSET&&(this._state&SM.TOUCH_DOLLY_OFFSET)!==SM.TOUCH_DOLLY_OFFSET&&(this._state&SM.TOUCH_ZOOM_OFFSET)!==SM.TOUCH_ZOOM_OFFSET||(this._truckInternal(t,o,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},g=()=>{zM(this._activePointers,JM),r.copy(JM),this._dragNeedsUpdate=!1,(0===this._activePointers.length||1===this._activePointers.length&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),0===this._activePointers.length&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mouseup",u),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{this._enabled&&this._domElement&&(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",v),this._domElement.ownerDocument.addEventListener("pointerlockerror",y),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",c),f())},this.unlockPointer=()=>{null!==this._lockedPointer&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",v),this._domElement.ownerDocument.removeEventListener("pointerlockerror",y))};const v=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},y=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),$M&&this._domElement.addEventListener("mousedown",s),this._domElement.addEventListener("pointercancel",c),this._domElement.addEventListener("wheel",h,{passive:!1}),this._domElement.addEventListener("contextmenu",p)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",s),this._domElement.removeEventListener("pointercancel",c),this._domElement.removeEventListener("wheel",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",p),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",c),this._domElement.ownerDocument.removeEventListener("mouseup",u),this._domElement.ownerDocument.removeEventListener("pointerlockchange",v),this._domElement.ownerDocument.removeEventListener("pointerlockerror",y))},this.cancel=()=>{this._state!==SM.NONE&&(this._state=SM.NONE,this._activePointers.length=0,g())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=kM(e.width,0,1),this._interactiveArea.height=kM(e.height,0,1),this._interactiveArea.x=kM(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=kM(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._isUserControllingRotate=!1;const r=kM(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=kM(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!n||OM(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&OM(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._isUserControllingDolly=!1,this._lastDollyDirection=wM,this._changedDolly=0,this._dollyToNoClamp(kM(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const t=this._collisionTest(),r=OM(t,this._spherical.radius);if(!(n>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const r=!t||OM(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(r)}dollyInFixed(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._targetEnd.add(this._getCameraDirection(tT).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||OM(this._target.x,this._targetEnd.x,this.restThreshold)&&OM(this._target.y,this._targetEnd.y,this.restThreshold)&&OM(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._isUserControllingZoom=!1,this._zoomEnd=kM(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||OM(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._camera.updateMatrix(),nT.setFromMatrixColumn(this._camera.matrix,0),rT.setFromMatrixColumn(this._camera.matrix,1),nT.multiplyScalar(e),rT.multiplyScalar(-t);const r=KM.copy(nT).add(rT),i=QM.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,n)}forward(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];KM.setFromMatrixColumn(this._camera.matrix,0),KM.crossVectors(this._camera.up,KM),KM.multiplyScalar(e);const n=QM.copy(this._targetEnd).add(KM);return this.moveTo(n.x,n.y,n.z,t)}elevate(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return KM.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+KM.x,this._targetEnd.y+KM.y,this._targetEnd.z+KM.z,t)}moveTo(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._isUserControllingTruck=!1;const i=KM.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);const o=!r||OM(this._target.x,this._targetEnd.x,this.restThreshold)&&OM(this._target.y,this._targetEnd.y,this.restThreshold)&&OM(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=KM.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(i.x,i.y,i.z,r)}fitToBox(e,t){let{cover:n=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:o=0,paddingTop:s=0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=[],l=e.isBox3?cT.copy(e):cT.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const c=BM(this._sphericalEnd.theta,LM),u=BM(this._sphericalEnd.phi,LM);a.push(this.rotateTo(c,u,t));const d=KM.setFromSpherical(this._sphericalEnd).normalize(),h=hT.setFromUnitVectors(d,ZM),p=OM(Math.abs(d.y),1);p&&h.multiply(pT.setFromAxisAngle(qM,c)),h.multiply(this._yAxisUpSpaceInverse);const f=uT.makeEmpty();QM.copy(l.min).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.min).setX(l.max.x).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.min).setY(l.max.y).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.max).setZ(l.min.z).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.min).setZ(l.max.z).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.max).setY(l.min.y).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.max).setX(l.min.x).applyQuaternion(h),f.expandByPoint(QM),QM.copy(l.max).applyQuaternion(h),f.expandByPoint(QM),f.min.x-=r,f.min.y-=o,f.max.x+=i,f.max.y+=s,h.setFromUnitVectors(ZM,d),p&&h.premultiply(pT.invert()),h.premultiply(this._yAxisUpSpace);const m=f.getSize(KM),g=f.getCenter(QM).applyQuaternion(h);if(MM(this._camera)){const e=this.getDistanceToFitBox(m.x,m.y,m.z,n);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.dollyTo(e,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(TM(this._camera)){const e=this._camera,r=e.right-e.left,i=e.top-e.bottom,o=n?Math.max(r/m.x,i/m.y):Math.min(r/m.x,i/m.y);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.zoomTo(o,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const n=[],r=e instanceof XM.Sphere?dT.copy(e):gT.createBoundingSphere(e,dT);if(n.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),MM(this._camera)){const e=this.getDistanceToFitSphere(r.radius);n.push(this.dollyTo(e,t))}else if(TM(this._camera)){const e=this._camera.right-this._camera.left,i=this._camera.top-this._camera.bottom,o=2*r.radius,s=Math.min(e/o,i/o);n.push(this.zoomTo(s,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,r,i,o){let s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=wM,this._changedDolly=0;const a=QM.set(r,i,o),l=KM.set(e,t,n);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,s||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const c=!s||OM(this._target.x,this._targetEnd.x,this.restThreshold)&&OM(this._target.y,this._targetEnd.y,this.restThreshold)&&OM(this._target.z,this._targetEnd.z,this.restThreshold)&&OM(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&OM(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&OM(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(c)}lerpLookAt(e,t,n,r,i,o,s,a,l,c,u,d,h){let p=arguments.length>13&&void 0!==arguments[13]&&arguments[13];this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=wM,this._changedDolly=0;const f=KM.set(r,i,o),m=QM.set(e,t,n);aT.setFromVector3(m.sub(f).applyQuaternion(this._yAxisUpSpace));const g=eT.set(c,u,d),v=QM.set(s,a,l);lT.setFromVector3(v.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(f.lerp(g,h));const y=lT.theta-aT.theta,_=lT.phi-aT.phi,x=lT.radius-aT.radius;this._sphericalEnd.set(aT.radius+x*h,aT.phi+_*h,aT.theta+y*h),this.normalizeRotations(),this._needsUpdate=!0,p||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const b=!p||OM(this._target.x,this._targetEnd.x,this.restThreshold)&&OM(this._target.y,this._targetEnd.y,this.restThreshold)&&OM(this._target.z,this._targetEnd.z,this.restThreshold)&&OM(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&OM(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&OM(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(b)}setPosition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this.getPosition(KM),o=this.setLookAt(i.x,i.y,i.z,e,t,n,r);return this._sphericalEnd.phi=kM(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);const i=!r||OM(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&OM(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&OM(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),nT.setFromMatrixColumn(this._camera.matrixWorldInverse,0),rT.setFromMatrixColumn(this._camera.matrixWorldInverse,1),iT.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const r=KM.set(e,t,n),i=r.distanceTo(this._camera.position),o=r.sub(this._camera.position);nT.multiplyScalar(o.x),rT.multiplyScalar(o.y),iT.multiplyScalar(o.z),KM.copy(nT).add(rT).add(iT),KM.z=KM.z+i,this.dollyTo(i,!1),this.setFocalOffset(-KM.x,KM.y,-KM.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e)return this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),void(this._needsUpdate=!0);this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,r){null!==e?(this._viewport=this._viewport||new XM.Vector4,"number"==typeof e?this._viewport.set(e,t,n,r):this._viewport.copy(e)):this._viewport=null}getDistanceToFitBox(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(HM(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const i=e/t,o=this._camera.getEffectiveFOV()*PM,s=this._camera.aspect;return.5*((r?i>s:i<s)?t:e/s)/Math.tan(.5*o)+.5*n}getDistanceToFitSphere(e){if(HM(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*PM,n=2*Math.atan(Math.tan(.5*t)*this._camera.aspect),r=1<this._camera.aspect?t:n;return e/Math.sin(.5*r)}getTarget(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(e&&e.isVector3?e:new XM.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(e&&e.isVector3?e:new XM.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(e&&e instanceof XM.Spherical?e:new XM.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(e&&e.isVector3?e:new XM.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){this._sphericalEnd.theta=this._sphericalEnd.theta%EM,this._sphericalEnd.theta<0&&(this._sphericalEnd.theta+=EM),this._spherical.theta+=EM*Math.round((this._sphericalEnd.theta-this._spherical.theta)/EM)}reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!OM(this._camera.up.x,this._cameraUp0.x)||!OM(this._camera.up.y,this._cameraUp0.y)||!OM(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const e=this.getPosition(KM);this.updateCameraUp(),this.setPosition(e.x,e.y,e.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,qM),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=KM.subVectors(this._target,this._camera.position).normalize(),t=QM.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(KM);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,r=this._sphericalEnd.radius-this._spherical.radius,i=oT.subVectors(this._targetEnd,this._target),o=sT.subVectors(this._focalOffsetEnd,this._focalOffset),s=this._zoomEnd-this._zoom;if(IM(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=FM(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,t,1/0,e),this._needsUpdate=!0}if(IM(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=FM(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,t,1/0,e),this._needsUpdate=!0}if(IM(r))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const t=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=FM(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,t,this.maxSpeed,e),this._needsUpdate=!0}if(IM(i.x)&&IM(i.y)&&IM(i.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const t=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;NM(this._target,this._targetEnd,this._targetVelocity,t,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(IM(o.x)&&IM(o.y)&&IM(o.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const t=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;NM(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,t,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(IM(s))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const t=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=FM(this._zoom,this._zoomEnd,this._zoomVelocity,t,1/0,e)}if(this.dollyToCursor)if(MM(this._camera)&&0!==this._changedDolly){const e=this._spherical.radius-this._lastDistance,t=this._camera,n=this._getCameraDirection(tT),r=KM.copy(n).cross(t.up).normalize();0===r.lengthSq()&&(r.x=1);const i=QM.crossVectors(r,n),o=this._sphericalEnd.radius*Math.tan(t.getEffectiveFOV()*PM*.5),s=(this._sphericalEnd.radius-e-this._sphericalEnd.radius)/this._sphericalEnd.radius,a=eT.copy(this._targetEnd).add(r.multiplyScalar(this._dollyControlCoord.x*o*t.aspect)).add(i.multiplyScalar(this._dollyControlCoord.y*o)),l=KM.copy(this._targetEnd).lerp(a,s),c=this._lastDollyDirection===CM&&this._spherical.radius<=this.minDistance,u=this._lastDollyDirection===AM&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(c||u)){this._sphericalEnd.radius-=e,this._spherical.radius-=e;const t=QM.copy(n).multiplyScalar(-e);l.add(t)}this._boundary.clampPoint(l,l);const d=QM.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(d),this._changedDolly-=e,IM(this._changedDolly)&&(this._changedDolly=0)}else if(TM(this._camera)&&0!==this._changedZoom){const e=this._zoom-this._lastZoom,t=this._camera,n=KM.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(t.near+t.far)/(t.near-t.far)).unproject(t),r=QM.set(0,0,-1).applyQuaternion(t.quaternion),i=eT.copy(n).add(r.multiplyScalar(-n.dot(t.up))),o=-(this._zoom-e-this._zoom)/this._zoom,s=this._getCameraDirection(tT),a=this._targetEnd.dot(s),l=KM.copy(this._targetEnd).lerp(i,o),c=l.dot(s),u=s.multiplyScalar(c-a);l.sub(u),this._boundary.clampPoint(l,l);const d=QM.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(d),this._changedZoom-=e,IM(this._changedZoom)&&(this._changedZoom=0)}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const a=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,a),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target);(!IM(this._focalOffset.x)||!IM(this._focalOffset.y)||!IM(this._focalOffset.z))&&(this._camera.updateMatrixWorld(),nT.setFromMatrixColumn(this._camera.matrix,0),rT.setFromMatrixColumn(this._camera.matrix,1),iT.setFromMatrixColumn(this._camera.matrix,2),nT.multiplyScalar(this._focalOffset.x),rT.multiplyScalar(-this._focalOffset.y),iT.multiplyScalar(this._focalOffset.z),KM.copy(nT).add(rT).add(iT),this._camera.position.add(KM)),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),KM.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const l=this._needsUpdate;return l&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):l?(this.dispatchEvent({type:"update"}),IM(t,this.restThreshold)&&IM(n,this.restThreshold)&&IM(r,this.restThreshold)&&IM(i.x,this.restThreshold)&&IM(i.y,this.restThreshold)&&IM(i.z,this.restThreshold)&&IM(o.x,this.restThreshold)&&IM(o.y,this.restThreshold)&&IM(o.z,this.restThreshold)&&IM(s,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!l&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=l,this._needsUpdate=!1,l}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:DM(this.maxDistance),minZoom:this.minZoom,maxZoom:DM(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:DM(this.maxPolarAngle),minAzimuthAngle:DM(this.minAzimuthAngle),maxAzimuthAngle:DM(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,verticalDragToForward:this.verticalDragToForward,target:this._targetEnd.toArray(),position:KM.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=UM(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=UM(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=UM(n.maxPolarAngle),this.minAzimuthAngle=UM(n.minAzimuthAngle),this.maxAzimuthAngle=UM(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this.verticalDragToForward=n.verticalDragToForward,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),aT.setFromVector3(KM.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(aT.theta,aT.phi,t),this.dollyTo(aT.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){this._domElement?console.warn("camera-controls is already connected."):(e.setAttribute("data-camera-controls-version","2.7.3"),this._addAllEventListeners(e),this._getClientRect(this._elementRect))}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find((t=>t.pointerId===e))}_findPointerByMouseButton(e){return this._activePointers.find((t=>t.mouseButton===e))}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const r=t.lengthSq();if(0===r)return e;const i=QM.copy(t).add(e),o=this._boundary.clampPoint(i,eT).sub(i),s=o.lengthSq();if(0===s)return e.add(t);if(s===r)return e;if(0===n)return e.add(t).add(o);{const r=1+n*s/t.dot(o);return e.add(QM.copy(t).multiplyScalar(r)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(MM(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*PM,r=Math.tan(.5*n)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(TM(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,r=e.right*t,i=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(n,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,o,0),this._nearPlaneCorners[3].set(n,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1))return e;if(HM(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(tT);fT.lookAt(YM,t,this._camera.up);for(let n=0;n<4;n++){const r=QM.copy(this._nearPlaneCorners[n]);r.applyMatrix4(fT);const i=eT.addVectors(this._target,r);mT.set(i,t),mT.far=this._spherical.radius+1;const o=mT.intersectObjects(this.colliderMeshes);0!==o.length&&o[0].distance<e&&(e=o[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise((e=>{const t=()=>{this.removeEventListener("rest",t),e()};this.addEventListener("rest",t)})))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new XM.Sphere,n=t.center;cT.makeEmpty(),e.traverseVisible((e=>{e.isMesh&&cT.expandByObject(e)})),cT.getCenter(n);let r=0;return e.traverseVisible((e=>{if(!e.isMesh)return;const t=e,i=t.geometry.clone();i.applyMatrix4(t.matrixWorld);const o=i.attributes.position;for(let e=0,t=o.count;e<t;e++)KM.fromBufferAttribute(o,e),r=Math.max(r,n.distanceToSquared(KM))})),t.radius=Math.sqrt(r),t}}class vT extends BC{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new FC(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(n))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){function t(e,t,n){for(let r=0,i=e.length;r<i;r++)if(e[r]!==t.getUint8(n+r))return!1;return!0}const n=function(e){if("string"==typeof e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=255&e.charCodeAt(n);return t.buffer||t}return e}(e);return function(e){const n=new DataView(e);if(84+50*n.getUint32(80,!0)===n.byteLength)return!0;const r=[115,111,108,105,100];for(let e=0;e<5;e++)if(t(r,n,e))return!1;return!0}(n)?function(e){const t=new DataView(e),n=t.getUint32(80,!0);let r,i,o,s,a,l,c,u,d=!1;for(let e=0;e<70;e++)1129270351==t.getUint32(e,!1)&&82==t.getUint8(e+4)&&61==t.getUint8(e+5)&&(d=!0,s=new Float32Array(3*n*3),a=t.getUint8(e+6)/255,l=t.getUint8(e+7)/255,c=t.getUint8(e+8)/255,u=t.getUint8(e+9)/255);const h=new kv,p=new Float32Array(3*n*3),f=new Float32Array(3*n*3),m=new cv;for(let e=0;e<n;e++){const n=84+50*e,u=t.getFloat32(n,!0),h=t.getFloat32(n+4,!0),g=t.getFloat32(n+8,!0);if(d){const e=t.getUint16(n+48,!0);0==(32768&e)?(r=(31&e)/31,i=(e>>5&31)/31,o=(e>>10&31)/31):(r=a,i=l,o=c)}for(let a=1;a<=3;a++){const l=n+12*a,c=3*e*3+3*(a-1);p[c]=t.getFloat32(l,!0),p[c+1]=t.getFloat32(l+4,!0),p[c+2]=t.getFloat32(l+8,!0),f[c]=u,f[c+1]=h,f[c+2]=g,d&&(m.set(r,i,o).convertSRGBToLinear(),s[c]=m.r,s[c+1]=m.g,s[c+2]=m.b)}}return h.setAttribute("position",new bv(p,3)),h.setAttribute("normal",new bv(f,3)),d&&(h.setAttribute("color",new bv(s,3)),h.hasColors=!0,h.alpha=u),h}(n):function(e){const t=new kv,n=/solid([\s\S]*?)endsolid/g,r=/facet([\s\S]*?)endfacet/g,i=/solid\s(.+)/;let o=0;const s=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,a=new RegExp("vertex"+s+s+s,"g"),l=new RegExp("normal"+s+s+s,"g"),c=[],u=[],d=[],h=new Gm;let p,f=0,m=0,g=0;for(;null!==(p=n.exec(e));){m=g;const e=p[0],n=null!==(p=i.exec(e))?p[1]:"";for(d.push(n);null!==(p=r.exec(e));){let e=0,t=0;const n=p[0];for(;null!==(p=l.exec(n));)h.x=parseFloat(p[1]),h.y=parseFloat(p[2]),h.z=parseFloat(p[3]),t++;for(;null!==(p=a.exec(n));)c.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),u.push(h.x,h.y,h.z),e++,g++;1!==t&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+o),3!==e&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+o),o++}const s=m,v=g-m;t.userData.groupNames=d,t.addGroup(s,v,f),f++}return t.setAttribute("position",new Cv(c,3)),t.setAttribute("normal",new Cv(u,3)),t}("string"!=typeof(r=e)?(new TextDecoder).decode(r):r);var r}}let yT=e=>{let t=(e=>{let t=jn(e,((e,t)=>{let n=(e=>{let t=(e=>{let t=e.geometry;return{cs:t.boundingSphere.center,rd:t.boundingSphere.radius}})(e);return{xmin:t.cs.x-t.rd,xmax:t.cs.x+t.rd,ymin:t.cs.y-t.rd,ymax:t.cs.y+t.rd,zmin:t.cs.z-t.rd,zmax:t.cs.z+t.rd}})(e);return n}));return{xmin:Ds(jn(t,"xmin")),xmax:Fs(jn(t,"xmax")),ymin:Ds(jn(t,"ymin")),ymax:Fs(jn(t,"ymax")),zmin:Ds(jn(t,"zmin")),zmax:Fs(jn(t,"zmax"))}})(e),n=t.xmax-t.xmin,r=t.ymax-t.ymin,i=t.zmax-t.zmin;return{cs:{x:(t.xmax+t.xmin)/2,y:(t.ymax+t.ymin)/2,z:(t.zmax+t.zmin)/2},rd:Fs([n,r,i])}};function _T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_T(Object(n),!0).forEach((function(t){vr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let bT=Math.PI/180,ST=180/Math.PI,wT=e=>e=_l.toRgbString(e);async function CT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ds(e)||(e=[]);let n=me(t,"domPanel");Qo(n)||(n=document.body);let r=e=>{let t=0;if(as(e.innerWidth))t=e.innerWidth;else{if(!as(e.clientWidth))throw console.log("ele",e),new Error("can not get width from ele");t=e.clientWidth}let n=0;if(as(e.innerWidth))n=e.innerHeight;else{if(!as(e.clientWidth))throw console.log("ele",e),new Error("can not get height from ele");n=e.clientHeight}return{w:t,h:n}},i=r(n),o=i.w,s=i.h,a=me(t,"backgroundColor");$n(a)||(a="#222");let l=me(t,"useHelperAxes");os(l)||(l=!0);let c=me(t,"helperAxesLengthRatio");zi(c)||(c=1),c=Hi(c);let u=me(t,"useHelperGrid");os(u)||(u=!0);let d=me(t,"helperGridLengthRatio");zi(d)||(d=5),d=Hi(d);let h=me(t,"helperGridDensity");zi(h)||(h=50),h=Hi(h);let p=me(t,"helperGridPositionRatioZ");zi(p)||(p=-1),p=Hi(p);let f=me(t,"useLightAmbient");os(f)||(f=!0);let m=me(t,"lightAmbientColor");$n(m)||(m="#999");let g=me(t,"useLightPoint");os(g)||(g=!1);let v=me(t,"lightPointPoss");ds(v)||(v=[[5,5,5],[-5,5,5],[5,-5,5]]);let y=me(t,"lightPointColor");$n(y)||(y="#fff");let _=me(t,"lightPointIntensity");zi(_)||(_=100),_=Hi(_);let x=me(t,"lightPointDistance");zi(x)||(x=0),x=Hi(x);let b=me(t,"lightPointDecay");zi(b)||(b=2),b=Hi(b);let S=me(t,"useLightDirection");os(S)||(S=!0);let w=me(t,"lightDirectionColor");$n(w)||(w="#fff");let C=me(t,"lightDirectionIntensity");zi(C)||(C=3),C=Hi(C);let A=me(t,"lightDirectionPos");ds(A)||(A=[10,10,10]);let M=me(t,"cameraType");"perspective"!==M&&"orthographic"!==M&&(M="perspective");let T=me(t,"cameraFov");zi(T)||(T=35),T=Hi(T);let E=me(t,"cameraNear");zi(E)||(E=.1),E=Hi(E);let L=me(t,"cameraFar");zi(L)||(L=1e3),L=Hi(L);let R=me(t,"cameraOrthographicRatio");zi(R)||(R=.5),R=Hi(R);let P=me(t,"cameraPos");ds(P)||(P=[1,1,1]);let k=me(t,"cameraAzimuthAngle");zi(k)||(k=130),k=Hi(k);let I=me(t,"cameraPolarAngle");zi(I)||(I=50),I=Hi(I);let O=me(t,"labelTextColor");$n(O)||(O="#fff");let B=me(t,"labelTextFontFamily");$n(B)||(B="Microsoft JhengHei");let D=me(t,"labelTextFontSize");$n(D)||(D="0.8rem");let U=me(t,"useAutoRotate");os(U)||(U=!1);let F=me(t,"autoRotateDeg");zi(F)||(F=20),F=Hi(F);let N=Ki(),z=new vA,H=new ib;H.background=new cv(wT(a));let V=null,W=()=>{V=new uM(c),V.visible=l,H.add(V)},j=()=>{H.remove(V),V.dispose(),V=null};W();let G=null,$=()=>{G=new QA(d,h),G.visible=u,G.geometry.rotateX(.5*Math.PI),G.geometry.translate(0,0,p),H.add(G)},X=()=>{H.remove(G),G.dispose(),G=null};$();let Y=null;Y=new tA(wT(m)),Y.visible=f,H.add(Y);let q=null,Z=()=>{q=[],nt(v,(e=>{let t=new KC(wT(y),_,x,b);t.visible=g;let n=me(e,0,0),r=me(e,1,0),i=me(e,2,0);t.position.set(n,r,i),H.add(t),q.push(t)}))},J=()=>{nt(q,(e=>{H.remove(e),e.dispose(),e=null})),q=null};Z();let K=null,Q=()=>{K=new eA(wT(w),C),K.visible=S;let e=me(A,0,0),t=me(A,1,0),n=me(A,2,0);K.position.set(e,t,n),H.add(K)},ee=()=>{H.remove(K),K.dispose(),K=null};Q();let te=(e,t)=>{let n=1;return t>0&&(n=e/t),n},ne=te(o,s),re=null,ie=()=>{(e=>{let t=e*s,n=o,r=s-t,i=-t,a=o,l=s;re.setViewOffset(n,r,0,i,a,l)})(-.08)},oe=()=>{"perspective"===M?re=new oy(T,ne,E,L):"orthographic"===M&&(re=new Ry(-R*ne,R*ne,R,-R,E,L)),(e=>{let t=me(e,0,0),n=me(e,1,0),r=me(e,2,0);re.position.set(t,n,r)})(P),re.up.x=0,re.up.y=0,re.up.z=1,ie()},se=()=>{re=null};oe();let ae=new eb({antialias:!0});ae.setSize(o,s),n.appendChild(ae.domElement);let le=new yM;le.setSize(o,s),le.domElement.style.position="absolute",le.domElement.style.top="0px",le.domElement.style.left="0px",n.appendChild(le.domElement),gT.install({THREE:dM});let ce=null,ue=()=>{ce=new gT(re,le.domElement),ce.mouseButtons={left:gT.ACTION.ROTATE,middle:gT.ACTION.DOLLY,right:gT.ACTION.OFFSET,wheel:gT.ACTION.ZOOM},ce.touches={one:gT.ACTION.TOUCH_ROTATE,two:gT.ACTION.TOUCH_DOLLY_OFFSET,three:gT.ACTION.TOUCH_OFFSET}},de=()=>{ce=null};ue();let he=()=>{let e=me(ce,"azimuthAngle"),t=me(ce,"polarAngle");return{azimuthAngle:e*ST,polarAngle:t*ST}},pe=(e,t)=>{Es(ce,"azimuthAngle",e*bT),Es(ce,"polarAngle",t*bT)};pe(k,I);let fe=null,ge=setInterval((()=>{let e=he();pr(e,fe)||(fe=e,N.emit("change-view-angle",e))}),50),ve=null,ye=()=>{ve=new Yx,H.add(ve)},_e=()=>{ve.traverse((function(e){e.isMesh&&(e.geometry.dispose(),e.material.dispose())})),H.remove(ve),ve=null};ye();let xe=[],be=async e=>{let t=me(e,"type","");if($n(t)||(t=function(e){if(!$n(e))return"";let t=Ct(Qh(e),".");if(ur(t)<=1)return"";let n="";try{n=Ml(t)}catch(e){}return n}(e.url)),"stl"!==t)throw new Error("現在僅支援stl檔");let n=me(e,"color",""),r=_l.toRgba(n),i=_l.toRgbString(r),o=r.a,s=await async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=me(n,"color",null);$n(r)||(r="#fff"),r=_l.toRgbString(r);let i=me(n,"opacity",null);as(i)||(i=1);let o=i<1,s=new vT,a=await s.loadAsync(t,(n=>{let r=n.loaded/n.total*100;e.emit("loading",{url:t,prog:r})})),l=new cC({color:new cv(r),depthTest:!0,depthWrite:!0,transparent:o,opacity:i,side:2});return new Zv(a,l)}(N,e.url,{color:i,opacity:o});s.name=e.name,s.color=n,xe.push(s),ve.add(s)},Se=async e=>{await ra(e,(async e=>{await be(e)}))};await Se(e);let we={},Ce=()=>{nt(xe,(e=>{let t=e.geometry,n=1/we.r;t.scale(n,n,n),t.translate(we.x,we.y,we.z)}))},Ae=[],Me=()=>{nt(Ae,(e=>{es(e)})),Ae=[]},Te=async()=>{Le(),await ia(1),(()=>{let e=yT(xe),t=e.cs,n=1;e.rd>0&&(n=1/e.rd),we=xT(xT({},t),{},{r:n})})(),nt(xe,(e=>{let t=e.geometry;t.translate(-we.x,-we.y,-we.z),t.scale(we.r,we.r,we.r)})),nt(xe,(e=>{let t=document.createElement("div");t.textContent=e.name,t.style.color=O,t.style.fontSize=D,t.style.fontFamily=B,t.style.visibility="visible";let n=new hM(t),r=e.geometry.boundingSphere.center;n.position.set(r.x,r.y,r.z),Ae.push(t),e.add(n)})),Le()},Ee=(e,t)=>{if(!Qo(me(Ae,e)))return null;try{let n="hidden";!0===t&&(n="visible"),Ae[e].style.visibility=n}catch(e){console.log(e)}},Le=()=>{try{ae.render(H,re),le.render(H,re)}catch(e){console.log(e)}};Te().then((()=>{N.emit("init")}));let Re=!1,Pe=()=>{if(!Re)try{let e=z.getDelta(),t=ce.update(e);if(U){let t=-F*bT*e;ce.azimuthAngle+=t}requestAnimationFrame(Pe),t&&Le()}catch(e){console.log(e)}};Pe();return N.render=Le,N.resize=()=>{let e=r(n);o=e.w,s=e.h,ne=te(o,s),re.aspect=ne,re.updateProjectionMatrix(),ie(),ae.setSize(o,s),le.setSize(o,s),Le()},N.dispose=()=>{N.emit("dispose"),clearInterval(ge),Re=!0,_e(),j(),X(),H.remove(Y),Y.dispose(),Y=null,J(),ee(),Me(),(()=>{let e=e=>{e.dispose();for(let t of Object.keys(e)){let n=e[t];n&&"object"==typeof n&&"minFilter"in n&&n.dispose()}};H.traverse((t=>{if(t.isLight&&t.dispose(),t.isMesh)if(t.geometry.dispose(),t.material.isMaterial)e(t.material);else for(let n of t.material)e(n)})),H=null})(),es(ae.domElement),es(le.domElement),ae.dispose(),ae=null,le=null,z=null,de(),se(),H=null},N.getUseAutoRotate=()=>U,N.setUseAutoRotate=e=>{U=e},N.setAutoRotateDeg=e=>{F=e},N.setCameraViewAngle=pe,N.getCameraViewAngle=he,N.setCameraAzimuthAngle=e=>{k=e,pe(k,I)},N.setCameraPolarAngle=e=>{I=e,pe(k,I)},N.setBackgroundColor=e=>{a=e,H.background=new cv(wT(e)),Le()},N.getUseHelperAxes=()=>l,N.setUseHelperAxes=e=>{l=e,V.visible=e,Le()},N.setHelperAxesLengthRatio=e=>{c=e,j(),W(),Le()},N.getUseHelperGrid=()=>u,N.setUseHelperGrid=e=>{u=e,G.visible=e,Le()},N.setHelperGridLengthRatio=e=>{d=e,X(),$(),Le()},N.setHelperGridDensity=e=>{h=e,X(),$(),Le()},N.setHelperGridPositionRatioZ=e=>{p=e,X(),$(),Le()},N.setUseLightAmbient=e=>{f=e,Y.visible=e,Le()},N.setLightAmbientColor=e=>{m=e,Y.color=new cv(wT(e)),Le()},N.setUseLightPoint=e=>{g=e,nt(q,(t=>{t.visible=e})),Le()},N.setLightPointPoss=e=>{v=e,J(),Z(),Le()},N.setLightPointColor=e=>{y=e,J(),Z(),Le()},N.setLightPointIntensity=e=>{_=e,J(),Z(),Le()},N.setLightPointDistance=e=>{x=e,J(),Z(),Le()},N.setLightPointDecay=e=>{b=e,J(),Z(),Le()},N.setUseLightDirection=e=>{S=e,K.visible=e,Le()},N.setLightDirectionColor=e=>{w=e,K.color=new cv(wT(e)),Le()},N.setLightDirectionIntensity=e=>{C=e,ee(),Q(),Le()},N.setLightDirectionPos=e=>{A=e,ee(),Q(),Le()},N.getCameraType=()=>M,N.setCameraType=e=>{M=e,se(),oe(),de(),ue(),Le()},N.setCameraFov=e=>{T=e,re.fov=e,re.updateProjectionMatrix(),Le()},N.setCameraNear=e=>{E=e,re.near=e,re.updateProjectionMatrix(),Le()},N.setCameraFar=e=>{L=e,re.far=e,re.updateProjectionMatrix(),Le()},N.setCameraOrthographicRatio=e=>{R=e,se(),oe(),de(),ue(),Le()},N.addMesh=async e=>{Ce(),Me(),await be(e),Te()},N.addMeshs=async e=>{Ce(),Me(),await Se(e),Te()},N.getMeshsInfor=()=>{let e=jn(xe,((e,t)=>{let n=me(e,"color",""),r=me(Ae,t),i=me(r,"textContent",""),o=me(r,"style.color",""),s=me(r,"style.fontSize",""),a=me(r,"style.fontFamily","");return{visible:e.visible,color:n,labelText:i,labelTextColor:o,labelTextFontSize:s,labelTextFontFamily:a}}));return e},N.setMeshVisible=(e,t)=>{((e,t)=>{if(!Go(me(xe,e)))return null;try{xe[e].visible=t}catch(e){console.log(e)}})(e,t),Ee(e,t),Le()},N.setMeshColor=(e,t)=>{if(!Go(me(xe,e)))return null;try{let n=_l.toRgba(t),r=_l.toRgbString(n),i=n.a;xe[e].material.color=new cv(r),xe[e].material.opacity=i,xe[e].color=t}catch(e){console.log(e)}Le()},N.setMeshLabelVisible=(e,t)=>{Ee(e,t),Le()},N.setMeshLabelText=(e,t)=>{if(!Qo(me(Ae,e)))return null;try{Ae[e].textContent=t}catch(e){console.log(e)}Le()},N.setMeshLabelTextColor=(e,t)=>{if(!Qo(me(Ae,e)))return null;try{Ae[e].style.color=t}catch(e){console.log(e)}Le()},N.setMeshLabelTextFontSize=(e,t)=>{if(!Qo(me(Ae,e)))return null;try{Ae[e].style.fontSize=t}catch(e){console.log(e)}Le()},N.setMeshLabelTextFontFamily=(e,t)=>{if(!Qo(me(Ae,e)))return null;try{Ae[e].style.fontFamily=t}catch(e){console.log(e)}Le()},N.cleanMeshs=()=>{nt(xe,(e=>{ve.remove(e)})),_e(),xe=[],ye(),Me(),Le()},N}const AT={directives:{domresize:oo()},components:{WIconLoading:Sl,WGroupIconCheck:nu,WIcon:xs,WColorSelect:Jh},props:{opt:{type:Object,default:()=>{}}},data:function(){return{mdiEyeOutline:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z",mdiEyeOffOutline:"M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z",loading:!0,timer:null,itemsSelectIds:[],itemsSelects:[],useSetting:!0,useAutoRotate:!1,useHelperAxes:!0,useHelperGrid:!0,usePerspective:!0,useLegend:!0,optTemp:null,meshs:[],ev:null,menuSettingIcon:"",menuSettingTooltip:"",menuAutoRotateIcon:"",menuAutoRotateTooltip:"",menuAxesIcon:"",menuAxesTooltip:"",menuGridIcon:"",menuGridTooltip:"",menuPerspectiveIcon:"",menuPerspectiveTooltip:"",menuLegendIcon:"",menuLegendTooltip:"",useLegnedBackgroundColor:"",useLegnedHeight:""}},mounted:function(){let e,t=this;t.timer=setInterval((()=>{e=t.getParam("useHelperAxes"),t.useHelperAxes!==e&&(t.useHelperAxes=e),e=t.getParam("useAutoRotate"),t.useAutoRotate!==e&&(t.useAutoRotate=e),e=t.getParam("useHelperGrid"),t.useHelperGrid!==e&&(t.useHelperGrid=e),e="perspective"===t.getParam("cameraType"),t.usePerspective!==e&&(t.usePerspective=e),e=t.getMeshs(),pr(t.meshs,e)||(t.meshs=e),t.syncItemsSelectIds(),t.updateItemsSelects(!1)}),50)},beforeDestroy:function(){clearInterval(this.timer),this.dispose()},watch:{opt:{handler(e){let t=this;t.loading?t.init().finally((()=>{t.optTemp=Ai(t.opt)})):t.modify().finally((()=>{t.optTemp=Ai(t.opt)}))},immediate:!0,deep:!0}},computed:{widthInp:function(){let e=0,t=me(this,"opt.width","");return zi(t)&&(e=Hi(t)),e},heightInp:function(){let e=0,t=me(this,"opt.height","");return zi(t)&&(e=Hi(t)),e},items:function(){let e=this;return[{id:"setting",icon:e.menuSettingIcon,tooltip:e.menuSettingTooltip},{id:"auto_rotate",icon:e.menuAutoRotateIcon,tooltip:e.menuAutoRotateTooltip},{id:"axes",icon:e.menuAxesIcon,tooltip:e.menuAxesTooltip},{id:"grid",icon:e.menuGridIcon,tooltip:e.menuGridTooltip},{id:"perspective",icon:e.menuPerspectiveIcon,tooltip:e.menuPerspectiveTooltip},{id:"legend",icon:e.menuLegendIcon,tooltip:e.menuLegendTooltip}]},useItems:function(){let e=this,t=[];return t=e.useSetting?Ai(e.items):[Ai(e.items[0])],t}},methods:{resizePanel:function(e){let t=this;if(null===t.ev)return;let n=me(t,"ev.resize");Qi(n)&&(n(),t.$emit("resize",e))},syncItemsSelectIds:function(){let e=this,t=[];e.useSetting&&t.push("setting"),e.useAutoRotate&&t.push("auto_rotate"),e.useHelperAxes&&t.push("axes"),e.useHelperGrid&&t.push("grid"),e.usePerspective&&t.push("perspective"),e.useLegend&&t.push("legend"),pr(e.itemsSelectIds,t)||(e.itemsSelectIds=t)},updateItemsSelects:function(e=!1){let t=this,n=jn(t.itemsSelects,"id");if(!e&&pr(t.itemsSelectIds,n))return;let r=[];nt(t.itemsSelectIds,(e=>{let n=ks(t.items,{id:e});Go(n)?r.push(n):console.log(`invalid id[${e}]`)})),t.itemsSelects=r},updateMenus:function(){let e=this,t=me(e,"opt.menuSettingIcon","");$n(t)||(t="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z");let n=me(e,"opt.menuSettingTooltip","");$n(n)||(n="Settings");let r=me(e,"opt.menuAutoRotateIcon","");$n(r)||(r="M10,12L14,16L10,20V16.9C5.44,16.44 2,14.42 2,12C2,9.58 5.44,7.56 10,7.1V9.09C6.55,9.43 4,10.6 4,12C4,13.4 6.55,14.57 10,14.91V12M20,12C20,10.6 17.45,9.43 14,9.09V7.1C18.56,7.56 22,9.58 22,12C22,14.16 19.26,16 15.42,16.7L16.12,16L14.92,14.79C17.89,14.36 20,13.27 20,12M11,2H13V13L11,11V2M11,22V21L13,19V22H11Z");let i=me(e,"opt.menuAutoRotateTooltip","");$n(i)||(i="Auto rotate");let o=me(e,"opt.menuAxesIcon","");$n(o)||(o="M2.61,21L1.61,19.27L11,13.85V3H13V13.85L22.39,19.27L21.39,21L12,15.58L2.61,21Z");let s=me(e,"opt.menuAxesTooltip","");$n(s)||(s="Axes");let a=me(e,"opt.menuGridIcon","");$n(a)||(a="M10,4V8H14V4H10M16,4V8H20V4H16M16,10V14H20V10H16M16,16V20H20V16H16M14,20V16H10V20H14M8,20V16H4V20H8M8,14V10H4V14H8M8,8V4H4V8H8M10,14H14V10H10V14M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2Z");let l=me(e,"opt.menuGridTooltip","");$n(l)||(l="Grid");let c=me(e,"opt.menuPerspectiveIcon","");$n(c)||(c="M20 2H4C3.45 2 3 2.45 3 3V4C3 4.55 3.45 5 4 5H5V14H11V16.59L6.79 20.79L8.21 22.21L11 19.41V22H13V19.41L15.79 22.21L17.21 20.79L13 16.59V14H19V5H20C20.55 5 21 4.55 21 4V3C21 2.45 20.55 2 20 2M17 12H7V5H17V12Z");let u=me(e,"opt.menuPerspectiveTooltip","");$n(u)||(u="Perspective");let d=me(e,"opt.menuLegendIcon","");$n(d)||(d="M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z");let h=me(e,"opt.menuLegendTooltip","");$n(h)||(h="Legend"),e.menuSettingIcon=t,e.menuSettingTooltip=n,e.menuAutoRotateIcon=r,e.menuAutoRotateTooltip=i,e.menuAxesIcon=o,e.menuAxesTooltip=s,e.menuGridIcon=a,e.menuGridTooltip=l,e.menuPerspectiveIcon=c,e.menuPerspectiveTooltip=u,e.menuLegendIcon=d,e.menuLegendTooltip=h,e.updateItemsSelects(!0)},refreshLegend:function(){let e=this,t=me(e,"opt.legnedBackgroundColor","");$n(t)||(t="rgba(90,90,90,0.5)"),e.useLegnedBackgroundColor=_l.toRgbaString(t);let n=me(e,"opt.legnedHeight",null),r=me(e,"opt.legnedHeightMax",null),i="";zi(n)&&(n=Hi(n),i+=`height:${n}px;`),zi(r)&&(r=Hi(r),i+=`max-height:${r}px;`),(zi(n)||zi(r))&&(i+="overflow-y:auto;"),e.useLegnedHeight=i},init:async function(){let e=this;await async function(){e.dispose(),await ta((()=>Qo(e.$refs.panel))),e.loading=!0;let t=Ai(e.opt);t.domPanel=e.$refs.panel;let n=me(t,"items",[]),r=await CT(n,t);r.on("init",(()=>{e.$emit("init"),e.updateMenus(),e.refreshLegend(),e.loading=!1})),r.on("loading",(t=>{e.$emit("loading",t)})),r.on("dispose",(()=>{e.$emit("dispose")})),r.on("change-view-angle",(t=>{e.$emit("change-view-angle",t)})),e.ev=r}().catch((e=>{console.log(e)}))},modify:async function(){let e=this;await async function(){if(null===e.ev)return;await ia(300);let t=Ke(e.opt),n=Ke(e.optTemp),r=[];nt(t,(t=>{let i=me(e,`opt.${t}`,null),o=me(e,`optTemp.${t}`,null);pr(i,o)||r.push({type:"mod",k:t,vOld:o,vNew:i}),Zs(n,t)})),nt(n,(t=>{let n=me(e,`optTemp.${t}`,null);r.push({type:"del",k:t,vOld:n,vNew:null})}));let i={backgroundColor:"ev.setBackgroundColor",useAutoRotate:"ev.setUseAutoRotate",autoRotateDeg:"ev.setAutoRotateDeg",useHelperAxes:"ev.setUseHelperAxes",helperAxesLengthRatio:"ev.setHelperAxesLengthRatio",useHelperGrid:"ev.setUseHelperGrid",helperGridLengthRatio:"ev.setHelperGridLengthRatio",helperGridDensity:"ev.setHelperGridDensity",helperGridPositionRatioZ:"ev.setHelperGridPositionRatioZ",useLightAmbient:"ev.setUseLightAmbient",lightAmbientColor:"ev.setLightAmbientColor",useLightPoint:"ev.setUseLightPoint",lightPointPoss:"ev.setLightPointPoss",lightPointColor:"ev.setLightPointColor",lightPointIntensity:"ev.setLightPointIntensity",lightPointDistance:"ev.setLightPointDistance",lightPointDecay:"ev.setLightPointDecay",useLightDirection:"ev.setUseLightDirection",lightDirectionColor:"ev.setLightDirectionColor",lightDirectionIntensity:"ev.setLightDirectionIntensity",lightDirectionPos:"ev.setLightDirectionPos",cameraType:"ev.setCameraType",cameraFov:"ev.setCameraFov",cameraNear:"ev.setCameraNear",cameraFar:"ev.setCameraFar",cameraOrthographicRatio:"ev.setCameraOrthographicRatio",cameraAzimuthAngle:"ev.setCameraAzimuthAngle",cameraPolarAngle:"ev.setCameraPolarAngle",menuSettingIcon:"updateMenus",menuSettingTooltip:"updateMenus",menuAutoRotateIcon:"updateMenus",menuAutoRotateTooltip:"updateMenus",menuAxesIcon:"updateMenus",menuAxesTooltip:"updateMenus",menuGridIcon:"updateMenus",menuGridTooltip:"updateMenus",menuPerspectiveIcon:"updateMenus",menuPerspectiveTooltip:"updateMenus",menuLegendIcon:"updateMenus",menuLegendTooltip:"updateMenus",legnedBackgroundColor:"refreshLegend",legnedHeight:"refreshLegend",legnedHeightMax:"refreshLegend"};nt(r,(t=>{let n=t.k;if(na(i,n)){let r=me(e,i[n]);try{r(t.vNew)}catch(e){console.log(e)}}else console.log(`尚未建置 ${n} 之 set 函數`)}))}().catch((e=>{console.log(e)}))},dispose:function(){let e=this;setTimeout((()=>{if(null===e.ev)return;Qi(me(e,"ev.dispose"))&&(e.ev.dispose(),e.ev=null)}),1)},getInst:function(){return me(this,"ev")},getMeshs:function(){let e=me(this,"ev.getMeshsInfor"),t=[];return Qi(e)&&(t=e()),t},getMeshColor:function(e){let t=me(e,"color","");return t=_l.toRgbaString(t),t},setMeshColor:function(e,t,n){this.ev.setMeshColor(t,n)},toggleMeshVisible:function(e,t){this.ev.setMeshVisible(t,!e.visible)},strUpperHead:function(e){let t=sa(e,1);return t=Is(t),`${t}${la(e,1)}`},getParam:function(e){let t=null,n=me(this,`ev.get${e=this.strUpperHead(e)}`);return Qi(n)&&(t=n()),t},setParam:function(e,t){let n=me(this,`ev.set${e=this.strUpperHead(e)}`);Qi(n)&&n(t)},toggleParam:function(e){let t=this.getParam(e);t=!t,this.setParam(e,t)},ckItem:function(e){let t=this,n={setting:()=>{t.useSetting=!t.useSetting},axes:()=>{t.toggleParam("useHelperAxes")},auto_rotate:()=>{t.toggleParam("useAutoRotate")},grid:()=>{t.toggleParam("useHelperGrid")},perspective:()=>{t.usePerspective?t.setParam("cameraType","orthographic"):t.setParam("cameraType","perspective")},legend:()=>{t.useLegend=!t.useLegend}},r=me(e,"id",""),i=me(n,r);Qi(i)?i():(console.log("item",e),console.log("kp",n),console.log(`invalid id[${r}]`))}}};var MT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:"display:inline-block; width:"+e.widthInp+"px; min-width:"+e.widthInp+"px; height:"+e.heightInp+"px; overflow-y:hidden;"},[e.loading?n("div",{staticStyle:{position:"relative",width:"0px",height:"0px"}},[n("div",{staticStyle:{position:"absolute",top:"0px",left:"0px"}},[n("WIconLoading")],1)]):e._e(),e._v(" "),n("div",{staticStyle:{position:"relative"}},[n("div",{directives:[{name:"domresize",rawName:"v-domresize"}],ref:"panel",style:"position:relative; width:"+e.widthInp+"px; height:"+e.heightInp+"px; opacity:"+(e.loading?0:1)+";",on:{domresize:e.resizePanel}}),e._v(" "),e.loading?e._e():n("div",{style:"position:absolute; top:0px; left:0px;"},[n("div",{staticStyle:{padding:"10px",display:"flex","align-items":"flex-start"}},[n("WGroupIconCheck",{attrs:{items:e.useItems,dir:"vertical",iconColor:"#aaa",iconColorHover:"#ccc",iconColorFocus:"#ccc",iconColorActive:"#fff",backgroundColor:"#000",backgroundColorHover:"#111",backgroundColorFocus:"#111",backgroundColorActive:"#444",seplineColor:"#333",tooltipTextFontSize:"0.7rem",value:e.itemsSelects,_input:"updateItem"},on:{click:e.ckItem}}),e._v(" "),e.useLegend?[n("div",{style:"padding-left:10px;"}),e._v(" "),n("div",{style:"padding:5px; border-radius:4px; background:"+e.useLegnedBackgroundColor+";"},[n("div",{style:""+e.useLegnedHeight},e._l(e.meshs,(function(t,r){return n("div",{key:"km-"+r,style:""},[n("div",{staticStyle:{display:"flex","align-items":"center",padding:"3px"}},[n("WIcon",{staticStyle:{cursor:"pointer"},attrs:{icon:t.visible?e.mdiEyeOutline:e.mdiEyeOffOutline,color:"#ccc",colorHover:"#ddd",size:20},on:{click:function(n){return e.toggleMeshVisible(t,r)}}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("WColorSelect",{attrs:{colorBlockBorderColor:"#888",showColorText:!1,_colorTextColor:"'#ddd'",panelBackgroundColor:"#111",toolBackgroundColor:"#222",menuIconColor:"#666",menuIconColorHover:"#777",menuIconColorActive:"#ddd",borderColor:"#333",borderColorHover:"#333",borderColorActive:"#444",backgroundColor:"#111",menuBackgroundColor:"#111",menuBackgroundColorHover:"#222",menuBackgroundColorActive:"#333",menuTextColor:"#b2b2b2",menuTextColorHover:"#ccc",menuTextColorActive:"#ddd",menuTextFontSize:"0.75rem",inputBorderColor:"#444",inputBorderColorHover:"#555",inputBorderColorActive:"#666",inputBackgroundColor:"#000",inputBackgroundColorHover:"#111",inputBackgroundColorActive:"#222",inputTextColor:"#999",inputLabelColor:"#888",barProgColor:"#888",barProgBackgroundColor:"#222",barSliderBackgroundColor:"#ccc",barSliderBackgroundColorHover:"#ddd",btnTextColor:"#eee",btnTextColorHover:"#fff",btnTextColorActive:"#fff",btnBackgroundColor:"#444",btnBackgroundColorHover:"#555",btnBackgroundColorActive:"#555",value:e.getMeshColor(t)},on:{input:function(n){e.setMeshColor(t,r,n)}}}),e._v(" "),n("div",{staticStyle:{"padding-left":"5px"}}),e._v(" "),n("div",{style:"color:"+t.labelTextColor+"; font-size:"+t.labelTextFontSize+"; font-family:"+t.labelTextFontFamily+";"},[e._v("\n "+e._s(t.labelText)+"\n ")])],1)])})),0)])]:e._e()],2)])])])};MT._withStripped=!0;const TT=ps({render:MT,staticRenderFns:[]},(function(e){e&&e("data-v-7131ee8a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"WThreejsVue.vue"},media:void 0})}),AT,"data-v-7131ee8a",false,undefined,!1,ms,void 0,void 0);var ET={exports:{}};
|
|
26
|
+
/*!
|
|
27
|
+
* w-jsonview-tree v1.0.29
|
|
28
|
+
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
29
|
+
* Released under the MIT License.
|
|
30
|
+
*/!function(e,t){e.exports=(function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".CompCssDJsonViewTree .w-caret-right {\r\n transform: rotate(-90deg);\r\n width: 0.9rem;\r\n height: 0.9rem;\r\n display: inline-block;\r\n vertical-align: middle;\r\n background-size: contain;\r\n background-position: center center;\r\n background-repeat: no-repeat;\r\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhL7ZC9CYBADEbP2iEEp7JxAPdwBZex02EcQ/0iBCzC/ZlTkDx4RYrLC+cMwzB+QQ1bRRtYwSAbPJQdoRe6bIbS41x32MEg9NULlJakStEBRqMRT44yFF+htDRkdpTJiT+OMilxtSgTE1ePMr54sSgjxYtHmXv8tShD8Qn212QYxnc4dwKskJKEHrOFUQAAAABJRU5ErkJggg==')\r\n}\r\n\r\n.CompCssDJsonViewTree .w-caret-down {\r\n display: inline-block;\r\n width: 0.9rem;\r\n height: 0.9rem;\r\n display: inline-block;\r\n vertical-align: middle;\r\n background-size: contain;\r\n background-position: center center;\r\n background-repeat: no-repeat;\r\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACJSURBVEhL7ZC9CYBADEbP2iEEp7JxAPdwBZex02EcQ/0iBCzC/ZlTkDx4RYrLC+cMwzB+QQ1bRRtYwSAbPJQdoRe6bIbS41x32MEg9NULlJakStEBRqMRT44yFF+htDRkdpTJiT+OMilxtSgTE1ePMr54sSgjxYtHmXv8tShD8Qn212QYxnc4dwKskJKEHrOFUQAAAABJRU5ErkJggg==')\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-line {\r\n margin: 4px 0;\r\n display: flex;\r\n justify-content: flex-start;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-caret-icon {\r\n width: 18px;\r\n text-align: center;\r\n cursor: pointer;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-empty-icon {\r\n /* width: 18px; */\r\n padding: 0px 9px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-type {\r\n margin-right: 4px;\r\n margin-left: 4px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-key {\r\n color: #616161;\r\n margin-right: 4px;\r\n margin-left: 4px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-index {\r\n margin-right: 4px;\r\n margin-left: 4px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-separator {\r\n color: #bdbdbd;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-value {\r\n margin-left: 8px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-number {\r\n color: #536dfe;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-boolean {\r\n color: #9ccc65;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-string {\r\n color: #ffab40;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-function {\r\n color: #e040fb;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-size {\r\n margin-right: 4px;\r\n margin-left: 4px;\r\n}\r\n\r\n.CompCssDJsonViewTree .wjv-json-hide {\r\n display: none;\r\n}"),function(e,t){let n=!1;function r(e,t){let n=document.createElement(e);return void 0===t||(t.className&&(n.className=t.className),t.content&&(n.textContent=t.content),t.children&&t.children.forEach((e=>{null!==e&&n.appendChild(e)}))),n}function i(e){let t=r("i");e.expanded?t.className="wicon w-caret-down":t.className="wicon w-caret-right";let n=r("div",{className:"wjv-caret-icon",children:[t]}),i=e.toggle.bind(e);n.addEventListener("click",i);let o,s=r("div",{className:"wjv-json-index",content:e.key}),a=r("div",{className:"wjv-json-type",content:e.type}),l=r("div",{className:"wjv-json-key",content:e.key}),c=r("div",{className:"wjv-json-size"});"array"===e.type?c.innerText="["+e.children.length+"]":"object"===e.type&&(c.innerText="{"+e.children.length+"}"),o=null===e.key?[n,a,c]:"array"===e.parent.type?[n,s,c]:[n,l,c];let u=r("div",{className:"wjv-line",children:o});return e.depth>0&&u.setAttribute("style","margin-left: "+24*e.depth+"px;"),u}function o(e){let t=r("div",{className:"wjv-empty-icon"}),n=r("div",{className:"wjv-json-key",content:e.key}),i=r("div",{className:"wjv-json-separator",content:":"}),o=r("div",{className:"wjv-json-value wjv-json-"+typeof e.value,content:String(e.value)}),s=r("div",{className:"wjv-line",children:[t,n,i,o]});return e.depth>0&&s.setAttribute("style","margin-left: "+24*e.depth+"px;"),s}function s(){return{key:null,parent:null,value:null,expanded:n,type:null,children:null,elem:null,depth:0,setCaretIconRight(){this.elem.querySelector(".wicon").classList.replace("w-caret-down","w-caret-right")},setCaretIconDown(){this.elem.querySelector(".wicon").classList.replace("w-caret-right","w-caret-down")},hideChildren(){null!==this.children&&this.children.forEach((e=>{e.elem.classList.add("wjv-json-hide"),e.expanded&&e.hideChildren()}))},showChildren(){null!==this.children&&this.children.forEach((e=>{e.elem.classList.remove("wjv-json-hide"),e.expanded&&e.showChildren()}))},toggle:function(){this.expanded?(this.expanded=!1,this.hideChildren(),this.setCaretIconRight()):(this.expanded=!0,this.showChildren(),this.setCaretIconDown())}}}function a(e){let t=typeof e;return Array.isArray(e)?t="array":null===e&&(t="null"),t}function l(e,t){for(let r in e){let c=s();c.parent=t,c.key=r,c.type=a(e[r]),c.depth=t.depth+1,c.expanded=n,"object"==typeof e[r]?(c.children=[],t.children.push(c),l(e[r],c),c.elem=i(c)):(c.value=e[r],c.elem=o(c),t.children.push(c))}}function c(e,t){t(e),null!==e.children&&e.children.forEach((e=>{c(e,t)}))}!function(e,t,r){r&&(n=!0===r.expanded),t.innerHTML="",t.classList.add("CompCssDJsonViewTree");let o=function(e){let t=s();return t.type=a(e),t.children=[],t.expanded=n,l(e,t),t.elem=i(t),t}(e);!function(e,t){c(e,(e=>{e.expanded||e.hideChildren(),t.appendChild(e.elem)}))}(o,t)}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})})}(ET);var LT=qi(ET.exports);const RT={components:{WThreejsVue:TT},data:function(){return{opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})}}};var PT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[n("WThreejsVue",{attrs:{opt:e.opt}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};PT._withStripped=!0;const kT=ps({render:PT,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("size")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicSize.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicSize.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4ecf68c2_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppBasicSize.vue"},media:void 0})}),RT,undefined,false,undefined,!1,ms,void 0,void 0);const IT={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],backgroundColor:"#263238"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setBackgroundColor:function(e){this.opt.backgroundColor=e}}};var OT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setBackgroundColor("#222")}}},[e._v("set to #222")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setBackgroundColor("#263238")}}},[e._v("set to #263238")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};OT._withStripped=!0;const BT=ps({render:OT,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("backgroundColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicBackgroundColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicBackgroundColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-c7ec5590_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppBasicBackgroundColor.vue"},media:void 0})}),IT,undefined,false,undefined,!1,ms,void 0,void 0);const DT={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useAutoRotate:!0},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseAutoRotate:function(e){this.opt.useAutoRotate=e}}};var UT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseAutoRotate(!0)}}},[e._v("set to true")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseAutoRotate(!1)}}},[e._v("set to false")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};UT._withStripped=!0;const FT=ps({render:UT,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useAutoRotate")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicUseAutoRotate.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicUseAutoRotate.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-0961f163_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppBasicUseAutoRotate.vue"},media:void 0})}),DT,undefined,false,undefined,!1,ms,void 0,void 0);const NT={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useAutoRotate:!0,autoRotateDeg:-5},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setAutoRotateDeg:function(e){this.opt.autoRotateDeg=e}}};var zT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setAutoRotateDeg(20)}}},[e._v("set to 20")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setAutoRotateDeg(-5)}}},[e._v("set to -5")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};zT._withStripped=!0;const HT=ps({render:zT,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("autoRotateDeg")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicAutoRotateDeg.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicAutoRotateDeg.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-58a6a774_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppBasicAutoRotateDeg.vue"},media:void 0})}),NT,undefined,false,undefined,!1,ms,void 0,void 0);function VT(e,t){var n=[];return et(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function WT(t,n){return(e(t)?Kt:VT)(t,Vn(n))}function jT(e,t){return!!(null==e?0:e.length)&&Xs(e,t,0)>-1}function GT(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var $T=un&&1/Ot(new un([,-0]))[1]==1/0?function(e){return new un(e)}:function(){},XT=200;function YT(e){return e&&e.length?function(e,t,n){var r=-1,i=jT,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=GT;else if(o>=XT){var c=t?null:$T(e);if(c)return Ot(c);s=!1,i=Et,l=new Mt}else l=t?[]:a;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}(e):[]}function qT(e){return!us(e)}function ZT(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";if("*"===t)return t;if(!Gn(t)&&!ds(t))return"*";"common"===t&&(t=["docums","compress","image","data"]);let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e&&"name"!==e&&"group"!==e&&"acp"!==e&&"exec"!==e)return[];let t=[{name:"htm",group:"docums",acp:"text/html",exec:"browser"},{name:"html",group:"docums",acp:"text/html",exec:"browser"},{name:"pdf",group:"docums",acp:"application/pdf",exec:"acrobat"},{name:"rtf",group:"docums",acp:"application/rtf",exec:"word"},{name:"doc",group:"docums",acp:"application/msword",exec:"word"},{name:"docx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",exec:"word"},{name:"ppt",group:"docums",acp:"application/vnd.ms-powerpoint",exec:"powerpoint"},{name:"pptx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.presentationml.presentation",exec:"powerpoint"},{name:"xls",group:"docums",acp:"application/vnd.ms-excel",exec:"excel"},{name:"xlsx",group:"docums",acp:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",exec:"excel"},{name:"odt",group:"docums",acp:"application/vnd.oasis.opendocument.text",exec:"word"},{name:"odp",group:"docums",acp:"application/vnd.oasis.opendocument.presentation",exec:"powerpoint"},{name:"application/vnd.oasis.opendocument.spreadsheet",group:"docums",acp:"application/vnd.oasis.opendocument.spreadsheet",exec:"excel"},{name:"zip",group:"compress",acp:"application/zip",exec:"7z"},{name:"rar",group:"compress",acp:"application/x-rar-compressed",exec:"7z"},{name:"7z",group:"compress",acp:"application/x-7z-compressed",exec:"7z"},{name:"bzip",group:"compress",acp:"application/x-bzip",exec:"7z"},{name:"bzip2",group:"compress",acp:"application/x-bzip2",exec:"7z"},{name:"pic",group:"image",acp:"image/*",exec:"imageviwer"},{name:"xml",group:"data",acp:"text/xml",exec:"textviwer"},{name:"json",group:"data",acp:"application/json",exec:"textviwer"},{name:"geojson",group:"data",acp:"application/geo+json",exec:"textviwer"},{name:"txt",group:"data",acp:"text/plain",exec:"textviwer"},{name:"csv",group:"data",acp:"text/csv",exec:"excel"},{name:"dat",group:"data",acp:"application/octet-stream",exec:"binaryviwer"}];if(""===e)return t;let n={};return nt(t,(function(t){let r=t[e];na(n,r)||(n[r]=[]),n[r].push(t)})),n}();function r(e){return YT(jn(e,"acp"))}Gn(t)&&(t=[t]);let i="";if(ds(t)){let o=jn(t,(function(e){return function(e){return r(WT(n,{group:e}))}(e)})),s=function(){var t=arguments.length;if(!t)return[];for(var n=Array(t-1),r=arguments[0],i=t;i--;)n[i-1]=arguments[i];return Zt(e(r)?Pr(r):[r],Qs(n,1))}(o,jn(t,(function(e){return r(WT(n,{name:e}))})));s=WT(s,qT),i=Al(s,",")}return i}function JT(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=me(t,"multiple");os(n)||(n=!1);let r=me(t,"entireHierarchy");os(r)||(r=!1),r&&!n&&(n=!0);let i=me(t,"sizelimit");zi(i)||(i=1e3),i=Hi(i);let o=ea(),s="drf"+io(),a="GrpDomReadFile";es(`[name=${a}]`);let l=ZT(e),c=`<div name="${a}" style="position:relative; width:0px; height:0px; overflow:hidden;"><input id="${s}" type="file" accept="${l}" ${n?"multiple":""} ${r?"webkitdirectory":""} style="opacity:0; position:absolute; top:-10000px; left:-10000px;"></div>`;!function(e,t){if(!Qo(e))return"invalid eleParent";if(Gn(t))e.insertAdjacentHTML("beforeend",t);else{if(!Qo(t))return"invalid itemChild";e.appendChild(t)}}(document.querySelector("body"),c);let u=(d="#"+s,document.querySelector(d));var d;let h=!1;function p(e){h=!0;let t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t=Hi(t),t<=0&&(t=1e3);let n={},r=[];return nt(me(e,"files",[]),(function(e,i){e.size/1024/1024>t&&(n[i]=`檔案大小超過上限${t}mb`),r.push(e)})),{files:r,errs:n}}(this,i);o.resolve(t),u.removeEventListener("change",p),r||window.removeEventListener("focus",f),es(`[name=${a}]`)}function f(e){setTimeout((()=>{h||p()}),300)}return u.addEventListener("change",p,!0),r||window.addEventListener("focus",f),function(e,t){let n=new MouseEvent(t,{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(n)}(u,"click"),o}"undefined"!=typeof window&&void 0!==window.document&&function(){try{return new MouseEvent("MouseEventPolyfillTest"),!1}catch(e){}let e=function(e,t){t=t||{bubbles:!1,cancelable:!1};let n=document.createEvent("MouseEvent");return n.initMouseEvent(e,t.bubbles,t.cancelable,window,0,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null),n};e.prototype=Event.prototype,window.MouseEvent=e}();const KT={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},cleanAll:function(){let e=this;try{e.$refs.thr.getInst().cleanMeshs()}catch(e){}},upload:function(){let e=this;(async function(){let t=await JT("*",{multiple:!0}),n=[];for(let e=0;e<t.files.length;e++){let r=t.files[e];console.log("file",r);let i={type:"stl",url:window.URL.createObjectURL(r),name:r.name,color:"rgba(92, 214, 92, 0.9)"};console.log("stl mesh",i),n.push(i)}try{e.$refs.thr.getInst().addMeshs(n)}catch(e){}})().catch((e=>{console.log(e)}))}}};var QT=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:e.cleanAll}},[e._v("clean all")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:e.upload}},[e._v("upload stl")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};QT._withStripped=!0;const eE=ps({render:QT,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("uploadStl")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicBackgroundColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicBackgroundColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-1054bfc5_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppBasicUploadStl.vue"},media:void 0})}),KT,undefined,false,undefined,!1,ms,void 0,void 0);const tE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],cameraType:"orthographic"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraType:function(e){this.opt.cameraType=e}}};var nE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraType("perspective")}}},[e._v("set to perspective")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraType("orthographic")}}},[e._v("set to orthographic")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};nE._withStripped=!0;const rE=ps({render:nE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("cameraType")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmCameraType.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmCameraType.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-5c23799e_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmCameraType.vue"},media:void 0})}),tE,undefined,false,undefined,!1,ms,void 0,void 0);const iE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],cameraFov:50},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraFov:function(e){this.opt.cameraFov=e}}};var oE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraFov(35)}}},[e._v("set to 35")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraFov(50)}}},[e._v("set to 50")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};oE._withStripped=!0;const sE=ps({render:oE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("cameraFov")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmCameraFov.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmCameraFov.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4c3c3ad8_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmCameraFov.vue"},media:void 0})}),iE,undefined,false,undefined,!1,ms,void 0,void 0);const aE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],cameraNear:1.7},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraNear:function(e){this.opt.cameraNear=e}}};var lE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraNear(.1)}}},[e._v("set to 0.1")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraNear(1.7)}}},[e._v("set to 1.7")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};lE._withStripped=!0;const cE=ps({render:lE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("cameraNear")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmCameraNear.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmCameraNear.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4f84528f_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmCameraNear.vue"},media:void 0})}),aE,undefined,false,undefined,!1,ms,void 0,void 0);const uE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],cameraFar:3},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraFar:function(e){this.opt.cameraFar=e}}};var dE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraFar(1e3)}}},[e._v("set to 1000")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraFar(3)}}},[e._v("set to 3")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};dE._withStripped=!0;const hE=ps({render:dE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("cameraFar")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmCameraFar.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmCameraFar.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-621739c3_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmCameraFar.vue"},media:void 0})}),uE,undefined,false,undefined,!1,ms,void 0,void 0);const pE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],cameraType:"orthographic",cameraOrthographicRatio:1},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraOrthographicRatio:function(e){this.opt.cameraOrthographicRatio=e}}};var fE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraOrthographicRatio(.5)}}},[e._v("set to 0.5")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraOrthographicRatio(1)}}},[e._v("set to 1")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};fE._withStripped=!0;const mE=ps({render:fE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("cameraOrthographicRatio")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmCameraOrthographicRatio.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmCameraOrthographicRatio.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-3f8f22e1_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmCameraOrthographicRatio.vue"},media:void 0})}),pE,undefined,false,undefined,!1,ms,void 0,void 0);const gE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraAzimuthAngle:function(e){let t=this;try{t.$refs.thr.getInst().setCameraAzimuthAngle(e)}catch(e){}}}};var vE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraAzimuthAngle(130)}}},[e._v("set to 130")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraAzimuthAngle(200)}}},[e._v("set to 200")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};vE._withStripped=!0;const yE=ps({render:vE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setCameraAzimuthAngle")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmSetCameraAzimuthAngle.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmSetCameraAzimuthAngle.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-69cd0a99_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmSetCameraAzimuthAngle.vue"},media:void 0})}),gE,undefined,false,undefined,!1,ms,void 0,void 0);const _E={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraPolarAngle:function(e){let t=this;try{t.$refs.thr.getInst().setCameraPolarAngle(e)}catch(e){}}}};var xE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraPolarAngle(50)}}},[e._v("set to 50")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraPolarAngle(75)}}},[e._v("set to 75")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};xE._withStripped=!0;const bE=ps({render:xE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setCameraPolarAngle")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmSetCameraPolarAngle.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmSetCameraPolarAngle.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-80c71aea_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmSetCameraPolarAngle.vue"},media:void 0})}),_E,undefined,false,undefined,!1,ms,void 0,void 0);const SE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setCameraViewAngle:function(e,t){let n=this;try{n.$refs.thr.getInst().setCameraViewAngle(e,t)}catch(e){}}}};var wE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraViewAngle(0,0)}}},[e._v("set (0,0) for x-y plane")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraViewAngle(0,90)}}},[e._v("set (0,90) for x-z plane")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setCameraViewAngle(90,90)}}},[e._v("set (90,90) for y-z plane")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};wE._withStripped=!0;const CE=ps({render:wE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setCameraViewAngle")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmSetCameraViewAngle.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmSetCameraViewAngle.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-74f2257a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmSetCameraViewAngle.vue"},media:void 0})}),SE,undefined,false,undefined,!1,ms,void 0,void 0);const AE={components:{WThreejsVue:TT},data:function(){return{az:null,polar:null,loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},beforeDestroy:function(){},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},changeViewAngle:function(e){console.log("changeViewAngle",e);let t=null,n=null;try{t=e.azimuthAngle.toFixed(2),n=e.polarAngle.toFixed(2)}catch(e){}this.az=t,this.polar=n}}};var ME=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("div",{staticStyle:{padding:"2px 5px","font-size":"0.75rem",color:"#000",background:"#eee"}},[n("span",[e._v(e._s(e.az))]),e._v(", "),n("span",[e._v(e._s(e.polar))])])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1},"change-view-angle":e.changeViewAngle}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};ME._withStripped=!0;const TE=ps({render:ME,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("getCameraViewAngle")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmGetCameraViewAngle.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmGetCameraViewAngle.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-574fca2a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppCmGetCameraViewAngle.vue"},media:void 0})}),AE,undefined,false,undefined,!1,ms,void 0,void 0);const EE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useHelperAxes:!1},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseHelperAxes:function(e){this.opt.useHelperAxes=e}}};var LE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseHelperAxes(!0)}}},[e._v("show")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseHelperAxes(!1)}}},[e._v("hide")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};LE._withStripped=!0;const RE=ps({render:LE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useHelperAxes")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpUseHelperAxes.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpUseHelperAxes.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-d8e452b6_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpUseHelperAxes.vue"},media:void 0})}),EE,undefined,false,undefined,!1,ms,void 0,void 0);const PE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],helperAxesLengthRatio:1.6},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setHelperAxesLengthRatio:function(e){this.opt.helperAxesLengthRatio=e}}};var kE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperAxesLengthRatio(1)}}},[e._v("set to 1")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperAxesLengthRatio(1.6)}}},[e._v("set to 1.6")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};kE._withStripped=!0;const IE=ps({render:kE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("helperAxesLengthRatio")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperAxesLengthRatio.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperAxesLengthRatio.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-c1f676ca_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpHelperAxesLengthRatio.vue"},media:void 0})}),PE,undefined,false,undefined,!1,ms,void 0,void 0);const OE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useHelperGrid:!1},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseHelperGrid:function(e){this.opt.useHelperGrid=e}}};var BE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseHelperGrid(!0)}}},[e._v("show")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseHelperGrid(!1)}}},[e._v("hide")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};BE._withStripped=!0;const DE=ps({render:BE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useHelperGrid")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpUseHelperGrid.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpUseHelperGrid.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-966260c0_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpUseHelperGrid.vue"},media:void 0})}),OE,undefined,false,undefined,!1,ms,void 0,void 0);const UE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],helperGridLengthRatio:10},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setHelperGridLengthRatio:function(e){this.opt.helperGridLengthRatio=e}}};var FE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridLengthRatio(5)}}},[e._v("set to 5")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridLengthRatio(10)}}},[e._v("set to 10")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};FE._withStripped=!0;const NE=ps({render:FE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("helperGridLengthRatio")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridLengthRatio.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridLengthRatio.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-0ac267c2_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpHelperGridLengthRatio.vue"},media:void 0})}),UE,undefined,false,undefined,!1,ms,void 0,void 0);const zE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],helperGridDensity:100},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setHelperGridDensity:function(e){this.opt.helperGridDensity=e}}};var HE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridDensity(50)}}},[e._v("set to 50")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridDensity(100)}}},[e._v("set to 100")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};HE._withStripped=!0;const VE=ps({render:HE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("helperGridDensity")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridDensity.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridDensity.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-ec71c19a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpHelperGridDensity.vue"},media:void 0})}),zE,undefined,false,undefined,!1,ms,void 0,void 0);const WE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],helperGridPositionRatioZ:-.3},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setHelperGridPositionRatioZ:function(e){this.opt.helperGridPositionRatioZ=e}}};var jE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridPositionRatioZ(-1)}}},[e._v("set to -1")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setHelperGridPositionRatioZ(-.3)}}},[e._v("set to -0.3")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};jE._withStripped=!0;const GE=ps({render:jE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("helperGridPositionRatioZ")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridPositionRatioZ.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridPositionRatioZ.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-69ff9dfe_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppHpHelperGridPositionRatioZ.vue"},media:void 0})}),WE,undefined,false,undefined,!1,ms,void 0,void 0);const $E={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightPoint:!1,useLightDirection:!1,useLightAmbient:!0},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseLightAmbient:function(e){this.opt.useLightAmbient=e}}};var XE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightAmbient(!0)}}},[e._v("show")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightAmbient(!1)}}},[e._v("hide")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};XE._withStripped=!0;const YE=ps({render:XE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useLightAmbient")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtUseLightAmbient.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtUseLightAmbient.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-fad35af0_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtUseLightAmbient.vue"},media:void 0})}),$E,undefined,false,undefined,!1,ms,void 0,void 0);const qE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],lightAmbientColor:"#fff"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightAmbientColor:function(e){this.opt.lightAmbientColor=e}}};var ZE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightAmbientColor("#999")}}},[e._v("set to #999")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightAmbientColor("#fff")}}},[e._v("set to #fff")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};ZE._withStripped=!0;const JE=ps({render:ZE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightAmbientColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightAmbientColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightAmbientColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-20ae7118_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightAmbientColor.vue"},media:void 0})}),qE,undefined,false,undefined,!1,ms,void 0,void 0);const KE={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseLightPoint:function(e){this.opt.useLightPoint=e}}};var QE=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightPoint(!0)}}},[e._v("show")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightPoint(!1)}}},[e._v("hide")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};QE._withStripped=!0;const eL=ps({render:QE,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useLightPoint")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtUseLightPoint.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtUseLightPoint.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-059f1694_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtUseLightPoint.vue"},media:void 0})}),KE,undefined,false,undefined,!1,ms,void 0,void 0);const tL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0,lightPointPoss:[[3,3,3]]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightPointPoss:function(e){this.opt.lightPointPoss=e}}};var nL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointPoss([[5,5,5],[-5,5,5],[5,-5,5]])}}},[e._v("set to [[5,5,5],[-5,5,5],[5,-5,5]]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointPoss([[3,3,3]])}}},[e._v("set to [[3,3,3]]")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};nL._withStripped=!0;const rL=ps({render:nL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightPointPoss")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightPointPoss.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightPointPoss.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4847691d_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightPointPoss.vue"},media:void 0})}),tL,undefined,false,undefined,!1,ms,void 0,void 0);const iL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0,lightPointColor:"#fcc"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightPointColor:function(e){this.opt.lightPointColor=e}}};var oL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointColor("#fcc")}}},[e._v("set to #fcc")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointColor("#fff")}}},[e._v("set to #fff")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};oL._withStripped=!0;const sL=ps({render:oL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightPointColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightPointColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightPointColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-a591a9fa_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightPointColor.vue"},media:void 0})}),iL,undefined,false,undefined,!1,ms,void 0,void 0);const aL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0,lightPointIntensity:50},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightPointIntensity:function(e){this.opt.lightPointIntensity=e}}};var lL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointIntensity(100)}}},[e._v("set to 100")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointIntensity(50)}}},[e._v("set to 50")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};lL._withStripped=!0;const cL=ps({render:lL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightPointIntensity")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightPointIntensity.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightPointIntensity.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4dac4ee5_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightPointIntensity.vue"},media:void 0})}),aL,undefined,false,undefined,!1,ms,void 0,void 0);const uL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0,lightPointDistance:12},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightPointDistance:function(e){this.opt.lightPointDistance=e}}};var dL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointDistance(0)}}},[e._v("set to 0(no limit)")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointDistance(12)}}},[e._v("set to 12")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};dL._withStripped=!0;const hL=ps({render:dL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightPointDistance")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightPointDistance.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightPointDistance.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-9ecdc9d0_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightPointDistance.vue"},media:void 0})}),uL,undefined,false,undefined,!1,ms,void 0,void 0);const pL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightDirection:!1,useLightAmbient:!1,useLightPoint:!0,lightPointDecay:1.7},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightPointDecay:function(e){this.opt.lightPointDecay=e}}};var fL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointDecay(2)}}},[e._v("set to 2")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightPointDecay(1.7)}}},[e._v("set to 1.7")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};fL._withStripped=!0;const mL=ps({render:fL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightPointDecay")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightPointDecay.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightPointDecay.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-6e73aee9_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightPointDecay.vue"},media:void 0})}),pL,undefined,false,undefined,!1,ms,void 0,void 0);const gL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightAmbient:!1,useLightPoint:!1,useLightDirection:!0},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setUseLightDirection:function(e){this.opt.useLightDirection=e}}};var vL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightDirection(!0)}}},[e._v("show")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setUseLightDirection(!1)}}},[e._v("hide")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};vL._withStripped=!0;const yL=ps({render:vL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("useLightDirection")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtUseLightDirection.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtUseLightDirection.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-43ca2f76_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtUseLightDirection.vue"},media:void 0})}),gL,undefined,false,undefined,!1,ms,void 0,void 0);const _L={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightAmbient:!1,useLightPoint:!1,lightDirectionColor:"#fff"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightDirectionColor:function(e){this.opt.lightDirectionColor=e}}};var xL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionColor("#999")}}},[e._v("set to #999")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionColor("#fff")}}},[e._v("set to #fff")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};xL._withStripped=!0;const bL=ps({render:xL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightDirectionColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightDirectionColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightDirectionColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-5c7afb83_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightDirectionColor.vue"},media:void 0})}),_L,undefined,false,undefined,!1,ms,void 0,void 0);const SL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightAmbient:!1,useLightPoint:!1,lightDirectionIntensity:2},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightDirectionIntensity:function(e){this.opt.lightDirectionIntensity=e}}};var wL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionIntensity(3)}}},[e._v("set to 3")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionIntensity(2)}}},[e._v("set to 2")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};wL._withStripped=!0;const CL=ps({render:wL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightDirectionIntensity")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightDirectionIntensity.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightDirectionIntensity.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-092efb0e_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightDirectionIntensity.vue"},media:void 0})}),SL,undefined,false,undefined,!1,ms,void 0,void 0);const AL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],useLightAmbient:!1,useLightPoint:!1,lightDirectionPos:[12,5,6]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLightDirectionPos:function(e){this.opt.lightDirectionPos=e}}};var ML=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionPos([10,10,10])}}},[e._v("set to [10,10,10]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLightDirectionPos([12,5,6])}}},[e._v("set to [12,5,6]")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};ML._withStripped=!0;const TL=ps({render:ML,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("lightDirectionPos")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLtLightDirectionPos.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLtLightDirectionPos.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-5399bfa7_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLtLightDirectionPos.vue"},media:void 0})}),AL,undefined,false,undefined,!1,ms,void 0,void 0);const EL={components:{WThreejsVue:TT},data:function(){return{c:"",loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},getMeshsInfor:function(){let e=this;try{let t=e.$refs.thr.getInst().getMeshsInfor(),n=JSON.stringify(t,null,2);console.log("getMeshsInfor",t,n),e.c=n}catch(e){}}}};var LL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("div",{staticStyle:{"text-align":"right"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.getMeshsInfor()}}},[e._v("getMeshsInfor")])]),e._v(" "),e.c?n("div",{staticStyle:{margin:"0px 0px 0px 1px",padding:"5px","font-size":"0.75rem",color:"#000",background:"#eee"}},[n("pre",{staticStyle:{padding:"0px",margin:"0px"}},[e._v(e._s(e.c))])]):e._e()]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};LL._withStripped=!0;const RL=ps({render:LL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("getMeshsInfor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhGetMeshsInfor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhGetMeshsInfor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-57856566_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhGetMeshsInfor.vue"},media:void 0})}),EL,undefined,false,undefined,!1,ms,void 0,void 0);const PL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshVisible:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshVisible(e,t)}catch(e){}}}};var kL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshVisible(0,!0)}}},[e._v("show mesh[0]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshVisible(0,!1)}}},[e._v("hide mesh[0]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshVisible(1,!0)}}},[e._v("show mesh[1]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshVisible(1,!1)}}},[e._v("hide mesh[1]")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};kL._withStripped=!0;const IL=ps({render:kL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshVisible")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshVisible.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshVisible.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-f06f3bf8_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshVisible.vue"},media:void 0})}),PL,undefined,false,undefined,!1,ms,void 0,void 0);const OL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshColor:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshColor(e,t)}catch(e){}}}};var BL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshColor(0,"#f26")}}},[e._v("set mesh[0] color to '#f26'")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshColor(0,"#62f")}}},[e._v("set mesh[0] color to '#62f'")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};BL._withStripped=!0;const DL=ps({render:BL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-6d77531a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshColor.vue"},media:void 0})}),OL,undefined,false,undefined,!1,ms,void 0,void 0);const UL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshLabelVisible:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshLabelVisible(e,t)}catch(e){}}}};var FL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelVisible(0,!0)}}},[e._v("show label of mesh[0]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelVisible(0,!1)}}},[e._v("hide label of mesh[0]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelVisible(1,!0)}}},[e._v("show label of mesh[1]")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelVisible(1,!1)}}},[e._v("hide label of mesh[1]")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};FL._withStripped=!0;const NL=ps({render:FL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshLabelVisible")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshLabelVisible.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshLabelVisible.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-28cdbbd0_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshLabelVisible.vue"},media:void 0})}),UL,undefined,false,undefined,!1,ms,void 0,void 0);const zL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshLabelText:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshLabelText(e,t)}catch(e){}}}};var HL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelText(0,"Wheel Hub")}}},[e._v("set mesh[0] color to 'Wheel Hub'")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelText(0,"ABC")}}},[e._v("set mesh[0] color to 'ABC'")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};HL._withStripped=!0;const VL=ps({render:HL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshLabelText")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshLabelText.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshLabelText.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-a566ddcc_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshLabelText.vue"},media:void 0})}),zL,undefined,false,undefined,!1,ms,void 0,void 0);const WL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshLabelTextColor:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshLabelTextColor(e,t)}catch(e){}}}};var jL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextColor(0,"#fff")}}},[e._v("set mesh[0] color to '#fff'")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextColor(0,"#2ff")}}},[e._v("set mesh[0] color to '#2ff'")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};jL._withStripped=!0;const GL=ps({render:jL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshLabelTextColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshLabelTextColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshLabelTextColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-1dea5304_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshLabelTextColor.vue"},media:void 0})}),WL,undefined,false,undefined,!1,ms,void 0,void 0);const $L={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshLabelTextFontSize:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshLabelTextFontSize(e,t)}catch(e){}}}};var XL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextFontSize(0,"0.8rem")}}},[e._v("set mesh[0] color to '0.8rem'")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextFontSize(0,"1.0rem")}}},[e._v("set mesh[0] color to '1.0rem'")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};XL._withStripped=!0;const YL=ps({render:XL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshLabelTextFontSize")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshLabelTextFontSize.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshLabelTextFontSize.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-8de57430_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshLabelTextFontSize.vue"},media:void 0})}),$L,undefined,false,undefined,!1,ms,void 0,void 0);const qL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}]},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMeshLabelTextFontFamily:function(e,t){let n=this;try{n.$refs.thr.getInst().setMeshLabelTextFontFamily(e,t)}catch(e){}}}};var ZL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextFontFamily(0,"Microsoft JhengHei")}}},[e._v("set mesh[0] color to 'Microsoft JhengHei'")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMeshLabelTextFontFamily(0,"Arial")}}},[e._v("set mesh[0] color to 'Arial'")])]),e._v(" "),n("WThreejsVue",{ref:"thr",attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};ZL._withStripped=!0;const JL=ps({render:ZL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("setMeshLabelTextFontFamily")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMhSetMeshLabelTextFontFamily.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMhSetMeshLabelTextFontFamily.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-1c902244_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMhSetMeshLabelTextFontFamily.vue"},media:void 0})}),qL,undefined,false,undefined,!1,ms,void 0,void 0);const KL={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],legnedBackgroundColor:"rgba(10,10,10,0.5)"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLegnedBackgroundColor:function(e){this.opt.legnedBackgroundColor=e}}};var QL=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){e.setLegnedBackgroundColor("rgba(0,0,0,0.5)")}}},[e._v("set to rgba(0,0,0,0.5)")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){e.setLegnedBackgroundColor("rgba(10,10,10,0.7)")}}},[e._v("set to rgba(10,10,10,0.7)")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};QL._withStripped=!0;const eR=ps({render:QL,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("legnedBackgroundColor")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLgLegnedBackgroundColor.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLgLegnedBackgroundColor.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-03447404_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLgLegnedBackgroundColor.vue"},media:void 0})}),KL,undefined,false,undefined,!1,ms,void 0,void 0);const tR={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],legnedHeight:100},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLegnedHeight:function(e){this.opt.legnedHeight=e}}};var nR=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLegnedHeight(100)}}},[e._v("set to 100")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLegnedHeight(50)}}},[e._v("set to 50")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};nR._withStripped=!0;const rR=ps({render:nR,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("legnedHeight")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLgLegnedHeight.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLgLegnedHeight.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-62aef854_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLgLegnedHeight.vue"},media:void 0})}),tR,undefined,false,undefined,!1,ms,void 0,void 0);const iR={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],legnedHeightMax:100},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setLegnedHeightMax:function(e){this.opt.legnedHeightMax=e}}};var oR=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLegnedHeightMax(100)}}},[e._v("set to 100")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setLegnedHeightMax(50)}}},[e._v("set to 50")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};oR._withStripped=!0;const sR=ps({render:oR,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("legnedHeightMax")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppLgLegnedHeightMax.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppLgLegnedHeightMax.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-069e85ec_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppLgLegnedHeightMax.vue"},media:void 0})}),iR,undefined,false,undefined,!1,ms,void 0,void 0);const aR={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],menuSettingIcon:"fas fa-cog",menuAutoRotateIcon:"fas fa-history",menuAxesIcon:"fas fa-crosshairs",menuGridIcon:"fas fa-border-all",menuPerspectiveIcon:"fas fa-monument",menuLegendIcon:"fas fa-list"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMenuIconsMode1:function(){let e=this;e.opt.menuSettingIcon="mdi-cog-outline",e.opt.menuAutoRotateIcon="mdi-axis-z-rotate-counterclockwise",e.opt.menuAxesIcon="mdi-axis",e.opt.menuGridIcon="mdi-grid",e.opt.menuPerspectiveIcon="mdi-projector-screen-outline",e.opt.menuLegendIcon="mdi-list-box-outline"},setMenuIconsMode2:function(){let e=this;e.opt.menuSettingIcon="fas fa-cog",e.opt.menuAutoRotateIcon="fas fa-history",e.opt.menuAxesIcon="fas fa-crosshairs",e.opt.menuGridIcon="fas fa-border-all",e.opt.menuPerspectiveIcon="fas fa-monument",e.opt.menuLegendIcon="fas fa-list"},setMenuIcons:function(e){let t=this;2===e?t.setMenuIconsMode2():t.setMenuIconsMode1()}}};var lR=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMenuIcons(1)}}},[e._v("set to set(1)")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMenuIcons(2)}}},[e._v("set to set(2)")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};lR._withStripped=!0;const cR=ps({render:lR,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("menuIcons")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMuMenuIcons.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMuMenuIcons.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-2ab7bd82_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMuMenuIcons.vue"},media:void 0})}),aR,undefined,false,undefined,!1,ms,void 0,void 0);const uR={components:{WThreejsVue:TT},data:function(){return{loading:!0,opt:{width:800,height:600,items:[{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl",name:"Wheel Hub",color:"rgba(214, 92, 92, 0.9)"},{url:"https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl",name:"Ushape Connector",color:"rgba(214, 214, 92, 0.9)"}],menuSettingTooltip:"設定",menuAutoRotateTooltip:"自動旋轉",menuAxesTooltip:"座標軸",menuGridTooltip:"網格",menuPerspectiveTooltip:"透視投影",menuLegendTooltip:"圖例"},action:[]}},mounted:function(){this.showOptJson()},watch:{opt:{handler:function(){this.showOptJson()},deep:!0}},methods:{showOptJson:function(){LT(this.opt,document.querySelector("#optjson"),{expanded:!0})},setMenuTooltipsMode1:function(){let e=this;e.opt.menuSettingTooltip="Settings",e.opt.menuAutoRotateTooltip="Auto rotate",e.opt.menuAxesTooltip="Axes",e.opt.menuGridTooltip="Grid",e.opt.menuPerspectiveTooltip="Perspective",e.opt.menuLegendTooltip="Legend"},setMenuTooltipsMode2:function(){let e=this;e.opt.menuSettingTooltip="設定",e.opt.menuAutoRotateTooltip="自動旋轉",e.opt.menuAxesTooltip="座標軸",e.opt.menuGridTooltip="網格",e.opt.menuPerspectiveTooltip="透視投影",e.opt.menuLegendTooltip="圖例"},setMenuTooltips:function(e){let t=this;2===e?t.setMenuTooltipsMode2():t.setMenuTooltipsMode1()}}};var dR=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._m(0),e._v(" "),n("div",{staticStyle:{padding:"0px 20px"}},[n("div",{staticStyle:{display:"flex","padding-bottom":"40px","overflow-x":"auto"}},[n("div",{staticStyle:{position:"relative"}},[e.loading?e._e():n("div",{staticStyle:{position:"absolute",right:"2px",top:"1px","z-index":"1"}},[n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMenuTooltips(1)}}},[e._v("tooltip for English")]),e._v(" "),n("button",{staticStyle:{margin:"0px 3px 3px 0px"},on:{click:function(t){return e.setMenuTooltips(2)}}},[e._v("tooltip for 中文")])]),e._v(" "),n("WThreejsVue",{attrs:{opt:e.opt},on:{init:function(t){e.loading=!1}}})],1),e._v(" "),n("div",{staticStyle:{"padding-left":"20px"}},[n("div",{style:"border:1px solid #ddd; width:600px; min-width:600px; height:"+e.opt.height+"px; overflow-y:auto;"},[e._m(1)])])])])])};dR._withStripped=!0;var hR={components:{WListHorizontal:Ts,AppBasicSize:kT,AppBasicBackgroundColor:BT,AppBasicUseAutoRotate:FT,AppBasicAutoRotateDeg:HT,AppBasicUploadStl:eE,AppCmCameraType:rE,AppCmCameraFov:sE,AppCmCameraNear:cE,AppCmCameraFar:hE,AppCmCameraOrthographicRatio:mE,AppCmSetCameraAzimuthAngle:yE,AppCmSetCameraPolarAngle:bE,AppCmSetCameraViewAngle:CE,AppCmGetCameraViewAngle:TE,AppHpUseHelperAxes:RE,AppHpHelperAxesLengthRatio:IE,AppHpUseHelperGrid:DE,AppHpHelperGridLengthRatio:NE,AppHpHelperGridDensity:VE,AppHpHelperGridPositionRatioZ:GE,AppLtUseLightAmbient:YE,AppLtLightAmbientColor:JE,AppLtUseLightPoint:eL,AppLtLightPointPoss:rL,AppLtLightPointColor:sL,AppLtLightPointIntensity:cL,AppLtLightPointDistance:hL,AppLtLightPointDecay:mL,AppLtUseLightDirection:yL,AppLtLightDirectionColor:bL,AppLtLightDirectionIntensity:CL,AppLtLightDirectionPos:TL,AppMhGetMeshsInfor:RL,AppMhSetMeshVisible:IL,AppMhSetMeshColor:DL,AppMhSetMeshLabelVisible:NL,AppMhSetMeshLabelText:VL,AppMhSetMeshLabelTextColor:GL,AppMhSetMeshLabelTextFontSize:YL,AppMhSetMeshLabelTextFontFamily:JL,AppLgLegnedBackgroundColor:eR,AppLgLegnedHeight:rR,AppLgLegnedHeightMax:sR,AppMuMenuIcons:cR,AppMuMenuTooltips:ps({render:dR,staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{padding:"20px"}},[n("div",{staticStyle:{"font-size":"1.5rem"}},[e._v("menuTooltips")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppMuMenuTooltips.html",target:"_blank"}},[e._v("example")]),e._v(" "),n("a",{staticClass:"item-link",attrs:{href:"//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppMuMenuTooltips.html",target:"_blank"}},[e._v("code")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{"font-size":"10pt"},attrs:{id:"optjson"}})])}]},(function(e){e&&e("data-v-4987bdc3_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"AppMuMenuTooltips.vue"},media:void 0})}),uR,undefined,false,undefined,!1,ms,void 0,void 0)},data:function(){return{cmpsL1:[{name:"basic",cmps:[{name:"size"},{name:"backgroundColor"},{name:"useAutoRotate"},{name:"autoRotateDeg"},{name:"uploadStl"}]},{name:"camera",cmps:[{name:"cameraType"},{name:"cameraFov"},{name:"cameraNear"},{name:"cameraFar"},{name:"cameraOrthographicRatio"},{name:"setCameraAzimuthAngle"},{name:"setCameraPolarAngle"},{name:"setCameraViewAngle"},{name:"getCameraViewAngle"}]},{name:"helperAxes",cmps:[{name:"useHelperAxes"},{name:"helperAxesLengthRatio"}]},{name:"helperGrid",cmps:[{name:"useHelperGrid"},{name:"helperGridLengthRatio"},{name:"helperGridDensity"},{name:"helperGridPositionRatioZ"}]},{name:"lightAmbient",cmps:[{name:"useLightAmbient"},{name:"lightAmbientColor"}]},{name:"lightPoint",cmps:[{name:"useLightPoint"},{name:"lightPointPoss"},{name:"lightPointColor"},{name:"lightPointIntensity"},{name:"lightPointDistance"},{name:"lightPointDecay"}]},{name:"lightDirection",cmps:[{name:"useLightDirection"},{name:"lightDirectionColor"},{name:"lightDirectionIntensity"},{name:"lightDirectionPos"}]},{name:"mesh",cmps:[{name:"getMeshsInfor"},{name:"setMeshVisible"},{name:"setMeshColor"},{name:"setMeshLabelVisible"},{name:"setMeshLabelText"},{name:"setMeshLabelTextColor"},{name:"setMeshLabelTextFontSize"},{name:"setMeshLabelTextFontFamily"}]},{name:"menu",cmps:[{name:"menuIcons"},{name:"menuTooltips"}]},{name:"legend",cmps:[{name:"legnedBackgroundColor"},{name:"legnedHeight"},{name:"legnedHeightMax"}]}],indP1:null,cmpP1:null,cmpsL2:null,indP2:null,cmpP2:null,cmpsL3:null,indP3:null,cmpP3:null,cmpsL4:null,cmpPick:""}},mounted:function(){let e=this;e.indP1=0,e.indP2=0,e.indP3=0;let t=function(e){if(!$n(e))return{};if(!$n(e=me(e=Ct(e,"?"),"[1]")))return{};let t=Ct(e,"&");return t=jn(t,(function(e){return Ct(e,"=")})),t=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(t),t}(location.href);e.viewPick(me(t,"cmp",""))},computed:{changeMenus:function(){let e=this;return e.modifyMenus(e.indP1,e.indP2,e.indP3),""},isNarrow:function(){return window.innerWidth<1e3}},methods:{modifyMenus:function(){let e=this,t="";setTimeout((()=>{e.cmpP1=me(e.cmpsL1,e.indP1,{}),e.cmpsL2=me(e.cmpP1,"cmps",[]);let n=me(e.cmpP1,"name","");n&&(t=n)}),50),setTimeout((()=>{let n=me(e.cmpP1,"cmps",[]);e.cmpP2=me(n,e.indP2,{}),e.cmpsL3=me(e.cmpP2,"cmps",[]);let r=me(e.cmpP2,"name","");r&&(t=r)}),100),setTimeout((()=>{let n=me(e.cmpP2,"cmps",[]);e.cmpP3=me(n,e.indP3,{}),e.cmpsL4=me(e.cmpP3,"cmps",[]);let r=me(e.cmpP3,"name","");r&&(t=r),e.cmpPick=t}),150)},getInd:function(e,t){let n=-1;return nt(t,((t,r)=>{if(e.name===t.name)return n=r,!1})),n},viewPick:function(e){let t=this,n=e,r="",i=[],o=e=>{nt(e,((e,t)=>{i.push(t);let s=me(e,"name",""),a=me(e,"cmps",[]);i.join("."),s===n&&(r=JSON.parse(JSON.stringify(i))),a.length>0&&o(a),i.pop()}))};o(t.cmpsL1),t.indP1=me(r,0,0),t.indP2=me(r,1,0),t.indP3=me(r,2,0)}}};const pR=hR;var fR=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{changeMenus:e.changeMenus}},[e.isNarrow?e._e():[n("a",{staticClass:"github-corner",staticStyle:{position:"fixed",top:"0",right:"0",border:"0","z-index":"10000"},attrs:{href:"https://github.com/yuda-lyu/w-plot-vue","aria-label":"View source on GitHub",target:"_blank",rel:"noreferrer noopener"}},[n("svg",{staticStyle:{fill:"rgba(0,0,0,0.25)",color:"#fff",position:"absolute",top:"0",border:"0",right:"0"},attrs:{width:"80",height:"80",viewBox:"0 0 250 250","aria-hidden":"true"}},[n("path",{attrs:{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}}),n("path",{staticClass:"octo-arm",staticStyle:{"transform-origin":"130px 106px"},attrs:{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor"}}),n("path",{staticClass:"octo-body",attrs:{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor"}})])])],e._v(" "),n("div",{staticStyle:{background:"#f5f5f5"}},[e.cmpsL1&&e.cmpsL1.length>0?n("div",{staticStyle:{width:"calc( 100vw - 20px )","overflow-x":"auto"}},[n("WListHorizontal",{attrs:{items:e.cmpsL1,itemActive:e.cmpP1,itemBackgroundColor:"transparent",itemBackgroundColorHover:"#eee",itemBackgroundColorActive:"#eee",keyText:"name",paddingStyle:{v:12,h:20}},on:{"update:itemActive":[function(t){e.cmpP1=t},function(t){e.indP3=0,e.indP2=0,e.indP1=e.getInd(t,e.cmpsL1)}],"update:item-active":function(t){e.cmpP1=t}},scopedSlots:e._u([{key:"item",fn:function(t){return[n("div",{},[e._v("\n "+e._s(t.item.name)+"\n ")])]}}],null,!1,474938045)}),e._v(" "),n("div",{staticStyle:{height:"1px",background:"#ddd"}})],1):e._e(),e._v(" "),e.cmpsL2&&e.cmpsL2.length>0?n("div",{staticStyle:{width:"calc( 100vw - 20px )","overflow-x":"auto"}},[n("div",{staticStyle:{height:"3px",background:"#fff"}}),e._v(" "),n("WListHorizontal",{attrs:{items:e.cmpsL2,itemActive:e.cmpP2,itemBackgroundColor:"transparent",itemBackgroundColorHover:"#eee",itemBackgroundColorActive:"#eee",keyText:"name",paddingStyle:{v:12,h:20}},on:{"update:itemActive":[function(t){e.cmpP2=t},function(t){e.indP3=0,e.indP2=e.getInd(t,e.cmpsL2)}],"update:item-active":function(t){e.cmpP2=t}},scopedSlots:e._u([{key:"item",fn:function(t){return[n("div",{},[e._v("\n "+e._s(t.item.name)+"\n ")])]}}],null,!1,474938045)}),e._v(" "),n("div",{staticStyle:{height:"1px",background:"#ddd"}})],1):e._e(),e._v(" "),e.cmpsL3&&e.cmpsL3.length>0?n("div",{staticStyle:{width:"calc( 100vw - 20px )","overflow-x":"auto"}},[n("div",{staticStyle:{height:"3px",background:"#fff"}}),e._v(" "),n("WListHorizontal",{attrs:{items:e.cmpsL3,itemActive:e.cmpP3,itemBackgroundColor:"transparent",itemBackgroundColorHover:"#eee",itemBackgroundColorActive:"#eee",keyText:"name",paddingStyle:{v:12,h:20}},on:{"update:itemActive":[function(t){e.cmpP3=t},function(t){e.indP3=e.getInd(t,e.cmpsL3)}],"update:item-active":function(t){e.cmpP3=t}},scopedSlots:e._u([{key:"item",fn:function(t){return[n("div",{},[e._v("\n "+e._s(t.item.name)+"\n ")])]}}],null,!1,474938045)}),e._v(" "),n("div",{staticStyle:{height:"1px",background:"#ddd"}})],1):e._e()]),e._v(" "),n("div",{staticStyle:{padding:"20px"}},["size"===e.cmpPick?n("AppBasicSize"):e._e(),e._v(" "),"backgroundColor"===e.cmpPick?n("AppBasicBackgroundColor"):e._e(),e._v(" "),"useAutoRotate"===e.cmpPick?n("AppBasicUseAutoRotate"):e._e(),e._v(" "),"autoRotateDeg"===e.cmpPick?n("AppBasicAutoRotateDeg"):e._e(),e._v(" "),"uploadStl"===e.cmpPick?n("AppBasicUploadStl"):e._e(),e._v(" "),"cameraType"===e.cmpPick?n("AppCmCameraType"):e._e(),e._v(" "),"cameraFov"===e.cmpPick?n("AppCmCameraFov"):e._e(),e._v(" "),"cameraNear"===e.cmpPick?n("AppCmCameraNear"):e._e(),e._v(" "),"cameraFar"===e.cmpPick?n("AppCmCameraFar"):e._e(),e._v(" "),"cameraOrthographicRatio"===e.cmpPick?n("AppCmCameraOrthographicRatio"):e._e(),e._v(" "),"setCameraAzimuthAngle"===e.cmpPick?n("AppCmSetCameraAzimuthAngle"):e._e(),e._v(" "),"setCameraPolarAngle"===e.cmpPick?n("AppCmSetCameraPolarAngle"):e._e(),e._v(" "),"setCameraViewAngle"===e.cmpPick?n("AppCmSetCameraViewAngle"):e._e(),e._v(" "),"getCameraViewAngle"===e.cmpPick?n("AppCmGetCameraViewAngle"):e._e(),e._v(" "),"useHelperAxes"===e.cmpPick?n("AppHpUseHelperAxes"):e._e(),e._v(" "),"helperAxesLengthRatio"===e.cmpPick?n("AppHpHelperAxesLengthRatio"):e._e(),e._v(" "),"useHelperGrid"===e.cmpPick?n("AppHpUseHelperGrid"):e._e(),e._v(" "),"helperGridLengthRatio"===e.cmpPick?n("AppHpHelperGridLengthRatio"):e._e(),e._v(" "),"helperGridDensity"===e.cmpPick?n("AppHpHelperGridDensity"):e._e(),e._v(" "),"helperGridPositionRatioZ"===e.cmpPick?n("AppHpHelperGridPositionRatioZ"):e._e(),e._v(" "),"useLightAmbient"===e.cmpPick?n("AppLtUseLightAmbient"):e._e(),e._v(" "),"lightAmbientColor"===e.cmpPick?n("AppLtLightAmbientColor"):e._e(),e._v(" "),"useLightPoint"===e.cmpPick?n("AppLtUseLightPoint"):e._e(),e._v(" "),"lightPointPoss"===e.cmpPick?n("AppLtLightPointPoss"):e._e(),e._v(" "),"lightPointColor"===e.cmpPick?n("AppLtLightPointColor"):e._e(),e._v(" "),"lightPointIntensity"===e.cmpPick?n("AppLtLightPointIntensity"):e._e(),e._v(" "),"lightPointDistance"===e.cmpPick?n("AppLtLightPointDistance"):e._e(),e._v(" "),"lightPointDecay"===e.cmpPick?n("AppLtLightPointDecay"):e._e(),e._v(" "),"useLightDirection"===e.cmpPick?n("AppLtUseLightDirection"):e._e(),e._v(" "),"lightDirectionColor"===e.cmpPick?n("AppLtLightDirectionColor"):e._e(),e._v(" "),"lightDirectionIntensity"===e.cmpPick?n("AppLtLightDirectionIntensity"):e._e(),e._v(" "),"lightDirectionPos"===e.cmpPick?n("AppLtLightDirectionPos"):e._e(),e._v(" "),"getMeshsInfor"===e.cmpPick?n("AppMhGetMeshsInfor"):e._e(),e._v(" "),"setMeshVisible"===e.cmpPick?n("AppMhSetMeshVisible"):e._e(),e._v(" "),"setMeshColor"===e.cmpPick?n("AppMhSetMeshColor"):e._e(),e._v(" "),"setMeshLabelVisible"===e.cmpPick?n("AppMhSetMeshLabelVisible"):e._e(),e._v(" "),"setMeshLabelText"===e.cmpPick?n("AppMhSetMeshLabelText"):e._e(),e._v(" "),"setMeshLabelTextColor"===e.cmpPick?n("AppMhSetMeshLabelTextColor"):e._e(),e._v(" "),"setMeshLabelTextFontSize"===e.cmpPick?n("AppMhSetMeshLabelTextFontSize"):e._e(),e._v(" "),"setMeshLabelTextFontFamily"===e.cmpPick?n("AppMhSetMeshLabelTextFontFamily"):e._e(),e._v(" "),"legnedBackgroundColor"===e.cmpPick?n("AppLgLegnedBackgroundColor"):e._e(),e._v(" "),"legnedHeight"===e.cmpPick?n("AppLgLegnedHeight"):e._e(),e._v(" "),"legnedHeightMax"===e.cmpPick?n("AppLgLegnedHeightMax"):e._e(),e._v(" "),"menuIcons"===e.cmpPick?n("AppMuMenuIcons"):e._e(),e._v(" "),"menuTooltips"===e.cmpPick?n("AppMuMenuTooltips"):e._e()],1)],2)};fR._withStripped=!0;return ps({render:fR,staticRenderFns:[]},(function(e){e&&e("data-v-2af97fc9_0",{source:"\n.item-link {\r\n display: inline-block;\r\n margin: 10px 10px 0px 0px;\r\n padding: 5px 10px;\r\n font-size: 0.8rem;\r\n color: #fff;\r\n background-color: #443a65;\r\n cursor: pointer;\r\n text-decoration: none;\n}\n.option-label {\r\n position:absolute;\r\n left:10px;\r\n top:-33px;\r\n padding:4px 20px 7px 20px;\r\n border-left:1px solid #ddd;\r\n border-top:1px solid #ddd;\r\n border-right:1px solid #ddd;\r\n border-bottom:1px solid #f6f6f6;\r\n border-top-left-radius:15px;\r\n border-top-right-radius:15px;\r\n background:#f6f6f6;\n}\r\n",map:{version:3,sources:["D:\\- 006 - 開源\\開源-JS-105-3-w-threejs-vue\\w-threejs-vue\\src\\App.vue"],names:[],mappings:";AAsiBA;IACA,qBAAA;IACA,yBAAA;IACA,iBAAA;IACA,iBAAA;IACA,WAAA;IACA,yBAAA;IACA,eAAA;IACA,qBAAA;AACA;AACA;IACA,iBAAA;IACA,SAAA;IACA,SAAA;IACA,yBAAA;IACA,0BAAA;IACA,yBAAA;IACA,2BAAA;IACA,+BAAA;IACA,2BAAA;IACA,4BAAA;IACA,kBAAA;AACA",file:"App.vue",sourcesContent:["<template>\r\n <div\r\n style=\"\"\r\n :changeMenus=\"changeMenus\"\r\n >\r\n\r\n\r\n <template v-if=\"!isNarrow\">\r\n <a href=\"https://github.com/yuda-lyu/w-plot-vue\" class=\"github-corner\" style=\"position:fixed; top:0; right:0; border:0; z-index:10000;\" aria-label=\"View source on GitHub\" target=\"_blank\" rel=\"noreferrer noopener\">\r\n <svg width=\"80\" height=\"80\" viewBox=\"0 0 250 250\" style=\"fill:rgba(0,0,0,0.25); color:#fff; position: absolute; top: 0; border: 0; right: 0;\" aria-hidden=\"true\"><path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\"></path><path d=\"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2\" fill=\"currentColor\" style=\"transform-origin: 130px 106px;\" class=\"octo-arm\"></path><path d=\"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z\" fill=\"currentColor\" class=\"octo-body\"></path></svg>\r\n </a>\r\n </template>\r\n\r\n\r\n <div style=\"background:#f5f5f5;\">\r\n\r\n <div style=\"width:calc( 100vw - 20px ); overflow-x:auto;\" v-if=\"cmpsL1 && cmpsL1.length>0\">\r\n <WListHorizontal\r\n :items=\"cmpsL1\"\r\n :itemActive.sync=\"cmpP1\"\r\n :itemBackgroundColor=\"'transparent'\"\r\n :itemBackgroundColorHover=\"'#eee'\"\r\n :itemBackgroundColorActive=\"'#eee'\"\r\n :keyText=\"'name'\"\r\n :paddingStyle=\"{v:12,h:20}\"\r\n @update:itemActive=\"(v)=>{indP3=0;indP2=0;indP1=getInd(v,cmpsL1)}\"\r\n >\r\n <template v-slot:item=\"props\">\r\n <div style=\"\">\r\n {{props.item.name}}\r\n </div>\r\n </template>\r\n </WListHorizontal>\r\n <div style=\"height:1px; background:#ddd;\"></div>\r\n </div>\r\n\r\n\r\n <div style=\"width:calc( 100vw - 20px ); overflow-x:auto;\" v-if=\"cmpsL2 && cmpsL2.length>0\">\r\n <div style=\"height:3px; background:#fff;\"></div>\r\n <WListHorizontal\r\n :items=\"cmpsL2\"\r\n :itemActive.sync=\"cmpP2\"\r\n :itemBackgroundColor=\"'transparent'\"\r\n :itemBackgroundColorHover=\"'#eee'\"\r\n :itemBackgroundColorActive=\"'#eee'\"\r\n :keyText=\"'name'\"\r\n :paddingStyle=\"{v:12,h:20}\"\r\n @update:itemActive=\"(v)=>{indP3=0;indP2=getInd(v,cmpsL2)}\"\r\n >\r\n <template v-slot:item=\"props\">\r\n <div style=\"\">\r\n {{props.item.name}}\r\n </div>\r\n </template>\r\n </WListHorizontal>\r\n <div style=\"height:1px; background:#ddd;\"></div>\r\n </div>\r\n\r\n <div style=\"width:calc( 100vw - 20px ); overflow-x:auto;\" v-if=\"cmpsL3 && cmpsL3.length>0\">\r\n <div style=\"height:3px; background:#fff;\"></div>\r\n <WListHorizontal\r\n :items=\"cmpsL3\"\r\n :itemActive.sync=\"cmpP3\"\r\n :itemBackgroundColor=\"'transparent'\"\r\n :itemBackgroundColorHover=\"'#eee'\"\r\n :itemBackgroundColorActive=\"'#eee'\"\r\n :keyText=\"'name'\"\r\n :paddingStyle=\"{v:12,h:20}\"\r\n @update:itemActive=\"(v)=>{indP3=getInd(v,cmpsL3)}\"\r\n >\r\n <template v-slot:item=\"props\">\r\n <div style=\"\">\r\n {{props.item.name}}\r\n </div>\r\n </template>\r\n </WListHorizontal>\r\n <div style=\"height:1px; background:#ddd;\"></div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div style=\"padding:20px;\">\r\n\r\n <AppBasicSize v-if=\"cmpPick==='size'\"></AppBasicSize>\r\n\r\n <AppBasicBackgroundColor v-if=\"cmpPick==='backgroundColor'\"></AppBasicBackgroundColor>\r\n\r\n <AppBasicUseAutoRotate v-if=\"cmpPick==='useAutoRotate'\"></AppBasicUseAutoRotate>\r\n\r\n <AppBasicAutoRotateDeg v-if=\"cmpPick==='autoRotateDeg'\"></AppBasicAutoRotateDeg>\r\n\r\n <AppBasicUploadStl v-if=\"cmpPick==='uploadStl'\"></AppBasicUploadStl>\r\n\r\n <AppCmCameraType v-if=\"cmpPick==='cameraType'\"></AppCmCameraType>\r\n\r\n <AppCmCameraFov v-if=\"cmpPick==='cameraFov'\"></AppCmCameraFov>\r\n\r\n <AppCmCameraNear v-if=\"cmpPick==='cameraNear'\"></AppCmCameraNear>\r\n\r\n <AppCmCameraFar v-if=\"cmpPick==='cameraFar'\"></AppCmCameraFar>\r\n\r\n <AppCmCameraOrthographicRatio v-if=\"cmpPick==='cameraOrthographicRatio'\"></AppCmCameraOrthographicRatio>\r\n\r\n <AppCmSetCameraAzimuthAngle v-if=\"cmpPick==='setCameraAzimuthAngle'\"></AppCmSetCameraAzimuthAngle>\r\n\r\n <AppCmSetCameraPolarAngle v-if=\"cmpPick==='setCameraPolarAngle'\"></AppCmSetCameraPolarAngle>\r\n\r\n <AppCmSetCameraViewAngle v-if=\"cmpPick==='setCameraViewAngle'\"></AppCmSetCameraViewAngle>\r\n\r\n <AppCmGetCameraViewAngle v-if=\"cmpPick==='getCameraViewAngle'\"></AppCmGetCameraViewAngle>\r\n\r\n <AppHpUseHelperAxes v-if=\"cmpPick==='useHelperAxes'\"></AppHpUseHelperAxes>\r\n\r\n <AppHpHelperAxesLengthRatio v-if=\"cmpPick==='helperAxesLengthRatio'\"></AppHpHelperAxesLengthRatio>\r\n\r\n <AppHpUseHelperGrid v-if=\"cmpPick==='useHelperGrid'\"></AppHpUseHelperGrid>\r\n\r\n <AppHpHelperGridLengthRatio v-if=\"cmpPick==='helperGridLengthRatio'\"></AppHpHelperGridLengthRatio>\r\n\r\n <AppHpHelperGridDensity v-if=\"cmpPick==='helperGridDensity'\"></AppHpHelperGridDensity>\r\n\r\n <AppHpHelperGridPositionRatioZ v-if=\"cmpPick==='helperGridPositionRatioZ'\"></AppHpHelperGridPositionRatioZ>\r\n\r\n <AppLtUseLightAmbient v-if=\"cmpPick==='useLightAmbient'\"></AppLtUseLightAmbient>\r\n\r\n <AppLtLightAmbientColor v-if=\"cmpPick==='lightAmbientColor'\"></AppLtLightAmbientColor>\r\n\r\n <AppLtUseLightPoint v-if=\"cmpPick==='useLightPoint'\"></AppLtUseLightPoint>\r\n\r\n <AppLtLightPointPoss v-if=\"cmpPick==='lightPointPoss'\"></AppLtLightPointPoss>\r\n\r\n <AppLtLightPointColor v-if=\"cmpPick==='lightPointColor'\"></AppLtLightPointColor>\r\n\r\n <AppLtLightPointIntensity v-if=\"cmpPick==='lightPointIntensity'\"></AppLtLightPointIntensity>\r\n\r\n <AppLtLightPointDistance v-if=\"cmpPick==='lightPointDistance'\"></AppLtLightPointDistance>\r\n\r\n <AppLtLightPointDecay v-if=\"cmpPick==='lightPointDecay'\"></AppLtLightPointDecay>\r\n\r\n <AppLtUseLightDirection v-if=\"cmpPick==='useLightDirection'\"></AppLtUseLightDirection>\r\n\r\n <AppLtLightDirectionColor v-if=\"cmpPick==='lightDirectionColor'\"></AppLtLightDirectionColor>\r\n\r\n <AppLtLightDirectionIntensity v-if=\"cmpPick==='lightDirectionIntensity'\"></AppLtLightDirectionIntensity>\r\n\r\n <AppLtLightDirectionPos v-if=\"cmpPick==='lightDirectionPos'\"></AppLtLightDirectionPos>\r\n\r\n <AppMhGetMeshsInfor v-if=\"cmpPick==='getMeshsInfor'\"></AppMhGetMeshsInfor>\r\n\r\n <AppMhSetMeshVisible v-if=\"cmpPick==='setMeshVisible'\"></AppMhSetMeshVisible>\r\n\r\n <AppMhSetMeshColor v-if=\"cmpPick==='setMeshColor'\"></AppMhSetMeshColor>\r\n\r\n <AppMhSetMeshLabelVisible v-if=\"cmpPick==='setMeshLabelVisible'\"></AppMhSetMeshLabelVisible>\r\n\r\n <AppMhSetMeshLabelText v-if=\"cmpPick==='setMeshLabelText'\"></AppMhSetMeshLabelText>\r\n\r\n <AppMhSetMeshLabelTextColor v-if=\"cmpPick==='setMeshLabelTextColor'\"></AppMhSetMeshLabelTextColor>\r\n\r\n <AppMhSetMeshLabelTextFontSize v-if=\"cmpPick==='setMeshLabelTextFontSize'\"></AppMhSetMeshLabelTextFontSize>\r\n\r\n <AppMhSetMeshLabelTextFontFamily v-if=\"cmpPick==='setMeshLabelTextFontFamily'\"></AppMhSetMeshLabelTextFontFamily>\r\n\r\n <AppLgLegnedBackgroundColor v-if=\"cmpPick==='legnedBackgroundColor'\"></AppLgLegnedBackgroundColor>\r\n\r\n <AppLgLegnedHeight v-if=\"cmpPick==='legnedHeight'\"></AppLgLegnedHeight>\r\n\r\n <AppLgLegnedHeightMax v-if=\"cmpPick==='legnedHeightMax'\"></AppLgLegnedHeightMax>\r\n\r\n <AppMuMenuIcons v-if=\"cmpPick==='menuIcons'\"></AppMuMenuIcons>\r\n\r\n <AppMuMenuTooltips v-if=\"cmpPick==='menuTooltips'\"></AppMuMenuTooltips>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport get from 'lodash-es/get'\r\nimport each from 'lodash-es/each'\r\n// import cloneDeep from 'lodash-es/cloneDeep'\r\nimport urlParse from 'wsemi/src/urlParse.mjs'\r\nimport WListHorizontal from 'w-component-vue/src/components/WListHorizontal.vue'\r\nimport AppBasicSize from './AppBasicSize.vue'\r\nimport AppBasicBackgroundColor from './AppBasicBackgroundColor.vue'\r\nimport AppBasicUseAutoRotate from './AppBasicUseAutoRotate.vue'\r\nimport AppBasicAutoRotateDeg from './AppBasicAutoRotateDeg.vue'\r\nimport AppBasicUploadStl from './AppBasicUploadStl.vue'\r\nimport AppCmCameraType from './AppCmCameraType.vue'\r\nimport AppCmCameraFov from './AppCmCameraFov.vue'\r\nimport AppCmCameraNear from './AppCmCameraNear.vue'\r\nimport AppCmCameraFar from './AppCmCameraFar.vue'\r\nimport AppCmCameraOrthographicRatio from './AppCmCameraOrthographicRatio.vue'\r\nimport AppCmSetCameraAzimuthAngle from './AppCmSetCameraAzimuthAngle.vue'\r\nimport AppCmSetCameraPolarAngle from './AppCmSetCameraPolarAngle.vue'\r\nimport AppCmSetCameraViewAngle from './AppCmSetCameraViewAngle.vue'\r\nimport AppCmGetCameraViewAngle from './AppCmGetCameraViewAngle.vue'\r\nimport AppHpUseHelperAxes from './AppHpUseHelperAxes.vue'\r\nimport AppHpHelperAxesLengthRatio from './AppHpHelperAxesLengthRatio.vue'\r\nimport AppHpUseHelperGrid from './AppHpUseHelperGrid.vue'\r\nimport AppHpHelperGridLengthRatio from './AppHpHelperGridLengthRatio.vue'\r\nimport AppHpHelperGridDensity from './AppHpHelperGridDensity.vue'\r\nimport AppHpHelperGridPositionRatioZ from './AppHpHelperGridPositionRatioZ.vue'\r\nimport AppLtUseLightAmbient from './AppLtUseLightAmbient.vue'\r\nimport AppLtLightAmbientColor from './AppLtLightAmbientColor.vue'\r\nimport AppLtUseLightPoint from './AppLtUseLightPoint.vue'\r\nimport AppLtLightPointPoss from './AppLtLightPointPoss.vue'\r\nimport AppLtLightPointColor from './AppLtLightPointColor.vue'\r\nimport AppLtLightPointIntensity from './AppLtLightPointIntensity.vue'\r\nimport AppLtLightPointDistance from './AppLtLightPointDistance.vue'\r\nimport AppLtLightPointDecay from './AppLtLightPointDecay.vue'\r\nimport AppLtUseLightDirection from './AppLtUseLightDirection.vue'\r\nimport AppLtLightDirectionColor from './AppLtLightDirectionColor.vue'\r\nimport AppLtLightDirectionIntensity from './AppLtLightDirectionIntensity.vue'\r\nimport AppLtLightDirectionPos from './AppLtLightDirectionPos.vue'\r\nimport AppMhGetMeshsInfor from './AppMhGetMeshsInfor.vue'\r\nimport AppMhSetMeshVisible from './AppMhSetMeshVisible.vue'\r\nimport AppMhSetMeshColor from './AppMhSetMeshColor.vue'\r\nimport AppMhSetMeshLabelVisible from './AppMhSetMeshLabelVisible.vue'\r\nimport AppMhSetMeshLabelText from './AppMhSetMeshLabelText.vue'\r\nimport AppMhSetMeshLabelTextColor from './AppMhSetMeshLabelTextColor.vue'\r\nimport AppMhSetMeshLabelTextFontSize from './AppMhSetMeshLabelTextFontSize.vue'\r\nimport AppMhSetMeshLabelTextFontFamily from './AppMhSetMeshLabelTextFontFamily.vue'\r\nimport AppLgLegnedBackgroundColor from './AppLgLegnedBackgroundColor.vue'\r\nimport AppLgLegnedHeight from './AppLgLegnedHeight.vue'\r\nimport AppLgLegnedHeightMax from './AppLgLegnedHeightMax.vue'\r\nimport AppMuMenuIcons from './AppMuMenuIcons.vue'\r\nimport AppMuMenuTooltips from './AppMuMenuTooltips.vue'\r\n\r\n\r\nexport default {\r\n components: {\r\n WListHorizontal,\r\n AppBasicSize,\r\n AppBasicBackgroundColor,\r\n AppBasicUseAutoRotate,\r\n AppBasicAutoRotateDeg,\r\n AppBasicUploadStl,\r\n AppCmCameraType,\r\n AppCmCameraFov,\r\n AppCmCameraNear,\r\n AppCmCameraFar,\r\n AppCmCameraOrthographicRatio,\r\n AppCmSetCameraAzimuthAngle,\r\n AppCmSetCameraPolarAngle,\r\n AppCmSetCameraViewAngle,\r\n AppCmGetCameraViewAngle,\r\n AppHpUseHelperAxes,\r\n AppHpHelperAxesLengthRatio,\r\n AppHpUseHelperGrid,\r\n AppHpHelperGridLengthRatio,\r\n AppHpHelperGridDensity,\r\n AppHpHelperGridPositionRatioZ,\r\n AppLtUseLightAmbient,\r\n AppLtLightAmbientColor,\r\n AppLtUseLightPoint,\r\n AppLtLightPointPoss,\r\n AppLtLightPointColor,\r\n AppLtLightPointIntensity,\r\n AppLtLightPointDistance,\r\n AppLtLightPointDecay,\r\n AppLtUseLightDirection,\r\n AppLtLightDirectionColor,\r\n AppLtLightDirectionIntensity,\r\n AppLtLightDirectionPos,\r\n AppMhGetMeshsInfor,\r\n AppMhSetMeshVisible,\r\n AppMhSetMeshColor,\r\n AppMhSetMeshLabelVisible,\r\n AppMhSetMeshLabelText,\r\n AppMhSetMeshLabelTextColor,\r\n AppMhSetMeshLabelTextFontSize,\r\n AppMhSetMeshLabelTextFontFamily,\r\n AppLgLegnedBackgroundColor,\r\n AppLgLegnedHeight,\r\n AppLgLegnedHeightMax,\r\n AppMuMenuIcons,\r\n AppMuMenuTooltips,\r\n },\r\n data: function() {\r\n let cmps = [\r\n {\r\n name: 'basic',\r\n cmps: [\r\n { name: 'size' },\r\n { name: 'backgroundColor' },\r\n { name: 'useAutoRotate' },\r\n { name: 'autoRotateDeg' },\r\n { name: 'uploadStl' },\r\n ],\r\n },\r\n {\r\n name: 'camera',\r\n cmps: [\r\n { name: 'cameraType' },\r\n { name: 'cameraFov' },\r\n { name: 'cameraNear' },\r\n { name: 'cameraFar' },\r\n { name: 'cameraOrthographicRatio' },\r\n { name: 'setCameraAzimuthAngle' },\r\n { name: 'setCameraPolarAngle' },\r\n { name: 'setCameraViewAngle' },\r\n { name: 'getCameraViewAngle' },\r\n ],\r\n },\r\n {\r\n name: 'helperAxes',\r\n cmps: [\r\n { name: 'useHelperAxes' },\r\n { name: 'helperAxesLengthRatio' },\r\n ],\r\n },\r\n {\r\n name: 'helperGrid',\r\n cmps: [\r\n { name: 'useHelperGrid' },\r\n { name: 'helperGridLengthRatio' },\r\n { name: 'helperGridDensity' },\r\n { name: 'helperGridPositionRatioZ' },\r\n ],\r\n },\r\n {\r\n name: 'lightAmbient',\r\n cmps: [\r\n { name: 'useLightAmbient' },\r\n { name: 'lightAmbientColor' },\r\n ],\r\n },\r\n {\r\n name: 'lightPoint',\r\n cmps: [\r\n { name: 'useLightPoint' },\r\n { name: 'lightPointPoss' },\r\n { name: 'lightPointColor' },\r\n { name: 'lightPointIntensity' },\r\n { name: 'lightPointDistance' },\r\n { name: 'lightPointDecay' },\r\n ],\r\n },\r\n {\r\n name: 'lightDirection',\r\n cmps: [\r\n { name: 'useLightDirection' },\r\n { name: 'lightDirectionColor' },\r\n { name: 'lightDirectionIntensity' },\r\n { name: 'lightDirectionPos' },\r\n ],\r\n },\r\n {\r\n name: 'mesh',\r\n cmps: [\r\n { name: 'getMeshsInfor' },\r\n { name: 'setMeshVisible' },\r\n { name: 'setMeshColor' },\r\n { name: 'setMeshLabelVisible' },\r\n { name: 'setMeshLabelText' },\r\n { name: 'setMeshLabelTextColor' },\r\n { name: 'setMeshLabelTextFontSize' },\r\n { name: 'setMeshLabelTextFontFamily' },\r\n ],\r\n },\r\n {\r\n name: 'menu',\r\n cmps: [\r\n { name: 'menuIcons' },\r\n { name: 'menuTooltips' },\r\n ],\r\n },\r\n {\r\n name: 'legend',\r\n cmps: [\r\n { name: 'legnedBackgroundColor' },\r\n { name: 'legnedHeight' },\r\n { name: 'legnedHeightMax' },\r\n ],\r\n },\r\n ]\r\n return {\r\n\r\n cmpsL1: cmps,\r\n indP1: null,\r\n cmpP1: null,\r\n\r\n cmpsL2: null,\r\n indP2: null,\r\n cmpP2: null,\r\n\r\n cmpsL3: null,\r\n indP3: null,\r\n cmpP3: null,\r\n\r\n cmpsL4: null,\r\n\r\n cmpPick: '',\r\n\r\n }\r\n },\r\n mounted: function() {\r\n let vo = this\r\n\r\n //default\r\n vo.indP1 = 0\r\n vo.indP2 = 0\r\n vo.indP3 = 0\r\n\r\n //urlParse, http://localhost:8080/?cmp=w-set-multi\r\n let p = urlParse(location.href)\r\n // console.log('p', p)\r\n\r\n //viewPick\r\n vo.viewPick(get(p, 'cmp', ''))\r\n\r\n },\r\n computed: {\r\n\r\n changeMenus: function() {\r\n let vo = this\r\n vo.modifyMenus(vo.indP1, vo.indP2, vo.indP3)\r\n return ''\r\n },\r\n\r\n isNarrow: function() {\r\n return window.innerWidth < 1000\r\n },\r\n\r\n },\r\n methods: {\r\n\r\n modifyMenus: function() {\r\n let vo = this\r\n\r\n let cmpPick = ''\r\n\r\n setTimeout(() => {\r\n\r\n // console.log('call P1')\r\n vo.cmpP1 = get(vo.cmpsL1, vo.indP1, {})\r\n vo.cmpsL2 = get(vo.cmpP1, `cmps`, [])\r\n let _cmpPick = get(vo.cmpP1, `name`, '')\r\n if (_cmpPick) {\r\n cmpPick = _cmpPick\r\n }\r\n // console.log('vo.cmpP1', cloneDeep(vo.cmpP1))\r\n // console.log('vo.cmpsL2', cloneDeep(vo.cmpsL2))\r\n\r\n }, 50)\r\n\r\n setTimeout(() => {\r\n\r\n // console.log('call P2')\r\n let cmps = get(vo.cmpP1, `cmps`, [])\r\n vo.cmpP2 = get(cmps, vo.indP2, {})\r\n vo.cmpsL3 = get(vo.cmpP2, `cmps`, [])\r\n let _cmpPick = get(vo.cmpP2, `name`, '')\r\n if (_cmpPick) {\r\n cmpPick = _cmpPick\r\n }\r\n // console.log('vo.cmpP2', cloneDeep(vo.cmpP2))\r\n // console.log('vo.cmpsL3', cloneDeep(vo.cmpsL3))\r\n\r\n }, 100)\r\n\r\n setTimeout(() => {\r\n\r\n // console.log('call P3')\r\n let cmps = get(vo.cmpP2, `cmps`, [])\r\n vo.cmpP3 = get(cmps, vo.indP3, {})\r\n vo.cmpsL4 = get(vo.cmpP3, `cmps`, [])\r\n let _cmpPick = get(vo.cmpP3, `name`, '')\r\n if (_cmpPick) {\r\n cmpPick = _cmpPick\r\n }\r\n // console.log('vo.cmpP3', cloneDeep(vo.cmpP3))\r\n // console.log('vo.cmpsL4', cloneDeep(vo.cmpsL4))\r\n\r\n //update\r\n vo.cmpPick = cmpPick\r\n // console.log('cmpPick', cmpPick)\r\n\r\n }, 150)\r\n\r\n },\r\n\r\n getInd: function(item, items) {\r\n // let vo = this\r\n let ind = -1\r\n each(items, (v, k) => {\r\n if (item.name === v.name) {\r\n ind = k\r\n return false //跳出\r\n }\r\n })\r\n return ind\r\n },\r\n\r\n viewPick: function(cmpPick) {\r\n let vo = this\r\n let _cmpPick = cmpPick\r\n let r = ''\r\n let rs = []\r\n let ls = []\r\n let pv = (ts) => {\r\n each(ts, (v, k) => {\r\n ls.push(k)\r\n\r\n //name, _name\r\n let name = get(v, `name`, '')\r\n let _name = name\r\n\r\n //cmps\r\n let cmps = get(v, `cmps`, [])\r\n\r\n //push\r\n let cls = ls.join('.')\r\n let b = _name === _cmpPick\r\n rs.push({\r\n cls,\r\n name,\r\n b,\r\n })\r\n\r\n //save\r\n if (b) {\r\n r = JSON.parse(JSON.stringify(ls))\r\n }\r\n\r\n //遞迴pv\r\n if (cmps.length > 0) {\r\n pv(cmps)\r\n }\r\n\r\n ls.pop()\r\n })\r\n }\r\n pv(vo.cmpsL1)\r\n // console.log('rs', rs)\r\n // console.log('r', r)\r\n vo.indP1 = get(r, 0, 0)\r\n vo.indP2 = get(r, 1, 0)\r\n vo.indP3 = get(r, 2, 0)\r\n },\r\n\r\n },\r\n}\r\n<\/script>\r\n\r\n<style>\r\n.item-link {\r\n display: inline-block;\r\n margin: 10px 10px 0px 0px;\r\n padding: 5px 10px;\r\n font-size: 0.8rem;\r\n color: #fff;\r\n background-color: #443a65;\r\n cursor: pointer;\r\n text-decoration: none;\r\n}\r\n.option-label {\r\n position:absolute;\r\n left:10px;\r\n top:-33px;\r\n padding:4px 20px 7px 20px;\r\n border-left:1px solid #ddd;\r\n border-top:1px solid #ddd;\r\n border-right:1px solid #ddd;\r\n border-bottom:1px solid #f6f6f6;\r\n border-top-left-radius:15px;\r\n border-top-right-radius:15px;\r\n background:#f6f6f6;\r\n}\r\n</style>\r\n"]},media:void 0})}),pR,undefined,false,undefined,!1,ms,void 0,void 0)}));
|
|
31
|
+
//# sourceMappingURL=app.umd.js.map
|