three-render-objects 1.28.6 → 1.29.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// Version 1.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ThreeRenderObjects=t(e.THREE)}(this,(function(e){"use strict";function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n top: 0;\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n user-select: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");const a={type:"change"},s={type:"start"},c={type:"end"};class l extends e.EventDispatcher{constructor(t,n){super();const o=this,r=-1,i=0,l=1,u=2,h=3,p=4;this.object=t,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:e.MOUSE.ROTATE,MIDDLE:e.MOUSE.DOLLY,RIGHT:e.MOUSE.PAN},this.target=new e.Vector3;const d=1e-6,f=new e.Vector3;let m=1,g=r,b=r,v=0,y=0,w=0;const E=new e.Vector3,S=new e.Vector2,_=new e.Vector2,k=new e.Vector3,P=new e.Vector2,j=new e.Vector2,x=new e.Vector2,C=new e.Vector2,O=[],T={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=o.domElement.getBoundingClientRect(),t=o.domElement.ownerDocument.documentElement;o.screen.left=e.left+window.pageXOffset-t.clientLeft,o.screen.top=e.top+window.pageYOffset-t.clientTop,o.screen.width=e.width,o.screen.height=e.height};const R=function(){const t=new e.Vector2;return function(e,n){return t.set((e-o.screen.left)/o.screen.width,(n-o.screen.top)/o.screen.height),t}}(),L=function(){const t=new e.Vector2;return function(e,n){return t.set((e-.5*o.screen.width-o.screen.left)/(.5*o.screen.width),(o.screen.height+2*(o.screen.top-n))/o.screen.width),t}}();function M(e){!1!==o.enabled&&(0===O.length&&(o.domElement.setPointerCapture(e.pointerId),o.domElement.addEventListener("pointermove",I),o.domElement.addEventListener("pointerup",A)),function(e){O.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(Y(e),O.length))g=h,_.copy(L(O[0].pageX,O[0].pageY)),S.copy(_);else{g=p;const e=O[0].pageX-O[1].pageX,t=O[0].pageY-O[1].pageY;y=v=Math.sqrt(e*e+t*t);const n=(O[0].pageX+O[1].pageX)/2,o=(O[0].pageY+O[1].pageY)/2;x.copy(R(n,o)),C.copy(x)}o.dispatchEvent(s)}(e):function(e){if(g===r)switch(e.button){case o.mouseButtons.LEFT:g=i;break;case o.mouseButtons.MIDDLE:g=l;break;case o.mouseButtons.RIGHT:g=u}const t=b!==r?b:g;t!==i||o.noRotate?t!==l||o.noZoom?t!==u||o.noPan||(x.copy(R(e.pageX,e.pageY)),C.copy(x)):(P.copy(R(e.pageX,e.pageY)),j.copy(P)):(_.copy(L(e.pageX,e.pageY)),S.copy(_));o.dispatchEvent(s)}(e))}function I(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){if(1===(Y(e),O.length))S.copy(_),_.copy(L(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===O[0].pointerId?O[1]:O[0];return T[t.pointerId]}(e),n=e.pageX-t.x,o=e.pageY-t.y;y=Math.sqrt(n*n+o*o);const r=(e.pageX+t.x)/2,i=(e.pageY+t.y)/2;C.copy(R(r,i))}}(e):function(e){const t=b!==r?b:g;t!==i||o.noRotate?t!==l||o.noZoom?t!==u||o.noPan||C.copy(R(e.pageX,e.pageY)):j.copy(R(e.pageX,e.pageY)):(S.copy(_),_.copy(L(e.pageX,e.pageY)))}(e))}function A(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){switch(O.length){case 0:g=r;break;case 1:g=h,_.copy(L(e.pageX,e.pageY)),S.copy(_);break;case 2:g=p;for(let t=0;t<O.length;t++)if(O[t].pointerId!==e.pointerId){const e=T[O[t].pointerId];_.copy(L(e.x,e.y)),S.copy(_);break}}o.dispatchEvent(c)}(e):(g=r,o.dispatchEvent(c)),N(e),0===O.length&&(o.domElement.releasePointerCapture(e.pointerId),o.domElement.removeEventListener("pointermove",I),o.domElement.removeEventListener("pointerup",A)))}function D(e){N(e)}function z(e){!1!==o.enabled&&(window.removeEventListener("keydown",z),b===r&&(e.code!==o.keys[i]||o.noRotate?e.code!==o.keys[l]||o.noZoom?e.code!==o.keys[u]||o.noPan||(b=u):b=l:b=i))}function V(){!1!==o.enabled&&(b=r,window.addEventListener("keydown",z))}function F(e){if(!1!==o.enabled&&!0!==o.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:P.y-=.025*e.deltaY;break;case 1:P.y-=.01*e.deltaY;break;default:P.y-=25e-5*e.deltaY}o.dispatchEvent(s),o.dispatchEvent(c)}}function U(e){!1!==o.enabled&&e.preventDefault()}function N(e){delete T[e.pointerId];for(let t=0;t<O.length;t++)if(O[t].pointerId==e.pointerId)return void O.splice(t,1)}function Y(t){let n=T[t.pointerId];void 0===n&&(n=new e.Vector2,T[t.pointerId]=n),n.set(t.pageX,t.pageY)}this.rotateCamera=function(){const t=new e.Vector3,n=new e.Quaternion,r=new e.Vector3,i=new e.Vector3,a=new e.Vector3,s=new e.Vector3;return function(){s.set(_.x-S.x,_.y-S.y,0);let e=s.length();e?(E.copy(o.object.position).sub(o.target),r.copy(E).normalize(),i.copy(o.object.up).normalize(),a.crossVectors(i,r).normalize(),i.setLength(_.y-S.y),a.setLength(_.x-S.x),s.copy(i.add(a)),t.crossVectors(s,E).normalize(),e*=o.rotateSpeed,n.setFromAxisAngle(t,e),E.applyQuaternion(n),o.object.up.applyQuaternion(n),k.copy(t),w=e):!o.staticMoving&&w&&(w*=Math.sqrt(1-o.dynamicDampingFactor),E.copy(o.object.position).sub(o.target),n.setFromAxisAngle(k,w),E.applyQuaternion(n),o.object.up.applyQuaternion(n)),S.copy(_)}}(),this.zoomCamera=function(){let t;g===p?(t=v/y,v=y,o.object.isPerspectiveCamera?E.multiplyScalar(t):o.object.isOrthographicCamera?(o.object.zoom=e.MathUtils.clamp(o.object.zoom/t,o.minZoom,o.maxZoom),m!==o.object.zoom&&o.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(t=1+(j.y-P.y)*o.zoomSpeed,1!==t&&t>0&&(o.object.isPerspectiveCamera?E.multiplyScalar(t):o.object.isOrthographicCamera?(o.object.zoom=e.MathUtils.clamp(o.object.zoom/t,o.minZoom,o.maxZoom),m!==o.object.zoom&&o.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),o.staticMoving?P.copy(j):P.y+=(j.y-P.y)*this.dynamicDampingFactor)},this.panCamera=function(){const t=new e.Vector2,n=new e.Vector3,r=new e.Vector3;return function(){if(t.copy(C).sub(x),t.lengthSq()){if(o.object.isOrthographicCamera){const e=(o.object.right-o.object.left)/o.object.zoom/o.domElement.clientWidth,n=(o.object.top-o.object.bottom)/o.object.zoom/o.domElement.clientWidth;t.x*=e,t.y*=n}t.multiplyScalar(E.length()*o.panSpeed),r.copy(E).cross(o.object.up).setLength(t.x),r.add(n.copy(o.object.up).setLength(t.y)),o.object.position.add(r),o.target.add(r),o.staticMoving?x.copy(C):x.add(t.subVectors(C,x).multiplyScalar(o.dynamicDampingFactor))}}}(),this.checkDistances=function(){o.noZoom&&o.noPan||(E.lengthSq()>o.maxDistance*o.maxDistance&&(o.object.position.addVectors(o.target,E.setLength(o.maxDistance)),P.copy(j)),E.lengthSq()<o.minDistance*o.minDistance&&(o.object.position.addVectors(o.target,E.setLength(o.minDistance)),P.copy(j)))},this.update=function(){E.subVectors(o.object.position,o.target),o.noRotate||o.rotateCamera(),o.noZoom||o.zoomCamera(),o.noPan||o.panCamera(),o.object.position.addVectors(o.target,E),o.object.isPerspectiveCamera?(o.checkDistances(),o.object.lookAt(o.target),f.distanceToSquared(o.object.position)>d&&(o.dispatchEvent(a),f.copy(o.object.position))):o.object.isOrthographicCamera?(o.object.lookAt(o.target),(f.distanceToSquared(o.object.position)>d||m!==o.object.zoom)&&(o.dispatchEvent(a),f.copy(o.object.position),m=o.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){g=r,b=r,o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.up.copy(o.up0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),E.subVectors(o.object.position,o.target),o.object.lookAt(o.target),o.dispatchEvent(a),f.copy(o.object.position),m=o.object.zoom},this.dispose=function(){o.domElement.removeEventListener("contextmenu",U),o.domElement.removeEventListener("pointerdown",M),o.domElement.removeEventListener("pointercancel",D),o.domElement.removeEventListener("wheel",F),o.domElement.removeEventListener("pointermove",I),o.domElement.removeEventListener("pointerup",A),window.removeEventListener("keydown",z),window.removeEventListener("keyup",V)},this.domElement.addEventListener("contextmenu",U),this.domElement.addEventListener("pointerdown",M),this.domElement.addEventListener("pointercancel",D),this.domElement.addEventListener("wheel",F,{passive:!1}),window.addEventListener("keydown",z),window.addEventListener("keyup",V),this.handleResize(),this.update()}}const u={type:"change"},h={type:"start"},p={type:"end"};class d extends e.EventDispatcher{constructor(t,n){super(),this.object=t,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new e.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:e.MOUSE.ROTATE,MIDDLE:e.MOUSE.DOLLY,RIGHT:e.MOUSE.PAN},this.touches={ONE:e.TOUCH.ROTATE,TWO:e.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return s.phi},this.getAzimuthalAngle=function(){return s.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",X),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",X),this._domElementKeyEvents=null},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(u),o.update(),i=r.NONE},this.update=function(){const n=new e.Vector3,h=(new e.Quaternion).setFromUnitVectors(t.up,new e.Vector3(0,1,0)),p=h.clone().invert(),m=new e.Vector3,g=new e.Quaternion,b=new e.Vector3,v=2*Math.PI;return function(){const e=o.object.position;n.copy(e).sub(o.target),n.applyQuaternion(h),s.setFromVector3(n),o.autoRotate&&i===r.NONE&&x(2*Math.PI/60/60*o.autoRotateSpeed),o.enableDamping?(s.theta+=c.theta*o.dampingFactor,s.phi+=c.phi*o.dampingFactor):(s.theta+=c.theta,s.phi+=c.phi);let t=o.minAzimuthAngle,y=o.maxAzimuthAngle;return isFinite(t)&&isFinite(y)&&(t<-Math.PI?t+=v:t>Math.PI&&(t-=v),y<-Math.PI?y+=v:y>Math.PI&&(y-=v),s.theta=t<=y?Math.max(t,Math.min(y,s.theta)):s.theta>(t+y)/2?Math.max(t,s.theta):Math.min(y,s.theta)),s.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,s.phi)),s.makeSafe(),s.radius*=l,s.radius=Math.max(o.minDistance,Math.min(o.maxDistance,s.radius)),!0===o.enableDamping?o.target.addScaledVector(d,o.dampingFactor):o.target.add(d),n.setFromSpherical(s),n.applyQuaternion(p),e.copy(o.target).add(n),o.object.lookAt(o.target),!0===o.enableDamping?(c.theta*=1-o.dampingFactor,c.phi*=1-o.dampingFactor,d.multiplyScalar(1-o.dampingFactor)):(c.set(0,0,0),d.set(0,0,0)),l=1,!!(f||m.distanceToSquared(o.object.position)>a||8*(1-g.dot(o.object.quaternion))>a||b.distanceToSquared(o.target)>0)&&(o.dispatchEvent(u),m.copy(o.object.position),g.copy(o.object.quaternion),b.copy(o.target),f=!1,!0)}}(),this.dispose=function(){o.domElement.removeEventListener("contextmenu",q),o.domElement.removeEventListener("pointerdown",Y),o.domElement.removeEventListener("pointercancel",H),o.domElement.removeEventListener("wheel",K),o.domElement.removeEventListener("pointermove",B),o.domElement.removeEventListener("pointerup",H),null!==o._domElementKeyEvents&&(o._domElementKeyEvents.removeEventListener("keydown",X),o._domElementKeyEvents=null)};const o=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const a=1e-6,s=new e.Spherical,c=new e.Spherical;let l=1;const d=new e.Vector3;let f=!1;const m=new e.Vector2,g=new e.Vector2,b=new e.Vector2,v=new e.Vector2,y=new e.Vector2,w=new e.Vector2,E=new e.Vector2,S=new e.Vector2,_=new e.Vector2,k=[],P={};function j(){return Math.pow(.95,o.zoomSpeed)}function x(e){c.theta-=e}function C(e){c.phi-=e}const O=function(){const t=new e.Vector3;return function(e,n){t.setFromMatrixColumn(n,0),t.multiplyScalar(-e),d.add(t)}}(),T=function(){const t=new e.Vector3;return function(e,n){!0===o.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(o.object.up,t)),t.multiplyScalar(e),d.add(t)}}(),R=function(){const t=new e.Vector3;return function(e,n){const r=o.domElement;if(o.object.isPerspectiveCamera){const i=o.object.position;t.copy(i).sub(o.target);let a=t.length();a*=Math.tan(o.object.fov/2*Math.PI/180),O(2*e*a/r.clientHeight,o.object.matrix),T(2*n*a/r.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(O(e*(o.object.right-o.object.left)/o.object.zoom/r.clientWidth,o.object.matrix),T(n*(o.object.top-o.object.bottom)/o.object.zoom/r.clientHeight,o.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),o.enablePan=!1)}}();function L(e){o.object.isPerspectiveCamera?l/=e:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom*e)),o.object.updateProjectionMatrix(),f=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function M(e){o.object.isPerspectiveCamera?l*=e:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/e)),o.object.updateProjectionMatrix(),f=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function I(e){m.set(e.clientX,e.clientY)}function A(e){v.set(e.clientX,e.clientY)}function D(){if(1===k.length)m.set(k[0].pageX,k[0].pageY);else{const e=.5*(k[0].pageX+k[1].pageX),t=.5*(k[0].pageY+k[1].pageY);m.set(e,t)}}function z(){if(1===k.length)v.set(k[0].pageX,k[0].pageY);else{const e=.5*(k[0].pageX+k[1].pageX),t=.5*(k[0].pageY+k[1].pageY);v.set(e,t)}}function V(){const e=k[0].pageX-k[1].pageX,t=k[0].pageY-k[1].pageY,n=Math.sqrt(e*e+t*t);E.set(0,n)}function F(e){if(1==k.length)g.set(e.pageX,e.pageY);else{const t=Q(e),n=.5*(e.pageX+t.x),o=.5*(e.pageY+t.y);g.set(n,o)}b.subVectors(g,m).multiplyScalar(o.rotateSpeed);const t=o.domElement;x(2*Math.PI*b.x/t.clientHeight),C(2*Math.PI*b.y/t.clientHeight),m.copy(g)}function U(e){if(1===k.length)y.set(e.pageX,e.pageY);else{const t=Q(e),n=.5*(e.pageX+t.x),o=.5*(e.pageY+t.y);y.set(n,o)}w.subVectors(y,v).multiplyScalar(o.panSpeed),R(w.x,w.y),v.copy(y)}function N(e){const t=Q(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);S.set(0,i),_.set(0,Math.pow(S.y/E.y,o.zoomSpeed)),L(_.y),E.copy(S)}function Y(t){!1!==o.enabled&&(0===k.length&&(o.domElement.setPointerCapture(t.pointerId),o.domElement.addEventListener("pointermove",B),o.domElement.addEventListener("pointerup",H)),function(e){k.push(e)}(t),"touch"===t.pointerType?function(t){switch(Z(t),k.length){case 1:switch(o.touches.ONE){case e.TOUCH.ROTATE:if(!1===o.enableRotate)return;D(),i=r.TOUCH_ROTATE;break;case e.TOUCH.PAN:if(!1===o.enablePan)return;z(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(o.touches.TWO){case e.TOUCH.DOLLY_PAN:if(!1===o.enableZoom&&!1===o.enablePan)return;o.enableZoom&&V(),o.enablePan&&z(),i=r.TOUCH_DOLLY_PAN;break;case e.TOUCH.DOLLY_ROTATE:if(!1===o.enableZoom&&!1===o.enableRotate)return;o.enableZoom&&V(),o.enableRotate&&D(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&o.dispatchEvent(h)}(t):function(t){let n;switch(t.button){case 0:n=o.mouseButtons.LEFT;break;case 1:n=o.mouseButtons.MIDDLE;break;case 2:n=o.mouseButtons.RIGHT;break;default:n=-1}switch(n){case e.MOUSE.DOLLY:if(!1===o.enableZoom)return;!function(e){E.set(e.clientX,e.clientY)}(t),i=r.DOLLY;break;case e.MOUSE.ROTATE:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===o.enablePan)return;A(t),i=r.PAN}else{if(!1===o.enableRotate)return;I(t),i=r.ROTATE}break;case e.MOUSE.PAN:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===o.enableRotate)return;I(t),i=r.ROTATE}else{if(!1===o.enablePan)return;A(t),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&o.dispatchEvent(h)}(t))}function B(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){switch(Z(e),i){case r.TOUCH_ROTATE:if(!1===o.enableRotate)return;F(e),o.update();break;case r.TOUCH_PAN:if(!1===o.enablePan)return;U(e),o.update();break;case r.TOUCH_DOLLY_PAN:if(!1===o.enableZoom&&!1===o.enablePan)return;!function(e){o.enableZoom&&N(e),o.enablePan&&U(e)}(e),o.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===o.enableZoom&&!1===o.enableRotate)return;!function(e){o.enableZoom&&N(e),o.enableRotate&&F(e)}(e),o.update();break;default:i=r.NONE}}(e):function(e){switch(i){case r.ROTATE:if(!1===o.enableRotate)return;!function(e){g.set(e.clientX,e.clientY),b.subVectors(g,m).multiplyScalar(o.rotateSpeed);const t=o.domElement;x(2*Math.PI*b.x/t.clientHeight),C(2*Math.PI*b.y/t.clientHeight),m.copy(g),o.update()}(e);break;case r.DOLLY:if(!1===o.enableZoom)return;!function(e){S.set(e.clientX,e.clientY),_.subVectors(S,E),_.y>0?L(j()):_.y<0&&M(j()),E.copy(S),o.update()}(e);break;case r.PAN:if(!1===o.enablePan)return;!function(e){y.set(e.clientX,e.clientY),w.subVectors(y,v).multiplyScalar(o.panSpeed),R(w.x,w.y),v.copy(y),o.update()}(e)}}(e))}function H(e){!function(e){delete P[e.pointerId];for(let t=0;t<k.length;t++)if(k[t].pointerId==e.pointerId)return void k.splice(t,1)}(e),0===k.length&&(o.domElement.releasePointerCapture(e.pointerId),o.domElement.removeEventListener("pointermove",B),o.domElement.removeEventListener("pointerup",H)),o.dispatchEvent(p),i=r.NONE}function K(e){!1!==o.enabled&&!1!==o.enableZoom&&i===r.NONE&&(e.preventDefault(),o.dispatchEvent(h),function(e){e.deltaY<0?M(j()):e.deltaY>0&&L(j()),o.update()}(e),o.dispatchEvent(p))}function X(e){!1!==o.enabled&&!1!==o.enablePan&&function(e){let t=!1;switch(e.code){case o.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?C(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):R(0,o.keyPanSpeed),t=!0;break;case o.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?C(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):R(0,-o.keyPanSpeed),t=!0;break;case o.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?x(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):R(o.keyPanSpeed,0),t=!0;break;case o.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?x(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):R(-o.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),o.update())}(e)}function q(e){!1!==o.enabled&&e.preventDefault()}function Z(t){let n=P[t.pointerId];void 0===n&&(n=new e.Vector2,P[t.pointerId]=n),n.set(t.pageX,t.pageY)}function Q(e){const t=e.pointerId===k[0].pointerId?k[1]:k[0];return P[t.pointerId]}o.domElement.addEventListener("contextmenu",q),o.domElement.addEventListener("pointerdown",Y),o.domElement.addEventListener("pointercancel",H),o.domElement.addEventListener("wheel",K,{passive:!1}),this.update()}}const f={type:"change"};class m extends e.EventDispatcher{constructor(t,n){super(),this.object=t,this.domElement=n,this.enabled=!0,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const o=this,r=1e-6,i=new e.Quaternion,a=new e.Vector3;this.tmpQuaternion=new e.Quaternion,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new e.Vector3(0,0,0),this.rotationVector=new e.Vector3(0,0,0),this.keydown=function(e){if(!e.altKey&&!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){if(!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()}},this.pointerdown=function(e){if(!1!==this.enabled)if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!1!==this.enabled&&(!this.dragToLook||this.status>0)){const t=this.getContainerDimensions(),n=t.size[0]/2,o=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-o)/o,this.updateRotationVector()}},this.pointerup=function(e){if(!1!==this.enabled){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()}},this.contextMenu=function(e){!1!==this.enabled&&e.preventDefault()},this.update=function(e){if(!1===this.enabled)return;const t=e*o.movementSpeed,n=e*o.rollSpeed;o.object.translateX(o.moveVector.x*t),o.object.translateY(o.moveVector.y*t),o.object.translateZ(o.moveVector.z*t),o.tmpQuaternion.set(o.rotationVector.x*n,o.rotationVector.y*n,o.rotationVector.z*n,1).normalize(),o.object.quaternion.multiply(o.tmpQuaternion),(a.distanceToSquared(o.object.position)>r||8*(1-i.dot(o.object.quaternion))>r)&&(o.dispatchEvent(f),i.copy(o.object.quaternion),a.copy(o.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",s),this.domElement.removeEventListener("pointerdown",l),this.domElement.removeEventListener("pointermove",c),this.domElement.removeEventListener("pointerup",u),window.removeEventListener("keydown",h),window.removeEventListener("keyup",p)};const s=this.contextMenu.bind(this),c=this.pointermove.bind(this),l=this.pointerdown.bind(this),u=this.pointerup.bind(this),h=this.keydown.bind(this),p=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",s),this.domElement.addEventListener("pointerdown",l),this.domElement.addEventListener("pointermove",c),this.domElement.addEventListener("pointerup",u),window.addEventListener("keydown",h),window.addEventListener("keyup",p),this.updateMovementVector(),this.updateRotationVector()}}const g={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class b{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const v=new e.OrthographicCamera(-1,1,1,-1,0,1),y=new e.BufferGeometry;y.setAttribute("position",new e.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),y.setAttribute("uv",new e.Float32BufferAttribute([0,2,0,0,2,0],2));class w{constructor(t){this._mesh=new e.Mesh(y,t)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,v)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class E extends b{constructor(t,n){super(),this.textureID=void 0!==n?n:"tDiffuse",t instanceof e.ShaderMaterial?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=e.UniformsUtils.clone(t.uniforms),this.material=new e.ShaderMaterial({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new w(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class S extends b{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const o=e.getContext(),r=e.state;let i,a;r.buffers.color.setMask(!1),r.buffers.depth.setMask(!1),r.buffers.color.setLocked(!0),r.buffers.depth.setLocked(!0),this.inverse?(i=0,a=1):(i=1,a=0),r.buffers.stencil.setTest(!0),r.buffers.stencil.setOp(o.REPLACE,o.REPLACE,o.REPLACE),r.buffers.stencil.setFunc(o.ALWAYS,i,4294967295),r.buffers.stencil.setClear(a),r.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),r.buffers.color.setLocked(!1),r.buffers.depth.setLocked(!1),r.buffers.stencil.setLocked(!1),r.buffers.stencil.setFunc(o.EQUAL,1,4294967295),r.buffers.stencil.setOp(o.KEEP,o.KEEP,o.KEEP),r.buffers.stencil.setLocked(!0)}}class _ extends b{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class k{constructor(t,n){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===n){const o=t.getSize(new e.Vector2);this._width=o.width,this._height=o.height,(n=new e.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:e.HalfFloatType})).texture.name="EffectComposer.rt1"}else this._width=n.width,this._height=n.height;this.renderTarget1=n,this.renderTarget2=n.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new E(g),this.copyPass.material.blending=e.NoBlending,this.clock=new e.Clock}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let t=0,o=this.passes.length;t<o;t++){const o=this.passes[t];if(!1!==o.enabled){if(o.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(t),o.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),o.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==S&&(o instanceof S?n=!0:o instanceof _&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(t){if(void 0===t){const n=this.renderer.getSize(new e.Vector2);this._pixelRatio=this.renderer.getPixelRatio(),this._width=n.width,this._height=n.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,o=this._height*this._pixelRatio;this.renderTarget1.setSize(n,o),this.renderTarget2.setSize(n,o);for(let e=0;e<this.passes.length;e++)this.passes[e].setSize(n,o)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class P extends b{constructor(t,n,o,r,i){super(),this.scene=t,this.camera=n,this.overrideMaterial=o,this.clearColor=r,this.clearAlpha=void 0!==i?i:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new e.Color}render(e,t,n){const o=e.autoClear;let r,i;e.autoClear=!1,void 0!==this.overrideMaterial&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),r=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,r),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=i),e.autoClear=o}}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},j.apply(this,arguments)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function O(e,t,n){return O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&x(r,n.prototype),r},O.apply(null,arguments)}function T(e){var t="function"==typeof Map?new Map:void 0;return T=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return O(e,arguments,C(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),x(o,e)},T(e)}var R={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function L(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,r=t[0],i=[];for(o=1;o<t.length;o+=1)i.push(t[o]);return i.forEach((function(e){r=r.replace(/%[a-z]/,e)})),r}var M=function(e){var t,n;function o(t){var n;if("production"===process.env.NODE_ENV)n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this;else{for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];n=e.call(this,L.apply(void 0,[R[t]].concat(r)))||this}return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n),o}(T(Error));function I(e){return Math.round(255*e)}function A(e,t,n){return I(e)+","+I(t)+","+I(n)}function D(e,t,n,o){if(void 0===o&&(o=A),0===t)return o(n,n,n);var r=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(r%2-1)),s=0,c=0,l=0;r>=0&&r<1?(s=i,c=a):r>=1&&r<2?(s=a,c=i):r>=2&&r<3?(c=i,l=a):r>=3&&r<4?(c=a,l=i):r>=4&&r<5?(s=a,l=i):r>=5&&r<6&&(s=i,l=a);var u=n-i/2;return o(s+u,c+u,l+u)}var z={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",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:"ff00ff",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:"639",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"};var V=/^#[a-fA-F0-9]{6}$/,F=/^#[a-fA-F0-9]{8}$/,U=/^#[a-fA-F0-9]{3}$/,N=/^#[a-fA-F0-9]{4}$/,Y=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,B=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,H=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,K=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function X(e){if("string"!=typeof e)throw new M(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return z[t]?"#"+z[t]:e}(e);if(t.match(V))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(F)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(U))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(N)){var o=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:o}}var r=Y.exec(t);if(r)return{red:parseInt(""+r[1],10),green:parseInt(""+r[2],10),blue:parseInt(""+r[3],10)};var i=B.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[4])};var a=H.exec(t);if(a){var s="rgb("+D(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",c=Y.exec(s);if(!c)throw new M(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var l=K.exec(t.substring(0,50));if(l){var u="rgb("+D(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",h=Y.exec(u);if(!h)throw new M(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])}}throw new M(5)}var q=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Z(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Q(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return q("#"+Z(e)+Z(t)+Z(n));if("object"==typeof e&&void 0===t&&void 0===n)return q("#"+Z(e.red)+Z(e.green)+Z(e.blue));throw new M(6)}function G(e,t,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=t?e.apply(this,o):G(e,t,o)}}function W(e){return G(e,e.length,[])}function $(e,t){if("transparent"===t)return t;var n,o,r,i=X(t),a="number"==typeof i.alpha?i.alpha:1;return function(e,t,n,o){if("string"==typeof e&&"number"==typeof t){var r=X(e);return"rgba("+r.red+","+r.green+","+r.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof o)return o>=1?Q(e,t,n):"rgba("+e+","+t+","+n+","+o+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===o)return e.alpha>=1?Q(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new M(7)}(j({},i,{alpha:(n=0,o=1,r=(100*a+100*parseFloat(e))/100,Math.max(n,Math.min(o,r)))}))}var J,ee=W($),te=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return this.None(e)},Out:function(e){return this.None(e)},InOut:function(e){return this.None(e)}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-te.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*te.Bounce.In(2*e):.5*te.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),ne=function(){return performance.now()},oe=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=ne()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var r=this._tweens[n[o]],i=!t;r&&!1===r.update(e,i)&&!t&&delete this._tweens[n[o]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),re={Linear:function(e,t){var n=e.length-1,o=n*t,r=Math.floor(o),i=re.Utils.Linear;return t<0?i(e[0],e[1],o):t>1?i(e[n],e[n-1],n-o):i(e[r],e[r+1>n?n:r+1],o-r)},Bezier:function(e,t){for(var n=0,o=e.length-1,r=Math.pow,i=re.Utils.Bernstein,a=0;a<=o;a++)n+=r(1-t,o-a)*r(t,a)*e[a]*i(o,a);return n},CatmullRom:function(e,t){var n=e.length-1,o=n*t,r=Math.floor(o),i=re.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(r=Math.floor(o=n*(1+t))),i(e[(r-1+n)%n],e[r],e[(r+1)%n],e[(r+2)%n],o-r)):t<0?e[0]-(i(e[0],e[0],e[1],e[1],-o)-e[0]):t>1?e[n]-(i(e[n],e[n],e[n-1],e[n-1],o-n)-e[n]):i(e[r?r-1:0],e[r],e[n<r+1?n:r+1],e[n<r+2?n:r+2],o-r)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=re.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(J=[1],function(e){var t=1;if(J[e])return J[e];for(var n=e;n>1;n--)t*=n;return J[e]=t,t}),CatmullRom:function(e,t,n,o,r){var i=.5*(n-e),a=.5*(o-t),s=r*r;return(2*t-2*n+i+a)*(r*s)+(-3*t+3*n-2*i-a)*s+i*r+t}}},ie=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),ae=new oe,se=function(){function e(e,t){void 0===t&&(t=ae),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=te.Linear.None,this._interpolationFunction=re.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ie.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){if(void 0===t&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t,this},e.prototype.duration=function(e){return void 0===e&&(e=1e3),this._duration=e,this},e.prototype.dynamic=function(e){return void 0===e&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,t){if(void 0===e&&(e=ne()),void 0===t&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var n in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,t,n,o,r){for(var i in n){var a=e[i],s=Array.isArray(a),c=s?"array":typeof a,l=!s&&Array.isArray(n[i]);if("undefined"!==c&&"function"!==c){if(l){if(0===(g=n[i]).length)continue;for(var u=[a],h=0,p=g.length;h<p;h+=1){var d=this._handleRelativeValue(a,g[h]);if(isNaN(d)){l=!1,console.warn("Found invalid interpolation list. Skipping.");break}u.push(d)}l&&(n[i]=u)}if("object"!==c&&!s||!a||l)(void 0===t[i]||r)&&(t[i]=a),s||(t[i]*=1),o[i]=l?n[i].slice().reverse():t[i]||0;else{t[i]=s?[]:{};var f=a;for(var m in f)t[i][m]=f[m];o[i]=s?[]:{};var g=n[i];if(!this._isDynamic){var b={};for(var m in g)b[m]=g[m];n[i]=g=b}this._setupProperties(f,t[i],g,o[i],r)}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=ne()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=ne()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return void 0===e&&(e=ae),this._group=e,this},e.prototype.delay=function(e){return void 0===e&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return void 0===e&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return void 0===e&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return void 0===e&&(e=te.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return void 0===e&&(e=re.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=ne()),void 0===t&&(t=!0),this._isPaused)return!0;var n,o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>r)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),o=(e-this._startTime)/this._duration,o=0===this._duration||o>1?1:o;var i=this._easingFunction(o);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,o),1===o){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,s=this._chainedTweens.length;a<s;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,o){for(var r in n)if(void 0!==t[r]){var i=t[r]||0,a=n[r],s=Array.isArray(e[r]),c=Array.isArray(a);!s&&c?e[r]=this._interpolationFunction(a,o):"object"==typeof a&&a?this._updateProperties(e[r],i,a,o):"number"==typeof(a=this._handleRelativeValue(i,a))&&(e[r]=i+(a-i)*o)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),ce=ae;ce.getAll.bind(ce),ce.removeAll.bind(ce),ce.add.bind(ce),ce.remove.bind(ce);var le=ce.update.bind(ce),ue="object"==typeof global&&global&&global.Object===Object&&global,he="object"==typeof self&&self&&self.Object===Object&&self,pe=ue||he||Function("return this")(),de=pe.Symbol,fe=Object.prototype,me=fe.hasOwnProperty,ge=fe.toString,be=de?de.toStringTag:void 0;var ve=Object.prototype.toString;var ye="[object Null]",we="[object Undefined]",Ee=de?de.toStringTag:void 0;function Se(e){return null==e?void 0===e?we:ye:Ee&&Ee in Object(e)?function(e){var t=me.call(e,be),n=e[be];try{e[be]=void 0;var o=!0}catch(e){}var r=ge.call(e);return o&&(t?e[be]=n:delete e[be]),r}(e):function(e){return ve.call(e)}(e)}var _e="[object Symbol]";var ke=/\s/;var Pe=/^\s+/;function je(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&ke.test(e.charAt(t)););return t}(e)+1).replace(Pe,""):e}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ce=NaN,Oe=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,Re=/^0o[0-7]+$/i,Le=parseInt;function Me(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&Se(e)==_e}(e))return Ce;if(xe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=xe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=je(e);var n=Te.test(e);return n||Re.test(e)?Le(e.slice(2),n?2:8):Oe.test(e)?Ce:+e}var Ie=function(){return pe.Date.now()},Ae="Expected a function",De=Math.max,ze=Math.min;function Ve(e,t,n){var o,r,i,a,s,c,l=0,u=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(Ae);function d(t){var n=o,i=r;return o=r=void 0,l=t,a=e.apply(i,n)}function f(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-l>=i}function m(){var e=Ie();if(f(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-c);return h?ze(n,i-(e-l)):n}(e))}function g(e){return s=void 0,p&&o?d(e):(o=r=void 0,a)}function b(){var e=Ie(),n=f(e);if(o=arguments,r=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(m,t),u?d(e):a}(c);if(h)return clearTimeout(s),s=setTimeout(m,t),d(c)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Me(t)||0,xe(n)&&(u=!!n.leading,i=(h="maxWait"in n)?De(Me(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==s&&clearTimeout(s),l=0,o=c=r=s=void 0},b.flush=function(){return void 0===s?a:g(Ie())},b}function Fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=o.key,i=void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?i:String(i)),o)}var r,i}function Ue(e,t,n){return t&&Fe(e.prototype,t),n&&Fe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ye(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Be=Ue((function e(t,n){var o=n.default,r=void 0===o?null:o,i=n.triggerUpdate,a=void 0===i||i,s=n.onChange,c=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=r,this.triggerUpdate=a,this.onChange=c}));var He,Ke,Xe,qe,Ze,Qe,Ge,We,$e,Je,et,tt,nt,ot,rt=window.THREE?window.THREE:{WebGLRenderer:e.WebGLRenderer,Scene:e.Scene,PerspectiveCamera:e.PerspectiveCamera,Raycaster:e.Raycaster,SRGBColorSpace:e.SRGBColorSpace,TextureLoader:e.TextureLoader,Vector2:e.Vector2,Vector3:e.Vector3,Box3:e.Box3,Color:e.Color,Mesh:e.Mesh,SphereGeometry:e.SphereGeometry,MeshBasicMaterial:e.MeshBasicMaterial,BackSide:e.BackSide,EventDispatcher:e.EventDispatcher,MOUSE:e.MOUSE,Quaternion:e.Quaternion,Spherical:e.Spherical,Clock:e.Clock},it=(He={props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),o=n.length?n[0]:null;t=o?o.object:null,e.intersectionPoint=o?o.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&("function"==typeof(r=e.tooltipContent)?r:"string"==typeof r?function(e){return e[r]}:function(e){return r})(t)||"",e.hoverObj=t)}le()}var r;return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,o){var r=e.camera;if(t&&e.initialised){var i=t,a=n||{x:0,y:0,z:0};if(o){var s=Object.assign({},r.position),c=h();new se(s).to(i,o).easing(te.Quadratic.Out).onUpdate(l).start(),new se(c).to(a,o/3).easing(te.Quadratic.Out).onUpdate(u).start()}else l(i),u(a);return this}return Object.assign({},r.position,{lookAt:h()});function l(e){var t=e.x,n=e.y,o=e.z;void 0!==t&&(r.position.x=t),void 0!==n&&(r.position.y=n),void 0!==o&&(r.position.z=o)}function u(t){var n=new rt.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:r.lookAt(n)}function h(){return Object.assign(new rt.Vector3(0,0,-1e3).applyQuaternion(r.quaternion).add(r.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=arguments.length,r=new Array(o>3?o-3:0),i=3;i<o;i++)r[i-3]=arguments[i];return this.fitToBbox(this.getBbox.apply(this,r),t,n)},fitToBbox:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=e.camera;if(t){var s=new rt.Vector3(0,0,0),c=2*Math.max.apply(Math,o(Object.entries(t).map((function(e){var t=n(e,2),r=t[0],i=t[1];return Math.max.apply(Math,o(i.map((function(e){return Math.abs(s[r]-e)}))))})))),l=(1-2*i/e.height)*a.fov,u=c/Math.atan(l*Math.PI/180),h=u/a.aspect,p=Math.max(u,h);if(p>0){var d=s.clone().sub(a.position).normalize().multiplyScalar(-p);this.cameraPosition(d,s,r)}}return this},getBbox:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},r=new rt.Box3(new rt.Vector3(0,0,0),new rt.Vector3(0,0,0)),i=e.objects.filter(n);return i.length?(i.forEach((function(e){return r.expandByObject(e)})),Object.assign.apply(Object,o(["x","y","z"].map((function(e){return t({},e,[r.min[e],r.max[e]])}))))):null},getScreenCoords:function(e,t,n,o){var r=new rt.Vector3(t,n,o);return r.project(this.camera()),{x:(r.x+1)*e.width/2,y:-(r.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=new rt.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new rt.Raycaster;return i.setFromCamera(r,e.camera),Object.assign({},i.ray.at(o,new rt.Vector3))},intersectingObjects:function(e,t,n){var o=new rt.Vector2(t/e.width*2-1,-n/e.height*2+1),r=new rt.Raycaster;return r.params.Line.threshold=e.lineHoverPrecision,r.setFromCamera(o,e.camera),r.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new rt.Scene,camera:new rt.PerspectiveCamera,clock:new rt.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,a=n.rendererConfig,s=void 0===a?{}:a,c=n.extraRenderers,u=void 0===c?[]:c,h=n.waitForLoadComplete,p=void 0===h||h;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new rt.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var o=(r=t.container,i=r.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:i.top+s,left:i.left+a});t.pointerPos.x=n.pageX-o.left,t.pointerPos.y=n.pageY-o.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}var r,i,a,s}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new rt.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},s)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=u,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new k(t.renderer),t.postProcessingComposer.addPass(new P(t.scene,t.camera)),t.controls=new{trackball:l,orbit:d,fly:m}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(o(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new rt.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!p,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(o(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new rt.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=X(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new rt.Color(ee(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new rt.TextureLoader).load(e.backgroundImageUrl,(function(t){t.colorSpace=rt.SRGBColorSpace,e.skysphere.material=new rt.MeshBasicMaterial({map:t,side:rt.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}},Ke=He.stateInit,Xe=void 0===Ke?function(){return{}}:Ke,qe=He.props,Ze=void 0===qe?{}:qe,Qe=He.methods,Ge=void 0===Qe?{}:Qe,We=He.aliases,$e=void 0===We?{}:We,Je=He.init,et=void 0===Je?function(){}:Je,tt=He.update,nt=void 0===tt?function(){}:tt,ot=Object.keys(Ze).map((function(e){return new Be(e,Ze[e])})),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},Xe instanceof Function?Xe(e):Xe,{initialised:!1}),n={};function o(t){return r(t,e),i(),o}var r=function(e,n){et.call(o,e,t,n),t.initialised=!0},i=Ve((function(){t.initialised&&(nt.call(o,t,n),n={})}),1);return ot.forEach((function(e){o[e.name]=function(e){var r=e.name,a=e.triggerUpdate,s=void 0!==a&&a,c=e.onChange,l=void 0===c?function(e,t){}:c,u=e.defaultVal,h=void 0===u?null:u;return function(e){var a=t[r];if(!arguments.length)return a;var c=void 0===e?h:e;return t[r]=c,l.call(o,c,t,a),!n.hasOwnProperty(r)&&(n[r]=a),s&&i(),o}}(e)})),Object.keys(Ge).forEach((function(e){o[e]=function(){for(var n,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(n=Ge[e]).call.apply(n,[o,t].concat(i))}})),Object.entries($e).forEach((function(e){var t=Ne(e,2),n=t[0],r=t[1];return o[n]=o[r]})),o.resetProps=function(){return ot.forEach((function(e){o[e.name](e.defaultVal)})),o},o.resetProps(),t._rerender=i,o});return it}));
|
|
1
|
+
// Version 1.29.0 three-render-objects - https://github.com/vasturiano/three-render-objects
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ThreeRenderObjects=t(e.THREE)}(this,(function(e){"use strict";function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n top: 0;\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n user-select: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");const a={type:"change"},s={type:"start"},c={type:"end"};class l extends e.EventDispatcher{constructor(t,n){super();const o=this,r=-1,i=0,l=1,u=2,h=3,p=4;this.object=t,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:e.MOUSE.ROTATE,MIDDLE:e.MOUSE.DOLLY,RIGHT:e.MOUSE.PAN},this.target=new e.Vector3;const d=1e-6,f=new e.Vector3;let m=1,g=r,b=r,v=0,y=0,w=0;const E=new e.Vector3,S=new e.Vector2,_=new e.Vector2,j=new e.Vector3,k=new e.Vector2,P=new e.Vector2,x=new e.Vector2,C=new e.Vector2,O=[],T={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=o.domElement.getBoundingClientRect(),t=o.domElement.ownerDocument.documentElement;o.screen.left=e.left+window.pageXOffset-t.clientLeft,o.screen.top=e.top+window.pageYOffset-t.clientTop,o.screen.width=e.width,o.screen.height=e.height};const R=function(){const t=new e.Vector2;return function(e,n){return t.set((e-o.screen.left)/o.screen.width,(n-o.screen.top)/o.screen.height),t}}(),M=function(){const t=new e.Vector2;return function(e,n){return t.set((e-.5*o.screen.width-o.screen.left)/(.5*o.screen.width),(o.screen.height+2*(o.screen.top-n))/o.screen.width),t}}();function L(e){!1!==o.enabled&&(0===O.length&&(o.domElement.setPointerCapture(e.pointerId),o.domElement.addEventListener("pointermove",I),o.domElement.addEventListener("pointerup",A)),function(e){O.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(Y(e),O.length))g=h,_.copy(M(O[0].pageX,O[0].pageY)),S.copy(_);else{g=p;const e=O[0].pageX-O[1].pageX,t=O[0].pageY-O[1].pageY;y=v=Math.sqrt(e*e+t*t);const n=(O[0].pageX+O[1].pageX)/2,o=(O[0].pageY+O[1].pageY)/2;x.copy(R(n,o)),C.copy(x)}o.dispatchEvent(s)}(e):function(e){if(g===r)switch(e.button){case o.mouseButtons.LEFT:g=i;break;case o.mouseButtons.MIDDLE:g=l;break;case o.mouseButtons.RIGHT:g=u}const t=b!==r?b:g;t!==i||o.noRotate?t!==l||o.noZoom?t!==u||o.noPan||(x.copy(R(e.pageX,e.pageY)),C.copy(x)):(k.copy(R(e.pageX,e.pageY)),P.copy(k)):(_.copy(M(e.pageX,e.pageY)),S.copy(_));o.dispatchEvent(s)}(e))}function I(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){if(1===(Y(e),O.length))S.copy(_),_.copy(M(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===O[0].pointerId?O[1]:O[0];return T[t.pointerId]}(e),n=e.pageX-t.x,o=e.pageY-t.y;y=Math.sqrt(n*n+o*o);const r=(e.pageX+t.x)/2,i=(e.pageY+t.y)/2;C.copy(R(r,i))}}(e):function(e){const t=b!==r?b:g;t!==i||o.noRotate?t!==l||o.noZoom?t!==u||o.noPan||C.copy(R(e.pageX,e.pageY)):P.copy(R(e.pageX,e.pageY)):(S.copy(_),_.copy(M(e.pageX,e.pageY)))}(e))}function A(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){switch(O.length){case 0:g=r;break;case 1:g=h,_.copy(M(e.pageX,e.pageY)),S.copy(_);break;case 2:g=p;for(let t=0;t<O.length;t++)if(O[t].pointerId!==e.pointerId){const e=T[O[t].pointerId];_.copy(M(e.x,e.y)),S.copy(_);break}}o.dispatchEvent(c)}(e):(g=r,o.dispatchEvent(c)),N(e),0===O.length&&(o.domElement.releasePointerCapture(e.pointerId),o.domElement.removeEventListener("pointermove",I),o.domElement.removeEventListener("pointerup",A)))}function D(e){N(e)}function z(e){!1!==o.enabled&&(window.removeEventListener("keydown",z),b===r&&(e.code!==o.keys[i]||o.noRotate?e.code!==o.keys[l]||o.noZoom?e.code!==o.keys[u]||o.noPan||(b=u):b=l:b=i))}function V(){!1!==o.enabled&&(b=r,window.addEventListener("keydown",z))}function F(e){if(!1!==o.enabled&&!0!==o.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:k.y-=.025*e.deltaY;break;case 1:k.y-=.01*e.deltaY;break;default:k.y-=25e-5*e.deltaY}o.dispatchEvent(s),o.dispatchEvent(c)}}function U(e){!1!==o.enabled&&e.preventDefault()}function N(e){delete T[e.pointerId];for(let t=0;t<O.length;t++)if(O[t].pointerId==e.pointerId)return void O.splice(t,1)}function Y(t){let n=T[t.pointerId];void 0===n&&(n=new e.Vector2,T[t.pointerId]=n),n.set(t.pageX,t.pageY)}this.rotateCamera=function(){const t=new e.Vector3,n=new e.Quaternion,r=new e.Vector3,i=new e.Vector3,a=new e.Vector3,s=new e.Vector3;return function(){s.set(_.x-S.x,_.y-S.y,0);let e=s.length();e?(E.copy(o.object.position).sub(o.target),r.copy(E).normalize(),i.copy(o.object.up).normalize(),a.crossVectors(i,r).normalize(),i.setLength(_.y-S.y),a.setLength(_.x-S.x),s.copy(i.add(a)),t.crossVectors(s,E).normalize(),e*=o.rotateSpeed,n.setFromAxisAngle(t,e),E.applyQuaternion(n),o.object.up.applyQuaternion(n),j.copy(t),w=e):!o.staticMoving&&w&&(w*=Math.sqrt(1-o.dynamicDampingFactor),E.copy(o.object.position).sub(o.target),n.setFromAxisAngle(j,w),E.applyQuaternion(n),o.object.up.applyQuaternion(n)),S.copy(_)}}(),this.zoomCamera=function(){let t;g===p?(t=v/y,v=y,o.object.isPerspectiveCamera?E.multiplyScalar(t):o.object.isOrthographicCamera?(o.object.zoom=e.MathUtils.clamp(o.object.zoom/t,o.minZoom,o.maxZoom),m!==o.object.zoom&&o.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(t=1+(P.y-k.y)*o.zoomSpeed,1!==t&&t>0&&(o.object.isPerspectiveCamera?E.multiplyScalar(t):o.object.isOrthographicCamera?(o.object.zoom=e.MathUtils.clamp(o.object.zoom/t,o.minZoom,o.maxZoom),m!==o.object.zoom&&o.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),o.staticMoving?k.copy(P):k.y+=(P.y-k.y)*this.dynamicDampingFactor)},this.panCamera=function(){const t=new e.Vector2,n=new e.Vector3,r=new e.Vector3;return function(){if(t.copy(C).sub(x),t.lengthSq()){if(o.object.isOrthographicCamera){const e=(o.object.right-o.object.left)/o.object.zoom/o.domElement.clientWidth,n=(o.object.top-o.object.bottom)/o.object.zoom/o.domElement.clientWidth;t.x*=e,t.y*=n}t.multiplyScalar(E.length()*o.panSpeed),r.copy(E).cross(o.object.up).setLength(t.x),r.add(n.copy(o.object.up).setLength(t.y)),o.object.position.add(r),o.target.add(r),o.staticMoving?x.copy(C):x.add(t.subVectors(C,x).multiplyScalar(o.dynamicDampingFactor))}}}(),this.checkDistances=function(){o.noZoom&&o.noPan||(E.lengthSq()>o.maxDistance*o.maxDistance&&(o.object.position.addVectors(o.target,E.setLength(o.maxDistance)),k.copy(P)),E.lengthSq()<o.minDistance*o.minDistance&&(o.object.position.addVectors(o.target,E.setLength(o.minDistance)),k.copy(P)))},this.update=function(){E.subVectors(o.object.position,o.target),o.noRotate||o.rotateCamera(),o.noZoom||o.zoomCamera(),o.noPan||o.panCamera(),o.object.position.addVectors(o.target,E),o.object.isPerspectiveCamera?(o.checkDistances(),o.object.lookAt(o.target),f.distanceToSquared(o.object.position)>d&&(o.dispatchEvent(a),f.copy(o.object.position))):o.object.isOrthographicCamera?(o.object.lookAt(o.target),(f.distanceToSquared(o.object.position)>d||m!==o.object.zoom)&&(o.dispatchEvent(a),f.copy(o.object.position),m=o.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){g=r,b=r,o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.up.copy(o.up0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),E.subVectors(o.object.position,o.target),o.object.lookAt(o.target),o.dispatchEvent(a),f.copy(o.object.position),m=o.object.zoom},this.dispose=function(){o.domElement.removeEventListener("contextmenu",U),o.domElement.removeEventListener("pointerdown",L),o.domElement.removeEventListener("pointercancel",D),o.domElement.removeEventListener("wheel",F),o.domElement.removeEventListener("pointermove",I),o.domElement.removeEventListener("pointerup",A),window.removeEventListener("keydown",z),window.removeEventListener("keyup",V)},this.domElement.addEventListener("contextmenu",U),this.domElement.addEventListener("pointerdown",L),this.domElement.addEventListener("pointercancel",D),this.domElement.addEventListener("wheel",F,{passive:!1}),window.addEventListener("keydown",z),window.addEventListener("keyup",V),this.handleResize(),this.update()}}const u={type:"change"},h={type:"start"},p={type:"end"},d=new e.Ray,f=new e.Plane,m=Math.cos(70*e.MathUtils.DEG2RAD);class g extends e.EventDispatcher{constructor(t,n){super(),this.object=t,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new e.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:e.MOUSE.ROTATE,MIDDLE:e.MOUSE.DOLLY,RIGHT:e.MOUSE.PAN},this.touches={ONE:e.TOUCH.ROTATE,TWO:e.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return s.phi},this.getAzimuthalAngle=function(){return s.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",J),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",J),this._domElementKeyEvents=null},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(u),o.update(),i=r.NONE},this.update=function(){const n=new e.Vector3,h=(new e.Quaternion).setFromUnitVectors(t.up,new e.Vector3(0,1,0)),p=h.clone().invert(),b=new e.Vector3,v=new e.Quaternion,y=new e.Vector3,w=2*Math.PI;return function(E=null){const S=o.object.position;n.copy(S).sub(o.target),n.applyQuaternion(h),s.setFromVector3(n),o.autoRotate&&i===r.NONE&&M(function(e){return null!==e?2*Math.PI/60*o.autoRotateSpeed*e:2*Math.PI/60/60*o.autoRotateSpeed}(E)),o.enableDamping?(s.theta+=c.theta*o.dampingFactor,s.phi+=c.phi*o.dampingFactor):(s.theta+=c.theta,s.phi+=c.phi);let _=o.minAzimuthAngle,j=o.maxAzimuthAngle;isFinite(_)&&isFinite(j)&&(_<-Math.PI?_+=w:_>Math.PI&&(_-=w),j<-Math.PI?j+=w:j>Math.PI&&(j-=w),s.theta=_<=j?Math.max(_,Math.min(j,s.theta)):s.theta>(_+j)/2?Math.max(_,s.theta):Math.min(j,s.theta)),s.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,s.phi)),s.makeSafe(),!0===o.enableDamping?o.target.addScaledVector(g,o.dampingFactor):o.target.add(g),o.zoomToCursor&&C||o.object.isOrthographicCamera?s.radius=U(s.radius):s.radius=U(s.radius*l),n.setFromSpherical(s),n.applyQuaternion(p),S.copy(o.target).add(n),o.object.lookAt(o.target),!0===o.enableDamping?(c.theta*=1-o.dampingFactor,c.phi*=1-o.dampingFactor,g.multiplyScalar(1-o.dampingFactor)):(c.set(0,0,0),g.set(0,0,0));let k=!1;if(o.zoomToCursor&&C){let r=null;if(o.object.isPerspectiveCamera){const e=n.length();r=U(e*l);const t=e-r;o.object.position.addScaledVector(P,t),o.object.updateMatrixWorld()}else if(o.object.isOrthographicCamera){const t=new e.Vector3(x.x,x.y,0);t.unproject(o.object),o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/l)),o.object.updateProjectionMatrix(),k=!0;const i=new e.Vector3(x.x,x.y,0);i.unproject(o.object),o.object.position.sub(i).add(t),o.object.updateMatrixWorld(),r=n.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),o.zoomToCursor=!1;null!==r&&(this.screenSpacePanning?o.target.set(0,0,-1).transformDirection(o.object.matrix).multiplyScalar(r).add(o.object.position):(d.origin.copy(o.object.position),d.direction.set(0,0,-1).transformDirection(o.object.matrix),Math.abs(o.object.up.dot(d.direction))<m?t.lookAt(o.target):(f.setFromNormalAndCoplanarPoint(o.object.up,o.target),d.intersectPlane(f,o.target))))}else o.object.isOrthographicCamera&&(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/l)),o.object.updateProjectionMatrix(),k=!0);return l=1,C=!1,!!(k||b.distanceToSquared(o.object.position)>a||8*(1-v.dot(o.object.quaternion))>a||y.distanceToSquared(o.target)>0)&&(o.dispatchEvent(u),b.copy(o.object.position),v.copy(o.object.quaternion),y.copy(o.target),k=!1,!0)}}(),this.dispose=function(){o.domElement.removeEventListener("contextmenu",ee),o.domElement.removeEventListener("pointerdown",Q),o.domElement.removeEventListener("pointercancel",W),o.domElement.removeEventListener("wheel",$),o.domElement.removeEventListener("pointermove",G),o.domElement.removeEventListener("pointerup",W),null!==o._domElementKeyEvents&&(o._domElementKeyEvents.removeEventListener("keydown",J),o._domElementKeyEvents=null)};const o=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const a=1e-6,s=new e.Spherical,c=new e.Spherical;let l=1;const g=new e.Vector3,b=new e.Vector2,v=new e.Vector2,y=new e.Vector2,w=new e.Vector2,E=new e.Vector2,S=new e.Vector2,_=new e.Vector2,j=new e.Vector2,k=new e.Vector2,P=new e.Vector3,x=new e.Vector2;let C=!1;const O=[],T={};function R(){return Math.pow(.95,o.zoomSpeed)}function M(e){c.theta-=e}function L(e){c.phi-=e}const I=function(){const t=new e.Vector3;return function(e,n){t.setFromMatrixColumn(n,0),t.multiplyScalar(-e),g.add(t)}}(),A=function(){const t=new e.Vector3;return function(e,n){!0===o.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(o.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),D=function(){const t=new e.Vector3;return function(e,n){const r=o.domElement;if(o.object.isPerspectiveCamera){const i=o.object.position;t.copy(i).sub(o.target);let a=t.length();a*=Math.tan(o.object.fov/2*Math.PI/180),I(2*e*a/r.clientHeight,o.object.matrix),A(2*n*a/r.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(I(e*(o.object.right-o.object.left)/o.object.zoom/r.clientWidth,o.object.matrix),A(n*(o.object.top-o.object.bottom)/o.object.zoom/r.clientHeight,o.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),o.enablePan=!1)}}();function z(e){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?l/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function V(e){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?l*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function F(e){if(!o.zoomToCursor)return;C=!0;const t=o.domElement.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=t.width,a=t.height;x.x=n/i*2-1,x.y=-r/a*2+1,P.set(x.x,x.y,1).unproject(o.object).sub(o.object.position).normalize()}function U(e){return Math.max(o.minDistance,Math.min(o.maxDistance,e))}function N(e){b.set(e.clientX,e.clientY)}function Y(e){w.set(e.clientX,e.clientY)}function B(){if(1===O.length)b.set(O[0].pageX,O[0].pageY);else{const e=.5*(O[0].pageX+O[1].pageX),t=.5*(O[0].pageY+O[1].pageY);b.set(e,t)}}function H(){if(1===O.length)w.set(O[0].pageX,O[0].pageY);else{const e=.5*(O[0].pageX+O[1].pageX),t=.5*(O[0].pageY+O[1].pageY);w.set(e,t)}}function K(){const e=O[0].pageX-O[1].pageX,t=O[0].pageY-O[1].pageY,n=Math.sqrt(e*e+t*t);_.set(0,n)}function X(e){if(1==O.length)v.set(e.pageX,e.pageY);else{const t=ne(e),n=.5*(e.pageX+t.x),o=.5*(e.pageY+t.y);v.set(n,o)}y.subVectors(v,b).multiplyScalar(o.rotateSpeed);const t=o.domElement;M(2*Math.PI*y.x/t.clientHeight),L(2*Math.PI*y.y/t.clientHeight),b.copy(v)}function q(e){if(1===O.length)E.set(e.pageX,e.pageY);else{const t=ne(e),n=.5*(e.pageX+t.x),o=.5*(e.pageY+t.y);E.set(n,o)}S.subVectors(E,w).multiplyScalar(o.panSpeed),D(S.x,S.y),w.copy(E)}function Z(e){const t=ne(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);j.set(0,i),k.set(0,Math.pow(j.y/_.y,o.zoomSpeed)),z(k.y),_.copy(j)}function Q(t){!1!==o.enabled&&(0===O.length&&(o.domElement.setPointerCapture(t.pointerId),o.domElement.addEventListener("pointermove",G),o.domElement.addEventListener("pointerup",W)),function(e){O.push(e)}(t),"touch"===t.pointerType?function(t){switch(te(t),O.length){case 1:switch(o.touches.ONE){case e.TOUCH.ROTATE:if(!1===o.enableRotate)return;B(),i=r.TOUCH_ROTATE;break;case e.TOUCH.PAN:if(!1===o.enablePan)return;H(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(o.touches.TWO){case e.TOUCH.DOLLY_PAN:if(!1===o.enableZoom&&!1===o.enablePan)return;o.enableZoom&&K(),o.enablePan&&H(),i=r.TOUCH_DOLLY_PAN;break;case e.TOUCH.DOLLY_ROTATE:if(!1===o.enableZoom&&!1===o.enableRotate)return;o.enableZoom&&K(),o.enableRotate&&B(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&o.dispatchEvent(h)}(t):function(t){let n;switch(t.button){case 0:n=o.mouseButtons.LEFT;break;case 1:n=o.mouseButtons.MIDDLE;break;case 2:n=o.mouseButtons.RIGHT;break;default:n=-1}switch(n){case e.MOUSE.DOLLY:if(!1===o.enableZoom)return;!function(e){F(e),_.set(e.clientX,e.clientY)}(t),i=r.DOLLY;break;case e.MOUSE.ROTATE:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===o.enablePan)return;Y(t),i=r.PAN}else{if(!1===o.enableRotate)return;N(t),i=r.ROTATE}break;case e.MOUSE.PAN:if(t.ctrlKey||t.metaKey||t.shiftKey){if(!1===o.enableRotate)return;N(t),i=r.ROTATE}else{if(!1===o.enablePan)return;Y(t),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&o.dispatchEvent(h)}(t))}function G(e){!1!==o.enabled&&("touch"===e.pointerType?function(e){switch(te(e),i){case r.TOUCH_ROTATE:if(!1===o.enableRotate)return;X(e),o.update();break;case r.TOUCH_PAN:if(!1===o.enablePan)return;q(e),o.update();break;case r.TOUCH_DOLLY_PAN:if(!1===o.enableZoom&&!1===o.enablePan)return;!function(e){o.enableZoom&&Z(e),o.enablePan&&q(e)}(e),o.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===o.enableZoom&&!1===o.enableRotate)return;!function(e){o.enableZoom&&Z(e),o.enableRotate&&X(e)}(e),o.update();break;default:i=r.NONE}}(e):function(e){switch(i){case r.ROTATE:if(!1===o.enableRotate)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,b).multiplyScalar(o.rotateSpeed);const t=o.domElement;M(2*Math.PI*y.x/t.clientHeight),L(2*Math.PI*y.y/t.clientHeight),b.copy(v),o.update()}(e);break;case r.DOLLY:if(!1===o.enableZoom)return;!function(e){j.set(e.clientX,e.clientY),k.subVectors(j,_),k.y>0?z(R()):k.y<0&&V(R()),_.copy(j),o.update()}(e);break;case r.PAN:if(!1===o.enablePan)return;!function(e){E.set(e.clientX,e.clientY),S.subVectors(E,w).multiplyScalar(o.panSpeed),D(S.x,S.y),w.copy(E),o.update()}(e)}}(e))}function W(e){!function(e){delete T[e.pointerId];for(let t=0;t<O.length;t++)if(O[t].pointerId==e.pointerId)return void O.splice(t,1)}(e),0===O.length&&(o.domElement.releasePointerCapture(e.pointerId),o.domElement.removeEventListener("pointermove",G),o.domElement.removeEventListener("pointerup",W)),o.dispatchEvent(p),i=r.NONE}function $(e){!1!==o.enabled&&!1!==o.enableZoom&&i===r.NONE&&(e.preventDefault(),o.dispatchEvent(h),function(e){F(e),e.deltaY<0?V(R()):e.deltaY>0&&z(R()),o.update()}(e),o.dispatchEvent(p))}function J(e){!1!==o.enabled&&!1!==o.enablePan&&function(e){let t=!1;switch(e.code){case o.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?L(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):D(0,o.keyPanSpeed),t=!0;break;case o.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?L(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):D(0,-o.keyPanSpeed),t=!0;break;case o.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?M(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):D(o.keyPanSpeed,0),t=!0;break;case o.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?M(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):D(-o.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),o.update())}(e)}function ee(e){!1!==o.enabled&&e.preventDefault()}function te(t){let n=T[t.pointerId];void 0===n&&(n=new e.Vector2,T[t.pointerId]=n),n.set(t.pageX,t.pageY)}function ne(e){const t=e.pointerId===O[0].pointerId?O[1]:O[0];return T[t.pointerId]}o.domElement.addEventListener("contextmenu",ee),o.domElement.addEventListener("pointerdown",Q),o.domElement.addEventListener("pointercancel",W),o.domElement.addEventListener("wheel",$,{passive:!1}),this.update()}}const b={type:"change"};class v extends e.EventDispatcher{constructor(t,n){super(),this.object=t,this.domElement=n,this.enabled=!0,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const o=this,r=1e-6,i=new e.Quaternion,a=new e.Vector3;this.tmpQuaternion=new e.Quaternion,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new e.Vector3(0,0,0),this.rotationVector=new e.Vector3(0,0,0),this.keydown=function(e){if(!e.altKey&&!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){if(!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()}},this.pointerdown=function(e){if(!1!==this.enabled)if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!1!==this.enabled&&(!this.dragToLook||this.status>0)){const t=this.getContainerDimensions(),n=t.size[0]/2,o=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-o)/o,this.updateRotationVector()}},this.pointerup=function(e){if(!1!==this.enabled){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()}},this.contextMenu=function(e){!1!==this.enabled&&e.preventDefault()},this.update=function(e){if(!1===this.enabled)return;const t=e*o.movementSpeed,n=e*o.rollSpeed;o.object.translateX(o.moveVector.x*t),o.object.translateY(o.moveVector.y*t),o.object.translateZ(o.moveVector.z*t),o.tmpQuaternion.set(o.rotationVector.x*n,o.rotationVector.y*n,o.rotationVector.z*n,1).normalize(),o.object.quaternion.multiply(o.tmpQuaternion),(a.distanceToSquared(o.object.position)>r||8*(1-i.dot(o.object.quaternion))>r)&&(o.dispatchEvent(b),i.copy(o.object.quaternion),a.copy(o.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",s),this.domElement.removeEventListener("pointerdown",l),this.domElement.removeEventListener("pointermove",c),this.domElement.removeEventListener("pointerup",u),window.removeEventListener("keydown",h),window.removeEventListener("keyup",p)};const s=this.contextMenu.bind(this),c=this.pointermove.bind(this),l=this.pointerdown.bind(this),u=this.pointerup.bind(this),h=this.keydown.bind(this),p=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",s),this.domElement.addEventListener("pointerdown",l),this.domElement.addEventListener("pointermove",c),this.domElement.addEventListener("pointerup",u),window.addEventListener("keydown",h),window.addEventListener("keyup",p),this.updateMovementVector(),this.updateRotationVector()}}const y={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class w{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const E=new e.OrthographicCamera(-1,1,1,-1,0,1),S=new e.BufferGeometry;S.setAttribute("position",new e.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),S.setAttribute("uv",new e.Float32BufferAttribute([0,2,0,0,2,0],2));class _{constructor(t){this._mesh=new e.Mesh(S,t)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,E)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class j extends w{constructor(t,n){super(),this.textureID=void 0!==n?n:"tDiffuse",t instanceof e.ShaderMaterial?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=e.UniformsUtils.clone(t.uniforms),this.material=new e.ShaderMaterial({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new _(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class k extends w{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const o=e.getContext(),r=e.state;let i,a;r.buffers.color.setMask(!1),r.buffers.depth.setMask(!1),r.buffers.color.setLocked(!0),r.buffers.depth.setLocked(!0),this.inverse?(i=0,a=1):(i=1,a=0),r.buffers.stencil.setTest(!0),r.buffers.stencil.setOp(o.REPLACE,o.REPLACE,o.REPLACE),r.buffers.stencil.setFunc(o.ALWAYS,i,4294967295),r.buffers.stencil.setClear(a),r.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),r.buffers.color.setLocked(!1),r.buffers.depth.setLocked(!1),r.buffers.color.setMask(!0),r.buffers.depth.setMask(!0),r.buffers.stencil.setLocked(!1),r.buffers.stencil.setFunc(o.EQUAL,1,4294967295),r.buffers.stencil.setOp(o.KEEP,o.KEEP,o.KEEP),r.buffers.stencil.setLocked(!0)}}class P extends w{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class x{constructor(t,n){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===n){const o=t.getSize(new e.Vector2);this._width=o.width,this._height=o.height,(n=new e.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:e.HalfFloatType})).texture.name="EffectComposer.rt1"}else this._width=n.width,this._height=n.height;this.renderTarget1=n,this.renderTarget2=n.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new j(y),this.copyPass.material.blending=e.NoBlending,this.clock=new e.Clock}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let t=0,o=this.passes.length;t<o;t++){const o=this.passes[t];if(!1!==o.enabled){if(o.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(t),o.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),o.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==k&&(o instanceof k?n=!0:o instanceof P&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(t){if(void 0===t){const n=this.renderer.getSize(new e.Vector2);this._pixelRatio=this.renderer.getPixelRatio(),this._width=n.width,this._height=n.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,o=this._height*this._pixelRatio;this.renderTarget1.setSize(n,o),this.renderTarget2.setSize(n,o);for(let e=0;e<this.passes.length;e++)this.passes[e].setSize(n,o)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class C extends w{constructor(t,n,o=null,r=null,i=null){super(),this.scene=t,this.camera=n,this.overrideMaterial=o,this.clearColor=r,this.clearAlpha=i,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new e.Color}render(e,t,n){const o=e.autoClear;let r,i;e.autoClear=!1,null!==this.overrideMaterial&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),null!==this.clearColor&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor)),null!==this.clearAlpha&&(r=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),1==this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),!0===this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),null!==this.clearColor&&e.setClearColor(this._oldClearColor),null!==this.clearAlpha&&e.setClearAlpha(r),null!==this.overrideMaterial&&(this.scene.overrideMaterial=i),e.autoClear=o}}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(this,arguments)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function M(e,t,n){return M=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&T(r,n.prototype),r},M.apply(null,arguments)}function L(e){var t="function"==typeof Map?new Map:void 0;return L=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return M(e,arguments,R(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),T(n,e)},L(e)}var I={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function A(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,r=t[0],i=[];for(o=1;o<t.length;o+=1)i.push(t[o]);return i.forEach((function(e){r=r.replace(/%[a-z]/,e)})),r}var D=function(e){var t,n;function o(t){var n;if("production"===process.env.NODE_ENV)n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this;else{for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];n=e.call(this,A.apply(void 0,[I[t]].concat(r)))||this}return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n),o}(L(Error));function z(e){return Math.round(255*e)}function V(e,t,n){return z(e)+","+z(t)+","+z(n)}function F(e,t,n,o){if(void 0===o&&(o=V),0===t)return o(n,n,n);var r=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(r%2-1)),s=0,c=0,l=0;r>=0&&r<1?(s=i,c=a):r>=1&&r<2?(s=a,c=i):r>=2&&r<3?(c=i,l=a):r>=3&&r<4?(c=a,l=i):r>=4&&r<5?(s=a,l=i):r>=5&&r<6&&(s=i,l=a);var u=n-i/2;return o(s+u,c+u,l+u)}var U={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",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:"ff00ff",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:"639",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"};var N=/^#[a-fA-F0-9]{6}$/,Y=/^#[a-fA-F0-9]{8}$/,B=/^#[a-fA-F0-9]{3}$/,H=/^#[a-fA-F0-9]{4}$/,K=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,X=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,q=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Z=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Q(e){if("string"!=typeof e)throw new D(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return U[t]?"#"+U[t]:e}(e);if(t.match(N))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Y)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(B))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(H)){var o=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:o}}var r=K.exec(t);if(r)return{red:parseInt(""+r[1],10),green:parseInt(""+r[2],10),blue:parseInt(""+r[3],10)};var i=X.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[4])};var a=q.exec(t);if(a){var s="rgb("+F(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",c=K.exec(s);if(!c)throw new D(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var l=Z.exec(t.substring(0,50));if(l){var u="rgb("+F(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",h=K.exec(u);if(!h)throw new D(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])}}throw new D(5)}var G=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function W(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function $(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return G("#"+W(e)+W(t)+W(n));if("object"==typeof e&&void 0===t&&void 0===n)return G("#"+W(e.red)+W(e.green)+W(e.blue));throw new D(6)}function J(e,t,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=t?e.apply(this,o):J(e,t,o)}}function ee(e){return J(e,e.length,[])}function te(e,t){if("transparent"===t)return t;var n,o,r,i=Q(t),a="number"==typeof i.alpha?i.alpha:1;return function(e,t,n,o){if("string"==typeof e&&"number"==typeof t){var r=Q(e);return"rgba("+r.red+","+r.green+","+r.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof o)return o>=1?$(e,t,n):"rgba("+e+","+t+","+n+","+o+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===o)return e.alpha>=1?$(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new D(7)}(O({},i,{alpha:(n=0,o=1,r=(100*a+100*parseFloat(e))/100,Math.max(n,Math.min(o,r)))}))}var ne,oe=ee(te),re=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return this.None(e)},Out:function(e){return this.None(e)},InOut:function(e){return this.None(e)}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-re.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*re.Bounce.In(2*e):.5*re.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),ie=function(){return performance.now()},ae=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=ie()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var r=this._tweens[n[o]],i=!t;r&&!1===r.update(e,i)&&!t&&delete this._tweens[n[o]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),se={Linear:function(e,t){var n=e.length-1,o=n*t,r=Math.floor(o),i=se.Utils.Linear;return t<0?i(e[0],e[1],o):t>1?i(e[n],e[n-1],n-o):i(e[r],e[r+1>n?n:r+1],o-r)},Bezier:function(e,t){for(var n=0,o=e.length-1,r=Math.pow,i=se.Utils.Bernstein,a=0;a<=o;a++)n+=r(1-t,o-a)*r(t,a)*e[a]*i(o,a);return n},CatmullRom:function(e,t){var n=e.length-1,o=n*t,r=Math.floor(o),i=se.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(r=Math.floor(o=n*(1+t))),i(e[(r-1+n)%n],e[r],e[(r+1)%n],e[(r+2)%n],o-r)):t<0?e[0]-(i(e[0],e[0],e[1],e[1],-o)-e[0]):t>1?e[n]-(i(e[n],e[n],e[n-1],e[n-1],o-n)-e[n]):i(e[r?r-1:0],e[r],e[n<r+1?n:r+1],e[n<r+2?n:r+2],o-r)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=se.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(ne=[1],function(e){var t=1;if(ne[e])return ne[e];for(var n=e;n>1;n--)t*=n;return ne[e]=t,t}),CatmullRom:function(e,t,n,o,r){var i=.5*(n-e),a=.5*(o-t),s=r*r;return(2*t-2*n+i+a)*(r*s)+(-3*t+3*n-2*i-a)*s+i*r+t}}},ce=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),le=new ae,ue=function(){function e(e,t){void 0===t&&(t=le),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=re.Linear.None,this._interpolationFunction=se.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ce.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){if(void 0===t&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t,this},e.prototype.duration=function(e){return void 0===e&&(e=1e3),this._duration=e,this},e.prototype.dynamic=function(e){return void 0===e&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,t){if(void 0===e&&(e=ie()),void 0===t&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var n in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,t,n,o,r){for(var i in n){var a=e[i],s=Array.isArray(a),c=s?"array":typeof a,l=!s&&Array.isArray(n[i]);if("undefined"!==c&&"function"!==c){if(l){if(0===(g=n[i]).length)continue;for(var u=[a],h=0,p=g.length;h<p;h+=1){var d=this._handleRelativeValue(a,g[h]);if(isNaN(d)){l=!1,console.warn("Found invalid interpolation list. Skipping.");break}u.push(d)}l&&(n[i]=u)}if("object"!==c&&!s||!a||l)(void 0===t[i]||r)&&(t[i]=a),s||(t[i]*=1),o[i]=l?n[i].slice().reverse():t[i]||0;else{t[i]=s?[]:{};var f=a;for(var m in f)t[i][m]=f[m];o[i]=s?[]:{};var g=n[i];if(!this._isDynamic){var b={};for(var m in g)b[m]=g[m];n[i]=g=b}this._setupProperties(f,t[i],g,o[i],r)}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=ie()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=ie()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return void 0===e&&(e=le),this._group=e,this},e.prototype.delay=function(e){return void 0===e&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return void 0===e&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return void 0===e&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return void 0===e&&(e=re.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return void 0===e&&(e=se.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=ie()),void 0===t&&(t=!0),this._isPaused)return!0;var n,o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>r)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),o=(e-this._startTime)/this._duration,o=0===this._duration||o>1?1:o;var i=this._easingFunction(o);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,o),1===o){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,s=this._chainedTweens.length;a<s;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,o){for(var r in n)if(void 0!==t[r]){var i=t[r]||0,a=n[r],s=Array.isArray(e[r]),c=Array.isArray(a);!s&&c?e[r]=this._interpolationFunction(a,o):"object"==typeof a&&a?this._updateProperties(e[r],i,a,o):"number"==typeof(a=this._handleRelativeValue(i,a))&&(e[r]=i+(a-i)*o)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),he=le;he.getAll.bind(he),he.removeAll.bind(he),he.add.bind(he),he.remove.bind(he);var pe=he.update.bind(he),de="object"==typeof global&&global&&global.Object===Object&&global,fe="object"==typeof self&&self&&self.Object===Object&&self,me=de||fe||Function("return this")(),ge=me.Symbol,be=Object.prototype,ve=be.hasOwnProperty,ye=be.toString,we=ge?ge.toStringTag:void 0;var Ee=Object.prototype.toString;var Se="[object Null]",_e="[object Undefined]",je=ge?ge.toStringTag:void 0;function ke(e){return null==e?void 0===e?_e:Se:je&&je in Object(e)?function(e){var t=ve.call(e,we),n=e[we];try{e[we]=void 0;var o=!0}catch(e){}var r=ye.call(e);return o&&(t?e[we]=n:delete e[we]),r}(e):function(e){return Ee.call(e)}(e)}var Pe="[object Symbol]";var xe=/\s/;var Ce=/^\s+/;function Oe(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&xe.test(e.charAt(t)););return t}(e)+1).replace(Ce,""):e}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Re=NaN,Me=/^[-+]0x[0-9a-f]+$/i,Le=/^0b[01]+$/i,Ie=/^0o[0-7]+$/i,Ae=parseInt;function De(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&ke(e)==Pe}(e))return Re;if(Te(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Te(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Oe(e);var n=Le.test(e);return n||Ie.test(e)?Ae(e.slice(2),n?2:8):Me.test(e)?Re:+e}var ze=function(){return me.Date.now()},Ve="Expected a function",Fe=Math.max,Ue=Math.min;function Ne(e,t,n){var o,r,i,a,s,c,l=0,u=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(Ve);function d(t){var n=o,i=r;return o=r=void 0,l=t,a=e.apply(i,n)}function f(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-l>=i}function m(){var e=ze();if(f(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-c);return h?Ue(n,i-(e-l)):n}(e))}function g(e){return s=void 0,p&&o?d(e):(o=r=void 0,a)}function b(){var e=ze(),n=f(e);if(o=arguments,r=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(m,t),u?d(e):a}(c);if(h)return clearTimeout(s),s=setTimeout(m,t),d(c)}return void 0===s&&(s=setTimeout(m,t)),a}return t=De(t)||0,Te(n)&&(u=!!n.leading,i=(h="maxWait"in n)?Fe(De(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==s&&clearTimeout(s),l=0,o=c=r=s=void 0},b.flush=function(){return void 0===s?a:g(ze())},b}function Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(r=o.key,i=void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?i:String(i)),o)}var r,i}function Be(e,t,n){return t&&Ye(e.prototype,t),n&&Ye(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ke(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Xe=Be((function e(t,n){var o=n.default,r=void 0===o?null:o,i=n.triggerUpdate,a=void 0===i||i,s=n.onChange,c=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=r,this.triggerUpdate=a,this.onChange=c}));var qe,Ze,Qe,Ge,We,$e,Je,et,tt,nt,ot,rt,it,at,st=window.THREE?window.THREE:{WebGLRenderer:e.WebGLRenderer,Scene:e.Scene,PerspectiveCamera:e.PerspectiveCamera,Raycaster:e.Raycaster,SRGBColorSpace:e.SRGBColorSpace,TextureLoader:e.TextureLoader,Vector2:e.Vector2,Vector3:e.Vector3,Box3:e.Box3,Color:e.Color,Mesh:e.Mesh,SphereGeometry:e.SphereGeometry,MeshBasicMaterial:e.MeshBasicMaterial,BackSide:e.BackSide,EventDispatcher:e.EventDispatcher,MOUSE:e.MOUSE,Quaternion:e.Quaternion,Spherical:e.Spherical,Clock:e.Clock},ct=(qe={props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},lights:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),o=n.length?n[0]:null;t=o?o.object:null,e.intersectionPoint=o?o.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&("function"==typeof(r=e.tooltipContent)?r:"string"==typeof r?function(e){return e[r]}:function(e){return r})(t)||"",e.hoverObj=t)}pe()}var r;return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,o){var r=e.camera;if(t&&e.initialised){var i=t,a=n||{x:0,y:0,z:0};if(o){var s=Object.assign({},r.position),c=h();new ue(s).to(i,o).easing(re.Quadratic.Out).onUpdate(l).start(),new ue(c).to(a,o/3).easing(re.Quadratic.Out).onUpdate(u).start()}else l(i),u(a);return this}return Object.assign({},r.position,{lookAt:h()});function l(e){var t=e.x,n=e.y,o=e.z;void 0!==t&&(r.position.x=t),void 0!==n&&(r.position.y=n),void 0!==o&&(r.position.z=o)}function u(t){var n=new st.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:r.lookAt(n)}function h(){return Object.assign(new st.Vector3(0,0,-1e3).applyQuaternion(r.quaternion).add(r.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=arguments.length,r=new Array(o>3?o-3:0),i=3;i<o;i++)r[i-3]=arguments[i];return this.fitToBbox(this.getBbox.apply(this,r),t,n)},fitToBbox:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=e.camera;if(t){var s=new st.Vector3(0,0,0),c=2*Math.max.apply(Math,o(Object.entries(t).map((function(e){var t=n(e,2),r=t[0],i=t[1];return Math.max.apply(Math,o(i.map((function(e){return Math.abs(s[r]-e)}))))})))),l=(1-2*i/e.height)*a.fov,u=c/Math.atan(l*Math.PI/180),h=u/a.aspect,p=Math.max(u,h);if(p>0){var d=s.clone().sub(a.position).normalize().multiplyScalar(-p);this.cameraPosition(d,s,r)}}return this},getBbox:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},r=new st.Box3(new st.Vector3(0,0,0),new st.Vector3(0,0,0)),i=e.objects.filter(n);return i.length?(i.forEach((function(e){return r.expandByObject(e)})),Object.assign.apply(Object,o(["x","y","z"].map((function(e){return t({},e,[r.min[e],r.max[e]])}))))):null},getScreenCoords:function(e,t,n,o){var r=new st.Vector3(t,n,o);return r.project(this.camera()),{x:(r.x+1)*e.width/2,y:-(r.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=new st.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new st.Raycaster;return i.setFromCamera(r,e.camera),Object.assign({},i.ray.at(o,new st.Vector3))},intersectingObjects:function(e,t,n){var o=new st.Vector2(t/e.width*2-1,-n/e.height*2+1),r=new st.Raycaster;return r.params.Line.threshold=e.lineHoverPrecision,r.setFromCamera(o,e.camera),r.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new st.Scene,camera:new st.PerspectiveCamera,clock:new st.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,a=n.rendererConfig,s=void 0===a?{}:a,c=n.extraRenderers,u=void 0===c?[]:c,h=n.waitForLoadComplete,p=void 0===h||h;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new st.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var o=(r=t.container,i=r.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:i.top+s,left:i.left+a});t.pointerPos.x=n.pageX-o.left,t.pointerPos.y=n.pageY-o.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}var r,i,a,s}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new st.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},s)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=u,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new x(t.renderer),t.postProcessingComposer.addPass(new C(t.scene,t.camera)),t.controls=new{trackball:l,orbit:g,fly:v}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(o(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new st.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!p,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(o(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new st.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=Q(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new st.Color(oe(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new st.TextureLoader).load(e.backgroundImageUrl,(function(t){t.colorSpace=st.SRGBColorSpace,e.skysphere.material=new st.MeshBasicMaterial({map:t,side:st.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("lights")&&((t.lights||[]).forEach((function(t){return e.scene.remove(t)})),e.lights.forEach((function(t){return e.scene.add(t)}))),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}},Ze=qe.stateInit,Qe=void 0===Ze?function(){return{}}:Ze,Ge=qe.props,We=void 0===Ge?{}:Ge,$e=qe.methods,Je=void 0===$e?{}:$e,et=qe.aliases,tt=void 0===et?{}:et,nt=qe.init,ot=void 0===nt?function(){}:nt,rt=qe.update,it=void 0===rt?function(){}:rt,at=Object.keys(We).map((function(e){return new Xe(e,We[e])})),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},Qe instanceof Function?Qe(e):Qe,{initialised:!1}),n={};function o(t){return r(t,e),i(),o}var r=function(e,n){ot.call(o,e,t,n),t.initialised=!0},i=Ne((function(){t.initialised&&(it.call(o,t,n),n={})}),1);return at.forEach((function(e){o[e.name]=function(e){var r=e.name,a=e.triggerUpdate,s=void 0!==a&&a,c=e.onChange,l=void 0===c?function(e,t){}:c,u=e.defaultVal,h=void 0===u?null:u;return function(e){var a=t[r];if(!arguments.length)return a;var c=void 0===e?h:e;return t[r]=c,l.call(o,c,t,a),!n.hasOwnProperty(r)&&(n[r]=a),s&&i(),o}}(e)})),Object.keys(Je).forEach((function(e){o[e]=function(){for(var n,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(n=Je[e]).call.apply(n,[o,t].concat(i))}})),Object.entries(tt).forEach((function(e){var t=He(e,2),n=t[0],r=t[1];return o[n]=o[r]})),o.resetProps=function(){return at.forEach((function(e){o[e.name](e.defaultVal)})),o},o.resetProps(),t._rerender=i,o});return ct}));
|
|
@@ -37,31 +37,31 @@ function styleInject(css, ref) {
|
|
|
37
37
|
var css_248z = ".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n top: 0;\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n user-select: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}";
|
|
38
38
|
styleInject(css_248z);
|
|
39
39
|
|
|
40
|
-
function _iterableToArrayLimit(
|
|
41
|
-
var
|
|
42
|
-
if (null !=
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
function _iterableToArrayLimit(r, l) {
|
|
41
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
42
|
+
if (null != t) {
|
|
43
|
+
var e,
|
|
44
|
+
n,
|
|
45
|
+
i,
|
|
46
|
+
u,
|
|
47
|
+
a = [],
|
|
48
|
+
f = !0,
|
|
49
|
+
o = !1;
|
|
50
50
|
try {
|
|
51
|
-
if (
|
|
52
|
-
if (Object(
|
|
53
|
-
|
|
54
|
-
} else for (; !(
|
|
55
|
-
} catch (
|
|
56
|
-
|
|
51
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
52
|
+
if (Object(t) !== t) return;
|
|
53
|
+
f = !1;
|
|
54
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
55
|
+
} catch (r) {
|
|
56
|
+
o = !0, n = r;
|
|
57
57
|
} finally {
|
|
58
58
|
try {
|
|
59
|
-
if (!
|
|
59
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
60
60
|
} finally {
|
|
61
|
-
if (
|
|
61
|
+
if (o) throw n;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return a;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function _defineProperty(obj, key, value) {
|
|
@@ -177,6 +177,9 @@ var threeRenderObjects = Kapsule({
|
|
|
177
177
|
objects: {
|
|
178
178
|
"default": []
|
|
179
179
|
},
|
|
180
|
+
lights: {
|
|
181
|
+
"default": []
|
|
182
|
+
},
|
|
180
183
|
enablePointerInteraction: {
|
|
181
184
|
"default": true,
|
|
182
185
|
onChange: function onChange(_, state) {
|
|
@@ -637,6 +640,15 @@ var threeRenderObjects = Kapsule({
|
|
|
637
640
|
}
|
|
638
641
|
}
|
|
639
642
|
changedProps.hasOwnProperty('showNavInfo') && (state.navInfo.style.display = state.showNavInfo ? null : 'none');
|
|
643
|
+
if (changedProps.hasOwnProperty('lights')) {
|
|
644
|
+
(changedProps.lights || []).forEach(function (light) {
|
|
645
|
+
return state.scene.remove(light);
|
|
646
|
+
}); // Clear the place
|
|
647
|
+
state.lights.forEach(function (light) {
|
|
648
|
+
return state.scene.add(light);
|
|
649
|
+
}); // Add to scene
|
|
650
|
+
}
|
|
651
|
+
|
|
640
652
|
if (changedProps.hasOwnProperty('objects')) {
|
|
641
653
|
(changedProps.objects || []).forEach(function (obj) {
|
|
642
654
|
return state.scene.remove(obj);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-render-objects",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.0",
|
|
4
4
|
"description": "Easy way to render ThreeJS objects with built-in interaction defaults",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"three": "*"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@babel/core": "^7.
|
|
58
|
-
"@babel/preset-env": "^7.
|
|
59
|
-
"@rollup/plugin-babel": "^6.0.
|
|
60
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
61
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
62
|
-
"@rollup/plugin-terser": "^0.4.
|
|
63
|
-
"postcss": "^8.4.
|
|
64
|
-
"rimraf": "^5.0.
|
|
65
|
-
"rollup": "^
|
|
66
|
-
"rollup-plugin-dts": "^
|
|
57
|
+
"@babel/core": "^7.23.2",
|
|
58
|
+
"@babel/preset-env": "^7.23.2",
|
|
59
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
60
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
61
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
62
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
63
|
+
"postcss": "^8.4.31",
|
|
64
|
+
"rimraf": "^5.0.5",
|
|
65
|
+
"rollup": "^4.1.4",
|
|
66
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
67
67
|
"rollup-plugin-postcss": "^4.0.2",
|
|
68
|
-
"three": "^0.
|
|
69
|
-
"typescript": "^5.
|
|
68
|
+
"three": "^0.157.0",
|
|
69
|
+
"typescript": "^5.2.2"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=12"
|