vis-core 0.30.0-beta.35 → 0.30.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/index.module.js +184 -152
- package/dist/version.d.ts +1 -1
- package/dist/vis/city/index.d.ts +1 -4
- package/dist/vis/city/objects/area/index.d.ts +1 -3
- package/dist/vis/map/MapManager.d.ts +8 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".-translate-x-1\\/2,.-translate-y-1\\/2,.transform{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1 }.shadow{--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.ring{--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.invert,.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.whitespace-nowrap{white-space:nowrap}.text-center{text-align:center}.text-sm{font-size:14px;line-height:20px}.leading-\\[1\\]{line-height:1}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-opacity-80{--tw-text-opacity: .8 }.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
"use strict";var jn=Object.defineProperty,Qn=Object.defineProperties;var $n=Object.getOwnPropertyDescriptors;var Un=Object.getOwnPropertySymbols,qn=Object.getPrototypeOf,e1=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,i1=Reflect.get;var En=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),n1=v=>{throw TypeError(v)},Ln=Math.pow,Yn=(v,e,r)=>e in v?jn(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,gi=(v,e)=>{for(var r in e||(e={}))e1.call(e,r)&&Yn(v,r,e[r]);if(Un)for(var r of Un(e))t1.call(e,r)&&Yn(v,r,e[r]);return v},qi=(v,e)=>Qn(v,$n(e));var C0=(v,e,r)=>Yn(v,typeof e!="symbol"?e+"":e,r);var Zn=(v,e,r)=>i1(qn(v),r,e);var U0=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())}),s1=function(v,e){this[0]=v,this[1]=e};var Bn=v=>{var e=v[En("asyncIterator")],r=!1,o,V={};return e==null?(e=v[En("iterator")](),o=le=>V[le]=fe=>e[le](fe)):(e=e.call(v),o=le=>V[le]=fe=>{if(r){if(r=!1,le==="throw")throw fe;return fe}return r=!0,{done:!1,value:new s1(new Promise(Le=>{var Ce=e[le](fe);Ce instanceof Object||n1("Object expected"),Le(Ce)}),1)}}),V[En("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=le=>{throw le},"return"in e&&o("return"),V},Dn=(v,e,r)=>(e=v[En("asyncIterator")])?e.call(v):(v=v[En("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=le=>new Promise((fe,Le,Ce)=>(le=V.call(v,le),Ce=le.done,Promise.resolve(le.value).then(Re=>fe({value:Re,done:Ce}),Le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.35",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),le=CryptoJS.enc.Base64.parse(r),fe=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),Le=CryptoJS.lib.WordArray.create(V.words.slice(4)),Ce=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Re=o.verifyWithMessageHashPSS(Ce,jsrsasign.b64tohex(v),"sha256",32);if(!Re)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:Le},le,{iv:fe,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Fe=JSON.parse(ze),ke=Date.now();return!Fe.s||Fe.s>ke?(this.token=void 0,""):Fe.e&&Fe.e<ke?(this.token=void 0,""):(Fe.isValid=Re,Fe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var le=this._tweens[o[V]],fe=!r;le&&le.update(e,fe)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.Linear;return e<0?le(v[0],v[1],o):e>1?le(v[r],v[r-1],r-o):le(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,le=Interpolation.Utils.Bernstein,fe=0;fe<=o;fe++)r+=V(1-e,o-fe)*V(e,fe)*v[fe]*le(o,fe);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),le(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(le(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(le(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):le(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var le=(r-v)*.5,fe=(o-e)*.5,Le=V*V,Ce=V*Le;return(2*e-2*r+le+fe)*Ce+(-3*e+3*r-2*le-fe)*Le+le*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,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=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=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=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}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||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var le in this._valuesEnd)V[le]=this._valuesEnd[le];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,le){for(var fe in o){var Le=e[fe],Ce=Array.isArray(Le),Re=Ce?"array":typeof Le,Pe=!Ce&&Array.isArray(o[fe]);if(!(Re==="undefined"||Re==="function")){if(Pe){var ze=o[fe];if(ze.length===0)continue;for(var Fe=[Le],ke=0,Gt=ze.length;ke<Gt;ke+=1){var Vt=this._handleRelativeValue(Le,ze[ke]);if(isNaN(Vt)){Pe=!1,console.warn("Found invalid interpolation list. Skipping.");break}Fe.push(Vt)}Pe&&(o[fe]=Fe)}if((Re==="object"||Ce)&&Le&&!Pe){r[fe]=Ce?[]:{};var Xt=Le;for(var xt in Xt)r[fe][xt]=Xt[xt];V[fe]=Ce?[]:{};var ze=o[fe];if(!this._isDynamic){var Zt={};for(var xt in ze)Zt[xt]=ze[xt];o[fe]=ze=Zt}this._setupProperties(Xt,r[fe],ze,V[fe],le)}else(typeof r[fe]=="undefined"||le)&&(r[fe]=Le),Ce||(r[fe]*=1),Pe?V[fe]=o[fe].slice().reverse():V[fe]=r[fe]||0}}},v.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},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var le=e-this._startTime,fe=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),Le=this._duration+this._repeat*fe,Ce=this._calculateElapsedPortion(le,fe,Le),Re=this._easingFunction(Ce),Pe=this._calculateCompletionStatus(le,fe);if(Pe==="repeat"&&this._processRepetition(le,fe),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Re),Pe==="about-to-repeat"&&this._processRepetition(le,fe),this._onUpdateCallback&&this._onUpdateCallback(this._object,Ce),Pe==="repeat"||Pe==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Pe==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,Fe=this._chainedTweens.length;ze<Fe;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Pe!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,le=Math.min(V/this._duration,1);return le===0&&e!==0&&e%this._duration===0?1:le},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var le=this._valuesEnd[V];!this._yoyo&&typeof le=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(le)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var le in o)if(r[le]!==void 0){var fe=r[le]||0,Le=o[le],Ce=Array.isArray(e[le]),Re=Array.isArray(Le),Pe=!Ce&ℜPe?e[le]=this._interpolationFunction(Le,V):typeof Le=="object"&&Le?this._updateProperties(e[le],fe,Le,V):(Le=this._handleRelativeValue(fe,Le),typeof Le=="number"&&(e[le]=fe+(Le-fe)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
|
+
"use strict";var jn=Object.defineProperty,Qn=Object.defineProperties;var $n=Object.getOwnPropertyDescriptors;var Un=Object.getOwnPropertySymbols,qn=Object.getPrototypeOf,e1=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,i1=Reflect.get;var En=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),n1=v=>{throw TypeError(v)},Ln=Math.pow,Yn=(v,e,r)=>e in v?jn(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,gi=(v,e)=>{for(var r in e||(e={}))e1.call(e,r)&&Yn(v,r,e[r]);if(Un)for(var r of Un(e))t1.call(e,r)&&Yn(v,r,e[r]);return v},qi=(v,e)=>Qn(v,$n(e));var C0=(v,e,r)=>Yn(v,typeof e!="symbol"?e+"":e,r);var Zn=(v,e,r)=>i1(qn(v),r,e);var U0=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())}),s1=function(v,e){this[0]=v,this[1]=e};var Bn=v=>{var e=v[En("asyncIterator")],r=!1,o,V={};return e==null?(e=v[En("iterator")](),o=le=>V[le]=fe=>e[le](fe)):(e=e.call(v),o=le=>V[le]=fe=>{if(r){if(r=!1,le==="throw")throw fe;return fe}return r=!0,{done:!1,value:new s1(new Promise(Le=>{var Ce=e[le](fe);Ce instanceof Object||n1("Object expected"),Le(Ce)}),1)}}),V[En("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=le=>{throw le},"return"in e&&o("return"),V},Dn=(v,e,r)=>(e=v[En("asyncIterator")])?e.call(v):(v=v[En("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=le=>new Promise((fe,Le,Ce)=>(le=V.call(v,le),Ce=le.done,Promise.resolve(le.value).then(Re=>fe({value:Re,done:Ce}),Le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.37",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),le=CryptoJS.enc.Base64.parse(r),fe=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),Le=CryptoJS.lib.WordArray.create(V.words.slice(4)),Ce=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Re=o.verifyWithMessageHashPSS(Ce,jsrsasign.b64tohex(v),"sha256",32);if(!Re)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:Le},le,{iv:fe,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Fe=JSON.parse(ze),ke=Date.now();return!Fe.s||Fe.s>ke?(this.token=void 0,""):Fe.e&&Fe.e<ke?(this.token=void 0,""):(Fe.isValid=Re,Fe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var le=this._tweens[o[V]],fe=!r;le&&le.update(e,fe)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.Linear;return e<0?le(v[0],v[1],o):e>1?le(v[r],v[r-1],r-o):le(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,le=Interpolation.Utils.Bernstein,fe=0;fe<=o;fe++)r+=V(1-e,o-fe)*V(e,fe)*v[fe]*le(o,fe);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),le(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(le(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(le(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):le(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var le=(r-v)*.5,fe=(o-e)*.5,Le=V*V,Ce=V*Le;return(2*e-2*r+le+fe)*Ce+(-3*e+3*r-2*le-fe)*Le+le*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,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=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=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=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}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||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var le in this._valuesEnd)V[le]=this._valuesEnd[le];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,le){for(var fe in o){var Le=e[fe],Ce=Array.isArray(Le),Re=Ce?"array":typeof Le,Pe=!Ce&&Array.isArray(o[fe]);if(!(Re==="undefined"||Re==="function")){if(Pe){var ze=o[fe];if(ze.length===0)continue;for(var Fe=[Le],ke=0,Gt=ze.length;ke<Gt;ke+=1){var Vt=this._handleRelativeValue(Le,ze[ke]);if(isNaN(Vt)){Pe=!1,console.warn("Found invalid interpolation list. Skipping.");break}Fe.push(Vt)}Pe&&(o[fe]=Fe)}if((Re==="object"||Ce)&&Le&&!Pe){r[fe]=Ce?[]:{};var Xt=Le;for(var xt in Xt)r[fe][xt]=Xt[xt];V[fe]=Ce?[]:{};var ze=o[fe];if(!this._isDynamic){var Zt={};for(var xt in ze)Zt[xt]=ze[xt];o[fe]=ze=Zt}this._setupProperties(Xt,r[fe],ze,V[fe],le)}else(typeof r[fe]=="undefined"||le)&&(r[fe]=Le),Ce||(r[fe]*=1),Pe?V[fe]=o[fe].slice().reverse():V[fe]=r[fe]||0}}},v.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},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var le=e-this._startTime,fe=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),Le=this._duration+this._repeat*fe,Ce=this._calculateElapsedPortion(le,fe,Le),Re=this._easingFunction(Ce),Pe=this._calculateCompletionStatus(le,fe);if(Pe==="repeat"&&this._processRepetition(le,fe),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Re),Pe==="about-to-repeat"&&this._processRepetition(le,fe),this._onUpdateCallback&&this._onUpdateCallback(this._object,Ce),Pe==="repeat"||Pe==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Pe==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,Fe=this._chainedTweens.length;ze<Fe;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Pe!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,le=Math.min(V/this._duration,1);return le===0&&e!==0&&e%this._duration===0?1:le},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var le=this._valuesEnd[V];!this._yoyo&&typeof le=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(le)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var le in o)if(r[le]!==void 0){var fe=r[le]||0,Le=o[le],Ce=Array.isArray(e[le]),Re=Array.isArray(Le),Pe=!Ce&ℜPe?e[le]=this._interpolationFunction(Le,V):typeof Le=="object"&&Le?this._updateProperties(e[le],fe,Le,V):(Le=this._handleRelativeValue(fe,Le),typeof Le=="number"&&(e[le]=fe+(Le-fe)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2010-2025 Three.js Authors
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
|
-
*/const REVISION="182",MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,CullFaceFrontBack=3,BasicShadowMap=0,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,ConstantColorFactor=211,OneMinusConstantColorFactor=212,ConstantAlphaFactor=213,OneMinusConstantAlphaFactor=214,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,AgXToneMapping=6,NeutralToneMapping=7,AttachedBindMode="attached",DetachedBindMode="detached",UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipMapNearestFilter=1004,NearestMipmapLinearFilter=1005,NearestMipMapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipMapNearestFilter=1007,LinearMipmapLinearFilter=1008,LinearMipMapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,UnsignedInt101111Type=35899,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBIntegerFormat=1032,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,R11_EAC_Format=37488,SIGNED_R11_EAC_Format=37489,RG11_EAC_Format=37490,SIGNED_RG11_EAC_Format=37491,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,LoopOnce=2200,LoopRepeat=2201,LoopPingPong=2202,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,AdditiveAnimationBlendMode=2501,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,BasicDepthPacking=3200,RGBADepthPacking=3201,RGBDepthPacking=3202,RGDepthPacking=3203,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace="",SRGBColorSpace="srgb",LinearSRGBColorSpace="srgb-linear",LinearTransfer="linear",SRGBTransfer="srgb",NoNormalPacking="",NormalRGPacking="rg",NormalGAPacking="ga",ZeroStencilOp=0,KeepStencilOp=7680,ReplaceStencilOp=7681,IncrementStencilOp=7682,DecrementStencilOp=7683,IncrementWrapStencilOp=34055,DecrementWrapStencilOp=34056,InvertStencilOp=5386,NeverStencilFunc=512,LessStencilFunc=513,EqualStencilFunc=514,LessEqualStencilFunc=515,GreaterStencilFunc=516,NotEqualStencilFunc=517,GreaterEqualStencilFunc=518,AlwaysStencilFunc=519,NeverCompare=512,LessCompare=513,EqualCompare=514,LessEqualCompare=515,GreaterCompare=516,NotEqualCompare=517,GreaterEqualCompare=518,AlwaysCompare=519,StaticDrawUsage=35044,DynamicDrawUsage=35048,StreamDrawUsage=35040,StaticReadUsage=35045,DynamicReadUsage=35049,StreamReadUsage=35041,StaticCopyUsage=35046,DynamicCopyUsage=35050,StreamCopyUsage=35042,GLSL1="100",GLSL3="300 es",WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001,TimestampQuery={COMPUTE:"compute",RENDER:"render"},InterpolationSamplingType={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},InterpolationSamplingMode={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function arrayNeedsUint32(v){for(let e=v.length-1;e>=0;--e)if(v[e]>=65535)return!0;return!1}const TYPED_ARRAYS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function getTypedArray(v,e){return new TYPED_ARRAYS[v](e)}function isTypedArray(v){return ArrayBuffer.isView(v)&&!(v instanceof DataView)}function createElementNS(v){return document.createElementNS("http://www.w3.org/1999/xhtml",v)}function createCanvasElement(){const v=createElementNS("canvas");return v.style.display="block",v}const _cache={};let _setConsoleFunction=null;function setConsoleFunction(v){_setConsoleFunction=v}function getConsoleFunction(){return _setConsoleFunction}function log$1(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("log",e,...v):console.log(e,...v)}function warn(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("warn",e,...v):console.warn(e,...v)}function error$1(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("error",e,...v):console.error(e,...v)}function warnOnce(...v){const e=v.join(" ");e in _cache||(_cache[e]=!0,warn(...v))}function probeAsync(v,e,r){return new Promise(function(o,V){function le(){switch(v.clientWaitSync(e,v.SYNC_FLUSH_COMMANDS_BIT,0)){case v.WAIT_FAILED:V();break;case v.TIMEOUT_EXPIRED:setTimeout(le,r);break;default:o()}}setTimeout(le,r)})}class EventDispatcher{addEventListener(e,r){this._listeners===void 0&&(this._listeners={});const o=this._listeners;o[e]===void 0&&(o[e]=[]),o[e].indexOf(r)===-1&&o[e].push(r)}hasEventListener(e,r){const o=this._listeners;return o===void 0?!1:o[e]!==void 0&&o[e].indexOf(r)!==-1}removeEventListener(e,r){const o=this._listeners;if(o===void 0)return;const V=o[e];if(V!==void 0){const le=V.indexOf(r);le!==-1&&V.splice(le,1)}}dispatchEvent(e){const r=this._listeners;if(r===void 0)return;const o=r[e.type];if(o!==void 0){e.target=this;const V=o.slice(0);for(let le=0,fe=V.length;le<fe;le++)V[le].call(this,e);e.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180,RAD2DEG=180/Math.PI;function generateUUID(){const v=Math.random()*4294967295|0,e=Math.random()*4294967295|0,r=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(_lut[v&255]+_lut[v>>8&255]+_lut[v>>16&255]+_lut[v>>24&255]+"-"+_lut[e&255]+_lut[e>>8&255]+"-"+_lut[e>>16&15|64]+_lut[e>>24&255]+"-"+_lut[r&63|128]+_lut[r>>8&255]+"-"+_lut[r>>16&255]+_lut[r>>24&255]+_lut[o&255]+_lut[o>>8&255]+_lut[o>>16&255]+_lut[o>>24&255]).toLowerCase()}function clamp(v,e,r){return Math.max(e,Math.min(r,v))}function euclideanModulo(v,e){return(v%e+e)%e}function mapLinear(v,e,r,o,V){return o+(v-e)*(V-o)/(r-e)}function inverseLerp(v,e,r){return v!==e?(r-v)/(e-v):0}function lerp(v,e,r){return(1-r)*v+r*e}function damp(v,e,r,o){return lerp(v,e,1-Math.exp(-r*o))}function pingpong(v,e=1){return e-Math.abs(euclideanModulo(v,e*2)-e)}function smoothstep(v,e,r){return v<=e?0:v>=r?1:(v=(v-e)/(r-e),v*v*(3-2*v))}function smootherstep(v,e,r){return v<=e?0:v>=r?1:(v=(v-e)/(r-e),v*v*v*(v*(v*6-15)+10))}function randInt(v,e){return v+Math.floor(Math.random()*(e-v+1))}function randFloat(v,e){return v+Math.random()*(e-v)}function randFloatSpread(v){return v*(.5-Math.random())}function seededRandom(v){v!==void 0&&(_seed=v);let e=_seed+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function degToRad(v){return v*DEG2RAD}function radToDeg(v){return v*RAD2DEG}function isPowerOfTwo(v){return(v&v-1)===0&&v!==0}function ceilPowerOfTwo(v){return Math.pow(2,Math.ceil(Math.log(v)/Math.LN2))}function floorPowerOfTwo(v){return Math.pow(2,Math.floor(Math.log(v)/Math.LN2))}function setQuaternionFromProperEuler(v,e,r,o,V){const le=Math.cos,fe=Math.sin,Le=le(r/2),Ce=fe(r/2),Re=le((e+o)/2),Pe=fe((e+o)/2),ze=le((e-o)/2),Fe=fe((e-o)/2),ke=le((o-e)/2),Gt=fe((o-e)/2);switch(V){case"XYX":v.set(Le*Pe,Ce*ze,Ce*Fe,Le*Re);break;case"YZY":v.set(Ce*Fe,Le*Pe,Ce*ze,Le*Re);break;case"ZXZ":v.set(Ce*ze,Ce*Fe,Le*Pe,Le*Re);break;case"XZX":v.set(Le*Pe,Ce*Gt,Ce*ke,Le*Re);break;case"YXY":v.set(Ce*ke,Le*Pe,Ce*Gt,Le*Re);break;case"ZYZ":v.set(Ce*Gt,Ce*ke,Le*Pe,Le*Re);break;default:warn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+V)}}function denormalize(v,e){switch(e.constructor){case Float32Array:return v;case Uint32Array:return v/4294967295;case Uint16Array:return v/65535;case Uint8Array:return v/255;case Int32Array:return Math.max(v/2147483647,-1);case Int16Array:return Math.max(v/32767,-1);case Int8Array:return Math.max(v/127,-1);default:throw new Error("Invalid component type.")}}function normalize$1(v,e){switch(e.constructor){case Float32Array:return v;case Uint32Array:return Math.round(v*4294967295);case Uint16Array:return Math.round(v*65535);case Uint8Array:return Math.round(v*255);case Int32Array:return Math.round(v*2147483647);case Int16Array:return Math.round(v*32767);case Int8Array:return Math.round(v*127);default:throw new Error("Invalid component type.")}}const MathUtils={DEG2RAD,RAD2DEG,generateUUID,clamp,euclideanModulo,mapLinear,inverseLerp,lerp,damp,pingpong,smoothstep,smootherstep,randInt,randFloat,randFloatSpread,seededRandom,degToRad,radToDeg,isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler,normalize:normalize$1,denormalize};class Vector2{constructor(e=0,r=0){Vector2.prototype.isVector2=!0,this.x=e,this.y=r}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,r){return this.x=e,this.y=r,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const r=this.x,o=this.y,V=e.elements;return this.x=V[0]*r+V[3]*o+V[6],this.y=V[1]*r+V[4]*o+V[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const o=this.dot(e)/r;return Math.acos(clamp(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,o=this.y-e.y;return r*r+o*o}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this}rotateAround(e,r){const o=Math.cos(r),V=Math.sin(r),le=this.x-e.x,fe=this.y-e.y;return this.x=le*o-fe*V+e.x,this.y=le*V+fe*o+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Quaternion{constructor(e=0,r=0,o=0,V=1){this.isQuaternion=!0,this._x=e,this._y=r,this._z=o,this._w=V}static slerpFlat(e,r,o,V,le,fe,Le){let Ce=o[V+0],Re=o[V+1],Pe=o[V+2],ze=o[V+3],Fe=le[fe+0],ke=le[fe+1],Gt=le[fe+2],Vt=le[fe+3];if(Le<=0){e[r+0]=Ce,e[r+1]=Re,e[r+2]=Pe,e[r+3]=ze;return}if(Le>=1){e[r+0]=Fe,e[r+1]=ke,e[r+2]=Gt,e[r+3]=Vt;return}if(ze!==Vt||Ce!==Fe||Re!==ke||Pe!==Gt){let Xt=Ce*Fe+Re*ke+Pe*Gt+ze*Vt;Xt<0&&(Fe=-Fe,ke=-ke,Gt=-Gt,Vt=-Vt,Xt=-Xt);let xt=1-Le;if(Xt<.9995){const Zt=Math.acos(Xt),wt=Math.sin(Zt);xt=Math.sin(xt*Zt)/wt,Le=Math.sin(Le*Zt)/wt,Ce=Ce*xt+Fe*Le,Re=Re*xt+ke*Le,Pe=Pe*xt+Gt*Le,ze=ze*xt+Vt*Le}else{Ce=Ce*xt+Fe*Le,Re=Re*xt+ke*Le,Pe=Pe*xt+Gt*Le,ze=ze*xt+Vt*Le;const Zt=1/Math.sqrt(Ce*Ce+Re*Re+Pe*Pe+ze*ze);Ce*=Zt,Re*=Zt,Pe*=Zt,ze*=Zt}}e[r]=Ce,e[r+1]=Re,e[r+2]=Pe,e[r+3]=ze}static multiplyQuaternionsFlat(e,r,o,V,le,fe){const Le=o[V],Ce=o[V+1],Re=o[V+2],Pe=o[V+3],ze=le[fe],Fe=le[fe+1],ke=le[fe+2],Gt=le[fe+3];return e[r]=Le*Gt+Pe*ze+Ce*ke-Re*Fe,e[r+1]=Ce*Gt+Pe*Fe+Re*ze-Le*ke,e[r+2]=Re*Gt+Pe*ke+Le*Fe-Ce*ze,e[r+3]=Pe*Gt-Le*ze-Ce*Fe-Re*ke,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,r,o,V){return this._x=e,this._y=r,this._z=o,this._w=V,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,r=!0){const o=e._x,V=e._y,le=e._z,fe=e._order,Le=Math.cos,Ce=Math.sin,Re=Le(o/2),Pe=Le(V/2),ze=Le(le/2),Fe=Ce(o/2),ke=Ce(V/2),Gt=Ce(le/2);switch(fe){case"XYZ":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"YXZ":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;case"ZXY":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"ZYX":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;case"YZX":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"XZY":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;default:warn("Quaternion: .setFromEuler() encountered an unknown order: "+fe)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,r){const o=r/2,V=Math.sin(o);return this._x=e.x*V,this._y=e.y*V,this._z=e.z*V,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(e){const r=e.elements,o=r[0],V=r[4],le=r[8],fe=r[1],Le=r[5],Ce=r[9],Re=r[2],Pe=r[6],ze=r[10],Fe=o+Le+ze;if(Fe>0){const ke=.5/Math.sqrt(Fe+1);this._w=.25/ke,this._x=(Pe-Ce)*ke,this._y=(le-Re)*ke,this._z=(fe-V)*ke}else if(o>Le&&o>ze){const ke=2*Math.sqrt(1+o-Le-ze);this._w=(Pe-Ce)/ke,this._x=.25*ke,this._y=(V+fe)/ke,this._z=(le+Re)/ke}else if(Le>ze){const ke=2*Math.sqrt(1+Le-o-ze);this._w=(le-Re)/ke,this._x=(V+fe)/ke,this._y=.25*ke,this._z=(Ce+Pe)/ke}else{const ke=2*Math.sqrt(1+ze-o-Le);this._w=(fe-V)/ke,this._x=(le+Re)/ke,this._y=(Ce+Pe)/ke,this._z=.25*ke}return this._onChangeCallback(),this}setFromUnitVectors(e,r){let o=e.dot(r)+1;return o<1e-8?(o=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=o):(this._x=0,this._y=-e.z,this._z=e.y,this._w=o)):(this._x=e.y*r.z-e.z*r.y,this._y=e.z*r.x-e.x*r.z,this._z=e.x*r.y-e.y*r.x,this._w=o),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp(this.dot(e),-1,1)))}rotateTowards(e,r){const o=this.angleTo(e);if(o===0)return this;const V=Math.min(1,r/o);return this.slerp(e,V),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,r){const o=e._x,V=e._y,le=e._z,fe=e._w,Le=r._x,Ce=r._y,Re=r._z,Pe=r._w;return this._x=o*Pe+fe*Le+V*Re-le*Ce,this._y=V*Pe+fe*Ce+le*Le-o*Re,this._z=le*Pe+fe*Re+o*Ce-V*Le,this._w=fe*Pe-o*Le-V*Ce-le*Re,this._onChangeCallback(),this}slerp(e,r){if(r<=0)return this;if(r>=1)return this.copy(e);let o=e._x,V=e._y,le=e._z,fe=e._w,Le=this.dot(e);Le<0&&(o=-o,V=-V,le=-le,fe=-fe,Le=-Le);let Ce=1-r;if(Le<.9995){const Re=Math.acos(Le),Pe=Math.sin(Re);Ce=Math.sin(Ce*Re)/Pe,r=Math.sin(r*Re)/Pe,this._x=this._x*Ce+o*r,this._y=this._y*Ce+V*r,this._z=this._z*Ce+le*r,this._w=this._w*Ce+fe*r,this._onChangeCallback()}else this._x=this._x*Ce+o*r,this._y=this._y*Ce+V*r,this._z=this._z*Ce+le*r,this._w=this._w*Ce+fe*r,this.normalize();return this}slerpQuaternions(e,r,o){return this.copy(e).slerp(r,o)}random(){const e=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),o=Math.random(),V=Math.sqrt(1-o),le=Math.sqrt(o);return this.set(V*Math.sin(e),V*Math.cos(e),le*Math.sin(r),le*Math.cos(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,r=0){return this._x=e[r],this._y=e[r+1],this._z=e[r+2],this._w=e[r+3],this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._w,e}fromBufferAttribute(e,r){return this._x=e.getX(r),this._y=e.getY(r),this._z=e.getZ(r),this._w=e.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(e=0,r=0,o=0){Vector3.prototype.isVector3=!0,this.x=e,this.y=r,this.z=o}set(e,r,o){return o===void 0&&(o=this.z),this.x=e,this.y=r,this.z=o,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,r){return this.x=e.x*r.x,this.y=e.y*r.y,this.z=e.z*r.z,this}applyEuler(e){return this.applyQuaternion(_quaternion$4.setFromEuler(e))}applyAxisAngle(e,r){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(e,r))}applyMatrix3(e){const r=this.x,o=this.y,V=this.z,le=e.elements;return this.x=le[0]*r+le[3]*o+le[6]*V,this.y=le[1]*r+le[4]*o+le[7]*V,this.z=le[2]*r+le[5]*o+le[8]*V,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const r=this.x,o=this.y,V=this.z,le=e.elements,fe=1/(le[3]*r+le[7]*o+le[11]*V+le[15]);return this.x=(le[0]*r+le[4]*o+le[8]*V+le[12])*fe,this.y=(le[1]*r+le[5]*o+le[9]*V+le[13])*fe,this.z=(le[2]*r+le[6]*o+le[10]*V+le[14])*fe,this}applyQuaternion(e){const r=this.x,o=this.y,V=this.z,le=e.x,fe=e.y,Le=e.z,Ce=e.w,Re=2*(fe*V-Le*o),Pe=2*(Le*r-le*V),ze=2*(le*o-fe*r);return this.x=r+Ce*Re+fe*ze-Le*Pe,this.y=o+Ce*Pe+Le*Re-le*ze,this.z=V+Ce*ze+le*Pe-fe*Re,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const r=this.x,o=this.y,V=this.z,le=e.elements;return this.x=le[0]*r+le[4]*o+le[8]*V,this.y=le[1]*r+le[5]*o+le[9]*V,this.z=le[2]*r+le[6]*o+le[10]*V,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this.z=clamp(this.z,e.z,r.z),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this.z=clamp(this.z,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this.z=e.z+(r.z-e.z)*o,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,r){const o=e.x,V=e.y,le=e.z,fe=r.x,Le=r.y,Ce=r.z;return this.x=V*Ce-le*Le,this.y=le*fe-o*Ce,this.z=o*Le-V*fe,this}projectOnVector(e){const r=e.lengthSq();if(r===0)return this.set(0,0,0);const o=e.dot(this)/r;return this.copy(e).multiplyScalar(o)}projectOnPlane(e){return _vector$c.copy(this).projectOnVector(e),this.sub(_vector$c)}reflect(e){return this.sub(_vector$c.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const o=this.dot(e)/r;return Math.acos(clamp(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,o=this.y-e.y,V=this.z-e.z;return r*r+o*o+V*V}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,r,o){const V=Math.sin(r)*e;return this.x=V*Math.sin(o),this.y=Math.cos(r)*e,this.z=V*Math.cos(o),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,r,o){return this.x=e*Math.sin(r),this.y=o,this.z=e*Math.cos(r),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(e){const r=this.setFromMatrixColumn(e,0).length(),o=this.setFromMatrixColumn(e,1).length(),V=this.setFromMatrixColumn(e,2).length();return this.x=r,this.y=o,this.z=V,this}setFromMatrixColumn(e,r){return this.fromArray(e.elements,r*4)}setFromMatrix3Column(e,r){return this.fromArray(e.elements,r*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,r=Math.random()*2-1,o=Math.sqrt(1-r*r);return this.x=o*Math.cos(e),this.y=r,this.z=o*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const _vector$c=new Vector3,_quaternion$4=new Quaternion;class Matrix3{constructor(e,r,o,V,le,fe,Le,Ce,Re){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,r,o,V,le,fe,Le,Ce,Re)}set(e,r,o,V,le,fe,Le,Ce,Re){const Pe=this.elements;return Pe[0]=e,Pe[1]=V,Pe[2]=Le,Pe[3]=r,Pe[4]=le,Pe[5]=Ce,Pe[6]=o,Pe[7]=fe,Pe[8]=Re,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const r=this.elements,o=e.elements;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],this}extractBasis(e,r,o){return e.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const r=e.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const o=e.elements,V=r.elements,le=this.elements,fe=o[0],Le=o[3],Ce=o[6],Re=o[1],Pe=o[4],ze=o[7],Fe=o[2],ke=o[5],Gt=o[8],Vt=V[0],Xt=V[3],xt=V[6],Zt=V[1],wt=V[4],Wt=V[7],It=V[2],Nt=V[5],Ft=V[8];return le[0]=fe*Vt+Le*Zt+Ce*It,le[3]=fe*Xt+Le*wt+Ce*Nt,le[6]=fe*xt+Le*Wt+Ce*Ft,le[1]=Re*Vt+Pe*Zt+ze*It,le[4]=Re*Xt+Pe*wt+ze*Nt,le[7]=Re*xt+Pe*Wt+ze*Ft,le[2]=Fe*Vt+ke*Zt+Gt*It,le[5]=Fe*Xt+ke*wt+Gt*Nt,le[8]=Fe*xt+ke*Wt+Gt*Ft,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=e,r[4]*=e,r[7]*=e,r[2]*=e,r[5]*=e,r[8]*=e,this}determinant(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8];return r*fe*Pe-r*Le*Re-o*le*Pe+o*Le*Ce+V*le*Re-V*fe*Ce}invert(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8],ze=Pe*fe-Le*Re,Fe=Le*Ce-Pe*le,ke=Re*le-fe*Ce,Gt=r*ze+o*Fe+V*ke;if(Gt===0)return this.set(0,0,0,0,0,0,0,0,0);const Vt=1/Gt;return e[0]=ze*Vt,e[1]=(V*Re-Pe*o)*Vt,e[2]=(Le*o-V*fe)*Vt,e[3]=Fe*Vt,e[4]=(Pe*r-V*Ce)*Vt,e[5]=(V*le-Le*r)*Vt,e[6]=ke*Vt,e[7]=(o*Ce-Re*r)*Vt,e[8]=(fe*r-o*le)*Vt,this}transpose(){let e;const r=this.elements;return e=r[1],r[1]=r[3],r[3]=e,e=r[2],r[2]=r[6],r[6]=e,e=r[5],r[5]=r[7],r[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const r=this.elements;return e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8],this}setUvTransform(e,r,o,V,le,fe,Le){const Ce=Math.cos(le),Re=Math.sin(le);return this.set(o*Ce,o*Re,-o*(Ce*fe+Re*Le)+fe+e,-V*Re,V*Ce,-V*(-Re*fe+Ce*Le)+Le+r,0,0,1),this}scale(e,r){return this.premultiply(_m3.makeScale(e,r)),this}rotate(e){return this.premultiply(_m3.makeRotation(-e)),this}translate(e,r){return this.premultiply(_m3.makeTranslation(e,r)),this}makeTranslation(e,r){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,r,0,0,1),this}makeRotation(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,-o,0,o,r,0,0,0,1),this}makeScale(e,r){return this.set(e,0,0,0,r,0,0,0,1),this}equals(e){const r=this.elements,o=e.elements;for(let V=0;V<9;V++)if(r[V]!==o[V])return!1;return!0}fromArray(e,r=0){for(let o=0;o<9;o++)this.elements[o]=e[o+r];return this}toArray(e=[],r=0){const o=this.elements;return e[r]=o[0],e[r+1]=o[1],e[r+2]=o[2],e[r+3]=o[3],e[r+4]=o[4],e[r+5]=o[5],e[r+6]=o[6],e[r+7]=o[7],e[r+8]=o[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3,LINEAR_REC709_TO_XYZ=new Matrix3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function createColorManagement(){const v={enabled:!0,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(V,le,fe){return this.enabled===!1||le===fe||!le||!fe||(this.spaces[le].transfer===SRGBTransfer&&(V.r=SRGBToLinear(V.r),V.g=SRGBToLinear(V.g),V.b=SRGBToLinear(V.b)),this.spaces[le].primaries!==this.spaces[fe].primaries&&(V.applyMatrix3(this.spaces[le].toXYZ),V.applyMatrix3(this.spaces[fe].fromXYZ)),this.spaces[fe].transfer===SRGBTransfer&&(V.r=LinearToSRGB(V.r),V.g=LinearToSRGB(V.g),V.b=LinearToSRGB(V.b))),V},workingToColorSpace:function(V,le){return this.convert(V,this.workingColorSpace,le)},colorSpaceToWorking:function(V,le){return this.convert(V,le,this.workingColorSpace)},getPrimaries:function(V){return this.spaces[V].primaries},getTransfer:function(V){return V===NoColorSpace?LinearTransfer:this.spaces[V].transfer},getToneMappingMode:function(V){return this.spaces[V].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(V,le=this.workingColorSpace){return V.fromArray(this.spaces[le].luminanceCoefficients)},define:function(V){Object.assign(this.spaces,V)},_getMatrix:function(V,le,fe){return V.copy(this.spaces[le].toXYZ).multiply(this.spaces[fe].fromXYZ)},_getDrawingBufferColorSpace:function(V){return this.spaces[V].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(V=this.workingColorSpace){return this.spaces[V].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(V,le){return warnOnce("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),v.workingToColorSpace(V,le)},toWorkingColorSpace:function(V,le){return warnOnce("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),v.colorSpaceToWorking(V,le)}},e=[.64,.33,.3,.6,.15,.06],r=[.2126,.7152,.0722],o=[.3127,.329];return v.define({[LinearSRGBColorSpace]:{primaries:e,whitePoint:o,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:r,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:e,whitePoint:o,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:r,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}}),v}const ColorManagement=createColorManagement();function SRGBToLinear(v){return v<.04045?v*.0773993808:Math.pow(v*.9478672986+.0521327014,2.4)}function LinearToSRGB(v){return v<.0031308?v*12.92:1.055*Math.pow(v,.41666)-.055}let _canvas;class ImageUtils{static getDataURL(e,r="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let o;if(e instanceof HTMLCanvasElement)o=e;else{_canvas===void 0&&(_canvas=createElementNS("canvas")),_canvas.width=e.width,_canvas.height=e.height;const V=_canvas.getContext("2d");e instanceof ImageData?V.putImageData(e,0,0):V.drawImage(e,0,0,e.width,e.height),o=_canvas}return o.toDataURL(r)}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){const r=createElementNS("canvas");r.width=e.width,r.height=e.height;const o=r.getContext("2d");o.drawImage(e,0,0,e.width,e.height);const V=o.getImageData(0,0,e.width,e.height),le=V.data;for(let fe=0;fe<le.length;fe++)le[fe]=SRGBToLinear(le[fe]/255)*255;return o.putImageData(V,0,0),r}else if(e.data){const r=e.data.slice(0);for(let o=0;o<r.length;o++)r instanceof Uint8Array||r instanceof Uint8ClampedArray?r[o]=Math.floor(SRGBToLinear(r[o]/255)*255):r[o]=SRGBToLinear(r[o]);return{data:r,width:e.width,height:e.height}}else return warn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let _sourceId=0;class Source{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:_sourceId++}),this.uuid=generateUUID(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const r=this.data;return typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement?e.set(r.videoWidth,r.videoHeight,0):typeof VideoFrame!="undefined"&&r instanceof VideoFrame?e.set(r.displayHeight,r.displayWidth,0):r!==null?e.set(r.width,r.height,r.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const o={uuid:this.uuid,url:""},V=this.data;if(V!==null){let le;if(Array.isArray(V)){le=[];for(let fe=0,Le=V.length;fe<Le;fe++)V[fe].isDataTexture?le.push(serializeImage(V[fe].image)):le.push(serializeImage(V[fe]))}else le=serializeImage(V);o.url=le}return r||(e.images[this.uuid]=o),o}}function serializeImage(v){return typeof HTMLImageElement!="undefined"&&v instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&v instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&v instanceof ImageBitmap?ImageUtils.getDataURL(v):v.data?{data:Array.from(v.data),width:v.width,height:v.height,type:v.data.constructor.name}:(warn("Texture: Unable to serialize Texture."),{})}let _textureId=0;const _tempVec3=new Vector3;class Texture extends EventDispatcher{constructor(e=Texture.DEFAULT_IMAGE,r=Texture.DEFAULT_MAPPING,o=ClampToEdgeWrapping,V=ClampToEdgeWrapping,le=LinearFilter,fe=LinearMipmapLinearFilter,Le=RGBAFormat,Ce=UnsignedByteType,Re=Texture.DEFAULT_ANISOTROPY,Pe=NoColorSpace){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:_textureId++}),this.uuid=generateUUID(),this.name="",this.source=new Source(e),this.mipmaps=[],this.mapping=r,this.channel=0,this.wrapS=o,this.wrapT=V,this.magFilter=le,this.minFilter=fe,this.anisotropy=Re,this.format=Le,this.internalFormat=null,this.type=Ce,this.offset=new Vector2(0,0),this.repeat=new Vector2(1,1),this.center=new Vector2(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Matrix3,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=Pe,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const r in e){const o=e[r];if(o===void 0){warn(`Texture.setValues(): parameter '${r}' has value of undefined.`);continue}const V=this[r];if(V===void 0){warn(`Texture.setValues(): property '${r}' does not exist.`);continue}V&&o&&V.isVector2&&o.isVector2||V&&o&&V.isVector3&&o.isVector3||V&&o&&V.isMatrix3&&o.isMatrix3?V.copy(o):this[r]=o}}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const o={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(o.userData=this.userData),r||(e.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==UVMapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case RepeatWrapping:e.x=e.x-Math.floor(e.x);break;case ClampToEdgeWrapping:e.x=e.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case RepeatWrapping:e.y=e.y-Math.floor(e.y);break;case ClampToEdgeWrapping:e.y=e.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(e=0,r=0,o=0,V=1){Vector4.prototype.isVector4=!0,this.x=e,this.y=r,this.z=o,this.w=V}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,r,o,V){return this.x=e,this.y=r,this.z=o,this.w=V,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this.w=e.w+r.w,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this.w+=e.w*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this.w=e.w-r.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const r=this.x,o=this.y,V=this.z,le=this.w,fe=e.elements;return this.x=fe[0]*r+fe[4]*o+fe[8]*V+fe[12]*le,this.y=fe[1]*r+fe[5]*o+fe[9]*V+fe[13]*le,this.z=fe[2]*r+fe[6]*o+fe[10]*V+fe[14]*le,this.w=fe[3]*r+fe[7]*o+fe[11]*V+fe[15]*le,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const r=Math.sqrt(1-e.w*e.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/r,this.y=e.y/r,this.z=e.z/r),this}setAxisAngleFromRotationMatrix(e){let r,o,V,le;const Ce=e.elements,Re=Ce[0],Pe=Ce[4],ze=Ce[8],Fe=Ce[1],ke=Ce[5],Gt=Ce[9],Vt=Ce[2],Xt=Ce[6],xt=Ce[10];if(Math.abs(Pe-Fe)<.01&&Math.abs(ze-Vt)<.01&&Math.abs(Gt-Xt)<.01){if(Math.abs(Pe+Fe)<.1&&Math.abs(ze+Vt)<.1&&Math.abs(Gt+Xt)<.1&&Math.abs(Re+ke+xt-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;const wt=(Re+1)/2,Wt=(ke+1)/2,It=(xt+1)/2,Nt=(Pe+Fe)/4,Ft=(ze+Vt)/4,Ht=(Gt+Xt)/4;return wt>Wt&&wt>It?wt<.01?(o=0,V=.707106781,le=.707106781):(o=Math.sqrt(wt),V=Nt/o,le=Ft/o):Wt>It?Wt<.01?(o=.707106781,V=0,le=.707106781):(V=Math.sqrt(Wt),o=Nt/V,le=Ht/V):It<.01?(o=.707106781,V=.707106781,le=0):(le=Math.sqrt(It),o=Ft/le,V=Ht/le),this.set(o,V,le,r),this}let Zt=Math.sqrt((Xt-Gt)*(Xt-Gt)+(ze-Vt)*(ze-Vt)+(Fe-Pe)*(Fe-Pe));return Math.abs(Zt)<.001&&(Zt=1),this.x=(Xt-Gt)/Zt,this.y=(ze-Vt)/Zt,this.z=(Fe-Pe)/Zt,this.w=Math.acos((Re+ke+xt-1)/2),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this.w=r[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this.z=clamp(this.z,e.z,r.z),this.w=clamp(this.w,e.w,r.w),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this.z=clamp(this.z,e,r),this.w=clamp(this.w,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this.w+=(e.w-this.w)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this.z=e.z+(r.z-e.z)*o,this.w=e.w+(r.w-e.w)*o,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this.w=e[r+3],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e[r+3]=this.w,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this.w=e.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class RenderTarget extends EventDispatcher{constructor(e=1,r=1,o={}){super(),o=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:LinearFilter,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},o),this.isRenderTarget=!0,this.width=e,this.height=r,this.depth=o.depth,this.scissor=new Vector4(0,0,e,r),this.scissorTest=!1,this.viewport=new Vector4(0,0,e,r);const V={width:e,height:r,depth:o.depth},le=new Texture(V);this.textures=[];const fe=o.count;for(let Le=0;Le<fe;Le++)this.textures[Le]=le.clone(),this.textures[Le].isRenderTargetTexture=!0,this.textures[Le].renderTarget=this;this._setTextureOptions(o),this.depthBuffer=o.depthBuffer,this.stencilBuffer=o.stencilBuffer,this.resolveDepthBuffer=o.resolveDepthBuffer,this.resolveStencilBuffer=o.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=o.depthTexture,this.samples=o.samples,this.multiview=o.multiview}_setTextureOptions(e={}){const r={minFilter:LinearFilter,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(r.mapping=e.mapping),e.wrapS!==void 0&&(r.wrapS=e.wrapS),e.wrapT!==void 0&&(r.wrapT=e.wrapT),e.wrapR!==void 0&&(r.wrapR=e.wrapR),e.magFilter!==void 0&&(r.magFilter=e.magFilter),e.minFilter!==void 0&&(r.minFilter=e.minFilter),e.format!==void 0&&(r.format=e.format),e.type!==void 0&&(r.type=e.type),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(r.colorSpace=e.colorSpace),e.flipY!==void 0&&(r.flipY=e.flipY),e.generateMipmaps!==void 0&&(r.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(r.internalFormat=e.internalFormat);for(let o=0;o<this.textures.length;o++)this.textures[o].setValues(r)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,r,o=1){if(this.width!==e||this.height!==r||this.depth!==o){this.width=e,this.height=r,this.depth=o;for(let V=0,le=this.textures.length;V<le;V++)this.textures[V].image.width=e,this.textures[V].image.height=r,this.textures[V].image.depth=o,this.textures[V].isData3DTexture!==!0&&(this.textures[V].isArrayTexture=this.textures[V].image.depth>1);this.dispose()}this.viewport.set(0,0,e,r),this.scissor.set(0,0,e,r)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let r=0,o=e.textures.length;r<o;r++){this.textures[r]=e.textures[r].clone(),this.textures[r].isRenderTargetTexture=!0,this.textures[r].renderTarget=this;const V=Object.assign({},e.textures[r].image);this.textures[r].source=new Source(V)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(e=1,r=1,o={}){super(e,r,o),this.isWebGLRenderTarget=!0}}class DataArrayTexture extends Texture{constructor(e=null,r=1,o=1,V=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:r,height:o,depth:V},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isWebGLArrayRenderTarget=!0,this.depth=o,this.texture=new DataArrayTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Data3DTexture extends Texture{constructor(e=null,r=1,o=1,V=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:r,height:o,depth:V},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isWebGL3DRenderTarget=!0,this.depth=o,this.texture=new Data3DTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Box3{constructor(e=new Vector3(1/0,1/0,1/0),r=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromArray(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r+=3)this.expandByPoint(_vector$b.fromArray(e,r));return this}setFromBufferAttribute(e){this.makeEmpty();for(let r=0,o=e.count;r<o;r++)this.expandByPoint(_vector$b.fromBufferAttribute(e,r));return this}setFromPoints(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const o=_vector$b.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}setFromObject(e,r=!1){return this.makeEmpty(),this.expandByObject(e,r)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,r=!1){e.updateWorldMatrix(!1,!1);const o=e.geometry;if(o!==void 0){const le=o.getAttribute("position");if(r===!0&&le!==void 0&&e.isInstancedMesh!==!0)for(let fe=0,Le=le.count;fe<Le;fe++)e.isMesh===!0?e.getVertexPosition(fe,_vector$b):_vector$b.fromBufferAttribute(le,fe),_vector$b.applyMatrix4(e.matrixWorld),this.expandByPoint(_vector$b);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),_box$4.copy(e.boundingBox)):(o.boundingBox===null&&o.computeBoundingBox(),_box$4.copy(o.boundingBox)),_box$4.applyMatrix4(e.matrixWorld),this.union(_box$4)}const V=e.children;for(let le=0,fe=V.length;le<fe;le++)this.expandByObject(V[le],r);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,_vector$b),_vector$b.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let r,o;return e.normal.x>0?(r=e.normal.x*this.min.x,o=e.normal.x*this.max.x):(r=e.normal.x*this.max.x,o=e.normal.x*this.min.x),e.normal.y>0?(r+=e.normal.y*this.min.y,o+=e.normal.y*this.max.y):(r+=e.normal.y*this.max.y,o+=e.normal.y*this.min.y),e.normal.z>0?(r+=e.normal.z*this.min.z,o+=e.normal.z*this.max.z):(r+=e.normal.z*this.max.z,o+=e.normal.z*this.min.z),r<=-e.constant&&o>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$2.subVectors(e.a,_center),_v1$7.subVectors(e.b,_center),_v2$4.subVectors(e.c,_center),_f0.subVectors(_v1$7,_v0$2),_f1.subVectors(_v2$4,_v1$7),_f2.subVectors(_v0$2,_v2$4);let r=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];return!satForAxes(r,_v0$2,_v1$7,_v2$4,_extents)||(r=[1,0,0,0,1,0,0,0,1],!satForAxes(r,_v0$2,_v1$7,_v2$4,_extents))?!1:(_triangleNormal$1.crossVectors(_f0,_f1),r=[_triangleNormal$1.x,_triangleNormal$1.y,_triangleNormal$1.z],satForAxes(r,_v0$2,_v1$7,_v2$4,_extents))}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_vector$b).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(_vector$b).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_points),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$4=new Box3,_v0$2=new Vector3,_v1$7=new Vector3,_v2$4=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal$1=new Vector3,_testAxis=new Vector3;function satForAxes(v,e,r,o,V){for(let le=0,fe=v.length-3;le<=fe;le+=3){_testAxis.fromArray(v,le);const Le=V.x*Math.abs(_testAxis.x)+V.y*Math.abs(_testAxis.y)+V.z*Math.abs(_testAxis.z),Ce=e.dot(_testAxis),Re=r.dot(_testAxis),Pe=o.dot(_testAxis);if(Math.max(-Math.max(Ce,Re,Pe),Math.min(Ce,Re,Pe))>Le)return!1}return!0}const _box$3=new Box3,_v1$6=new Vector3,_v2$3=new Vector3;let Sphere$1=class{constructor(e=new Vector3,r=-1){this.isSphere=!0,this.center=e,this.radius=r}set(e,r){return this.center.copy(e),this.radius=r,this}setFromPoints(e,r){const o=this.center;r!==void 0?o.copy(r):_box$3.setFromPoints(e).getCenter(o);let V=0;for(let le=0,fe=e.length;le<fe;le++)V=Math.max(V,o.distanceToSquared(e[le]));return this.radius=Math.sqrt(V),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const r=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=r*r}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,r){const o=this.center.distanceToSquared(e);return r.copy(e),o>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_v1$6.subVectors(e,this.center);const r=_v1$6.lengthSq();if(r>this.radius*this.radius){const o=Math.sqrt(r),V=(o-this.radius)*.5;this.center.addScaledVector(_v1$6,V/o),this.radius+=V}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(_v2$3.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_v1$6.copy(e.center).add(_v2$3)),this.expandByPoint(_v1$6.copy(e.center).sub(_v2$3))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}};const _vector$a=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3;class Ray{constructor(e=new Vector3,r=new Vector3(0,0,-1)){this.origin=e,this.direction=r}set(e,r){return this.origin.copy(e),this.direction.copy(r),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,r){return r.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,_vector$a)),this}closestPointToPoint(e,r){r.subVectors(e,this.origin);const o=r.dot(this.direction);return o<0?r.copy(this.origin):r.copy(this.origin).addScaledVector(this.direction,o)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const r=_vector$a.subVectors(e,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(e):(_vector$a.copy(this.origin).addScaledVector(this.direction,r),_vector$a.distanceToSquared(e))}distanceSqToSegment(e,r,o,V){_segCenter.copy(e).add(r).multiplyScalar(.5),_segDir.copy(r).sub(e).normalize(),_diff.copy(this.origin).sub(_segCenter);const le=e.distanceTo(r)*.5,fe=-this.direction.dot(_segDir),Le=_diff.dot(this.direction),Ce=-_diff.dot(_segDir),Re=_diff.lengthSq(),Pe=Math.abs(1-fe*fe);let ze,Fe,ke,Gt;if(Pe>0)if(ze=fe*Ce-Le,Fe=fe*Le-Ce,Gt=le*Pe,ze>=0)if(Fe>=-Gt)if(Fe<=Gt){const Vt=1/Pe;ze*=Vt,Fe*=Vt,ke=ze*(ze+fe*Fe+2*Le)+Fe*(fe*ze+Fe+2*Ce)+Re}else Fe=le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;else Fe=-le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;else Fe<=-Gt?(ze=Math.max(0,-(-fe*le+Le)),Fe=ze>0?-le:Math.min(Math.max(-le,-Ce),le),ke=-ze*ze+Fe*(Fe+2*Ce)+Re):Fe<=Gt?(ze=0,Fe=Math.min(Math.max(-le,-Ce),le),ke=Fe*(Fe+2*Ce)+Re):(ze=Math.max(0,-(fe*le+Le)),Fe=ze>0?le:Math.min(Math.max(-le,-Ce),le),ke=-ze*ze+Fe*(Fe+2*Ce)+Re);else Fe=fe>0?-le:le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;return o&&o.copy(this.origin).addScaledVector(this.direction,ze),V&&V.copy(_segCenter).addScaledVector(_segDir,Fe),ke}intersectSphere(e,r){_vector$a.subVectors(e.center,this.origin);const o=_vector$a.dot(this.direction),V=_vector$a.dot(_vector$a)-o*o,le=e.radius*e.radius;if(V>le)return null;const fe=Math.sqrt(le-V),Le=o-fe,Ce=o+fe;return Ce<0?null:Le<0?this.at(Ce,r):this.at(Le,r)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const r=e.normal.dot(this.direction);if(r===0)return e.distanceToPoint(this.origin)===0?0:null;const o=-(this.origin.dot(e.normal)+e.constant)/r;return o>=0?o:null}intersectPlane(e,r){const o=this.distanceToPlane(e);return o===null?null:this.at(o,r)}intersectsPlane(e){const r=e.distanceToPoint(this.origin);return r===0||e.normal.dot(this.direction)*r<0}intersectBox(e,r){let o,V,le,fe,Le,Ce;const Re=1/this.direction.x,Pe=1/this.direction.y,ze=1/this.direction.z,Fe=this.origin;return Re>=0?(o=(e.min.x-Fe.x)*Re,V=(e.max.x-Fe.x)*Re):(o=(e.max.x-Fe.x)*Re,V=(e.min.x-Fe.x)*Re),Pe>=0?(le=(e.min.y-Fe.y)*Pe,fe=(e.max.y-Fe.y)*Pe):(le=(e.max.y-Fe.y)*Pe,fe=(e.min.y-Fe.y)*Pe),o>fe||le>V||((le>o||isNaN(o))&&(o=le),(fe<V||isNaN(V))&&(V=fe),ze>=0?(Le=(e.min.z-Fe.z)*ze,Ce=(e.max.z-Fe.z)*ze):(Le=(e.max.z-Fe.z)*ze,Ce=(e.min.z-Fe.z)*ze),o>Ce||Le>V)||((Le>o||o!==o)&&(o=Le),(Ce<V||V!==V)&&(V=Ce),V<0)?null:this.at(o>=0?o:V,r)}intersectsBox(e){return this.intersectBox(e,_vector$a)!==null}intersectTriangle(e,r,o,V,le){_edge1.subVectors(r,e),_edge2.subVectors(o,e),_normal$1.crossVectors(_edge1,_edge2);let fe=this.direction.dot(_normal$1),Le;if(fe>0){if(V)return null;Le=1}else if(fe<0)Le=-1,fe=-fe;else return null;_diff.subVectors(this.origin,e);const Ce=Le*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(Ce<0)return null;const Re=Le*this.direction.dot(_edge1.cross(_diff));if(Re<0||Ce+Re>fe)return null;const Pe=-Le*_diff.dot(_normal$1);return Pe<0?null:this.at(Pe/fe,le)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt)}set(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt){const xt=this.elements;return xt[0]=e,xt[4]=r,xt[8]=o,xt[12]=V,xt[1]=le,xt[5]=fe,xt[9]=Le,xt[13]=Ce,xt[2]=Re,xt[6]=Pe,xt[10]=ze,xt[14]=Fe,xt[3]=ke,xt[7]=Gt,xt[11]=Vt,xt[15]=Xt,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Matrix4().fromArray(this.elements)}copy(e){const r=this.elements,o=e.elements;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],r[9]=o[9],r[10]=o[10],r[11]=o[11],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15],this}copyPosition(e){const r=this.elements,o=e.elements;return r[12]=o[12],r[13]=o[13],r[14]=o[14],this}setFromMatrix3(e){const r=e.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(e,r,o){return this.determinant()===0?(e.set(1,0,0),r.set(0,1,0),o.set(0,0,1),this):(e.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this)}makeBasis(e,r,o){return this.set(e.x,r.x,o.x,0,e.y,r.y,o.y,0,e.z,r.z,o.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const r=this.elements,o=e.elements,V=1/_v1$5.setFromMatrixColumn(e,0).length(),le=1/_v1$5.setFromMatrixColumn(e,1).length(),fe=1/_v1$5.setFromMatrixColumn(e,2).length();return r[0]=o[0]*V,r[1]=o[1]*V,r[2]=o[2]*V,r[3]=0,r[4]=o[4]*le,r[5]=o[5]*le,r[6]=o[6]*le,r[7]=0,r[8]=o[8]*fe,r[9]=o[9]*fe,r[10]=o[10]*fe,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(e){const r=this.elements,o=e.x,V=e.y,le=e.z,fe=Math.cos(o),Le=Math.sin(o),Ce=Math.cos(V),Re=Math.sin(V),Pe=Math.cos(le),ze=Math.sin(le);if(e.order==="XYZ"){const Fe=fe*Pe,ke=fe*ze,Gt=Le*Pe,Vt=Le*ze;r[0]=Ce*Pe,r[4]=-Ce*ze,r[8]=Re,r[1]=ke+Gt*Re,r[5]=Fe-Vt*Re,r[9]=-Le*Ce,r[2]=Vt-Fe*Re,r[6]=Gt+ke*Re,r[10]=fe*Ce}else if(e.order==="YXZ"){const Fe=Ce*Pe,ke=Ce*ze,Gt=Re*Pe,Vt=Re*ze;r[0]=Fe+Vt*Le,r[4]=Gt*Le-ke,r[8]=fe*Re,r[1]=fe*ze,r[5]=fe*Pe,r[9]=-Le,r[2]=ke*Le-Gt,r[6]=Vt+Fe*Le,r[10]=fe*Ce}else if(e.order==="ZXY"){const Fe=Ce*Pe,ke=Ce*ze,Gt=Re*Pe,Vt=Re*ze;r[0]=Fe-Vt*Le,r[4]=-fe*ze,r[8]=Gt+ke*Le,r[1]=ke+Gt*Le,r[5]=fe*Pe,r[9]=Vt-Fe*Le,r[2]=-fe*Re,r[6]=Le,r[10]=fe*Ce}else if(e.order==="ZYX"){const Fe=fe*Pe,ke=fe*ze,Gt=Le*Pe,Vt=Le*ze;r[0]=Ce*Pe,r[4]=Gt*Re-ke,r[8]=Fe*Re+Vt,r[1]=Ce*ze,r[5]=Vt*Re+Fe,r[9]=ke*Re-Gt,r[2]=-Re,r[6]=Le*Ce,r[10]=fe*Ce}else if(e.order==="YZX"){const Fe=fe*Ce,ke=fe*Re,Gt=Le*Ce,Vt=Le*Re;r[0]=Ce*Pe,r[4]=Vt-Fe*ze,r[8]=Gt*ze+ke,r[1]=ze,r[5]=fe*Pe,r[9]=-Le*Pe,r[2]=-Re*Pe,r[6]=ke*ze+Gt,r[10]=Fe-Vt*ze}else if(e.order==="XZY"){const Fe=fe*Ce,ke=fe*Re,Gt=Le*Ce,Vt=Le*Re;r[0]=Ce*Pe,r[4]=-ze,r[8]=Re*Pe,r[1]=Fe*ze+Vt,r[5]=fe*Pe,r[9]=ke*ze-Gt,r[2]=Gt*ze-ke,r[6]=Le*Pe,r[10]=Vt*ze+Fe}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(e){return this.compose(_zero,e,_one)}lookAt(e,r,o){const V=this.elements;return _z.subVectors(e,r),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(o,_z),_x.lengthSq()===0&&(Math.abs(o.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(o,_z)),_x.normalize(),_y.crossVectors(_z,_x),V[0]=_x.x,V[4]=_y.x,V[8]=_z.x,V[1]=_x.y,V[5]=_y.y,V[9]=_z.y,V[2]=_x.z,V[6]=_y.z,V[10]=_z.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const o=e.elements,V=r.elements,le=this.elements,fe=o[0],Le=o[4],Ce=o[8],Re=o[12],Pe=o[1],ze=o[5],Fe=o[9],ke=o[13],Gt=o[2],Vt=o[6],Xt=o[10],xt=o[14],Zt=o[3],wt=o[7],Wt=o[11],It=o[15],Nt=V[0],Ft=V[4],Ht=V[8],Kt=V[12],Yt=V[1],jt=V[5],n0=V[9],a0=V[13],l0=V[2],s0=V[6],$t=V[10],qt=V[14],e0=V[3],o0=V[7],b0=V[11],m0=V[15];return le[0]=fe*Nt+Le*Yt+Ce*l0+Re*e0,le[4]=fe*Ft+Le*jt+Ce*s0+Re*o0,le[8]=fe*Ht+Le*n0+Ce*$t+Re*b0,le[12]=fe*Kt+Le*a0+Ce*qt+Re*m0,le[1]=Pe*Nt+ze*Yt+Fe*l0+ke*e0,le[5]=Pe*Ft+ze*jt+Fe*s0+ke*o0,le[9]=Pe*Ht+ze*n0+Fe*$t+ke*b0,le[13]=Pe*Kt+ze*a0+Fe*qt+ke*m0,le[2]=Gt*Nt+Vt*Yt+Xt*l0+xt*e0,le[6]=Gt*Ft+Vt*jt+Xt*s0+xt*o0,le[10]=Gt*Ht+Vt*n0+Xt*$t+xt*b0,le[14]=Gt*Kt+Vt*a0+Xt*qt+xt*m0,le[3]=Zt*Nt+wt*Yt+Wt*l0+It*e0,le[7]=Zt*Ft+wt*jt+Wt*s0+It*o0,le[11]=Zt*Ht+wt*n0+Wt*$t+It*b0,le[15]=Zt*Kt+wt*a0+Wt*qt+It*m0,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[4]*=e,r[8]*=e,r[12]*=e,r[1]*=e,r[5]*=e,r[9]*=e,r[13]*=e,r[2]*=e,r[6]*=e,r[10]*=e,r[14]*=e,r[3]*=e,r[7]*=e,r[11]*=e,r[15]*=e,this}determinant(){const e=this.elements,r=e[0],o=e[4],V=e[8],le=e[12],fe=e[1],Le=e[5],Ce=e[9],Re=e[13],Pe=e[2],ze=e[6],Fe=e[10],ke=e[14],Gt=e[3],Vt=e[7],Xt=e[11],xt=e[15],Zt=Ce*ke-Re*Fe,wt=Le*ke-Re*ze,Wt=Le*Fe-Ce*ze,It=fe*ke-Re*Pe,Nt=fe*Fe-Ce*Pe,Ft=fe*ze-Le*Pe;return r*(Vt*Zt-Xt*wt+xt*Wt)-o*(Gt*Zt-Xt*It+xt*Nt)+V*(Gt*wt-Vt*It+xt*Ft)-le*(Gt*Wt-Vt*Nt+Xt*Ft)}transpose(){const e=this.elements;let r;return r=e[1],e[1]=e[4],e[4]=r,r=e[2],e[2]=e[8],e[8]=r,r=e[6],e[6]=e[9],e[9]=r,r=e[3],e[3]=e[12],e[12]=r,r=e[7],e[7]=e[13],e[13]=r,r=e[11],e[11]=e[14],e[14]=r,this}setPosition(e,r,o){const V=this.elements;return e.isVector3?(V[12]=e.x,V[13]=e.y,V[14]=e.z):(V[12]=e,V[13]=r,V[14]=o),this}invert(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8],ze=e[9],Fe=e[10],ke=e[11],Gt=e[12],Vt=e[13],Xt=e[14],xt=e[15],Zt=ze*Xt*Re-Vt*Fe*Re+Vt*Ce*ke-Le*Xt*ke-ze*Ce*xt+Le*Fe*xt,wt=Gt*Fe*Re-Pe*Xt*Re-Gt*Ce*ke+fe*Xt*ke+Pe*Ce*xt-fe*Fe*xt,Wt=Pe*Vt*Re-Gt*ze*Re+Gt*Le*ke-fe*Vt*ke-Pe*Le*xt+fe*ze*xt,It=Gt*ze*Ce-Pe*Vt*Ce-Gt*Le*Fe+fe*Vt*Fe+Pe*Le*Xt-fe*ze*Xt,Nt=r*Zt+o*wt+V*Wt+le*It;if(Nt===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Ft=1/Nt;return e[0]=Zt*Ft,e[1]=(Vt*Fe*le-ze*Xt*le-Vt*V*ke+o*Xt*ke+ze*V*xt-o*Fe*xt)*Ft,e[2]=(Le*Xt*le-Vt*Ce*le+Vt*V*Re-o*Xt*Re-Le*V*xt+o*Ce*xt)*Ft,e[3]=(ze*Ce*le-Le*Fe*le-ze*V*Re+o*Fe*Re+Le*V*ke-o*Ce*ke)*Ft,e[4]=wt*Ft,e[5]=(Pe*Xt*le-Gt*Fe*le+Gt*V*ke-r*Xt*ke-Pe*V*xt+r*Fe*xt)*Ft,e[6]=(Gt*Ce*le-fe*Xt*le-Gt*V*Re+r*Xt*Re+fe*V*xt-r*Ce*xt)*Ft,e[7]=(fe*Fe*le-Pe*Ce*le+Pe*V*Re-r*Fe*Re-fe*V*ke+r*Ce*ke)*Ft,e[8]=Wt*Ft,e[9]=(Gt*ze*le-Pe*Vt*le-Gt*o*ke+r*Vt*ke+Pe*o*xt-r*ze*xt)*Ft,e[10]=(fe*Vt*le-Gt*Le*le+Gt*o*Re-r*Vt*Re-fe*o*xt+r*Le*xt)*Ft,e[11]=(Pe*Le*le-fe*ze*le-Pe*o*Re+r*ze*Re+fe*o*ke-r*Le*ke)*Ft,e[12]=It*Ft,e[13]=(Pe*Vt*V-Gt*ze*V+Gt*o*Fe-r*Vt*Fe-Pe*o*Xt+r*ze*Xt)*Ft,e[14]=(Gt*Le*V-fe*Vt*V-Gt*o*Ce+r*Vt*Ce+fe*o*Xt-r*Le*Xt)*Ft,e[15]=(fe*ze*V-Pe*Le*V+Pe*o*Ce-r*ze*Ce-fe*o*Fe+r*Le*Fe)*Ft,this}scale(e){const r=this.elements,o=e.x,V=e.y,le=e.z;return r[0]*=o,r[4]*=V,r[8]*=le,r[1]*=o,r[5]*=V,r[9]*=le,r[2]*=o,r[6]*=V,r[10]*=le,r[3]*=o,r[7]*=V,r[11]*=le,this}getMaxScaleOnAxis(){const e=this.elements,r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],V=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(r,o,V))}makeTranslation(e,r,o){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,r,0,0,1,o,0,0,0,1),this}makeRotationX(e){const r=Math.cos(e),o=Math.sin(e);return this.set(1,0,0,0,0,r,-o,0,0,o,r,0,0,0,0,1),this}makeRotationY(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,0,o,0,0,1,0,0,-o,0,r,0,0,0,0,1),this}makeRotationZ(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,-o,0,0,o,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,r){const o=Math.cos(r),V=Math.sin(r),le=1-o,fe=e.x,Le=e.y,Ce=e.z,Re=le*fe,Pe=le*Le;return this.set(Re*fe+o,Re*Le-V*Ce,Re*Ce+V*Le,0,Re*Le+V*Ce,Pe*Le+o,Pe*Ce-V*fe,0,Re*Ce-V*Le,Pe*Ce+V*fe,le*Ce*Ce+o,0,0,0,0,1),this}makeScale(e,r,o){return this.set(e,0,0,0,0,r,0,0,0,0,o,0,0,0,0,1),this}makeShear(e,r,o,V,le,fe){return this.set(1,o,le,0,e,1,fe,0,r,V,1,0,0,0,0,1),this}compose(e,r,o){const V=this.elements,le=r._x,fe=r._y,Le=r._z,Ce=r._w,Re=le+le,Pe=fe+fe,ze=Le+Le,Fe=le*Re,ke=le*Pe,Gt=le*ze,Vt=fe*Pe,Xt=fe*ze,xt=Le*ze,Zt=Ce*Re,wt=Ce*Pe,Wt=Ce*ze,It=o.x,Nt=o.y,Ft=o.z;return V[0]=(1-(Vt+xt))*It,V[1]=(ke+Wt)*It,V[2]=(Gt-wt)*It,V[3]=0,V[4]=(ke-Wt)*Nt,V[5]=(1-(Fe+xt))*Nt,V[6]=(Xt+Zt)*Nt,V[7]=0,V[8]=(Gt+wt)*Ft,V[9]=(Xt-Zt)*Ft,V[10]=(1-(Fe+Vt))*Ft,V[11]=0,V[12]=e.x,V[13]=e.y,V[14]=e.z,V[15]=1,this}decompose(e,r,o){const V=this.elements;if(e.x=V[12],e.y=V[13],e.z=V[14],this.determinant()===0)return o.set(1,1,1),r.identity(),this;let le=_v1$5.set(V[0],V[1],V[2]).length();const fe=_v1$5.set(V[4],V[5],V[6]).length(),Le=_v1$5.set(V[8],V[9],V[10]).length();this.determinant()<0&&(le=-le),_m1$2.copy(this);const Re=1/le,Pe=1/fe,ze=1/Le;return _m1$2.elements[0]*=Re,_m1$2.elements[1]*=Re,_m1$2.elements[2]*=Re,_m1$2.elements[4]*=Pe,_m1$2.elements[5]*=Pe,_m1$2.elements[6]*=Pe,_m1$2.elements[8]*=ze,_m1$2.elements[9]*=ze,_m1$2.elements[10]*=ze,r.setFromRotationMatrix(_m1$2),o.x=le,o.y=fe,o.z=Le,this}makePerspective(e,r,o,V,le,fe,Le=WebGLCoordinateSystem,Ce=!1){const Re=this.elements,Pe=2*le/(r-e),ze=2*le/(o-V),Fe=(r+e)/(r-e),ke=(o+V)/(o-V);let Gt,Vt;if(Ce)Gt=le/(fe-le),Vt=fe*le/(fe-le);else if(Le===WebGLCoordinateSystem)Gt=-(fe+le)/(fe-le),Vt=-2*fe*le/(fe-le);else if(Le===WebGPUCoordinateSystem)Gt=-fe/(fe-le),Vt=-fe*le/(fe-le);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+Le);return Re[0]=Pe,Re[4]=0,Re[8]=Fe,Re[12]=0,Re[1]=0,Re[5]=ze,Re[9]=ke,Re[13]=0,Re[2]=0,Re[6]=0,Re[10]=Gt,Re[14]=Vt,Re[3]=0,Re[7]=0,Re[11]=-1,Re[15]=0,this}makeOrthographic(e,r,o,V,le,fe,Le=WebGLCoordinateSystem,Ce=!1){const Re=this.elements,Pe=2/(r-e),ze=2/(o-V),Fe=-(r+e)/(r-e),ke=-(o+V)/(o-V);let Gt,Vt;if(Ce)Gt=1/(fe-le),Vt=fe/(fe-le);else if(Le===WebGLCoordinateSystem)Gt=-2/(fe-le),Vt=-(fe+le)/(fe-le);else if(Le===WebGPUCoordinateSystem)Gt=-1/(fe-le),Vt=-le/(fe-le);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+Le);return Re[0]=Pe,Re[4]=0,Re[8]=0,Re[12]=Fe,Re[1]=0,Re[5]=ze,Re[9]=0,Re[13]=ke,Re[2]=0,Re[6]=0,Re[10]=Gt,Re[14]=Vt,Re[3]=0,Re[7]=0,Re[11]=0,Re[15]=1,this}equals(e){const r=this.elements,o=e.elements;for(let V=0;V<16;V++)if(r[V]!==o[V])return!1;return!0}fromArray(e,r=0){for(let o=0;o<16;o++)this.elements[o]=e[o+r];return this}toArray(e=[],r=0){const o=this.elements;return e[r]=o[0],e[r+1]=o[1],e[r+2]=o[2],e[r+3]=o[3],e[r+4]=o[4],e[r+5]=o[5],e[r+6]=o[6],e[r+7]=o[7],e[r+8]=o[8],e[r+9]=o[9],e[r+10]=o[10],e[r+11]=o[11],e[r+12]=o[12],e[r+13]=o[13],e[r+14]=o[14],e[r+15]=o[15],e}}const _v1$5=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$2=new Matrix4,_quaternion$3=new Quaternion;class Euler{constructor(e=0,r=0,o=0,V=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=r,this._z=o,this._order=V}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,r,o,V=this._order){return this._x=e,this._y=r,this._z=o,this._order=V,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,r=this._order,o=!0){const V=e.elements,le=V[0],fe=V[4],Le=V[8],Ce=V[1],Re=V[5],Pe=V[9],ze=V[2],Fe=V[6],ke=V[10];switch(r){case"XYZ":this._y=Math.asin(clamp(Le,-1,1)),Math.abs(Le)<.9999999?(this._x=Math.atan2(-Pe,ke),this._z=Math.atan2(-fe,le)):(this._x=Math.atan2(Fe,Re),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp(Pe,-1,1)),Math.abs(Pe)<.9999999?(this._y=Math.atan2(Le,ke),this._z=Math.atan2(Ce,Re)):(this._y=Math.atan2(-ze,le),this._z=0);break;case"ZXY":this._x=Math.asin(clamp(Fe,-1,1)),Math.abs(Fe)<.9999999?(this._y=Math.atan2(-ze,ke),this._z=Math.atan2(-fe,Re)):(this._y=0,this._z=Math.atan2(Ce,le));break;case"ZYX":this._y=Math.asin(-clamp(ze,-1,1)),Math.abs(ze)<.9999999?(this._x=Math.atan2(Fe,ke),this._z=Math.atan2(Ce,le)):(this._x=0,this._z=Math.atan2(-fe,Re));break;case"YZX":this._z=Math.asin(clamp(Ce,-1,1)),Math.abs(Ce)<.9999999?(this._x=Math.atan2(-Pe,Re),this._y=Math.atan2(-ze,le)):(this._x=0,this._y=Math.atan2(Le,ke));break;case"XZY":this._z=Math.asin(-clamp(fe,-1,1)),Math.abs(fe)<.9999999?(this._x=Math.atan2(Fe,Re),this._y=Math.atan2(Le,le)):(this._x=Math.atan2(-Pe,ke),this._y=0);break;default:warn("Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,o===!0&&this._onChangeCallback(),this}setFromQuaternion(e,r,o){return _matrix$2.makeRotationFromQuaternion(e),this.setFromRotationMatrix(_matrix$2,r,o)}setFromVector3(e,r=this._order){return this.set(e.x,e.y,e.z,r)}reorder(e){return _quaternion$3.setFromEuler(this),this.setFromQuaternion(_quaternion$3,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let _object3DId=0;const _v1$4=new Vector3,_q1=new Quaternion,_m1$1$1=new Matrix4,_target=new Vector3,_position$3=new Vector3,_scale$2=new Vector3,_quaternion$2=new Quaternion,_xAxis=new Vector3(1,0,0),_yAxis=new Vector3(0,1,0),_zAxis=new Vector3(0,0,1),_addedEvent={type:"added"},_removedEvent={type:"removed"},_childaddedEvent={type:"childadded",child:null},_childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:_object3DId++}),this.uuid=generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Object3D.DEFAULT_UP.clone();const e=new Vector3,r=new Euler,o=new Quaternion,V=new Vector3(1,1,1);function le(){o.setFromEuler(r,!1)}function fe(){r.setFromQuaternion(o,void 0,!1)}r._onChange(le),o._onChange(fe),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:V},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}}),this.matrix=new Matrix4,this.matrixWorld=new Matrix4,this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Layers,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,r){this.quaternion.setFromAxisAngle(e,r)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,r){return _q1.setFromAxisAngle(e,r),this.quaternion.multiply(_q1),this}rotateOnWorldAxis(e,r){return _q1.setFromAxisAngle(e,r),this.quaternion.premultiply(_q1),this}rotateX(e){return this.rotateOnAxis(_xAxis,e)}rotateY(e){return this.rotateOnAxis(_yAxis,e)}rotateZ(e){return this.rotateOnAxis(_zAxis,e)}translateOnAxis(e,r){return _v1$4.copy(e).applyQuaternion(this.quaternion),this.position.add(_v1$4.multiplyScalar(r)),this}translateX(e){return this.translateOnAxis(_xAxis,e)}translateY(e){return this.translateOnAxis(_yAxis,e)}translateZ(e){return this.translateOnAxis(_zAxis,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(_m1$1$1.copy(this.matrixWorld).invert())}lookAt(e,r,o){e.isVector3?_target.copy(e):_target.set(e,r,o);const V=this.parent;this.updateWorldMatrix(!0,!1),_position$3.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_m1$1$1.lookAt(_position$3,_target,this.up):_m1$1$1.lookAt(_target,_position$3,this.up),this.quaternion.setFromRotationMatrix(_m1$1$1),V&&(_m1$1$1.extractRotation(V.matrixWorld),_q1.setFromRotationMatrix(_m1$1$1),this.quaternion.premultiply(_q1.invert()))}add(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return e===this?(error$1("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null):error$1("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let o=0;o<arguments.length;o++)this.remove(arguments[o]);return this}const r=this.children.indexOf(e);return r!==-1&&(e.parent=null,this.children.splice(r,1),e.dispatchEvent(_removedEvent),_childremovedEvent.child=e,this.dispatchEvent(_childremovedEvent),_childremovedEvent.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),_m1$1$1.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),_m1$1$1.multiply(e.parent.matrixWorld)),e.applyMatrix4(_m1$1$1),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,r){if(this[e]===r)return this;for(let o=0,V=this.children.length;o<V;o++){const fe=this.children[o].getObjectByProperty(e,r);if(fe!==void 0)return fe}}getObjectsByProperty(e,r,o=[]){this[e]===r&&o.push(this);const V=this.children;for(let le=0,fe=V.length;le<fe;le++)V[le].getObjectsByProperty(e,r,o);return o}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$3,e,_scale$2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$3,_quaternion$2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const r=this.matrixWorld.elements;return e.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(e){e(this);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].traverseVisible(e)}traverseAncestors(e){const r=this.parent;r!==null&&(e(r),r.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].updateMatrixWorld(e)}updateWorldMatrix(e,r){const o=this.parent;if(e===!0&&o!==null&&o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),r===!0){const V=this.children;for(let le=0,fe=V.length;le<fe;le++)V[le].updateWorldMatrix(!1,!0)}}toJSON(e){const r=e===void 0||typeof e=="string",o={};r&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const V={};V.uuid=this.uuid,V.type=this.type,this.name!==""&&(V.name=this.name),this.castShadow===!0&&(V.castShadow=!0),this.receiveShadow===!0&&(V.receiveShadow=!0),this.visible===!1&&(V.visible=!1),this.frustumCulled===!1&&(V.frustumCulled=!1),this.renderOrder!==0&&(V.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(V.userData=this.userData),V.layers=this.layers.mask,V.matrix=this.matrix.toArray(),V.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(V.matrixAutoUpdate=!1),this.isInstancedMesh&&(V.type="InstancedMesh",V.count=this.count,V.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(V.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(V.type="BatchedMesh",V.perObjectFrustumCulled=this.perObjectFrustumCulled,V.sortObjects=this.sortObjects,V.drawRanges=this._drawRanges,V.reservedRanges=this._reservedRanges,V.geometryInfo=this._geometryInfo.map(Le=>qi(gi({},Le),{boundingBox:Le.boundingBox?Le.boundingBox.toJSON():void 0,boundingSphere:Le.boundingSphere?Le.boundingSphere.toJSON():void 0})),V.instanceInfo=this._instanceInfo.map(Le=>gi({},Le)),V.availableInstanceIds=this._availableInstanceIds.slice(),V.availableGeometryIds=this._availableGeometryIds.slice(),V.nextIndexStart=this._nextIndexStart,V.nextVertexStart=this._nextVertexStart,V.geometryCount=this._geometryCount,V.maxInstanceCount=this._maxInstanceCount,V.maxVertexCount=this._maxVertexCount,V.maxIndexCount=this._maxIndexCount,V.geometryInitialized=this._geometryInitialized,V.matricesTexture=this._matricesTexture.toJSON(e),V.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(V.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(V.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(V.boundingBox=this.boundingBox.toJSON()));function le(Le,Ce){return Le[Ce.uuid]===void 0&&(Le[Ce.uuid]=Ce.toJSON(e)),Ce.uuid}if(this.isScene)this.background&&(this.background.isColor?V.background=this.background.toJSON():this.background.isTexture&&(V.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(V.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){V.geometry=le(e.geometries,this.geometry);const Le=this.geometry.parameters;if(Le!==void 0&&Le.shapes!==void 0){const Ce=Le.shapes;if(Array.isArray(Ce))for(let Re=0,Pe=Ce.length;Re<Pe;Re++){const ze=Ce[Re];le(e.shapes,ze)}else le(e.shapes,Ce)}}if(this.isSkinnedMesh&&(V.bindMode=this.bindMode,V.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(le(e.skeletons,this.skeleton),V.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const Le=[];for(let Ce=0,Re=this.material.length;Ce<Re;Ce++)Le.push(le(e.materials,this.material[Ce]));V.material=Le}else V.material=le(e.materials,this.material);if(this.children.length>0){V.children=[];for(let Le=0;Le<this.children.length;Le++)V.children.push(this.children[Le].toJSON(e).object)}if(this.animations.length>0){V.animations=[];for(let Le=0;Le<this.animations.length;Le++){const Ce=this.animations[Le];V.animations.push(le(e.animations,Ce))}}if(r){const Le=fe(e.geometries),Ce=fe(e.materials),Re=fe(e.textures),Pe=fe(e.images),ze=fe(e.shapes),Fe=fe(e.skeletons),ke=fe(e.animations),Gt=fe(e.nodes);Le.length>0&&(o.geometries=Le),Ce.length>0&&(o.materials=Ce),Re.length>0&&(o.textures=Re),Pe.length>0&&(o.images=Pe),ze.length>0&&(o.shapes=ze),Fe.length>0&&(o.skeletons=Fe),ke.length>0&&(o.animations=ke),Gt.length>0&&(o.nodes=Gt)}return o.object=V,o;function fe(Le){const Ce=[];for(const Re in Le){const Pe=Le[Re];delete Pe.metadata,Ce.push(Pe)}return Ce}}clone(e){return new this.constructor().copy(this,e)}copy(e,r=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),r===!0)for(let o=0;o<e.children.length;o++){const V=e.children[o];this.add(V.clone())}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=!0;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const _v0$1$1=new Vector3,_v1$3=new Vector3,_v2$2=new Vector3,_v3$2=new Vector3,_vab=new Vector3,_vac=new Vector3,_vbc=new Vector3,_vap=new Vector3,_vbp=new Vector3,_vcp=new Vector3,_v40=new Vector4,_v41=new Vector4,_v42=new Vector4;class Triangle{constructor(e=new Vector3,r=new Vector3,o=new Vector3){this.a=e,this.b=r,this.c=o}static getNormal(e,r,o,V){V.subVectors(o,r),_v0$1$1.subVectors(e,r),V.cross(_v0$1$1);const le=V.lengthSq();return le>0?V.multiplyScalar(1/Math.sqrt(le)):V.set(0,0,0)}static getBarycoord(e,r,o,V,le){_v0$1$1.subVectors(V,r),_v1$3.subVectors(o,r),_v2$2.subVectors(e,r);const fe=_v0$1$1.dot(_v0$1$1),Le=_v0$1$1.dot(_v1$3),Ce=_v0$1$1.dot(_v2$2),Re=_v1$3.dot(_v1$3),Pe=_v1$3.dot(_v2$2),ze=fe*Re-Le*Le;if(ze===0)return le.set(0,0,0),null;const Fe=1/ze,ke=(Re*Ce-Le*Pe)*Fe,Gt=(fe*Pe-Le*Ce)*Fe;return le.set(1-ke-Gt,Gt,ke)}static containsPoint(e,r,o,V){return this.getBarycoord(e,r,o,V,_v3$2)===null?!1:_v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(e,r,o,V,le,fe,Le,Ce){return this.getBarycoord(e,r,o,V,_v3$2)===null?(Ce.x=0,Ce.y=0,"z"in Ce&&(Ce.z=0),"w"in Ce&&(Ce.w=0),null):(Ce.setScalar(0),Ce.addScaledVector(le,_v3$2.x),Ce.addScaledVector(fe,_v3$2.y),Ce.addScaledVector(Le,_v3$2.z),Ce)}static getInterpolatedAttribute(e,r,o,V,le,fe){return _v40.setScalar(0),_v41.setScalar(0),_v42.setScalar(0),_v40.fromBufferAttribute(e,r),_v41.fromBufferAttribute(e,o),_v42.fromBufferAttribute(e,V),fe.setScalar(0),fe.addScaledVector(_v40,le.x),fe.addScaledVector(_v41,le.y),fe.addScaledVector(_v42,le.z),fe}static isFrontFacing(e,r,o,V){return _v0$1$1.subVectors(o,r),_v1$3.subVectors(e,r),_v0$1$1.cross(_v1$3).dot(V)<0}set(e,r,o){return this.a.copy(e),this.b.copy(r),this.c.copy(o),this}setFromPointsAndIndices(e,r,o,V){return this.a.copy(e[r]),this.b.copy(e[o]),this.c.copy(e[V]),this}setFromAttributeAndIndices(e,r,o,V){return this.a.fromBufferAttribute(e,r),this.b.fromBufferAttribute(e,o),this.c.fromBufferAttribute(e,V),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return _v0$1$1.subVectors(this.c,this.b),_v1$3.subVectors(this.a,this.b),_v0$1$1.cross(_v1$3).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Triangle.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,r){return Triangle.getBarycoord(e,this.a,this.b,this.c,r)}getInterpolation(e,r,o,V,le){return Triangle.getInterpolation(e,this.a,this.b,this.c,r,o,V,le)}containsPoint(e){return Triangle.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Triangle.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,r){const o=this.a,V=this.b,le=this.c;let fe,Le;_vab.subVectors(V,o),_vac.subVectors(le,o),_vap.subVectors(e,o);const Ce=_vab.dot(_vap),Re=_vac.dot(_vap);if(Ce<=0&&Re<=0)return r.copy(o);_vbp.subVectors(e,V);const Pe=_vab.dot(_vbp),ze=_vac.dot(_vbp);if(Pe>=0&&ze<=Pe)return r.copy(V);const Fe=Ce*ze-Pe*Re;if(Fe<=0&&Ce>=0&&Pe<=0)return fe=Ce/(Ce-Pe),r.copy(o).addScaledVector(_vab,fe);_vcp.subVectors(e,le);const ke=_vab.dot(_vcp),Gt=_vac.dot(_vcp);if(Gt>=0&&ke<=Gt)return r.copy(le);const Vt=ke*Re-Ce*Gt;if(Vt<=0&&Re>=0&&Gt<=0)return Le=Re/(Re-Gt),r.copy(o).addScaledVector(_vac,Le);const Xt=Pe*Gt-ke*ze;if(Xt<=0&&ze-Pe>=0&&ke-Gt>=0)return _vbc.subVectors(le,V),Le=(ze-Pe)/(ze-Pe+(ke-Gt)),r.copy(V).addScaledVector(_vbc,Le);const xt=1/(Xt+Vt+Fe);return fe=Vt*xt,Le=Fe*xt,r.copy(o).addScaledVector(_vab,fe).addScaledVector(_vac,Le)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const _colorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb(v,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?v+(e-v)*6*r:r<1/2?e:r<2/3?v+(e-v)*6*(2/3-r):v}let Color$1=class{constructor(e,r,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,r,o)}set(e,r,o){if(r===void 0&&o===void 0){const V=e;V&&V.isColor?this.copy(V):typeof V=="number"?this.setHex(V):typeof V=="string"&&this.setStyle(V)}else this.setRGB(e,r,o);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,r=SRGBColorSpace){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ColorManagement.colorSpaceToWorking(this,r),this}setRGB(e,r,o,V=ColorManagement.workingColorSpace){return this.r=e,this.g=r,this.b=o,ColorManagement.colorSpaceToWorking(this,V),this}setHSL(e,r,o,V=ColorManagement.workingColorSpace){if(e=euclideanModulo(e,1),r=clamp(r,0,1),o=clamp(o,0,1),r===0)this.r=this.g=this.b=o;else{const le=o<=.5?o*(1+r):o+r-o*r,fe=2*o-le;this.r=hue2rgb(fe,le,e+1/3),this.g=hue2rgb(fe,le,e),this.b=hue2rgb(fe,le,e-1/3)}return ColorManagement.colorSpaceToWorking(this,V),this}setStyle(e,r=SRGBColorSpace){function o(le){le!==void 0&&parseFloat(le)<1&&warn("Color: Alpha component of "+e+" will be ignored.")}let V;if(V=/^(\w+)\(([^\)]*)\)/.exec(e)){let le;const fe=V[1],Le=V[2];switch(fe){case"rgb":case"rgba":if(le=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setRGB(Math.min(255,parseInt(le[1],10))/255,Math.min(255,parseInt(le[2],10))/255,Math.min(255,parseInt(le[3],10))/255,r);if(le=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setRGB(Math.min(100,parseInt(le[1],10))/100,Math.min(100,parseInt(le[2],10))/100,Math.min(100,parseInt(le[3],10))/100,r);break;case"hsl":case"hsla":if(le=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setHSL(parseFloat(le[1])/360,parseFloat(le[2])/100,parseFloat(le[3])/100,r);break;default:warn("Color: Unknown color model "+e)}}else if(V=/^\#([A-Fa-f\d]+)$/.exec(e)){const le=V[1],fe=le.length;if(fe===3)return this.setRGB(parseInt(le.charAt(0),16)/15,parseInt(le.charAt(1),16)/15,parseInt(le.charAt(2),16)/15,r);if(fe===6)return this.setHex(parseInt(le,16),r);warn("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,r);return this}setColorName(e,r=SRGBColorSpace){const o=_colorKeywords[e.toLowerCase()];return o!==void 0?this.setHex(o,r):warn("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=SRGBColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),e),Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(e=SRGBColorSpace){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,r=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),r);const o=_color.r,V=_color.g,le=_color.b,fe=Math.max(o,V,le),Le=Math.min(o,V,le);let Ce,Re;const Pe=(Le+fe)/2;if(Le===fe)Ce=0,Re=0;else{const ze=fe-Le;switch(Re=Pe<=.5?ze/(fe+Le):ze/(2-fe-Le),fe){case o:Ce=(V-le)/ze+(V<le?6:0);break;case V:Ce=(le-o)/ze+2;break;case le:Ce=(o-V)/ze+4;break}Ce/=6}return e.h=Ce,e.s=Re,e.l=Pe,e}getRGB(e,r=ColorManagement.workingColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),r),e.r=_color.r,e.g=_color.g,e.b=_color.b,e}getStyle(e=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),e);const r=_color.r,o=_color.g,V=_color.b;return e!==SRGBColorSpace?`color(${e} ${r.toFixed(3)} ${o.toFixed(3)} ${V.toFixed(3)})`:`rgb(${Math.round(r*255)},${Math.round(o*255)},${Math.round(V*255)})`}offsetHSL(e,r,o){return this.getHSL(_hslA),this.setHSL(_hslA.h+e,_hslA.s+r,_hslA.l+o)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,r){return this.r=e.r+r.r,this.g=e.g+r.g,this.b=e.b+r.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,r){return this.r+=(e.r-this.r)*r,this.g+=(e.g-this.g)*r,this.b+=(e.b-this.b)*r,this}lerpColors(e,r,o){return this.r=e.r+(r.r-e.r)*o,this.g=e.g+(r.g-e.g)*o,this.b=e.b+(r.b-e.b)*o,this}lerpHSL(e,r){this.getHSL(_hslA),e.getHSL(_hslB);const o=lerp(_hslA.h,_hslB.h,r),V=lerp(_hslA.s,_hslB.s,r),le=lerp(_hslA.l,_hslB.l,r);return this.setHSL(o,V,le),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const r=this.r,o=this.g,V=this.b,le=e.elements;return this.r=le[0]*r+le[3]*o+le[6]*V,this.g=le[1]*r+le[4]*o+le[7]*V,this.b=le[2]*r+le[5]*o+le[8]*V,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,r=0){return this.r=e[r],this.g=e[r+1],this.b=e[r+2],this}toArray(e=[],r=0){return e[r]=this.r,e[r+1]=this.g,e[r+2]=this.b,e}fromBufferAttribute(e,r){return this.r=e.getX(r),this.g=e.getY(r),this.b=e.getZ(r),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};const _color=new Color$1;Color$1.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_materialId++}),this.uuid=generateUUID(),this.name="",this.type="Material",this.blending=NormalBlending,this.side=FrontSide,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=SrcAlphaFactor,this.blendDst=OneMinusSrcAlphaFactor,this.blendEquation=AddEquation,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Color$1(0,0,0),this.blendAlpha=0,this.depthFunc=LessEqualDepth,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=AlwaysStencilFunc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=KeepStencilOp,this.stencilZFail=KeepStencilOp,this.stencilZPass=KeepStencilOp,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const r in e){const o=e[r];if(o===void 0){warn(`Material: parameter '${r}' has value of undefined.`);continue}const V=this[r];if(V===void 0){warn(`Material: '${r}' is not a property of THREE.${this.type}.`);continue}V&&V.isColor?V.set(o):V&&V.isVector3&&o&&o.isVector3?V.copy(o):this[r]=o}}toJSON(e){const r=e===void 0||typeof e=="string";r&&(e={textures:{},images:{}});const o={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.color&&this.color.isColor&&(o.color=this.color.getHex()),this.roughness!==void 0&&(o.roughness=this.roughness),this.metalness!==void 0&&(o.metalness=this.metalness),this.sheen!==void 0&&(o.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(o.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(o.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(o.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(o.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(o.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(o.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(o.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(o.shininess=this.shininess),this.clearcoat!==void 0&&(o.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(o.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(o.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(o.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(o.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,o.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(o.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(o.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(o.dispersion=this.dispersion),this.iridescence!==void 0&&(o.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(o.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(o.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(o.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(o.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(o.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(o.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(o.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(o.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(o.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(o.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(o.lightMap=this.lightMap.toJSON(e).uuid,o.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(o.aoMap=this.aoMap.toJSON(e).uuid,o.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(o.bumpMap=this.bumpMap.toJSON(e).uuid,o.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(o.normalMap=this.normalMap.toJSON(e).uuid,o.normalMapType=this.normalMapType,o.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(o.displacementMap=this.displacementMap.toJSON(e).uuid,o.displacementScale=this.displacementScale,o.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(o.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(o.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(o.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(o.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(o.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(o.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(o.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(o.combine=this.combine)),this.envMapRotation!==void 0&&(o.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(o.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(o.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(o.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(o.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(o.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(o.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(o.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(o.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(o.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(o.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(o.size=this.size),this.shadowSide!==null&&(o.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(o.sizeAttenuation=this.sizeAttenuation),this.blending!==NormalBlending&&(o.blending=this.blending),this.side!==FrontSide&&(o.side=this.side),this.vertexColors===!0&&(o.vertexColors=!0),this.opacity<1&&(o.opacity=this.opacity),this.transparent===!0&&(o.transparent=!0),this.blendSrc!==SrcAlphaFactor&&(o.blendSrc=this.blendSrc),this.blendDst!==OneMinusSrcAlphaFactor&&(o.blendDst=this.blendDst),this.blendEquation!==AddEquation&&(o.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(o.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(o.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(o.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(o.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(o.blendAlpha=this.blendAlpha),this.depthFunc!==LessEqualDepth&&(o.depthFunc=this.depthFunc),this.depthTest===!1&&(o.depthTest=this.depthTest),this.depthWrite===!1&&(o.depthWrite=this.depthWrite),this.colorWrite===!1&&(o.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(o.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==AlwaysStencilFunc&&(o.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(o.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(o.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==KeepStencilOp&&(o.stencilFail=this.stencilFail),this.stencilZFail!==KeepStencilOp&&(o.stencilZFail=this.stencilZFail),this.stencilZPass!==KeepStencilOp&&(o.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(o.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(o.rotation=this.rotation),this.polygonOffset===!0&&(o.polygonOffset=!0),this.polygonOffsetFactor!==0&&(o.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(o.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(o.linewidth=this.linewidth),this.dashSize!==void 0&&(o.dashSize=this.dashSize),this.gapSize!==void 0&&(o.gapSize=this.gapSize),this.scale!==void 0&&(o.scale=this.scale),this.dithering===!0&&(o.dithering=!0),this.alphaTest>0&&(o.alphaTest=this.alphaTest),this.alphaHash===!0&&(o.alphaHash=!0),this.alphaToCoverage===!0&&(o.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(o.premultipliedAlpha=!0),this.forceSinglePass===!0&&(o.forceSinglePass=!0),this.allowOverride===!1&&(o.allowOverride=!1),this.wireframe===!0&&(o.wireframe=!0),this.wireframeLinewidth>1&&(o.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(o.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(o.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(o.flatShading=!0),this.visible===!1&&(o.visible=!1),this.toneMapped===!1&&(o.toneMapped=!1),this.fog===!1&&(o.fog=!1),Object.keys(this.userData).length>0&&(o.userData=this.userData);function V(le){const fe=[];for(const Le in le){const Ce=le[Le];delete Ce.metadata,fe.push(Ce)}return fe}if(r){const le=V(e.textures),fe=V(e.images);le.length>0&&(o.textures=le),fe.length>0&&(o.images=fe)}return o}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const r=e.clippingPlanes;let o=null;if(r!==null){const V=r.length;o=new Array(V);for(let le=0;le!==V;++le)o[le]=r[le].clone()}return this.clippingPlanes=o,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class MeshBasicMaterial extends Material{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const _tables=_generateTables();function _generateTables(){const v=new ArrayBuffer(4),e=new Float32Array(v),r=new Uint32Array(v),o=new Uint32Array(512),V=new Uint32Array(512);for(let Ce=0;Ce<256;++Ce){const Re=Ce-127;Re<-27?(o[Ce]=0,o[Ce|256]=32768,V[Ce]=24,V[Ce|256]=24):Re<-14?(o[Ce]=1024>>-Re-14,o[Ce|256]=1024>>-Re-14|32768,V[Ce]=-Re-1,V[Ce|256]=-Re-1):Re<=15?(o[Ce]=Re+15<<10,o[Ce|256]=Re+15<<10|32768,V[Ce]=13,V[Ce|256]=13):Re<128?(o[Ce]=31744,o[Ce|256]=64512,V[Ce]=24,V[Ce|256]=24):(o[Ce]=31744,o[Ce|256]=64512,V[Ce]=13,V[Ce|256]=13)}const le=new Uint32Array(2048),fe=new Uint32Array(64),Le=new Uint32Array(64);for(let Ce=1;Ce<1024;++Ce){let Re=Ce<<13,Pe=0;for(;!(Re&8388608);)Re<<=1,Pe-=8388608;Re&=-8388609,Pe+=947912704,le[Ce]=Re|Pe}for(let Ce=1024;Ce<2048;++Ce)le[Ce]=939524096+(Ce-1024<<13);for(let Ce=1;Ce<31;++Ce)fe[Ce]=Ce<<23;fe[31]=1199570944,fe[32]=2147483648;for(let Ce=33;Ce<63;++Ce)fe[Ce]=2147483648+(Ce-32<<23);fe[63]=3347054592;for(let Ce=1;Ce<64;++Ce)Ce!==32&&(Le[Ce]=1024);return{floatView:e,uint32View:r,baseTable:o,shiftTable:V,mantissaTable:le,exponentTable:fe,offsetTable:Le}}function toHalfFloat(v){Math.abs(v)>65504&&warn("DataUtils.toHalfFloat(): Value out of range."),v=clamp(v,-65504,65504),_tables.floatView[0]=v;const e=_tables.uint32View[0],r=e>>23&511;return _tables.baseTable[r]+((e&8388607)>>_tables.shiftTable[r])}function fromHalfFloat(v){const e=v>>10;return _tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[e]+(v&1023)]+_tables.exponentTable[e],_tables.floatView[0]}class DataUtils{static toHalfFloat(e){return toHalfFloat(e)}static fromHalfFloat(e){return fromHalfFloat(e)}}const _vector$9=new Vector3,_vector2$1=new Vector2;let _id$2=0;class BufferAttribute{constructor(e,r,o=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:_id$2++}),this.name="",this.array=e,this.itemSize=r,this.count=e!==void 0?e.length/r:0,this.normalized=o,this.usage=StaticDrawUsage,this.updateRanges=[],this.gpuType=FloatType,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,r,o){e*=this.itemSize,o*=r.itemSize;for(let V=0,le=this.itemSize;V<le;V++)this.array[e+V]=r.array[o+V];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let r=0,o=this.count;r<o;r++)_vector2$1.fromBufferAttribute(this,r),_vector2$1.applyMatrix3(e),this.setXY(r,_vector2$1.x,_vector2$1.y);else if(this.itemSize===3)for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyMatrix3(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}applyMatrix4(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyMatrix4(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}applyNormalMatrix(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyNormalMatrix(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}transformDirection(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.transformDirection(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}set(e,r=0){return this.array.set(e,r),this}getComponent(e,r){let o=this.array[e*this.itemSize+r];return this.normalized&&(o=denormalize(o,this.array)),o}setComponent(e,r,o){return this.normalized&&(o=normalize$1(o,this.array)),this.array[e*this.itemSize+r]=o,this}getX(e){let r=this.array[e*this.itemSize];return this.normalized&&(r=denormalize(r,this.array)),r}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize]=r,this}getY(e){let r=this.array[e*this.itemSize+1];return this.normalized&&(r=denormalize(r,this.array)),r}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+1]=r,this}getZ(e){let r=this.array[e*this.itemSize+2];return this.normalized&&(r=denormalize(r,this.array)),r}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+2]=r,this}getW(e){let r=this.array[e*this.itemSize+3];return this.normalized&&(r=denormalize(r,this.array)),r}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+3]=r,this}setXY(e,r,o){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.array[e+0]=r,this.array[e+1]=o,this}setXYZ(e,r,o,V){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.array[e+0]=r,this.array[e+1]=o,this.array[e+2]=V,this}setXYZW(e,r,o,V,le){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.array[e+0]=r,this.array[e+1]=o,this.array[e+2]=V,this.array[e+3]=le,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==StaticDrawUsage&&(e.usage=this.usage),e}}class Int8BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int8Array(e),r,o)}}class Uint8BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint8Array(e),r,o)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint8ClampedArray(e),r,o)}}class Int16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int16Array(e),r,o)}}class Uint16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint16Array(e),r,o)}}class Int32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int32Array(e),r,o)}}class Uint32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint32Array(e),r,o)}}class Float16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint16Array(e),r,o),this.isFloat16BufferAttribute=!0}getX(e){let r=fromHalfFloat(this.array[e*this.itemSize]);return this.normalized&&(r=denormalize(r,this.array)),r}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize]=toHalfFloat(r),this}getY(e){let r=fromHalfFloat(this.array[e*this.itemSize+1]);return this.normalized&&(r=denormalize(r,this.array)),r}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+1]=toHalfFloat(r),this}getZ(e){let r=fromHalfFloat(this.array[e*this.itemSize+2]);return this.normalized&&(r=denormalize(r,this.array)),r}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+2]=toHalfFloat(r),this}getW(e){let r=fromHalfFloat(this.array[e*this.itemSize+3]);return this.normalized&&(r=denormalize(r,this.array)),r}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+3]=toHalfFloat(r),this}setXY(e,r,o){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this}setXYZ(e,r,o,V){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this.array[e+2]=toHalfFloat(V),this}setXYZW(e,r,o,V,le){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this.array[e+2]=toHalfFloat(V),this.array[e+3]=toHalfFloat(le),this}}class Float32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Float32Array(e),r,o)}}let _id$1=0;const _m1$3=new Matrix4,_obj=new Object3D,_offset=new Vector3,_box$2=new Box3,_boxMorphTargets=new Box3,_vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:_id$1++}),this.uuid=generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(arrayNeedsUint32(e)?Uint32BufferAttribute:Uint16BufferAttribute)(e,1):this.index=e,this}setIndirect(e,r=0){return this.indirect=e,this.indirectOffset=r,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,r){return this.attributes[e]=r,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,r,o=0){this.groups.push({start:e,count:r,materialIndex:o})}clearGroups(){this.groups=[]}setDrawRange(e,r){this.drawRange.start=e,this.drawRange.count=r}applyMatrix4(e){const r=this.attributes.position;r!==void 0&&(r.applyMatrix4(e),r.needsUpdate=!0);const o=this.attributes.normal;if(o!==void 0){const le=new Matrix3().getNormalMatrix(e);o.applyNormalMatrix(le),o.needsUpdate=!0}const V=this.attributes.tangent;return V!==void 0&&(V.transformDirection(e),V.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return _m1$3.makeRotationFromQuaternion(e),this.applyMatrix4(_m1$3),this}rotateX(e){return _m1$3.makeRotationX(e),this.applyMatrix4(_m1$3),this}rotateY(e){return _m1$3.makeRotationY(e),this.applyMatrix4(_m1$3),this}rotateZ(e){return _m1$3.makeRotationZ(e),this.applyMatrix4(_m1$3),this}translate(e,r,o){return _m1$3.makeTranslation(e,r,o),this.applyMatrix4(_m1$3),this}scale(e,r,o){return _m1$3.makeScale(e,r,o),this.applyMatrix4(_m1$3),this}lookAt(e){return _obj.lookAt(e),_obj.updateMatrix(),this.applyMatrix4(_obj.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(_offset).negate(),this.translate(_offset.x,_offset.y,_offset.z),this}setFromPoints(e){const r=this.getAttribute("position");if(r===void 0){const o=[];for(let V=0,le=e.length;V<le;V++){const fe=e[V];o.push(fe.x,fe.y,fe.z||0)}this.setAttribute("position",new Float32BufferAttribute(o,3))}else{const o=Math.min(e.length,r.count);for(let V=0;V<o;V++){const le=e[V];r.setXYZ(V,le.x,le.y,le.z||0)}e.length>r.count&&warn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),r.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error$1("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),r)for(let o=0,V=r.length;o<V;o++){const le=r[o];_box$2.setFromBufferAttribute(le),this.morphTargetsRelative?(_vector$8.addVectors(this.boundingBox.min,_box$2.min),this.boundingBox.expandByPoint(_vector$8),_vector$8.addVectors(this.boundingBox.max,_box$2.max),this.boundingBox.expandByPoint(_vector$8)):(this.boundingBox.expandByPoint(_box$2.min),this.boundingBox.expandByPoint(_box$2.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&error$1('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sphere$1);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error$1("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Vector3,1/0);return}if(e){const o=this.boundingSphere.center;if(_box$2.setFromBufferAttribute(e),r)for(let le=0,fe=r.length;le<fe;le++){const Le=r[le];_boxMorphTargets.setFromBufferAttribute(Le),this.morphTargetsRelative?(_vector$8.addVectors(_box$2.min,_boxMorphTargets.min),_box$2.expandByPoint(_vector$8),_vector$8.addVectors(_box$2.max,_boxMorphTargets.max),_box$2.expandByPoint(_vector$8)):(_box$2.expandByPoint(_boxMorphTargets.min),_box$2.expandByPoint(_boxMorphTargets.max))}_box$2.getCenter(o);let V=0;for(let le=0,fe=e.count;le<fe;le++)_vector$8.fromBufferAttribute(e,le),V=Math.max(V,o.distanceToSquared(_vector$8));if(r)for(let le=0,fe=r.length;le<fe;le++){const Le=r[le],Ce=this.morphTargetsRelative;for(let Re=0,Pe=Le.count;Re<Pe;Re++)_vector$8.fromBufferAttribute(Le,Re),Ce&&(_offset.fromBufferAttribute(e,Re),_vector$8.add(_offset)),V=Math.max(V,o.distanceToSquared(_vector$8))}this.boundingSphere.radius=Math.sqrt(V),isNaN(this.boundingSphere.radius)&&error$1('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,r=this.attributes;if(e===null||r.position===void 0||r.normal===void 0||r.uv===void 0){error$1("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const o=r.position,V=r.normal,le=r.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*o.count),4));const fe=this.getAttribute("tangent"),Le=[],Ce=[];for(let Ht=0;Ht<o.count;Ht++)Le[Ht]=new Vector3,Ce[Ht]=new Vector3;const Re=new Vector3,Pe=new Vector3,ze=new Vector3,Fe=new Vector2,ke=new Vector2,Gt=new Vector2,Vt=new Vector3,Xt=new Vector3;function xt(Ht,Kt,Yt){Re.fromBufferAttribute(o,Ht),Pe.fromBufferAttribute(o,Kt),ze.fromBufferAttribute(o,Yt),Fe.fromBufferAttribute(le,Ht),ke.fromBufferAttribute(le,Kt),Gt.fromBufferAttribute(le,Yt),Pe.sub(Re),ze.sub(Re),ke.sub(Fe),Gt.sub(Fe);const jt=1/(ke.x*Gt.y-Gt.x*ke.y);isFinite(jt)&&(Vt.copy(Pe).multiplyScalar(Gt.y).addScaledVector(ze,-ke.y).multiplyScalar(jt),Xt.copy(ze).multiplyScalar(ke.x).addScaledVector(Pe,-Gt.x).multiplyScalar(jt),Le[Ht].add(Vt),Le[Kt].add(Vt),Le[Yt].add(Vt),Ce[Ht].add(Xt),Ce[Kt].add(Xt),Ce[Yt].add(Xt))}let Zt=this.groups;Zt.length===0&&(Zt=[{start:0,count:e.count}]);for(let Ht=0,Kt=Zt.length;Ht<Kt;++Ht){const Yt=Zt[Ht],jt=Yt.start,n0=Yt.count;for(let a0=jt,l0=jt+n0;a0<l0;a0+=3)xt(e.getX(a0+0),e.getX(a0+1),e.getX(a0+2))}const wt=new Vector3,Wt=new Vector3,It=new Vector3,Nt=new Vector3;function Ft(Ht){It.fromBufferAttribute(V,Ht),Nt.copy(It);const Kt=Le[Ht];wt.copy(Kt),wt.sub(It.multiplyScalar(It.dot(Kt))).normalize(),Wt.crossVectors(Nt,Kt);const jt=Wt.dot(Ce[Ht])<0?-1:1;fe.setXYZW(Ht,wt.x,wt.y,wt.z,jt)}for(let Ht=0,Kt=Zt.length;Ht<Kt;++Ht){const Yt=Zt[Ht],jt=Yt.start,n0=Yt.count;for(let a0=jt,l0=jt+n0;a0<l0;a0+=3)Ft(e.getX(a0+0)),Ft(e.getX(a0+1)),Ft(e.getX(a0+2))}}computeVertexNormals(){const e=this.index,r=this.getAttribute("position");if(r!==void 0){let o=this.getAttribute("normal");if(o===void 0)o=new BufferAttribute(new Float32Array(r.count*3),3),this.setAttribute("normal",o);else for(let Fe=0,ke=o.count;Fe<ke;Fe++)o.setXYZ(Fe,0,0,0);const V=new Vector3,le=new Vector3,fe=new Vector3,Le=new Vector3,Ce=new Vector3,Re=new Vector3,Pe=new Vector3,ze=new Vector3;if(e)for(let Fe=0,ke=e.count;Fe<ke;Fe+=3){const Gt=e.getX(Fe+0),Vt=e.getX(Fe+1),Xt=e.getX(Fe+2);V.fromBufferAttribute(r,Gt),le.fromBufferAttribute(r,Vt),fe.fromBufferAttribute(r,Xt),Pe.subVectors(fe,le),ze.subVectors(V,le),Pe.cross(ze),Le.fromBufferAttribute(o,Gt),Ce.fromBufferAttribute(o,Vt),Re.fromBufferAttribute(o,Xt),Le.add(Pe),Ce.add(Pe),Re.add(Pe),o.setXYZ(Gt,Le.x,Le.y,Le.z),o.setXYZ(Vt,Ce.x,Ce.y,Ce.z),o.setXYZ(Xt,Re.x,Re.y,Re.z)}else for(let Fe=0,ke=r.count;Fe<ke;Fe+=3)V.fromBufferAttribute(r,Fe+0),le.fromBufferAttribute(r,Fe+1),fe.fromBufferAttribute(r,Fe+2),Pe.subVectors(fe,le),ze.subVectors(V,le),Pe.cross(ze),o.setXYZ(Fe+0,Pe.x,Pe.y,Pe.z),o.setXYZ(Fe+1,Pe.x,Pe.y,Pe.z),o.setXYZ(Fe+2,Pe.x,Pe.y,Pe.z);this.normalizeNormals(),o.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let r=0,o=e.count;r<o;r++)_vector$8.fromBufferAttribute(e,r),_vector$8.normalize(),e.setXYZ(r,_vector$8.x,_vector$8.y,_vector$8.z)}toNonIndexed(){function e(Le,Ce){const Re=Le.array,Pe=Le.itemSize,ze=Le.normalized,Fe=new Re.constructor(Ce.length*Pe);let ke=0,Gt=0;for(let Vt=0,Xt=Ce.length;Vt<Xt;Vt++){Le.isInterleavedBufferAttribute?ke=Ce[Vt]*Le.data.stride+Le.offset:ke=Ce[Vt]*Pe;for(let xt=0;xt<Pe;xt++)Fe[Gt++]=Re[ke++]}return new BufferAttribute(Fe,Pe,ze)}if(this.index===null)return warn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const r=new BufferGeometry,o=this.index.array,V=this.attributes;for(const Le in V){const Ce=V[Le],Re=e(Ce,o);r.setAttribute(Le,Re)}const le=this.morphAttributes;for(const Le in le){const Ce=[],Re=le[Le];for(let Pe=0,ze=Re.length;Pe<ze;Pe++){const Fe=Re[Pe],ke=e(Fe,o);Ce.push(ke)}r.morphAttributes[Le]=Ce}r.morphTargetsRelative=this.morphTargetsRelative;const fe=this.groups;for(let Le=0,Ce=fe.length;Le<Ce;Le++){const Re=fe[Le];r.addGroup(Re.start,Re.count,Re.materialIndex)}return r}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const Ce=this.parameters;for(const Re in Ce)Ce[Re]!==void 0&&(e[Re]=Ce[Re]);return e}e.data={attributes:{}};const r=this.index;r!==null&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});const o=this.attributes;for(const Ce in o){const Re=o[Ce];e.data.attributes[Ce]=Re.toJSON(e.data)}const V={};let le=!1;for(const Ce in this.morphAttributes){const Re=this.morphAttributes[Ce],Pe=[];for(let ze=0,Fe=Re.length;ze<Fe;ze++){const ke=Re[ze];Pe.push(ke.toJSON(e.data))}Pe.length>0&&(V[Ce]=Pe,le=!0)}le&&(e.data.morphAttributes=V,e.data.morphTargetsRelative=this.morphTargetsRelative);const fe=this.groups;fe.length>0&&(e.data.groups=JSON.parse(JSON.stringify(fe)));const Le=this.boundingSphere;return Le!==null&&(e.data.boundingSphere=Le.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const r={};this.name=e.name;const o=e.index;o!==null&&this.setIndex(o.clone());const V=e.attributes;for(const Re in V){const Pe=V[Re];this.setAttribute(Re,Pe.clone(r))}const le=e.morphAttributes;for(const Re in le){const Pe=[],ze=le[Re];for(let Fe=0,ke=ze.length;Fe<ke;Fe++)Pe.push(ze[Fe].clone(r));this.morphAttributes[Re]=Pe}this.morphTargetsRelative=e.morphTargetsRelative;const fe=e.groups;for(let Re=0,Pe=fe.length;Re<Pe;Re++){const ze=fe[Re];this.addGroup(ze.start,ze.count,ze.materialIndex)}const Le=e.boundingBox;Le!==null&&(this.boundingBox=Le.clone());const Ce=e.boundingSphere;return Ce!==null&&(this.boundingSphere=Ce.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4,_ray$3=new Ray,_sphere$6=new Sphere$1,_sphereHitAt=new Vector3,_vA$1=new Vector3,_vB$1=new Vector3,_vC$1=new Vector3,_tempA=new Vector3,_morphA=new Vector3,_intersectionPoint$1=new Vector3,_intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(e=new BufferGeometry,r=new MeshBasicMaterial){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}getVertexPosition(e,r){const o=this.geometry,V=o.attributes.position,le=o.morphAttributes.position,fe=o.morphTargetsRelative;r.fromBufferAttribute(V,e);const Le=this.morphTargetInfluences;if(le&&Le){_morphA.set(0,0,0);for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=Le[Ce],ze=le[Ce];Pe!==0&&(_tempA.fromBufferAttribute(ze,e),fe?_morphA.addScaledVector(_tempA,Pe):_morphA.addScaledVector(_tempA.sub(r),Pe))}r.add(_morphA)}return r}raycast(e,r){const o=this.geometry,V=this.material,le=this.matrixWorld;V!==void 0&&(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$6.copy(o.boundingSphere),_sphere$6.applyMatrix4(le),_ray$3.copy(e.ray).recast(e.near),!(_sphere$6.containsPoint(_ray$3.origin)===!1&&(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null||_ray$3.origin.distanceToSquared(_sphereHitAt)>Ln(e.far-e.near,2)))&&(_inverseMatrix$3.copy(le).invert(),_ray$3.copy(e.ray).applyMatrix4(_inverseMatrix$3),!(o.boundingBox!==null&&_ray$3.intersectsBox(o.boundingBox)===!1)&&this._computeIntersections(e,r,_ray$3)))}_computeIntersections(e,r,o){let V;const le=this.geometry,fe=this.material,Le=le.index,Ce=le.attributes.position,Re=le.attributes.uv,Pe=le.attributes.uv1,ze=le.attributes.normal,Fe=le.groups,ke=le.drawRange;if(Le!==null)if(Array.isArray(fe))for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=fe[Xt.materialIndex],Zt=Math.max(Xt.start,ke.start),wt=Math.min(Le.count,Math.min(Xt.start+Xt.count,ke.start+ke.count));for(let Wt=Zt,It=wt;Wt<It;Wt+=3){const Nt=Le.getX(Wt),Ft=Le.getX(Wt+1),Ht=Le.getX(Wt+2);V=checkGeometryIntersection(this,xt,e,o,Re,Pe,ze,Nt,Ft,Ht),V&&(V.faceIndex=Math.floor(Wt/3),V.face.materialIndex=Xt.materialIndex,r.push(V))}}else{const Gt=Math.max(0,ke.start),Vt=Math.min(Le.count,ke.start+ke.count);for(let Xt=Gt,xt=Vt;Xt<xt;Xt+=3){const Zt=Le.getX(Xt),wt=Le.getX(Xt+1),Wt=Le.getX(Xt+2);V=checkGeometryIntersection(this,fe,e,o,Re,Pe,ze,Zt,wt,Wt),V&&(V.faceIndex=Math.floor(Xt/3),r.push(V))}}else if(Ce!==void 0)if(Array.isArray(fe))for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=fe[Xt.materialIndex],Zt=Math.max(Xt.start,ke.start),wt=Math.min(Ce.count,Math.min(Xt.start+Xt.count,ke.start+ke.count));for(let Wt=Zt,It=wt;Wt<It;Wt+=3){const Nt=Wt,Ft=Wt+1,Ht=Wt+2;V=checkGeometryIntersection(this,xt,e,o,Re,Pe,ze,Nt,Ft,Ht),V&&(V.faceIndex=Math.floor(Wt/3),V.face.materialIndex=Xt.materialIndex,r.push(V))}}else{const Gt=Math.max(0,ke.start),Vt=Math.min(Ce.count,ke.start+ke.count);for(let Xt=Gt,xt=Vt;Xt<xt;Xt+=3){const Zt=Xt,wt=Xt+1,Wt=Xt+2;V=checkGeometryIntersection(this,fe,e,o,Re,Pe,ze,Zt,wt,Wt),V&&(V.faceIndex=Math.floor(Xt/3),r.push(V))}}}}function checkIntersection$1(v,e,r,o,V,le,fe,Le){let Ce;if(e.side===BackSide?Ce=o.intersectTriangle(fe,le,V,!0,Le):Ce=o.intersectTriangle(V,le,fe,e.side===FrontSide,Le),Ce===null)return null;_intersectionPointWorld.copy(Le),_intersectionPointWorld.applyMatrix4(v.matrixWorld);const Re=r.ray.origin.distanceTo(_intersectionPointWorld);return Re<r.near||Re>r.far?null:{distance:Re,point:_intersectionPointWorld.clone(),object:v}}function checkGeometryIntersection(v,e,r,o,V,le,fe,Le,Ce,Re){v.getVertexPosition(Le,_vA$1),v.getVertexPosition(Ce,_vB$1),v.getVertexPosition(Re,_vC$1);const Pe=checkIntersection$1(v,e,r,o,_vA$1,_vB$1,_vC$1,_intersectionPoint$1);if(Pe){const ze=new Vector3;Triangle.getBarycoord(_intersectionPoint$1,_vA$1,_vB$1,_vC$1,ze),V&&(Pe.uv=Triangle.getInterpolatedAttribute(V,Le,Ce,Re,ze,new Vector2)),le&&(Pe.uv1=Triangle.getInterpolatedAttribute(le,Le,Ce,Re,ze,new Vector2)),fe&&(Pe.normal=Triangle.getInterpolatedAttribute(fe,Le,Ce,Re,ze,new Vector3),Pe.normal.dot(o.direction)>0&&Pe.normal.multiplyScalar(-1));const Fe={a:Le,b:Ce,c:Re,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,Fe.normal),Pe.face=Fe,Pe.barycoord=ze}return Pe}class BoxGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=1,le=1,fe=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:r,depth:o,widthSegments:V,heightSegments:le,depthSegments:fe};const Le=this;V=Math.floor(V),le=Math.floor(le),fe=Math.floor(fe);const Ce=[],Re=[],Pe=[],ze=[];let Fe=0,ke=0;Gt("z","y","x",-1,-1,o,r,e,fe,le,0),Gt("z","y","x",1,-1,o,r,-e,fe,le,1),Gt("x","z","y",1,1,e,o,r,V,fe,2),Gt("x","z","y",1,-1,e,o,-r,V,fe,3),Gt("x","y","z",1,-1,e,r,o,V,le,4),Gt("x","y","z",-1,-1,e,r,-o,V,le,5),this.setIndex(Ce),this.setAttribute("position",new Float32BufferAttribute(Re,3)),this.setAttribute("normal",new Float32BufferAttribute(Pe,3)),this.setAttribute("uv",new Float32BufferAttribute(ze,2));function Gt(Vt,Xt,xt,Zt,wt,Wt,It,Nt,Ft,Ht,Kt){const Yt=Wt/Ft,jt=It/Ht,n0=Wt/2,a0=It/2,l0=Nt/2,s0=Ft+1,$t=Ht+1;let qt=0,e0=0;const o0=new Vector3;for(let b0=0;b0<$t;b0++){const m0=b0*jt-a0;for(let P0=0;P0<s0;P0++){const Q0=P0*Yt-n0;o0[Vt]=Q0*Zt,o0[Xt]=m0*wt,o0[xt]=l0,Re.push(o0.x,o0.y,o0.z),o0[Vt]=0,o0[Xt]=0,o0[xt]=Nt>0?1:-1,Pe.push(o0.x,o0.y,o0.z),ze.push(P0/Ft),ze.push(1-b0/Ht),qt+=1}}for(let b0=0;b0<Ht;b0++)for(let m0=0;m0<Ft;m0++){const P0=Fe+m0+s0*b0,Q0=Fe+m0+s0*(b0+1),Si=Fe+(m0+1)+s0*(b0+1),Ni=Fe+(m0+1)+s0*b0;Ce.push(P0,Q0,Ni),Ce.push(Q0,Si,Ni),e0+=6}Le.addGroup(ke,e0,Kt),ke+=e0,Fe+=qt}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new BoxGeometry(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function cloneUniforms(v){const e={};for(const r in v){e[r]={};for(const o in v[r]){const V=v[r][o];V&&(V.isColor||V.isMatrix3||V.isMatrix4||V.isVector2||V.isVector3||V.isVector4||V.isTexture||V.isQuaternion)?V.isRenderTargetTexture?(warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[r][o]=null):e[r][o]=V.clone():Array.isArray(V)?e[r][o]=V.slice():e[r][o]=V}}return e}function mergeUniforms(v){const e={};for(let r=0;r<v.length;r++){const o=cloneUniforms(v[r]);for(const V in o)e[V]=o[V]}return e}function cloneUniformsGroups(v){const e=[];for(let r=0;r<v.length;r++)e.push(v[r].clone());return e}function getUnlitUniformColorSpace(v){const e=v.getRenderTarget();return e===null?v.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex=`void main() {
|
|
6
|
+
*/const REVISION="182",MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,CullFaceFrontBack=3,BasicShadowMap=0,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,ConstantColorFactor=211,OneMinusConstantColorFactor=212,ConstantAlphaFactor=213,OneMinusConstantAlphaFactor=214,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,AgXToneMapping=6,NeutralToneMapping=7,AttachedBindMode="attached",DetachedBindMode="detached",UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipMapNearestFilter=1004,NearestMipmapLinearFilter=1005,NearestMipMapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipMapNearestFilter=1007,LinearMipmapLinearFilter=1008,LinearMipMapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,UnsignedInt101111Type=35899,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBIntegerFormat=1032,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,R11_EAC_Format=37488,SIGNED_R11_EAC_Format=37489,RG11_EAC_Format=37490,SIGNED_RG11_EAC_Format=37491,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,LoopOnce=2200,LoopRepeat=2201,LoopPingPong=2202,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,AdditiveAnimationBlendMode=2501,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,BasicDepthPacking=3200,RGBADepthPacking=3201,RGBDepthPacking=3202,RGDepthPacking=3203,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace="",SRGBColorSpace="srgb",LinearSRGBColorSpace="srgb-linear",LinearTransfer="linear",SRGBTransfer="srgb",NoNormalPacking="",NormalRGPacking="rg",NormalGAPacking="ga",ZeroStencilOp=0,KeepStencilOp=7680,ReplaceStencilOp=7681,IncrementStencilOp=7682,DecrementStencilOp=7683,IncrementWrapStencilOp=34055,DecrementWrapStencilOp=34056,InvertStencilOp=5386,NeverStencilFunc=512,LessStencilFunc=513,EqualStencilFunc=514,LessEqualStencilFunc=515,GreaterStencilFunc=516,NotEqualStencilFunc=517,GreaterEqualStencilFunc=518,AlwaysStencilFunc=519,NeverCompare=512,LessCompare=513,EqualCompare=514,LessEqualCompare=515,GreaterCompare=516,NotEqualCompare=517,GreaterEqualCompare=518,AlwaysCompare=519,StaticDrawUsage=35044,DynamicDrawUsage=35048,StreamDrawUsage=35040,StaticReadUsage=35045,DynamicReadUsage=35049,StreamReadUsage=35041,StaticCopyUsage=35046,DynamicCopyUsage=35050,StreamCopyUsage=35042,GLSL1="100",GLSL3="300 es",WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001,TimestampQuery={COMPUTE:"compute",RENDER:"render"},InterpolationSamplingType={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},InterpolationSamplingMode={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function arrayNeedsUint32(v){for(let e=v.length-1;e>=0;--e)if(v[e]>=65535)return!0;return!1}const TYPED_ARRAYS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function getTypedArray(v,e){return new TYPED_ARRAYS[v](e)}function isTypedArray(v){return ArrayBuffer.isView(v)&&!(v instanceof DataView)}function createElementNS(v){return document.createElementNS("http://www.w3.org/1999/xhtml",v)}function createCanvasElement(){const v=createElementNS("canvas");return v.style.display="block",v}const _cache={};let _setConsoleFunction=null;function setConsoleFunction(v){_setConsoleFunction=v}function getConsoleFunction(){return _setConsoleFunction}function log$1(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("log",e,...v):console.log(e,...v)}function warn(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("warn",e,...v):console.warn(e,...v)}function error$1(...v){const e="THREE."+v.shift();_setConsoleFunction?_setConsoleFunction("error",e,...v):console.error(e,...v)}function warnOnce(...v){const e=v.join(" ");e in _cache||(_cache[e]=!0,warn(...v))}function probeAsync(v,e,r){return new Promise(function(o,V){function le(){switch(v.clientWaitSync(e,v.SYNC_FLUSH_COMMANDS_BIT,0)){case v.WAIT_FAILED:V();break;case v.TIMEOUT_EXPIRED:setTimeout(le,r);break;default:o()}}setTimeout(le,r)})}class EventDispatcher{addEventListener(e,r){this._listeners===void 0&&(this._listeners={});const o=this._listeners;o[e]===void 0&&(o[e]=[]),o[e].indexOf(r)===-1&&o[e].push(r)}hasEventListener(e,r){const o=this._listeners;return o===void 0?!1:o[e]!==void 0&&o[e].indexOf(r)!==-1}removeEventListener(e,r){const o=this._listeners;if(o===void 0)return;const V=o[e];if(V!==void 0){const le=V.indexOf(r);le!==-1&&V.splice(le,1)}}dispatchEvent(e){const r=this._listeners;if(r===void 0)return;const o=r[e.type];if(o!==void 0){e.target=this;const V=o.slice(0);for(let le=0,fe=V.length;le<fe;le++)V[le].call(this,e);e.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180,RAD2DEG=180/Math.PI;function generateUUID(){const v=Math.random()*4294967295|0,e=Math.random()*4294967295|0,r=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(_lut[v&255]+_lut[v>>8&255]+_lut[v>>16&255]+_lut[v>>24&255]+"-"+_lut[e&255]+_lut[e>>8&255]+"-"+_lut[e>>16&15|64]+_lut[e>>24&255]+"-"+_lut[r&63|128]+_lut[r>>8&255]+"-"+_lut[r>>16&255]+_lut[r>>24&255]+_lut[o&255]+_lut[o>>8&255]+_lut[o>>16&255]+_lut[o>>24&255]).toLowerCase()}function clamp(v,e,r){return Math.max(e,Math.min(r,v))}function euclideanModulo(v,e){return(v%e+e)%e}function mapLinear(v,e,r,o,V){return o+(v-e)*(V-o)/(r-e)}function inverseLerp(v,e,r){return v!==e?(r-v)/(e-v):0}function lerp(v,e,r){return(1-r)*v+r*e}function damp(v,e,r,o){return lerp(v,e,1-Math.exp(-r*o))}function pingpong(v,e=1){return e-Math.abs(euclideanModulo(v,e*2)-e)}function smoothstep(v,e,r){return v<=e?0:v>=r?1:(v=(v-e)/(r-e),v*v*(3-2*v))}function smootherstep(v,e,r){return v<=e?0:v>=r?1:(v=(v-e)/(r-e),v*v*v*(v*(v*6-15)+10))}function randInt(v,e){return v+Math.floor(Math.random()*(e-v+1))}function randFloat(v,e){return v+Math.random()*(e-v)}function randFloatSpread(v){return v*(.5-Math.random())}function seededRandom(v){v!==void 0&&(_seed=v);let e=_seed+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function degToRad(v){return v*DEG2RAD}function radToDeg(v){return v*RAD2DEG}function isPowerOfTwo(v){return(v&v-1)===0&&v!==0}function ceilPowerOfTwo(v){return Math.pow(2,Math.ceil(Math.log(v)/Math.LN2))}function floorPowerOfTwo(v){return Math.pow(2,Math.floor(Math.log(v)/Math.LN2))}function setQuaternionFromProperEuler(v,e,r,o,V){const le=Math.cos,fe=Math.sin,Le=le(r/2),Ce=fe(r/2),Re=le((e+o)/2),Pe=fe((e+o)/2),ze=le((e-o)/2),Fe=fe((e-o)/2),ke=le((o-e)/2),Gt=fe((o-e)/2);switch(V){case"XYX":v.set(Le*Pe,Ce*ze,Ce*Fe,Le*Re);break;case"YZY":v.set(Ce*Fe,Le*Pe,Ce*ze,Le*Re);break;case"ZXZ":v.set(Ce*ze,Ce*Fe,Le*Pe,Le*Re);break;case"XZX":v.set(Le*Pe,Ce*Gt,Ce*ke,Le*Re);break;case"YXY":v.set(Ce*ke,Le*Pe,Ce*Gt,Le*Re);break;case"ZYZ":v.set(Ce*Gt,Ce*ke,Le*Pe,Le*Re);break;default:warn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+V)}}function denormalize(v,e){switch(e.constructor){case Float32Array:return v;case Uint32Array:return v/4294967295;case Uint16Array:return v/65535;case Uint8Array:return v/255;case Int32Array:return Math.max(v/2147483647,-1);case Int16Array:return Math.max(v/32767,-1);case Int8Array:return Math.max(v/127,-1);default:throw new Error("Invalid component type.")}}function normalize$1(v,e){switch(e.constructor){case Float32Array:return v;case Uint32Array:return Math.round(v*4294967295);case Uint16Array:return Math.round(v*65535);case Uint8Array:return Math.round(v*255);case Int32Array:return Math.round(v*2147483647);case Int16Array:return Math.round(v*32767);case Int8Array:return Math.round(v*127);default:throw new Error("Invalid component type.")}}const MathUtils={DEG2RAD,RAD2DEG,generateUUID,clamp,euclideanModulo,mapLinear,inverseLerp,lerp,damp,pingpong,smoothstep,smootherstep,randInt,randFloat,randFloatSpread,seededRandom,degToRad,radToDeg,isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler,normalize:normalize$1,denormalize};class Vector2{constructor(e=0,r=0){Vector2.prototype.isVector2=!0,this.x=e,this.y=r}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,r){return this.x=e,this.y=r,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const r=this.x,o=this.y,V=e.elements;return this.x=V[0]*r+V[3]*o+V[6],this.y=V[1]*r+V[4]*o+V[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const o=this.dot(e)/r;return Math.acos(clamp(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,o=this.y-e.y;return r*r+o*o}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this}rotateAround(e,r){const o=Math.cos(r),V=Math.sin(r),le=this.x-e.x,fe=this.y-e.y;return this.x=le*o-fe*V+e.x,this.y=le*V+fe*o+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Quaternion{constructor(e=0,r=0,o=0,V=1){this.isQuaternion=!0,this._x=e,this._y=r,this._z=o,this._w=V}static slerpFlat(e,r,o,V,le,fe,Le){let Ce=o[V+0],Re=o[V+1],Pe=o[V+2],ze=o[V+3],Fe=le[fe+0],ke=le[fe+1],Gt=le[fe+2],Vt=le[fe+3];if(Le<=0){e[r+0]=Ce,e[r+1]=Re,e[r+2]=Pe,e[r+3]=ze;return}if(Le>=1){e[r+0]=Fe,e[r+1]=ke,e[r+2]=Gt,e[r+3]=Vt;return}if(ze!==Vt||Ce!==Fe||Re!==ke||Pe!==Gt){let Xt=Ce*Fe+Re*ke+Pe*Gt+ze*Vt;Xt<0&&(Fe=-Fe,ke=-ke,Gt=-Gt,Vt=-Vt,Xt=-Xt);let xt=1-Le;if(Xt<.9995){const Zt=Math.acos(Xt),wt=Math.sin(Zt);xt=Math.sin(xt*Zt)/wt,Le=Math.sin(Le*Zt)/wt,Ce=Ce*xt+Fe*Le,Re=Re*xt+ke*Le,Pe=Pe*xt+Gt*Le,ze=ze*xt+Vt*Le}else{Ce=Ce*xt+Fe*Le,Re=Re*xt+ke*Le,Pe=Pe*xt+Gt*Le,ze=ze*xt+Vt*Le;const Zt=1/Math.sqrt(Ce*Ce+Re*Re+Pe*Pe+ze*ze);Ce*=Zt,Re*=Zt,Pe*=Zt,ze*=Zt}}e[r]=Ce,e[r+1]=Re,e[r+2]=Pe,e[r+3]=ze}static multiplyQuaternionsFlat(e,r,o,V,le,fe){const Le=o[V],Ce=o[V+1],Re=o[V+2],Pe=o[V+3],ze=le[fe],Fe=le[fe+1],ke=le[fe+2],Gt=le[fe+3];return e[r]=Le*Gt+Pe*ze+Ce*ke-Re*Fe,e[r+1]=Ce*Gt+Pe*Fe+Re*ze-Le*ke,e[r+2]=Re*Gt+Pe*ke+Le*Fe-Ce*ze,e[r+3]=Pe*Gt-Le*ze-Ce*Fe-Re*ke,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,r,o,V){return this._x=e,this._y=r,this._z=o,this._w=V,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,r=!0){const o=e._x,V=e._y,le=e._z,fe=e._order,Le=Math.cos,Ce=Math.sin,Re=Le(o/2),Pe=Le(V/2),ze=Le(le/2),Fe=Ce(o/2),ke=Ce(V/2),Gt=Ce(le/2);switch(fe){case"XYZ":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"YXZ":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;case"ZXY":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"ZYX":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;case"YZX":this._x=Fe*Pe*ze+Re*ke*Gt,this._y=Re*ke*ze+Fe*Pe*Gt,this._z=Re*Pe*Gt-Fe*ke*ze,this._w=Re*Pe*ze-Fe*ke*Gt;break;case"XZY":this._x=Fe*Pe*ze-Re*ke*Gt,this._y=Re*ke*ze-Fe*Pe*Gt,this._z=Re*Pe*Gt+Fe*ke*ze,this._w=Re*Pe*ze+Fe*ke*Gt;break;default:warn("Quaternion: .setFromEuler() encountered an unknown order: "+fe)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,r){const o=r/2,V=Math.sin(o);return this._x=e.x*V,this._y=e.y*V,this._z=e.z*V,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(e){const r=e.elements,o=r[0],V=r[4],le=r[8],fe=r[1],Le=r[5],Ce=r[9],Re=r[2],Pe=r[6],ze=r[10],Fe=o+Le+ze;if(Fe>0){const ke=.5/Math.sqrt(Fe+1);this._w=.25/ke,this._x=(Pe-Ce)*ke,this._y=(le-Re)*ke,this._z=(fe-V)*ke}else if(o>Le&&o>ze){const ke=2*Math.sqrt(1+o-Le-ze);this._w=(Pe-Ce)/ke,this._x=.25*ke,this._y=(V+fe)/ke,this._z=(le+Re)/ke}else if(Le>ze){const ke=2*Math.sqrt(1+Le-o-ze);this._w=(le-Re)/ke,this._x=(V+fe)/ke,this._y=.25*ke,this._z=(Ce+Pe)/ke}else{const ke=2*Math.sqrt(1+ze-o-Le);this._w=(fe-V)/ke,this._x=(le+Re)/ke,this._y=(Ce+Pe)/ke,this._z=.25*ke}return this._onChangeCallback(),this}setFromUnitVectors(e,r){let o=e.dot(r)+1;return o<1e-8?(o=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=o):(this._x=0,this._y=-e.z,this._z=e.y,this._w=o)):(this._x=e.y*r.z-e.z*r.y,this._y=e.z*r.x-e.x*r.z,this._z=e.x*r.y-e.y*r.x,this._w=o),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp(this.dot(e),-1,1)))}rotateTowards(e,r){const o=this.angleTo(e);if(o===0)return this;const V=Math.min(1,r/o);return this.slerp(e,V),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,r){const o=e._x,V=e._y,le=e._z,fe=e._w,Le=r._x,Ce=r._y,Re=r._z,Pe=r._w;return this._x=o*Pe+fe*Le+V*Re-le*Ce,this._y=V*Pe+fe*Ce+le*Le-o*Re,this._z=le*Pe+fe*Re+o*Ce-V*Le,this._w=fe*Pe-o*Le-V*Ce-le*Re,this._onChangeCallback(),this}slerp(e,r){if(r<=0)return this;if(r>=1)return this.copy(e);let o=e._x,V=e._y,le=e._z,fe=e._w,Le=this.dot(e);Le<0&&(o=-o,V=-V,le=-le,fe=-fe,Le=-Le);let Ce=1-r;if(Le<.9995){const Re=Math.acos(Le),Pe=Math.sin(Re);Ce=Math.sin(Ce*Re)/Pe,r=Math.sin(r*Re)/Pe,this._x=this._x*Ce+o*r,this._y=this._y*Ce+V*r,this._z=this._z*Ce+le*r,this._w=this._w*Ce+fe*r,this._onChangeCallback()}else this._x=this._x*Ce+o*r,this._y=this._y*Ce+V*r,this._z=this._z*Ce+le*r,this._w=this._w*Ce+fe*r,this.normalize();return this}slerpQuaternions(e,r,o){return this.copy(e).slerp(r,o)}random(){const e=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),o=Math.random(),V=Math.sqrt(1-o),le=Math.sqrt(o);return this.set(V*Math.sin(e),V*Math.cos(e),le*Math.sin(r),le*Math.cos(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,r=0){return this._x=e[r],this._y=e[r+1],this._z=e[r+2],this._w=e[r+3],this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._w,e}fromBufferAttribute(e,r){return this._x=e.getX(r),this._y=e.getY(r),this._z=e.getZ(r),this._w=e.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(e=0,r=0,o=0){Vector3.prototype.isVector3=!0,this.x=e,this.y=r,this.z=o}set(e,r,o){return o===void 0&&(o=this.z),this.x=e,this.y=r,this.z=o,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,r){return this.x=e.x*r.x,this.y=e.y*r.y,this.z=e.z*r.z,this}applyEuler(e){return this.applyQuaternion(_quaternion$4.setFromEuler(e))}applyAxisAngle(e,r){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(e,r))}applyMatrix3(e){const r=this.x,o=this.y,V=this.z,le=e.elements;return this.x=le[0]*r+le[3]*o+le[6]*V,this.y=le[1]*r+le[4]*o+le[7]*V,this.z=le[2]*r+le[5]*o+le[8]*V,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const r=this.x,o=this.y,V=this.z,le=e.elements,fe=1/(le[3]*r+le[7]*o+le[11]*V+le[15]);return this.x=(le[0]*r+le[4]*o+le[8]*V+le[12])*fe,this.y=(le[1]*r+le[5]*o+le[9]*V+le[13])*fe,this.z=(le[2]*r+le[6]*o+le[10]*V+le[14])*fe,this}applyQuaternion(e){const r=this.x,o=this.y,V=this.z,le=e.x,fe=e.y,Le=e.z,Ce=e.w,Re=2*(fe*V-Le*o),Pe=2*(Le*r-le*V),ze=2*(le*o-fe*r);return this.x=r+Ce*Re+fe*ze-Le*Pe,this.y=o+Ce*Pe+Le*Re-le*ze,this.z=V+Ce*ze+le*Pe-fe*Re,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const r=this.x,o=this.y,V=this.z,le=e.elements;return this.x=le[0]*r+le[4]*o+le[8]*V,this.y=le[1]*r+le[5]*o+le[9]*V,this.z=le[2]*r+le[6]*o+le[10]*V,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this.z=clamp(this.z,e.z,r.z),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this.z=clamp(this.z,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this.z=e.z+(r.z-e.z)*o,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,r){const o=e.x,V=e.y,le=e.z,fe=r.x,Le=r.y,Ce=r.z;return this.x=V*Ce-le*Le,this.y=le*fe-o*Ce,this.z=o*Le-V*fe,this}projectOnVector(e){const r=e.lengthSq();if(r===0)return this.set(0,0,0);const o=e.dot(this)/r;return this.copy(e).multiplyScalar(o)}projectOnPlane(e){return _vector$c.copy(this).projectOnVector(e),this.sub(_vector$c)}reflect(e){return this.sub(_vector$c.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const r=Math.sqrt(this.lengthSq()*e.lengthSq());if(r===0)return Math.PI/2;const o=this.dot(e)/r;return Math.acos(clamp(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const r=this.x-e.x,o=this.y-e.y,V=this.z-e.z;return r*r+o*o+V*V}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,r,o){const V=Math.sin(r)*e;return this.x=V*Math.sin(o),this.y=Math.cos(r)*e,this.z=V*Math.cos(o),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,r,o){return this.x=e*Math.sin(r),this.y=o,this.z=e*Math.cos(r),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(e){const r=this.setFromMatrixColumn(e,0).length(),o=this.setFromMatrixColumn(e,1).length(),V=this.setFromMatrixColumn(e,2).length();return this.x=r,this.y=o,this.z=V,this}setFromMatrixColumn(e,r){return this.fromArray(e.elements,r*4)}setFromMatrix3Column(e,r){return this.fromArray(e.elements,r*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,r=Math.random()*2-1,o=Math.sqrt(1-r*r);return this.x=o*Math.cos(e),this.y=r,this.z=o*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const _vector$c=new Vector3,_quaternion$4=new Quaternion;class Matrix3{constructor(e,r,o,V,le,fe,Le,Ce,Re){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,r,o,V,le,fe,Le,Ce,Re)}set(e,r,o,V,le,fe,Le,Ce,Re){const Pe=this.elements;return Pe[0]=e,Pe[1]=V,Pe[2]=Le,Pe[3]=r,Pe[4]=le,Pe[5]=Ce,Pe[6]=o,Pe[7]=fe,Pe[8]=Re,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const r=this.elements,o=e.elements;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],this}extractBasis(e,r,o){return e.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const r=e.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const o=e.elements,V=r.elements,le=this.elements,fe=o[0],Le=o[3],Ce=o[6],Re=o[1],Pe=o[4],ze=o[7],Fe=o[2],ke=o[5],Gt=o[8],Vt=V[0],Xt=V[3],xt=V[6],Zt=V[1],wt=V[4],Wt=V[7],It=V[2],Nt=V[5],Ft=V[8];return le[0]=fe*Vt+Le*Zt+Ce*It,le[3]=fe*Xt+Le*wt+Ce*Nt,le[6]=fe*xt+Le*Wt+Ce*Ft,le[1]=Re*Vt+Pe*Zt+ze*It,le[4]=Re*Xt+Pe*wt+ze*Nt,le[7]=Re*xt+Pe*Wt+ze*Ft,le[2]=Fe*Vt+ke*Zt+Gt*It,le[5]=Fe*Xt+ke*wt+Gt*Nt,le[8]=Fe*xt+ke*Wt+Gt*Ft,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=e,r[4]*=e,r[7]*=e,r[2]*=e,r[5]*=e,r[8]*=e,this}determinant(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8];return r*fe*Pe-r*Le*Re-o*le*Pe+o*Le*Ce+V*le*Re-V*fe*Ce}invert(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8],ze=Pe*fe-Le*Re,Fe=Le*Ce-Pe*le,ke=Re*le-fe*Ce,Gt=r*ze+o*Fe+V*ke;if(Gt===0)return this.set(0,0,0,0,0,0,0,0,0);const Vt=1/Gt;return e[0]=ze*Vt,e[1]=(V*Re-Pe*o)*Vt,e[2]=(Le*o-V*fe)*Vt,e[3]=Fe*Vt,e[4]=(Pe*r-V*Ce)*Vt,e[5]=(V*le-Le*r)*Vt,e[6]=ke*Vt,e[7]=(o*Ce-Re*r)*Vt,e[8]=(fe*r-o*le)*Vt,this}transpose(){let e;const r=this.elements;return e=r[1],r[1]=r[3],r[3]=e,e=r[2],r[2]=r[6],r[6]=e,e=r[5],r[5]=r[7],r[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const r=this.elements;return e[0]=r[0],e[1]=r[3],e[2]=r[6],e[3]=r[1],e[4]=r[4],e[5]=r[7],e[6]=r[2],e[7]=r[5],e[8]=r[8],this}setUvTransform(e,r,o,V,le,fe,Le){const Ce=Math.cos(le),Re=Math.sin(le);return this.set(o*Ce,o*Re,-o*(Ce*fe+Re*Le)+fe+e,-V*Re,V*Ce,-V*(-Re*fe+Ce*Le)+Le+r,0,0,1),this}scale(e,r){return this.premultiply(_m3.makeScale(e,r)),this}rotate(e){return this.premultiply(_m3.makeRotation(-e)),this}translate(e,r){return this.premultiply(_m3.makeTranslation(e,r)),this}makeTranslation(e,r){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,r,0,0,1),this}makeRotation(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,-o,0,o,r,0,0,0,1),this}makeScale(e,r){return this.set(e,0,0,0,r,0,0,0,1),this}equals(e){const r=this.elements,o=e.elements;for(let V=0;V<9;V++)if(r[V]!==o[V])return!1;return!0}fromArray(e,r=0){for(let o=0;o<9;o++)this.elements[o]=e[o+r];return this}toArray(e=[],r=0){const o=this.elements;return e[r]=o[0],e[r+1]=o[1],e[r+2]=o[2],e[r+3]=o[3],e[r+4]=o[4],e[r+5]=o[5],e[r+6]=o[6],e[r+7]=o[7],e[r+8]=o[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3,LINEAR_REC709_TO_XYZ=new Matrix3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function createColorManagement(){const v={enabled:!0,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(V,le,fe){return this.enabled===!1||le===fe||!le||!fe||(this.spaces[le].transfer===SRGBTransfer&&(V.r=SRGBToLinear(V.r),V.g=SRGBToLinear(V.g),V.b=SRGBToLinear(V.b)),this.spaces[le].primaries!==this.spaces[fe].primaries&&(V.applyMatrix3(this.spaces[le].toXYZ),V.applyMatrix3(this.spaces[fe].fromXYZ)),this.spaces[fe].transfer===SRGBTransfer&&(V.r=LinearToSRGB(V.r),V.g=LinearToSRGB(V.g),V.b=LinearToSRGB(V.b))),V},workingToColorSpace:function(V,le){return this.convert(V,this.workingColorSpace,le)},colorSpaceToWorking:function(V,le){return this.convert(V,le,this.workingColorSpace)},getPrimaries:function(V){return this.spaces[V].primaries},getTransfer:function(V){return V===NoColorSpace?LinearTransfer:this.spaces[V].transfer},getToneMappingMode:function(V){return this.spaces[V].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(V,le=this.workingColorSpace){return V.fromArray(this.spaces[le].luminanceCoefficients)},define:function(V){Object.assign(this.spaces,V)},_getMatrix:function(V,le,fe){return V.copy(this.spaces[le].toXYZ).multiply(this.spaces[fe].fromXYZ)},_getDrawingBufferColorSpace:function(V){return this.spaces[V].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(V=this.workingColorSpace){return this.spaces[V].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(V,le){return warnOnce("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),v.workingToColorSpace(V,le)},toWorkingColorSpace:function(V,le){return warnOnce("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),v.colorSpaceToWorking(V,le)}},e=[.64,.33,.3,.6,.15,.06],r=[.2126,.7152,.0722],o=[.3127,.329];return v.define({[LinearSRGBColorSpace]:{primaries:e,whitePoint:o,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:r,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:e,whitePoint:o,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:r,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}}),v}const ColorManagement=createColorManagement();function SRGBToLinear(v){return v<.04045?v*.0773993808:Math.pow(v*.9478672986+.0521327014,2.4)}function LinearToSRGB(v){return v<.0031308?v*12.92:1.055*Math.pow(v,.41666)-.055}let _canvas;class ImageUtils{static getDataURL(e,r="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let o;if(e instanceof HTMLCanvasElement)o=e;else{_canvas===void 0&&(_canvas=createElementNS("canvas")),_canvas.width=e.width,_canvas.height=e.height;const V=_canvas.getContext("2d");e instanceof ImageData?V.putImageData(e,0,0):V.drawImage(e,0,0,e.width,e.height),o=_canvas}return o.toDataURL(r)}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){const r=createElementNS("canvas");r.width=e.width,r.height=e.height;const o=r.getContext("2d");o.drawImage(e,0,0,e.width,e.height);const V=o.getImageData(0,0,e.width,e.height),le=V.data;for(let fe=0;fe<le.length;fe++)le[fe]=SRGBToLinear(le[fe]/255)*255;return o.putImageData(V,0,0),r}else if(e.data){const r=e.data.slice(0);for(let o=0;o<r.length;o++)r instanceof Uint8Array||r instanceof Uint8ClampedArray?r[o]=Math.floor(SRGBToLinear(r[o]/255)*255):r[o]=SRGBToLinear(r[o]);return{data:r,width:e.width,height:e.height}}else return warn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let _sourceId=0;class Source{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:_sourceId++}),this.uuid=generateUUID(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const r=this.data;return typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement?e.set(r.videoWidth,r.videoHeight,0):typeof VideoFrame!="undefined"&&r instanceof VideoFrame?e.set(r.displayHeight,r.displayWidth,0):r!==null?e.set(r.width,r.height,r.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const o={uuid:this.uuid,url:""},V=this.data;if(V!==null){let le;if(Array.isArray(V)){le=[];for(let fe=0,Le=V.length;fe<Le;fe++)V[fe].isDataTexture?le.push(serializeImage(V[fe].image)):le.push(serializeImage(V[fe]))}else le=serializeImage(V);o.url=le}return r||(e.images[this.uuid]=o),o}}function serializeImage(v){return typeof HTMLImageElement!="undefined"&&v instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&v instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&v instanceof ImageBitmap?ImageUtils.getDataURL(v):v.data?{data:Array.from(v.data),width:v.width,height:v.height,type:v.data.constructor.name}:(warn("Texture: Unable to serialize Texture."),{})}let _textureId=0;const _tempVec3=new Vector3;class Texture extends EventDispatcher{constructor(e=Texture.DEFAULT_IMAGE,r=Texture.DEFAULT_MAPPING,o=ClampToEdgeWrapping,V=ClampToEdgeWrapping,le=LinearFilter,fe=LinearMipmapLinearFilter,Le=RGBAFormat,Ce=UnsignedByteType,Re=Texture.DEFAULT_ANISOTROPY,Pe=NoColorSpace){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:_textureId++}),this.uuid=generateUUID(),this.name="",this.source=new Source(e),this.mipmaps=[],this.mapping=r,this.channel=0,this.wrapS=o,this.wrapT=V,this.magFilter=le,this.minFilter=fe,this.anisotropy=Re,this.format=Le,this.internalFormat=null,this.type=Ce,this.offset=new Vector2(0,0),this.repeat=new Vector2(1,1),this.center=new Vector2(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Matrix3,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=Pe,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const r in e){const o=e[r];if(o===void 0){warn(`Texture.setValues(): parameter '${r}' has value of undefined.`);continue}const V=this[r];if(V===void 0){warn(`Texture.setValues(): property '${r}' does not exist.`);continue}V&&o&&V.isVector2&&o.isVector2||V&&o&&V.isVector3&&o.isVector3||V&&o&&V.isMatrix3&&o.isMatrix3?V.copy(o):this[r]=o}}toJSON(e){const r=e===void 0||typeof e=="string";if(!r&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const o={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(o.userData=this.userData),r||(e.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==UVMapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case RepeatWrapping:e.x=e.x-Math.floor(e.x);break;case ClampToEdgeWrapping:e.x=e.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case RepeatWrapping:e.y=e.y-Math.floor(e.y);break;case ClampToEdgeWrapping:e.y=e.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(e=0,r=0,o=0,V=1){Vector4.prototype.isVector4=!0,this.x=e,this.y=r,this.z=o,this.w=V}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,r,o,V){return this.x=e,this.y=r,this.z=o,this.w=V,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,r){switch(e){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,r){return this.x=e.x+r.x,this.y=e.y+r.y,this.z=e.z+r.z,this.w=e.w+r.w,this}addScaledVector(e,r){return this.x+=e.x*r,this.y+=e.y*r,this.z+=e.z*r,this.w+=e.w*r,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,r){return this.x=e.x-r.x,this.y=e.y-r.y,this.z=e.z-r.z,this.w=e.w-r.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const r=this.x,o=this.y,V=this.z,le=this.w,fe=e.elements;return this.x=fe[0]*r+fe[4]*o+fe[8]*V+fe[12]*le,this.y=fe[1]*r+fe[5]*o+fe[9]*V+fe[13]*le,this.z=fe[2]*r+fe[6]*o+fe[10]*V+fe[14]*le,this.w=fe[3]*r+fe[7]*o+fe[11]*V+fe[15]*le,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const r=Math.sqrt(1-e.w*e.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/r,this.y=e.y/r,this.z=e.z/r),this}setAxisAngleFromRotationMatrix(e){let r,o,V,le;const Ce=e.elements,Re=Ce[0],Pe=Ce[4],ze=Ce[8],Fe=Ce[1],ke=Ce[5],Gt=Ce[9],Vt=Ce[2],Xt=Ce[6],xt=Ce[10];if(Math.abs(Pe-Fe)<.01&&Math.abs(ze-Vt)<.01&&Math.abs(Gt-Xt)<.01){if(Math.abs(Pe+Fe)<.1&&Math.abs(ze+Vt)<.1&&Math.abs(Gt+Xt)<.1&&Math.abs(Re+ke+xt-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;const wt=(Re+1)/2,Wt=(ke+1)/2,It=(xt+1)/2,Nt=(Pe+Fe)/4,Ft=(ze+Vt)/4,Ht=(Gt+Xt)/4;return wt>Wt&&wt>It?wt<.01?(o=0,V=.707106781,le=.707106781):(o=Math.sqrt(wt),V=Nt/o,le=Ft/o):Wt>It?Wt<.01?(o=.707106781,V=0,le=.707106781):(V=Math.sqrt(Wt),o=Nt/V,le=Ht/V):It<.01?(o=.707106781,V=.707106781,le=0):(le=Math.sqrt(It),o=Ft/le,V=Ht/le),this.set(o,V,le,r),this}let Zt=Math.sqrt((Xt-Gt)*(Xt-Gt)+(ze-Vt)*(ze-Vt)+(Fe-Pe)*(Fe-Pe));return Math.abs(Zt)<.001&&(Zt=1),this.x=(Xt-Gt)/Zt,this.y=(ze-Vt)/Zt,this.z=(Fe-Pe)/Zt,this.w=Math.acos((Re+ke+xt-1)/2),this}setFromMatrixPosition(e){const r=e.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this.w=r[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,r){return this.x=clamp(this.x,e.x,r.x),this.y=clamp(this.y,e.y,r.y),this.z=clamp(this.z,e.z,r.z),this.w=clamp(this.w,e.w,r.w),this}clampScalar(e,r){return this.x=clamp(this.x,e,r),this.y=clamp(this.y,e,r),this.z=clamp(this.z,e,r),this.w=clamp(this.w,e,r),this}clampLength(e,r){const o=this.length();return this.divideScalar(o||1).multiplyScalar(clamp(o,e,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,r){return this.x+=(e.x-this.x)*r,this.y+=(e.y-this.y)*r,this.z+=(e.z-this.z)*r,this.w+=(e.w-this.w)*r,this}lerpVectors(e,r,o){return this.x=e.x+(r.x-e.x)*o,this.y=e.y+(r.y-e.y)*o,this.z=e.z+(r.z-e.z)*o,this.w=e.w+(r.w-e.w)*o,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,r=0){return this.x=e[r],this.y=e[r+1],this.z=e[r+2],this.w=e[r+3],this}toArray(e=[],r=0){return e[r]=this.x,e[r+1]=this.y,e[r+2]=this.z,e[r+3]=this.w,e}fromBufferAttribute(e,r){return this.x=e.getX(r),this.y=e.getY(r),this.z=e.getZ(r),this.w=e.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class RenderTarget extends EventDispatcher{constructor(e=1,r=1,o={}){super(),o=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:LinearFilter,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},o),this.isRenderTarget=!0,this.width=e,this.height=r,this.depth=o.depth,this.scissor=new Vector4(0,0,e,r),this.scissorTest=!1,this.viewport=new Vector4(0,0,e,r);const V={width:e,height:r,depth:o.depth},le=new Texture(V);this.textures=[];const fe=o.count;for(let Le=0;Le<fe;Le++)this.textures[Le]=le.clone(),this.textures[Le].isRenderTargetTexture=!0,this.textures[Le].renderTarget=this;this._setTextureOptions(o),this.depthBuffer=o.depthBuffer,this.stencilBuffer=o.stencilBuffer,this.resolveDepthBuffer=o.resolveDepthBuffer,this.resolveStencilBuffer=o.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=o.depthTexture,this.samples=o.samples,this.multiview=o.multiview}_setTextureOptions(e={}){const r={minFilter:LinearFilter,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(r.mapping=e.mapping),e.wrapS!==void 0&&(r.wrapS=e.wrapS),e.wrapT!==void 0&&(r.wrapT=e.wrapT),e.wrapR!==void 0&&(r.wrapR=e.wrapR),e.magFilter!==void 0&&(r.magFilter=e.magFilter),e.minFilter!==void 0&&(r.minFilter=e.minFilter),e.format!==void 0&&(r.format=e.format),e.type!==void 0&&(r.type=e.type),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(r.colorSpace=e.colorSpace),e.flipY!==void 0&&(r.flipY=e.flipY),e.generateMipmaps!==void 0&&(r.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(r.internalFormat=e.internalFormat);for(let o=0;o<this.textures.length;o++)this.textures[o].setValues(r)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,r,o=1){if(this.width!==e||this.height!==r||this.depth!==o){this.width=e,this.height=r,this.depth=o;for(let V=0,le=this.textures.length;V<le;V++)this.textures[V].image.width=e,this.textures[V].image.height=r,this.textures[V].image.depth=o,this.textures[V].isData3DTexture!==!0&&(this.textures[V].isArrayTexture=this.textures[V].image.depth>1);this.dispose()}this.viewport.set(0,0,e,r),this.scissor.set(0,0,e,r)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let r=0,o=e.textures.length;r<o;r++){this.textures[r]=e.textures[r].clone(),this.textures[r].isRenderTargetTexture=!0,this.textures[r].renderTarget=this;const V=Object.assign({},e.textures[r].image);this.textures[r].source=new Source(V)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(e=1,r=1,o={}){super(e,r,o),this.isWebGLRenderTarget=!0}}class DataArrayTexture extends Texture{constructor(e=null,r=1,o=1,V=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:r,height:o,depth:V},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isWebGLArrayRenderTarget=!0,this.depth=o,this.texture=new DataArrayTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Data3DTexture extends Texture{constructor(e=null,r=1,o=1,V=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:r,height:o,depth:V},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isWebGL3DRenderTarget=!0,this.depth=o,this.texture=new Data3DTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Box3{constructor(e=new Vector3(1/0,1/0,1/0),r=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromArray(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r+=3)this.expandByPoint(_vector$b.fromArray(e,r));return this}setFromBufferAttribute(e){this.makeEmpty();for(let r=0,o=e.count;r<o;r++)this.expandByPoint(_vector$b.fromBufferAttribute(e,r));return this}setFromPoints(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const o=_vector$b.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}setFromObject(e,r=!1){return this.makeEmpty(),this.expandByObject(e,r)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,r=!1){e.updateWorldMatrix(!1,!1);const o=e.geometry;if(o!==void 0){const le=o.getAttribute("position");if(r===!0&&le!==void 0&&e.isInstancedMesh!==!0)for(let fe=0,Le=le.count;fe<Le;fe++)e.isMesh===!0?e.getVertexPosition(fe,_vector$b):_vector$b.fromBufferAttribute(le,fe),_vector$b.applyMatrix4(e.matrixWorld),this.expandByPoint(_vector$b);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),_box$4.copy(e.boundingBox)):(o.boundingBox===null&&o.computeBoundingBox(),_box$4.copy(o.boundingBox)),_box$4.applyMatrix4(e.matrixWorld),this.union(_box$4)}const V=e.children;for(let le=0,fe=V.length;le<fe;le++)this.expandByObject(V[le],r);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,_vector$b),_vector$b.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let r,o;return e.normal.x>0?(r=e.normal.x*this.min.x,o=e.normal.x*this.max.x):(r=e.normal.x*this.max.x,o=e.normal.x*this.min.x),e.normal.y>0?(r+=e.normal.y*this.min.y,o+=e.normal.y*this.max.y):(r+=e.normal.y*this.max.y,o+=e.normal.y*this.min.y),e.normal.z>0?(r+=e.normal.z*this.min.z,o+=e.normal.z*this.max.z):(r+=e.normal.z*this.max.z,o+=e.normal.z*this.min.z),r<=-e.constant&&o>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$2.subVectors(e.a,_center),_v1$7.subVectors(e.b,_center),_v2$4.subVectors(e.c,_center),_f0.subVectors(_v1$7,_v0$2),_f1.subVectors(_v2$4,_v1$7),_f2.subVectors(_v0$2,_v2$4);let r=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];return!satForAxes(r,_v0$2,_v1$7,_v2$4,_extents)||(r=[1,0,0,0,1,0,0,0,1],!satForAxes(r,_v0$2,_v1$7,_v2$4,_extents))?!1:(_triangleNormal$1.crossVectors(_f0,_f1),r=[_triangleNormal$1.x,_triangleNormal$1.y,_triangleNormal$1.z],satForAxes(r,_v0$2,_v1$7,_v2$4,_extents))}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_vector$b).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(_vector$b).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_points),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$4=new Box3,_v0$2=new Vector3,_v1$7=new Vector3,_v2$4=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal$1=new Vector3,_testAxis=new Vector3;function satForAxes(v,e,r,o,V){for(let le=0,fe=v.length-3;le<=fe;le+=3){_testAxis.fromArray(v,le);const Le=V.x*Math.abs(_testAxis.x)+V.y*Math.abs(_testAxis.y)+V.z*Math.abs(_testAxis.z),Ce=e.dot(_testAxis),Re=r.dot(_testAxis),Pe=o.dot(_testAxis);if(Math.max(-Math.max(Ce,Re,Pe),Math.min(Ce,Re,Pe))>Le)return!1}return!0}const _box$3=new Box3,_v1$6=new Vector3,_v2$3=new Vector3;let Sphere$1=class{constructor(e=new Vector3,r=-1){this.isSphere=!0,this.center=e,this.radius=r}set(e,r){return this.center.copy(e),this.radius=r,this}setFromPoints(e,r){const o=this.center;r!==void 0?o.copy(r):_box$3.setFromPoints(e).getCenter(o);let V=0;for(let le=0,fe=e.length;le<fe;le++)V=Math.max(V,o.distanceToSquared(e[le]));return this.radius=Math.sqrt(V),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const r=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=r*r}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,r){const o=this.center.distanceToSquared(e);return r.copy(e),o>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_v1$6.subVectors(e,this.center);const r=_v1$6.lengthSq();if(r>this.radius*this.radius){const o=Math.sqrt(r),V=(o-this.radius)*.5;this.center.addScaledVector(_v1$6,V/o),this.radius+=V}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(_v2$3.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_v1$6.copy(e.center).add(_v2$3)),this.expandByPoint(_v1$6.copy(e.center).sub(_v2$3))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}};const _vector$a=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3;class Ray{constructor(e=new Vector3,r=new Vector3(0,0,-1)){this.origin=e,this.direction=r}set(e,r){return this.origin.copy(e),this.direction.copy(r),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,r){return r.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,_vector$a)),this}closestPointToPoint(e,r){r.subVectors(e,this.origin);const o=r.dot(this.direction);return o<0?r.copy(this.origin):r.copy(this.origin).addScaledVector(this.direction,o)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const r=_vector$a.subVectors(e,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(e):(_vector$a.copy(this.origin).addScaledVector(this.direction,r),_vector$a.distanceToSquared(e))}distanceSqToSegment(e,r,o,V){_segCenter.copy(e).add(r).multiplyScalar(.5),_segDir.copy(r).sub(e).normalize(),_diff.copy(this.origin).sub(_segCenter);const le=e.distanceTo(r)*.5,fe=-this.direction.dot(_segDir),Le=_diff.dot(this.direction),Ce=-_diff.dot(_segDir),Re=_diff.lengthSq(),Pe=Math.abs(1-fe*fe);let ze,Fe,ke,Gt;if(Pe>0)if(ze=fe*Ce-Le,Fe=fe*Le-Ce,Gt=le*Pe,ze>=0)if(Fe>=-Gt)if(Fe<=Gt){const Vt=1/Pe;ze*=Vt,Fe*=Vt,ke=ze*(ze+fe*Fe+2*Le)+Fe*(fe*ze+Fe+2*Ce)+Re}else Fe=le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;else Fe=-le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;else Fe<=-Gt?(ze=Math.max(0,-(-fe*le+Le)),Fe=ze>0?-le:Math.min(Math.max(-le,-Ce),le),ke=-ze*ze+Fe*(Fe+2*Ce)+Re):Fe<=Gt?(ze=0,Fe=Math.min(Math.max(-le,-Ce),le),ke=Fe*(Fe+2*Ce)+Re):(ze=Math.max(0,-(fe*le+Le)),Fe=ze>0?le:Math.min(Math.max(-le,-Ce),le),ke=-ze*ze+Fe*(Fe+2*Ce)+Re);else Fe=fe>0?-le:le,ze=Math.max(0,-(fe*Fe+Le)),ke=-ze*ze+Fe*(Fe+2*Ce)+Re;return o&&o.copy(this.origin).addScaledVector(this.direction,ze),V&&V.copy(_segCenter).addScaledVector(_segDir,Fe),ke}intersectSphere(e,r){_vector$a.subVectors(e.center,this.origin);const o=_vector$a.dot(this.direction),V=_vector$a.dot(_vector$a)-o*o,le=e.radius*e.radius;if(V>le)return null;const fe=Math.sqrt(le-V),Le=o-fe,Ce=o+fe;return Ce<0?null:Le<0?this.at(Ce,r):this.at(Le,r)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const r=e.normal.dot(this.direction);if(r===0)return e.distanceToPoint(this.origin)===0?0:null;const o=-(this.origin.dot(e.normal)+e.constant)/r;return o>=0?o:null}intersectPlane(e,r){const o=this.distanceToPlane(e);return o===null?null:this.at(o,r)}intersectsPlane(e){const r=e.distanceToPoint(this.origin);return r===0||e.normal.dot(this.direction)*r<0}intersectBox(e,r){let o,V,le,fe,Le,Ce;const Re=1/this.direction.x,Pe=1/this.direction.y,ze=1/this.direction.z,Fe=this.origin;return Re>=0?(o=(e.min.x-Fe.x)*Re,V=(e.max.x-Fe.x)*Re):(o=(e.max.x-Fe.x)*Re,V=(e.min.x-Fe.x)*Re),Pe>=0?(le=(e.min.y-Fe.y)*Pe,fe=(e.max.y-Fe.y)*Pe):(le=(e.max.y-Fe.y)*Pe,fe=(e.min.y-Fe.y)*Pe),o>fe||le>V||((le>o||isNaN(o))&&(o=le),(fe<V||isNaN(V))&&(V=fe),ze>=0?(Le=(e.min.z-Fe.z)*ze,Ce=(e.max.z-Fe.z)*ze):(Le=(e.max.z-Fe.z)*ze,Ce=(e.min.z-Fe.z)*ze),o>Ce||Le>V)||((Le>o||o!==o)&&(o=Le),(Ce<V||V!==V)&&(V=Ce),V<0)?null:this.at(o>=0?o:V,r)}intersectsBox(e){return this.intersectBox(e,_vector$a)!==null}intersectTriangle(e,r,o,V,le){_edge1.subVectors(r,e),_edge2.subVectors(o,e),_normal$1.crossVectors(_edge1,_edge2);let fe=this.direction.dot(_normal$1),Le;if(fe>0){if(V)return null;Le=1}else if(fe<0)Le=-1,fe=-fe;else return null;_diff.subVectors(this.origin,e);const Ce=Le*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(Ce<0)return null;const Re=Le*this.direction.dot(_edge1.cross(_diff));if(Re<0||Ce+Re>fe)return null;const Pe=-Le*_diff.dot(_normal$1);return Pe<0?null:this.at(Pe/fe,le)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt)}set(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt){const xt=this.elements;return xt[0]=e,xt[4]=r,xt[8]=o,xt[12]=V,xt[1]=le,xt[5]=fe,xt[9]=Le,xt[13]=Ce,xt[2]=Re,xt[6]=Pe,xt[10]=ze,xt[14]=Fe,xt[3]=ke,xt[7]=Gt,xt[11]=Vt,xt[15]=Xt,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Matrix4().fromArray(this.elements)}copy(e){const r=this.elements,o=e.elements;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],r[9]=o[9],r[10]=o[10],r[11]=o[11],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15],this}copyPosition(e){const r=this.elements,o=e.elements;return r[12]=o[12],r[13]=o[13],r[14]=o[14],this}setFromMatrix3(e){const r=e.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(e,r,o){return this.determinant()===0?(e.set(1,0,0),r.set(0,1,0),o.set(0,0,1),this):(e.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this)}makeBasis(e,r,o){return this.set(e.x,r.x,o.x,0,e.y,r.y,o.y,0,e.z,r.z,o.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const r=this.elements,o=e.elements,V=1/_v1$5.setFromMatrixColumn(e,0).length(),le=1/_v1$5.setFromMatrixColumn(e,1).length(),fe=1/_v1$5.setFromMatrixColumn(e,2).length();return r[0]=o[0]*V,r[1]=o[1]*V,r[2]=o[2]*V,r[3]=0,r[4]=o[4]*le,r[5]=o[5]*le,r[6]=o[6]*le,r[7]=0,r[8]=o[8]*fe,r[9]=o[9]*fe,r[10]=o[10]*fe,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(e){const r=this.elements,o=e.x,V=e.y,le=e.z,fe=Math.cos(o),Le=Math.sin(o),Ce=Math.cos(V),Re=Math.sin(V),Pe=Math.cos(le),ze=Math.sin(le);if(e.order==="XYZ"){const Fe=fe*Pe,ke=fe*ze,Gt=Le*Pe,Vt=Le*ze;r[0]=Ce*Pe,r[4]=-Ce*ze,r[8]=Re,r[1]=ke+Gt*Re,r[5]=Fe-Vt*Re,r[9]=-Le*Ce,r[2]=Vt-Fe*Re,r[6]=Gt+ke*Re,r[10]=fe*Ce}else if(e.order==="YXZ"){const Fe=Ce*Pe,ke=Ce*ze,Gt=Re*Pe,Vt=Re*ze;r[0]=Fe+Vt*Le,r[4]=Gt*Le-ke,r[8]=fe*Re,r[1]=fe*ze,r[5]=fe*Pe,r[9]=-Le,r[2]=ke*Le-Gt,r[6]=Vt+Fe*Le,r[10]=fe*Ce}else if(e.order==="ZXY"){const Fe=Ce*Pe,ke=Ce*ze,Gt=Re*Pe,Vt=Re*ze;r[0]=Fe-Vt*Le,r[4]=-fe*ze,r[8]=Gt+ke*Le,r[1]=ke+Gt*Le,r[5]=fe*Pe,r[9]=Vt-Fe*Le,r[2]=-fe*Re,r[6]=Le,r[10]=fe*Ce}else if(e.order==="ZYX"){const Fe=fe*Pe,ke=fe*ze,Gt=Le*Pe,Vt=Le*ze;r[0]=Ce*Pe,r[4]=Gt*Re-ke,r[8]=Fe*Re+Vt,r[1]=Ce*ze,r[5]=Vt*Re+Fe,r[9]=ke*Re-Gt,r[2]=-Re,r[6]=Le*Ce,r[10]=fe*Ce}else if(e.order==="YZX"){const Fe=fe*Ce,ke=fe*Re,Gt=Le*Ce,Vt=Le*Re;r[0]=Ce*Pe,r[4]=Vt-Fe*ze,r[8]=Gt*ze+ke,r[1]=ze,r[5]=fe*Pe,r[9]=-Le*Pe,r[2]=-Re*Pe,r[6]=ke*ze+Gt,r[10]=Fe-Vt*ze}else if(e.order==="XZY"){const Fe=fe*Ce,ke=fe*Re,Gt=Le*Ce,Vt=Le*Re;r[0]=Ce*Pe,r[4]=-ze,r[8]=Re*Pe,r[1]=Fe*ze+Vt,r[5]=fe*Pe,r[9]=ke*ze-Gt,r[2]=Gt*ze-ke,r[6]=Le*Pe,r[10]=Vt*ze+Fe}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(e){return this.compose(_zero,e,_one)}lookAt(e,r,o){const V=this.elements;return _z.subVectors(e,r),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(o,_z),_x.lengthSq()===0&&(Math.abs(o.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(o,_z)),_x.normalize(),_y.crossVectors(_z,_x),V[0]=_x.x,V[4]=_y.x,V[8]=_z.x,V[1]=_x.y,V[5]=_y.y,V[9]=_z.y,V[2]=_x.z,V[6]=_y.z,V[10]=_z.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,r){const o=e.elements,V=r.elements,le=this.elements,fe=o[0],Le=o[4],Ce=o[8],Re=o[12],Pe=o[1],ze=o[5],Fe=o[9],ke=o[13],Gt=o[2],Vt=o[6],Xt=o[10],xt=o[14],Zt=o[3],wt=o[7],Wt=o[11],It=o[15],Nt=V[0],Ft=V[4],Ht=V[8],Kt=V[12],Yt=V[1],jt=V[5],n0=V[9],a0=V[13],l0=V[2],s0=V[6],$t=V[10],qt=V[14],e0=V[3],o0=V[7],b0=V[11],m0=V[15];return le[0]=fe*Nt+Le*Yt+Ce*l0+Re*e0,le[4]=fe*Ft+Le*jt+Ce*s0+Re*o0,le[8]=fe*Ht+Le*n0+Ce*$t+Re*b0,le[12]=fe*Kt+Le*a0+Ce*qt+Re*m0,le[1]=Pe*Nt+ze*Yt+Fe*l0+ke*e0,le[5]=Pe*Ft+ze*jt+Fe*s0+ke*o0,le[9]=Pe*Ht+ze*n0+Fe*$t+ke*b0,le[13]=Pe*Kt+ze*a0+Fe*qt+ke*m0,le[2]=Gt*Nt+Vt*Yt+Xt*l0+xt*e0,le[6]=Gt*Ft+Vt*jt+Xt*s0+xt*o0,le[10]=Gt*Ht+Vt*n0+Xt*$t+xt*b0,le[14]=Gt*Kt+Vt*a0+Xt*qt+xt*m0,le[3]=Zt*Nt+wt*Yt+Wt*l0+It*e0,le[7]=Zt*Ft+wt*jt+Wt*s0+It*o0,le[11]=Zt*Ht+wt*n0+Wt*$t+It*b0,le[15]=Zt*Kt+wt*a0+Wt*qt+It*m0,this}multiplyScalar(e){const r=this.elements;return r[0]*=e,r[4]*=e,r[8]*=e,r[12]*=e,r[1]*=e,r[5]*=e,r[9]*=e,r[13]*=e,r[2]*=e,r[6]*=e,r[10]*=e,r[14]*=e,r[3]*=e,r[7]*=e,r[11]*=e,r[15]*=e,this}determinant(){const e=this.elements,r=e[0],o=e[4],V=e[8],le=e[12],fe=e[1],Le=e[5],Ce=e[9],Re=e[13],Pe=e[2],ze=e[6],Fe=e[10],ke=e[14],Gt=e[3],Vt=e[7],Xt=e[11],xt=e[15],Zt=Ce*ke-Re*Fe,wt=Le*ke-Re*ze,Wt=Le*Fe-Ce*ze,It=fe*ke-Re*Pe,Nt=fe*Fe-Ce*Pe,Ft=fe*ze-Le*Pe;return r*(Vt*Zt-Xt*wt+xt*Wt)-o*(Gt*Zt-Xt*It+xt*Nt)+V*(Gt*wt-Vt*It+xt*Ft)-le*(Gt*Wt-Vt*Nt+Xt*Ft)}transpose(){const e=this.elements;let r;return r=e[1],e[1]=e[4],e[4]=r,r=e[2],e[2]=e[8],e[8]=r,r=e[6],e[6]=e[9],e[9]=r,r=e[3],e[3]=e[12],e[12]=r,r=e[7],e[7]=e[13],e[13]=r,r=e[11],e[11]=e[14],e[14]=r,this}setPosition(e,r,o){const V=this.elements;return e.isVector3?(V[12]=e.x,V[13]=e.y,V[14]=e.z):(V[12]=e,V[13]=r,V[14]=o),this}invert(){const e=this.elements,r=e[0],o=e[1],V=e[2],le=e[3],fe=e[4],Le=e[5],Ce=e[6],Re=e[7],Pe=e[8],ze=e[9],Fe=e[10],ke=e[11],Gt=e[12],Vt=e[13],Xt=e[14],xt=e[15],Zt=ze*Xt*Re-Vt*Fe*Re+Vt*Ce*ke-Le*Xt*ke-ze*Ce*xt+Le*Fe*xt,wt=Gt*Fe*Re-Pe*Xt*Re-Gt*Ce*ke+fe*Xt*ke+Pe*Ce*xt-fe*Fe*xt,Wt=Pe*Vt*Re-Gt*ze*Re+Gt*Le*ke-fe*Vt*ke-Pe*Le*xt+fe*ze*xt,It=Gt*ze*Ce-Pe*Vt*Ce-Gt*Le*Fe+fe*Vt*Fe+Pe*Le*Xt-fe*ze*Xt,Nt=r*Zt+o*wt+V*Wt+le*It;if(Nt===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Ft=1/Nt;return e[0]=Zt*Ft,e[1]=(Vt*Fe*le-ze*Xt*le-Vt*V*ke+o*Xt*ke+ze*V*xt-o*Fe*xt)*Ft,e[2]=(Le*Xt*le-Vt*Ce*le+Vt*V*Re-o*Xt*Re-Le*V*xt+o*Ce*xt)*Ft,e[3]=(ze*Ce*le-Le*Fe*le-ze*V*Re+o*Fe*Re+Le*V*ke-o*Ce*ke)*Ft,e[4]=wt*Ft,e[5]=(Pe*Xt*le-Gt*Fe*le+Gt*V*ke-r*Xt*ke-Pe*V*xt+r*Fe*xt)*Ft,e[6]=(Gt*Ce*le-fe*Xt*le-Gt*V*Re+r*Xt*Re+fe*V*xt-r*Ce*xt)*Ft,e[7]=(fe*Fe*le-Pe*Ce*le+Pe*V*Re-r*Fe*Re-fe*V*ke+r*Ce*ke)*Ft,e[8]=Wt*Ft,e[9]=(Gt*ze*le-Pe*Vt*le-Gt*o*ke+r*Vt*ke+Pe*o*xt-r*ze*xt)*Ft,e[10]=(fe*Vt*le-Gt*Le*le+Gt*o*Re-r*Vt*Re-fe*o*xt+r*Le*xt)*Ft,e[11]=(Pe*Le*le-fe*ze*le-Pe*o*Re+r*ze*Re+fe*o*ke-r*Le*ke)*Ft,e[12]=It*Ft,e[13]=(Pe*Vt*V-Gt*ze*V+Gt*o*Fe-r*Vt*Fe-Pe*o*Xt+r*ze*Xt)*Ft,e[14]=(Gt*Le*V-fe*Vt*V-Gt*o*Ce+r*Vt*Ce+fe*o*Xt-r*Le*Xt)*Ft,e[15]=(fe*ze*V-Pe*Le*V+Pe*o*Ce-r*ze*Ce-fe*o*Fe+r*Le*Fe)*Ft,this}scale(e){const r=this.elements,o=e.x,V=e.y,le=e.z;return r[0]*=o,r[4]*=V,r[8]*=le,r[1]*=o,r[5]*=V,r[9]*=le,r[2]*=o,r[6]*=V,r[10]*=le,r[3]*=o,r[7]*=V,r[11]*=le,this}getMaxScaleOnAxis(){const e=this.elements,r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],V=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(r,o,V))}makeTranslation(e,r,o){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,r,0,0,1,o,0,0,0,1),this}makeRotationX(e){const r=Math.cos(e),o=Math.sin(e);return this.set(1,0,0,0,0,r,-o,0,0,o,r,0,0,0,0,1),this}makeRotationY(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,0,o,0,0,1,0,0,-o,0,r,0,0,0,0,1),this}makeRotationZ(e){const r=Math.cos(e),o=Math.sin(e);return this.set(r,-o,0,0,o,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,r){const o=Math.cos(r),V=Math.sin(r),le=1-o,fe=e.x,Le=e.y,Ce=e.z,Re=le*fe,Pe=le*Le;return this.set(Re*fe+o,Re*Le-V*Ce,Re*Ce+V*Le,0,Re*Le+V*Ce,Pe*Le+o,Pe*Ce-V*fe,0,Re*Ce-V*Le,Pe*Ce+V*fe,le*Ce*Ce+o,0,0,0,0,1),this}makeScale(e,r,o){return this.set(e,0,0,0,0,r,0,0,0,0,o,0,0,0,0,1),this}makeShear(e,r,o,V,le,fe){return this.set(1,o,le,0,e,1,fe,0,r,V,1,0,0,0,0,1),this}compose(e,r,o){const V=this.elements,le=r._x,fe=r._y,Le=r._z,Ce=r._w,Re=le+le,Pe=fe+fe,ze=Le+Le,Fe=le*Re,ke=le*Pe,Gt=le*ze,Vt=fe*Pe,Xt=fe*ze,xt=Le*ze,Zt=Ce*Re,wt=Ce*Pe,Wt=Ce*ze,It=o.x,Nt=o.y,Ft=o.z;return V[0]=(1-(Vt+xt))*It,V[1]=(ke+Wt)*It,V[2]=(Gt-wt)*It,V[3]=0,V[4]=(ke-Wt)*Nt,V[5]=(1-(Fe+xt))*Nt,V[6]=(Xt+Zt)*Nt,V[7]=0,V[8]=(Gt+wt)*Ft,V[9]=(Xt-Zt)*Ft,V[10]=(1-(Fe+Vt))*Ft,V[11]=0,V[12]=e.x,V[13]=e.y,V[14]=e.z,V[15]=1,this}decompose(e,r,o){const V=this.elements;if(e.x=V[12],e.y=V[13],e.z=V[14],this.determinant()===0)return o.set(1,1,1),r.identity(),this;let le=_v1$5.set(V[0],V[1],V[2]).length();const fe=_v1$5.set(V[4],V[5],V[6]).length(),Le=_v1$5.set(V[8],V[9],V[10]).length();this.determinant()<0&&(le=-le),_m1$2.copy(this);const Re=1/le,Pe=1/fe,ze=1/Le;return _m1$2.elements[0]*=Re,_m1$2.elements[1]*=Re,_m1$2.elements[2]*=Re,_m1$2.elements[4]*=Pe,_m1$2.elements[5]*=Pe,_m1$2.elements[6]*=Pe,_m1$2.elements[8]*=ze,_m1$2.elements[9]*=ze,_m1$2.elements[10]*=ze,r.setFromRotationMatrix(_m1$2),o.x=le,o.y=fe,o.z=Le,this}makePerspective(e,r,o,V,le,fe,Le=WebGLCoordinateSystem,Ce=!1){const Re=this.elements,Pe=2*le/(r-e),ze=2*le/(o-V),Fe=(r+e)/(r-e),ke=(o+V)/(o-V);let Gt,Vt;if(Ce)Gt=le/(fe-le),Vt=fe*le/(fe-le);else if(Le===WebGLCoordinateSystem)Gt=-(fe+le)/(fe-le),Vt=-2*fe*le/(fe-le);else if(Le===WebGPUCoordinateSystem)Gt=-fe/(fe-le),Vt=-fe*le/(fe-le);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+Le);return Re[0]=Pe,Re[4]=0,Re[8]=Fe,Re[12]=0,Re[1]=0,Re[5]=ze,Re[9]=ke,Re[13]=0,Re[2]=0,Re[6]=0,Re[10]=Gt,Re[14]=Vt,Re[3]=0,Re[7]=0,Re[11]=-1,Re[15]=0,this}makeOrthographic(e,r,o,V,le,fe,Le=WebGLCoordinateSystem,Ce=!1){const Re=this.elements,Pe=2/(r-e),ze=2/(o-V),Fe=-(r+e)/(r-e),ke=-(o+V)/(o-V);let Gt,Vt;if(Ce)Gt=1/(fe-le),Vt=fe/(fe-le);else if(Le===WebGLCoordinateSystem)Gt=-2/(fe-le),Vt=-(fe+le)/(fe-le);else if(Le===WebGPUCoordinateSystem)Gt=-1/(fe-le),Vt=-le/(fe-le);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+Le);return Re[0]=Pe,Re[4]=0,Re[8]=0,Re[12]=Fe,Re[1]=0,Re[5]=ze,Re[9]=0,Re[13]=ke,Re[2]=0,Re[6]=0,Re[10]=Gt,Re[14]=Vt,Re[3]=0,Re[7]=0,Re[11]=0,Re[15]=1,this}equals(e){const r=this.elements,o=e.elements;for(let V=0;V<16;V++)if(r[V]!==o[V])return!1;return!0}fromArray(e,r=0){for(let o=0;o<16;o++)this.elements[o]=e[o+r];return this}toArray(e=[],r=0){const o=this.elements;return e[r]=o[0],e[r+1]=o[1],e[r+2]=o[2],e[r+3]=o[3],e[r+4]=o[4],e[r+5]=o[5],e[r+6]=o[6],e[r+7]=o[7],e[r+8]=o[8],e[r+9]=o[9],e[r+10]=o[10],e[r+11]=o[11],e[r+12]=o[12],e[r+13]=o[13],e[r+14]=o[14],e[r+15]=o[15],e}}const _v1$5=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$2=new Matrix4,_quaternion$3=new Quaternion;class Euler{constructor(e=0,r=0,o=0,V=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=r,this._z=o,this._order=V}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,r,o,V=this._order){return this._x=e,this._y=r,this._z=o,this._order=V,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,r=this._order,o=!0){const V=e.elements,le=V[0],fe=V[4],Le=V[8],Ce=V[1],Re=V[5],Pe=V[9],ze=V[2],Fe=V[6],ke=V[10];switch(r){case"XYZ":this._y=Math.asin(clamp(Le,-1,1)),Math.abs(Le)<.9999999?(this._x=Math.atan2(-Pe,ke),this._z=Math.atan2(-fe,le)):(this._x=Math.atan2(Fe,Re),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp(Pe,-1,1)),Math.abs(Pe)<.9999999?(this._y=Math.atan2(Le,ke),this._z=Math.atan2(Ce,Re)):(this._y=Math.atan2(-ze,le),this._z=0);break;case"ZXY":this._x=Math.asin(clamp(Fe,-1,1)),Math.abs(Fe)<.9999999?(this._y=Math.atan2(-ze,ke),this._z=Math.atan2(-fe,Re)):(this._y=0,this._z=Math.atan2(Ce,le));break;case"ZYX":this._y=Math.asin(-clamp(ze,-1,1)),Math.abs(ze)<.9999999?(this._x=Math.atan2(Fe,ke),this._z=Math.atan2(Ce,le)):(this._x=0,this._z=Math.atan2(-fe,Re));break;case"YZX":this._z=Math.asin(clamp(Ce,-1,1)),Math.abs(Ce)<.9999999?(this._x=Math.atan2(-Pe,Re),this._y=Math.atan2(-ze,le)):(this._x=0,this._y=Math.atan2(Le,ke));break;case"XZY":this._z=Math.asin(-clamp(fe,-1,1)),Math.abs(fe)<.9999999?(this._x=Math.atan2(Fe,Re),this._y=Math.atan2(Le,le)):(this._x=Math.atan2(-Pe,ke),this._y=0);break;default:warn("Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,o===!0&&this._onChangeCallback(),this}setFromQuaternion(e,r,o){return _matrix$2.makeRotationFromQuaternion(e),this.setFromRotationMatrix(_matrix$2,r,o)}setFromVector3(e,r=this._order){return this.set(e.x,e.y,e.z,r)}reorder(e){return _quaternion$3.setFromEuler(this),this.setFromQuaternion(_quaternion$3,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],r=0){return e[r]=this._x,e[r+1]=this._y,e[r+2]=this._z,e[r+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let _object3DId=0;const _v1$4=new Vector3,_q1=new Quaternion,_m1$1$1=new Matrix4,_target=new Vector3,_position$3=new Vector3,_scale$2=new Vector3,_quaternion$2=new Quaternion,_xAxis=new Vector3(1,0,0),_yAxis=new Vector3(0,1,0),_zAxis=new Vector3(0,0,1),_addedEvent={type:"added"},_removedEvent={type:"removed"},_childaddedEvent={type:"childadded",child:null},_childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:_object3DId++}),this.uuid=generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Object3D.DEFAULT_UP.clone();const e=new Vector3,r=new Euler,o=new Quaternion,V=new Vector3(1,1,1);function le(){o.setFromEuler(r,!1)}function fe(){r.setFromQuaternion(o,void 0,!1)}r._onChange(le),o._onChange(fe),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:V},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}}),this.matrix=new Matrix4,this.matrixWorld=new Matrix4,this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Layers,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,r){this.quaternion.setFromAxisAngle(e,r)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,r){return _q1.setFromAxisAngle(e,r),this.quaternion.multiply(_q1),this}rotateOnWorldAxis(e,r){return _q1.setFromAxisAngle(e,r),this.quaternion.premultiply(_q1),this}rotateX(e){return this.rotateOnAxis(_xAxis,e)}rotateY(e){return this.rotateOnAxis(_yAxis,e)}rotateZ(e){return this.rotateOnAxis(_zAxis,e)}translateOnAxis(e,r){return _v1$4.copy(e).applyQuaternion(this.quaternion),this.position.add(_v1$4.multiplyScalar(r)),this}translateX(e){return this.translateOnAxis(_xAxis,e)}translateY(e){return this.translateOnAxis(_yAxis,e)}translateZ(e){return this.translateOnAxis(_zAxis,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(_m1$1$1.copy(this.matrixWorld).invert())}lookAt(e,r,o){e.isVector3?_target.copy(e):_target.set(e,r,o);const V=this.parent;this.updateWorldMatrix(!0,!1),_position$3.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_m1$1$1.lookAt(_position$3,_target,this.up):_m1$1$1.lookAt(_target,_position$3,this.up),this.quaternion.setFromRotationMatrix(_m1$1$1),V&&(_m1$1$1.extractRotation(V.matrixWorld),_q1.setFromRotationMatrix(_m1$1$1),this.quaternion.premultiply(_q1.invert()))}add(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return e===this?(error$1("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null):error$1("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let o=0;o<arguments.length;o++)this.remove(arguments[o]);return this}const r=this.children.indexOf(e);return r!==-1&&(e.parent=null,this.children.splice(r,1),e.dispatchEvent(_removedEvent),_childremovedEvent.child=e,this.dispatchEvent(_childremovedEvent),_childremovedEvent.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),_m1$1$1.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),_m1$1$1.multiply(e.parent.matrixWorld)),e.applyMatrix4(_m1$1$1),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(_addedEvent),_childaddedEvent.child=e,this.dispatchEvent(_childaddedEvent),_childaddedEvent.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,r){if(this[e]===r)return this;for(let o=0,V=this.children.length;o<V;o++){const fe=this.children[o].getObjectByProperty(e,r);if(fe!==void 0)return fe}}getObjectsByProperty(e,r,o=[]){this[e]===r&&o.push(this);const V=this.children;for(let le=0,fe=V.length;le<fe;le++)V[le].getObjectsByProperty(e,r,o);return o}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$3,e,_scale$2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_position$3,_quaternion$2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const r=this.matrixWorld.elements;return e.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(e){e(this);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].traverseVisible(e)}traverseAncestors(e){const r=this.parent;r!==null&&(e(r),r.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const r=this.children;for(let o=0,V=r.length;o<V;o++)r[o].updateMatrixWorld(e)}updateWorldMatrix(e,r){const o=this.parent;if(e===!0&&o!==null&&o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),r===!0){const V=this.children;for(let le=0,fe=V.length;le<fe;le++)V[le].updateWorldMatrix(!1,!0)}}toJSON(e){const r=e===void 0||typeof e=="string",o={};r&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const V={};V.uuid=this.uuid,V.type=this.type,this.name!==""&&(V.name=this.name),this.castShadow===!0&&(V.castShadow=!0),this.receiveShadow===!0&&(V.receiveShadow=!0),this.visible===!1&&(V.visible=!1),this.frustumCulled===!1&&(V.frustumCulled=!1),this.renderOrder!==0&&(V.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(V.userData=this.userData),V.layers=this.layers.mask,V.matrix=this.matrix.toArray(),V.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(V.matrixAutoUpdate=!1),this.isInstancedMesh&&(V.type="InstancedMesh",V.count=this.count,V.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(V.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(V.type="BatchedMesh",V.perObjectFrustumCulled=this.perObjectFrustumCulled,V.sortObjects=this.sortObjects,V.drawRanges=this._drawRanges,V.reservedRanges=this._reservedRanges,V.geometryInfo=this._geometryInfo.map(Le=>qi(gi({},Le),{boundingBox:Le.boundingBox?Le.boundingBox.toJSON():void 0,boundingSphere:Le.boundingSphere?Le.boundingSphere.toJSON():void 0})),V.instanceInfo=this._instanceInfo.map(Le=>gi({},Le)),V.availableInstanceIds=this._availableInstanceIds.slice(),V.availableGeometryIds=this._availableGeometryIds.slice(),V.nextIndexStart=this._nextIndexStart,V.nextVertexStart=this._nextVertexStart,V.geometryCount=this._geometryCount,V.maxInstanceCount=this._maxInstanceCount,V.maxVertexCount=this._maxVertexCount,V.maxIndexCount=this._maxIndexCount,V.geometryInitialized=this._geometryInitialized,V.matricesTexture=this._matricesTexture.toJSON(e),V.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(V.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(V.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(V.boundingBox=this.boundingBox.toJSON()));function le(Le,Ce){return Le[Ce.uuid]===void 0&&(Le[Ce.uuid]=Ce.toJSON(e)),Ce.uuid}if(this.isScene)this.background&&(this.background.isColor?V.background=this.background.toJSON():this.background.isTexture&&(V.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(V.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){V.geometry=le(e.geometries,this.geometry);const Le=this.geometry.parameters;if(Le!==void 0&&Le.shapes!==void 0){const Ce=Le.shapes;if(Array.isArray(Ce))for(let Re=0,Pe=Ce.length;Re<Pe;Re++){const ze=Ce[Re];le(e.shapes,ze)}else le(e.shapes,Ce)}}if(this.isSkinnedMesh&&(V.bindMode=this.bindMode,V.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(le(e.skeletons,this.skeleton),V.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const Le=[];for(let Ce=0,Re=this.material.length;Ce<Re;Ce++)Le.push(le(e.materials,this.material[Ce]));V.material=Le}else V.material=le(e.materials,this.material);if(this.children.length>0){V.children=[];for(let Le=0;Le<this.children.length;Le++)V.children.push(this.children[Le].toJSON(e).object)}if(this.animations.length>0){V.animations=[];for(let Le=0;Le<this.animations.length;Le++){const Ce=this.animations[Le];V.animations.push(le(e.animations,Ce))}}if(r){const Le=fe(e.geometries),Ce=fe(e.materials),Re=fe(e.textures),Pe=fe(e.images),ze=fe(e.shapes),Fe=fe(e.skeletons),ke=fe(e.animations),Gt=fe(e.nodes);Le.length>0&&(o.geometries=Le),Ce.length>0&&(o.materials=Ce),Re.length>0&&(o.textures=Re),Pe.length>0&&(o.images=Pe),ze.length>0&&(o.shapes=ze),Fe.length>0&&(o.skeletons=Fe),ke.length>0&&(o.animations=ke),Gt.length>0&&(o.nodes=Gt)}return o.object=V,o;function fe(Le){const Ce=[];for(const Re in Le){const Pe=Le[Re];delete Pe.metadata,Ce.push(Pe)}return Ce}}clone(e){return new this.constructor().copy(this,e)}copy(e,r=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),r===!0)for(let o=0;o<e.children.length;o++){const V=e.children[o];this.add(V.clone())}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=!0;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const _v0$1$1=new Vector3,_v1$3=new Vector3,_v2$2=new Vector3,_v3$2=new Vector3,_vab=new Vector3,_vac=new Vector3,_vbc=new Vector3,_vap=new Vector3,_vbp=new Vector3,_vcp=new Vector3,_v40=new Vector4,_v41=new Vector4,_v42=new Vector4;class Triangle{constructor(e=new Vector3,r=new Vector3,o=new Vector3){this.a=e,this.b=r,this.c=o}static getNormal(e,r,o,V){V.subVectors(o,r),_v0$1$1.subVectors(e,r),V.cross(_v0$1$1);const le=V.lengthSq();return le>0?V.multiplyScalar(1/Math.sqrt(le)):V.set(0,0,0)}static getBarycoord(e,r,o,V,le){_v0$1$1.subVectors(V,r),_v1$3.subVectors(o,r),_v2$2.subVectors(e,r);const fe=_v0$1$1.dot(_v0$1$1),Le=_v0$1$1.dot(_v1$3),Ce=_v0$1$1.dot(_v2$2),Re=_v1$3.dot(_v1$3),Pe=_v1$3.dot(_v2$2),ze=fe*Re-Le*Le;if(ze===0)return le.set(0,0,0),null;const Fe=1/ze,ke=(Re*Ce-Le*Pe)*Fe,Gt=(fe*Pe-Le*Ce)*Fe;return le.set(1-ke-Gt,Gt,ke)}static containsPoint(e,r,o,V){return this.getBarycoord(e,r,o,V,_v3$2)===null?!1:_v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(e,r,o,V,le,fe,Le,Ce){return this.getBarycoord(e,r,o,V,_v3$2)===null?(Ce.x=0,Ce.y=0,"z"in Ce&&(Ce.z=0),"w"in Ce&&(Ce.w=0),null):(Ce.setScalar(0),Ce.addScaledVector(le,_v3$2.x),Ce.addScaledVector(fe,_v3$2.y),Ce.addScaledVector(Le,_v3$2.z),Ce)}static getInterpolatedAttribute(e,r,o,V,le,fe){return _v40.setScalar(0),_v41.setScalar(0),_v42.setScalar(0),_v40.fromBufferAttribute(e,r),_v41.fromBufferAttribute(e,o),_v42.fromBufferAttribute(e,V),fe.setScalar(0),fe.addScaledVector(_v40,le.x),fe.addScaledVector(_v41,le.y),fe.addScaledVector(_v42,le.z),fe}static isFrontFacing(e,r,o,V){return _v0$1$1.subVectors(o,r),_v1$3.subVectors(e,r),_v0$1$1.cross(_v1$3).dot(V)<0}set(e,r,o){return this.a.copy(e),this.b.copy(r),this.c.copy(o),this}setFromPointsAndIndices(e,r,o,V){return this.a.copy(e[r]),this.b.copy(e[o]),this.c.copy(e[V]),this}setFromAttributeAndIndices(e,r,o,V){return this.a.fromBufferAttribute(e,r),this.b.fromBufferAttribute(e,o),this.c.fromBufferAttribute(e,V),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return _v0$1$1.subVectors(this.c,this.b),_v1$3.subVectors(this.a,this.b),_v0$1$1.cross(_v1$3).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Triangle.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,r){return Triangle.getBarycoord(e,this.a,this.b,this.c,r)}getInterpolation(e,r,o,V,le){return Triangle.getInterpolation(e,this.a,this.b,this.c,r,o,V,le)}containsPoint(e){return Triangle.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Triangle.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,r){const o=this.a,V=this.b,le=this.c;let fe,Le;_vab.subVectors(V,o),_vac.subVectors(le,o),_vap.subVectors(e,o);const Ce=_vab.dot(_vap),Re=_vac.dot(_vap);if(Ce<=0&&Re<=0)return r.copy(o);_vbp.subVectors(e,V);const Pe=_vab.dot(_vbp),ze=_vac.dot(_vbp);if(Pe>=0&&ze<=Pe)return r.copy(V);const Fe=Ce*ze-Pe*Re;if(Fe<=0&&Ce>=0&&Pe<=0)return fe=Ce/(Ce-Pe),r.copy(o).addScaledVector(_vab,fe);_vcp.subVectors(e,le);const ke=_vab.dot(_vcp),Gt=_vac.dot(_vcp);if(Gt>=0&&ke<=Gt)return r.copy(le);const Vt=ke*Re-Ce*Gt;if(Vt<=0&&Re>=0&&Gt<=0)return Le=Re/(Re-Gt),r.copy(o).addScaledVector(_vac,Le);const Xt=Pe*Gt-ke*ze;if(Xt<=0&&ze-Pe>=0&&ke-Gt>=0)return _vbc.subVectors(le,V),Le=(ze-Pe)/(ze-Pe+(ke-Gt)),r.copy(V).addScaledVector(_vbc,Le);const xt=1/(Xt+Vt+Fe);return fe=Vt*xt,Le=Fe*xt,r.copy(o).addScaledVector(_vab,fe).addScaledVector(_vac,Le)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const _colorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb(v,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?v+(e-v)*6*r:r<1/2?e:r<2/3?v+(e-v)*6*(2/3-r):v}let Color$1=class{constructor(e,r,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,r,o)}set(e,r,o){if(r===void 0&&o===void 0){const V=e;V&&V.isColor?this.copy(V):typeof V=="number"?this.setHex(V):typeof V=="string"&&this.setStyle(V)}else this.setRGB(e,r,o);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,r=SRGBColorSpace){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ColorManagement.colorSpaceToWorking(this,r),this}setRGB(e,r,o,V=ColorManagement.workingColorSpace){return this.r=e,this.g=r,this.b=o,ColorManagement.colorSpaceToWorking(this,V),this}setHSL(e,r,o,V=ColorManagement.workingColorSpace){if(e=euclideanModulo(e,1),r=clamp(r,0,1),o=clamp(o,0,1),r===0)this.r=this.g=this.b=o;else{const le=o<=.5?o*(1+r):o+r-o*r,fe=2*o-le;this.r=hue2rgb(fe,le,e+1/3),this.g=hue2rgb(fe,le,e),this.b=hue2rgb(fe,le,e-1/3)}return ColorManagement.colorSpaceToWorking(this,V),this}setStyle(e,r=SRGBColorSpace){function o(le){le!==void 0&&parseFloat(le)<1&&warn("Color: Alpha component of "+e+" will be ignored.")}let V;if(V=/^(\w+)\(([^\)]*)\)/.exec(e)){let le;const fe=V[1],Le=V[2];switch(fe){case"rgb":case"rgba":if(le=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setRGB(Math.min(255,parseInt(le[1],10))/255,Math.min(255,parseInt(le[2],10))/255,Math.min(255,parseInt(le[3],10))/255,r);if(le=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setRGB(Math.min(100,parseInt(le[1],10))/100,Math.min(100,parseInt(le[2],10))/100,Math.min(100,parseInt(le[3],10))/100,r);break;case"hsl":case"hsla":if(le=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Le))return o(le[4]),this.setHSL(parseFloat(le[1])/360,parseFloat(le[2])/100,parseFloat(le[3])/100,r);break;default:warn("Color: Unknown color model "+e)}}else if(V=/^\#([A-Fa-f\d]+)$/.exec(e)){const le=V[1],fe=le.length;if(fe===3)return this.setRGB(parseInt(le.charAt(0),16)/15,parseInt(le.charAt(1),16)/15,parseInt(le.charAt(2),16)/15,r);if(fe===6)return this.setHex(parseInt(le,16),r);warn("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,r);return this}setColorName(e,r=SRGBColorSpace){const o=_colorKeywords[e.toLowerCase()];return o!==void 0?this.setHex(o,r):warn("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=SRGBColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),e),Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(e=SRGBColorSpace){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,r=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),r);const o=_color.r,V=_color.g,le=_color.b,fe=Math.max(o,V,le),Le=Math.min(o,V,le);let Ce,Re;const Pe=(Le+fe)/2;if(Le===fe)Ce=0,Re=0;else{const ze=fe-Le;switch(Re=Pe<=.5?ze/(fe+Le):ze/(2-fe-Le),fe){case o:Ce=(V-le)/ze+(V<le?6:0);break;case V:Ce=(le-o)/ze+2;break;case le:Ce=(o-V)/ze+4;break}Ce/=6}return e.h=Ce,e.s=Re,e.l=Pe,e}getRGB(e,r=ColorManagement.workingColorSpace){return ColorManagement.workingToColorSpace(_color.copy(this),r),e.r=_color.r,e.g=_color.g,e.b=_color.b,e}getStyle(e=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),e);const r=_color.r,o=_color.g,V=_color.b;return e!==SRGBColorSpace?`color(${e} ${r.toFixed(3)} ${o.toFixed(3)} ${V.toFixed(3)})`:`rgb(${Math.round(r*255)},${Math.round(o*255)},${Math.round(V*255)})`}offsetHSL(e,r,o){return this.getHSL(_hslA),this.setHSL(_hslA.h+e,_hslA.s+r,_hslA.l+o)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,r){return this.r=e.r+r.r,this.g=e.g+r.g,this.b=e.b+r.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,r){return this.r+=(e.r-this.r)*r,this.g+=(e.g-this.g)*r,this.b+=(e.b-this.b)*r,this}lerpColors(e,r,o){return this.r=e.r+(r.r-e.r)*o,this.g=e.g+(r.g-e.g)*o,this.b=e.b+(r.b-e.b)*o,this}lerpHSL(e,r){this.getHSL(_hslA),e.getHSL(_hslB);const o=lerp(_hslA.h,_hslB.h,r),V=lerp(_hslA.s,_hslB.s,r),le=lerp(_hslA.l,_hslB.l,r);return this.setHSL(o,V,le),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const r=this.r,o=this.g,V=this.b,le=e.elements;return this.r=le[0]*r+le[3]*o+le[6]*V,this.g=le[1]*r+le[4]*o+le[7]*V,this.b=le[2]*r+le[5]*o+le[8]*V,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,r=0){return this.r=e[r],this.g=e[r+1],this.b=e[r+2],this}toArray(e=[],r=0){return e[r]=this.r,e[r+1]=this.g,e[r+2]=this.b,e}fromBufferAttribute(e,r){return this.r=e.getX(r),this.g=e.getY(r),this.b=e.getZ(r),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};const _color=new Color$1;Color$1.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_materialId++}),this.uuid=generateUUID(),this.name="",this.type="Material",this.blending=NormalBlending,this.side=FrontSide,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=SrcAlphaFactor,this.blendDst=OneMinusSrcAlphaFactor,this.blendEquation=AddEquation,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Color$1(0,0,0),this.blendAlpha=0,this.depthFunc=LessEqualDepth,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=AlwaysStencilFunc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=KeepStencilOp,this.stencilZFail=KeepStencilOp,this.stencilZPass=KeepStencilOp,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const r in e){const o=e[r];if(o===void 0){warn(`Material: parameter '${r}' has value of undefined.`);continue}const V=this[r];if(V===void 0){warn(`Material: '${r}' is not a property of THREE.${this.type}.`);continue}V&&V.isColor?V.set(o):V&&V.isVector3&&o&&o.isVector3?V.copy(o):this[r]=o}}toJSON(e){const r=e===void 0||typeof e=="string";r&&(e={textures:{},images:{}});const o={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.color&&this.color.isColor&&(o.color=this.color.getHex()),this.roughness!==void 0&&(o.roughness=this.roughness),this.metalness!==void 0&&(o.metalness=this.metalness),this.sheen!==void 0&&(o.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(o.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(o.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(o.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(o.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(o.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(o.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(o.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(o.shininess=this.shininess),this.clearcoat!==void 0&&(o.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(o.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(o.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(o.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(o.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,o.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(o.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(o.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(o.dispersion=this.dispersion),this.iridescence!==void 0&&(o.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(o.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(o.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(o.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(o.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(o.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(o.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(o.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(o.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(o.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(o.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(o.lightMap=this.lightMap.toJSON(e).uuid,o.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(o.aoMap=this.aoMap.toJSON(e).uuid,o.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(o.bumpMap=this.bumpMap.toJSON(e).uuid,o.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(o.normalMap=this.normalMap.toJSON(e).uuid,o.normalMapType=this.normalMapType,o.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(o.displacementMap=this.displacementMap.toJSON(e).uuid,o.displacementScale=this.displacementScale,o.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(o.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(o.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(o.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(o.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(o.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(o.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(o.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(o.combine=this.combine)),this.envMapRotation!==void 0&&(o.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(o.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(o.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(o.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(o.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(o.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(o.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(o.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(o.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(o.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(o.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(o.size=this.size),this.shadowSide!==null&&(o.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(o.sizeAttenuation=this.sizeAttenuation),this.blending!==NormalBlending&&(o.blending=this.blending),this.side!==FrontSide&&(o.side=this.side),this.vertexColors===!0&&(o.vertexColors=!0),this.opacity<1&&(o.opacity=this.opacity),this.transparent===!0&&(o.transparent=!0),this.blendSrc!==SrcAlphaFactor&&(o.blendSrc=this.blendSrc),this.blendDst!==OneMinusSrcAlphaFactor&&(o.blendDst=this.blendDst),this.blendEquation!==AddEquation&&(o.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(o.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(o.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(o.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(o.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(o.blendAlpha=this.blendAlpha),this.depthFunc!==LessEqualDepth&&(o.depthFunc=this.depthFunc),this.depthTest===!1&&(o.depthTest=this.depthTest),this.depthWrite===!1&&(o.depthWrite=this.depthWrite),this.colorWrite===!1&&(o.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(o.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==AlwaysStencilFunc&&(o.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(o.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(o.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==KeepStencilOp&&(o.stencilFail=this.stencilFail),this.stencilZFail!==KeepStencilOp&&(o.stencilZFail=this.stencilZFail),this.stencilZPass!==KeepStencilOp&&(o.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(o.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(o.rotation=this.rotation),this.polygonOffset===!0&&(o.polygonOffset=!0),this.polygonOffsetFactor!==0&&(o.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(o.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(o.linewidth=this.linewidth),this.dashSize!==void 0&&(o.dashSize=this.dashSize),this.gapSize!==void 0&&(o.gapSize=this.gapSize),this.scale!==void 0&&(o.scale=this.scale),this.dithering===!0&&(o.dithering=!0),this.alphaTest>0&&(o.alphaTest=this.alphaTest),this.alphaHash===!0&&(o.alphaHash=!0),this.alphaToCoverage===!0&&(o.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(o.premultipliedAlpha=!0),this.forceSinglePass===!0&&(o.forceSinglePass=!0),this.allowOverride===!1&&(o.allowOverride=!1),this.wireframe===!0&&(o.wireframe=!0),this.wireframeLinewidth>1&&(o.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(o.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(o.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(o.flatShading=!0),this.visible===!1&&(o.visible=!1),this.toneMapped===!1&&(o.toneMapped=!1),this.fog===!1&&(o.fog=!1),Object.keys(this.userData).length>0&&(o.userData=this.userData);function V(le){const fe=[];for(const Le in le){const Ce=le[Le];delete Ce.metadata,fe.push(Ce)}return fe}if(r){const le=V(e.textures),fe=V(e.images);le.length>0&&(o.textures=le),fe.length>0&&(o.images=fe)}return o}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const r=e.clippingPlanes;let o=null;if(r!==null){const V=r.length;o=new Array(V);for(let le=0;le!==V;++le)o[le]=r[le].clone()}return this.clippingPlanes=o,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class MeshBasicMaterial extends Material{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const _tables=_generateTables();function _generateTables(){const v=new ArrayBuffer(4),e=new Float32Array(v),r=new Uint32Array(v),o=new Uint32Array(512),V=new Uint32Array(512);for(let Ce=0;Ce<256;++Ce){const Re=Ce-127;Re<-27?(o[Ce]=0,o[Ce|256]=32768,V[Ce]=24,V[Ce|256]=24):Re<-14?(o[Ce]=1024>>-Re-14,o[Ce|256]=1024>>-Re-14|32768,V[Ce]=-Re-1,V[Ce|256]=-Re-1):Re<=15?(o[Ce]=Re+15<<10,o[Ce|256]=Re+15<<10|32768,V[Ce]=13,V[Ce|256]=13):Re<128?(o[Ce]=31744,o[Ce|256]=64512,V[Ce]=24,V[Ce|256]=24):(o[Ce]=31744,o[Ce|256]=64512,V[Ce]=13,V[Ce|256]=13)}const le=new Uint32Array(2048),fe=new Uint32Array(64),Le=new Uint32Array(64);for(let Ce=1;Ce<1024;++Ce){let Re=Ce<<13,Pe=0;for(;!(Re&8388608);)Re<<=1,Pe-=8388608;Re&=-8388609,Pe+=947912704,le[Ce]=Re|Pe}for(let Ce=1024;Ce<2048;++Ce)le[Ce]=939524096+(Ce-1024<<13);for(let Ce=1;Ce<31;++Ce)fe[Ce]=Ce<<23;fe[31]=1199570944,fe[32]=2147483648;for(let Ce=33;Ce<63;++Ce)fe[Ce]=2147483648+(Ce-32<<23);fe[63]=3347054592;for(let Ce=1;Ce<64;++Ce)Ce!==32&&(Le[Ce]=1024);return{floatView:e,uint32View:r,baseTable:o,shiftTable:V,mantissaTable:le,exponentTable:fe,offsetTable:Le}}function toHalfFloat(v){Math.abs(v)>65504&&warn("DataUtils.toHalfFloat(): Value out of range."),v=clamp(v,-65504,65504),_tables.floatView[0]=v;const e=_tables.uint32View[0],r=e>>23&511;return _tables.baseTable[r]+((e&8388607)>>_tables.shiftTable[r])}function fromHalfFloat(v){const e=v>>10;return _tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[e]+(v&1023)]+_tables.exponentTable[e],_tables.floatView[0]}class DataUtils{static toHalfFloat(e){return toHalfFloat(e)}static fromHalfFloat(e){return fromHalfFloat(e)}}const _vector$9=new Vector3,_vector2$1=new Vector2;let _id$2=0;class BufferAttribute{constructor(e,r,o=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:_id$2++}),this.name="",this.array=e,this.itemSize=r,this.count=e!==void 0?e.length/r:0,this.normalized=o,this.usage=StaticDrawUsage,this.updateRanges=[],this.gpuType=FloatType,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,r,o){e*=this.itemSize,o*=r.itemSize;for(let V=0,le=this.itemSize;V<le;V++)this.array[e+V]=r.array[o+V];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let r=0,o=this.count;r<o;r++)_vector2$1.fromBufferAttribute(this,r),_vector2$1.applyMatrix3(e),this.setXY(r,_vector2$1.x,_vector2$1.y);else if(this.itemSize===3)for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyMatrix3(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}applyMatrix4(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyMatrix4(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}applyNormalMatrix(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.applyNormalMatrix(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}transformDirection(e){for(let r=0,o=this.count;r<o;r++)_vector$9.fromBufferAttribute(this,r),_vector$9.transformDirection(e),this.setXYZ(r,_vector$9.x,_vector$9.y,_vector$9.z);return this}set(e,r=0){return this.array.set(e,r),this}getComponent(e,r){let o=this.array[e*this.itemSize+r];return this.normalized&&(o=denormalize(o,this.array)),o}setComponent(e,r,o){return this.normalized&&(o=normalize$1(o,this.array)),this.array[e*this.itemSize+r]=o,this}getX(e){let r=this.array[e*this.itemSize];return this.normalized&&(r=denormalize(r,this.array)),r}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize]=r,this}getY(e){let r=this.array[e*this.itemSize+1];return this.normalized&&(r=denormalize(r,this.array)),r}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+1]=r,this}getZ(e){let r=this.array[e*this.itemSize+2];return this.normalized&&(r=denormalize(r,this.array)),r}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+2]=r,this}getW(e){let r=this.array[e*this.itemSize+3];return this.normalized&&(r=denormalize(r,this.array)),r}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+3]=r,this}setXY(e,r,o){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.array[e+0]=r,this.array[e+1]=o,this}setXYZ(e,r,o,V){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.array[e+0]=r,this.array[e+1]=o,this.array[e+2]=V,this}setXYZW(e,r,o,V,le){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.array[e+0]=r,this.array[e+1]=o,this.array[e+2]=V,this.array[e+3]=le,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==StaticDrawUsage&&(e.usage=this.usage),e}}class Int8BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int8Array(e),r,o)}}class Uint8BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint8Array(e),r,o)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint8ClampedArray(e),r,o)}}class Int16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int16Array(e),r,o)}}class Uint16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint16Array(e),r,o)}}class Int32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Int32Array(e),r,o)}}class Uint32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint32Array(e),r,o)}}class Float16BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Uint16Array(e),r,o),this.isFloat16BufferAttribute=!0}getX(e){let r=fromHalfFloat(this.array[e*this.itemSize]);return this.normalized&&(r=denormalize(r,this.array)),r}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize]=toHalfFloat(r),this}getY(e){let r=fromHalfFloat(this.array[e*this.itemSize+1]);return this.normalized&&(r=denormalize(r,this.array)),r}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+1]=toHalfFloat(r),this}getZ(e){let r=fromHalfFloat(this.array[e*this.itemSize+2]);return this.normalized&&(r=denormalize(r,this.array)),r}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+2]=toHalfFloat(r),this}getW(e){let r=fromHalfFloat(this.array[e*this.itemSize+3]);return this.normalized&&(r=denormalize(r,this.array)),r}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.array[e*this.itemSize+3]=toHalfFloat(r),this}setXY(e,r,o){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this}setXYZ(e,r,o,V){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this.array[e+2]=toHalfFloat(V),this}setXYZW(e,r,o,V,le){return e*=this.itemSize,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.array[e+0]=toHalfFloat(r),this.array[e+1]=toHalfFloat(o),this.array[e+2]=toHalfFloat(V),this.array[e+3]=toHalfFloat(le),this}}class Float32BufferAttribute extends BufferAttribute{constructor(e,r,o){super(new Float32Array(e),r,o)}}let _id$1=0;const _m1$3=new Matrix4,_obj=new Object3D,_offset=new Vector3,_box$2=new Box3,_boxMorphTargets=new Box3,_vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:_id$1++}),this.uuid=generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(arrayNeedsUint32(e)?Uint32BufferAttribute:Uint16BufferAttribute)(e,1):this.index=e,this}setIndirect(e,r=0){return this.indirect=e,this.indirectOffset=r,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,r){return this.attributes[e]=r,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,r,o=0){this.groups.push({start:e,count:r,materialIndex:o})}clearGroups(){this.groups=[]}setDrawRange(e,r){this.drawRange.start=e,this.drawRange.count=r}applyMatrix4(e){const r=this.attributes.position;r!==void 0&&(r.applyMatrix4(e),r.needsUpdate=!0);const o=this.attributes.normal;if(o!==void 0){const le=new Matrix3().getNormalMatrix(e);o.applyNormalMatrix(le),o.needsUpdate=!0}const V=this.attributes.tangent;return V!==void 0&&(V.transformDirection(e),V.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return _m1$3.makeRotationFromQuaternion(e),this.applyMatrix4(_m1$3),this}rotateX(e){return _m1$3.makeRotationX(e),this.applyMatrix4(_m1$3),this}rotateY(e){return _m1$3.makeRotationY(e),this.applyMatrix4(_m1$3),this}rotateZ(e){return _m1$3.makeRotationZ(e),this.applyMatrix4(_m1$3),this}translate(e,r,o){return _m1$3.makeTranslation(e,r,o),this.applyMatrix4(_m1$3),this}scale(e,r,o){return _m1$3.makeScale(e,r,o),this.applyMatrix4(_m1$3),this}lookAt(e){return _obj.lookAt(e),_obj.updateMatrix(),this.applyMatrix4(_obj.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(_offset).negate(),this.translate(_offset.x,_offset.y,_offset.z),this}setFromPoints(e){const r=this.getAttribute("position");if(r===void 0){const o=[];for(let V=0,le=e.length;V<le;V++){const fe=e[V];o.push(fe.x,fe.y,fe.z||0)}this.setAttribute("position",new Float32BufferAttribute(o,3))}else{const o=Math.min(e.length,r.count);for(let V=0;V<o;V++){const le=e[V];r.setXYZ(V,le.x,le.y,le.z||0)}e.length>r.count&&warn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),r.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error$1("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),r)for(let o=0,V=r.length;o<V;o++){const le=r[o];_box$2.setFromBufferAttribute(le),this.morphTargetsRelative?(_vector$8.addVectors(this.boundingBox.min,_box$2.min),this.boundingBox.expandByPoint(_vector$8),_vector$8.addVectors(this.boundingBox.max,_box$2.max),this.boundingBox.expandByPoint(_vector$8)):(this.boundingBox.expandByPoint(_box$2.min),this.boundingBox.expandByPoint(_box$2.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&error$1('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sphere$1);const e=this.attributes.position,r=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){error$1("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Vector3,1/0);return}if(e){const o=this.boundingSphere.center;if(_box$2.setFromBufferAttribute(e),r)for(let le=0,fe=r.length;le<fe;le++){const Le=r[le];_boxMorphTargets.setFromBufferAttribute(Le),this.morphTargetsRelative?(_vector$8.addVectors(_box$2.min,_boxMorphTargets.min),_box$2.expandByPoint(_vector$8),_vector$8.addVectors(_box$2.max,_boxMorphTargets.max),_box$2.expandByPoint(_vector$8)):(_box$2.expandByPoint(_boxMorphTargets.min),_box$2.expandByPoint(_boxMorphTargets.max))}_box$2.getCenter(o);let V=0;for(let le=0,fe=e.count;le<fe;le++)_vector$8.fromBufferAttribute(e,le),V=Math.max(V,o.distanceToSquared(_vector$8));if(r)for(let le=0,fe=r.length;le<fe;le++){const Le=r[le],Ce=this.morphTargetsRelative;for(let Re=0,Pe=Le.count;Re<Pe;Re++)_vector$8.fromBufferAttribute(Le,Re),Ce&&(_offset.fromBufferAttribute(e,Re),_vector$8.add(_offset)),V=Math.max(V,o.distanceToSquared(_vector$8))}this.boundingSphere.radius=Math.sqrt(V),isNaN(this.boundingSphere.radius)&&error$1('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,r=this.attributes;if(e===null||r.position===void 0||r.normal===void 0||r.uv===void 0){error$1("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const o=r.position,V=r.normal,le=r.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*o.count),4));const fe=this.getAttribute("tangent"),Le=[],Ce=[];for(let Ht=0;Ht<o.count;Ht++)Le[Ht]=new Vector3,Ce[Ht]=new Vector3;const Re=new Vector3,Pe=new Vector3,ze=new Vector3,Fe=new Vector2,ke=new Vector2,Gt=new Vector2,Vt=new Vector3,Xt=new Vector3;function xt(Ht,Kt,Yt){Re.fromBufferAttribute(o,Ht),Pe.fromBufferAttribute(o,Kt),ze.fromBufferAttribute(o,Yt),Fe.fromBufferAttribute(le,Ht),ke.fromBufferAttribute(le,Kt),Gt.fromBufferAttribute(le,Yt),Pe.sub(Re),ze.sub(Re),ke.sub(Fe),Gt.sub(Fe);const jt=1/(ke.x*Gt.y-Gt.x*ke.y);isFinite(jt)&&(Vt.copy(Pe).multiplyScalar(Gt.y).addScaledVector(ze,-ke.y).multiplyScalar(jt),Xt.copy(ze).multiplyScalar(ke.x).addScaledVector(Pe,-Gt.x).multiplyScalar(jt),Le[Ht].add(Vt),Le[Kt].add(Vt),Le[Yt].add(Vt),Ce[Ht].add(Xt),Ce[Kt].add(Xt),Ce[Yt].add(Xt))}let Zt=this.groups;Zt.length===0&&(Zt=[{start:0,count:e.count}]);for(let Ht=0,Kt=Zt.length;Ht<Kt;++Ht){const Yt=Zt[Ht],jt=Yt.start,n0=Yt.count;for(let a0=jt,l0=jt+n0;a0<l0;a0+=3)xt(e.getX(a0+0),e.getX(a0+1),e.getX(a0+2))}const wt=new Vector3,Wt=new Vector3,It=new Vector3,Nt=new Vector3;function Ft(Ht){It.fromBufferAttribute(V,Ht),Nt.copy(It);const Kt=Le[Ht];wt.copy(Kt),wt.sub(It.multiplyScalar(It.dot(Kt))).normalize(),Wt.crossVectors(Nt,Kt);const jt=Wt.dot(Ce[Ht])<0?-1:1;fe.setXYZW(Ht,wt.x,wt.y,wt.z,jt)}for(let Ht=0,Kt=Zt.length;Ht<Kt;++Ht){const Yt=Zt[Ht],jt=Yt.start,n0=Yt.count;for(let a0=jt,l0=jt+n0;a0<l0;a0+=3)Ft(e.getX(a0+0)),Ft(e.getX(a0+1)),Ft(e.getX(a0+2))}}computeVertexNormals(){const e=this.index,r=this.getAttribute("position");if(r!==void 0){let o=this.getAttribute("normal");if(o===void 0)o=new BufferAttribute(new Float32Array(r.count*3),3),this.setAttribute("normal",o);else for(let Fe=0,ke=o.count;Fe<ke;Fe++)o.setXYZ(Fe,0,0,0);const V=new Vector3,le=new Vector3,fe=new Vector3,Le=new Vector3,Ce=new Vector3,Re=new Vector3,Pe=new Vector3,ze=new Vector3;if(e)for(let Fe=0,ke=e.count;Fe<ke;Fe+=3){const Gt=e.getX(Fe+0),Vt=e.getX(Fe+1),Xt=e.getX(Fe+2);V.fromBufferAttribute(r,Gt),le.fromBufferAttribute(r,Vt),fe.fromBufferAttribute(r,Xt),Pe.subVectors(fe,le),ze.subVectors(V,le),Pe.cross(ze),Le.fromBufferAttribute(o,Gt),Ce.fromBufferAttribute(o,Vt),Re.fromBufferAttribute(o,Xt),Le.add(Pe),Ce.add(Pe),Re.add(Pe),o.setXYZ(Gt,Le.x,Le.y,Le.z),o.setXYZ(Vt,Ce.x,Ce.y,Ce.z),o.setXYZ(Xt,Re.x,Re.y,Re.z)}else for(let Fe=0,ke=r.count;Fe<ke;Fe+=3)V.fromBufferAttribute(r,Fe+0),le.fromBufferAttribute(r,Fe+1),fe.fromBufferAttribute(r,Fe+2),Pe.subVectors(fe,le),ze.subVectors(V,le),Pe.cross(ze),o.setXYZ(Fe+0,Pe.x,Pe.y,Pe.z),o.setXYZ(Fe+1,Pe.x,Pe.y,Pe.z),o.setXYZ(Fe+2,Pe.x,Pe.y,Pe.z);this.normalizeNormals(),o.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let r=0,o=e.count;r<o;r++)_vector$8.fromBufferAttribute(e,r),_vector$8.normalize(),e.setXYZ(r,_vector$8.x,_vector$8.y,_vector$8.z)}toNonIndexed(){function e(Le,Ce){const Re=Le.array,Pe=Le.itemSize,ze=Le.normalized,Fe=new Re.constructor(Ce.length*Pe);let ke=0,Gt=0;for(let Vt=0,Xt=Ce.length;Vt<Xt;Vt++){Le.isInterleavedBufferAttribute?ke=Ce[Vt]*Le.data.stride+Le.offset:ke=Ce[Vt]*Pe;for(let xt=0;xt<Pe;xt++)Fe[Gt++]=Re[ke++]}return new BufferAttribute(Fe,Pe,ze)}if(this.index===null)return warn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const r=new BufferGeometry,o=this.index.array,V=this.attributes;for(const Le in V){const Ce=V[Le],Re=e(Ce,o);r.setAttribute(Le,Re)}const le=this.morphAttributes;for(const Le in le){const Ce=[],Re=le[Le];for(let Pe=0,ze=Re.length;Pe<ze;Pe++){const Fe=Re[Pe],ke=e(Fe,o);Ce.push(ke)}r.morphAttributes[Le]=Ce}r.morphTargetsRelative=this.morphTargetsRelative;const fe=this.groups;for(let Le=0,Ce=fe.length;Le<Ce;Le++){const Re=fe[Le];r.addGroup(Re.start,Re.count,Re.materialIndex)}return r}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const Ce=this.parameters;for(const Re in Ce)Ce[Re]!==void 0&&(e[Re]=Ce[Re]);return e}e.data={attributes:{}};const r=this.index;r!==null&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});const o=this.attributes;for(const Ce in o){const Re=o[Ce];e.data.attributes[Ce]=Re.toJSON(e.data)}const V={};let le=!1;for(const Ce in this.morphAttributes){const Re=this.morphAttributes[Ce],Pe=[];for(let ze=0,Fe=Re.length;ze<Fe;ze++){const ke=Re[ze];Pe.push(ke.toJSON(e.data))}Pe.length>0&&(V[Ce]=Pe,le=!0)}le&&(e.data.morphAttributes=V,e.data.morphTargetsRelative=this.morphTargetsRelative);const fe=this.groups;fe.length>0&&(e.data.groups=JSON.parse(JSON.stringify(fe)));const Le=this.boundingSphere;return Le!==null&&(e.data.boundingSphere=Le.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const r={};this.name=e.name;const o=e.index;o!==null&&this.setIndex(o.clone());const V=e.attributes;for(const Re in V){const Pe=V[Re];this.setAttribute(Re,Pe.clone(r))}const le=e.morphAttributes;for(const Re in le){const Pe=[],ze=le[Re];for(let Fe=0,ke=ze.length;Fe<ke;Fe++)Pe.push(ze[Fe].clone(r));this.morphAttributes[Re]=Pe}this.morphTargetsRelative=e.morphTargetsRelative;const fe=e.groups;for(let Re=0,Pe=fe.length;Re<Pe;Re++){const ze=fe[Re];this.addGroup(ze.start,ze.count,ze.materialIndex)}const Le=e.boundingBox;Le!==null&&(this.boundingBox=Le.clone());const Ce=e.boundingSphere;return Ce!==null&&(this.boundingSphere=Ce.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4,_ray$3$1=new Ray,_sphere$6=new Sphere$1,_sphereHitAt=new Vector3,_vA$1=new Vector3,_vB$1=new Vector3,_vC$1=new Vector3,_tempA=new Vector3,_morphA=new Vector3,_intersectionPoint$1=new Vector3,_intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(e=new BufferGeometry,r=new MeshBasicMaterial){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}getVertexPosition(e,r){const o=this.geometry,V=o.attributes.position,le=o.morphAttributes.position,fe=o.morphTargetsRelative;r.fromBufferAttribute(V,e);const Le=this.morphTargetInfluences;if(le&&Le){_morphA.set(0,0,0);for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=Le[Ce],ze=le[Ce];Pe!==0&&(_tempA.fromBufferAttribute(ze,e),fe?_morphA.addScaledVector(_tempA,Pe):_morphA.addScaledVector(_tempA.sub(r),Pe))}r.add(_morphA)}return r}raycast(e,r){const o=this.geometry,V=this.material,le=this.matrixWorld;V!==void 0&&(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$6.copy(o.boundingSphere),_sphere$6.applyMatrix4(le),_ray$3$1.copy(e.ray).recast(e.near),!(_sphere$6.containsPoint(_ray$3$1.origin)===!1&&(_ray$3$1.intersectSphere(_sphere$6,_sphereHitAt)===null||_ray$3$1.origin.distanceToSquared(_sphereHitAt)>Ln(e.far-e.near,2)))&&(_inverseMatrix$3.copy(le).invert(),_ray$3$1.copy(e.ray).applyMatrix4(_inverseMatrix$3),!(o.boundingBox!==null&&_ray$3$1.intersectsBox(o.boundingBox)===!1)&&this._computeIntersections(e,r,_ray$3$1)))}_computeIntersections(e,r,o){let V;const le=this.geometry,fe=this.material,Le=le.index,Ce=le.attributes.position,Re=le.attributes.uv,Pe=le.attributes.uv1,ze=le.attributes.normal,Fe=le.groups,ke=le.drawRange;if(Le!==null)if(Array.isArray(fe))for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=fe[Xt.materialIndex],Zt=Math.max(Xt.start,ke.start),wt=Math.min(Le.count,Math.min(Xt.start+Xt.count,ke.start+ke.count));for(let Wt=Zt,It=wt;Wt<It;Wt+=3){const Nt=Le.getX(Wt),Ft=Le.getX(Wt+1),Ht=Le.getX(Wt+2);V=checkGeometryIntersection(this,xt,e,o,Re,Pe,ze,Nt,Ft,Ht),V&&(V.faceIndex=Math.floor(Wt/3),V.face.materialIndex=Xt.materialIndex,r.push(V))}}else{const Gt=Math.max(0,ke.start),Vt=Math.min(Le.count,ke.start+ke.count);for(let Xt=Gt,xt=Vt;Xt<xt;Xt+=3){const Zt=Le.getX(Xt),wt=Le.getX(Xt+1),Wt=Le.getX(Xt+2);V=checkGeometryIntersection(this,fe,e,o,Re,Pe,ze,Zt,wt,Wt),V&&(V.faceIndex=Math.floor(Xt/3),r.push(V))}}else if(Ce!==void 0)if(Array.isArray(fe))for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=fe[Xt.materialIndex],Zt=Math.max(Xt.start,ke.start),wt=Math.min(Ce.count,Math.min(Xt.start+Xt.count,ke.start+ke.count));for(let Wt=Zt,It=wt;Wt<It;Wt+=3){const Nt=Wt,Ft=Wt+1,Ht=Wt+2;V=checkGeometryIntersection(this,xt,e,o,Re,Pe,ze,Nt,Ft,Ht),V&&(V.faceIndex=Math.floor(Wt/3),V.face.materialIndex=Xt.materialIndex,r.push(V))}}else{const Gt=Math.max(0,ke.start),Vt=Math.min(Ce.count,ke.start+ke.count);for(let Xt=Gt,xt=Vt;Xt<xt;Xt+=3){const Zt=Xt,wt=Xt+1,Wt=Xt+2;V=checkGeometryIntersection(this,fe,e,o,Re,Pe,ze,Zt,wt,Wt),V&&(V.faceIndex=Math.floor(Xt/3),r.push(V))}}}}function checkIntersection$1(v,e,r,o,V,le,fe,Le){let Ce;if(e.side===BackSide?Ce=o.intersectTriangle(fe,le,V,!0,Le):Ce=o.intersectTriangle(V,le,fe,e.side===FrontSide,Le),Ce===null)return null;_intersectionPointWorld.copy(Le),_intersectionPointWorld.applyMatrix4(v.matrixWorld);const Re=r.ray.origin.distanceTo(_intersectionPointWorld);return Re<r.near||Re>r.far?null:{distance:Re,point:_intersectionPointWorld.clone(),object:v}}function checkGeometryIntersection(v,e,r,o,V,le,fe,Le,Ce,Re){v.getVertexPosition(Le,_vA$1),v.getVertexPosition(Ce,_vB$1),v.getVertexPosition(Re,_vC$1);const Pe=checkIntersection$1(v,e,r,o,_vA$1,_vB$1,_vC$1,_intersectionPoint$1);if(Pe){const ze=new Vector3;Triangle.getBarycoord(_intersectionPoint$1,_vA$1,_vB$1,_vC$1,ze),V&&(Pe.uv=Triangle.getInterpolatedAttribute(V,Le,Ce,Re,ze,new Vector2)),le&&(Pe.uv1=Triangle.getInterpolatedAttribute(le,Le,Ce,Re,ze,new Vector2)),fe&&(Pe.normal=Triangle.getInterpolatedAttribute(fe,Le,Ce,Re,ze,new Vector3),Pe.normal.dot(o.direction)>0&&Pe.normal.multiplyScalar(-1));const Fe={a:Le,b:Ce,c:Re,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,Fe.normal),Pe.face=Fe,Pe.barycoord=ze}return Pe}class BoxGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=1,le=1,fe=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:r,depth:o,widthSegments:V,heightSegments:le,depthSegments:fe};const Le=this;V=Math.floor(V),le=Math.floor(le),fe=Math.floor(fe);const Ce=[],Re=[],Pe=[],ze=[];let Fe=0,ke=0;Gt("z","y","x",-1,-1,o,r,e,fe,le,0),Gt("z","y","x",1,-1,o,r,-e,fe,le,1),Gt("x","z","y",1,1,e,o,r,V,fe,2),Gt("x","z","y",1,-1,e,o,-r,V,fe,3),Gt("x","y","z",1,-1,e,r,o,V,le,4),Gt("x","y","z",-1,-1,e,r,-o,V,le,5),this.setIndex(Ce),this.setAttribute("position",new Float32BufferAttribute(Re,3)),this.setAttribute("normal",new Float32BufferAttribute(Pe,3)),this.setAttribute("uv",new Float32BufferAttribute(ze,2));function Gt(Vt,Xt,xt,Zt,wt,Wt,It,Nt,Ft,Ht,Kt){const Yt=Wt/Ft,jt=It/Ht,n0=Wt/2,a0=It/2,l0=Nt/2,s0=Ft+1,$t=Ht+1;let qt=0,e0=0;const o0=new Vector3;for(let b0=0;b0<$t;b0++){const m0=b0*jt-a0;for(let P0=0;P0<s0;P0++){const Q0=P0*Yt-n0;o0[Vt]=Q0*Zt,o0[Xt]=m0*wt,o0[xt]=l0,Re.push(o0.x,o0.y,o0.z),o0[Vt]=0,o0[Xt]=0,o0[xt]=Nt>0?1:-1,Pe.push(o0.x,o0.y,o0.z),ze.push(P0/Ft),ze.push(1-b0/Ht),qt+=1}}for(let b0=0;b0<Ht;b0++)for(let m0=0;m0<Ft;m0++){const P0=Fe+m0+s0*b0,Q0=Fe+m0+s0*(b0+1),Si=Fe+(m0+1)+s0*(b0+1),Ni=Fe+(m0+1)+s0*b0;Ce.push(P0,Q0,Ni),Ce.push(Q0,Si,Ni),e0+=6}Le.addGroup(ke,e0,Kt),ke+=e0,Fe+=qt}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new BoxGeometry(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function cloneUniforms(v){const e={};for(const r in v){e[r]={};for(const o in v[r]){const V=v[r][o];V&&(V.isColor||V.isMatrix3||V.isMatrix4||V.isVector2||V.isVector3||V.isVector4||V.isTexture||V.isQuaternion)?V.isRenderTargetTexture?(warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[r][o]=null):e[r][o]=V.clone():Array.isArray(V)?e[r][o]=V.slice():e[r][o]=V}}return e}function mergeUniforms(v){const e={};for(let r=0;r<v.length;r++){const o=cloneUniforms(v[r]);for(const V in o)e[V]=o[V]}return e}function cloneUniformsGroups(v){const e=[];for(let r=0;r<v.length;r++)e.push(v[r].clone());return e}function getUnlitUniformColorSpace(v){const e=v.getRenderTarget();return e===null?v.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex=`void main() {
|
|
7
7
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
8
8
|
}`,default_fragment=`void main() {
|
|
9
9
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
43
43
|
|
|
44
44
|
}
|
|
45
|
-
`},V=new BoxGeometry(5,5,5),le=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(o.uniforms),vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,side:BackSide,blending:NoBlending});le.uniforms.tEquirect.value=r;const fe=new Mesh(V,le),Le=r.minFilter;return r.minFilter===LinearMipmapLinearFilter&&(r.minFilter=LinearFilter),new CubeCamera(1,10,this).update(e,fe),r.minFilter=Le,fe.geometry.dispose(),fe.material.dispose(),this}clear(e,r=!0,o=!0,V=!0){const le=e.getRenderTarget();for(let fe=0;fe<6;fe++)e.setRenderTarget(this,fe),e.clear(r,o,V);e.setRenderTarget(le)}}class Group extends Object3D{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const r=this._hand;if(r)for(const o of e.hand.values())this._getHandJoint(r,o)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,r,o){let V=null,le=null,fe=null;const Le=this._targetRay,Ce=this._grip,Re=this._hand;if(e&&r.session.visibilityState!=="visible-blurred"){if(Re&&e.hand){fe=!0;for(const Vt of e.hand.values()){const Xt=r.getJointPose(Vt,o),xt=this._getHandJoint(Re,Vt);Xt!==null&&(xt.matrix.fromArray(Xt.transform.matrix),xt.matrix.decompose(xt.position,xt.rotation,xt.scale),xt.matrixWorldNeedsUpdate=!0,xt.jointRadius=Xt.radius),xt.visible=Xt!==null}const Pe=Re.joints["index-finger-tip"],ze=Re.joints["thumb-tip"],Fe=Pe.position.distanceTo(ze.position),ke=.02,Gt=.005;Re.inputState.pinching&&Fe>ke+Gt?(Re.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!Re.inputState.pinching&&Fe<=ke-Gt&&(Re.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else Ce!==null&&e.gripSpace&&(le=r.getPose(e.gripSpace,o),le!==null&&(Ce.matrix.fromArray(le.transform.matrix),Ce.matrix.decompose(Ce.position,Ce.rotation,Ce.scale),Ce.matrixWorldNeedsUpdate=!0,le.linearVelocity?(Ce.hasLinearVelocity=!0,Ce.linearVelocity.copy(le.linearVelocity)):Ce.hasLinearVelocity=!1,le.angularVelocity?(Ce.hasAngularVelocity=!0,Ce.angularVelocity.copy(le.angularVelocity)):Ce.hasAngularVelocity=!1));Le!==null&&(V=r.getPose(e.targetRaySpace,o),V===null&&le!==null&&(V=le),V!==null&&(Le.matrix.fromArray(V.transform.matrix),Le.matrix.decompose(Le.position,Le.rotation,Le.scale),Le.matrixWorldNeedsUpdate=!0,V.linearVelocity?(Le.hasLinearVelocity=!0,Le.linearVelocity.copy(V.linearVelocity)):Le.hasLinearVelocity=!1,V.angularVelocity?(Le.hasAngularVelocity=!0,Le.angularVelocity.copy(V.angularVelocity)):Le.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return Le!==null&&(Le.visible=V!==null),Ce!==null&&(Ce.visible=le!==null),Re!==null&&(Re.visible=fe!==null),this}_getHandJoint(e,r){if(e.joints[r.jointName]===void 0){const o=new Group;o.matrixAutoUpdate=!1,o.visible=!1,e.joints[r.jointName]=o,e.add(o)}return e.joints[r.jointName]}}class FogExp2{constructor(e,r=25e-5){this.isFogExp2=!0,this.name="",this.color=new Color$1(e),this.density=r}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(e,r=1,o=1e3){this.isFog=!0,this.name="",this.color=new Color$1(e),this.near=r,this.far=o}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Euler,this.environmentIntensity=1,this.environmentRotation=new Euler,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,r){return super.copy(e,r),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const r=super.toJSON(e);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(r.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(r.object.backgroundIntensity=this.backgroundIntensity),r.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(r.object.environmentIntensity=this.environmentIntensity),r.object.environmentRotation=this.environmentRotation.toArray(),r}}class InterleavedBuffer{constructor(e,r){this.isInterleavedBuffer=!0,this.array=e,this.stride=r,this.count=e!==void 0?e.length/r:0,this.usage=StaticDrawUsage,this.updateRanges=[],this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,r,o){e*=this.stride,o*=r.stride;for(let V=0,le=this.stride;V<le;V++)this.array[e+V]=r.array[o+V];return this}set(e,r=0){return this.array.set(e,r),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=generateUUID()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const r=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),o=new this.constructor(r,this.stride);return o.setUsage(this.usage),o}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=generateUUID()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$7=new Vector3;class InterleavedBufferAttribute{constructor(e,r,o,V=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=r,this.offset=o,this.normalized=V}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let r=0,o=this.data.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.applyMatrix4(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}applyNormalMatrix(e){for(let r=0,o=this.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.applyNormalMatrix(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}transformDirection(e){for(let r=0,o=this.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.transformDirection(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}getComponent(e,r){let o=this.array[e*this.data.stride+this.offset+r];return this.normalized&&(o=denormalize(o,this.array)),o}setComponent(e,r,o){return this.normalized&&(o=normalize$1(o,this.array)),this.data.array[e*this.data.stride+this.offset+r]=o,this}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset]=r,this}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+1]=r,this}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+2]=r,this}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+3]=r,this}getX(e){let r=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(r=denormalize(r,this.array)),r}getY(e){let r=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(r=denormalize(r,this.array)),r}getZ(e){let r=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(r=denormalize(r,this.array)),r}getW(e){let r=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(r=denormalize(r,this.array)),r}setXY(e,r,o){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this}setXYZ(e,r,o,V){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this.data.array[e+2]=V,this}setXYZW(e,r,o,V,le){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this.data.array[e+2]=V,this.data.array[e+3]=le,this}clone(e){if(e===void 0){log$1("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let o=0;o<this.count;o++){const V=o*this.data.stride+this.offset;for(let le=0;le<this.itemSize;le++)r.push(this.data.array[V+le])}return new BufferAttribute(new this.array.constructor(r),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new InterleavedBufferAttribute(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){log$1("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let o=0;o<this.count;o++){const V=o*this.data.stride+this.offset;for(let le=0;le<this.itemSize;le++)r.push(this.data.array[V+le])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class SpriteMaterial extends Material{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Color$1(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let _geometry$1;const _intersectPoint=new Vector3,_worldScale=new Vector3,_mvPosition=new Vector3,_alignedPosition=new Vector2,_rotatedPosition=new Vector2,_viewWorldMatrix=new Matrix4,_vA$2=new Vector3,_vB$2=new Vector3,_vC$2=new Vector3,_uvA$1=new Vector2,_uvB$1=new Vector2,_uvC$1=new Vector2;let Sprite$1=class extends Object3D{constructor(e=new SpriteMaterial){if(super(),this.isSprite=!0,this.type="Sprite",_geometry$1===void 0){_geometry$1=new BufferGeometry;const r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),o=new InterleavedBuffer(r,5);_geometry$1.setIndex([0,1,2,0,2,3]),_geometry$1.setAttribute("position",new InterleavedBufferAttribute(o,3,0,!1)),_geometry$1.setAttribute("uv",new InterleavedBufferAttribute(o,2,3,!1))}this.geometry=_geometry$1,this.material=e,this.center=new Vector2(.5,.5),this.count=1}raycast(e,r){e.camera===null&&error$1('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),_worldScale.setFromMatrixScale(this.matrixWorld),_viewWorldMatrix.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),_mvPosition.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&_worldScale.multiplyScalar(-_mvPosition.z);const o=this.material.rotation;let V,le;o!==0&&(le=Math.cos(o),V=Math.sin(o));const fe=this.center;transformVertex(_vA$2.set(-.5,-.5,0),_mvPosition,fe,_worldScale,V,le),transformVertex(_vB$2.set(.5,-.5,0),_mvPosition,fe,_worldScale,V,le),transformVertex(_vC$2.set(.5,.5,0),_mvPosition,fe,_worldScale,V,le),_uvA$1.set(0,0),_uvB$1.set(1,0),_uvC$1.set(1,1);let Le=e.ray.intersectTriangle(_vA$2,_vB$2,_vC$2,!1,_intersectPoint);if(Le===null&&(transformVertex(_vB$2.set(-.5,.5,0),_mvPosition,fe,_worldScale,V,le),_uvB$1.set(0,1),Le=e.ray.intersectTriangle(_vA$2,_vC$2,_vB$2,!1,_intersectPoint),Le===null))return;const Ce=e.ray.origin.distanceTo(_intersectPoint);Ce<e.near||Ce>e.far||r.push({distance:Ce,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA$2,_vB$2,_vC$2,_uvA$1,_uvB$1,_uvC$1,new Vector2),face:null,object:this})}copy(e,r){return super.copy(e,r),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function transformVertex(v,e,r,o,V,le){_alignedPosition.subVectors(v,r).addScalar(.5).multiply(o),V!==void 0?(_rotatedPosition.x=le*_alignedPosition.x-V*_alignedPosition.y,_rotatedPosition.y=V*_alignedPosition.x+le*_alignedPosition.y):_rotatedPosition.copy(_alignedPosition),v.copy(e),v.x+=_rotatedPosition.x,v.y+=_rotatedPosition.y,v.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3,_v2$1=new Vector3;class LOD extends Object3D{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const r=e.levels;for(let o=0,V=r.length;o<V;o++){const le=r[o];this.addLevel(le.object.clone(),le.distance,le.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,r=0,o=0){r=Math.abs(r);const V=this.levels;let le;for(le=0;le<V.length&&!(r<V[le].distance);le++);return V.splice(le,0,{distance:r,hysteresis:o,object:e}),this.add(e),this}removeLevel(e){const r=this.levels;for(let o=0;o<r.length;o++)if(r[o].distance===e){const V=r.splice(o,1);return this.remove(V[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const r=this.levels;if(r.length>0){let o,V;for(o=1,V=r.length;o<V;o++){let le=r[o].distance;if(r[o].object.visible&&(le-=le*r[o].hysteresis),e<le)break}return r[o-1].object}return null}raycast(e,r){if(this.levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const V=e.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(V).raycast(e,r)}}update(e){const r=this.levels;if(r.length>1){_v1$2.setFromMatrixPosition(e.matrixWorld),_v2$1.setFromMatrixPosition(this.matrixWorld);const o=_v1$2.distanceTo(_v2$1)/e.zoom;r[0].object.visible=!0;let V,le;for(V=1,le=r.length;V<le;V++){let fe=r[V].distance;if(r[V].object.visible&&(fe-=fe*r[V].hysteresis),o>=fe)r[V-1].object.visible=!1,r[V].object.visible=!0;else break}for(this._currentLevel=V-1;V<le;V++)r[V].object.visible=!1}}toJSON(e){const r=super.toJSON(e);this.autoUpdate===!1&&(r.object.autoUpdate=!1),r.object.levels=[];const o=this.levels;for(let V=0,le=o.length;V<le;V++){const fe=o[V];r.object.levels.push({object:fe.object.uuid,distance:fe.distance,hysteresis:fe.hysteresis})}return r}}const _basePosition=new Vector3,_skinIndex=new Vector4,_skinWeight=new Vector4,_vector3=new Vector3,_matrix4=new Matrix4,_vertex=new Vector3,_sphere$5=new Sphere$1,_inverseMatrix$2=new Matrix4,_ray$2$1=new Ray;class SkinnedMesh extends Mesh{constructor(e,r){super(e,r),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=AttachedBindMode,this.bindMatrix=new Matrix4,this.bindMatrixInverse=new Matrix4,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Box3),this.boundingBox.makeEmpty();const r=e.getAttribute("position");for(let o=0;o<r.count;o++)this.getVertexPosition(o,_vertex),this.boundingBox.expandByPoint(_vertex)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Sphere$1),this.boundingSphere.makeEmpty();const r=e.getAttribute("position");for(let o=0;o<r.count;o++)this.getVertexPosition(o,_vertex),this.boundingSphere.expandByPoint(_vertex)}copy(e,r){return super.copy(e,r),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,r){const o=this.material,V=this.matrixWorld;o!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),_sphere$5.copy(this.boundingSphere),_sphere$5.applyMatrix4(V),e.ray.intersectsSphere(_sphere$5)!==!1&&(_inverseMatrix$2.copy(V).invert(),_ray$2$1.copy(e.ray).applyMatrix4(_inverseMatrix$2),!(this.boundingBox!==null&&_ray$2$1.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,r,_ray$2$1)))}getVertexPosition(e,r){return super.getVertexPosition(e,r),this.applyBoneTransform(e,r),r}bind(e,r){this.skeleton=e,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Vector4,r=this.geometry.attributes.skinWeight;for(let o=0,V=r.count;o<V;o++){e.fromBufferAttribute(r,o);const le=1/e.manhattanLength();le!==1/0?e.multiplyScalar(le):e.set(1,0,0,0),r.setXYZW(o,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===AttachedBindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===DetachedBindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():warn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,r){const o=this.skeleton,V=this.geometry;_skinIndex.fromBufferAttribute(V.attributes.skinIndex,e),_skinWeight.fromBufferAttribute(V.attributes.skinWeight,e),_basePosition.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let le=0;le<4;le++){const fe=_skinWeight.getComponent(le);if(fe!==0){const Le=_skinIndex.getComponent(le);_matrix4.multiplyMatrices(o.bones[Le].matrixWorld,o.boneInverses[Le]),r.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),fe)}}return r.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super(),this.isBone=!0,this.type="Bone"}}class DataTexture extends Texture{constructor(e=null,r=1,o=1,V,le,fe,Le,Ce,Re=NearestFilter,Pe=NearestFilter,ze,Fe){super(null,fe,Le,Ce,Re,Pe,V,le,ze,Fe),this.isDataTexture=!0,this.image={data:e,width:r,height:o},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const _offsetMatrix=new Matrix4,_identityMatrix$1=new Matrix4;class Skeleton{constructor(e=[],r=[]){this.uuid=generateUUID(),this.bones=e.slice(0),this.boneInverses=r,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,r=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),r.length===0)this.calculateInverses();else if(e.length!==r.length){warn("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let o=0,V=this.bones.length;o<V;o++)this.boneInverses.push(new Matrix4)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,r=this.bones.length;e<r;e++){const o=new Matrix4;this.bones[e]&&o.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(o)}}pose(){for(let e=0,r=this.bones.length;e<r;e++){const o=this.bones[e];o&&o.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,r=this.bones.length;e<r;e++){const o=this.bones[e];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}}update(){const e=this.bones,r=this.boneInverses,o=this.boneMatrices,V=this.boneTexture;for(let le=0,fe=e.length;le<fe;le++){const Le=e[le]?e[le].matrixWorld:_identityMatrix$1;_offsetMatrix.multiplyMatrices(Le,r[le]),_offsetMatrix.toArray(o,le*16)}V!==null&&(V.needsUpdate=!0)}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4);r.set(this.boneMatrices);const o=new DataTexture(r,e,e,RGBAFormat,FloatType);return o.needsUpdate=!0,this.boneMatrices=r,this.boneTexture=o,this}getBoneByName(e){for(let r=0,o=this.bones.length;r<o;r++){const V=this.bones[r];if(V.name===e)return V}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,r){this.uuid=e.uuid;for(let o=0,V=e.bones.length;o<V;o++){const le=e.bones[o];let fe=r[le];fe===void 0&&(warn("Skeleton: No bone found with UUID:",le),fe=new Bone),this.bones.push(fe),this.boneInverses.push(new Matrix4().fromArray(e.boneInverses[o]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const r=this.bones,o=this.boneInverses;for(let V=0,le=r.length;V<le;V++){const fe=r[V];e.bones.push(fe.uuid);const Le=o[V];e.boneInverses.push(Le.toArray())}return e}}class InstancedBufferAttribute extends BufferAttribute{constructor(e,r,o,V=1){super(e,r,o),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=V}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const _instanceLocalMatrix=new Matrix4,_instanceWorldMatrix=new Matrix4,_instanceIntersects=[],_box3=new Box3,_identity=new Matrix4,_mesh$1=new Mesh,_sphere$4=new Sphere$1;class InstancedMesh extends Mesh{constructor(e,r,o){super(e,r),this.isInstancedMesh=!0,this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(o*16),16),this.instanceColor=null,this.morphTexture=null,this.count=o,this.boundingBox=null,this.boundingSphere=null;for(let V=0;V<o;V++)this.setMatrixAt(V,_identity)}computeBoundingBox(){const e=this.geometry,r=this.count;this.boundingBox===null&&(this.boundingBox=new Box3),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let o=0;o<r;o++)this.getMatrixAt(o,_instanceLocalMatrix),_box3.copy(e.boundingBox).applyMatrix4(_instanceLocalMatrix),this.boundingBox.union(_box3)}computeBoundingSphere(){const e=this.geometry,r=this.count;this.boundingSphere===null&&(this.boundingSphere=new Sphere$1),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let o=0;o<r;o++)this.getMatrixAt(o,_instanceLocalMatrix),_sphere$4.copy(e.boundingSphere).applyMatrix4(_instanceLocalMatrix),this.boundingSphere.union(_sphere$4)}copy(e,r){return super.copy(e,r),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,r){r.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,r){r.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,r){const o=r.morphTargetInfluences,V=this.morphTexture.source.data.data,le=o.length+1,fe=e*le+1;for(let Le=0;Le<o.length;Le++)o[Le]=V[fe+Le]}raycast(e,r){const o=this.matrixWorld,V=this.count;if(_mesh$1.geometry=this.geometry,_mesh$1.material=this.material,_mesh$1.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),_sphere$4.copy(this.boundingSphere),_sphere$4.applyMatrix4(o),e.ray.intersectsSphere(_sphere$4)!==!1))for(let le=0;le<V;le++){this.getMatrixAt(le,_instanceLocalMatrix),_instanceWorldMatrix.multiplyMatrices(o,_instanceLocalMatrix),_mesh$1.matrixWorld=_instanceWorldMatrix,_mesh$1.raycast(e,_instanceIntersects);for(let fe=0,Le=_instanceIntersects.length;fe<Le;fe++){const Ce=_instanceIntersects[fe];Ce.instanceId=le,Ce.object=this,r.push(Ce)}_instanceIntersects.length=0}}setColorAt(e,r){this.instanceColor===null&&(this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),r.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,r){r.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,r){const o=r.morphTargetInfluences,V=o.length+1;this.morphTexture===null&&(this.morphTexture=new DataTexture(new Float32Array(V*this.count),V,this.count,RedFormat,FloatType));const le=this.morphTexture.source.data.data;let fe=0;for(let Re=0;Re<o.length;Re++)fe+=o[Re];const Le=this.geometry.morphTargetsRelative?1:1-fe,Ce=V*e;le[Ce]=Le,le.set(o,Ce+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const _vector1=new Vector3,_vector2=new Vector3,_normalMatrix$1=new Matrix3;let Plane$1=class{constructor(e=new Vector3(1,0,0),r=0){this.isPlane=!0,this.normal=e,this.constant=r}set(e,r){return this.normal.copy(e),this.constant=r,this}setComponents(e,r,o,V){return this.normal.set(e,r,o),this.constant=V,this}setFromNormalAndCoplanarPoint(e,r){return this.normal.copy(e),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(e,r,o){const V=_vector1.subVectors(o,r).cross(_vector2.subVectors(e,r)).normalize();return this.setFromNormalAndCoplanarPoint(V,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,r){return r.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,r){const o=e.delta(_vector1),V=this.normal.dot(o);if(V===0)return this.distanceToPoint(e.start)===0?r.copy(e.start):null;const le=-(e.start.dot(this.normal)+this.constant)/V;return le<0||le>1?null:r.copy(e.start).addScaledVector(o,le)}intersectsLine(e){const r=this.distanceToPoint(e.start),o=this.distanceToPoint(e.end);return r<0&&o>0||o<0&&r>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,r){const o=r||_normalMatrix$1.getNormalMatrix(e),V=this.coplanarPoint(_vector1).applyMatrix4(e),le=this.normal.applyMatrix3(o).normalize();return this.constant=-V.dot(le),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const _sphere$3=new Sphere$1,_defaultSpriteCenter=new Vector2(.5,.5),_vector$6=new Vector3;class Frustum{constructor(e=new Plane$1,r=new Plane$1,o=new Plane$1,V=new Plane$1,le=new Plane$1,fe=new Plane$1){this.planes=[e,r,o,V,le,fe]}set(e,r,o,V,le,fe){const Le=this.planes;return Le[0].copy(e),Le[1].copy(r),Le[2].copy(o),Le[3].copy(V),Le[4].copy(le),Le[5].copy(fe),this}copy(e){const r=this.planes;for(let o=0;o<6;o++)r[o].copy(e.planes[o]);return this}setFromProjectionMatrix(e,r=WebGLCoordinateSystem,o=!1){const V=this.planes,le=e.elements,fe=le[0],Le=le[1],Ce=le[2],Re=le[3],Pe=le[4],ze=le[5],Fe=le[6],ke=le[7],Gt=le[8],Vt=le[9],Xt=le[10],xt=le[11],Zt=le[12],wt=le[13],Wt=le[14],It=le[15];if(V[0].setComponents(Re-fe,ke-Pe,xt-Gt,It-Zt).normalize(),V[1].setComponents(Re+fe,ke+Pe,xt+Gt,It+Zt).normalize(),V[2].setComponents(Re+Le,ke+ze,xt+Vt,It+wt).normalize(),V[3].setComponents(Re-Le,ke-ze,xt-Vt,It-wt).normalize(),o)V[4].setComponents(Ce,Fe,Xt,Wt).normalize(),V[5].setComponents(Re-Ce,ke-Fe,xt-Xt,It-Wt).normalize();else if(V[4].setComponents(Re-Ce,ke-Fe,xt-Xt,It-Wt).normalize(),r===WebGLCoordinateSystem)V[5].setComponents(Re+Ce,ke+Fe,xt+Xt,It+Wt).normalize();else if(r===WebGPUCoordinateSystem)V[5].setComponents(Ce,Fe,Xt,Wt).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+r);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),_sphere$3.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const r=e.geometry;r.boundingSphere===null&&r.computeBoundingSphere(),_sphere$3.copy(r.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(e){_sphere$3.center.set(0,0,0);const r=_defaultSpriteCenter.distanceTo(e.center);return _sphere$3.radius=.7071067811865476+r,_sphere$3.applyMatrix4(e.matrixWorld),this.intersectsSphere(_sphere$3)}intersectsSphere(e){const r=this.planes,o=e.center,V=-e.radius;for(let le=0;le<6;le++)if(r[le].distanceToPoint(o)<V)return!1;return!0}intersectsBox(e){const r=this.planes;for(let o=0;o<6;o++){const V=r[o];if(_vector$6.x=V.normal.x>0?e.max.x:e.min.x,_vector$6.y=V.normal.y>0?e.max.y:e.min.y,_vector$6.z=V.normal.z>0?e.max.z:e.min.z,V.distanceToPoint(_vector$6)<0)return!1}return!0}containsPoint(e){const r=this.planes;for(let o=0;o<6;o++)if(r[o].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const _projScreenMatrix$1=new Matrix4,_frustum$1=new Frustum;class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(e,r){if(!r.isArrayCamera||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsObject(e))return!0}return!1}intersectsSprite(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsSprite(e))return!0}return!1}intersectsSphere(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsSphere(e))return!0}return!1}intersectsBox(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsBox(e))return!0}return!1}containsPoint(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.containsPoint(e))return!0}return!1}clone(){return new FrustumArray}}function ascIdSort(v,e){return v-e}function sortOpaque(v,e){return v.z-e.z}function sortTransparent(v,e){return e.z-v.z}class MultiDrawRenderList{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,r,o,V){const le=this.pool,fe=this.list;this.index>=le.length&&le.push({start:-1,count:-1,z:-1,index:-1});const Le=le[this.index];fe.push(Le),this.index++,Le.start=e,Le.count=r,Le.z=o,Le.index=V}reset(){this.list.length=0,this.index=0}}const _matrix$1$1=new Matrix4,_whiteColor=new Color$1(1,1,1),_frustum=new Frustum,_frustumArray=new FrustumArray,_box$1$1=new Box3,_sphere$2=new Sphere$1,_vector$5=new Vector3,_forward$1=new Vector3,_temp=new Vector3,_renderList=new MultiDrawRenderList,_mesh=new Mesh,_batchIntersects=[];function copyAttributeData(v,e,r=0){const o=e.itemSize;if(v.isInterleavedBufferAttribute||v.array.constructor!==e.array.constructor){const V=v.count;for(let le=0;le<V;le++)for(let fe=0;fe<o;fe++)e.setComponent(le+r,fe,v.getComponent(le,fe))}else e.array.set(v.array,r*o);e.needsUpdate=!0}function copyArrayContents(v,e){if(v.constructor!==e.constructor){const r=Math.min(v.length,e.length);for(let o=0;o<r;o++)e[o]=v[o]}else{const r=Math.min(v.length,e.length);e.set(new v.constructor(v.buffer,0,r))}}class BatchedMesh extends Mesh{constructor(e,r,o=r*2,V){super(new BufferGeometry,V),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=r,this._maxIndexCount=o,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4),o=new DataTexture(r,e,e,RGBAFormat,FloatType);this._matricesTexture=o}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Uint32Array(e*e),o=new DataTexture(r,e,e,RedIntegerFormat,UnsignedIntType);this._indirectTexture=o}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Float32Array(e*e*4).fill(1),o=new DataTexture(r,e,e,RGBAFormat,FloatType);o.colorSpace=ColorManagement.workingColorSpace,this._colorsTexture=o}_initializeGeometry(e){const r=this.geometry,o=this._maxVertexCount,V=this._maxIndexCount;if(this._geometryInitialized===!1){for(const le in e.attributes){const fe=e.getAttribute(le),{array:Le,itemSize:Ce,normalized:Re}=fe,Pe=new Le.constructor(o*Ce),ze=new BufferAttribute(Pe,Ce,Re);r.setAttribute(le,ze)}if(e.getIndex()!==null){const le=o>65535?new Uint32Array(V):new Uint16Array(V);r.setIndex(new BufferAttribute(le,1))}this._geometryInitialized=!0}}_validateGeometry(e){const r=this.geometry;if(!!e.getIndex()!=!!r.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const o in r.attributes){if(!e.hasAttribute(o))throw new Error(`THREE.BatchedMesh: Added geometry missing "${o}". All geometries must have consistent attributes.`);const V=e.getAttribute(o),le=r.getAttribute(o);if(V.itemSize!==le.itemSize||V.normalized!==le.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const r=this._instanceInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const r=this._geometryInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);const e=this.boundingBox,r=this._instanceInfo;e.makeEmpty();for(let o=0,V=r.length;o<V;o++){if(r[o].active===!1)continue;const le=r[o].geometryIndex;this.getMatrixAt(o,_matrix$1$1),this.getBoundingBoxAt(le,_box$1$1).applyMatrix4(_matrix$1$1),e.union(_box$1$1)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sphere$1);const e=this.boundingSphere,r=this._instanceInfo;e.makeEmpty();for(let o=0,V=r.length;o<V;o++){if(r[o].active===!1)continue;const le=r[o].geometryIndex;this.getMatrixAt(o,_matrix$1$1),this.getBoundingSphereAt(le,_sphere$2).applyMatrix4(_matrix$1$1),e.union(_sphere$2)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const o={visible:!0,active:!0,geometryIndex:e};let V=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ascIdSort),V=this._availableInstanceIds.shift(),this._instanceInfo[V]=o):(V=this._instanceInfo.length,this._instanceInfo.push(o));const le=this._matricesTexture;_matrix$1$1.identity().toArray(le.image.data,V*16),le.needsUpdate=!0;const fe=this._colorsTexture;return fe&&(_whiteColor.toArray(fe.image.data,V*4),fe.needsUpdate=!0),this._visibilityChanged=!0,V}addGeometry(e,r=-1,o=-1){this._initializeGeometry(e),this._validateGeometry(e);const V={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},le=this._geometryInfo;V.vertexStart=this._nextVertexStart,V.reservedVertexCount=r===-1?e.getAttribute("position").count:r;const fe=e.getIndex();if(fe!==null&&(V.indexStart=this._nextIndexStart,V.reservedIndexCount=o===-1?fe.count:o),V.indexStart!==-1&&V.indexStart+V.reservedIndexCount>this._maxIndexCount||V.vertexStart+V.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let Ce;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ascIdSort),Ce=this._availableGeometryIds.shift(),le[Ce]=V):(Ce=this._geometryCount,this._geometryCount++,le.push(V)),this.setGeometryAt(Ce,e),this._nextIndexStart=V.indexStart+V.reservedIndexCount,this._nextVertexStart=V.vertexStart+V.reservedVertexCount,Ce}setGeometryAt(e,r){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(r);const o=this.geometry,V=o.getIndex()!==null,le=o.getIndex(),fe=r.getIndex(),Le=this._geometryInfo[e];if(V&&fe.count>Le.reservedIndexCount||r.attributes.position.count>Le.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const Ce=Le.vertexStart,Re=Le.reservedVertexCount;Le.vertexCount=r.getAttribute("position").count;for(const Pe in o.attributes){const ze=r.getAttribute(Pe),Fe=o.getAttribute(Pe);copyAttributeData(ze,Fe,Ce);const ke=ze.itemSize;for(let Gt=ze.count,Vt=Re;Gt<Vt;Gt++){const Xt=Ce+Gt;for(let xt=0;xt<ke;xt++)Fe.setComponent(Xt,xt,0)}Fe.needsUpdate=!0,Fe.addUpdateRange(Ce*ke,Re*ke)}if(V){const Pe=Le.indexStart,ze=Le.reservedIndexCount;Le.indexCount=r.getIndex().count;for(let Fe=0;Fe<fe.count;Fe++)le.setX(Pe+Fe,Ce+fe.getX(Fe));for(let Fe=fe.count,ke=ze;Fe<ke;Fe++)le.setX(Pe+Fe,Ce);le.needsUpdate=!0,le.addUpdateRange(Pe,Le.reservedIndexCount)}return Le.start=V?Le.indexStart:Le.vertexStart,Le.count=V?Le.indexCount:Le.vertexCount,Le.boundingBox=null,r.boundingBox!==null&&(Le.boundingBox=r.boundingBox.clone()),Le.boundingSphere=null,r.boundingSphere!==null&&(Le.boundingSphere=r.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const r=this._geometryInfo;if(e>=r.length||r[e].active===!1)return this;const o=this._instanceInfo;for(let V=0,le=o.length;V<le;V++)o[V].active&&o[V].geometryIndex===e&&this.deleteInstance(V);return r[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,r=0;const o=this._geometryInfo,V=o.map((fe,Le)=>Le).sort((fe,Le)=>o[fe].vertexStart-o[Le].vertexStart),le=this.geometry;for(let fe=0,Le=o.length;fe<Le;fe++){const Ce=V[fe],Re=o[Ce];if(Re.active!==!1){if(le.index!==null){if(Re.indexStart!==r){const{indexStart:Pe,vertexStart:ze,reservedIndexCount:Fe}=Re,ke=le.index,Gt=ke.array,Vt=e-ze;for(let Xt=Pe;Xt<Pe+Fe;Xt++)Gt[Xt]=Gt[Xt]+Vt;ke.array.copyWithin(r,Pe,Pe+Fe),ke.addUpdateRange(r,Fe),ke.needsUpdate=!0,Re.indexStart=r}r+=Re.reservedIndexCount}if(Re.vertexStart!==e){const{vertexStart:Pe,reservedVertexCount:ze}=Re,Fe=le.attributes;for(const ke in Fe){const Gt=Fe[ke],{array:Vt,itemSize:Xt}=Gt;Vt.copyWithin(e*Xt,Pe*Xt,(Pe+ze)*Xt),Gt.addUpdateRange(e*Xt,ze*Xt),Gt.needsUpdate=!0}Re.vertexStart=e}e+=Re.reservedVertexCount,Re.start=le.index?Re.indexStart:Re.vertexStart,this._nextIndexStart=le.index?Re.indexStart+Re.reservedIndexCount:0,this._nextVertexStart=Re.vertexStart+Re.reservedVertexCount}}return this._visibilityChanged=!0,this}getBoundingBoxAt(e,r){if(e>=this._geometryCount)return null;const o=this.geometry,V=this._geometryInfo[e];if(V.boundingBox===null){const le=new Box3,fe=o.index,Le=o.attributes.position;for(let Ce=V.start,Re=V.start+V.count;Ce<Re;Ce++){let Pe=Ce;fe&&(Pe=fe.getX(Pe)),le.expandByPoint(_vector$5.fromBufferAttribute(Le,Pe))}V.boundingBox=le}return r.copy(V.boundingBox),r}getBoundingSphereAt(e,r){if(e>=this._geometryCount)return null;const o=this.geometry,V=this._geometryInfo[e];if(V.boundingSphere===null){const le=new Sphere$1;this.getBoundingBoxAt(e,_box$1$1),_box$1$1.getCenter(le.center);const fe=o.index,Le=o.attributes.position;let Ce=0;for(let Re=V.start,Pe=V.start+V.count;Re<Pe;Re++){let ze=Re;fe&&(ze=fe.getX(ze)),_vector$5.fromBufferAttribute(Le,ze),Ce=Math.max(Ce,le.center.distanceToSquared(_vector$5))}le.radius=Math.sqrt(Ce),V.boundingSphere=le}return r.copy(V.boundingSphere),r}setMatrixAt(e,r){this.validateInstanceId(e);const o=this._matricesTexture,V=this._matricesTexture.image.data;return r.toArray(V,e*16),o.needsUpdate=!0,this}getMatrixAt(e,r){return this.validateInstanceId(e),r.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,r){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),r.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,r){return this.validateInstanceId(e),r.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,r){return this.validateInstanceId(e),this._instanceInfo[e].visible===r?this:(this._instanceInfo[e].visible=r,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,r){return this.validateInstanceId(e),this.validateGeometryId(r),this._instanceInfo[e].geometryIndex=r,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,r={}){this.validateGeometryId(e);const o=this._geometryInfo[e];return r.vertexStart=o.vertexStart,r.vertexCount=o.vertexCount,r.reservedVertexCount=o.reservedVertexCount,r.indexStart=o.indexStart,r.indexCount=o.indexCount,r.reservedIndexCount=o.reservedIndexCount,r.start=o.start,r.count=o.count,r}setInstanceCount(e){const r=this._availableInstanceIds,o=this._instanceInfo;for(r.sort(ascIdSort);r[r.length-1]===o.length-1;)o.pop(),r.pop();if(e<o.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const V=new Int32Array(e),le=new Int32Array(e);copyArrayContents(this._multiDrawCounts,V),copyArrayContents(this._multiDrawStarts,le),this._multiDrawCounts=V,this._multiDrawStarts=le,this._maxInstanceCount=e;const fe=this._indirectTexture,Le=this._matricesTexture,Ce=this._colorsTexture;fe.dispose(),this._initIndirectTexture(),copyArrayContents(fe.image.data,this._indirectTexture.image.data),Le.dispose(),this._initMatricesTexture(),copyArrayContents(Le.image.data,this._matricesTexture.image.data),Ce&&(Ce.dispose(),this._initColorsTexture(),copyArrayContents(Ce.image.data,this._colorsTexture.image.data))}setGeometrySize(e,r){const o=[...this._geometryInfo].filter(Le=>Le.active);if(Math.max(...o.map(Le=>Le.vertexStart+Le.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${r}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...o.map(Ce=>Ce.indexStart+Ce.reservedIndexCount))>r)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${r}. Cannot shrink further.`);const le=this.geometry;le.dispose(),this._maxVertexCount=e,this._maxIndexCount=r,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new BufferGeometry,this._initializeGeometry(le));const fe=this.geometry;le.index&©ArrayContents(le.index.array,fe.index.array);for(const Le in le.attributes)copyArrayContents(le.attributes[Le].array,fe.attributes[Le].array)}raycast(e,r){const o=this._instanceInfo,V=this._geometryInfo,le=this.matrixWorld,fe=this.geometry;_mesh.material=this.material,_mesh.geometry.index=fe.index,_mesh.geometry.attributes=fe.attributes,_mesh.geometry.boundingBox===null&&(_mesh.geometry.boundingBox=new Box3),_mesh.geometry.boundingSphere===null&&(_mesh.geometry.boundingSphere=new Sphere$1);for(let Le=0,Ce=o.length;Le<Ce;Le++){if(!o[Le].visible||!o[Le].active)continue;const Re=o[Le].geometryIndex,Pe=V[Re];_mesh.geometry.setDrawRange(Pe.start,Pe.count),this.getMatrixAt(Le,_mesh.matrixWorld).premultiply(le),this.getBoundingBoxAt(Re,_mesh.geometry.boundingBox),this.getBoundingSphereAt(Re,_mesh.geometry.boundingSphere),_mesh.raycast(e,_batchIntersects);for(let ze=0,Fe=_batchIntersects.length;ze<Fe;ze++){const ke=_batchIntersects[ze];ke.object=this,ke.batchId=Le,r.push(ke)}_batchIntersects.length=0}_mesh.material=null,_mesh.geometry.index=null,_mesh.geometry.attributes={},_mesh.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(r=>qi(gi({},r),{boundingBox:r.boundingBox!==null?r.boundingBox.clone():null,boundingSphere:r.boundingSphere!==null?r.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(r=>gi({},r)),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,r,o,V,le){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const fe=V.getIndex(),Le=fe===null?1:fe.array.BYTES_PER_ELEMENT,Ce=this._instanceInfo,Re=this._multiDrawStarts,Pe=this._multiDrawCounts,ze=this._geometryInfo,Fe=this.perObjectFrustumCulled,ke=this._indirectTexture,Gt=ke.image.data,Vt=o.isArrayCamera?_frustumArray:_frustum;Fe&&!o.isArrayCamera&&(_matrix$1$1.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse).multiply(this.matrixWorld),_frustum.setFromProjectionMatrix(_matrix$1$1,o.coordinateSystem,o.reversedDepth));let Xt=0;if(this.sortObjects){_matrix$1$1.copy(this.matrixWorld).invert(),_vector$5.setFromMatrixPosition(o.matrixWorld).applyMatrix4(_matrix$1$1),_forward$1.set(0,0,-1).transformDirection(o.matrixWorld).transformDirection(_matrix$1$1);for(let wt=0,Wt=Ce.length;wt<Wt;wt++)if(Ce[wt].visible&&Ce[wt].active){const It=Ce[wt].geometryIndex;this.getMatrixAt(wt,_matrix$1$1),this.getBoundingSphereAt(It,_sphere$2).applyMatrix4(_matrix$1$1);let Nt=!1;if(Fe&&(Nt=!Vt.intersectsSphere(_sphere$2,o)),!Nt){const Ft=ze[It],Ht=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward$1);_renderList.push(Ft.start,Ft.count,Ht,wt)}}const xt=_renderList.list,Zt=this.customSort;Zt===null?xt.sort(le.transparent?sortTransparent:sortOpaque):Zt.call(this,xt,o);for(let wt=0,Wt=xt.length;wt<Wt;wt++){const It=xt[wt];Re[Xt]=It.start*Le,Pe[Xt]=It.count,Gt[Xt]=It.index,Xt++}_renderList.reset()}else for(let xt=0,Zt=Ce.length;xt<Zt;xt++)if(Ce[xt].visible&&Ce[xt].active){const wt=Ce[xt].geometryIndex;let Wt=!1;if(Fe&&(this.getMatrixAt(xt,_matrix$1$1),this.getBoundingSphereAt(wt,_sphere$2).applyMatrix4(_matrix$1$1),Wt=!Vt.intersectsSphere(_sphere$2,o)),!Wt){const It=ze[wt];Re[Xt]=It.start*Le,Pe[Xt]=It.count,Gt[Xt]=xt,Xt++}}ke.needsUpdate=!0,this._multiDrawCount=Xt,this._visibilityChanged=!1}onBeforeShadow(e,r,o,V,le,fe){this.onBeforeRender(e,null,V,le,fe)}}class LineBasicMaterial extends Material{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Color$1(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const _vStart=new Vector3,_vEnd=new Vector3,_inverseMatrix$1=new Matrix4,_ray$1$1=new Ray,_sphere$1=new Sphere$1,_intersectPointOnRay=new Vector3,_intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(e=new BufferGeometry,r=new LineBasicMaterial){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,o=[0];for(let V=1,le=r.count;V<le;V++)_vStart.fromBufferAttribute(r,V-1),_vEnd.fromBufferAttribute(r,V),o[V]=o[V-1],o[V]+=_vStart.distanceTo(_vEnd);e.setAttribute("lineDistance",new Float32BufferAttribute(o,1))}else warn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,r){const o=this.geometry,V=this.matrixWorld,le=e.params.Line.threshold,fe=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$1.copy(o.boundingSphere),_sphere$1.applyMatrix4(V),_sphere$1.radius+=le,e.ray.intersectsSphere(_sphere$1)===!1)return;_inverseMatrix$1.copy(V).invert(),_ray$1$1.copy(e.ray).applyMatrix4(_inverseMatrix$1);const Le=le/((this.scale.x+this.scale.y+this.scale.z)/3),Ce=Le*Le,Re=this.isLineSegments?2:1,Pe=o.index,Fe=o.attributes.position;if(Pe!==null){const ke=Math.max(0,fe.start),Gt=Math.min(Pe.count,fe.start+fe.count);for(let Vt=ke,Xt=Gt-1;Vt<Xt;Vt+=Re){const xt=Pe.getX(Vt),Zt=Pe.getX(Vt+1),wt=checkIntersection$2(this,e,_ray$1$1,Ce,xt,Zt,Vt);wt&&r.push(wt)}if(this.isLineLoop){const Vt=Pe.getX(Gt-1),Xt=Pe.getX(ke),xt=checkIntersection$2(this,e,_ray$1$1,Ce,Vt,Xt,Gt-1);xt&&r.push(xt)}}else{const ke=Math.max(0,fe.start),Gt=Math.min(Fe.count,fe.start+fe.count);for(let Vt=ke,Xt=Gt-1;Vt<Xt;Vt+=Re){const xt=checkIntersection$2(this,e,_ray$1$1,Ce,Vt,Vt+1,Vt);xt&&r.push(xt)}if(this.isLineLoop){const Vt=checkIntersection$2(this,e,_ray$1$1,Ce,Gt-1,ke,Gt-1);Vt&&r.push(Vt)}}}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}}function checkIntersection$2(v,e,r,o,V,le,fe){const Le=v.geometry.attributes.position;if(_vStart.fromBufferAttribute(Le,V),_vEnd.fromBufferAttribute(Le,le),r.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment)>o)return;_intersectPointOnRay.applyMatrix4(v.matrixWorld);const Re=e.ray.origin.distanceTo(_intersectPointOnRay);if(!(Re<e.near||Re>e.far))return{distance:Re,point:_intersectPointOnSegment.clone().applyMatrix4(v.matrixWorld),index:fe,face:null,faceIndex:null,barycoord:null,object:v}}const _start$1=new Vector3,_end$1=new Vector3;class LineSegments extends Line{constructor(e,r){super(e,r),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,o=[];for(let V=0,le=r.count;V<le;V+=2)_start$1.fromBufferAttribute(r,V),_end$1.fromBufferAttribute(r,V+1),o[V]=V===0?0:o[V-1],o[V+1]=o[V]+_start$1.distanceTo(_end$1);e.setAttribute("lineDistance",new Float32BufferAttribute(o,1))}else warn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class LineLoop extends Line{constructor(e,r){super(e,r),this.isLineLoop=!0,this.type="LineLoop"}}class PointsMaterial extends Material{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Color$1(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const _inverseMatrix=new Matrix4,_ray$4=new Ray,_sphere$7=new Sphere$1,_position$2=new Vector3;class Points extends Object3D{constructor(e=new BufferGeometry,r=new PointsMaterial){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,r){const o=this.geometry,V=this.matrixWorld,le=e.params.Points.threshold,fe=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$7.copy(o.boundingSphere),_sphere$7.applyMatrix4(V),_sphere$7.radius+=le,e.ray.intersectsSphere(_sphere$7)===!1)return;_inverseMatrix.copy(V).invert(),_ray$4.copy(e.ray).applyMatrix4(_inverseMatrix);const Le=le/((this.scale.x+this.scale.y+this.scale.z)/3),Ce=Le*Le,Re=o.index,ze=o.attributes.position;if(Re!==null){const Fe=Math.max(0,fe.start),ke=Math.min(Re.count,fe.start+fe.count);for(let Gt=Fe,Vt=ke;Gt<Vt;Gt++){const Xt=Re.getX(Gt);_position$2.fromBufferAttribute(ze,Xt),testPoint(_position$2,Xt,Ce,V,e,r,this)}}else{const Fe=Math.max(0,fe.start),ke=Math.min(ze.count,fe.start+fe.count);for(let Gt=Fe,Vt=ke;Gt<Vt;Gt++)_position$2.fromBufferAttribute(ze,Gt),testPoint(_position$2,Gt,Ce,V,e,r,this)}}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}}function testPoint(v,e,r,o,V,le,fe){const Le=_ray$4.distanceSqToPoint(v);if(Le<r){const Ce=new Vector3;_ray$4.closestPointToPoint(v,Ce),Ce.applyMatrix4(o);const Re=V.ray.origin.distanceTo(Ce);if(Re<V.near||Re>V.far)return;le.push({distance:Re,distanceToRay:Math.sqrt(Le),point:Ce,index:e,face:null,faceIndex:null,barycoord:null,object:fe})}}class VideoTexture extends Texture{constructor(e,r,o,V,le=LinearFilter,fe=LinearFilter,Le,Ce,Re){super(e,r,o,V,le,fe,Le,Ce,Re),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const Pe=this;function ze(){Pe.needsUpdate=!0,Pe._requestVideoFrameCallbackId=e.requestVideoFrameCallback(ze)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(ze))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class VideoFrameTexture extends VideoTexture{constructor(e,r,o,V,le,fe,Le,Ce){super({},e,r,o,V,le,fe,Le,Ce),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class FramebufferTexture extends Texture{constructor(e,r){super({width:e,height:r}),this.isFramebufferTexture=!0,this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.generateMipmaps=!1,this.needsUpdate=!0}}class CompressedTexture extends Texture{constructor(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe){super(null,fe,Le,Ce,Re,Pe,V,le,ze,Fe),this.isCompressedTexture=!0,this.image={width:r,height:o},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CompressedArrayTexture extends CompressedTexture{constructor(e,r,o,V,le,fe){super(e,r,o,le,fe),this.isCompressedArrayTexture=!0,this.image.depth=V,this.wrapR=ClampToEdgeWrapping,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(e,r,o){super(void 0,e[0].width,e[0].height,r,o,CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class CanvasTexture extends Texture{constructor(e,r,o,V,le,fe,Le,Ce,Re){super(e,r,o,V,le,fe,Le,Ce,Re),this.isCanvasTexture=!0,this.needsUpdate=!0}}class DepthTexture extends Texture{constructor(e,r,o=UnsignedIntType,V,le,fe,Le=NearestFilter,Ce=NearestFilter,Re,Pe=DepthFormat,ze=1){if(Pe!==DepthFormat&&Pe!==DepthStencilFormat)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const Fe={width:e,height:r,depth:ze};super(Fe,V,le,fe,Le,Ce,Pe,o,Re),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Source(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const r=super.toJSON(e);return this.compareFunction!==null&&(r.compareFunction=this.compareFunction),r}}class CubeDepthTexture extends DepthTexture{constructor(e,r=UnsignedIntType,o=CubeReflectionMapping,V,le,fe=NearestFilter,Le=NearestFilter,Ce,Re=DepthFormat){const Pe={width:e,height:e,depth:1},ze=[Pe,Pe,Pe,Pe,Pe,Pe];super(e,e,r,o,V,le,fe,Le,Ce,Re),this.image=ze,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class ExternalTexture extends Texture{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class CapsuleGeometry extends BufferGeometry{constructor(e=1,r=1,o=4,V=8,le=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:r,capSegments:o,radialSegments:V,heightSegments:le},r=Math.max(0,r),o=Math.max(1,Math.floor(o)),V=Math.max(3,Math.floor(V)),le=Math.max(1,Math.floor(le));const fe=[],Le=[],Ce=[],Re=[],Pe=r/2,ze=Math.PI/2*e,Fe=r,ke=2*ze+Fe,Gt=o*2+le,Vt=V+1,Xt=new Vector3,xt=new Vector3;for(let Zt=0;Zt<=Gt;Zt++){let wt=0,Wt=0,It=0,Nt=0;if(Zt<=o){const Kt=Zt/o,Yt=Kt*Math.PI/2;Wt=-Pe-e*Math.cos(Yt),It=e*Math.sin(Yt),Nt=-e*Math.cos(Yt),wt=Kt*ze}else if(Zt<=o+le){const Kt=(Zt-o)/le;Wt=-Pe+Kt*r,It=e,Nt=0,wt=ze+Kt*Fe}else{const Kt=(Zt-o-le)/o,Yt=Kt*Math.PI/2;Wt=Pe+e*Math.sin(Yt),It=e*Math.cos(Yt),Nt=e*Math.sin(Yt),wt=ze+Fe+Kt*ze}const Ft=Math.max(0,Math.min(1,wt/ke));let Ht=0;Zt===0?Ht=.5/V:Zt===Gt&&(Ht=-.5/V);for(let Kt=0;Kt<=V;Kt++){const Yt=Kt/V,jt=Yt*Math.PI*2,n0=Math.sin(jt),a0=Math.cos(jt);xt.x=-It*a0,xt.y=Wt,xt.z=It*n0,Le.push(xt.x,xt.y,xt.z),Xt.set(-It*a0,Nt,It*n0),Xt.normalize(),Ce.push(Xt.x,Xt.y,Xt.z),Re.push(Yt+Ht,Ft)}if(Zt>0){const Kt=(Zt-1)*Vt;for(let Yt=0;Yt<V;Yt++){const jt=Kt+Yt,n0=Kt+Yt+1,a0=Zt*Vt+Yt,l0=Zt*Vt+Yt+1;fe.push(jt,n0,a0),fe.push(n0,l0,a0)}}}this.setIndex(fe),this.setAttribute("position",new Float32BufferAttribute(Le,3)),this.setAttribute("normal",new Float32BufferAttribute(Ce,3)),this.setAttribute("uv",new Float32BufferAttribute(Re,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CapsuleGeometry(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class CircleGeometry extends BufferGeometry{constructor(e=1,r=32,o=0,V=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:r,thetaStart:o,thetaLength:V},r=Math.max(3,r);const le=[],fe=[],Le=[],Ce=[],Re=new Vector3,Pe=new Vector2;fe.push(0,0,0),Le.push(0,0,1),Ce.push(.5,.5);for(let ze=0,Fe=3;ze<=r;ze++,Fe+=3){const ke=o+ze/r*V;Re.x=e*Math.cos(ke),Re.y=e*Math.sin(ke),fe.push(Re.x,Re.y,Re.z),Le.push(0,0,1),Pe.x=(fe[Fe]/e+1)/2,Pe.y=(fe[Fe+1]/e+1)/2,Ce.push(Pe.x,Pe.y)}for(let ze=1;ze<=r;ze++)le.push(ze,ze+1,0);this.setIndex(le),this.setAttribute("position",new Float32BufferAttribute(fe,3)),this.setAttribute("normal",new Float32BufferAttribute(Le,3)),this.setAttribute("uv",new Float32BufferAttribute(Ce,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CircleGeometry(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=32,le=1,fe=!1,Le=0,Ce=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:r,height:o,radialSegments:V,heightSegments:le,openEnded:fe,thetaStart:Le,thetaLength:Ce};const Re=this;V=Math.floor(V),le=Math.floor(le);const Pe=[],ze=[],Fe=[],ke=[];let Gt=0;const Vt=[],Xt=o/2;let xt=0;Zt(),fe===!1&&(e>0&&wt(!0),r>0&&wt(!1)),this.setIndex(Pe),this.setAttribute("position",new Float32BufferAttribute(ze,3)),this.setAttribute("normal",new Float32BufferAttribute(Fe,3)),this.setAttribute("uv",new Float32BufferAttribute(ke,2));function Zt(){const Wt=new Vector3,It=new Vector3;let Nt=0;const Ft=(r-e)/o;for(let Ht=0;Ht<=le;Ht++){const Kt=[],Yt=Ht/le,jt=Yt*(r-e)+e;for(let n0=0;n0<=V;n0++){const a0=n0/V,l0=a0*Ce+Le,s0=Math.sin(l0),$t=Math.cos(l0);It.x=jt*s0,It.y=-Yt*o+Xt,It.z=jt*$t,ze.push(It.x,It.y,It.z),Wt.set(s0,Ft,$t).normalize(),Fe.push(Wt.x,Wt.y,Wt.z),ke.push(a0,1-Yt),Kt.push(Gt++)}Vt.push(Kt)}for(let Ht=0;Ht<V;Ht++)for(let Kt=0;Kt<le;Kt++){const Yt=Vt[Kt][Ht],jt=Vt[Kt+1][Ht],n0=Vt[Kt+1][Ht+1],a0=Vt[Kt][Ht+1];(e>0||Kt!==0)&&(Pe.push(Yt,jt,a0),Nt+=3),(r>0||Kt!==le-1)&&(Pe.push(jt,n0,a0),Nt+=3)}Re.addGroup(xt,Nt,0),xt+=Nt}function wt(Wt){const It=Gt,Nt=new Vector2,Ft=new Vector3;let Ht=0;const Kt=Wt===!0?e:r,Yt=Wt===!0?1:-1;for(let n0=1;n0<=V;n0++)ze.push(0,Xt*Yt,0),Fe.push(0,Yt,0),ke.push(.5,.5),Gt++;const jt=Gt;for(let n0=0;n0<=V;n0++){const l0=n0/V*Ce+Le,s0=Math.cos(l0),$t=Math.sin(l0);Ft.x=Kt*$t,Ft.y=Xt*Yt,Ft.z=Kt*s0,ze.push(Ft.x,Ft.y,Ft.z),Fe.push(0,Yt,0),Nt.x=s0*.5+.5,Nt.y=$t*.5*Yt+.5,ke.push(Nt.x,Nt.y),Gt++}for(let n0=0;n0<V;n0++){const a0=It+n0,l0=jt+n0;Wt===!0?Pe.push(l0,l0+1,a0):Pe.push(l0+1,l0,a0),Ht+=3}Re.addGroup(xt,Ht,Wt===!0?1:2),xt+=Ht}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(e=1,r=1,o=32,V=1,le=!1,fe=0,Le=Math.PI*2){super(0,e,r,o,V,le,fe,Le),this.type="ConeGeometry",this.parameters={radius:e,height:r,radialSegments:o,heightSegments:V,openEnded:le,thetaStart:fe,thetaLength:Le}}static fromJSON(e){return new ConeGeometry(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(e=[],r=[],o=1,V=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:r,radius:o,detail:V};const le=[],fe=[];Le(V),Re(o),Pe(),this.setAttribute("position",new Float32BufferAttribute(le,3)),this.setAttribute("normal",new Float32BufferAttribute(le.slice(),3)),this.setAttribute("uv",new Float32BufferAttribute(fe,2)),V===0?this.computeVertexNormals():this.normalizeNormals();function Le(Zt){const wt=new Vector3,Wt=new Vector3,It=new Vector3;for(let Nt=0;Nt<r.length;Nt+=3)ke(r[Nt+0],wt),ke(r[Nt+1],Wt),ke(r[Nt+2],It),Ce(wt,Wt,It,Zt)}function Ce(Zt,wt,Wt,It){const Nt=It+1,Ft=[];for(let Ht=0;Ht<=Nt;Ht++){Ft[Ht]=[];const Kt=Zt.clone().lerp(Wt,Ht/Nt),Yt=wt.clone().lerp(Wt,Ht/Nt),jt=Nt-Ht;for(let n0=0;n0<=jt;n0++)n0===0&&Ht===Nt?Ft[Ht][n0]=Kt:Ft[Ht][n0]=Kt.clone().lerp(Yt,n0/jt)}for(let Ht=0;Ht<Nt;Ht++)for(let Kt=0;Kt<2*(Nt-Ht)-1;Kt++){const Yt=Math.floor(Kt/2);Kt%2===0?(Fe(Ft[Ht][Yt+1]),Fe(Ft[Ht+1][Yt]),Fe(Ft[Ht][Yt])):(Fe(Ft[Ht][Yt+1]),Fe(Ft[Ht+1][Yt+1]),Fe(Ft[Ht+1][Yt]))}}function Re(Zt){const wt=new Vector3;for(let Wt=0;Wt<le.length;Wt+=3)wt.x=le[Wt+0],wt.y=le[Wt+1],wt.z=le[Wt+2],wt.normalize().multiplyScalar(Zt),le[Wt+0]=wt.x,le[Wt+1]=wt.y,le[Wt+2]=wt.z}function Pe(){const Zt=new Vector3;for(let wt=0;wt<le.length;wt+=3){Zt.x=le[wt+0],Zt.y=le[wt+1],Zt.z=le[wt+2];const Wt=Xt(Zt)/2/Math.PI+.5,It=xt(Zt)/Math.PI+.5;fe.push(Wt,1-It)}Gt(),ze()}function ze(){for(let Zt=0;Zt<fe.length;Zt+=6){const wt=fe[Zt+0],Wt=fe[Zt+2],It=fe[Zt+4],Nt=Math.max(wt,Wt,It),Ft=Math.min(wt,Wt,It);Nt>.9&&Ft<.1&&(wt<.2&&(fe[Zt+0]+=1),Wt<.2&&(fe[Zt+2]+=1),It<.2&&(fe[Zt+4]+=1))}}function Fe(Zt){le.push(Zt.x,Zt.y,Zt.z)}function ke(Zt,wt){const Wt=Zt*3;wt.x=e[Wt+0],wt.y=e[Wt+1],wt.z=e[Wt+2]}function Gt(){const Zt=new Vector3,wt=new Vector3,Wt=new Vector3,It=new Vector3,Nt=new Vector2,Ft=new Vector2,Ht=new Vector2;for(let Kt=0,Yt=0;Kt<le.length;Kt+=9,Yt+=6){Zt.set(le[Kt+0],le[Kt+1],le[Kt+2]),wt.set(le[Kt+3],le[Kt+4],le[Kt+5]),Wt.set(le[Kt+6],le[Kt+7],le[Kt+8]),Nt.set(fe[Yt+0],fe[Yt+1]),Ft.set(fe[Yt+2],fe[Yt+3]),Ht.set(fe[Yt+4],fe[Yt+5]),It.copy(Zt).add(wt).add(Wt).divideScalar(3);const jt=Xt(It);Vt(Nt,Yt+0,Zt,jt),Vt(Ft,Yt+2,wt,jt),Vt(Ht,Yt+4,Wt,jt)}}function Vt(Zt,wt,Wt,It){It<0&&Zt.x===1&&(fe[wt]=Zt.x-1),Wt.x===0&&Wt.z===0&&(fe[wt]=It/2/Math.PI+.5)}function Xt(Zt){return Math.atan2(Zt.z,-Zt.x)}function xt(Zt){return Math.atan2(-Zt.y,Math.sqrt(Zt.x*Zt.x+Zt.z*Zt.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new PolyhedronGeometry(e.vertices,e.indices,e.radius,e.detail)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=(1+Math.sqrt(5))/2,V=1/o,le=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-V,-o,0,-V,o,0,V,-o,0,V,o,-V,-o,0,-V,o,0,V,-o,0,V,o,0,-o,0,-V,o,0,-V,-o,0,V,o,0,V],fe=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(le,fe,e,r),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new DodecahedronGeometry(e.radius,e.detail)}}const _v0$3=new Vector3,_v1$1$1=new Vector3,_normal$2=new Vector3,_triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(e=null,r=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:r},e!==null){const V=Math.pow(10,4),le=Math.cos(DEG2RAD*r),fe=e.getIndex(),Le=e.getAttribute("position"),Ce=fe?fe.count:Le.count,Re=[0,0,0],Pe=["a","b","c"],ze=new Array(3),Fe={},ke=[];for(let Gt=0;Gt<Ce;Gt+=3){fe?(Re[0]=fe.getX(Gt),Re[1]=fe.getX(Gt+1),Re[2]=fe.getX(Gt+2)):(Re[0]=Gt,Re[1]=Gt+1,Re[2]=Gt+2);const{a:Vt,b:Xt,c:xt}=_triangle;if(Vt.fromBufferAttribute(Le,Re[0]),Xt.fromBufferAttribute(Le,Re[1]),xt.fromBufferAttribute(Le,Re[2]),_triangle.getNormal(_normal$2),ze[0]=`${Math.round(Vt.x*V)},${Math.round(Vt.y*V)},${Math.round(Vt.z*V)}`,ze[1]=`${Math.round(Xt.x*V)},${Math.round(Xt.y*V)},${Math.round(Xt.z*V)}`,ze[2]=`${Math.round(xt.x*V)},${Math.round(xt.y*V)},${Math.round(xt.z*V)}`,!(ze[0]===ze[1]||ze[1]===ze[2]||ze[2]===ze[0]))for(let Zt=0;Zt<3;Zt++){const wt=(Zt+1)%3,Wt=ze[Zt],It=ze[wt],Nt=_triangle[Pe[Zt]],Ft=_triangle[Pe[wt]],Ht=`${Wt}_${It}`,Kt=`${It}_${Wt}`;Kt in Fe&&Fe[Kt]?(_normal$2.dot(Fe[Kt].normal)<=le&&(ke.push(Nt.x,Nt.y,Nt.z),ke.push(Ft.x,Ft.y,Ft.z)),Fe[Kt]=null):Ht in Fe||(Fe[Ht]={index0:Re[Zt],index1:Re[wt],normal:_normal$2.clone()})}}for(const Gt in Fe)if(Fe[Gt]){const{index0:Vt,index1:Xt}=Fe[Gt];_v0$3.fromBufferAttribute(Le,Vt),_v1$1$1.fromBufferAttribute(Le,Xt),ke.push(_v0$3.x,_v0$3.y,_v0$3.z),ke.push(_v1$1$1.x,_v1$1$1.y,_v1$1$1.z)}this.setAttribute("position",new Float32BufferAttribute(ke,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Curve{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){warn("Curve: .getPoint() not implemented.")}getPointAt(e,r){const o=this.getUtoTmapping(e);return this.getPoint(o,r)}getPoints(e=5){const r=[];for(let o=0;o<=e;o++)r.push(this.getPoint(o/e));return r}getSpacedPoints(e=5){const r=[];for(let o=0;o<=e;o++)r.push(this.getPointAt(o/e));return r}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const r=[];let o,V=this.getPoint(0),le=0;r.push(0);for(let fe=1;fe<=e;fe++)o=this.getPoint(fe/e),le+=o.distanceTo(V),r.push(le),V=o;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,r=null){const o=this.getLengths();let V=0;const le=o.length;let fe;r?fe=r:fe=e*o[le-1];let Le=0,Ce=le-1,Re;for(;Le<=Ce;)if(V=Math.floor(Le+(Ce-Le)/2),Re=o[V]-fe,Re<0)Le=V+1;else if(Re>0)Ce=V-1;else{Ce=V;break}if(V=Ce,o[V]===fe)return V/(le-1);const Pe=o[V],Fe=o[V+1]-Pe,ke=(fe-Pe)/Fe;return(V+ke)/(le-1)}getTangent(e,r){let V=e-1e-4,le=e+1e-4;V<0&&(V=0),le>1&&(le=1);const fe=this.getPoint(V),Le=this.getPoint(le),Ce=r||(fe.isVector2?new Vector2:new Vector3);return Ce.copy(Le).sub(fe).normalize(),Ce}getTangentAt(e,r){const o=this.getUtoTmapping(e);return this.getTangent(o,r)}computeFrenetFrames(e,r=!1){const o=new Vector3,V=[],le=[],fe=[],Le=new Vector3,Ce=new Matrix4;for(let ke=0;ke<=e;ke++){const Gt=ke/e;V[ke]=this.getTangentAt(Gt,new Vector3)}le[0]=new Vector3,fe[0]=new Vector3;let Re=Number.MAX_VALUE;const Pe=Math.abs(V[0].x),ze=Math.abs(V[0].y),Fe=Math.abs(V[0].z);Pe<=Re&&(Re=Pe,o.set(1,0,0)),ze<=Re&&(Re=ze,o.set(0,1,0)),Fe<=Re&&o.set(0,0,1),Le.crossVectors(V[0],o).normalize(),le[0].crossVectors(V[0],Le),fe[0].crossVectors(V[0],le[0]);for(let ke=1;ke<=e;ke++){if(le[ke]=le[ke-1].clone(),fe[ke]=fe[ke-1].clone(),Le.crossVectors(V[ke-1],V[ke]),Le.length()>Number.EPSILON){Le.normalize();const Gt=Math.acos(clamp(V[ke-1].dot(V[ke]),-1,1));le[ke].applyMatrix4(Ce.makeRotationAxis(Le,Gt))}fe[ke].crossVectors(V[ke],le[ke])}if(r===!0){let ke=Math.acos(clamp(le[0].dot(le[e]),-1,1));ke/=e,V[0].dot(Le.crossVectors(le[0],le[e]))>0&&(ke=-ke);for(let Gt=1;Gt<=e;Gt++)le[Gt].applyMatrix4(Ce.makeRotationAxis(V[Gt],ke*Gt)),fe[Gt].crossVectors(V[Gt],le[Gt])}return{tangents:V,normals:le,binormals:fe}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class EllipseCurve extends Curve{constructor(e=0,r=0,o=1,V=1,le=0,fe=Math.PI*2,Le=!1,Ce=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=r,this.xRadius=o,this.yRadius=V,this.aStartAngle=le,this.aEndAngle=fe,this.aClockwise=Le,this.aRotation=Ce}getPoint(e,r=new Vector2){const o=r,V=Math.PI*2;let le=this.aEndAngle-this.aStartAngle;const fe=Math.abs(le)<Number.EPSILON;for(;le<0;)le+=V;for(;le>V;)le-=V;le<Number.EPSILON&&(fe?le=0:le=V),this.aClockwise===!0&&!fe&&(le===V?le=-V:le=le-V);const Le=this.aStartAngle+e*le;let Ce=this.aX+this.xRadius*Math.cos(Le),Re=this.aY+this.yRadius*Math.sin(Le);if(this.aRotation!==0){const Pe=Math.cos(this.aRotation),ze=Math.sin(this.aRotation),Fe=Ce-this.aX,ke=Re-this.aY;Ce=Fe*Pe-ke*ze+this.aX,Re=Fe*ze+ke*Pe+this.aY}return o.set(Ce,Re)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class ArcCurve extends EllipseCurve{constructor(e,r,o,V,le,fe){super(e,r,o,o,V,le,fe),this.isArcCurve=!0,this.type="ArcCurve"}}function CubicPoly(){let v=0,e=0,r=0,o=0;function V(le,fe,Le,Ce){v=le,e=Le,r=-3*le+3*fe-2*Le-Ce,o=2*le-2*fe+Le+Ce}return{initCatmullRom:function(le,fe,Le,Ce,Re){V(fe,Le,Re*(Le-le),Re*(Ce-fe))},initNonuniformCatmullRom:function(le,fe,Le,Ce,Re,Pe,ze){let Fe=(fe-le)/Re-(Le-le)/(Re+Pe)+(Le-fe)/Pe,ke=(Le-fe)/Pe-(Ce-fe)/(Pe+ze)+(Ce-Le)/ze;Fe*=Pe,ke*=Pe,V(fe,Le,Fe,ke)},calc:function(le){const fe=le*le,Le=fe*le;return v+e*le+r*fe+o*Le}}}const tmp=new Vector3,px=new CubicPoly,py=new CubicPoly,pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(e=[],r=!1,o="centripetal",V=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=r,this.curveType=o,this.tension=V}getPoint(e,r=new Vector3){const o=r,V=this.points,le=V.length,fe=(le-(this.closed?0:1))*e;let Le=Math.floor(fe),Ce=fe-Le;this.closed?Le+=Le>0?0:(Math.floor(Math.abs(Le)/le)+1)*le:Ce===0&&Le===le-1&&(Le=le-2,Ce=1);let Re,Pe;this.closed||Le>0?Re=V[(Le-1)%le]:(tmp.subVectors(V[0],V[1]).add(V[0]),Re=tmp);const ze=V[Le%le],Fe=V[(Le+1)%le];if(this.closed||Le+2<le?Pe=V[(Le+2)%le]:(tmp.subVectors(V[le-1],V[le-2]).add(V[le-1]),Pe=tmp),this.curveType==="centripetal"||this.curveType==="chordal"){const ke=this.curveType==="chordal"?.5:.25;let Gt=Math.pow(Re.distanceToSquared(ze),ke),Vt=Math.pow(ze.distanceToSquared(Fe),ke),Xt=Math.pow(Fe.distanceToSquared(Pe),ke);Vt<1e-4&&(Vt=1),Gt<1e-4&&(Gt=Vt),Xt<1e-4&&(Xt=Vt),px.initNonuniformCatmullRom(Re.x,ze.x,Fe.x,Pe.x,Gt,Vt,Xt),py.initNonuniformCatmullRom(Re.y,ze.y,Fe.y,Pe.y,Gt,Vt,Xt),pz.initNonuniformCatmullRom(Re.z,ze.z,Fe.z,Pe.z,Gt,Vt,Xt)}else this.curveType==="catmullrom"&&(px.initCatmullRom(Re.x,ze.x,Fe.x,Pe.x,this.tension),py.initCatmullRom(Re.y,ze.y,Fe.y,Pe.y,this.tension),pz.initCatmullRom(Re.z,ze.z,Fe.z,Pe.z,this.tension));return o.set(px.calc(Ce),py.calc(Ce),pz.calc(Ce)),o}copy(e){super.copy(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(V.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,o=this.points.length;r<o;r++){const V=this.points[r];e.points.push(V.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(new Vector3().fromArray(V))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function CatmullRom(v,e,r,o,V){const le=(o-e)*.5,fe=(V-r)*.5,Le=v*v,Ce=v*Le;return(2*r-2*o+le+fe)*Ce+(-3*r+3*o-2*le-fe)*Le+le*v+r}function QuadraticBezierP0(v,e){const r=1-v;return r*r*e}function QuadraticBezierP1(v,e){return 2*(1-v)*v*e}function QuadraticBezierP2(v,e){return v*v*e}function QuadraticBezier(v,e,r,o){return QuadraticBezierP0(v,e)+QuadraticBezierP1(v,r)+QuadraticBezierP2(v,o)}function CubicBezierP0(v,e){const r=1-v;return r*r*r*e}function CubicBezierP1(v,e){const r=1-v;return 3*r*r*v*e}function CubicBezierP2(v,e){return 3*(1-v)*v*v*e}function CubicBezierP3(v,e){return v*v*v*e}function CubicBezier(v,e,r,o,V){return CubicBezierP0(v,e)+CubicBezierP1(v,r)+CubicBezierP2(v,o)+CubicBezierP3(v,V)}class CubicBezierCurve extends Curve{constructor(e=new Vector2,r=new Vector2,o=new Vector2,V=new Vector2){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=r,this.v2=o,this.v3=V}getPoint(e,r=new Vector2){const o=r,V=this.v0,le=this.v1,fe=this.v2,Le=this.v3;return o.set(CubicBezier(e,V.x,le.x,fe.x,Le.x),CubicBezier(e,V.y,le.y,fe.y,Le.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class CubicBezierCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3,o=new Vector3,V=new Vector3){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=r,this.v2=o,this.v3=V}getPoint(e,r=new Vector3){const o=r,V=this.v0,le=this.v1,fe=this.v2,Le=this.v3;return o.set(CubicBezier(e,V.x,le.x,fe.x,Le.x),CubicBezier(e,V.y,le.y,fe.y,Le.y),CubicBezier(e,V.z,le.z,fe.z,Le.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class LineCurve extends Curve{constructor(e=new Vector2,r=new Vector2){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=r}getPoint(e,r=new Vector2){const o=r;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new Vector2){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class LineCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=r}getPoint(e,r=new Vector3){const o=r;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new Vector3){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class QuadraticBezierCurve extends Curve{constructor(e=new Vector2,r=new Vector2,o=new Vector2){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=r,this.v2=o}getPoint(e,r=new Vector2){const o=r,V=this.v0,le=this.v1,fe=this.v2;return o.set(QuadraticBezier(e,V.x,le.x,fe.x),QuadraticBezier(e,V.y,le.y,fe.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class QuadraticBezierCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3,o=new Vector3){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=r,this.v2=o}getPoint(e,r=new Vector3){const o=r,V=this.v0,le=this.v1,fe=this.v2;return o.set(QuadraticBezier(e,V.x,le.x,fe.x),QuadraticBezier(e,V.y,le.y,fe.y),QuadraticBezier(e,V.z,le.z,fe.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class SplineCurve extends Curve{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,r=new Vector2){const o=r,V=this.points,le=(V.length-1)*e,fe=Math.floor(le),Le=le-fe,Ce=V[fe===0?fe:fe-1],Re=V[fe],Pe=V[fe>V.length-2?V.length-1:fe+1],ze=V[fe>V.length-3?V.length-1:fe+2];return o.set(CatmullRom(Le,Ce.x,Re.x,Pe.x,ze.x),CatmullRom(Le,Ce.y,Re.y,Pe.y,ze.y)),o}copy(e){super.copy(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(V.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,o=this.points.length;r<o;r++){const V=this.points[r];e.points.push(V.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(new Vector2().fromArray(V))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve,CatmullRomCurve3,CubicBezierCurve,CubicBezierCurve3,EllipseCurve,LineCurve,LineCurve3,QuadraticBezierCurve,QuadraticBezierCurve3,SplineCurve});class CurvePath extends Curve{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(r)){const o=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Curves[o](r,e))}return this}getPoint(e,r){const o=e*this.getLength(),V=this.getCurveLengths();let le=0;for(;le<V.length;){if(V[le]>=o){const fe=V[le]-o,Le=this.curves[le],Ce=Le.getLength(),Re=Ce===0?0:1-fe/Ce;return Le.getPointAt(Re,r)}le++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let r=0;for(let o=0,V=this.curves.length;o<V;o++)r+=this.curves[o].getLength(),e.push(r);return this.cacheLengths=e,e}getSpacedPoints(e=40){const r=[];for(let o=0;o<=e;o++)r.push(this.getPoint(o/e));return this.autoClose&&r.push(r[0]),r}getPoints(e=12){const r=[];let o;for(let V=0,le=this.curves;V<le.length;V++){const fe=le[V],Le=fe.isEllipseCurve?e*2:fe.isLineCurve||fe.isLineCurve3?1:fe.isSplineCurve?e*fe.points.length:e,Ce=fe.getPoints(Le);for(let Re=0;Re<Ce.length;Re++){const Pe=Ce[Re];o&&o.equals(Pe)||(r.push(Pe),o=Pe)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(e){super.copy(e),this.curves=[];for(let r=0,o=e.curves.length;r<o;r++){const V=e.curves[r];this.curves.push(V.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let r=0,o=this.curves.length;r<o;r++){const V=this.curves[r];e.curves.push(V.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let r=0,o=e.curves.length;r<o;r++){const V=e.curves[r];this.curves.push(new Curves[V.type]().fromJSON(V))}return this}}let Path$1=class extends CurvePath{constructor(e){super(),this.type="Path",this.currentPoint=new Vector2,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let r=1,o=e.length;r<o;r++)this.lineTo(e[r].x,e[r].y);return this}moveTo(e,r){return this.currentPoint.set(e,r),this}lineTo(e,r){const o=new LineCurve(this.currentPoint.clone(),new Vector2(e,r));return this.curves.push(o),this.currentPoint.set(e,r),this}quadraticCurveTo(e,r,o,V){const le=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(e,r),new Vector2(o,V));return this.curves.push(le),this.currentPoint.set(o,V),this}bezierCurveTo(e,r,o,V,le,fe){const Le=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(e,r),new Vector2(o,V),new Vector2(le,fe));return this.curves.push(Le),this.currentPoint.set(le,fe),this}splineThru(e){const r=[this.currentPoint.clone()].concat(e),o=new SplineCurve(r);return this.curves.push(o),this.currentPoint.copy(e[e.length-1]),this}arc(e,r,o,V,le,fe){const Le=this.currentPoint.x,Ce=this.currentPoint.y;return this.absarc(e+Le,r+Ce,o,V,le,fe),this}absarc(e,r,o,V,le,fe){return this.absellipse(e,r,o,o,V,le,fe),this}ellipse(e,r,o,V,le,fe,Le,Ce){const Re=this.currentPoint.x,Pe=this.currentPoint.y;return this.absellipse(e+Re,r+Pe,o,V,le,fe,Le,Ce),this}absellipse(e,r,o,V,le,fe,Le,Ce){const Re=new EllipseCurve(e,r,o,V,le,fe,Le,Ce);if(this.curves.length>0){const ze=Re.getPoint(0);ze.equals(this.currentPoint)||this.lineTo(ze.x,ze.y)}this.curves.push(Re);const Pe=Re.getPoint(1);return this.currentPoint.copy(Pe),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}};class Shape extends Path$1{constructor(e){super(e),this.uuid=generateUUID(),this.type="Shape",this.holes=[]}getPointsHoles(e){const r=[];for(let o=0,V=this.holes.length;o<V;o++)r[o]=this.holes[o].getPoints(e);return r}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let r=0,o=e.holes.length;r<o;r++){const V=e.holes[r];this.holes.push(V.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let r=0,o=this.holes.length;r<o;r++){const V=this.holes[r];e.holes.push(V.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let r=0,o=e.holes.length;r<o;r++){const V=e.holes[r];this.holes.push(new Path$1().fromJSON(V))}return this}}function earcut$1(v,e,r=2){const o=e&&e.length,V=o?e[0]*r:v.length;let le=linkedList$1(v,0,V,r,!0);const fe=[];if(!le||le.next===le.prev)return fe;let Le,Ce,Re;if(o&&(le=eliminateHoles$1(v,e,le,r)),v.length>80*r){Le=v[0],Ce=v[1];let Pe=Le,ze=Ce;for(let Fe=r;Fe<V;Fe+=r){const ke=v[Fe],Gt=v[Fe+1];ke<Le&&(Le=ke),Gt<Ce&&(Ce=Gt),ke>Pe&&(Pe=ke),Gt>ze&&(ze=Gt)}Re=Math.max(Pe-Le,ze-Ce),Re=Re!==0?32767/Re:0}return earcutLinked$1(le,fe,r,Le,Ce,Re,0),fe}function linkedList$1(v,e,r,o,V){let le;if(V===signedArea$1(v,e,r,o)>0)for(let fe=e;fe<r;fe+=o)le=insertNode$1(fe/o|0,v[fe],v[fe+1],le);else for(let fe=r-o;fe>=e;fe-=o)le=insertNode$1(fe/o|0,v[fe],v[fe+1],le);return le&&equals$1(le,le.next)&&(removeNode$1(le),le=le.next),le}function filterPoints$1(v,e){if(!v)return v;e||(e=v);let r=v,o;do if(o=!1,!r.steiner&&(equals$1(r,r.next)||area$1(r.prev,r,r.next)===0)){if(removeNode$1(r),r=e=r.prev,r===r.next)break;o=!0}else r=r.next;while(o||r!==e);return e}function earcutLinked$1(v,e,r,o,V,le,fe){if(!v)return;!fe&&le&&indexCurve$1(v,o,V,le);let Le=v;for(;v.prev!==v.next;){const Ce=v.prev,Re=v.next;if(le?isEarHashed$1(v,o,V,le):isEar$1(v)){e.push(Ce.i,v.i,Re.i),removeNode$1(v),v=Re.next,Le=Re.next;continue}if(v=Re,v===Le){fe?fe===1?(v=cureLocalIntersections$1(filterPoints$1(v),e),earcutLinked$1(v,e,r,o,V,le,2)):fe===2&&splitEarcut$1(v,e,r,o,V,le):earcutLinked$1(filterPoints$1(v),e,r,o,V,le,1);break}}}function isEar$1(v){const e=v.prev,r=v,o=v.next;if(area$1(e,r,o)>=0)return!1;const V=e.x,le=r.x,fe=o.x,Le=e.y,Ce=r.y,Re=o.y,Pe=Math.min(V,le,fe),ze=Math.min(Le,Ce,Re),Fe=Math.max(V,le,fe),ke=Math.max(Le,Ce,Re);let Gt=o.next;for(;Gt!==e;){if(Gt.x>=Pe&&Gt.x<=Fe&&Gt.y>=ze&&Gt.y<=ke&&pointInTriangleExceptFirst$1(V,Le,le,Ce,fe,Re,Gt.x,Gt.y)&&area$1(Gt.prev,Gt,Gt.next)>=0)return!1;Gt=Gt.next}return!0}function isEarHashed$1(v,e,r,o){const V=v.prev,le=v,fe=v.next;if(area$1(V,le,fe)>=0)return!1;const Le=V.x,Ce=le.x,Re=fe.x,Pe=V.y,ze=le.y,Fe=fe.y,ke=Math.min(Le,Ce,Re),Gt=Math.min(Pe,ze,Fe),Vt=Math.max(Le,Ce,Re),Xt=Math.max(Pe,ze,Fe),xt=zOrder$1(ke,Gt,e,r,o),Zt=zOrder$1(Vt,Xt,e,r,o);let wt=v.prevZ,Wt=v.nextZ;for(;wt&&wt.z>=xt&&Wt&&Wt.z<=Zt;){if(wt.x>=ke&&wt.x<=Vt&&wt.y>=Gt&&wt.y<=Xt&&wt!==V&&wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,wt.x,wt.y)&&area$1(wt.prev,wt,wt.next)>=0||(wt=wt.prevZ,Wt.x>=ke&&Wt.x<=Vt&&Wt.y>=Gt&&Wt.y<=Xt&&Wt!==V&&Wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,Wt.x,Wt.y)&&area$1(Wt.prev,Wt,Wt.next)>=0))return!1;Wt=Wt.nextZ}for(;wt&&wt.z>=xt;){if(wt.x>=ke&&wt.x<=Vt&&wt.y>=Gt&&wt.y<=Xt&&wt!==V&&wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,wt.x,wt.y)&&area$1(wt.prev,wt,wt.next)>=0)return!1;wt=wt.prevZ}for(;Wt&&Wt.z<=Zt;){if(Wt.x>=ke&&Wt.x<=Vt&&Wt.y>=Gt&&Wt.y<=Xt&&Wt!==V&&Wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,Wt.x,Wt.y)&&area$1(Wt.prev,Wt,Wt.next)>=0)return!1;Wt=Wt.nextZ}return!0}function cureLocalIntersections$1(v,e){let r=v;do{const o=r.prev,V=r.next.next;!equals$1(o,V)&&intersects$1(o,r,r.next,V)&&locallyInside$1(o,V)&&locallyInside$1(V,o)&&(e.push(o.i,r.i,V.i),removeNode$1(r),removeNode$1(r.next),r=v=V),r=r.next}while(r!==v);return filterPoints$1(r)}function splitEarcut$1(v,e,r,o,V,le){let fe=v;do{let Le=fe.next.next;for(;Le!==fe.prev;){if(fe.i!==Le.i&&isValidDiagonal$1(fe,Le)){let Ce=splitPolygon$1(fe,Le);fe=filterPoints$1(fe,fe.next),Ce=filterPoints$1(Ce,Ce.next),earcutLinked$1(fe,e,r,o,V,le,0),earcutLinked$1(Ce,e,r,o,V,le,0);return}Le=Le.next}fe=fe.next}while(fe!==v)}function eliminateHoles$1(v,e,r,o){const V=[];for(let le=0,fe=e.length;le<fe;le++){const Le=e[le]*o,Ce=le<fe-1?e[le+1]*o:v.length,Re=linkedList$1(v,Le,Ce,o,!1);Re===Re.next&&(Re.steiner=!0),V.push(getLeftmost$1(Re))}V.sort(compareXYSlope$1);for(let le=0;le<V.length;le++)r=eliminateHole$1(V[le],r);return r}function compareXYSlope$1(v,e){let r=v.x-e.x;if(r===0&&(r=v.y-e.y,r===0)){const o=(v.next.y-v.y)/(v.next.x-v.x),V=(e.next.y-e.y)/(e.next.x-e.x);r=o-V}return r}function eliminateHole$1(v,e){const r=findHoleBridge$1(v,e);if(!r)return e;const o=splitPolygon$1(r,v);return filterPoints$1(o,o.next),filterPoints$1(r,r.next)}function findHoleBridge$1(v,e){let r=e;const o=v.x,V=v.y;let le=-1/0,fe;if(equals$1(v,r))return r;do{if(equals$1(v,r.next))return r.next;if(V<=r.y&&V>=r.next.y&&r.next.y!==r.y){const ze=r.x+(V-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(ze<=o&&ze>le&&(le=ze,fe=r.x<r.next.x?r:r.next,ze===o))return fe}r=r.next}while(r!==e);if(!fe)return null;const Le=fe,Ce=fe.x,Re=fe.y;let Pe=1/0;r=fe;do{if(o>=r.x&&r.x>=Ce&&o!==r.x&&pointInTriangle$1(V<Re?o:le,V,Ce,Re,V<Re?le:o,V,r.x,r.y)){const ze=Math.abs(V-r.y)/(o-r.x);locallyInside$1(r,v)&&(ze<Pe||ze===Pe&&(r.x>fe.x||r.x===fe.x&§orContainsSector$1(fe,r)))&&(fe=r,Pe=ze)}r=r.next}while(r!==Le);return fe}function sectorContainsSector$1(v,e){return area$1(v.prev,v,e.prev)<0&&area$1(e.next,v,v.next)<0}function indexCurve$1(v,e,r,o){let V=v;do V.z===0&&(V.z=zOrder$1(V.x,V.y,e,r,o)),V.prevZ=V.prev,V.nextZ=V.next,V=V.next;while(V!==v);V.prevZ.nextZ=null,V.prevZ=null,sortLinked$1(V)}function sortLinked$1(v){let e,r=1;do{let o=v,V;v=null;let le=null;for(e=0;o;){e++;let fe=o,Le=0;for(let Re=0;Re<r&&(Le++,fe=fe.nextZ,!!fe);Re++);let Ce=r;for(;Le>0||Ce>0&&fe;)Le!==0&&(Ce===0||!fe||o.z<=fe.z)?(V=o,o=o.nextZ,Le--):(V=fe,fe=fe.nextZ,Ce--),le?le.nextZ=V:v=V,V.prevZ=le,le=V;o=fe}le.nextZ=null,r*=2}while(e>1);return v}function zOrder$1(v,e,r,o,V){return v=(v-r)*V|0,e=(e-o)*V|0,v=(v|v<<8)&16711935,v=(v|v<<4)&252645135,v=(v|v<<2)&858993459,v=(v|v<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,v|e<<1}function getLeftmost$1(v){let e=v,r=v;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==v);return r}function pointInTriangle$1(v,e,r,o,V,le,fe,Le){return(V-fe)*(e-Le)>=(v-fe)*(le-Le)&&(v-fe)*(o-Le)>=(r-fe)*(e-Le)&&(r-fe)*(le-Le)>=(V-fe)*(o-Le)}function pointInTriangleExceptFirst$1(v,e,r,o,V,le,fe,Le){return!(v===fe&&e===Le)&&pointInTriangle$1(v,e,r,o,V,le,fe,Le)}function isValidDiagonal$1(v,e){return v.next.i!==e.i&&v.prev.i!==e.i&&!intersectsPolygon$1(v,e)&&(locallyInside$1(v,e)&&locallyInside$1(e,v)&&middleInside$1(v,e)&&(area$1(v.prev,v,e.prev)||area$1(v,e.prev,e))||equals$1(v,e)&&area$1(v.prev,v,v.next)>0&&area$1(e.prev,e,e.next)>0)}function area$1(v,e,r){return(e.y-v.y)*(r.x-e.x)-(e.x-v.x)*(r.y-e.y)}function equals$1(v,e){return v.x===e.x&&v.y===e.y}function intersects$1(v,e,r,o){const V=sign$3(area$1(v,e,r)),le=sign$3(area$1(v,e,o)),fe=sign$3(area$1(r,o,v)),Le=sign$3(area$1(r,o,e));return!!(V!==le&&fe!==Le||V===0&&onSegment$1(v,r,e)||le===0&&onSegment$1(v,o,e)||fe===0&&onSegment$1(r,v,o)||Le===0&&onSegment$1(r,e,o))}function onSegment$1(v,e,r){return e.x<=Math.max(v.x,r.x)&&e.x>=Math.min(v.x,r.x)&&e.y<=Math.max(v.y,r.y)&&e.y>=Math.min(v.y,r.y)}function sign$3(v){return v>0?1:v<0?-1:0}function intersectsPolygon$1(v,e){let r=v;do{if(r.i!==v.i&&r.next.i!==v.i&&r.i!==e.i&&r.next.i!==e.i&&intersects$1(r,r.next,v,e))return!0;r=r.next}while(r!==v);return!1}function locallyInside$1(v,e){return area$1(v.prev,v,v.next)<0?area$1(v,e,v.next)>=0&&area$1(v,v.prev,e)>=0:area$1(v,e,v.prev)<0||area$1(v,v.next,e)<0}function middleInside$1(v,e){let r=v,o=!1;const V=(v.x+e.x)/2,le=(v.y+e.y)/2;do r.y>le!=r.next.y>le&&r.next.y!==r.y&&V<(r.next.x-r.x)*(le-r.y)/(r.next.y-r.y)+r.x&&(o=!o),r=r.next;while(r!==v);return o}function splitPolygon$1(v,e){const r=createNode$1(v.i,v.x,v.y),o=createNode$1(e.i,e.x,e.y),V=v.next,le=e.prev;return v.next=e,e.prev=v,r.next=V,V.prev=r,o.next=r,r.prev=o,le.next=o,o.prev=le,o}function insertNode$1(v,e,r,o){const V=createNode$1(v,e,r);return o?(V.next=o.next,V.prev=o,o.next.prev=V,o.next=V):(V.prev=V,V.next=V),V}function removeNode$1(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function createNode$1(v,e,r){return{i:v,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function signedArea$1(v,e,r,o){let V=0;for(let le=e,fe=r-o;le<r;le+=o)V+=(v[fe]-v[le])*(v[le+1]+v[fe+1]),fe=le;return V}class Earcut{static triangulate(e,r,o=2){return earcut$1(e,r,o)}}class ShapeUtils{static area(e){const r=e.length;let o=0;for(let V=r-1,le=0;le<r;V=le++)o+=e[V].x*e[le].y-e[le].x*e[V].y;return o*.5}static isClockWise(e){return ShapeUtils.area(e)<0}static triangulateShape(e,r){const o=[],V=[],le=[];removeDupEndPts(e),addContour(o,e);let fe=e.length;r.forEach(removeDupEndPts);for(let Ce=0;Ce<r.length;Ce++)V.push(fe),fe+=r[Ce].length,addContour(o,r[Ce]);const Le=Earcut.triangulate(o,V);for(let Ce=0;Ce<Le.length;Ce+=3)le.push(Le.slice(Ce,Ce+3));return le}}function removeDupEndPts(v){const e=v.length;e>2&&v[e-1].equals(v[0])&&v.pop()}function addContour(v,e){for(let r=0;r<e.length;r++)v.push(e[r].x),v.push(e[r].y)}class ExtrudeGeometry extends BufferGeometry{constructor(e=new Shape([new Vector2(.5,.5),new Vector2(-.5,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:r},e=Array.isArray(e)?e:[e];const o=this,V=[],le=[];for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le];fe(Re)}this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("uv",new Float32BufferAttribute(le,2)),this.computeVertexNormals();function fe(Le){const Ce=[],Re=r.curveSegments!==void 0?r.curveSegments:12,Pe=r.steps!==void 0?r.steps:1,ze=r.depth!==void 0?r.depth:1;let Fe=r.bevelEnabled!==void 0?r.bevelEnabled:!0,ke=r.bevelThickness!==void 0?r.bevelThickness:.2,Gt=r.bevelSize!==void 0?r.bevelSize:ke-.1,Vt=r.bevelOffset!==void 0?r.bevelOffset:0,Xt=r.bevelSegments!==void 0?r.bevelSegments:3;const xt=r.extrudePath,Zt=r.UVGenerator!==void 0?r.UVGenerator:WorldUVGenerator;let wt,Wt=!1,It,Nt,Ft,Ht;if(xt){wt=xt.getSpacedPoints(Pe),Wt=!0,Fe=!1;const A0=xt.isCatmullRomCurve3?xt.closed:!1;It=xt.computeFrenetFrames(Pe,A0),Nt=new Vector3,Ft=new Vector3,Ht=new Vector3}Fe||(Xt=0,ke=0,Gt=0,Vt=0);const Kt=Le.extractPoints(Re);let Yt=Kt.shape;const jt=Kt.holes;if(!ShapeUtils.isClockWise(Yt)){Yt=Yt.reverse();for(let A0=0,bi=jt.length;A0<bi;A0++){const $0=jt[A0];ShapeUtils.isClockWise($0)&&(jt[A0]=$0.reverse())}}function a0(A0){const $0=10000000000000001e-36;let Li=A0[0];for(let d0=1;d0<=A0.length;d0++){const K0=d0%A0.length,E0=A0[K0],B0=E0.x-Li.x,I0=E0.y-Li.y,c0=B0*B0+I0*I0,r0=Math.max(Math.abs(E0.x),Math.abs(E0.y),Math.abs(Li.x),Math.abs(Li.y)),M0=$0*r0*r0;if(c0<=M0){A0.splice(K0,1),d0--;continue}Li=E0}}a0(Yt),jt.forEach(a0);const l0=jt.length,s0=Yt;for(let A0=0;A0<l0;A0++){const bi=jt[A0];Yt=Yt.concat(bi)}function $t(A0,bi,$0){return bi||error$1("ExtrudeGeometry: vec does not exist"),A0.clone().addScaledVector(bi,$0)}const qt=Yt.length;function e0(A0,bi,$0){let Li,d0,K0;const E0=A0.x-bi.x,B0=A0.y-bi.y,I0=$0.x-A0.x,c0=$0.y-A0.y,r0=E0*E0+B0*B0,M0=E0*c0-B0*I0;if(Math.abs(M0)>Number.EPSILON){const T0=Math.sqrt(r0),k0=Math.sqrt(I0*I0+c0*c0),w0=bi.x-B0/T0,Pi=bi.y+E0/T0,Ci=$0.x-c0/k0,Wi=$0.y+I0/k0,Oi=((Ci-w0)*c0-(Wi-Pi)*I0)/(E0*c0-B0*I0);Li=w0+E0*Oi-A0.x,d0=Pi+B0*Oi-A0.y;const Gi=Li*Li+d0*d0;if(Gi<=2)return new Vector2(Li,d0);K0=Math.sqrt(Gi/2)}else{let T0=!1;E0>Number.EPSILON?I0>Number.EPSILON&&(T0=!0):E0<-Number.EPSILON?I0<-Number.EPSILON&&(T0=!0):Math.sign(B0)===Math.sign(c0)&&(T0=!0),T0?(Li=-B0,d0=E0,K0=Math.sqrt(r0)):(Li=E0,d0=B0,K0=Math.sqrt(r0/2))}return new Vector2(Li/K0,d0/K0)}const o0=[];for(let A0=0,bi=s0.length,$0=bi-1,Li=A0+1;A0<bi;A0++,$0++,Li++)$0===bi&&($0=0),Li===bi&&(Li=0),o0[A0]=e0(s0[A0],s0[$0],s0[Li]);const b0=[];let m0,P0=o0.concat();for(let A0=0,bi=l0;A0<bi;A0++){const $0=jt[A0];m0=[];for(let Li=0,d0=$0.length,K0=d0-1,E0=Li+1;Li<d0;Li++,K0++,E0++)K0===d0&&(K0=0),E0===d0&&(E0=0),m0[Li]=e0($0[Li],$0[K0],$0[E0]);b0.push(m0),P0=P0.concat(m0)}let Q0;if(Xt===0)Q0=ShapeUtils.triangulateShape(s0,jt);else{const A0=[],bi=[];for(let $0=0;$0<Xt;$0++){const Li=$0/Xt,d0=ke*Math.cos(Li*Math.PI/2),K0=Gt*Math.sin(Li*Math.PI/2)+Vt;for(let E0=0,B0=s0.length;E0<B0;E0++){const I0=$t(s0[E0],o0[E0],K0);Vi(I0.x,I0.y,-d0),Li===0&&A0.push(I0)}for(let E0=0,B0=l0;E0<B0;E0++){const I0=jt[E0];m0=b0[E0];const c0=[];for(let r0=0,M0=I0.length;r0<M0;r0++){const T0=$t(I0[r0],m0[r0],K0);Vi(T0.x,T0.y,-d0),Li===0&&c0.push(T0)}Li===0&&bi.push(c0)}}Q0=ShapeUtils.triangulateShape(A0,bi)}const Si=Q0.length,Ni=Gt+Vt;for(let A0=0;A0<qt;A0++){const bi=Fe?$t(Yt[A0],P0[A0],Ni):Yt[A0];Wt?(Ft.copy(It.normals[0]).multiplyScalar(bi.x),Nt.copy(It.binormals[0]).multiplyScalar(bi.y),Ht.copy(wt[0]).add(Ft).add(Nt),Vi(Ht.x,Ht.y,Ht.z)):Vi(bi.x,bi.y,0)}for(let A0=1;A0<=Pe;A0++)for(let bi=0;bi<qt;bi++){const $0=Fe?$t(Yt[bi],P0[bi],Ni):Yt[bi];Wt?(Ft.copy(It.normals[A0]).multiplyScalar($0.x),Nt.copy(It.binormals[A0]).multiplyScalar($0.y),Ht.copy(wt[A0]).add(Ft).add(Nt),Vi(Ht.x,Ht.y,Ht.z)):Vi($0.x,$0.y,ze/Pe*A0)}for(let A0=Xt-1;A0>=0;A0--){const bi=A0/Xt,$0=ke*Math.cos(bi*Math.PI/2),Li=Gt*Math.sin(bi*Math.PI/2)+Vt;for(let d0=0,K0=s0.length;d0<K0;d0++){const E0=$t(s0[d0],o0[d0],Li);Vi(E0.x,E0.y,ze+$0)}for(let d0=0,K0=jt.length;d0<K0;d0++){const E0=jt[d0];m0=b0[d0];for(let B0=0,I0=E0.length;B0<I0;B0++){const c0=$t(E0[B0],m0[B0],Li);Wt?Vi(c0.x,c0.y+wt[Pe-1].y,wt[Pe-1].x+$0):Vi(c0.x,c0.y,ze+$0)}}}G0(),R0();function G0(){const A0=V.length/3;if(Fe){let bi=0,$0=qt*bi;for(let Li=0;Li<Si;Li++){const d0=Q0[Li];vi(d0[2]+$0,d0[1]+$0,d0[0]+$0)}bi=Pe+Xt*2,$0=qt*bi;for(let Li=0;Li<Si;Li++){const d0=Q0[Li];vi(d0[0]+$0,d0[1]+$0,d0[2]+$0)}}else{for(let bi=0;bi<Si;bi++){const $0=Q0[bi];vi($0[2],$0[1],$0[0])}for(let bi=0;bi<Si;bi++){const $0=Q0[bi];vi($0[0]+qt*Pe,$0[1]+qt*Pe,$0[2]+qt*Pe)}}o.addGroup(A0,V.length/3-A0,0)}function R0(){const A0=V.length/3;let bi=0;O0(s0,bi),bi+=s0.length;for(let $0=0,Li=jt.length;$0<Li;$0++){const d0=jt[$0];O0(d0,bi),bi+=d0.length}o.addGroup(A0,V.length/3-A0,1)}function O0(A0,bi){let $0=A0.length;for(;--$0>=0;){const Li=$0;let d0=$0-1;d0<0&&(d0=A0.length-1);for(let K0=0,E0=Pe+Xt*2;K0<E0;K0++){const B0=qt*K0,I0=qt*(K0+1),c0=bi+Li+B0,r0=bi+d0+B0,M0=bi+d0+I0,T0=bi+Li+I0;Hi(c0,r0,M0,T0)}}}function Vi(A0,bi,$0){Ce.push(A0),Ce.push(bi),Ce.push($0)}function vi(A0,bi,$0){Yi(A0),Yi(bi),Yi($0);const Li=V.length/3,d0=Zt.generateTopUV(o,V,Li-3,Li-2,Li-1);j0(d0[0]),j0(d0[1]),j0(d0[2])}function Hi(A0,bi,$0,Li){Yi(A0),Yi(bi),Yi(Li),Yi(bi),Yi($0),Yi(Li);const d0=V.length/3,K0=Zt.generateSideWallUV(o,V,d0-6,d0-3,d0-2,d0-1);j0(K0[0]),j0(K0[1]),j0(K0[3]),j0(K0[1]),j0(K0[2]),j0(K0[3])}function Yi(A0){V.push(Ce[A0*3+0]),V.push(Ce[A0*3+1]),V.push(Ce[A0*3+2])}function j0(A0){le.push(A0.x),le.push(A0.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes,o=this.parameters.options;return toJSON$1(r,o,e)}static fromJSON(e,r){const o=[];for(let le=0,fe=e.shapes.length;le<fe;le++){const Le=r[e.shapes[le]];o.push(Le)}const V=e.options.extrudePath;return V!==void 0&&(e.options.extrudePath=new Curves[V.type]().fromJSON(V)),new ExtrudeGeometry(o,e.options)}}const WorldUVGenerator={generateTopUV:function(v,e,r,o,V){const le=e[r*3],fe=e[r*3+1],Le=e[o*3],Ce=e[o*3+1],Re=e[V*3],Pe=e[V*3+1];return[new Vector2(le,fe),new Vector2(Le,Ce),new Vector2(Re,Pe)]},generateSideWallUV:function(v,e,r,o,V,le){const fe=e[r*3],Le=e[r*3+1],Ce=e[r*3+2],Re=e[o*3],Pe=e[o*3+1],ze=e[o*3+2],Fe=e[V*3],ke=e[V*3+1],Gt=e[V*3+2],Vt=e[le*3],Xt=e[le*3+1],xt=e[le*3+2];return Math.abs(Le-Pe)<Math.abs(fe-Re)?[new Vector2(fe,1-Ce),new Vector2(Re,1-ze),new Vector2(Fe,1-Gt),new Vector2(Vt,1-xt)]:[new Vector2(Le,1-Ce),new Vector2(Pe,1-ze),new Vector2(ke,1-Gt),new Vector2(Xt,1-xt)]}};function toJSON$1(v,e,r){if(r.shapes=[],Array.isArray(v))for(let o=0,V=v.length;o<V;o++){const le=v[o];r.shapes.push(le.uuid)}else r.shapes.push(v.uuid);return r.options=Object.assign({},e),e.extrudePath!==void 0&&(r.options.extrudePath=e.extrudePath.toJSON()),r}class IcosahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=(1+Math.sqrt(5))/2,V=[-1,o,0,1,o,0,-1,-o,0,1,-o,0,0,-1,o,0,1,o,0,-1,-o,0,1,-o,o,0,-1,o,0,1,-o,0,-1,-o,0,1],le=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(V,le,e,r),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new IcosahedronGeometry(e.radius,e.detail)}}class LatheGeometry extends BufferGeometry{constructor(e=[new Vector2(0,-.5),new Vector2(.5,0),new Vector2(0,.5)],r=12,o=0,V=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:r,phiStart:o,phiLength:V},r=Math.floor(r),V=clamp(V,0,Math.PI*2);const le=[],fe=[],Le=[],Ce=[],Re=[],Pe=1/r,ze=new Vector3,Fe=new Vector2,ke=new Vector3,Gt=new Vector3,Vt=new Vector3;let Xt=0,xt=0;for(let Zt=0;Zt<=e.length-1;Zt++)switch(Zt){case 0:Xt=e[Zt+1].x-e[Zt].x,xt=e[Zt+1].y-e[Zt].y,ke.x=xt*1,ke.y=-Xt,ke.z=xt*0,Vt.copy(ke),ke.normalize(),Ce.push(ke.x,ke.y,ke.z);break;case e.length-1:Ce.push(Vt.x,Vt.y,Vt.z);break;default:Xt=e[Zt+1].x-e[Zt].x,xt=e[Zt+1].y-e[Zt].y,ke.x=xt*1,ke.y=-Xt,ke.z=xt*0,Gt.copy(ke),ke.x+=Vt.x,ke.y+=Vt.y,ke.z+=Vt.z,ke.normalize(),Ce.push(ke.x,ke.y,ke.z),Vt.copy(Gt)}for(let Zt=0;Zt<=r;Zt++){const wt=o+Zt*Pe*V,Wt=Math.sin(wt),It=Math.cos(wt);for(let Nt=0;Nt<=e.length-1;Nt++){ze.x=e[Nt].x*Wt,ze.y=e[Nt].y,ze.z=e[Nt].x*It,fe.push(ze.x,ze.y,ze.z),Fe.x=Zt/r,Fe.y=Nt/(e.length-1),Le.push(Fe.x,Fe.y);const Ft=Ce[3*Nt+0]*Wt,Ht=Ce[3*Nt+1],Kt=Ce[3*Nt+0]*It;Re.push(Ft,Ht,Kt)}}for(let Zt=0;Zt<r;Zt++)for(let wt=0;wt<e.length-1;wt++){const Wt=wt+Zt*e.length,It=Wt,Nt=Wt+e.length,Ft=Wt+e.length+1,Ht=Wt+1;le.push(It,Nt,Ht),le.push(Ft,Ht,Nt)}this.setIndex(le),this.setAttribute("position",new Float32BufferAttribute(fe,3)),this.setAttribute("uv",new Float32BufferAttribute(Le,2)),this.setAttribute("normal",new Float32BufferAttribute(Re,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new LatheGeometry(e.points,e.segments,e.phiStart,e.phiLength)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],V=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(o,V,e,r),this.type="OctahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new OctahedronGeometry(e.radius,e.detail)}}class PlaneGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:r,widthSegments:o,heightSegments:V};const le=e/2,fe=r/2,Le=Math.floor(o),Ce=Math.floor(V),Re=Le+1,Pe=Ce+1,ze=e/Le,Fe=r/Ce,ke=[],Gt=[],Vt=[],Xt=[];for(let xt=0;xt<Pe;xt++){const Zt=xt*Fe-fe;for(let wt=0;wt<Re;wt++){const Wt=wt*ze-le;Gt.push(Wt,-Zt,0),Vt.push(0,0,1),Xt.push(wt/Le),Xt.push(1-xt/Ce)}}for(let xt=0;xt<Ce;xt++)for(let Zt=0;Zt<Le;Zt++){const wt=Zt+Re*xt,Wt=Zt+Re*(xt+1),It=Zt+1+Re*(xt+1),Nt=Zt+1+Re*xt;ke.push(wt,Wt,Nt),ke.push(Wt,It,Nt)}this.setIndex(ke),this.setAttribute("position",new Float32BufferAttribute(Gt,3)),this.setAttribute("normal",new Float32BufferAttribute(Vt,3)),this.setAttribute("uv",new Float32BufferAttribute(Xt,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new PlaneGeometry(e.width,e.height,e.widthSegments,e.heightSegments)}}class RingGeometry extends BufferGeometry{constructor(e=.5,r=1,o=32,V=1,le=0,fe=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:r,thetaSegments:o,phiSegments:V,thetaStart:le,thetaLength:fe},o=Math.max(3,o),V=Math.max(1,V);const Le=[],Ce=[],Re=[],Pe=[];let ze=e;const Fe=(r-e)/V,ke=new Vector3,Gt=new Vector2;for(let Vt=0;Vt<=V;Vt++){for(let Xt=0;Xt<=o;Xt++){const xt=le+Xt/o*fe;ke.x=ze*Math.cos(xt),ke.y=ze*Math.sin(xt),Ce.push(ke.x,ke.y,ke.z),Re.push(0,0,1),Gt.x=(ke.x/r+1)/2,Gt.y=(ke.y/r+1)/2,Pe.push(Gt.x,Gt.y)}ze+=Fe}for(let Vt=0;Vt<V;Vt++){const Xt=Vt*(o+1);for(let xt=0;xt<o;xt++){const Zt=xt+Xt,wt=Zt,Wt=Zt+o+1,It=Zt+o+2,Nt=Zt+1;Le.push(wt,Wt,Nt),Le.push(Wt,It,Nt)}}this.setIndex(Le),this.setAttribute("position",new Float32BufferAttribute(Ce,3)),this.setAttribute("normal",new Float32BufferAttribute(Re,3)),this.setAttribute("uv",new Float32BufferAttribute(Pe,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new RingGeometry(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(e=new Shape([new Vector2(0,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:r};const o=[],V=[],le=[],fe=[];let Le=0,Ce=0;if(Array.isArray(e)===!1)Re(e);else for(let Pe=0;Pe<e.length;Pe++)Re(e[Pe]),this.addGroup(Le,Ce,Pe),Le+=Ce,Ce=0;this.setIndex(o),this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("normal",new Float32BufferAttribute(le,3)),this.setAttribute("uv",new Float32BufferAttribute(fe,2));function Re(Pe){const ze=V.length/3,Fe=Pe.extractPoints(r);let ke=Fe.shape;const Gt=Fe.holes;ShapeUtils.isClockWise(ke)===!1&&(ke=ke.reverse());for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];ShapeUtils.isClockWise(Zt)===!0&&(Gt[Xt]=Zt.reverse())}const Vt=ShapeUtils.triangulateShape(ke,Gt);for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];ke=ke.concat(Zt)}for(let Xt=0,xt=ke.length;Xt<xt;Xt++){const Zt=ke[Xt];V.push(Zt.x,Zt.y,0),le.push(0,0,1),fe.push(Zt.x,Zt.y)}for(let Xt=0,xt=Vt.length;Xt<xt;Xt++){const Zt=Vt[Xt],wt=Zt[0]+ze,Wt=Zt[1]+ze,It=Zt[2]+ze;o.push(wt,Wt,It),Ce+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes;return toJSON(r,e)}static fromJSON(e,r){const o=[];for(let V=0,le=e.shapes.length;V<le;V++){const fe=r[e.shapes[V]];o.push(fe)}return new ShapeGeometry(o,e.curveSegments)}}function toJSON(v,e){if(e.shapes=[],Array.isArray(v))for(let r=0,o=v.length;r<o;r++){const V=v[r];e.shapes.push(V.uuid)}else e.shapes.push(v.uuid);return e}class SphereGeometry extends BufferGeometry{constructor(e=1,r=32,o=16,V=0,le=Math.PI*2,fe=0,Le=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:r,heightSegments:o,phiStart:V,phiLength:le,thetaStart:fe,thetaLength:Le},r=Math.max(3,Math.floor(r)),o=Math.max(2,Math.floor(o));const Ce=Math.min(fe+Le,Math.PI);let Re=0;const Pe=[],ze=new Vector3,Fe=new Vector3,ke=[],Gt=[],Vt=[],Xt=[];for(let xt=0;xt<=o;xt++){const Zt=[],wt=xt/o;let Wt=0;xt===0&&fe===0?Wt=.5/r:xt===o&&Ce===Math.PI&&(Wt=-.5/r);for(let It=0;It<=r;It++){const Nt=It/r;ze.x=-e*Math.cos(V+Nt*le)*Math.sin(fe+wt*Le),ze.y=e*Math.cos(fe+wt*Le),ze.z=e*Math.sin(V+Nt*le)*Math.sin(fe+wt*Le),Gt.push(ze.x,ze.y,ze.z),Fe.copy(ze).normalize(),Vt.push(Fe.x,Fe.y,Fe.z),Xt.push(Nt+Wt,1-wt),Zt.push(Re++)}Pe.push(Zt)}for(let xt=0;xt<o;xt++)for(let Zt=0;Zt<r;Zt++){const wt=Pe[xt][Zt+1],Wt=Pe[xt][Zt],It=Pe[xt+1][Zt],Nt=Pe[xt+1][Zt+1];(xt!==0||fe>0)&&ke.push(wt,Wt,Nt),(xt!==o-1||Ce<Math.PI)&&ke.push(Wt,It,Nt)}this.setIndex(ke),this.setAttribute("position",new Float32BufferAttribute(Gt,3)),this.setAttribute("normal",new Float32BufferAttribute(Vt,3)),this.setAttribute("uv",new Float32BufferAttribute(Xt,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new SphereGeometry(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],V=[2,1,0,0,3,2,1,3,0,2,3,1];super(o,V,e,r),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new TetrahedronGeometry(e.radius,e.detail)}}class TorusGeometry extends BufferGeometry{constructor(e=1,r=.4,o=12,V=48,le=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:r,radialSegments:o,tubularSegments:V,arc:le},o=Math.floor(o),V=Math.floor(V);const fe=[],Le=[],Ce=[],Re=[],Pe=new Vector3,ze=new Vector3,Fe=new Vector3;for(let ke=0;ke<=o;ke++)for(let Gt=0;Gt<=V;Gt++){const Vt=Gt/V*le,Xt=ke/o*Math.PI*2;ze.x=(e+r*Math.cos(Xt))*Math.cos(Vt),ze.y=(e+r*Math.cos(Xt))*Math.sin(Vt),ze.z=r*Math.sin(Xt),Le.push(ze.x,ze.y,ze.z),Pe.x=e*Math.cos(Vt),Pe.y=e*Math.sin(Vt),Fe.subVectors(ze,Pe).normalize(),Ce.push(Fe.x,Fe.y,Fe.z),Re.push(Gt/V),Re.push(ke/o)}for(let ke=1;ke<=o;ke++)for(let Gt=1;Gt<=V;Gt++){const Vt=(V+1)*ke+Gt-1,Xt=(V+1)*(ke-1)+Gt-1,xt=(V+1)*(ke-1)+Gt,Zt=(V+1)*ke+Gt;fe.push(Vt,Xt,Zt),fe.push(Xt,xt,Zt)}this.setIndex(fe),this.setAttribute("position",new Float32BufferAttribute(Le,3)),this.setAttribute("normal",new Float32BufferAttribute(Ce,3)),this.setAttribute("uv",new Float32BufferAttribute(Re,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new TorusGeometry(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(e=1,r=.4,o=64,V=8,le=2,fe=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:r,tubularSegments:o,radialSegments:V,p:le,q:fe},o=Math.floor(o),V=Math.floor(V);const Le=[],Ce=[],Re=[],Pe=[],ze=new Vector3,Fe=new Vector3,ke=new Vector3,Gt=new Vector3,Vt=new Vector3,Xt=new Vector3,xt=new Vector3;for(let wt=0;wt<=o;++wt){const Wt=wt/o*le*Math.PI*2;Zt(Wt,le,fe,e,ke),Zt(Wt+.01,le,fe,e,Gt),Xt.subVectors(Gt,ke),xt.addVectors(Gt,ke),Vt.crossVectors(Xt,xt),xt.crossVectors(Vt,Xt),Vt.normalize(),xt.normalize();for(let It=0;It<=V;++It){const Nt=It/V*Math.PI*2,Ft=-r*Math.cos(Nt),Ht=r*Math.sin(Nt);ze.x=ke.x+(Ft*xt.x+Ht*Vt.x),ze.y=ke.y+(Ft*xt.y+Ht*Vt.y),ze.z=ke.z+(Ft*xt.z+Ht*Vt.z),Ce.push(ze.x,ze.y,ze.z),Fe.subVectors(ze,ke).normalize(),Re.push(Fe.x,Fe.y,Fe.z),Pe.push(wt/o),Pe.push(It/V)}}for(let wt=1;wt<=o;wt++)for(let Wt=1;Wt<=V;Wt++){const It=(V+1)*(wt-1)+(Wt-1),Nt=(V+1)*wt+(Wt-1),Ft=(V+1)*wt+Wt,Ht=(V+1)*(wt-1)+Wt;Le.push(It,Nt,Ht),Le.push(Nt,Ft,Ht)}this.setIndex(Le),this.setAttribute("position",new Float32BufferAttribute(Ce,3)),this.setAttribute("normal",new Float32BufferAttribute(Re,3)),this.setAttribute("uv",new Float32BufferAttribute(Pe,2));function Zt(wt,Wt,It,Nt,Ft){const Ht=Math.cos(wt),Kt=Math.sin(wt),Yt=It/Wt*wt,jt=Math.cos(Yt);Ft.x=Nt*(2+jt)*.5*Ht,Ft.y=Nt*(2+jt)*Kt*.5,Ft.z=Nt*Math.sin(Yt)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new TorusKnotGeometry(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class TubeGeometry extends BufferGeometry{constructor(e=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),r=64,o=1,V=8,le=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:r,radius:o,radialSegments:V,closed:le};const fe=e.computeFrenetFrames(r,le);this.tangents=fe.tangents,this.normals=fe.normals,this.binormals=fe.binormals;const Le=new Vector3,Ce=new Vector3,Re=new Vector2;let Pe=new Vector3;const ze=[],Fe=[],ke=[],Gt=[];Vt(),this.setIndex(Gt),this.setAttribute("position",new Float32BufferAttribute(ze,3)),this.setAttribute("normal",new Float32BufferAttribute(Fe,3)),this.setAttribute("uv",new Float32BufferAttribute(ke,2));function Vt(){for(let wt=0;wt<r;wt++)Xt(wt);Xt(le===!1?r:0),Zt(),xt()}function Xt(wt){Pe=e.getPointAt(wt/r,Pe);const Wt=fe.normals[wt],It=fe.binormals[wt];for(let Nt=0;Nt<=V;Nt++){const Ft=Nt/V*Math.PI*2,Ht=Math.sin(Ft),Kt=-Math.cos(Ft);Ce.x=Kt*Wt.x+Ht*It.x,Ce.y=Kt*Wt.y+Ht*It.y,Ce.z=Kt*Wt.z+Ht*It.z,Ce.normalize(),Fe.push(Ce.x,Ce.y,Ce.z),Le.x=Pe.x+o*Ce.x,Le.y=Pe.y+o*Ce.y,Le.z=Pe.z+o*Ce.z,ze.push(Le.x,Le.y,Le.z)}}function xt(){for(let wt=1;wt<=r;wt++)for(let Wt=1;Wt<=V;Wt++){const It=(V+1)*(wt-1)+(Wt-1),Nt=(V+1)*wt+(Wt-1),Ft=(V+1)*wt+Wt,Ht=(V+1)*(wt-1)+Wt;Gt.push(It,Nt,Ht),Gt.push(Nt,Ft,Ht)}}function Zt(){for(let wt=0;wt<=r;wt++)for(let Wt=0;Wt<=V;Wt++)Re.x=wt/r,Re.y=Wt/V,ke.push(Re.x,Re.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new TubeGeometry(new Curves[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class WireframeGeometry extends BufferGeometry{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const r=[],o=new Set,V=new Vector3,le=new Vector3;if(e.index!==null){const fe=e.attributes.position,Le=e.index;let Ce=e.groups;Ce.length===0&&(Ce=[{start:0,count:Le.count,materialIndex:0}]);for(let Re=0,Pe=Ce.length;Re<Pe;++Re){const ze=Ce[Re],Fe=ze.start,ke=ze.count;for(let Gt=Fe,Vt=Fe+ke;Gt<Vt;Gt+=3)for(let Xt=0;Xt<3;Xt++){const xt=Le.getX(Gt+Xt),Zt=Le.getX(Gt+(Xt+1)%3);V.fromBufferAttribute(fe,xt),le.fromBufferAttribute(fe,Zt),isUniqueEdge(V,le,o)===!0&&(r.push(V.x,V.y,V.z),r.push(le.x,le.y,le.z))}}}else{const fe=e.attributes.position;for(let Le=0,Ce=fe.count/3;Le<Ce;Le++)for(let Re=0;Re<3;Re++){const Pe=3*Le+Re,ze=3*Le+(Re+1)%3;V.fromBufferAttribute(fe,Pe),le.fromBufferAttribute(fe,ze),isUniqueEdge(V,le,o)===!0&&(r.push(V.x,V.y,V.z),r.push(le.x,le.y,le.z))}}this.setAttribute("position",new Float32BufferAttribute(r,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function isUniqueEdge(v,e,r){const o=`${v.x},${v.y},${v.z}-${e.x},${e.y},${e.z}`,V=`${e.x},${e.y},${e.z}-${v.x},${v.y},${v.z}`;return r.has(o)===!0||r.has(V)===!0?!1:(r.add(o),r.add(V),!0)}var Geometries=Object.freeze({__proto__:null,BoxGeometry,CapsuleGeometry,CircleGeometry,ConeGeometry,CylinderGeometry,DodecahedronGeometry,EdgesGeometry,ExtrudeGeometry,IcosahedronGeometry,LatheGeometry,OctahedronGeometry,PlaneGeometry,PolyhedronGeometry,RingGeometry,ShapeGeometry,SphereGeometry,TetrahedronGeometry,TorusGeometry,TorusKnotGeometry,TubeGeometry,WireframeGeometry});class ShadowMaterial extends Material{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Color$1(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class RawShaderMaterial extends ShaderMaterial{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Color$1(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Vector2(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(r){this.ior=(1+.4*r)/(1-.4*r)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Color$1(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Color$1(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Color$1(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class MeshPhongMaterial extends Material{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Color$1(16777215),this.specular=new Color$1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshToonMaterial extends Material{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Color$1(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class MeshNormalMaterial extends Material{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class MeshLambertMaterial extends Material{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshDepthMaterial extends Material{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class MeshMatcapMaterial extends Material{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Color$1(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class LineDashedMaterial extends LineBasicMaterial{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function convertArray(v,e){return!v||v.constructor===e?v:typeof e.BYTES_PER_ELEMENT=="number"?new e(v):Array.prototype.slice.call(v)}function getKeyframeOrder(v){function e(V,le){return v[V]-v[le]}const r=v.length,o=new Array(r);for(let V=0;V!==r;++V)o[V]=V;return o.sort(e),o}function sortedArray(v,e,r){const o=v.length,V=new v.constructor(o);for(let le=0,fe=0;fe!==o;++le){const Le=r[le]*e;for(let Ce=0;Ce!==e;++Ce)V[fe++]=v[Le+Ce]}return V}function flattenJSON(v,e,r,o){let V=1,le=v[0];for(;le!==void 0&&le[o]===void 0;)le=v[V++];if(le===void 0)return;let fe=le[o];if(fe!==void 0)if(Array.isArray(fe))do fe=le[o],fe!==void 0&&(e.push(le.time),r.push(...fe)),le=v[V++];while(le!==void 0);else if(fe.toArray!==void 0)do fe=le[o],fe!==void 0&&(e.push(le.time),fe.toArray(r,r.length)),le=v[V++];while(le!==void 0);else do fe=le[o],fe!==void 0&&(e.push(le.time),r.push(fe)),le=v[V++];while(le!==void 0)}function subclip(v,e,r,o,V=30){const le=v.clone();le.name=e;const fe=[];for(let Ce=0;Ce<le.tracks.length;++Ce){const Re=le.tracks[Ce],Pe=Re.getValueSize(),ze=[],Fe=[];for(let ke=0;ke<Re.times.length;++ke){const Gt=Re.times[ke]*V;if(!(Gt<r||Gt>=o)){ze.push(Re.times[ke]);for(let Vt=0;Vt<Pe;++Vt)Fe.push(Re.values[ke*Pe+Vt])}}ze.length!==0&&(Re.times=convertArray(ze,Re.times.constructor),Re.values=convertArray(Fe,Re.values.constructor),fe.push(Re))}le.tracks=fe;let Le=1/0;for(let Ce=0;Ce<le.tracks.length;++Ce)Le>le.tracks[Ce].times[0]&&(Le=le.tracks[Ce].times[0]);for(let Ce=0;Ce<le.tracks.length;++Ce)le.tracks[Ce].shift(-1*Le);return le.resetDuration(),le}function makeClipAdditive(v,e=0,r=v,o=30){o<=0&&(o=30);const V=r.tracks.length,le=e/o;for(let fe=0;fe<V;++fe){const Le=r.tracks[fe],Ce=Le.ValueTypeName;if(Ce==="bool"||Ce==="string")continue;const Re=v.tracks.find(function(xt){return xt.name===Le.name&&xt.ValueTypeName===Ce});if(Re===void 0)continue;let Pe=0;const ze=Le.getValueSize();Le.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Pe=ze/3);let Fe=0;const ke=Re.getValueSize();Re.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Fe=ke/3);const Gt=Le.times.length-1;let Vt;if(le<=Le.times[0]){const xt=Pe,Zt=ze-Pe;Vt=Le.values.slice(xt,Zt)}else if(le>=Le.times[Gt]){const xt=Gt*ze+Pe,Zt=xt+ze-Pe;Vt=Le.values.slice(xt,Zt)}else{const xt=Le.createInterpolant(),Zt=Pe,wt=ze-Pe;xt.evaluate(le),Vt=xt.resultBuffer.slice(Zt,wt)}Ce==="quaternion"&&new Quaternion().fromArray(Vt).normalize().conjugate().toArray(Vt);const Xt=Re.times.length;for(let xt=0;xt<Xt;++xt){const Zt=xt*ke+Fe;if(Ce==="quaternion")Quaternion.multiplyQuaternionsFlat(Re.values,Zt,Vt,0,Re.values,Zt);else{const wt=ke-Fe*2;for(let Wt=0;Wt<wt;++Wt)Re.values[Zt+Wt]-=Vt[Wt]}}}return v.blendMode=AdditiveAnimationBlendMode,v}class AnimationUtils{static convertArray(e,r){return convertArray(e,r)}static isTypedArray(e){return isTypedArray(e)}static getKeyframeOrder(e){return getKeyframeOrder(e)}static sortedArray(e,r,o){return sortedArray(e,r,o)}static flattenJSON(e,r,o,V){flattenJSON(e,r,o,V)}static subclip(e,r,o,V,le=30){return subclip(e,r,o,V,le)}static makeClipAdditive(e,r=0,o=e,V=30){return makeClipAdditive(e,r,o,V)}}class Interpolant{constructor(e,r,o,V){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=V!==void 0?V:new r.constructor(o),this.sampleValues=r,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(e){const r=this.parameterPositions;let o=this._cachedIndex,V=r[o],le=r[o-1];e:{t:{let fe;i:{n:if(!(e<V)){for(let Le=o+2;;){if(V===void 0){if(e<le)break n;return o=r.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===Le)break;if(le=V,V=r[++o],e<V)break t}fe=r.length;break i}if(!(e>=le)){const Le=r[1];e<Le&&(o=2,le=Le);for(let Ce=o-2;;){if(le===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(o===Ce)break;if(V=le,le=r[--o-1],e>=le)break t}fe=o,o=0;break i}break e}for(;o<fe;){const Le=o+fe>>>1;e<r[Le]?fe=Le:o=Le+1}if(V=r[o],le=r[o-1],le===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(V===void 0)return o=r.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,le,V)}return this.interpolate_(o,le,e,V)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const r=this.resultBuffer,o=this.sampleValues,V=this.valueSize,le=e*V;for(let fe=0;fe!==V;++fe)r[fe]=o[le+fe];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(e,r,o){const V=this.parameterPositions;let le=e-2,fe=e+1,Le=V[le],Ce=V[fe];if(Le===void 0)switch(this.getSettings_().endingStart){case ZeroSlopeEnding:le=e,Le=2*r-o;break;case WrapAroundEnding:le=V.length-2,Le=r+V[le]-V[le+1];break;default:le=e,Le=o}if(Ce===void 0)switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:fe=e,Ce=2*o-r;break;case WrapAroundEnding:fe=1,Ce=o+V[1]-V[0];break;default:fe=e-1,Ce=r}const Re=(o-r)*.5,Pe=this.valueSize;this._weightPrev=Re/(r-Le),this._weightNext=Re/(Ce-o),this._offsetPrev=le*Pe,this._offsetNext=fe*Pe}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=e*Le,Re=Ce-Le,Pe=this._offsetPrev,ze=this._offsetNext,Fe=this._weightPrev,ke=this._weightNext,Gt=(o-r)/(V-r),Vt=Gt*Gt,Xt=Vt*Gt,xt=-Fe*Xt+2*Fe*Vt-Fe*Gt,Zt=(1+Fe)*Xt+(-1.5-2*Fe)*Vt+(-.5+Fe)*Gt+1,wt=(-1-ke)*Xt+(1.5+ke)*Vt+.5*Gt,Wt=ke*Xt-ke*Vt;for(let It=0;It!==Le;++It)le[It]=xt*fe[Pe+It]+Zt*fe[Re+It]+wt*fe[Ce+It]+Wt*fe[ze+It];return le}}class LinearInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=e*Le,Re=Ce-Le,Pe=(o-r)/(V-r),ze=1-Pe;for(let Fe=0;Fe!==Le;++Fe)le[Fe]=fe[Re+Fe]*ze+fe[Ce+Fe]*Pe;return le}}class DiscreteInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e){return this.copySampleValue_(e-1)}}class KeyframeTrack{constructor(e,r,o,V){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=convertArray(r,this.TimeBufferType),this.values=convertArray(o,this.ValueBufferType),this.setInterpolation(V||this.DefaultInterpolation)}static toJSON(e){const r=e.constructor;let o;if(r.toJSON!==this.toJSON)o=r.toJSON(e);else{o={name:e.name,times:convertArray(e.times,Array),values:convertArray(e.values,Array)};const V=e.getInterpolation();V!==e.DefaultInterpolation&&(o.interpolation=V)}return o.type=e.ValueTypeName,o}InterpolantFactoryMethodDiscrete(e){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new LinearInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new CubicInterpolant(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let r;switch(e){case InterpolateDiscrete:r=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:r=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){const o="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(o);return warn("KeyframeTrack:",o),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const r=this.times;for(let o=0,V=r.length;o!==V;++o)r[o]+=e}return this}scale(e){if(e!==1){const r=this.times;for(let o=0,V=r.length;o!==V;++o)r[o]*=e}return this}trim(e,r){const o=this.times,V=o.length;let le=0,fe=V-1;for(;le!==V&&o[le]<e;)++le;for(;fe!==-1&&o[fe]>r;)--fe;if(++fe,le!==0||fe!==V){le>=fe&&(fe=Math.max(fe,1),le=fe-1);const Le=this.getValueSize();this.times=o.slice(le,fe),this.values=this.values.slice(le*Le,fe*Le)}return this}validate(){let e=!0;const r=this.getValueSize();r-Math.floor(r)!==0&&(error$1("KeyframeTrack: Invalid value size in track.",this),e=!1);const o=this.times,V=this.values,le=o.length;le===0&&(error$1("KeyframeTrack: Track is empty.",this),e=!1);let fe=null;for(let Le=0;Le!==le;Le++){const Ce=o[Le];if(typeof Ce=="number"&&isNaN(Ce)){error$1("KeyframeTrack: Time is not a valid number.",this,Le,Ce),e=!1;break}if(fe!==null&&fe>Ce){error$1("KeyframeTrack: Out of order keys.",this,Le,Ce,fe),e=!1;break}fe=Ce}if(V!==void 0&&isTypedArray(V))for(let Le=0,Ce=V.length;Le!==Ce;++Le){const Re=V[Le];if(isNaN(Re)){error$1("KeyframeTrack: Value is not a valid number.",this,Le,Re),e=!1;break}}return e}optimize(){const e=this.times.slice(),r=this.values.slice(),o=this.getValueSize(),V=this.getInterpolation()===InterpolateSmooth,le=e.length-1;let fe=1;for(let Le=1;Le<le;++Le){let Ce=!1;const Re=e[Le],Pe=e[Le+1];if(Re!==Pe&&(Le!==1||Re!==e[0]))if(V)Ce=!0;else{const ze=Le*o,Fe=ze-o,ke=ze+o;for(let Gt=0;Gt!==o;++Gt){const Vt=r[ze+Gt];if(Vt!==r[Fe+Gt]||Vt!==r[ke+Gt]){Ce=!0;break}}}if(Ce){if(Le!==fe){e[fe]=e[Le];const ze=Le*o,Fe=fe*o;for(let ke=0;ke!==o;++ke)r[Fe+ke]=r[ze+ke]}++fe}}if(le>0){e[fe]=e[le];for(let Le=le*o,Ce=fe*o,Re=0;Re!==o;++Re)r[Ce+Re]=r[Le+Re];++fe}return fe!==e.length?(this.times=e.slice(0,fe),this.values=r.slice(0,fe*o)):(this.times=e,this.values=r),this}clone(){const e=this.times.slice(),r=this.values.slice(),o=this.constructor,V=new o(this.name,e,r);return V.createInterpolant=this.createInterpolant,V}}KeyframeTrack.prototype.ValueTypeName="";KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(e,r,o){super(e,r,o)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=(o-r)/(V-r);let Re=e*Le;for(let Pe=Re+Le;Re!==Pe;Re+=4)Quaternion.slerpFlat(le,0,fe,Re-Le,fe,Re,Ce);return le}}class QuaternionKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{constructor(e,r,o){super(e,r,o)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(e="",r=-1,o=[],V=NormalAnimationBlendMode){this.name=e,this.tracks=o,this.duration=r,this.blendMode=V,this.uuid=generateUUID(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const r=[],o=e.tracks,V=1/(e.fps||1);for(let fe=0,Le=o.length;fe!==Le;++fe)r.push(parseKeyframeTrack(o[fe]).scale(V));const le=new this(e.name,e.duration,r,e.blendMode);return le.uuid=e.uuid,le.userData=JSON.parse(e.userData||"{}"),le}static toJSON(e){const r=[],o=e.tracks,V={name:e.name,duration:e.duration,tracks:r,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let le=0,fe=o.length;le!==fe;++le)r.push(KeyframeTrack.toJSON(o[le]));return V}static CreateFromMorphTargetSequence(e,r,o,V){const le=r.length,fe=[];for(let Le=0;Le<le;Le++){let Ce=[],Re=[];Ce.push((Le+le-1)%le,Le,(Le+1)%le),Re.push(0,1,0);const Pe=getKeyframeOrder(Ce);Ce=sortedArray(Ce,1,Pe),Re=sortedArray(Re,1,Pe),!V&&Ce[0]===0&&(Ce.push(le),Re.push(Re[0])),fe.push(new NumberKeyframeTrack(".morphTargetInfluences["+r[Le].name+"]",Ce,Re).scale(1/o))}return new this(e,-1,fe)}static findByName(e,r){let o=e;if(!Array.isArray(e)){const V=e;o=V.geometry&&V.geometry.animations||V.animations}for(let V=0;V<o.length;V++)if(o[V].name===r)return o[V];return null}static CreateClipsFromMorphTargetSequences(e,r,o){const V={},le=/^([\w-]*?)([\d]+)$/;for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le],Pe=Re.name.match(le);if(Pe&&Pe.length>1){const ze=Pe[1];let Fe=V[ze];Fe||(V[ze]=Fe=[]),Fe.push(Re)}}const fe=[];for(const Le in V)fe.push(this.CreateFromMorphTargetSequence(Le,V[Le],r,o));return fe}static parseAnimation(e,r){if(warn("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return error$1("AnimationClip: No animation in JSONLoader data."),null;const o=function(ze,Fe,ke,Gt,Vt){if(ke.length!==0){const Xt=[],xt=[];flattenJSON(ke,Xt,xt,Gt),Xt.length!==0&&Vt.push(new ze(Fe,Xt,xt))}},V=[],le=e.name||"default",fe=e.fps||30,Le=e.blendMode;let Ce=e.length||-1;const Re=e.hierarchy||[];for(let ze=0;ze<Re.length;ze++){const Fe=Re[ze].keys;if(!(!Fe||Fe.length===0))if(Fe[0].morphTargets){const ke={};let Gt;for(Gt=0;Gt<Fe.length;Gt++)if(Fe[Gt].morphTargets)for(let Vt=0;Vt<Fe[Gt].morphTargets.length;Vt++)ke[Fe[Gt].morphTargets[Vt]]=-1;for(const Vt in ke){const Xt=[],xt=[];for(let Zt=0;Zt!==Fe[Gt].morphTargets.length;++Zt){const wt=Fe[Gt];Xt.push(wt.time),xt.push(wt.morphTarget===Vt?1:0)}V.push(new NumberKeyframeTrack(".morphTargetInfluence["+Vt+"]",Xt,xt))}Ce=ke.length*fe}else{const ke=".bones["+r[ze].name+"]";o(VectorKeyframeTrack,ke+".position",Fe,"pos",V),o(QuaternionKeyframeTrack,ke+".quaternion",Fe,"rot",V),o(VectorKeyframeTrack,ke+".scale",Fe,"scl",V)}}return V.length===0?null:new this(le,Ce,V,Le)}resetDuration(){const e=this.tracks;let r=0;for(let o=0,V=e.length;o!==V;++o){const le=this.tracks[o];r=Math.max(r,le.times[le.times.length-1])}return this.duration=r,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let r=0;r<this.tracks.length;r++)e=e&&this.tracks[r].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let o=0;o<this.tracks.length;o++)e.push(this.tracks[o].clone());const r=new this.constructor(this.name,this.duration,e,this.blendMode);return r.userData=JSON.parse(JSON.stringify(this.userData)),r}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(v){switch(v.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+v)}function parseKeyframeTrack(v){if(v.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=getTrackTypeForValueTypeName(v.type);if(v.times===void 0){const r=[],o=[];flattenJSON(v.keys,r,o,"value"),v.times=r,v.values=o}return e.parse!==void 0?e.parse(v):new e(v.name,v.times,v.values,v.interpolation)}const Cache={enabled:!1,files:{},add:function(v,e){this.enabled!==!1&&(this.files[v]=e)},get:function(v){if(this.enabled!==!1)return this.files[v]},remove:function(v){delete this.files[v]},clear:function(){this.files={}}};class LoadingManager{constructor(e,r,o){const V=this;let le=!1,fe=0,Le=0,Ce;const Re=[];this.onStart=void 0,this.onLoad=e,this.onProgress=r,this.onError=o,this._abortController=null,this.itemStart=function(Pe){Le++,le===!1&&V.onStart!==void 0&&V.onStart(Pe,fe,Le),le=!0},this.itemEnd=function(Pe){fe++,V.onProgress!==void 0&&V.onProgress(Pe,fe,Le),fe===Le&&(le=!1,V.onLoad!==void 0&&V.onLoad())},this.itemError=function(Pe){V.onError!==void 0&&V.onError(Pe)},this.resolveURL=function(Pe){return Ce?Ce(Pe):Pe},this.setURLModifier=function(Pe){return Ce=Pe,this},this.addHandler=function(Pe,ze){return Re.push(Pe,ze),this},this.removeHandler=function(Pe){const ze=Re.indexOf(Pe);return ze!==-1&&Re.splice(ze,2),this},this.getHandler=function(Pe){for(let ze=0,Fe=Re.length;ze<Fe;ze+=2){const ke=Re[ze],Gt=Re[ze+1];if(ke.global&&(ke.lastIndex=0),ke.test(Pe))return Gt}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(e){this.manager=e!==void 0?e:DefaultLoadingManager,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,r){const o=this;return new Promise(function(V,le){o.load(e,V,r,le)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(e,r){super(e),this.response=r}}class FileLoader extends Loader{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,r,o,V){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=Cache.get(`file:${e}`);if(le!==void 0)return this.manager.itemStart(e),setTimeout(()=>{r&&r(le),this.manager.itemEnd(e)},0),le;if(loading[e]!==void 0){loading[e].push({onLoad:r,onProgress:o,onError:V});return}loading[e]=[],loading[e].push({onLoad:r,onProgress:o,onError:V});const fe=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),Le=this.mimeType,Ce=this.responseType;fetch(fe).then(Re=>{if(Re.status===200||Re.status===0){if(Re.status===0&&warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||Re.body===void 0||Re.body.getReader===void 0)return Re;const Pe=loading[e],ze=Re.body.getReader(),Fe=Re.headers.get("X-File-Size")||Re.headers.get("Content-Length"),ke=Fe?parseInt(Fe):0,Gt=ke!==0;let Vt=0;const Xt=new ReadableStream({start(xt){Zt();function Zt(){ze.read().then(({done:wt,value:Wt})=>{if(wt)xt.close();else{Vt+=Wt.byteLength;const It=new ProgressEvent("progress",{lengthComputable:Gt,loaded:Vt,total:ke});for(let Nt=0,Ft=Pe.length;Nt<Ft;Nt++){const Ht=Pe[Nt];Ht.onProgress&&Ht.onProgress(It)}xt.enqueue(Wt),Zt()}},wt=>{xt.error(wt)})}}});return new Response(Xt)}else throw new HttpError(`fetch for "${Re.url}" responded with ${Re.status}: ${Re.statusText}`,Re)}).then(Re=>{switch(Ce){case"arraybuffer":return Re.arrayBuffer();case"blob":return Re.blob();case"document":return Re.text().then(Pe=>new DOMParser().parseFromString(Pe,Le));case"json":return Re.json();default:if(Le==="")return Re.text();{const ze=/charset="?([^;"\s]*)"?/i.exec(Le),Fe=ze&&ze[1]?ze[1].toLowerCase():void 0,ke=new TextDecoder(Fe);return Re.arrayBuffer().then(Gt=>ke.decode(Gt))}}}).then(Re=>{Cache.add(`file:${e}`,Re);const Pe=loading[e];delete loading[e];for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];ke.onLoad&&ke.onLoad(Re)}}).catch(Re=>{const Pe=loading[e];if(Pe===void 0)throw this.manager.itemError(e),Re;delete loading[e];for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];ke.onError&&ke.onError(Re)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class AnimationLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(this.manager);fe.setPath(this.path),fe.setRequestHeader(this.requestHeader),fe.setWithCredentials(this.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r=[];for(let o=0;o<e.length;o++){const V=AnimationClip.parse(e[o]);r.push(V)}return r}}class CompressedTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=[],Le=new CompressedTexture,Ce=new FileLoader(this.manager);Ce.setPath(this.path),Ce.setResponseType("arraybuffer"),Ce.setRequestHeader(this.requestHeader),Ce.setWithCredentials(le.withCredentials);let Re=0;function Pe(ze){Ce.load(e[ze],function(Fe){const ke=le.parse(Fe,!0);fe[ze]={width:ke.width,height:ke.height,format:ke.format,mipmaps:ke.mipmaps},Re+=1,Re===6&&(ke.mipmapCount===1&&(Le.minFilter=LinearFilter),Le.image=fe,Le.format=ke.format,Le.needsUpdate=!0,r&&r(Le))},o,V)}if(Array.isArray(e))for(let ze=0,Fe=e.length;ze<Fe;++ze)Pe(ze);else Ce.load(e,function(ze){const Fe=le.parse(ze,!0);if(Fe.isCubemap){const ke=Fe.mipmaps.length/Fe.mipmapCount;for(let Gt=0;Gt<ke;Gt++){fe[Gt]={mipmaps:[]};for(let Vt=0;Vt<Fe.mipmapCount;Vt++)fe[Gt].mipmaps.push(Fe.mipmaps[Gt*Fe.mipmapCount+Vt]),fe[Gt].format=Fe.format,fe[Gt].width=Fe.width,fe[Gt].height=Fe.height}Le.image=fe}else Le.image.width=Fe.width,Le.image.height=Fe.height,Le.mipmaps=Fe.mipmaps;Fe.mipmapCount===1&&(Le.minFilter=LinearFilter),Le.format=Fe.format,Le.needsUpdate=!0,r&&r(Le)},o,V);return Le}}const _loading=new WeakMap;class ImageLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=this,fe=Cache.get(`image:${e}`);if(fe!==void 0){if(fe.complete===!0)le.manager.itemStart(e),setTimeout(function(){r&&r(fe),le.manager.itemEnd(e)},0);else{let ze=_loading.get(fe);ze===void 0&&(ze=[],_loading.set(fe,ze)),ze.push({onLoad:r,onError:V})}return fe}const Le=createElementNS("img");function Ce(){Pe(),r&&r(this);const ze=_loading.get(this)||[];for(let Fe=0;Fe<ze.length;Fe++){const ke=ze[Fe];ke.onLoad&&ke.onLoad(this)}_loading.delete(this),le.manager.itemEnd(e)}function Re(ze){Pe(),V&&V(ze),Cache.remove(`image:${e}`);const Fe=_loading.get(this)||[];for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke];Gt.onError&&Gt.onError(ze)}_loading.delete(this),le.manager.itemError(e),le.manager.itemEnd(e)}function Pe(){Le.removeEventListener("load",Ce,!1),Le.removeEventListener("error",Re,!1)}return Le.addEventListener("load",Ce,!1),Le.addEventListener("error",Re,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(Le.crossOrigin=this.crossOrigin),Cache.add(`image:${e}`,Le),le.manager.itemStart(e),Le.src=e,Le}}class CubeTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=new CubeTexture;le.colorSpace=SRGBColorSpace;const fe=new ImageLoader(this.manager);fe.setCrossOrigin(this.crossOrigin),fe.setPath(this.path);let Le=0;function Ce(Re){fe.load(e[Re],function(Pe){le.images[Re]=Pe,Le++,Le===6&&(le.needsUpdate=!0,r&&r(le))},void 0,V)}for(let Re=0;Re<e.length;++Re)Ce(Re);return le}}class DataTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new DataTexture,Le=new FileLoader(this.manager);return Le.setResponseType("arraybuffer"),Le.setRequestHeader(this.requestHeader),Le.setPath(this.path),Le.setWithCredentials(le.withCredentials),Le.load(e,function(Ce){let Re;try{Re=le.parse(Ce)}catch(Pe){if(V!==void 0)V(Pe);else{Pe(Pe);return}}Re.image!==void 0?fe.image=Re.image:Re.data!==void 0&&(fe.image.width=Re.width,fe.image.height=Re.height,fe.image.data=Re.data),fe.wrapS=Re.wrapS!==void 0?Re.wrapS:ClampToEdgeWrapping,fe.wrapT=Re.wrapT!==void 0?Re.wrapT:ClampToEdgeWrapping,fe.magFilter=Re.magFilter!==void 0?Re.magFilter:LinearFilter,fe.minFilter=Re.minFilter!==void 0?Re.minFilter:LinearFilter,fe.anisotropy=Re.anisotropy!==void 0?Re.anisotropy:1,Re.colorSpace!==void 0&&(fe.colorSpace=Re.colorSpace),Re.flipY!==void 0&&(fe.flipY=Re.flipY),Re.format!==void 0&&(fe.format=Re.format),Re.type!==void 0&&(fe.type=Re.type),Re.mipmaps!==void 0&&(fe.mipmaps=Re.mipmaps,fe.minFilter=LinearMipmapLinearFilter),Re.mipmapCount===1&&(fe.minFilter=LinearFilter),Re.generateMipmaps!==void 0&&(fe.generateMipmaps=Re.generateMipmaps),fe.needsUpdate=!0,r&&r(fe,Re)},o,V),fe}}class TextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=new Texture,fe=new ImageLoader(this.manager);return fe.setCrossOrigin(this.crossOrigin),fe.setPath(this.path),fe.load(e,function(Le){le.image=Le,le.needsUpdate=!0,r!==void 0&&r(le)},o,V),le}}let Light$1=class extends Object3D{constructor(e,r=1){super(),this.isLight=!0,this.type="Light",this.color=new Color$1(e),this.intensity=r}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,r){return super.copy(e,r),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const r=super.toJSON(e);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,r}};class HemisphereLight extends Light$1{constructor(e,r,o){super(e,o),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Color$1(r)}copy(e,r){return super.copy(e,r),this.groundColor.copy(e.groundColor),this}toJSON(e){const r=super.toJSON(e);return r.object.groundColor=this.groundColor.getHex(),r}}const _projScreenMatrix$2=new Matrix4,_lightPositionWorld$1=new Vector3,_lookTarget$1=new Vector3;class LightShadow{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Vector2(512,512),this.mapType=UnsignedByteType,this.map=null,this.mapPass=null,this.matrix=new Matrix4,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Frustum,this._frameExtents=new Vector2(1,1),this._viewportCount=1,this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const r=this.camera,o=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(e.matrixWorld),r.position.copy(_lightPositionWorld$1),_lookTarget$1.setFromMatrixPosition(e.target.matrixWorld),r.lookAt(_lookTarget$1),r.updateMatrixWorld(),_projScreenMatrix$2.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(_projScreenMatrix$2,r.coordinateSystem,r.reversedDepth),r.reversedDepth?o.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):o.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),o.multiply(_projScreenMatrix$2)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const r=this.camera,o=RAD2DEG*2*e.angle*this.focus,V=this.mapSize.width/this.mapSize.height*this.aspect,le=e.distance||r.far;(o!==r.fov||V!==r.aspect||le!==r.far)&&(r.fov=o,r.aspect=V,r.far=le,r.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class SpotLight extends Light$1{constructor(e,r,o=0,V=Math.PI/3,le=0,fe=2){super(e,r),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.distance=o,this.angle=V,this.penumbra=le,this.decay=fe,this.map=null,this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.distance=this.distance,r.object.angle=this.angle,r.object.decay=this.decay,r.object.penumbra=this.penumbra,r.object.target=this.target.uuid,this.map&&this.map.isTexture&&(r.object.map=this.map.toJSON(e).uuid),r.object.shadow=this.shadow.toJSON(),r}}class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,.5,500)),this.isPointLightShadow=!0}}class PointLight extends Light$1{constructor(e,r,o=0,V=2){super(e,r),this.isPointLight=!0,this.type="PointLight",this.distance=o,this.decay=V,this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.distance=this.distance,r.object.decay=this.decay,r.object.shadow=this.shadow.toJSON(),r}}class OrthographicCamera extends Camera$1{constructor(e=-1,r=1,o=1,V=-1,le=.1,fe=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=r,this.top=o,this.bottom=V,this.near=le,this.far=fe,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,r,o,V,le,fe){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=o,this.view.offsetY=V,this.view.width=le,this.view.height=fe,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),o=(this.right+this.left)/2,V=(this.top+this.bottom)/2;let le=o-e,fe=o+e,Le=V+r,Ce=V-r;if(this.view!==null&&this.view.enabled){const Re=(this.right-this.left)/this.view.fullWidth/this.zoom,Pe=(this.top-this.bottom)/this.view.fullHeight/this.zoom;le+=Re*this.view.offsetX,fe=le+Re*this.view.width,Le-=Pe*this.view.offsetY,Ce=Le-Pe*this.view.height}this.projectionMatrix.makeOrthographic(le,fe,Le,Ce,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DirectionalLight extends Light$1{constructor(e,r){super(e,r),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.shadow=new DirectionalLightShadow}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.shadow=this.shadow.toJSON(),r.object.target=this.target.uuid,r}}class AmbientLight extends Light$1{constructor(e,r){super(e,r),this.isAmbientLight=!0,this.type="AmbientLight"}}class RectAreaLight extends Light$1{constructor(e,r,o=10,V=10){super(e,r),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=o,this.height=V}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const r=super.toJSON(e);return r.object.width=this.width,r.object.height=this.height,r}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Vector3)}set(e){for(let r=0;r<9;r++)this.coefficients[r].copy(e[r]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,r){const o=e.x,V=e.y,le=e.z,fe=this.coefficients;return r.copy(fe[0]).multiplyScalar(.282095),r.addScaledVector(fe[1],.488603*V),r.addScaledVector(fe[2],.488603*le),r.addScaledVector(fe[3],.488603*o),r.addScaledVector(fe[4],1.092548*(o*V)),r.addScaledVector(fe[5],1.092548*(V*le)),r.addScaledVector(fe[6],.315392*(3*le*le-1)),r.addScaledVector(fe[7],1.092548*(o*le)),r.addScaledVector(fe[8],.546274*(o*o-V*V)),r}getIrradianceAt(e,r){const o=e.x,V=e.y,le=e.z,fe=this.coefficients;return r.copy(fe[0]).multiplyScalar(.886227),r.addScaledVector(fe[1],2*.511664*V),r.addScaledVector(fe[2],2*.511664*le),r.addScaledVector(fe[3],2*.511664*o),r.addScaledVector(fe[4],2*.429043*o*V),r.addScaledVector(fe[5],2*.429043*V*le),r.addScaledVector(fe[6],.743125*le*le-.247708),r.addScaledVector(fe[7],2*.429043*o*le),r.addScaledVector(fe[8],.429043*(o*o-V*V)),r}add(e){for(let r=0;r<9;r++)this.coefficients[r].add(e.coefficients[r]);return this}addScaledSH(e,r){for(let o=0;o<9;o++)this.coefficients[o].addScaledVector(e.coefficients[o],r);return this}scale(e){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(e);return this}lerp(e,r){for(let o=0;o<9;o++)this.coefficients[o].lerp(e.coefficients[o],r);return this}equals(e){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(e.coefficients[r]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,r=0){const o=this.coefficients;for(let V=0;V<9;V++)o[V].fromArray(e,r+V*3);return this}toArray(e=[],r=0){const o=this.coefficients;for(let V=0;V<9;V++)o[V].toArray(e,r+V*3);return e}static getBasisAt(e,r){const o=e.x,V=e.y,le=e.z;r[0]=.282095,r[1]=.488603*V,r[2]=.488603*le,r[3]=.488603*o,r[4]=1.092548*o*V,r[5]=1.092548*V*le,r[6]=.315392*(3*le*le-1),r[7]=1.092548*o*le,r[8]=.546274*(o*o-V*V)}}class LightProbe extends Light$1{constructor(e=new SphericalHarmonics3,r=1){super(void 0,r),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const r=super.toJSON(e);return r.object.sh=this.sh.toArray(),r}}class MaterialLoader extends Loader{constructor(e){super(e),this.textures={}}load(e,r,o,V){const le=this,fe=new FileLoader(le.manager);fe.setPath(le.path),fe.setRequestHeader(le.requestHeader),fe.setWithCredentials(le.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r=this.textures;function o(le){return r[le]===void 0&&warn("MaterialLoader: Undefined texture",le),r[le]}const V=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(V.uuid=e.uuid),e.name!==void 0&&(V.name=e.name),e.color!==void 0&&V.color!==void 0&&V.color.setHex(e.color),e.roughness!==void 0&&(V.roughness=e.roughness),e.metalness!==void 0&&(V.metalness=e.metalness),e.sheen!==void 0&&(V.sheen=e.sheen),e.sheenColor!==void 0&&(V.sheenColor=new Color$1().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(V.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&V.emissive!==void 0&&V.emissive.setHex(e.emissive),e.specular!==void 0&&V.specular!==void 0&&V.specular.setHex(e.specular),e.specularIntensity!==void 0&&(V.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&V.specularColor!==void 0&&V.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(V.shininess=e.shininess),e.clearcoat!==void 0&&(V.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(V.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(V.dispersion=e.dispersion),e.iridescence!==void 0&&(V.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(V.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(V.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(V.transmission=e.transmission),e.thickness!==void 0&&(V.thickness=e.thickness),e.attenuationDistance!==void 0&&(V.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&V.attenuationColor!==void 0&&V.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(V.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(V.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(V.fog=e.fog),e.flatShading!==void 0&&(V.flatShading=e.flatShading),e.blending!==void 0&&(V.blending=e.blending),e.combine!==void 0&&(V.combine=e.combine),e.side!==void 0&&(V.side=e.side),e.shadowSide!==void 0&&(V.shadowSide=e.shadowSide),e.opacity!==void 0&&(V.opacity=e.opacity),e.transparent!==void 0&&(V.transparent=e.transparent),e.alphaTest!==void 0&&(V.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(V.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(V.depthFunc=e.depthFunc),e.depthTest!==void 0&&(V.depthTest=e.depthTest),e.depthWrite!==void 0&&(V.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(V.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(V.blendSrc=e.blendSrc),e.blendDst!==void 0&&(V.blendDst=e.blendDst),e.blendEquation!==void 0&&(V.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(V.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(V.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(V.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&V.blendColor!==void 0&&V.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(V.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(V.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(V.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(V.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(V.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(V.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(V.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(V.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(V.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(V.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(V.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(V.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(V.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(V.rotation=e.rotation),e.linewidth!==void 0&&(V.linewidth=e.linewidth),e.dashSize!==void 0&&(V.dashSize=e.dashSize),e.gapSize!==void 0&&(V.gapSize=e.gapSize),e.scale!==void 0&&(V.scale=e.scale),e.polygonOffset!==void 0&&(V.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(V.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(V.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(V.dithering=e.dithering),e.alphaToCoverage!==void 0&&(V.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(V.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(V.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(V.allowOverride=e.allowOverride),e.visible!==void 0&&(V.visible=e.visible),e.toneMapped!==void 0&&(V.toneMapped=e.toneMapped),e.userData!==void 0&&(V.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?V.vertexColors=e.vertexColors>0:V.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const le in e.uniforms){const fe=e.uniforms[le];switch(V.uniforms[le]={},fe.type){case"t":V.uniforms[le].value=o(fe.value);break;case"c":V.uniforms[le].value=new Color$1().setHex(fe.value);break;case"v2":V.uniforms[le].value=new Vector2().fromArray(fe.value);break;case"v3":V.uniforms[le].value=new Vector3().fromArray(fe.value);break;case"v4":V.uniforms[le].value=new Vector4().fromArray(fe.value);break;case"m3":V.uniforms[le].value=new Matrix3().fromArray(fe.value);break;case"m4":V.uniforms[le].value=new Matrix4().fromArray(fe.value);break;default:V.uniforms[le].value=fe.value}}if(e.defines!==void 0&&(V.defines=e.defines),e.vertexShader!==void 0&&(V.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(V.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(V.glslVersion=e.glslVersion),e.extensions!==void 0)for(const le in e.extensions)V.extensions[le]=e.extensions[le];if(e.lights!==void 0&&(V.lights=e.lights),e.clipping!==void 0&&(V.clipping=e.clipping),e.size!==void 0&&(V.size=e.size),e.sizeAttenuation!==void 0&&(V.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(V.map=o(e.map)),e.matcap!==void 0&&(V.matcap=o(e.matcap)),e.alphaMap!==void 0&&(V.alphaMap=o(e.alphaMap)),e.bumpMap!==void 0&&(V.bumpMap=o(e.bumpMap)),e.bumpScale!==void 0&&(V.bumpScale=e.bumpScale),e.normalMap!==void 0&&(V.normalMap=o(e.normalMap)),e.normalMapType!==void 0&&(V.normalMapType=e.normalMapType),e.normalScale!==void 0){let le=e.normalScale;Array.isArray(le)===!1&&(le=[le,le]),V.normalScale=new Vector2().fromArray(le)}return e.displacementMap!==void 0&&(V.displacementMap=o(e.displacementMap)),e.displacementScale!==void 0&&(V.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(V.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(V.roughnessMap=o(e.roughnessMap)),e.metalnessMap!==void 0&&(V.metalnessMap=o(e.metalnessMap)),e.emissiveMap!==void 0&&(V.emissiveMap=o(e.emissiveMap)),e.emissiveIntensity!==void 0&&(V.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(V.specularMap=o(e.specularMap)),e.specularIntensityMap!==void 0&&(V.specularIntensityMap=o(e.specularIntensityMap)),e.specularColorMap!==void 0&&(V.specularColorMap=o(e.specularColorMap)),e.envMap!==void 0&&(V.envMap=o(e.envMap)),e.envMapRotation!==void 0&&V.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(V.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(V.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(V.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(V.lightMap=o(e.lightMap)),e.lightMapIntensity!==void 0&&(V.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(V.aoMap=o(e.aoMap)),e.aoMapIntensity!==void 0&&(V.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(V.gradientMap=o(e.gradientMap)),e.clearcoatMap!==void 0&&(V.clearcoatMap=o(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(V.clearcoatRoughnessMap=o(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(V.clearcoatNormalMap=o(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(V.clearcoatNormalScale=new Vector2().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(V.iridescenceMap=o(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(V.iridescenceThicknessMap=o(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(V.transmissionMap=o(e.transmissionMap)),e.thicknessMap!==void 0&&(V.thicknessMap=o(e.thicknessMap)),e.anisotropyMap!==void 0&&(V.anisotropyMap=o(e.anisotropyMap)),e.sheenColorMap!==void 0&&(V.sheenColorMap=o(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(V.sheenRoughnessMap=o(e.sheenRoughnessMap)),V}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return MaterialLoader.createMaterialFromType(e)}static createMaterialFromType(e){const r={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new r[e]}}class LoaderUtils{static extractUrlBase(e){const r=e.lastIndexOf("/");return r===-1?"./":e.slice(0,r+1)}static resolveURL(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class BufferGeometryLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(le.manager);fe.setPath(le.path),fe.setRequestHeader(le.requestHeader),fe.setWithCredentials(le.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r={},o={};function V(ke,Gt){if(r[Gt]!==void 0)return r[Gt];const Xt=ke.interleavedBuffers[Gt],xt=le(ke,Xt.buffer),Zt=getTypedArray(Xt.type,xt),wt=new InterleavedBuffer(Zt,Xt.stride);return wt.uuid=Xt.uuid,r[Gt]=wt,wt}function le(ke,Gt){if(o[Gt]!==void 0)return o[Gt];const Xt=ke.arrayBuffers[Gt],xt=new Uint32Array(Xt).buffer;return o[Gt]=xt,xt}const fe=e.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry,Le=e.data.index;if(Le!==void 0){const ke=getTypedArray(Le.type,Le.array);fe.setIndex(new BufferAttribute(ke,1))}const Ce=e.data.attributes;for(const ke in Ce){const Gt=Ce[ke];let Vt;if(Gt.isInterleavedBufferAttribute){const Xt=V(e.data,Gt.data);Vt=new InterleavedBufferAttribute(Xt,Gt.itemSize,Gt.offset,Gt.normalized)}else{const Xt=getTypedArray(Gt.type,Gt.array),xt=Gt.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;Vt=new xt(Xt,Gt.itemSize,Gt.normalized)}Gt.name!==void 0&&(Vt.name=Gt.name),Gt.usage!==void 0&&Vt.setUsage(Gt.usage),fe.setAttribute(ke,Vt)}const Re=e.data.morphAttributes;if(Re)for(const ke in Re){const Gt=Re[ke],Vt=[];for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];let wt;if(Zt.isInterleavedBufferAttribute){const Wt=V(e.data,Zt.data);wt=new InterleavedBufferAttribute(Wt,Zt.itemSize,Zt.offset,Zt.normalized)}else{const Wt=getTypedArray(Zt.type,Zt.array);wt=new BufferAttribute(Wt,Zt.itemSize,Zt.normalized)}Zt.name!==void 0&&(wt.name=Zt.name),Vt.push(wt)}fe.morphAttributes[ke]=Vt}e.data.morphTargetsRelative&&(fe.morphTargetsRelative=!0);const ze=e.data.groups||e.data.drawcalls||e.data.offsets;if(ze!==void 0)for(let ke=0,Gt=ze.length;ke!==Gt;++ke){const Vt=ze[ke];fe.addGroup(Vt.start,Vt.count,Vt.materialIndex)}const Fe=e.data.boundingSphere;return Fe!==void 0&&(fe.boundingSphere=new Sphere$1().fromJSON(Fe)),e.name&&(fe.name=e.name),e.userData&&(fe.userData=e.userData),fe}}class ObjectLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=this.path===""?LoaderUtils.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||fe;const Le=new FileLoader(this.manager);Le.setPath(this.path),Le.setRequestHeader(this.requestHeader),Le.setWithCredentials(this.withCredentials),Le.load(e,function(Ce){let Re=null;try{Re=JSON.parse(Ce)}catch(ze){V!==void 0&&V(ze),ze("ObjectLoader: Can't parse "+e+".",ze.message);return}const Pe=Re.metadata;if(Pe===void 0||Pe.type===void 0||Pe.type.toLowerCase()==="geometry"){V!==void 0&&V(new Error("THREE.ObjectLoader: Can't load "+e)),error$1("ObjectLoader: Can't load "+e);return}le.parse(Re,r)},o,V)}loadAsync(e,r){return U0(this,null,function*(){const o=this,V=this.path===""?LoaderUtils.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||V;const le=new FileLoader(this.manager);le.setPath(this.path),le.setRequestHeader(this.requestHeader),le.setWithCredentials(this.withCredentials);const fe=yield le.loadAsync(e,r),Le=JSON.parse(fe),Ce=Le.metadata;if(Ce===void 0||Ce.type===void 0||Ce.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return yield o.parseAsync(Le)})}parse(e,r){const o=this.parseAnimations(e.animations),V=this.parseShapes(e.shapes),le=this.parseGeometries(e.geometries,V),fe=this.parseImages(e.images,function(){r!==void 0&&r(Re)}),Le=this.parseTextures(e.textures,fe),Ce=this.parseMaterials(e.materials,Le),Re=this.parseObject(e.object,le,Ce,Le,o),Pe=this.parseSkeletons(e.skeletons,Re);if(this.bindSkeletons(Re,Pe),this.bindLightTargets(Re),r!==void 0){let ze=!1;for(const Fe in fe)if(fe[Fe].data instanceof HTMLImageElement){ze=!0;break}ze===!1&&r(Re)}return Re}parseAsync(e){return U0(this,null,function*(){const r=this.parseAnimations(e.animations),o=this.parseShapes(e.shapes),V=this.parseGeometries(e.geometries,o),le=yield this.parseImagesAsync(e.images),fe=this.parseTextures(e.textures,le),Le=this.parseMaterials(e.materials,fe),Ce=this.parseObject(e.object,V,Le,fe,r),Re=this.parseSkeletons(e.skeletons,Ce);return this.bindSkeletons(Ce,Re),this.bindLightTargets(Ce),Ce})}parseShapes(e){const r={};if(e!==void 0)for(let o=0,V=e.length;o<V;o++){const le=new Shape().fromJSON(e[o]);r[le.uuid]=le}return r}parseSkeletons(e,r){const o={},V={};if(r.traverse(function(le){le.isBone&&(V[le.uuid]=le)}),e!==void 0)for(let le=0,fe=e.length;le<fe;le++){const Le=new Skeleton().fromJSON(e[le],V);o[Le.uuid]=Le}return o}parseGeometries(e,r){const o={};if(e!==void 0){const V=new BufferGeometryLoader;for(let le=0,fe=e.length;le<fe;le++){let Le;const Ce=e[le];switch(Ce.type){case"BufferGeometry":case"InstancedBufferGeometry":Le=V.parse(Ce);break;default:Ce.type in Geometries?Le=Geometries[Ce.type].fromJSON(Ce,r):warn(`ObjectLoader: Unsupported geometry type "${Ce.type}"`)}Le.uuid=Ce.uuid,Ce.name!==void 0&&(Le.name=Ce.name),Ce.userData!==void 0&&(Le.userData=Ce.userData),o[Ce.uuid]=Le}}return o}parseMaterials(e,r){const o={},V={};if(e!==void 0){const le=new MaterialLoader;le.setTextures(r);for(let fe=0,Le=e.length;fe<Le;fe++){const Ce=e[fe];o[Ce.uuid]===void 0&&(o[Ce.uuid]=le.parse(Ce)),V[Ce.uuid]=o[Ce.uuid]}}return V}parseAnimations(e){const r={};if(e!==void 0)for(let o=0;o<e.length;o++){const V=e[o],le=AnimationClip.parse(V);r[le.uuid]=le}return r}parseImages(e,r){const o=this,V={};let le;function fe(Ce){return o.manager.itemStart(Ce),le.load(Ce,function(){o.manager.itemEnd(Ce)},void 0,function(){o.manager.itemError(Ce),o.manager.itemEnd(Ce)})}function Le(Ce){if(typeof Ce=="string"){const Re=Ce,Pe=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(Re)?Re:o.resourcePath+Re;return fe(Pe)}else return Ce.data?{data:getTypedArray(Ce.type,Ce.data),width:Ce.width,height:Ce.height}:null}if(e!==void 0&&e.length>0){const Ce=new LoadingManager(r);le=new ImageLoader(Ce),le.setCrossOrigin(this.crossOrigin);for(let Re=0,Pe=e.length;Re<Pe;Re++){const ze=e[Re],Fe=ze.url;if(Array.isArray(Fe)){const ke=[];for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=Le(Xt);xt!==null&&(xt instanceof HTMLImageElement?ke.push(xt):ke.push(new DataTexture(xt.data,xt.width,xt.height)))}V[ze.uuid]=new Source(ke)}else{const ke=Le(ze.url);V[ze.uuid]=new Source(ke)}}}return V}parseImagesAsync(e){return U0(this,null,function*(){const r=this,o={};let V;function le(fe){return U0(this,null,function*(){if(typeof fe=="string"){const Le=fe,Ce=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(Le)?Le:r.resourcePath+Le;return yield V.loadAsync(Ce)}else return fe.data?{data:getTypedArray(fe.type,fe.data),width:fe.width,height:fe.height}:null})}if(e!==void 0&&e.length>0){V=new ImageLoader(this.manager),V.setCrossOrigin(this.crossOrigin);for(let fe=0,Le=e.length;fe<Le;fe++){const Ce=e[fe],Re=Ce.url;if(Array.isArray(Re)){const Pe=[];for(let ze=0,Fe=Re.length;ze<Fe;ze++){const ke=Re[ze],Gt=yield le(ke);Gt!==null&&(Gt instanceof HTMLImageElement?Pe.push(Gt):Pe.push(new DataTexture(Gt.data,Gt.width,Gt.height)))}o[Ce.uuid]=new Source(Pe)}else{const Pe=yield le(Ce.url);o[Ce.uuid]=new Source(Pe)}}}return o})}parseTextures(e,r){function o(le,fe){return typeof le=="number"?le:(warn("ObjectLoader.parseTexture: Constant should be in numeric form.",le),fe[le])}const V={};if(e!==void 0)for(let le=0,fe=e.length;le<fe;le++){const Le=e[le];Le.image===void 0&&warn('ObjectLoader: No "image" specified for',Le.uuid),r[Le.image]===void 0&&warn("ObjectLoader: Undefined image",Le.image);const Ce=r[Le.image],Re=Ce.data;let Pe;Array.isArray(Re)?(Pe=new CubeTexture,Re.length===6&&(Pe.needsUpdate=!0)):(Re&&Re.data?Pe=new DataTexture:Pe=new Texture,Re&&(Pe.needsUpdate=!0)),Pe.source=Ce,Pe.uuid=Le.uuid,Le.name!==void 0&&(Pe.name=Le.name),Le.mapping!==void 0&&(Pe.mapping=o(Le.mapping,TEXTURE_MAPPING)),Le.channel!==void 0&&(Pe.channel=Le.channel),Le.offset!==void 0&&Pe.offset.fromArray(Le.offset),Le.repeat!==void 0&&Pe.repeat.fromArray(Le.repeat),Le.center!==void 0&&Pe.center.fromArray(Le.center),Le.rotation!==void 0&&(Pe.rotation=Le.rotation),Le.wrap!==void 0&&(Pe.wrapS=o(Le.wrap[0],TEXTURE_WRAPPING),Pe.wrapT=o(Le.wrap[1],TEXTURE_WRAPPING)),Le.format!==void 0&&(Pe.format=Le.format),Le.internalFormat!==void 0&&(Pe.internalFormat=Le.internalFormat),Le.type!==void 0&&(Pe.type=Le.type),Le.colorSpace!==void 0&&(Pe.colorSpace=Le.colorSpace),Le.minFilter!==void 0&&(Pe.minFilter=o(Le.minFilter,TEXTURE_FILTER)),Le.magFilter!==void 0&&(Pe.magFilter=o(Le.magFilter,TEXTURE_FILTER)),Le.anisotropy!==void 0&&(Pe.anisotropy=Le.anisotropy),Le.flipY!==void 0&&(Pe.flipY=Le.flipY),Le.generateMipmaps!==void 0&&(Pe.generateMipmaps=Le.generateMipmaps),Le.premultiplyAlpha!==void 0&&(Pe.premultiplyAlpha=Le.premultiplyAlpha),Le.unpackAlignment!==void 0&&(Pe.unpackAlignment=Le.unpackAlignment),Le.compareFunction!==void 0&&(Pe.compareFunction=Le.compareFunction),Le.userData!==void 0&&(Pe.userData=Le.userData),V[Le.uuid]=Pe}return V}parseObject(e,r,o,V,le){let fe;function Le(Fe){return r[Fe]===void 0&&warn("ObjectLoader: Undefined geometry",Fe),r[Fe]}function Ce(Fe){if(Fe!==void 0){if(Array.isArray(Fe)){const ke=[];for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt];o[Xt]===void 0&&warn("ObjectLoader: Undefined material",Xt),ke.push(o[Xt])}return ke}return o[Fe]===void 0&&warn("ObjectLoader: Undefined material",Fe),o[Fe]}}function Re(Fe){return V[Fe]===void 0&&warn("ObjectLoader: Undefined texture",Fe),V[Fe]}let Pe,ze;switch(e.type){case"Scene":fe=new Scene,e.background!==void 0&&(Number.isInteger(e.background)?fe.background=new Color$1(e.background):fe.background=Re(e.background)),e.environment!==void 0&&(fe.environment=Re(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?fe.fog=new Fog(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(fe.fog=new FogExp2(e.fog.color,e.fog.density)),e.fog.name!==""&&(fe.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(fe.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(fe.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&fe.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(fe.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&fe.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":fe=new PerspectiveCamera(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(fe.focus=e.focus),e.zoom!==void 0&&(fe.zoom=e.zoom),e.filmGauge!==void 0&&(fe.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(fe.filmOffset=e.filmOffset),e.view!==void 0&&(fe.view=Object.assign({},e.view));break;case"OrthographicCamera":fe=new OrthographicCamera(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(fe.zoom=e.zoom),e.view!==void 0&&(fe.view=Object.assign({},e.view));break;case"AmbientLight":fe=new AmbientLight(e.color,e.intensity);break;case"DirectionalLight":fe=new DirectionalLight(e.color,e.intensity),fe.target=e.target||"";break;case"PointLight":fe=new PointLight(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":fe=new RectAreaLight(e.color,e.intensity,e.width,e.height);break;case"SpotLight":fe=new SpotLight(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),fe.target=e.target||"";break;case"HemisphereLight":fe=new HemisphereLight(e.color,e.groundColor,e.intensity);break;case"LightProbe":const Fe=new SphericalHarmonics3().fromArray(e.sh);fe=new LightProbe(Fe,e.intensity);break;case"SkinnedMesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new SkinnedMesh(Pe,ze),e.bindMode!==void 0&&(fe.bindMode=e.bindMode),e.bindMatrix!==void 0&&fe.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(fe.skeleton=e.skeleton);break;case"Mesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new Mesh(Pe,ze);break;case"InstancedMesh":Pe=Le(e.geometry),ze=Ce(e.material);const ke=e.count,Gt=e.instanceMatrix,Vt=e.instanceColor;fe=new InstancedMesh(Pe,ze,ke),fe.instanceMatrix=new InstancedBufferAttribute(new Float32Array(Gt.array),16),Vt!==void 0&&(fe.instanceColor=new InstancedBufferAttribute(new Float32Array(Vt.array),Vt.itemSize));break;case"BatchedMesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new BatchedMesh(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,ze),fe.geometry=Pe,fe.perObjectFrustumCulled=e.perObjectFrustumCulled,fe.sortObjects=e.sortObjects,fe._drawRanges=e.drawRanges,fe._reservedRanges=e.reservedRanges,fe._geometryInfo=e.geometryInfo.map(Xt=>{let xt=null,Zt=null;return Xt.boundingBox!==void 0&&(xt=new Box3().fromJSON(Xt.boundingBox)),Xt.boundingSphere!==void 0&&(Zt=new Sphere$1().fromJSON(Xt.boundingSphere)),qi(gi({},Xt),{boundingBox:xt,boundingSphere:Zt})}),fe._instanceInfo=e.instanceInfo,fe._availableInstanceIds=e._availableInstanceIds,fe._availableGeometryIds=e._availableGeometryIds,fe._nextIndexStart=e.nextIndexStart,fe._nextVertexStart=e.nextVertexStart,fe._geometryCount=e.geometryCount,fe._maxInstanceCount=e.maxInstanceCount,fe._maxVertexCount=e.maxVertexCount,fe._maxIndexCount=e.maxIndexCount,fe._geometryInitialized=e.geometryInitialized,fe._matricesTexture=Re(e.matricesTexture.uuid),fe._indirectTexture=Re(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(fe._colorsTexture=Re(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(fe.boundingSphere=new Sphere$1().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(fe.boundingBox=new Box3().fromJSON(e.boundingBox));break;case"LOD":fe=new LOD;break;case"Line":fe=new Line(Le(e.geometry),Ce(e.material));break;case"LineLoop":fe=new LineLoop(Le(e.geometry),Ce(e.material));break;case"LineSegments":fe=new LineSegments(Le(e.geometry),Ce(e.material));break;case"PointCloud":case"Points":fe=new Points(Le(e.geometry),Ce(e.material));break;case"Sprite":fe=new Sprite$1(Ce(e.material));break;case"Group":fe=new Group;break;case"Bone":fe=new Bone;break;default:fe=new Object3D}if(fe.uuid=e.uuid,e.name!==void 0&&(fe.name=e.name),e.matrix!==void 0?(fe.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(fe.matrixAutoUpdate=e.matrixAutoUpdate),fe.matrixAutoUpdate&&fe.matrix.decompose(fe.position,fe.quaternion,fe.scale)):(e.position!==void 0&&fe.position.fromArray(e.position),e.rotation!==void 0&&fe.rotation.fromArray(e.rotation),e.quaternion!==void 0&&fe.quaternion.fromArray(e.quaternion),e.scale!==void 0&&fe.scale.fromArray(e.scale)),e.up!==void 0&&fe.up.fromArray(e.up),e.castShadow!==void 0&&(fe.castShadow=e.castShadow),e.receiveShadow!==void 0&&(fe.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(fe.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(fe.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(fe.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(fe.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&fe.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(fe.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(fe.visible=e.visible),e.frustumCulled!==void 0&&(fe.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(fe.renderOrder=e.renderOrder),e.userData!==void 0&&(fe.userData=e.userData),e.layers!==void 0&&(fe.layers.mask=e.layers),e.children!==void 0){const Fe=e.children;for(let ke=0;ke<Fe.length;ke++)fe.add(this.parseObject(Fe[ke],r,o,V,le))}if(e.animations!==void 0){const Fe=e.animations;for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke];fe.animations.push(le[Gt])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(fe.autoUpdate=e.autoUpdate);const Fe=e.levels;for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke],Vt=fe.getObjectByProperty("uuid",Gt.object);Vt!==void 0&&fe.addLevel(Vt,Gt.distance,Gt.hysteresis)}}return fe}bindSkeletons(e,r){Object.keys(r).length!==0&&e.traverse(function(o){if(o.isSkinnedMesh===!0&&o.skeleton!==void 0){const V=r[o.skeleton];V===void 0?warn("ObjectLoader: No skeleton found with UUID:",o.skeleton):o.bind(V,o.bindMatrix)}})}bindLightTargets(e){e.traverse(function(r){if(r.isDirectionalLight||r.isSpotLight){const o=r.target,V=e.getObjectByProperty("uuid",o);V!==void 0?r.target=V:r.target=new Object3D}})}}const TEXTURE_MAPPING={UVMapping,CubeReflectionMapping,CubeRefractionMapping,EquirectangularReflectionMapping,EquirectangularRefractionMapping,CubeUVReflectionMapping},TEXTURE_WRAPPING={RepeatWrapping,ClampToEdgeWrapping,MirroredRepeatWrapping},TEXTURE_FILTER={NearestFilter,NearestMipmapNearestFilter,NearestMipmapLinearFilter,LinearFilter,LinearMipmapNearestFilter,LinearMipmapLinearFilter},_errorMap=new WeakMap;class ImageBitmapLoader extends Loader{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap=="undefined"&&warn("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&warn("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,r,o,V){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=this,fe=Cache.get(`image-bitmap:${e}`);if(fe!==void 0){if(le.manager.itemStart(e),fe.then){fe.then(Re=>{if(_errorMap.has(fe)===!0)V&&V(_errorMap.get(fe)),le.manager.itemError(e),le.manager.itemEnd(e);else return r&&r(Re),le.manager.itemEnd(e),Re});return}return setTimeout(function(){r&&r(fe),le.manager.itemEnd(e)},0),fe}const Le={};Le.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",Le.headers=this.requestHeader,Le.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const Ce=fetch(e,Le).then(function(Re){return Re.blob()}).then(function(Re){return createImageBitmap(Re,Object.assign(le.options,{colorSpaceConversion:"none"}))}).then(function(Re){return Cache.add(`image-bitmap:${e}`,Re),r&&r(Re),le.manager.itemEnd(e),Re}).catch(function(Re){V&&V(Re),_errorMap.set(Ce,Re),Cache.remove(`image-bitmap:${e}`),le.manager.itemError(e),le.manager.itemEnd(e)});Cache.add(`image-bitmap:${e}`,Ce),le.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let _context;class AudioContext{static getContext(){return _context===void 0&&(_context=new(window.AudioContext||window.webkitAudioContext)),_context}static setContext(e){_context=e}}class AudioLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(this.manager);fe.setResponseType("arraybuffer"),fe.setPath(this.path),fe.setRequestHeader(this.requestHeader),fe.setWithCredentials(this.withCredentials),fe.load(e,function(Ce){try{const Re=Ce.slice(0);AudioContext.getContext().decodeAudioData(Re,function(ze){r(ze)}).catch(Le)}catch(Re){Le(Re)}},o,V);function Le(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}}}const _eyeRight=new Matrix4,_eyeLeft=new Matrix4,_projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const r=this._cache;if(r.focus!==e.focus||r.fov!==e.fov||r.aspect!==e.aspect*this.aspect||r.near!==e.near||r.far!==e.far||r.zoom!==e.zoom||r.eyeSep!==this.eyeSep){r.focus=e.focus,r.fov=e.fov,r.aspect=e.aspect*this.aspect,r.near=e.near,r.far=e.far,r.zoom=e.zoom,r.eyeSep=this.eyeSep,_projectionMatrix.copy(e.projectionMatrix);const V=r.eyeSep/2,le=V*r.near/r.focus,fe=r.near*Math.tan(DEG2RAD*r.fov*.5)/r.zoom;let Le,Ce;_eyeLeft.elements[12]=-V,_eyeRight.elements[12]=V,Le=-fe*r.aspect+le,Ce=fe*r.aspect+le,_projectionMatrix.elements[0]=2*r.near/(Ce-Le),_projectionMatrix.elements[8]=(Ce+Le)/(Ce-Le),this.cameraL.projectionMatrix.copy(_projectionMatrix),Le=-fe*r.aspect-le,Ce=fe*r.aspect-le,_projectionMatrix.elements[0]=2*r.near/(Ce-Le),_projectionMatrix.elements[8]=(Ce+Le)/(Ce-Le),this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(_eyeLeft),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(_eyeRight)}}class ArrayCamera extends PerspectiveCamera{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Clock{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const r=performance.now();e=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=e}return e}}const _position$1=new Vector3,_quaternion$1=new Quaternion,_scale$1=new Vector3,_forward=new Vector3,_up=new Vector3;class AudioListener extends Object3D{constructor(){super(),this.type="AudioListener",this.context=AudioContext.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Clock}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const r=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1),_forward.set(0,0,-1).applyQuaternion(_quaternion$1),_up.set(0,1,0).applyQuaternion(_quaternion$1),r.positionX){const o=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(_position$1.x,o),r.positionY.linearRampToValueAtTime(_position$1.y,o),r.positionZ.linearRampToValueAtTime(_position$1.z,o),r.forwardX.linearRampToValueAtTime(_forward.x,o),r.forwardY.linearRampToValueAtTime(_forward.y,o),r.forwardZ.linearRampToValueAtTime(_forward.z,o),r.upX.linearRampToValueAtTime(_up.x,o),r.upY.linearRampToValueAtTime(_up.y,o),r.upZ.linearRampToValueAtTime(_up.z,o)}else r.setPosition(_position$1.x,_position$1.y,_position$1.z),r.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}}class Audio extends Object3D{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){warn("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(warn("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,r){return super.copy(e,r),e.sourceType!=="buffer"?(warn("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const _position=new Vector3,_quaternion$5=new Quaternion,_scale=new Vector3,_orientation=new Vector3;class PositionalAudio extends Audio{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,r,o){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=r,this.panner.coneOuterGain=o,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(_position,_quaternion$5,_scale),_orientation.set(0,0,1).applyQuaternion(_quaternion$5);const r=this.panner;if(r.positionX){const o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(_position.x,o),r.positionY.linearRampToValueAtTime(_position.y,o),r.positionZ.linearRampToValueAtTime(_position.z,o),r.orientationX.linearRampToValueAtTime(_orientation.x,o),r.orientationY.linearRampToValueAtTime(_orientation.y,o),r.orientationZ.linearRampToValueAtTime(_orientation.z,o)}else r.setPosition(_position.x,_position.y,_position.z),r.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}class AudioAnalyser{constructor(e,r=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const r=this.getFrequencyData();for(let o=0;o<r.length;o++)e+=r[o];return e/r.length}}class PropertyMixer{constructor(e,r,o){this.binding=e,this.valueSize=o;let V,le,fe;switch(r){case"quaternion":V=this._slerp,le=this._slerpAdditive,fe=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(o*6),this._workIndex=5;break;case"string":case"bool":V=this._select,le=this._select,fe=this._setAdditiveIdentityOther,this.buffer=new Array(o*5);break;default:V=this._lerp,le=this._lerpAdditive,fe=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(o*5)}this._mixBufferRegion=V,this._mixBufferRegionAdditive=le,this._setIdentity=fe,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,r){const o=this.buffer,V=this.valueSize,le=e*V+V;let fe=this.cumulativeWeight;if(fe===0){for(let Le=0;Le!==V;++Le)o[le+Le]=o[Le];fe=r}else{fe+=r;const Le=r/fe;this._mixBufferRegion(o,le,0,Le,V)}this.cumulativeWeight=fe}accumulateAdditive(e){const r=this.buffer,o=this.valueSize,V=o*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,V,0,e,o),this.cumulativeWeightAdditive+=e}apply(e){const r=this.valueSize,o=this.buffer,V=e*r+r,le=this.cumulativeWeight,fe=this.cumulativeWeightAdditive,Le=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,le<1){const Ce=r*this._origIndex;this._mixBufferRegion(o,V,Ce,1-le,r)}fe>0&&this._mixBufferRegionAdditive(o,V,this._addIndex*r,1,r);for(let Ce=r,Re=r+r;Ce!==Re;++Ce)if(o[Ce]!==o[Ce+r]){Le.setValue(o,V);break}}saveOriginalState(){const e=this.binding,r=this.buffer,o=this.valueSize,V=o*this._origIndex;e.getValue(r,V);for(let le=o,fe=V;le!==fe;++le)r[le]=r[V+le%o];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,r=e+this.valueSize;for(let o=e;o<r;o++)this.buffer[o]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let o=0;o<this.valueSize;o++)this.buffer[r+o]=this.buffer[e+o]}_select(e,r,o,V,le){if(V>=.5)for(let fe=0;fe!==le;++fe)e[r+fe]=e[o+fe]}_slerp(e,r,o,V){Quaternion.slerpFlat(e,r,e,r,e,o,V)}_slerpAdditive(e,r,o,V,le){const fe=this._workIndex*le;Quaternion.multiplyQuaternionsFlat(e,fe,e,r,e,o),Quaternion.slerpFlat(e,r,e,r,e,fe,V)}_lerp(e,r,o,V,le){const fe=1-V;for(let Le=0;Le!==le;++Le){const Ce=r+Le;e[Ce]=e[Ce]*fe+e[o+Le]*V}}_lerpAdditive(e,r,o,V,le){for(let fe=0;fe!==le;++fe){const Le=r+fe;e[Le]=e[Le]+e[o+fe]*V}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/",_reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g"),_wordChar="[^"+_RESERVED_CHARS_RE+"]",_wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]",_directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar),_nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot),_objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar),_propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar),_trackRe=new RegExp("^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$"),_supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(e,r,o){const V=o||PropertyBinding.parseTrackName(r);this._targetGroup=e,this._bindings=e.subscribe_(r,V)}getValue(e,r){this.bind();const o=this._targetGroup.nCachedObjects_,V=this._bindings[o];V!==void 0&&V.getValue(e,r)}setValue(e,r){const o=this._bindings;for(let V=this._targetGroup.nCachedObjects_,le=o.length;V!==le;++V)o[V].setValue(e,r)}bind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=e.length;r!==o;++r)e[r].bind()}unbind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=e.length;r!==o;++r)e[r].unbind()}}class PropertyBinding{constructor(e,r,o){this.path=r,this.parsedPath=o||PropertyBinding.parseTrackName(r),this.node=PropertyBinding.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,r,o){return e&&e.isAnimationObjectGroup?new PropertyBinding.Composite(e,r,o):new PropertyBinding(e,r,o)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(e){const r=_trackRe.exec(e);if(r===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const o={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},V=o.nodeName&&o.nodeName.lastIndexOf(".");if(V!==void 0&&V!==-1){const le=o.nodeName.substring(V+1);_supportedObjectNames.indexOf(le)!==-1&&(o.nodeName=o.nodeName.substring(0,V),o.objectName=le)}if(o.propertyName===null||o.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return o}static findNode(e,r){if(r===void 0||r===""||r==="."||r===-1||r===e.name||r===e.uuid)return e;if(e.skeleton){const o=e.skeleton.getBoneByName(r);if(o!==void 0)return o}if(e.children){const o=function(le){for(let fe=0;fe<le.length;fe++){const Le=le[fe];if(Le.name===r||Le.uuid===r)return Le;const Ce=o(Le.children);if(Ce)return Ce}return null},V=o(e.children);if(V)return V}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,r){e[r]=this.targetObject[this.propertyName]}_getValue_array(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)e[r++]=o[V]}_getValue_arrayElement(e,r){e[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,r){this.resolvedProperty.toArray(e,r)}_setValue_direct(e,r){this.targetObject[this.propertyName]=e[r]}_setValue_direct_setNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++]}_setValue_array_setNeedsUpdate(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,r){this.resolvedProperty[this.propertyIndex]=e[r]}_setValue_arrayElement_setNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,r){this.resolvedProperty.fromArray(e,r)}_setValue_fromArray_setNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,r){this.bind(),this.getValue(e,r)}_setValue_unbound(e,r){this.bind(),this.setValue(e,r)}bind(){let e=this.node;const r=this.parsedPath,o=r.objectName,V=r.propertyName;let le=r.propertyIndex;if(e||(e=PropertyBinding.findNode(this.rootNode,r.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){warn("PropertyBinding: No target node found for track: "+this.path+".");return}if(o){let Re=r.objectIndex;switch(o){case"materials":if(!e.material){error$1("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){error$1("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){error$1("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let Pe=0;Pe<e.length;Pe++)if(e[Pe].name===Re){Re=Pe;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){error$1("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){error$1("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[o]===void 0){error$1("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[o]}if(Re!==void 0){if(e[Re]===void 0){error$1("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[Re]}}const fe=e[V];if(fe===void 0){const Re=r.nodeName;error$1("PropertyBinding: Trying to update property for track: "+Re+"."+V+" but it wasn't found.",e);return}let Le=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?Le=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(Le=this.Versioning.MatrixWorldNeedsUpdate);let Ce=this.BindingType.Direct;if(le!==void 0){if(V==="morphTargetInfluences"){if(!e.geometry){error$1("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){error$1("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[le]!==void 0&&(le=e.morphTargetDictionary[le])}Ce=this.BindingType.ArrayElement,this.resolvedProperty=fe,this.propertyIndex=le}else fe.fromArray!==void 0&&fe.toArray!==void 0?(Ce=this.BindingType.HasFromToArray,this.resolvedProperty=fe):Array.isArray(fe)?(Ce=this.BindingType.EntireArray,this.resolvedProperty=fe):this.propertyName=V;this.getValue=this.GetterByBindingType[Ce],this.setValue=this.SetterByBindingTypeAndVersioning[Ce][Le]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=!0,this.uuid=generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let o=0,V=arguments.length;o!==V;++o)e[arguments[o].uuid]=o;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){const e=this._objects,r=this._indicesByUUID,o=this._paths,V=this._parsedPaths,le=this._bindings,fe=le.length;let Le,Ce=e.length,Re=this.nCachedObjects_;for(let Pe=0,ze=arguments.length;Pe!==ze;++Pe){const Fe=arguments[Pe],ke=Fe.uuid;let Gt=r[ke];if(Gt===void 0){Gt=Ce++,r[ke]=Gt,e.push(Fe);for(let Vt=0,Xt=fe;Vt!==Xt;++Vt)le[Vt].push(new PropertyBinding(Fe,o[Vt],V[Vt]))}else if(Gt<Re){Le=e[Gt];const Vt=--Re,Xt=e[Vt];r[Xt.uuid]=Gt,e[Gt]=Xt,r[ke]=Vt,e[Vt]=Fe;for(let xt=0,Zt=fe;xt!==Zt;++xt){const wt=le[xt],Wt=wt[Vt];let It=wt[Gt];wt[Gt]=Wt,It===void 0&&(It=new PropertyBinding(Fe,o[xt],V[xt])),wt[Vt]=It}}else e[Gt]!==Le&&error$1("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=Re}remove(){const e=this._objects,r=this._indicesByUUID,o=this._bindings,V=o.length;let le=this.nCachedObjects_;for(let fe=0,Le=arguments.length;fe!==Le;++fe){const Ce=arguments[fe],Re=Ce.uuid,Pe=r[Re];if(Pe!==void 0&&Pe>=le){const ze=le++,Fe=e[ze];r[Fe.uuid]=Pe,e[Pe]=Fe,r[Re]=ze,e[ze]=Ce;for(let ke=0,Gt=V;ke!==Gt;++ke){const Vt=o[ke],Xt=Vt[ze],xt=Vt[Pe];Vt[Pe]=Xt,Vt[ze]=xt}}}this.nCachedObjects_=le}uncache(){const e=this._objects,r=this._indicesByUUID,o=this._bindings,V=o.length;let le=this.nCachedObjects_,fe=e.length;for(let Le=0,Ce=arguments.length;Le!==Ce;++Le){const Re=arguments[Le],Pe=Re.uuid,ze=r[Pe];if(ze!==void 0)if(delete r[Pe],ze<le){const Fe=--le,ke=e[Fe],Gt=--fe,Vt=e[Gt];r[ke.uuid]=ze,e[ze]=ke,r[Vt.uuid]=Fe,e[Fe]=Vt,e.pop();for(let Xt=0,xt=V;Xt!==xt;++Xt){const Zt=o[Xt],wt=Zt[Fe],Wt=Zt[Gt];Zt[ze]=wt,Zt[Fe]=Wt,Zt.pop()}}else{const Fe=--fe,ke=e[Fe];Fe>0&&(r[ke.uuid]=ze),e[ze]=ke,e.pop();for(let Gt=0,Vt=V;Gt!==Vt;++Gt){const Xt=o[Gt];Xt[ze]=Xt[Fe],Xt.pop()}}}this.nCachedObjects_=le}subscribe_(e,r){const o=this._bindingsIndicesByPath;let V=o[e];const le=this._bindings;if(V!==void 0)return le[V];const fe=this._paths,Le=this._parsedPaths,Ce=this._objects,Re=Ce.length,Pe=this.nCachedObjects_,ze=new Array(Re);V=le.length,o[e]=V,fe.push(e),Le.push(r),le.push(ze);for(let Fe=Pe,ke=Ce.length;Fe!==ke;++Fe){const Gt=Ce[Fe];ze[Fe]=new PropertyBinding(Gt,e,r)}return ze}unsubscribe_(e){const r=this._bindingsIndicesByPath,o=r[e];if(o!==void 0){const V=this._paths,le=this._parsedPaths,fe=this._bindings,Le=fe.length-1,Ce=fe[Le],Re=e[Le];r[Re]=o,fe[o]=Ce,fe.pop(),le[o]=le[Le],le.pop(),V[o]=V[Le],V.pop()}}}class AnimationAction{constructor(e,r,o=null,V=r.blendMode){this._mixer=e,this._clip=r,this._localRoot=o,this.blendMode=V;const le=r.tracks,fe=le.length,Le=new Array(fe),Ce={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let Re=0;Re!==fe;++Re){const Pe=le[Re].createInterpolant(null);Le[Re]=Pe,Pe.settings=Ce}this._interpolantSettings=Ce,this._interpolants=Le,this._propertyBindings=new Array(fe),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,r){return this.loop=e,this.repetitions=r,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,r,o=!1){if(e.fadeOut(r),this.fadeIn(r),o===!0){const V=this._clip.duration,le=e._clip.duration,fe=le/V,Le=V/le;e.warp(1,fe,r),this.warp(Le,1,r)}return this}crossFadeTo(e,r,o=!1){return e.crossFadeFrom(this,r,o)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,r,o){const V=this._mixer,le=V.time,fe=this.timeScale;let Le=this._timeScaleInterpolant;Le===null&&(Le=V._lendControlInterpolant(),this._timeScaleInterpolant=Le);const Ce=Le.parameterPositions,Re=Le.sampleValues;return Ce[0]=le,Ce[1]=le+o,Re[0]=e/fe,Re[1]=r/fe,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,r,o,V){if(!this.enabled){this._updateWeight(e);return}const le=this._startTime;if(le!==null){const Ce=(e-le)*o;Ce<0||o===0?r=0:(this._startTime=null,r=o*Ce)}r*=this._updateTimeScale(e);const fe=this._updateTime(r),Le=this._updateWeight(e);if(Le>0){const Ce=this._interpolants,Re=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let Pe=0,ze=Ce.length;Pe!==ze;++Pe)Ce[Pe].evaluate(fe),Re[Pe].accumulateAdditive(Le);break;case NormalAnimationBlendMode:default:for(let Pe=0,ze=Ce.length;Pe!==ze;++Pe)Ce[Pe].evaluate(fe),Re[Pe].accumulate(V,Le)}}}_updateWeight(e){let r=0;if(this.enabled){r=this.weight;const o=this._weightInterpolant;if(o!==null){const V=o.evaluate(e)[0];r*=V,e>o.parameterPositions[1]&&(this.stopFading(),V===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(e){let r=0;if(!this.paused){r=this.timeScale;const o=this._timeScaleInterpolant;if(o!==null){const V=o.evaluate(e)[0];r*=V,e>o.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(e){const r=this._clip.duration,o=this.loop;let V=this.time+e,le=this._loopCount;const fe=o===LoopPingPong;if(e===0)return le===-1?V:fe&&(le&1)===1?r-V:V;if(o===LoopOnce){le===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(V>=r)V=r;else if(V<0)V=0;else{this.time=V;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=V,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(le===-1&&(e>=0?(le=0,this._setEndings(!0,this.repetitions===0,fe)):this._setEndings(this.repetitions===0,!0,fe)),V>=r||V<0){const Le=Math.floor(V/r);V-=r*Le,le+=Math.abs(Le);const Ce=this.repetitions-le;if(Ce<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,V=e>0?r:0,this.time=V,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(Ce===1){const Re=e<0;this._setEndings(Re,!Re,fe)}else this._setEndings(!1,!1,fe);this._loopCount=le,this.time=V,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:Le})}}else this.time=V;if(fe&&(le&1)===1)return r-V}return V}_setEndings(e,r,o){const V=this._interpolantSettings;o?(V.endingStart=ZeroSlopeEnding,V.endingEnd=ZeroSlopeEnding):(e?V.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding:V.endingStart=WrapAroundEnding,r?V.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding:V.endingEnd=WrapAroundEnding)}_scheduleFading(e,r,o){const V=this._mixer,le=V.time;let fe=this._weightInterpolant;fe===null&&(fe=V._lendControlInterpolant(),this._weightInterpolant=fe);const Le=fe.parameterPositions,Ce=fe.sampleValues;return Le[0]=le,Ce[0]=r,Le[1]=le+e,Ce[1]=o,this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,r){const o=e._localRoot||this._root,V=e._clip.tracks,le=V.length,fe=e._propertyBindings,Le=e._interpolants,Ce=o.uuid,Re=this._bindingsByRootAndName;let Pe=Re[Ce];Pe===void 0&&(Pe={},Re[Ce]=Pe);for(let ze=0;ze!==le;++ze){const Fe=V[ze],ke=Fe.name;let Gt=Pe[ke];if(Gt!==void 0)++Gt.referenceCount,fe[ze]=Gt;else{if(Gt=fe[ze],Gt!==void 0){Gt._cacheIndex===null&&(++Gt.referenceCount,this._addInactiveBinding(Gt,Ce,ke));continue}const Vt=r&&r._propertyBindings[ze].binding.parsedPath;Gt=new PropertyMixer(PropertyBinding.create(o,ke,Vt),Fe.ValueTypeName,Fe.getValueSize()),++Gt.referenceCount,this._addInactiveBinding(Gt,Ce,ke),fe[ze]=Gt}Le[ze].resultBuffer=Gt.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const o=(e._localRoot||this._root).uuid,V=e._clip.uuid,le=this._actionsByClip[V];this._bindAction(e,le&&le.knownActions[0]),this._addInactiveAction(e,V,o)}const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];le.useCount++===0&&(this._lendBinding(le),le.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];--le.useCount===0&&(le.restoreOriginalState(),this._takeBackBinding(le))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const r=e._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(e,r,o){const V=this._actions,le=this._actionsByClip;let fe=le[r];if(fe===void 0)fe={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,le[r]=fe;else{const Le=fe.knownActions;e._byClipCacheIndex=Le.length,Le.push(e)}e._cacheIndex=V.length,V.push(e),fe.actionByRoot[o]=e}_removeInactiveAction(e){const r=this._actions,o=r[r.length-1],V=e._cacheIndex;o._cacheIndex=V,r[V]=o,r.pop(),e._cacheIndex=null;const le=e._clip.uuid,fe=this._actionsByClip,Le=fe[le],Ce=Le.knownActions,Re=Ce[Ce.length-1],Pe=e._byClipCacheIndex;Re._byClipCacheIndex=Pe,Ce[Pe]=Re,Ce.pop(),e._byClipCacheIndex=null;const ze=Le.actionByRoot,Fe=(e._localRoot||this._root).uuid;delete ze[Fe],Ce.length===0&&delete fe[le],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];--le.referenceCount===0&&this._removeInactiveBinding(le)}}_lendAction(e){const r=this._actions,o=e._cacheIndex,V=this._nActiveActions++,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_takeBackAction(e){const r=this._actions,o=e._cacheIndex,V=--this._nActiveActions,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_addInactiveBinding(e,r,o){const V=this._bindingsByRootAndName,le=this._bindings;let fe=V[r];fe===void 0&&(fe={},V[r]=fe),fe[o]=e,e._cacheIndex=le.length,le.push(e)}_removeInactiveBinding(e){const r=this._bindings,o=e.binding,V=o.rootNode.uuid,le=o.path,fe=this._bindingsByRootAndName,Le=fe[V],Ce=r[r.length-1],Re=e._cacheIndex;Ce._cacheIndex=Re,r[Re]=Ce,r.pop(),delete Le[le],Object.keys(Le).length===0&&delete fe[V]}_lendBinding(e){const r=this._bindings,o=e._cacheIndex,V=this._nActiveBindings++,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_takeBackBinding(e){const r=this._bindings,o=e._cacheIndex,V=--this._nActiveBindings,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_lendControlInterpolant(){const e=this._controlInterpolants,r=this._nActiveControlInterpolants++;let o=e[r];return o===void 0&&(o=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer),o.__cacheIndex=r,e[r]=o),o}_takeBackControlInterpolant(e){const r=this._controlInterpolants,o=e.__cacheIndex,V=--this._nActiveControlInterpolants,le=r[V];e.__cacheIndex=V,r[V]=e,le.__cacheIndex=o,r[o]=le}clipAction(e,r,o){const V=r||this._root,le=V.uuid;let fe=typeof e=="string"?AnimationClip.findByName(V,e):e;const Le=fe!==null?fe.uuid:e,Ce=this._actionsByClip[Le];let Re=null;if(o===void 0&&(fe!==null?o=fe.blendMode:o=NormalAnimationBlendMode),Ce!==void 0){const ze=Ce.actionByRoot[le];if(ze!==void 0&&ze.blendMode===o)return ze;Re=Ce.knownActions[0],fe===null&&(fe=Re._clip)}if(fe===null)return null;const Pe=new AnimationAction(this,fe,r,o);return this._bindAction(Pe,Re),this._addInactiveAction(Pe,Le,le),Pe}existingAction(e,r){const o=r||this._root,V=o.uuid,le=typeof e=="string"?AnimationClip.findByName(o,e):e,fe=le?le.uuid:e,Le=this._actionsByClip[fe];return Le!==void 0&&Le.actionByRoot[V]||null}stopAllAction(){const e=this._actions,r=this._nActiveActions;for(let o=r-1;o>=0;--o)e[o].stop();return this}update(e){e*=this.timeScale;const r=this._actions,o=this._nActiveActions,V=this.time+=e,le=Math.sign(e),fe=this._accuIndex^=1;for(let Re=0;Re!==o;++Re)r[Re]._update(V,e,le,fe);const Le=this._bindings,Ce=this._nActiveBindings;for(let Re=0;Re!==Ce;++Re)Le[Re].apply(fe);return this}setTime(e){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const r=this._actions,o=e.uuid,V=this._actionsByClip,le=V[o];if(le!==void 0){const fe=le.knownActions;for(let Le=0,Ce=fe.length;Le!==Ce;++Le){const Re=fe[Le];this._deactivateAction(Re);const Pe=Re._cacheIndex,ze=r[r.length-1];Re._cacheIndex=null,Re._byClipCacheIndex=null,ze._cacheIndex=Pe,r[Pe]=ze,r.pop(),this._removeInactiveBindingsForAction(Re)}delete V[o]}}uncacheRoot(e){const r=e.uuid,o=this._actionsByClip;for(const fe in o){const Le=o[fe].actionByRoot,Ce=Le[r];Ce!==void 0&&(this._deactivateAction(Ce),this._removeInactiveAction(Ce))}const V=this._bindingsByRootAndName,le=V[r];if(le!==void 0)for(const fe in le){const Le=le[fe];Le.restoreOriginalState(),this._removeInactiveBinding(Le)}}uncacheAction(e,r){const o=this.existingAction(e,r);o!==null&&(this._deactivateAction(o),this._removeInactiveAction(o))}}class RenderTarget3D extends RenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isRenderTarget3D=!0,this.depth=o,this.texture=new Data3DTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Uniform{constructor(e){this.value=e}clone(){return new Uniform(this.value.clone===void 0?this.value:this.value.clone())}}let _id$3=0;class UniformsGroup extends EventDispatcher{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:_id$3++}),this.name="",this.usage=StaticDrawUsage,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const r=this.uniforms.indexOf(e);return r!==-1&&this.uniforms.splice(r,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const r=e.uniforms;this.uniforms.length=0;for(let o=0,V=r.length;o<V;o++){const le=Array.isArray(r[o])?r[o]:[r[o]];for(let fe=0;fe<le.length;fe++)this.uniforms.push(le[fe].clone())}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(e,r,o=1){super(e,r),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=o}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const r=super.clone(e);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(e){const r=super.toJSON(e);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}}class GLBufferAttribute{constructor(e,r,o,V,le,fe=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=r,this.itemSize=o,this.elementSize=V,this.count=le,this.normalized=fe,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,r){return this.type=e,this.elementSize=r,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const _matrix$3=new Matrix4;class Raycaster{constructor(e,r,o=0,V=1/0){this.ray=new Ray(e,r),this.near=o,this.far=V,this.camera=null,this.layers=new Layers,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,r){this.ray.set(e,r)}setFromCamera(e,r){r.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(r.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(r).sub(this.ray.origin).normalize(),this.camera=r):r.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(r.near+r.far)/(r.near-r.far)).unproject(r),this.ray.direction.set(0,0,-1).transformDirection(r.matrixWorld),this.camera=r):error$1("Raycaster: Unsupported camera type: "+r.type)}setFromXRController(e){return _matrix$3.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(_matrix$3),this}intersectObject(e,r=!0,o=[]){return intersect(e,this,o,r),o.sort(ascSort),o}intersectObjects(e,r=!0,o=[]){for(let V=0,le=e.length;V<le;V++)intersect(e[V],this,o,r);return o.sort(ascSort),o}}function ascSort(v,e){return v.distance-e.distance}function intersect(v,e,r,o){let V=!0;if(v.layers.test(e.layers)&&v.raycast(e,r)===!1&&(V=!1),V===!0&&o===!0){const le=v.children;for(let fe=0,Le=le.length;fe<Le;fe++)intersect(le[fe],e,r,!0)}}class Timer{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=handleVisibilityChange.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function handleVisibilityChange(){this._document.hidden===!1&&this.reset()}class Spherical{constructor(e=1,r=0,o=0){this.radius=e,this.phi=r,this.theta=o}set(e,r,o){return this.radius=e,this.phi=r,this.theta=o,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=clamp(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,o){return this.radius=Math.sqrt(e*e+r*r+o*o),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,o),this.phi=Math.acos(clamp(r/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(e=1,r=0,o=0){this.radius=e,this.theta=r,this.y=o}set(e,r,o){return this.radius=e,this.theta=r,this.y=o,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,o){return this.radius=Math.sqrt(e*e+o*o),this.theta=Math.atan2(e,o),this.y=r,this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(e,r,o,V){Matrix2.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,r,o,V)}identity(){return this.set(1,0,0,1),this}fromArray(e,r=0){for(let o=0;o<4;o++)this.elements[o]=e[o+r];return this}set(e,r,o,V){const le=this.elements;return le[0]=e,le[2]=r,le[1]=o,le[3]=V,this}}const _vector$4=new Vector2;class Box2{constructor(e=new Vector2(1/0,1/0),r=new Vector2(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromPoints(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const o=_vector$4.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_vector$4).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const _startP=new Vector3,_startEnd=new Vector3,_d1=new Vector3,_d2=new Vector3,_r=new Vector3,_c1=new Vector3,_c2=new Vector3;class Line3{constructor(e=new Vector3,r=new Vector3){this.start=e,this.end=r}set(e,r){return this.start.copy(e),this.end.copy(r),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,r){return this.delta(r).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,r){_startP.subVectors(e,this.start),_startEnd.subVectors(this.end,this.start);const o=_startEnd.dot(_startEnd);let le=_startEnd.dot(_startP)/o;return r&&(le=clamp(le,0,1)),le}closestPointToPoint(e,r,o){const V=this.closestPointToPointParameter(e,r);return this.delta(o).multiplyScalar(V).add(this.start)}distanceSqToLine3(e,r=_c1,o=_c2){const V=10000000000000001e-32;let le,fe;const Le=this.start,Ce=e.start,Re=this.end,Pe=e.end;_d1.subVectors(Re,Le),_d2.subVectors(Pe,Ce),_r.subVectors(Le,Ce);const ze=_d1.dot(_d1),Fe=_d2.dot(_d2),ke=_d2.dot(_r);if(ze<=V&&Fe<=V)return r.copy(Le),o.copy(Ce),r.sub(o),r.dot(r);if(ze<=V)le=0,fe=ke/Fe,fe=clamp(fe,0,1);else{const Gt=_d1.dot(_r);if(Fe<=V)fe=0,le=clamp(-Gt/ze,0,1);else{const Vt=_d1.dot(_d2),Xt=ze*Fe-Vt*Vt;Xt!==0?le=clamp((Vt*ke-Gt*Fe)/Xt,0,1):le=0,fe=(Vt*le+ke)/Fe,fe<0?(fe=0,le=clamp(-Gt/ze,0,1)):fe>1&&(fe=1,le=clamp((Vt-Gt)/ze,0,1))}}return r.copy(Le).add(_d1.multiplyScalar(le)),o.copy(Ce).add(_d2.multiplyScalar(fe)),r.sub(o),r.dot(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(e,r){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=r,this.type="SpotLightHelper";const o=new BufferGeometry,V=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let fe=0,Le=1,Ce=32;fe<Ce;fe++,Le++){const Re=fe/Ce*Math.PI*2,Pe=Le/Ce*Math.PI*2;V.push(Math.cos(Re),Math.sin(Re),1,Math.cos(Pe),Math.sin(Pe),1)}o.setAttribute("position",new Float32BufferAttribute(V,3));const le=new LineBasicMaterial({fog:!1,toneMapped:!1});this.cone=new LineSegments(o,le),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const e=this.light.distance?this.light.distance:1e3,r=e*Math.tan(this.light.angle);this.cone.scale.set(r,r,e),_vector$3.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(_vector$3),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const _vector$2=new Vector3,_boneMatrix=new Matrix4,_matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(e){const r=getBoneList(e),o=new BufferGeometry,V=[],le=[];for(let Re=0;Re<r.length;Re++){const Pe=r[Re];Pe.parent&&Pe.parent.isBone&&(V.push(0,0,0),V.push(0,0,0),le.push(0,0,0),le.push(0,0,0))}o.setAttribute("position",new Float32BufferAttribute(V,3)),o.setAttribute("color",new Float32BufferAttribute(le,3));const fe=new LineBasicMaterial({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(o,fe),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=r,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const Le=new Color$1(255),Ce=new Color$1(65280);this.setColors(Le,Ce)}updateMatrixWorld(e){const r=this.bones,o=this.geometry,V=o.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let le=0,fe=0;le<r.length;le++){const Le=r[le];Le.parent&&Le.parent.isBone&&(_boneMatrix.multiplyMatrices(_matrixWorldInv,Le.matrixWorld),_vector$2.setFromMatrixPosition(_boneMatrix),V.setXYZ(fe,_vector$2.x,_vector$2.y,_vector$2.z),_boneMatrix.multiplyMatrices(_matrixWorldInv,Le.parent.matrixWorld),_vector$2.setFromMatrixPosition(_boneMatrix),V.setXYZ(fe+1,_vector$2.x,_vector$2.y,_vector$2.z),fe+=2)}o.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,r){const V=this.geometry.getAttribute("color");for(let le=0;le<V.count;le+=2)V.setXYZ(le,e.r,e.g,e.b),V.setXYZ(le+1,r.r,r.g,r.b);return V.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function getBoneList(v){const e=[];v.isBone===!0&&e.push(v);for(let r=0;r<v.children.length;r++)e.push(...getBoneList(v.children[r]));return e}class PointLightHelper extends Mesh{constructor(e,r,o){const V=new SphereGeometry(r,4,2),le=new MeshBasicMaterial({wireframe:!0,fog:!1,toneMapped:!1});super(V,le),this.light=e,this.color=o,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const _vector$1=new Vector3,_color1=new Color$1,_color2=new Color$1;class HemisphereLightHelper extends Object3D{constructor(e,r,o){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=o,this.type="HemisphereLightHelper";const V=new OctahedronGeometry(r);V.rotateY(Math.PI*.5),this.material=new MeshBasicMaterial({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const le=V.getAttribute("position"),fe=new Float32Array(le.count*3);V.setAttribute("color",new BufferAttribute(fe,3)),this.add(new Mesh(V,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const r=e.geometry.getAttribute("color");_color1.copy(this.light.color),_color2.copy(this.light.groundColor);for(let o=0,V=r.count;o<V;o++){const le=o<V/2?_color1:_color2;r.setXYZ(o,le.r,le.g,le.b)}r.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(e=10,r=10,o=4473924,V=8947848){o=new Color$1(o),V=new Color$1(V);const le=r/2,fe=e/r,Le=e/2,Ce=[],Re=[];for(let Fe=0,ke=0,Gt=-Le;Fe<=r;Fe++,Gt+=fe){Ce.push(-Le,0,Gt,Le,0,Gt),Ce.push(Gt,0,-Le,Gt,0,Le);const Vt=Fe===le?o:V;Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3}const Pe=new BufferGeometry;Pe.setAttribute("position",new Float32BufferAttribute(Ce,3)),Pe.setAttribute("color",new Float32BufferAttribute(Re,3));const ze=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(Pe,ze),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(e=10,r=16,o=8,V=64,le=4473924,fe=8947848){le=new Color$1(le),fe=new Color$1(fe);const Le=[],Ce=[];if(r>1)for(let ze=0;ze<r;ze++){const Fe=ze/r*(Math.PI*2),ke=Math.sin(Fe)*e,Gt=Math.cos(Fe)*e;Le.push(0,0,0),Le.push(ke,0,Gt);const Vt=ze&1?le:fe;Ce.push(Vt.r,Vt.g,Vt.b),Ce.push(Vt.r,Vt.g,Vt.b)}for(let ze=0;ze<o;ze++){const Fe=ze&1?le:fe,ke=e-e/o*ze;for(let Gt=0;Gt<V;Gt++){let Vt=Gt/V*(Math.PI*2),Xt=Math.sin(Vt)*ke,xt=Math.cos(Vt)*ke;Le.push(Xt,0,xt),Ce.push(Fe.r,Fe.g,Fe.b),Vt=(Gt+1)/V*(Math.PI*2),Xt=Math.sin(Vt)*ke,xt=Math.cos(Vt)*ke,Le.push(Xt,0,xt),Ce.push(Fe.r,Fe.g,Fe.b)}}const Re=new BufferGeometry;Re.setAttribute("position",new Float32BufferAttribute(Le,3)),Re.setAttribute("color",new Float32BufferAttribute(Ce,3));const Pe=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(Re,Pe),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const _v1$8=new Vector3,_v2$5=new Vector3,_v3$3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(e,r,o){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=o,this.type="DirectionalLightHelper",r===void 0&&(r=1);let V=new BufferGeometry;V.setAttribute("position",new Float32BufferAttribute([-r,r,0,r,r,0,r,-r,0,-r,-r,0,-r,r,0],3));const le=new LineBasicMaterial({fog:!1,toneMapped:!1});this.lightPlane=new Line(V,le),this.add(this.lightPlane),V=new BufferGeometry,V.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3)),this.targetLine=new Line(V,le),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),_v1$8.setFromMatrixPosition(this.light.matrixWorld),_v2$5.setFromMatrixPosition(this.light.target.matrixWorld),_v3$3.subVectors(_v2$5,_v1$8),this.lightPlane.lookAt(_v2$5),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(_v2$5),this.targetLine.scale.z=_v3$3.length()}}const _vector$d=new Vector3,_camera$1=new Camera$1;class CameraHelper extends LineSegments{constructor(e){const r=new BufferGeometry,o=new LineBasicMaterial({color:16777215,vertexColors:!0,toneMapped:!1}),V=[],le=[],fe={};Le("n1","n2"),Le("n2","n4"),Le("n4","n3"),Le("n3","n1"),Le("f1","f2"),Le("f2","f4"),Le("f4","f3"),Le("f3","f1"),Le("n1","f1"),Le("n2","f2"),Le("n3","f3"),Le("n4","f4"),Le("p","n1"),Le("p","n2"),Le("p","n3"),Le("p","n4"),Le("u1","u2"),Le("u2","u3"),Le("u3","u1"),Le("c","t"),Le("p","c"),Le("cn1","cn2"),Le("cn3","cn4"),Le("cf1","cf2"),Le("cf3","cf4");function Le(Gt,Vt){Ce(Gt),Ce(Vt)}function Ce(Gt){V.push(0,0,0),le.push(0,0,0),fe[Gt]===void 0&&(fe[Gt]=[]),fe[Gt].push(V.length/3-1)}r.setAttribute("position",new Float32BufferAttribute(V,3)),r.setAttribute("color",new Float32BufferAttribute(le,3)),super(r,o),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=fe,this.update();const Re=new Color$1(16755200),Pe=new Color$1(16711680),ze=new Color$1(43775),Fe=new Color$1(16777215),ke=new Color$1(3355443);this.setColors(Re,Pe,ze,Fe,ke)}setColors(e,r,o,V,le){const Le=this.geometry.getAttribute("color");return Le.setXYZ(0,e.r,e.g,e.b),Le.setXYZ(1,e.r,e.g,e.b),Le.setXYZ(2,e.r,e.g,e.b),Le.setXYZ(3,e.r,e.g,e.b),Le.setXYZ(4,e.r,e.g,e.b),Le.setXYZ(5,e.r,e.g,e.b),Le.setXYZ(6,e.r,e.g,e.b),Le.setXYZ(7,e.r,e.g,e.b),Le.setXYZ(8,e.r,e.g,e.b),Le.setXYZ(9,e.r,e.g,e.b),Le.setXYZ(10,e.r,e.g,e.b),Le.setXYZ(11,e.r,e.g,e.b),Le.setXYZ(12,e.r,e.g,e.b),Le.setXYZ(13,e.r,e.g,e.b),Le.setXYZ(14,e.r,e.g,e.b),Le.setXYZ(15,e.r,e.g,e.b),Le.setXYZ(16,e.r,e.g,e.b),Le.setXYZ(17,e.r,e.g,e.b),Le.setXYZ(18,e.r,e.g,e.b),Le.setXYZ(19,e.r,e.g,e.b),Le.setXYZ(20,e.r,e.g,e.b),Le.setXYZ(21,e.r,e.g,e.b),Le.setXYZ(22,e.r,e.g,e.b),Le.setXYZ(23,e.r,e.g,e.b),Le.setXYZ(24,r.r,r.g,r.b),Le.setXYZ(25,r.r,r.g,r.b),Le.setXYZ(26,r.r,r.g,r.b),Le.setXYZ(27,r.r,r.g,r.b),Le.setXYZ(28,r.r,r.g,r.b),Le.setXYZ(29,r.r,r.g,r.b),Le.setXYZ(30,r.r,r.g,r.b),Le.setXYZ(31,r.r,r.g,r.b),Le.setXYZ(32,o.r,o.g,o.b),Le.setXYZ(33,o.r,o.g,o.b),Le.setXYZ(34,o.r,o.g,o.b),Le.setXYZ(35,o.r,o.g,o.b),Le.setXYZ(36,o.r,o.g,o.b),Le.setXYZ(37,o.r,o.g,o.b),Le.setXYZ(38,V.r,V.g,V.b),Le.setXYZ(39,V.r,V.g,V.b),Le.setXYZ(40,le.r,le.g,le.b),Le.setXYZ(41,le.r,le.g,le.b),Le.setXYZ(42,le.r,le.g,le.b),Le.setXYZ(43,le.r,le.g,le.b),Le.setXYZ(44,le.r,le.g,le.b),Le.setXYZ(45,le.r,le.g,le.b),Le.setXYZ(46,le.r,le.g,le.b),Le.setXYZ(47,le.r,le.g,le.b),Le.setXYZ(48,le.r,le.g,le.b),Le.setXYZ(49,le.r,le.g,le.b),Le.needsUpdate=!0,this}update(){const e=this.geometry,r=this.pointMap,o=1,V=1;let le,fe;if(_camera$1.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)le=1,fe=0;else if(this.camera.coordinateSystem===WebGLCoordinateSystem)le=-1,fe=1;else if(this.camera.coordinateSystem===WebGPUCoordinateSystem)le=0,fe=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);setPoint("c",r,e,_camera$1,0,0,le),setPoint("t",r,e,_camera$1,0,0,fe),setPoint("n1",r,e,_camera$1,-o,-V,le),setPoint("n2",r,e,_camera$1,o,-V,le),setPoint("n3",r,e,_camera$1,-o,V,le),setPoint("n4",r,e,_camera$1,o,V,le),setPoint("f1",r,e,_camera$1,-o,-V,fe),setPoint("f2",r,e,_camera$1,o,-V,fe),setPoint("f3",r,e,_camera$1,-o,V,fe),setPoint("f4",r,e,_camera$1,o,V,fe),setPoint("u1",r,e,_camera$1,o*.7,V*1.1,le),setPoint("u2",r,e,_camera$1,-o*.7,V*1.1,le),setPoint("u3",r,e,_camera$1,0,V*2,le),setPoint("cf1",r,e,_camera$1,-o,0,fe),setPoint("cf2",r,e,_camera$1,o,0,fe),setPoint("cf3",r,e,_camera$1,0,-V,fe),setPoint("cf4",r,e,_camera$1,0,V,fe),setPoint("cn1",r,e,_camera$1,-o,0,le),setPoint("cn2",r,e,_camera$1,o,0,le),setPoint("cn3",r,e,_camera$1,0,-V,le),setPoint("cn4",r,e,_camera$1,0,V,le),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function setPoint(v,e,r,o,V,le,fe){_vector$d.set(V,le,fe).unproject(o);const Le=e[v];if(Le!==void 0){const Ce=r.getAttribute("position");for(let Re=0,Pe=Le.length;Re<Pe;Re++)Ce.setXYZ(Le[Re],_vector$d.x,_vector$d.y,_vector$d.z)}}const _box$5=new Box3;class BoxHelper extends LineSegments{constructor(e,r=16776960){const o=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),V=new Float32Array(8*3),le=new BufferGeometry;le.setIndex(new BufferAttribute(o,1)),le.setAttribute("position",new BufferAttribute(V,3)),super(le,new LineBasicMaterial({color:r,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&_box$5.setFromObject(this.object),_box$5.isEmpty())return;const e=_box$5.min,r=_box$5.max,o=this.geometry.attributes.position,V=o.array;V[0]=r.x,V[1]=r.y,V[2]=r.z,V[3]=e.x,V[4]=r.y,V[5]=r.z,V[6]=e.x,V[7]=e.y,V[8]=r.z,V[9]=r.x,V[10]=e.y,V[11]=r.z,V[12]=r.x,V[13]=r.y,V[14]=e.z,V[15]=e.x,V[16]=r.y,V[17]=e.z,V[18]=e.x,V[19]=e.y,V[20]=e.z,V[21]=r.x,V[22]=e.y,V[23]=e.z,o.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,r){return super.copy(e,r),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Box3Helper extends LineSegments{constructor(e,r=16776960){const o=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),V=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],le=new BufferGeometry;le.setIndex(new BufferAttribute(o,1)),le.setAttribute("position",new Float32BufferAttribute(V,3)),super(le,new LineBasicMaterial({color:r,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const r=this.box;r.isEmpty()||(r.getCenter(this.position),r.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class PlaneHelper extends Line{constructor(e,r=1,o=16776960){const V=o,le=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],fe=new BufferGeometry;fe.setAttribute("position",new Float32BufferAttribute(le,3)),fe.computeBoundingSphere(),super(fe,new LineBasicMaterial({color:V,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=r;const Le=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],Ce=new BufferGeometry;Ce.setAttribute("position",new Float32BufferAttribute(Le,3)),Ce.computeBoundingSphere(),this.add(new Mesh(Ce,new MeshBasicMaterial({color:V,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(e=new Vector3(0,0,1),r=new Vector3(0,0,0),o=1,V=16776960,le=o*.2,fe=le*.2){super(),this.type="ArrowHelper",_lineGeometry===void 0&&(_lineGeometry=new BufferGeometry,_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3)),_coneGeometry=new ConeGeometry(.5,1,5,1),_coneGeometry.translate(0,-.5,0)),this.position.copy(r),this.line=new Line(_lineGeometry,new LineBasicMaterial({color:V,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:V,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(o,le,fe)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{_axis.set(e.z,0,-e.x).normalize();const r=Math.acos(e.y);this.quaternion.setFromAxisAngle(_axis,r)}}setLength(e,r=e*.2,o=r*.2){this.line.scale.set(1,Math.max(1e-4,e-r),1),this.line.updateMatrix(),this.cone.scale.set(o,r,o),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(e=1){const r=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],o=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],V=new BufferGeometry;V.setAttribute("position",new Float32BufferAttribute(r,3)),V.setAttribute("color",new Float32BufferAttribute(o,3));const le=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(V,le),this.type="AxesHelper"}setColors(e,r,o){const V=new Color$1,le=this.geometry.attributes.color.array;return V.set(e),V.toArray(le,0),V.toArray(le,3),V.set(r),V.toArray(le,6),V.toArray(le,9),V.set(o),V.toArray(le,12),V.toArray(le,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath",this.color=new Color$1,this.subPaths=[],this.currentPath=null}moveTo(e,r){return this.currentPath=new Path$1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,r),this}lineTo(e,r){return this.currentPath.lineTo(e,r),this}quadraticCurveTo(e,r,o,V){return this.currentPath.quadraticCurveTo(e,r,o,V),this}bezierCurveTo(e,r,o,V,le,fe){return this.currentPath.bezierCurveTo(e,r,o,V,le,fe),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function r(xt){const Zt=[];for(let wt=0,Wt=xt.length;wt<Wt;wt++){const It=xt[wt],Nt=new Shape;Nt.curves=It.curves,Zt.push(Nt)}return Zt}function o(xt,Zt){const wt=Zt.length;let Wt=!1;for(let It=wt-1,Nt=0;Nt<wt;It=Nt++){let Ft=Zt[It],Ht=Zt[Nt],Kt=Ht.x-Ft.x,Yt=Ht.y-Ft.y;if(Math.abs(Yt)>Number.EPSILON){if(Yt<0&&(Ft=Zt[Nt],Kt=-Kt,Ht=Zt[It],Yt=-Yt),xt.y<Ft.y||xt.y>Ht.y)continue;if(xt.y===Ft.y){if(xt.x===Ft.x)return!0}else{const jt=Yt*(xt.x-Ft.x)-Kt*(xt.y-Ft.y);if(jt===0)return!0;if(jt<0)continue;Wt=!Wt}}else{if(xt.y!==Ft.y)continue;if(Ht.x<=xt.x&&xt.x<=Ft.x||Ft.x<=xt.x&&xt.x<=Ht.x)return!0}}return Wt}const V=ShapeUtils.isClockWise,le=this.subPaths;if(le.length===0)return[];let fe,Le,Ce;const Re=[];if(le.length===1)return Le=le[0],Ce=new Shape,Ce.curves=Le.curves,Re.push(Ce),Re;let Pe=!V(le[0].getPoints());Pe=e?!Pe:Pe;const ze=[],Fe=[];let ke=[],Gt=0,Vt;Fe[Gt]=void 0,ke[Gt]=[];for(let xt=0,Zt=le.length;xt<Zt;xt++)Le=le[xt],Vt=Le.getPoints(),fe=V(Vt),fe=e?!fe:fe,fe?(!Pe&&Fe[Gt]&&Gt++,Fe[Gt]={s:new Shape,p:Vt},Fe[Gt].s.curves=Le.curves,Pe&&Gt++,ke[Gt]=[]):ke[Gt].push({h:Le,p:Vt[0]});if(!Fe[0])return r(le);if(Fe.length>1){let xt=!1,Zt=0;for(let wt=0,Wt=Fe.length;wt<Wt;wt++)ze[wt]=[];for(let wt=0,Wt=Fe.length;wt<Wt;wt++){const It=ke[wt];for(let Nt=0;Nt<It.length;Nt++){const Ft=It[Nt];let Ht=!0;for(let Kt=0;Kt<Fe.length;Kt++)o(Ft.p,Fe[Kt].p)&&(wt!==Kt&&Zt++,Ht?(Ht=!1,ze[Kt].push(Ft)):xt=!0);Ht&&ze[wt].push(Ft)}}Zt>0&&xt===!1&&(ke=ze)}let Xt;for(let xt=0,Zt=Fe.length;xt<Zt;xt++){Ce=Fe[xt].s,Re.push(Ce),Xt=ke[xt];for(let wt=0,Wt=Xt.length;wt<Wt;wt++)Ce.holes.push(Xt[wt].h)}return Re}}class Controls extends EventDispatcher{constructor(e,r=null){super(),this.object=e,this.domElement=r,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){warn("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function contain(v,e){const r=v.image&&v.image.width?v.image.width/v.image.height:1;return r>e?(v.repeat.x=1,v.repeat.y=r/e,v.offset.x=0,v.offset.y=(1-v.repeat.y)/2):(v.repeat.x=e/r,v.repeat.y=1,v.offset.x=(1-v.repeat.x)/2,v.offset.y=0),v}function cover(v,e){const r=v.image&&v.image.width?v.image.width/v.image.height:1;return r>e?(v.repeat.x=e/r,v.repeat.y=1,v.offset.x=(1-v.repeat.x)/2,v.offset.y=0):(v.repeat.x=1,v.repeat.y=r/e,v.offset.x=0,v.offset.y=(1-v.repeat.y)/2),v}function fill(v){return v.repeat.x=1,v.repeat.y=1,v.offset.x=0,v.offset.y=0,v}function getByteLength(v,e,r,o){const V=getTextureTypeByteLength(o);switch(r){case AlphaFormat:return v*e;case RedFormat:return v*e/V.components*V.byteLength;case RedIntegerFormat:return v*e/V.components*V.byteLength;case RGFormat:return v*e*2/V.components*V.byteLength;case RGIntegerFormat:return v*e*2/V.components*V.byteLength;case RGBFormat:return v*e*3/V.components*V.byteLength;case RGBAFormat:return v*e*4/V.components*V.byteLength;case RGBAIntegerFormat:return v*e*4/V.components*V.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(v,16)*Math.max(e,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(v,8)*Math.max(e,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((v+4)/5)*Math.floor((e+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((v+4)/5)*Math.floor((e+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((v+5)/6)*Math.floor((e+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((v+5)/6)*Math.floor((e+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((v+7)/8)*Math.floor((e+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((v+7)/8)*Math.floor((e+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((v+7)/8)*Math.floor((e+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((v+9)/10)*Math.floor((e+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((v+9)/10)*Math.floor((e+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((v+9)/10)*Math.floor((e+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((v+9)/10)*Math.floor((e+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((v+11)/12)*Math.floor((e+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((v+11)/12)*Math.floor((e+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(v/4)*Math.ceil(e/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(v/4)*Math.ceil(e/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(v/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${r} format.`)}function getTextureTypeByteLength(v){switch(v){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:case UnsignedInt101111Type:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${v}.`)}class TextureUtils{static contain(e,r){return contain(e,r)}static cover(e,r){return cover(e,r)}static fill(e){return fill(e)}static getByteLength(e,r,o,V){return getByteLength(e,r,o,V)}}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}));typeof window!="undefined"&&(window.__THREE__?warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=REVISION);/**
|
|
45
|
+
`},V=new BoxGeometry(5,5,5),le=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(o.uniforms),vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,side:BackSide,blending:NoBlending});le.uniforms.tEquirect.value=r;const fe=new Mesh(V,le),Le=r.minFilter;return r.minFilter===LinearMipmapLinearFilter&&(r.minFilter=LinearFilter),new CubeCamera(1,10,this).update(e,fe),r.minFilter=Le,fe.geometry.dispose(),fe.material.dispose(),this}clear(e,r=!0,o=!0,V=!0){const le=e.getRenderTarget();for(let fe=0;fe<6;fe++)e.setRenderTarget(this,fe),e.clear(r,o,V);e.setRenderTarget(le)}}class Group extends Object3D{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const r=this._hand;if(r)for(const o of e.hand.values())this._getHandJoint(r,o)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,r,o){let V=null,le=null,fe=null;const Le=this._targetRay,Ce=this._grip,Re=this._hand;if(e&&r.session.visibilityState!=="visible-blurred"){if(Re&&e.hand){fe=!0;for(const Vt of e.hand.values()){const Xt=r.getJointPose(Vt,o),xt=this._getHandJoint(Re,Vt);Xt!==null&&(xt.matrix.fromArray(Xt.transform.matrix),xt.matrix.decompose(xt.position,xt.rotation,xt.scale),xt.matrixWorldNeedsUpdate=!0,xt.jointRadius=Xt.radius),xt.visible=Xt!==null}const Pe=Re.joints["index-finger-tip"],ze=Re.joints["thumb-tip"],Fe=Pe.position.distanceTo(ze.position),ke=.02,Gt=.005;Re.inputState.pinching&&Fe>ke+Gt?(Re.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!Re.inputState.pinching&&Fe<=ke-Gt&&(Re.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else Ce!==null&&e.gripSpace&&(le=r.getPose(e.gripSpace,o),le!==null&&(Ce.matrix.fromArray(le.transform.matrix),Ce.matrix.decompose(Ce.position,Ce.rotation,Ce.scale),Ce.matrixWorldNeedsUpdate=!0,le.linearVelocity?(Ce.hasLinearVelocity=!0,Ce.linearVelocity.copy(le.linearVelocity)):Ce.hasLinearVelocity=!1,le.angularVelocity?(Ce.hasAngularVelocity=!0,Ce.angularVelocity.copy(le.angularVelocity)):Ce.hasAngularVelocity=!1));Le!==null&&(V=r.getPose(e.targetRaySpace,o),V===null&&le!==null&&(V=le),V!==null&&(Le.matrix.fromArray(V.transform.matrix),Le.matrix.decompose(Le.position,Le.rotation,Le.scale),Le.matrixWorldNeedsUpdate=!0,V.linearVelocity?(Le.hasLinearVelocity=!0,Le.linearVelocity.copy(V.linearVelocity)):Le.hasLinearVelocity=!1,V.angularVelocity?(Le.hasAngularVelocity=!0,Le.angularVelocity.copy(V.angularVelocity)):Le.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return Le!==null&&(Le.visible=V!==null),Ce!==null&&(Ce.visible=le!==null),Re!==null&&(Re.visible=fe!==null),this}_getHandJoint(e,r){if(e.joints[r.jointName]===void 0){const o=new Group;o.matrixAutoUpdate=!1,o.visible=!1,e.joints[r.jointName]=o,e.add(o)}return e.joints[r.jointName]}}class FogExp2{constructor(e,r=25e-5){this.isFogExp2=!0,this.name="",this.color=new Color$1(e),this.density=r}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(e,r=1,o=1e3){this.isFog=!0,this.name="",this.color=new Color$1(e),this.near=r,this.far=o}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Euler,this.environmentIntensity=1,this.environmentRotation=new Euler,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,r){return super.copy(e,r),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const r=super.toJSON(e);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(r.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(r.object.backgroundIntensity=this.backgroundIntensity),r.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(r.object.environmentIntensity=this.environmentIntensity),r.object.environmentRotation=this.environmentRotation.toArray(),r}}class InterleavedBuffer{constructor(e,r){this.isInterleavedBuffer=!0,this.array=e,this.stride=r,this.count=e!==void 0?e.length/r:0,this.usage=StaticDrawUsage,this.updateRanges=[],this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,r){this.updateRanges.push({start:e,count:r})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,r,o){e*=this.stride,o*=r.stride;for(let V=0,le=this.stride;V<le;V++)this.array[e+V]=r.array[o+V];return this}set(e,r=0){return this.array.set(e,r),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=generateUUID()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const r=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),o=new this.constructor(r,this.stride);return o.setUsage(this.usage),o}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=generateUUID()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$7=new Vector3;class InterleavedBufferAttribute{constructor(e,r,o,V=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=r,this.offset=o,this.normalized=V}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let r=0,o=this.data.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.applyMatrix4(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}applyNormalMatrix(e){for(let r=0,o=this.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.applyNormalMatrix(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}transformDirection(e){for(let r=0,o=this.count;r<o;r++)_vector$7.fromBufferAttribute(this,r),_vector$7.transformDirection(e),this.setXYZ(r,_vector$7.x,_vector$7.y,_vector$7.z);return this}getComponent(e,r){let o=this.array[e*this.data.stride+this.offset+r];return this.normalized&&(o=denormalize(o,this.array)),o}setComponent(e,r,o){return this.normalized&&(o=normalize$1(o,this.array)),this.data.array[e*this.data.stride+this.offset+r]=o,this}setX(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset]=r,this}setY(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+1]=r,this}setZ(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+2]=r,this}setW(e,r){return this.normalized&&(r=normalize$1(r,this.array)),this.data.array[e*this.data.stride+this.offset+3]=r,this}getX(e){let r=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(r=denormalize(r,this.array)),r}getY(e){let r=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(r=denormalize(r,this.array)),r}getZ(e){let r=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(r=denormalize(r,this.array)),r}getW(e){let r=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(r=denormalize(r,this.array)),r}setXY(e,r,o){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this}setXYZ(e,r,o,V){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this.data.array[e+2]=V,this}setXYZW(e,r,o,V,le){return e=e*this.data.stride+this.offset,this.normalized&&(r=normalize$1(r,this.array),o=normalize$1(o,this.array),V=normalize$1(V,this.array),le=normalize$1(le,this.array)),this.data.array[e+0]=r,this.data.array[e+1]=o,this.data.array[e+2]=V,this.data.array[e+3]=le,this}clone(e){if(e===void 0){log$1("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let o=0;o<this.count;o++){const V=o*this.data.stride+this.offset;for(let le=0;le<this.itemSize;le++)r.push(this.data.array[V+le])}return new BufferAttribute(new this.array.constructor(r),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new InterleavedBufferAttribute(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){log$1("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const r=[];for(let o=0;o<this.count;o++){const V=o*this.data.stride+this.offset;for(let le=0;le<this.itemSize;le++)r.push(this.data.array[V+le])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class SpriteMaterial extends Material{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Color$1(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let _geometry$1;const _intersectPoint=new Vector3,_worldScale=new Vector3,_mvPosition=new Vector3,_alignedPosition=new Vector2,_rotatedPosition=new Vector2,_viewWorldMatrix=new Matrix4,_vA$2=new Vector3,_vB$2=new Vector3,_vC$2=new Vector3,_uvA$1=new Vector2,_uvB$1=new Vector2,_uvC$1=new Vector2;let Sprite$1=class extends Object3D{constructor(e=new SpriteMaterial){if(super(),this.isSprite=!0,this.type="Sprite",_geometry$1===void 0){_geometry$1=new BufferGeometry;const r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),o=new InterleavedBuffer(r,5);_geometry$1.setIndex([0,1,2,0,2,3]),_geometry$1.setAttribute("position",new InterleavedBufferAttribute(o,3,0,!1)),_geometry$1.setAttribute("uv",new InterleavedBufferAttribute(o,2,3,!1))}this.geometry=_geometry$1,this.material=e,this.center=new Vector2(.5,.5),this.count=1}raycast(e,r){e.camera===null&&error$1('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),_worldScale.setFromMatrixScale(this.matrixWorld),_viewWorldMatrix.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),_mvPosition.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&_worldScale.multiplyScalar(-_mvPosition.z);const o=this.material.rotation;let V,le;o!==0&&(le=Math.cos(o),V=Math.sin(o));const fe=this.center;transformVertex(_vA$2.set(-.5,-.5,0),_mvPosition,fe,_worldScale,V,le),transformVertex(_vB$2.set(.5,-.5,0),_mvPosition,fe,_worldScale,V,le),transformVertex(_vC$2.set(.5,.5,0),_mvPosition,fe,_worldScale,V,le),_uvA$1.set(0,0),_uvB$1.set(1,0),_uvC$1.set(1,1);let Le=e.ray.intersectTriangle(_vA$2,_vB$2,_vC$2,!1,_intersectPoint);if(Le===null&&(transformVertex(_vB$2.set(-.5,.5,0),_mvPosition,fe,_worldScale,V,le),_uvB$1.set(0,1),Le=e.ray.intersectTriangle(_vA$2,_vC$2,_vB$2,!1,_intersectPoint),Le===null))return;const Ce=e.ray.origin.distanceTo(_intersectPoint);Ce<e.near||Ce>e.far||r.push({distance:Ce,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA$2,_vB$2,_vC$2,_uvA$1,_uvB$1,_uvC$1,new Vector2),face:null,object:this})}copy(e,r){return super.copy(e,r),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function transformVertex(v,e,r,o,V,le){_alignedPosition.subVectors(v,r).addScalar(.5).multiply(o),V!==void 0?(_rotatedPosition.x=le*_alignedPosition.x-V*_alignedPosition.y,_rotatedPosition.y=V*_alignedPosition.x+le*_alignedPosition.y):_rotatedPosition.copy(_alignedPosition),v.copy(e),v.x+=_rotatedPosition.x,v.y+=_rotatedPosition.y,v.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3,_v2$1=new Vector3;class LOD extends Object3D{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const r=e.levels;for(let o=0,V=r.length;o<V;o++){const le=r[o];this.addLevel(le.object.clone(),le.distance,le.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,r=0,o=0){r=Math.abs(r);const V=this.levels;let le;for(le=0;le<V.length&&!(r<V[le].distance);le++);return V.splice(le,0,{distance:r,hysteresis:o,object:e}),this.add(e),this}removeLevel(e){const r=this.levels;for(let o=0;o<r.length;o++)if(r[o].distance===e){const V=r.splice(o,1);return this.remove(V[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const r=this.levels;if(r.length>0){let o,V;for(o=1,V=r.length;o<V;o++){let le=r[o].distance;if(r[o].object.visible&&(le-=le*r[o].hysteresis),e<le)break}return r[o-1].object}return null}raycast(e,r){if(this.levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const V=e.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(V).raycast(e,r)}}update(e){const r=this.levels;if(r.length>1){_v1$2.setFromMatrixPosition(e.matrixWorld),_v2$1.setFromMatrixPosition(this.matrixWorld);const o=_v1$2.distanceTo(_v2$1)/e.zoom;r[0].object.visible=!0;let V,le;for(V=1,le=r.length;V<le;V++){let fe=r[V].distance;if(r[V].object.visible&&(fe-=fe*r[V].hysteresis),o>=fe)r[V-1].object.visible=!1,r[V].object.visible=!0;else break}for(this._currentLevel=V-1;V<le;V++)r[V].object.visible=!1}}toJSON(e){const r=super.toJSON(e);this.autoUpdate===!1&&(r.object.autoUpdate=!1),r.object.levels=[];const o=this.levels;for(let V=0,le=o.length;V<le;V++){const fe=o[V];r.object.levels.push({object:fe.object.uuid,distance:fe.distance,hysteresis:fe.hysteresis})}return r}}const _basePosition=new Vector3,_skinIndex=new Vector4,_skinWeight=new Vector4,_vector3=new Vector3,_matrix4=new Matrix4,_vertex=new Vector3,_sphere$5=new Sphere$1,_inverseMatrix$2=new Matrix4,_ray$2$1=new Ray;class SkinnedMesh extends Mesh{constructor(e,r){super(e,r),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=AttachedBindMode,this.bindMatrix=new Matrix4,this.bindMatrixInverse=new Matrix4,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Box3),this.boundingBox.makeEmpty();const r=e.getAttribute("position");for(let o=0;o<r.count;o++)this.getVertexPosition(o,_vertex),this.boundingBox.expandByPoint(_vertex)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Sphere$1),this.boundingSphere.makeEmpty();const r=e.getAttribute("position");for(let o=0;o<r.count;o++)this.getVertexPosition(o,_vertex),this.boundingSphere.expandByPoint(_vertex)}copy(e,r){return super.copy(e,r),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,r){const o=this.material,V=this.matrixWorld;o!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),_sphere$5.copy(this.boundingSphere),_sphere$5.applyMatrix4(V),e.ray.intersectsSphere(_sphere$5)!==!1&&(_inverseMatrix$2.copy(V).invert(),_ray$2$1.copy(e.ray).applyMatrix4(_inverseMatrix$2),!(this.boundingBox!==null&&_ray$2$1.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,r,_ray$2$1)))}getVertexPosition(e,r){return super.getVertexPosition(e,r),this.applyBoneTransform(e,r),r}bind(e,r){this.skeleton=e,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Vector4,r=this.geometry.attributes.skinWeight;for(let o=0,V=r.count;o<V;o++){e.fromBufferAttribute(r,o);const le=1/e.manhattanLength();le!==1/0?e.multiplyScalar(le):e.set(1,0,0,0),r.setXYZW(o,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===AttachedBindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===DetachedBindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():warn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,r){const o=this.skeleton,V=this.geometry;_skinIndex.fromBufferAttribute(V.attributes.skinIndex,e),_skinWeight.fromBufferAttribute(V.attributes.skinWeight,e),_basePosition.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let le=0;le<4;le++){const fe=_skinWeight.getComponent(le);if(fe!==0){const Le=_skinIndex.getComponent(le);_matrix4.multiplyMatrices(o.bones[Le].matrixWorld,o.boneInverses[Le]),r.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),fe)}}return r.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super(),this.isBone=!0,this.type="Bone"}}class DataTexture extends Texture{constructor(e=null,r=1,o=1,V,le,fe,Le,Ce,Re=NearestFilter,Pe=NearestFilter,ze,Fe){super(null,fe,Le,Ce,Re,Pe,V,le,ze,Fe),this.isDataTexture=!0,this.image={data:e,width:r,height:o},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const _offsetMatrix=new Matrix4,_identityMatrix$1=new Matrix4;class Skeleton{constructor(e=[],r=[]){this.uuid=generateUUID(),this.bones=e.slice(0),this.boneInverses=r,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,r=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),r.length===0)this.calculateInverses();else if(e.length!==r.length){warn("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let o=0,V=this.bones.length;o<V;o++)this.boneInverses.push(new Matrix4)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,r=this.bones.length;e<r;e++){const o=new Matrix4;this.bones[e]&&o.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(o)}}pose(){for(let e=0,r=this.bones.length;e<r;e++){const o=this.bones[e];o&&o.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,r=this.bones.length;e<r;e++){const o=this.bones[e];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}}update(){const e=this.bones,r=this.boneInverses,o=this.boneMatrices,V=this.boneTexture;for(let le=0,fe=e.length;le<fe;le++){const Le=e[le]?e[le].matrixWorld:_identityMatrix$1;_offsetMatrix.multiplyMatrices(Le,r[le]),_offsetMatrix.toArray(o,le*16)}V!==null&&(V.needsUpdate=!0)}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4);r.set(this.boneMatrices);const o=new DataTexture(r,e,e,RGBAFormat,FloatType);return o.needsUpdate=!0,this.boneMatrices=r,this.boneTexture=o,this}getBoneByName(e){for(let r=0,o=this.bones.length;r<o;r++){const V=this.bones[r];if(V.name===e)return V}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,r){this.uuid=e.uuid;for(let o=0,V=e.bones.length;o<V;o++){const le=e.bones[o];let fe=r[le];fe===void 0&&(warn("Skeleton: No bone found with UUID:",le),fe=new Bone),this.bones.push(fe),this.boneInverses.push(new Matrix4().fromArray(e.boneInverses[o]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const r=this.bones,o=this.boneInverses;for(let V=0,le=r.length;V<le;V++){const fe=r[V];e.bones.push(fe.uuid);const Le=o[V];e.boneInverses.push(Le.toArray())}return e}}class InstancedBufferAttribute extends BufferAttribute{constructor(e,r,o,V=1){super(e,r,o),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=V}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const _instanceLocalMatrix=new Matrix4,_instanceWorldMatrix=new Matrix4,_instanceIntersects=[],_box3=new Box3,_identity=new Matrix4,_mesh$1=new Mesh,_sphere$4=new Sphere$1;class InstancedMesh extends Mesh{constructor(e,r,o){super(e,r),this.isInstancedMesh=!0,this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(o*16),16),this.instanceColor=null,this.morphTexture=null,this.count=o,this.boundingBox=null,this.boundingSphere=null;for(let V=0;V<o;V++)this.setMatrixAt(V,_identity)}computeBoundingBox(){const e=this.geometry,r=this.count;this.boundingBox===null&&(this.boundingBox=new Box3),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let o=0;o<r;o++)this.getMatrixAt(o,_instanceLocalMatrix),_box3.copy(e.boundingBox).applyMatrix4(_instanceLocalMatrix),this.boundingBox.union(_box3)}computeBoundingSphere(){const e=this.geometry,r=this.count;this.boundingSphere===null&&(this.boundingSphere=new Sphere$1),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let o=0;o<r;o++)this.getMatrixAt(o,_instanceLocalMatrix),_sphere$4.copy(e.boundingSphere).applyMatrix4(_instanceLocalMatrix),this.boundingSphere.union(_sphere$4)}copy(e,r){return super.copy(e,r),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,r){r.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,r){r.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,r){const o=r.morphTargetInfluences,V=this.morphTexture.source.data.data,le=o.length+1,fe=e*le+1;for(let Le=0;Le<o.length;Le++)o[Le]=V[fe+Le]}raycast(e,r){const o=this.matrixWorld,V=this.count;if(_mesh$1.geometry=this.geometry,_mesh$1.material=this.material,_mesh$1.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),_sphere$4.copy(this.boundingSphere),_sphere$4.applyMatrix4(o),e.ray.intersectsSphere(_sphere$4)!==!1))for(let le=0;le<V;le++){this.getMatrixAt(le,_instanceLocalMatrix),_instanceWorldMatrix.multiplyMatrices(o,_instanceLocalMatrix),_mesh$1.matrixWorld=_instanceWorldMatrix,_mesh$1.raycast(e,_instanceIntersects);for(let fe=0,Le=_instanceIntersects.length;fe<Le;fe++){const Ce=_instanceIntersects[fe];Ce.instanceId=le,Ce.object=this,r.push(Ce)}_instanceIntersects.length=0}}setColorAt(e,r){this.instanceColor===null&&(this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),r.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,r){r.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,r){const o=r.morphTargetInfluences,V=o.length+1;this.morphTexture===null&&(this.morphTexture=new DataTexture(new Float32Array(V*this.count),V,this.count,RedFormat,FloatType));const le=this.morphTexture.source.data.data;let fe=0;for(let Re=0;Re<o.length;Re++)fe+=o[Re];const Le=this.geometry.morphTargetsRelative?1:1-fe,Ce=V*e;le[Ce]=Le,le.set(o,Ce+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const _vector1=new Vector3,_vector2=new Vector3,_normalMatrix$1=new Matrix3;let Plane$1=class{constructor(e=new Vector3(1,0,0),r=0){this.isPlane=!0,this.normal=e,this.constant=r}set(e,r){return this.normal.copy(e),this.constant=r,this}setComponents(e,r,o,V){return this.normal.set(e,r,o),this.constant=V,this}setFromNormalAndCoplanarPoint(e,r){return this.normal.copy(e),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(e,r,o){const V=_vector1.subVectors(o,r).cross(_vector2.subVectors(e,r)).normalize();return this.setFromNormalAndCoplanarPoint(V,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,r){return r.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,r){const o=e.delta(_vector1),V=this.normal.dot(o);if(V===0)return this.distanceToPoint(e.start)===0?r.copy(e.start):null;const le=-(e.start.dot(this.normal)+this.constant)/V;return le<0||le>1?null:r.copy(e.start).addScaledVector(o,le)}intersectsLine(e){const r=this.distanceToPoint(e.start),o=this.distanceToPoint(e.end);return r<0&&o>0||o<0&&r>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,r){const o=r||_normalMatrix$1.getNormalMatrix(e),V=this.coplanarPoint(_vector1).applyMatrix4(e),le=this.normal.applyMatrix3(o).normalize();return this.constant=-V.dot(le),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const _sphere$3=new Sphere$1,_defaultSpriteCenter=new Vector2(.5,.5),_vector$6=new Vector3;class Frustum{constructor(e=new Plane$1,r=new Plane$1,o=new Plane$1,V=new Plane$1,le=new Plane$1,fe=new Plane$1){this.planes=[e,r,o,V,le,fe]}set(e,r,o,V,le,fe){const Le=this.planes;return Le[0].copy(e),Le[1].copy(r),Le[2].copy(o),Le[3].copy(V),Le[4].copy(le),Le[5].copy(fe),this}copy(e){const r=this.planes;for(let o=0;o<6;o++)r[o].copy(e.planes[o]);return this}setFromProjectionMatrix(e,r=WebGLCoordinateSystem,o=!1){const V=this.planes,le=e.elements,fe=le[0],Le=le[1],Ce=le[2],Re=le[3],Pe=le[4],ze=le[5],Fe=le[6],ke=le[7],Gt=le[8],Vt=le[9],Xt=le[10],xt=le[11],Zt=le[12],wt=le[13],Wt=le[14],It=le[15];if(V[0].setComponents(Re-fe,ke-Pe,xt-Gt,It-Zt).normalize(),V[1].setComponents(Re+fe,ke+Pe,xt+Gt,It+Zt).normalize(),V[2].setComponents(Re+Le,ke+ze,xt+Vt,It+wt).normalize(),V[3].setComponents(Re-Le,ke-ze,xt-Vt,It-wt).normalize(),o)V[4].setComponents(Ce,Fe,Xt,Wt).normalize(),V[5].setComponents(Re-Ce,ke-Fe,xt-Xt,It-Wt).normalize();else if(V[4].setComponents(Re-Ce,ke-Fe,xt-Xt,It-Wt).normalize(),r===WebGLCoordinateSystem)V[5].setComponents(Re+Ce,ke+Fe,xt+Xt,It+Wt).normalize();else if(r===WebGPUCoordinateSystem)V[5].setComponents(Ce,Fe,Xt,Wt).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+r);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),_sphere$3.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const r=e.geometry;r.boundingSphere===null&&r.computeBoundingSphere(),_sphere$3.copy(r.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(e){_sphere$3.center.set(0,0,0);const r=_defaultSpriteCenter.distanceTo(e.center);return _sphere$3.radius=.7071067811865476+r,_sphere$3.applyMatrix4(e.matrixWorld),this.intersectsSphere(_sphere$3)}intersectsSphere(e){const r=this.planes,o=e.center,V=-e.radius;for(let le=0;le<6;le++)if(r[le].distanceToPoint(o)<V)return!1;return!0}intersectsBox(e){const r=this.planes;for(let o=0;o<6;o++){const V=r[o];if(_vector$6.x=V.normal.x>0?e.max.x:e.min.x,_vector$6.y=V.normal.y>0?e.max.y:e.min.y,_vector$6.z=V.normal.z>0?e.max.z:e.min.z,V.distanceToPoint(_vector$6)<0)return!1}return!0}containsPoint(e){const r=this.planes;for(let o=0;o<6;o++)if(r[o].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const _projScreenMatrix$1=new Matrix4,_frustum$1=new Frustum;class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(e,r){if(!r.isArrayCamera||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsObject(e))return!0}return!1}intersectsSprite(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsSprite(e))return!0}return!1}intersectsSphere(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsSphere(e))return!0}return!1}intersectsBox(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.intersectsBox(e))return!0}return!1}containsPoint(e,r){if(!r||!r.cameras||r.cameras.length===0)return!1;for(let o=0;o<r.cameras.length;o++){const V=r.cameras[o];if(_projScreenMatrix$1.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),_frustum$1.setFromProjectionMatrix(_projScreenMatrix$1,V.coordinateSystem,V.reversedDepth),_frustum$1.containsPoint(e))return!0}return!1}clone(){return new FrustumArray}}function ascIdSort(v,e){return v-e}function sortOpaque(v,e){return v.z-e.z}function sortTransparent(v,e){return e.z-v.z}class MultiDrawRenderList{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,r,o,V){const le=this.pool,fe=this.list;this.index>=le.length&&le.push({start:-1,count:-1,z:-1,index:-1});const Le=le[this.index];fe.push(Le),this.index++,Le.start=e,Le.count=r,Le.z=o,Le.index=V}reset(){this.list.length=0,this.index=0}}const _matrix$1$1=new Matrix4,_whiteColor=new Color$1(1,1,1),_frustum=new Frustum,_frustumArray=new FrustumArray,_box$1$1=new Box3,_sphere$2=new Sphere$1,_vector$5=new Vector3,_forward$1=new Vector3,_temp=new Vector3,_renderList=new MultiDrawRenderList,_mesh=new Mesh,_batchIntersects=[];function copyAttributeData(v,e,r=0){const o=e.itemSize;if(v.isInterleavedBufferAttribute||v.array.constructor!==e.array.constructor){const V=v.count;for(let le=0;le<V;le++)for(let fe=0;fe<o;fe++)e.setComponent(le+r,fe,v.getComponent(le,fe))}else e.array.set(v.array,r*o);e.needsUpdate=!0}function copyArrayContents(v,e){if(v.constructor!==e.constructor){const r=Math.min(v.length,e.length);for(let o=0;o<r;o++)e[o]=v[o]}else{const r=Math.min(v.length,e.length);e.set(new v.constructor(v.buffer,0,r))}}class BatchedMesh extends Mesh{constructor(e,r,o=r*2,V){super(new BufferGeometry,V),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=r,this._maxIndexCount=o,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const r=new Float32Array(e*e*4),o=new DataTexture(r,e,e,RGBAFormat,FloatType);this._matricesTexture=o}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Uint32Array(e*e),o=new DataTexture(r,e,e,RedIntegerFormat,UnsignedIntType);this._indirectTexture=o}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const r=new Float32Array(e*e*4).fill(1),o=new DataTexture(r,e,e,RGBAFormat,FloatType);o.colorSpace=ColorManagement.workingColorSpace,this._colorsTexture=o}_initializeGeometry(e){const r=this.geometry,o=this._maxVertexCount,V=this._maxIndexCount;if(this._geometryInitialized===!1){for(const le in e.attributes){const fe=e.getAttribute(le),{array:Le,itemSize:Ce,normalized:Re}=fe,Pe=new Le.constructor(o*Ce),ze=new BufferAttribute(Pe,Ce,Re);r.setAttribute(le,ze)}if(e.getIndex()!==null){const le=o>65535?new Uint32Array(V):new Uint16Array(V);r.setIndex(new BufferAttribute(le,1))}this._geometryInitialized=!0}}_validateGeometry(e){const r=this.geometry;if(!!e.getIndex()!=!!r.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const o in r.attributes){if(!e.hasAttribute(o))throw new Error(`THREE.BatchedMesh: Added geometry missing "${o}". All geometries must have consistent attributes.`);const V=e.getAttribute(o),le=r.getAttribute(o);if(V.itemSize!==le.itemSize||V.normalized!==le.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const r=this._instanceInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const r=this._geometryInfo;if(e<0||e>=r.length||r[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);const e=this.boundingBox,r=this._instanceInfo;e.makeEmpty();for(let o=0,V=r.length;o<V;o++){if(r[o].active===!1)continue;const le=r[o].geometryIndex;this.getMatrixAt(o,_matrix$1$1),this.getBoundingBoxAt(le,_box$1$1).applyMatrix4(_matrix$1$1),e.union(_box$1$1)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sphere$1);const e=this.boundingSphere,r=this._instanceInfo;e.makeEmpty();for(let o=0,V=r.length;o<V;o++){if(r[o].active===!1)continue;const le=r[o].geometryIndex;this.getMatrixAt(o,_matrix$1$1),this.getBoundingSphereAt(le,_sphere$2).applyMatrix4(_matrix$1$1),e.union(_sphere$2)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const o={visible:!0,active:!0,geometryIndex:e};let V=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ascIdSort),V=this._availableInstanceIds.shift(),this._instanceInfo[V]=o):(V=this._instanceInfo.length,this._instanceInfo.push(o));const le=this._matricesTexture;_matrix$1$1.identity().toArray(le.image.data,V*16),le.needsUpdate=!0;const fe=this._colorsTexture;return fe&&(_whiteColor.toArray(fe.image.data,V*4),fe.needsUpdate=!0),this._visibilityChanged=!0,V}addGeometry(e,r=-1,o=-1){this._initializeGeometry(e),this._validateGeometry(e);const V={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},le=this._geometryInfo;V.vertexStart=this._nextVertexStart,V.reservedVertexCount=r===-1?e.getAttribute("position").count:r;const fe=e.getIndex();if(fe!==null&&(V.indexStart=this._nextIndexStart,V.reservedIndexCount=o===-1?fe.count:o),V.indexStart!==-1&&V.indexStart+V.reservedIndexCount>this._maxIndexCount||V.vertexStart+V.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let Ce;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ascIdSort),Ce=this._availableGeometryIds.shift(),le[Ce]=V):(Ce=this._geometryCount,this._geometryCount++,le.push(V)),this.setGeometryAt(Ce,e),this._nextIndexStart=V.indexStart+V.reservedIndexCount,this._nextVertexStart=V.vertexStart+V.reservedVertexCount,Ce}setGeometryAt(e,r){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(r);const o=this.geometry,V=o.getIndex()!==null,le=o.getIndex(),fe=r.getIndex(),Le=this._geometryInfo[e];if(V&&fe.count>Le.reservedIndexCount||r.attributes.position.count>Le.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const Ce=Le.vertexStart,Re=Le.reservedVertexCount;Le.vertexCount=r.getAttribute("position").count;for(const Pe in o.attributes){const ze=r.getAttribute(Pe),Fe=o.getAttribute(Pe);copyAttributeData(ze,Fe,Ce);const ke=ze.itemSize;for(let Gt=ze.count,Vt=Re;Gt<Vt;Gt++){const Xt=Ce+Gt;for(let xt=0;xt<ke;xt++)Fe.setComponent(Xt,xt,0)}Fe.needsUpdate=!0,Fe.addUpdateRange(Ce*ke,Re*ke)}if(V){const Pe=Le.indexStart,ze=Le.reservedIndexCount;Le.indexCount=r.getIndex().count;for(let Fe=0;Fe<fe.count;Fe++)le.setX(Pe+Fe,Ce+fe.getX(Fe));for(let Fe=fe.count,ke=ze;Fe<ke;Fe++)le.setX(Pe+Fe,Ce);le.needsUpdate=!0,le.addUpdateRange(Pe,Le.reservedIndexCount)}return Le.start=V?Le.indexStart:Le.vertexStart,Le.count=V?Le.indexCount:Le.vertexCount,Le.boundingBox=null,r.boundingBox!==null&&(Le.boundingBox=r.boundingBox.clone()),Le.boundingSphere=null,r.boundingSphere!==null&&(Le.boundingSphere=r.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const r=this._geometryInfo;if(e>=r.length||r[e].active===!1)return this;const o=this._instanceInfo;for(let V=0,le=o.length;V<le;V++)o[V].active&&o[V].geometryIndex===e&&this.deleteInstance(V);return r[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,r=0;const o=this._geometryInfo,V=o.map((fe,Le)=>Le).sort((fe,Le)=>o[fe].vertexStart-o[Le].vertexStart),le=this.geometry;for(let fe=0,Le=o.length;fe<Le;fe++){const Ce=V[fe],Re=o[Ce];if(Re.active!==!1){if(le.index!==null){if(Re.indexStart!==r){const{indexStart:Pe,vertexStart:ze,reservedIndexCount:Fe}=Re,ke=le.index,Gt=ke.array,Vt=e-ze;for(let Xt=Pe;Xt<Pe+Fe;Xt++)Gt[Xt]=Gt[Xt]+Vt;ke.array.copyWithin(r,Pe,Pe+Fe),ke.addUpdateRange(r,Fe),ke.needsUpdate=!0,Re.indexStart=r}r+=Re.reservedIndexCount}if(Re.vertexStart!==e){const{vertexStart:Pe,reservedVertexCount:ze}=Re,Fe=le.attributes;for(const ke in Fe){const Gt=Fe[ke],{array:Vt,itemSize:Xt}=Gt;Vt.copyWithin(e*Xt,Pe*Xt,(Pe+ze)*Xt),Gt.addUpdateRange(e*Xt,ze*Xt),Gt.needsUpdate=!0}Re.vertexStart=e}e+=Re.reservedVertexCount,Re.start=le.index?Re.indexStart:Re.vertexStart,this._nextIndexStart=le.index?Re.indexStart+Re.reservedIndexCount:0,this._nextVertexStart=Re.vertexStart+Re.reservedVertexCount}}return this._visibilityChanged=!0,this}getBoundingBoxAt(e,r){if(e>=this._geometryCount)return null;const o=this.geometry,V=this._geometryInfo[e];if(V.boundingBox===null){const le=new Box3,fe=o.index,Le=o.attributes.position;for(let Ce=V.start,Re=V.start+V.count;Ce<Re;Ce++){let Pe=Ce;fe&&(Pe=fe.getX(Pe)),le.expandByPoint(_vector$5.fromBufferAttribute(Le,Pe))}V.boundingBox=le}return r.copy(V.boundingBox),r}getBoundingSphereAt(e,r){if(e>=this._geometryCount)return null;const o=this.geometry,V=this._geometryInfo[e];if(V.boundingSphere===null){const le=new Sphere$1;this.getBoundingBoxAt(e,_box$1$1),_box$1$1.getCenter(le.center);const fe=o.index,Le=o.attributes.position;let Ce=0;for(let Re=V.start,Pe=V.start+V.count;Re<Pe;Re++){let ze=Re;fe&&(ze=fe.getX(ze)),_vector$5.fromBufferAttribute(Le,ze),Ce=Math.max(Ce,le.center.distanceToSquared(_vector$5))}le.radius=Math.sqrt(Ce),V.boundingSphere=le}return r.copy(V.boundingSphere),r}setMatrixAt(e,r){this.validateInstanceId(e);const o=this._matricesTexture,V=this._matricesTexture.image.data;return r.toArray(V,e*16),o.needsUpdate=!0,this}getMatrixAt(e,r){return this.validateInstanceId(e),r.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,r){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),r.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,r){return this.validateInstanceId(e),r.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,r){return this.validateInstanceId(e),this._instanceInfo[e].visible===r?this:(this._instanceInfo[e].visible=r,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,r){return this.validateInstanceId(e),this.validateGeometryId(r),this._instanceInfo[e].geometryIndex=r,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,r={}){this.validateGeometryId(e);const o=this._geometryInfo[e];return r.vertexStart=o.vertexStart,r.vertexCount=o.vertexCount,r.reservedVertexCount=o.reservedVertexCount,r.indexStart=o.indexStart,r.indexCount=o.indexCount,r.reservedIndexCount=o.reservedIndexCount,r.start=o.start,r.count=o.count,r}setInstanceCount(e){const r=this._availableInstanceIds,o=this._instanceInfo;for(r.sort(ascIdSort);r[r.length-1]===o.length-1;)o.pop(),r.pop();if(e<o.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const V=new Int32Array(e),le=new Int32Array(e);copyArrayContents(this._multiDrawCounts,V),copyArrayContents(this._multiDrawStarts,le),this._multiDrawCounts=V,this._multiDrawStarts=le,this._maxInstanceCount=e;const fe=this._indirectTexture,Le=this._matricesTexture,Ce=this._colorsTexture;fe.dispose(),this._initIndirectTexture(),copyArrayContents(fe.image.data,this._indirectTexture.image.data),Le.dispose(),this._initMatricesTexture(),copyArrayContents(Le.image.data,this._matricesTexture.image.data),Ce&&(Ce.dispose(),this._initColorsTexture(),copyArrayContents(Ce.image.data,this._colorsTexture.image.data))}setGeometrySize(e,r){const o=[...this._geometryInfo].filter(Le=>Le.active);if(Math.max(...o.map(Le=>Le.vertexStart+Le.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${r}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...o.map(Ce=>Ce.indexStart+Ce.reservedIndexCount))>r)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${r}. Cannot shrink further.`);const le=this.geometry;le.dispose(),this._maxVertexCount=e,this._maxIndexCount=r,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new BufferGeometry,this._initializeGeometry(le));const fe=this.geometry;le.index&©ArrayContents(le.index.array,fe.index.array);for(const Le in le.attributes)copyArrayContents(le.attributes[Le].array,fe.attributes[Le].array)}raycast(e,r){const o=this._instanceInfo,V=this._geometryInfo,le=this.matrixWorld,fe=this.geometry;_mesh.material=this.material,_mesh.geometry.index=fe.index,_mesh.geometry.attributes=fe.attributes,_mesh.geometry.boundingBox===null&&(_mesh.geometry.boundingBox=new Box3),_mesh.geometry.boundingSphere===null&&(_mesh.geometry.boundingSphere=new Sphere$1);for(let Le=0,Ce=o.length;Le<Ce;Le++){if(!o[Le].visible||!o[Le].active)continue;const Re=o[Le].geometryIndex,Pe=V[Re];_mesh.geometry.setDrawRange(Pe.start,Pe.count),this.getMatrixAt(Le,_mesh.matrixWorld).premultiply(le),this.getBoundingBoxAt(Re,_mesh.geometry.boundingBox),this.getBoundingSphereAt(Re,_mesh.geometry.boundingSphere),_mesh.raycast(e,_batchIntersects);for(let ze=0,Fe=_batchIntersects.length;ze<Fe;ze++){const ke=_batchIntersects[ze];ke.object=this,ke.batchId=Le,r.push(ke)}_batchIntersects.length=0}_mesh.material=null,_mesh.geometry.index=null,_mesh.geometry.attributes={},_mesh.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(r=>qi(gi({},r),{boundingBox:r.boundingBox!==null?r.boundingBox.clone():null,boundingSphere:r.boundingSphere!==null?r.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(r=>gi({},r)),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,r,o,V,le){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const fe=V.getIndex(),Le=fe===null?1:fe.array.BYTES_PER_ELEMENT,Ce=this._instanceInfo,Re=this._multiDrawStarts,Pe=this._multiDrawCounts,ze=this._geometryInfo,Fe=this.perObjectFrustumCulled,ke=this._indirectTexture,Gt=ke.image.data,Vt=o.isArrayCamera?_frustumArray:_frustum;Fe&&!o.isArrayCamera&&(_matrix$1$1.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse).multiply(this.matrixWorld),_frustum.setFromProjectionMatrix(_matrix$1$1,o.coordinateSystem,o.reversedDepth));let Xt=0;if(this.sortObjects){_matrix$1$1.copy(this.matrixWorld).invert(),_vector$5.setFromMatrixPosition(o.matrixWorld).applyMatrix4(_matrix$1$1),_forward$1.set(0,0,-1).transformDirection(o.matrixWorld).transformDirection(_matrix$1$1);for(let wt=0,Wt=Ce.length;wt<Wt;wt++)if(Ce[wt].visible&&Ce[wt].active){const It=Ce[wt].geometryIndex;this.getMatrixAt(wt,_matrix$1$1),this.getBoundingSphereAt(It,_sphere$2).applyMatrix4(_matrix$1$1);let Nt=!1;if(Fe&&(Nt=!Vt.intersectsSphere(_sphere$2,o)),!Nt){const Ft=ze[It],Ht=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward$1);_renderList.push(Ft.start,Ft.count,Ht,wt)}}const xt=_renderList.list,Zt=this.customSort;Zt===null?xt.sort(le.transparent?sortTransparent:sortOpaque):Zt.call(this,xt,o);for(let wt=0,Wt=xt.length;wt<Wt;wt++){const It=xt[wt];Re[Xt]=It.start*Le,Pe[Xt]=It.count,Gt[Xt]=It.index,Xt++}_renderList.reset()}else for(let xt=0,Zt=Ce.length;xt<Zt;xt++)if(Ce[xt].visible&&Ce[xt].active){const wt=Ce[xt].geometryIndex;let Wt=!1;if(Fe&&(this.getMatrixAt(xt,_matrix$1$1),this.getBoundingSphereAt(wt,_sphere$2).applyMatrix4(_matrix$1$1),Wt=!Vt.intersectsSphere(_sphere$2,o)),!Wt){const It=ze[wt];Re[Xt]=It.start*Le,Pe[Xt]=It.count,Gt[Xt]=xt,Xt++}}ke.needsUpdate=!0,this._multiDrawCount=Xt,this._visibilityChanged=!1}onBeforeShadow(e,r,o,V,le,fe){this.onBeforeRender(e,null,V,le,fe)}}class LineBasicMaterial extends Material{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Color$1(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const _vStart=new Vector3,_vEnd=new Vector3,_inverseMatrix$1=new Matrix4,_ray$1$1=new Ray,_sphere$1$1=new Sphere$1,_intersectPointOnRay=new Vector3,_intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(e=new BufferGeometry,r=new LineBasicMaterial){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,o=[0];for(let V=1,le=r.count;V<le;V++)_vStart.fromBufferAttribute(r,V-1),_vEnd.fromBufferAttribute(r,V),o[V]=o[V-1],o[V]+=_vStart.distanceTo(_vEnd);e.setAttribute("lineDistance",new Float32BufferAttribute(o,1))}else warn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,r){const o=this.geometry,V=this.matrixWorld,le=e.params.Line.threshold,fe=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$1$1.copy(o.boundingSphere),_sphere$1$1.applyMatrix4(V),_sphere$1$1.radius+=le,e.ray.intersectsSphere(_sphere$1$1)===!1)return;_inverseMatrix$1.copy(V).invert(),_ray$1$1.copy(e.ray).applyMatrix4(_inverseMatrix$1);const Le=le/((this.scale.x+this.scale.y+this.scale.z)/3),Ce=Le*Le,Re=this.isLineSegments?2:1,Pe=o.index,Fe=o.attributes.position;if(Pe!==null){const ke=Math.max(0,fe.start),Gt=Math.min(Pe.count,fe.start+fe.count);for(let Vt=ke,Xt=Gt-1;Vt<Xt;Vt+=Re){const xt=Pe.getX(Vt),Zt=Pe.getX(Vt+1),wt=checkIntersection$2(this,e,_ray$1$1,Ce,xt,Zt,Vt);wt&&r.push(wt)}if(this.isLineLoop){const Vt=Pe.getX(Gt-1),Xt=Pe.getX(ke),xt=checkIntersection$2(this,e,_ray$1$1,Ce,Vt,Xt,Gt-1);xt&&r.push(xt)}}else{const ke=Math.max(0,fe.start),Gt=Math.min(Fe.count,fe.start+fe.count);for(let Vt=ke,Xt=Gt-1;Vt<Xt;Vt+=Re){const xt=checkIntersection$2(this,e,_ray$1$1,Ce,Vt,Vt+1,Vt);xt&&r.push(xt)}if(this.isLineLoop){const Vt=checkIntersection$2(this,e,_ray$1$1,Ce,Gt-1,ke,Gt-1);Vt&&r.push(Vt)}}}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}}function checkIntersection$2(v,e,r,o,V,le,fe){const Le=v.geometry.attributes.position;if(_vStart.fromBufferAttribute(Le,V),_vEnd.fromBufferAttribute(Le,le),r.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment)>o)return;_intersectPointOnRay.applyMatrix4(v.matrixWorld);const Re=e.ray.origin.distanceTo(_intersectPointOnRay);if(!(Re<e.near||Re>e.far))return{distance:Re,point:_intersectPointOnSegment.clone().applyMatrix4(v.matrixWorld),index:fe,face:null,faceIndex:null,barycoord:null,object:v}}const _start$1=new Vector3,_end$1=new Vector3;class LineSegments extends Line{constructor(e,r){super(e,r),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const r=e.attributes.position,o=[];for(let V=0,le=r.count;V<le;V+=2)_start$1.fromBufferAttribute(r,V),_end$1.fromBufferAttribute(r,V+1),o[V]=V===0?0:o[V-1],o[V+1]=o[V]+_start$1.distanceTo(_end$1);e.setAttribute("lineDistance",new Float32BufferAttribute(o,1))}else warn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class LineLoop extends Line{constructor(e,r){super(e,r),this.isLineLoop=!0,this.type="LineLoop"}}class PointsMaterial extends Material{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Color$1(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const _inverseMatrix$4=new Matrix4,_ray$4=new Ray,_sphere$7=new Sphere$1,_position$2$1=new Vector3;class Points extends Object3D{constructor(e=new BufferGeometry,r=new PointsMaterial){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=r,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,r){return super.copy(e,r),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,r){const o=this.geometry,V=this.matrixWorld,le=e.params.Points.threshold,fe=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),_sphere$7.copy(o.boundingSphere),_sphere$7.applyMatrix4(V),_sphere$7.radius+=le,e.ray.intersectsSphere(_sphere$7)===!1)return;_inverseMatrix$4.copy(V).invert(),_ray$4.copy(e.ray).applyMatrix4(_inverseMatrix$4);const Le=le/((this.scale.x+this.scale.y+this.scale.z)/3),Ce=Le*Le,Re=o.index,ze=o.attributes.position;if(Re!==null){const Fe=Math.max(0,fe.start),ke=Math.min(Re.count,fe.start+fe.count);for(let Gt=Fe,Vt=ke;Gt<Vt;Gt++){const Xt=Re.getX(Gt);_position$2$1.fromBufferAttribute(ze,Xt),testPoint$1(_position$2$1,Xt,Ce,V,e,r,this)}}else{const Fe=Math.max(0,fe.start),ke=Math.min(ze.count,fe.start+fe.count);for(let Gt=Fe,Vt=ke;Gt<Vt;Gt++)_position$2$1.fromBufferAttribute(ze,Gt),testPoint$1(_position$2$1,Gt,Ce,V,e,r,this)}}updateMorphTargets(){const r=this.geometry.morphAttributes,o=Object.keys(r);if(o.length>0){const V=r[o[0]];if(V!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let le=0,fe=V.length;le<fe;le++){const Le=V[le].name||String(le);this.morphTargetInfluences.push(0),this.morphTargetDictionary[Le]=le}}}}}function testPoint$1(v,e,r,o,V,le,fe){const Le=_ray$4.distanceSqToPoint(v);if(Le<r){const Ce=new Vector3;_ray$4.closestPointToPoint(v,Ce),Ce.applyMatrix4(o);const Re=V.ray.origin.distanceTo(Ce);if(Re<V.near||Re>V.far)return;le.push({distance:Re,distanceToRay:Math.sqrt(Le),point:Ce,index:e,face:null,faceIndex:null,barycoord:null,object:fe})}}class VideoTexture extends Texture{constructor(e,r,o,V,le=LinearFilter,fe=LinearFilter,Le,Ce,Re){super(e,r,o,V,le,fe,Le,Ce,Re),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const Pe=this;function ze(){Pe.needsUpdate=!0,Pe._requestVideoFrameCallbackId=e.requestVideoFrameCallback(ze)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(ze))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class VideoFrameTexture extends VideoTexture{constructor(e,r,o,V,le,fe,Le,Ce){super({},e,r,o,V,le,fe,Le,Ce),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class FramebufferTexture extends Texture{constructor(e,r){super({width:e,height:r}),this.isFramebufferTexture=!0,this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.generateMipmaps=!1,this.needsUpdate=!0}}class CompressedTexture extends Texture{constructor(e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe){super(null,fe,Le,Ce,Re,Pe,V,le,ze,Fe),this.isCompressedTexture=!0,this.image={width:r,height:o},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CompressedArrayTexture extends CompressedTexture{constructor(e,r,o,V,le,fe){super(e,r,o,le,fe),this.isCompressedArrayTexture=!0,this.image.depth=V,this.wrapR=ClampToEdgeWrapping,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(e,r,o){super(void 0,e[0].width,e[0].height,r,o,CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class CanvasTexture extends Texture{constructor(e,r,o,V,le,fe,Le,Ce,Re){super(e,r,o,V,le,fe,Le,Ce,Re),this.isCanvasTexture=!0,this.needsUpdate=!0}}class DepthTexture extends Texture{constructor(e,r,o=UnsignedIntType,V,le,fe,Le=NearestFilter,Ce=NearestFilter,Re,Pe=DepthFormat,ze=1){if(Pe!==DepthFormat&&Pe!==DepthStencilFormat)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const Fe={width:e,height:r,depth:ze};super(Fe,V,le,fe,Le,Ce,Pe,o,Re),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Source(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const r=super.toJSON(e);return this.compareFunction!==null&&(r.compareFunction=this.compareFunction),r}}class CubeDepthTexture extends DepthTexture{constructor(e,r=UnsignedIntType,o=CubeReflectionMapping,V,le,fe=NearestFilter,Le=NearestFilter,Ce,Re=DepthFormat){const Pe={width:e,height:e,depth:1},ze=[Pe,Pe,Pe,Pe,Pe,Pe];super(e,e,r,o,V,le,fe,Le,Ce,Re),this.image=ze,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class ExternalTexture extends Texture{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class CapsuleGeometry extends BufferGeometry{constructor(e=1,r=1,o=4,V=8,le=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:r,capSegments:o,radialSegments:V,heightSegments:le},r=Math.max(0,r),o=Math.max(1,Math.floor(o)),V=Math.max(3,Math.floor(V)),le=Math.max(1,Math.floor(le));const fe=[],Le=[],Ce=[],Re=[],Pe=r/2,ze=Math.PI/2*e,Fe=r,ke=2*ze+Fe,Gt=o*2+le,Vt=V+1,Xt=new Vector3,xt=new Vector3;for(let Zt=0;Zt<=Gt;Zt++){let wt=0,Wt=0,It=0,Nt=0;if(Zt<=o){const Kt=Zt/o,Yt=Kt*Math.PI/2;Wt=-Pe-e*Math.cos(Yt),It=e*Math.sin(Yt),Nt=-e*Math.cos(Yt),wt=Kt*ze}else if(Zt<=o+le){const Kt=(Zt-o)/le;Wt=-Pe+Kt*r,It=e,Nt=0,wt=ze+Kt*Fe}else{const Kt=(Zt-o-le)/o,Yt=Kt*Math.PI/2;Wt=Pe+e*Math.sin(Yt),It=e*Math.cos(Yt),Nt=e*Math.sin(Yt),wt=ze+Fe+Kt*ze}const Ft=Math.max(0,Math.min(1,wt/ke));let Ht=0;Zt===0?Ht=.5/V:Zt===Gt&&(Ht=-.5/V);for(let Kt=0;Kt<=V;Kt++){const Yt=Kt/V,jt=Yt*Math.PI*2,n0=Math.sin(jt),a0=Math.cos(jt);xt.x=-It*a0,xt.y=Wt,xt.z=It*n0,Le.push(xt.x,xt.y,xt.z),Xt.set(-It*a0,Nt,It*n0),Xt.normalize(),Ce.push(Xt.x,Xt.y,Xt.z),Re.push(Yt+Ht,Ft)}if(Zt>0){const Kt=(Zt-1)*Vt;for(let Yt=0;Yt<V;Yt++){const jt=Kt+Yt,n0=Kt+Yt+1,a0=Zt*Vt+Yt,l0=Zt*Vt+Yt+1;fe.push(jt,n0,a0),fe.push(n0,l0,a0)}}}this.setIndex(fe),this.setAttribute("position",new Float32BufferAttribute(Le,3)),this.setAttribute("normal",new Float32BufferAttribute(Ce,3)),this.setAttribute("uv",new Float32BufferAttribute(Re,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CapsuleGeometry(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class CircleGeometry extends BufferGeometry{constructor(e=1,r=32,o=0,V=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:r,thetaStart:o,thetaLength:V},r=Math.max(3,r);const le=[],fe=[],Le=[],Ce=[],Re=new Vector3,Pe=new Vector2;fe.push(0,0,0),Le.push(0,0,1),Ce.push(.5,.5);for(let ze=0,Fe=3;ze<=r;ze++,Fe+=3){const ke=o+ze/r*V;Re.x=e*Math.cos(ke),Re.y=e*Math.sin(ke),fe.push(Re.x,Re.y,Re.z),Le.push(0,0,1),Pe.x=(fe[Fe]/e+1)/2,Pe.y=(fe[Fe+1]/e+1)/2,Ce.push(Pe.x,Pe.y)}for(let ze=1;ze<=r;ze++)le.push(ze,ze+1,0);this.setIndex(le),this.setAttribute("position",new Float32BufferAttribute(fe,3)),this.setAttribute("normal",new Float32BufferAttribute(Le,3)),this.setAttribute("uv",new Float32BufferAttribute(Ce,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CircleGeometry(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=32,le=1,fe=!1,Le=0,Ce=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:r,height:o,radialSegments:V,heightSegments:le,openEnded:fe,thetaStart:Le,thetaLength:Ce};const Re=this;V=Math.floor(V),le=Math.floor(le);const Pe=[],ze=[],Fe=[],ke=[];let Gt=0;const Vt=[],Xt=o/2;let xt=0;Zt(),fe===!1&&(e>0&&wt(!0),r>0&&wt(!1)),this.setIndex(Pe),this.setAttribute("position",new Float32BufferAttribute(ze,3)),this.setAttribute("normal",new Float32BufferAttribute(Fe,3)),this.setAttribute("uv",new Float32BufferAttribute(ke,2));function Zt(){const Wt=new Vector3,It=new Vector3;let Nt=0;const Ft=(r-e)/o;for(let Ht=0;Ht<=le;Ht++){const Kt=[],Yt=Ht/le,jt=Yt*(r-e)+e;for(let n0=0;n0<=V;n0++){const a0=n0/V,l0=a0*Ce+Le,s0=Math.sin(l0),$t=Math.cos(l0);It.x=jt*s0,It.y=-Yt*o+Xt,It.z=jt*$t,ze.push(It.x,It.y,It.z),Wt.set(s0,Ft,$t).normalize(),Fe.push(Wt.x,Wt.y,Wt.z),ke.push(a0,1-Yt),Kt.push(Gt++)}Vt.push(Kt)}for(let Ht=0;Ht<V;Ht++)for(let Kt=0;Kt<le;Kt++){const Yt=Vt[Kt][Ht],jt=Vt[Kt+1][Ht],n0=Vt[Kt+1][Ht+1],a0=Vt[Kt][Ht+1];(e>0||Kt!==0)&&(Pe.push(Yt,jt,a0),Nt+=3),(r>0||Kt!==le-1)&&(Pe.push(jt,n0,a0),Nt+=3)}Re.addGroup(xt,Nt,0),xt+=Nt}function wt(Wt){const It=Gt,Nt=new Vector2,Ft=new Vector3;let Ht=0;const Kt=Wt===!0?e:r,Yt=Wt===!0?1:-1;for(let n0=1;n0<=V;n0++)ze.push(0,Xt*Yt,0),Fe.push(0,Yt,0),ke.push(.5,.5),Gt++;const jt=Gt;for(let n0=0;n0<=V;n0++){const l0=n0/V*Ce+Le,s0=Math.cos(l0),$t=Math.sin(l0);Ft.x=Kt*$t,Ft.y=Xt*Yt,Ft.z=Kt*s0,ze.push(Ft.x,Ft.y,Ft.z),Fe.push(0,Yt,0),Nt.x=s0*.5+.5,Nt.y=$t*.5*Yt+.5,ke.push(Nt.x,Nt.y),Gt++}for(let n0=0;n0<V;n0++){const a0=It+n0,l0=jt+n0;Wt===!0?Pe.push(l0,l0+1,a0):Pe.push(l0+1,l0,a0),Ht+=3}Re.addGroup(xt,Ht,Wt===!0?1:2),xt+=Ht}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(e=1,r=1,o=32,V=1,le=!1,fe=0,Le=Math.PI*2){super(0,e,r,o,V,le,fe,Le),this.type="ConeGeometry",this.parameters={radius:e,height:r,radialSegments:o,heightSegments:V,openEnded:le,thetaStart:fe,thetaLength:Le}}static fromJSON(e){return new ConeGeometry(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(e=[],r=[],o=1,V=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:r,radius:o,detail:V};const le=[],fe=[];Le(V),Re(o),Pe(),this.setAttribute("position",new Float32BufferAttribute(le,3)),this.setAttribute("normal",new Float32BufferAttribute(le.slice(),3)),this.setAttribute("uv",new Float32BufferAttribute(fe,2)),V===0?this.computeVertexNormals():this.normalizeNormals();function Le(Zt){const wt=new Vector3,Wt=new Vector3,It=new Vector3;for(let Nt=0;Nt<r.length;Nt+=3)ke(r[Nt+0],wt),ke(r[Nt+1],Wt),ke(r[Nt+2],It),Ce(wt,Wt,It,Zt)}function Ce(Zt,wt,Wt,It){const Nt=It+1,Ft=[];for(let Ht=0;Ht<=Nt;Ht++){Ft[Ht]=[];const Kt=Zt.clone().lerp(Wt,Ht/Nt),Yt=wt.clone().lerp(Wt,Ht/Nt),jt=Nt-Ht;for(let n0=0;n0<=jt;n0++)n0===0&&Ht===Nt?Ft[Ht][n0]=Kt:Ft[Ht][n0]=Kt.clone().lerp(Yt,n0/jt)}for(let Ht=0;Ht<Nt;Ht++)for(let Kt=0;Kt<2*(Nt-Ht)-1;Kt++){const Yt=Math.floor(Kt/2);Kt%2===0?(Fe(Ft[Ht][Yt+1]),Fe(Ft[Ht+1][Yt]),Fe(Ft[Ht][Yt])):(Fe(Ft[Ht][Yt+1]),Fe(Ft[Ht+1][Yt+1]),Fe(Ft[Ht+1][Yt]))}}function Re(Zt){const wt=new Vector3;for(let Wt=0;Wt<le.length;Wt+=3)wt.x=le[Wt+0],wt.y=le[Wt+1],wt.z=le[Wt+2],wt.normalize().multiplyScalar(Zt),le[Wt+0]=wt.x,le[Wt+1]=wt.y,le[Wt+2]=wt.z}function Pe(){const Zt=new Vector3;for(let wt=0;wt<le.length;wt+=3){Zt.x=le[wt+0],Zt.y=le[wt+1],Zt.z=le[wt+2];const Wt=Xt(Zt)/2/Math.PI+.5,It=xt(Zt)/Math.PI+.5;fe.push(Wt,1-It)}Gt(),ze()}function ze(){for(let Zt=0;Zt<fe.length;Zt+=6){const wt=fe[Zt+0],Wt=fe[Zt+2],It=fe[Zt+4],Nt=Math.max(wt,Wt,It),Ft=Math.min(wt,Wt,It);Nt>.9&&Ft<.1&&(wt<.2&&(fe[Zt+0]+=1),Wt<.2&&(fe[Zt+2]+=1),It<.2&&(fe[Zt+4]+=1))}}function Fe(Zt){le.push(Zt.x,Zt.y,Zt.z)}function ke(Zt,wt){const Wt=Zt*3;wt.x=e[Wt+0],wt.y=e[Wt+1],wt.z=e[Wt+2]}function Gt(){const Zt=new Vector3,wt=new Vector3,Wt=new Vector3,It=new Vector3,Nt=new Vector2,Ft=new Vector2,Ht=new Vector2;for(let Kt=0,Yt=0;Kt<le.length;Kt+=9,Yt+=6){Zt.set(le[Kt+0],le[Kt+1],le[Kt+2]),wt.set(le[Kt+3],le[Kt+4],le[Kt+5]),Wt.set(le[Kt+6],le[Kt+7],le[Kt+8]),Nt.set(fe[Yt+0],fe[Yt+1]),Ft.set(fe[Yt+2],fe[Yt+3]),Ht.set(fe[Yt+4],fe[Yt+5]),It.copy(Zt).add(wt).add(Wt).divideScalar(3);const jt=Xt(It);Vt(Nt,Yt+0,Zt,jt),Vt(Ft,Yt+2,wt,jt),Vt(Ht,Yt+4,Wt,jt)}}function Vt(Zt,wt,Wt,It){It<0&&Zt.x===1&&(fe[wt]=Zt.x-1),Wt.x===0&&Wt.z===0&&(fe[wt]=It/2/Math.PI+.5)}function Xt(Zt){return Math.atan2(Zt.z,-Zt.x)}function xt(Zt){return Math.atan2(-Zt.y,Math.sqrt(Zt.x*Zt.x+Zt.z*Zt.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new PolyhedronGeometry(e.vertices,e.indices,e.radius,e.detail)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=(1+Math.sqrt(5))/2,V=1/o,le=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-V,-o,0,-V,o,0,V,-o,0,V,o,-V,-o,0,-V,o,0,V,-o,0,V,o,0,-o,0,-V,o,0,-V,-o,0,V,o,0,V],fe=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(le,fe,e,r),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new DodecahedronGeometry(e.radius,e.detail)}}const _v0$3=new Vector3,_v1$1$1=new Vector3,_normal$2=new Vector3,_triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(e=null,r=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:r},e!==null){const V=Math.pow(10,4),le=Math.cos(DEG2RAD*r),fe=e.getIndex(),Le=e.getAttribute("position"),Ce=fe?fe.count:Le.count,Re=[0,0,0],Pe=["a","b","c"],ze=new Array(3),Fe={},ke=[];for(let Gt=0;Gt<Ce;Gt+=3){fe?(Re[0]=fe.getX(Gt),Re[1]=fe.getX(Gt+1),Re[2]=fe.getX(Gt+2)):(Re[0]=Gt,Re[1]=Gt+1,Re[2]=Gt+2);const{a:Vt,b:Xt,c:xt}=_triangle;if(Vt.fromBufferAttribute(Le,Re[0]),Xt.fromBufferAttribute(Le,Re[1]),xt.fromBufferAttribute(Le,Re[2]),_triangle.getNormal(_normal$2),ze[0]=`${Math.round(Vt.x*V)},${Math.round(Vt.y*V)},${Math.round(Vt.z*V)}`,ze[1]=`${Math.round(Xt.x*V)},${Math.round(Xt.y*V)},${Math.round(Xt.z*V)}`,ze[2]=`${Math.round(xt.x*V)},${Math.round(xt.y*V)},${Math.round(xt.z*V)}`,!(ze[0]===ze[1]||ze[1]===ze[2]||ze[2]===ze[0]))for(let Zt=0;Zt<3;Zt++){const wt=(Zt+1)%3,Wt=ze[Zt],It=ze[wt],Nt=_triangle[Pe[Zt]],Ft=_triangle[Pe[wt]],Ht=`${Wt}_${It}`,Kt=`${It}_${Wt}`;Kt in Fe&&Fe[Kt]?(_normal$2.dot(Fe[Kt].normal)<=le&&(ke.push(Nt.x,Nt.y,Nt.z),ke.push(Ft.x,Ft.y,Ft.z)),Fe[Kt]=null):Ht in Fe||(Fe[Ht]={index0:Re[Zt],index1:Re[wt],normal:_normal$2.clone()})}}for(const Gt in Fe)if(Fe[Gt]){const{index0:Vt,index1:Xt}=Fe[Gt];_v0$3.fromBufferAttribute(Le,Vt),_v1$1$1.fromBufferAttribute(Le,Xt),ke.push(_v0$3.x,_v0$3.y,_v0$3.z),ke.push(_v1$1$1.x,_v1$1$1.y,_v1$1$1.z)}this.setAttribute("position",new Float32BufferAttribute(ke,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Curve{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){warn("Curve: .getPoint() not implemented.")}getPointAt(e,r){const o=this.getUtoTmapping(e);return this.getPoint(o,r)}getPoints(e=5){const r=[];for(let o=0;o<=e;o++)r.push(this.getPoint(o/e));return r}getSpacedPoints(e=5){const r=[];for(let o=0;o<=e;o++)r.push(this.getPointAt(o/e));return r}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const r=[];let o,V=this.getPoint(0),le=0;r.push(0);for(let fe=1;fe<=e;fe++)o=this.getPoint(fe/e),le+=o.distanceTo(V),r.push(le),V=o;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,r=null){const o=this.getLengths();let V=0;const le=o.length;let fe;r?fe=r:fe=e*o[le-1];let Le=0,Ce=le-1,Re;for(;Le<=Ce;)if(V=Math.floor(Le+(Ce-Le)/2),Re=o[V]-fe,Re<0)Le=V+1;else if(Re>0)Ce=V-1;else{Ce=V;break}if(V=Ce,o[V]===fe)return V/(le-1);const Pe=o[V],Fe=o[V+1]-Pe,ke=(fe-Pe)/Fe;return(V+ke)/(le-1)}getTangent(e,r){let V=e-1e-4,le=e+1e-4;V<0&&(V=0),le>1&&(le=1);const fe=this.getPoint(V),Le=this.getPoint(le),Ce=r||(fe.isVector2?new Vector2:new Vector3);return Ce.copy(Le).sub(fe).normalize(),Ce}getTangentAt(e,r){const o=this.getUtoTmapping(e);return this.getTangent(o,r)}computeFrenetFrames(e,r=!1){const o=new Vector3,V=[],le=[],fe=[],Le=new Vector3,Ce=new Matrix4;for(let ke=0;ke<=e;ke++){const Gt=ke/e;V[ke]=this.getTangentAt(Gt,new Vector3)}le[0]=new Vector3,fe[0]=new Vector3;let Re=Number.MAX_VALUE;const Pe=Math.abs(V[0].x),ze=Math.abs(V[0].y),Fe=Math.abs(V[0].z);Pe<=Re&&(Re=Pe,o.set(1,0,0)),ze<=Re&&(Re=ze,o.set(0,1,0)),Fe<=Re&&o.set(0,0,1),Le.crossVectors(V[0],o).normalize(),le[0].crossVectors(V[0],Le),fe[0].crossVectors(V[0],le[0]);for(let ke=1;ke<=e;ke++){if(le[ke]=le[ke-1].clone(),fe[ke]=fe[ke-1].clone(),Le.crossVectors(V[ke-1],V[ke]),Le.length()>Number.EPSILON){Le.normalize();const Gt=Math.acos(clamp(V[ke-1].dot(V[ke]),-1,1));le[ke].applyMatrix4(Ce.makeRotationAxis(Le,Gt))}fe[ke].crossVectors(V[ke],le[ke])}if(r===!0){let ke=Math.acos(clamp(le[0].dot(le[e]),-1,1));ke/=e,V[0].dot(Le.crossVectors(le[0],le[e]))>0&&(ke=-ke);for(let Gt=1;Gt<=e;Gt++)le[Gt].applyMatrix4(Ce.makeRotationAxis(V[Gt],ke*Gt)),fe[Gt].crossVectors(V[Gt],le[Gt])}return{tangents:V,normals:le,binormals:fe}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class EllipseCurve extends Curve{constructor(e=0,r=0,o=1,V=1,le=0,fe=Math.PI*2,Le=!1,Ce=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=r,this.xRadius=o,this.yRadius=V,this.aStartAngle=le,this.aEndAngle=fe,this.aClockwise=Le,this.aRotation=Ce}getPoint(e,r=new Vector2){const o=r,V=Math.PI*2;let le=this.aEndAngle-this.aStartAngle;const fe=Math.abs(le)<Number.EPSILON;for(;le<0;)le+=V;for(;le>V;)le-=V;le<Number.EPSILON&&(fe?le=0:le=V),this.aClockwise===!0&&!fe&&(le===V?le=-V:le=le-V);const Le=this.aStartAngle+e*le;let Ce=this.aX+this.xRadius*Math.cos(Le),Re=this.aY+this.yRadius*Math.sin(Le);if(this.aRotation!==0){const Pe=Math.cos(this.aRotation),ze=Math.sin(this.aRotation),Fe=Ce-this.aX,ke=Re-this.aY;Ce=Fe*Pe-ke*ze+this.aX,Re=Fe*ze+ke*Pe+this.aY}return o.set(Ce,Re)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class ArcCurve extends EllipseCurve{constructor(e,r,o,V,le,fe){super(e,r,o,o,V,le,fe),this.isArcCurve=!0,this.type="ArcCurve"}}function CubicPoly(){let v=0,e=0,r=0,o=0;function V(le,fe,Le,Ce){v=le,e=Le,r=-3*le+3*fe-2*Le-Ce,o=2*le-2*fe+Le+Ce}return{initCatmullRom:function(le,fe,Le,Ce,Re){V(fe,Le,Re*(Le-le),Re*(Ce-fe))},initNonuniformCatmullRom:function(le,fe,Le,Ce,Re,Pe,ze){let Fe=(fe-le)/Re-(Le-le)/(Re+Pe)+(Le-fe)/Pe,ke=(Le-fe)/Pe-(Ce-fe)/(Pe+ze)+(Ce-Le)/ze;Fe*=Pe,ke*=Pe,V(fe,Le,Fe,ke)},calc:function(le){const fe=le*le,Le=fe*le;return v+e*le+r*fe+o*Le}}}const tmp=new Vector3,px=new CubicPoly,py=new CubicPoly,pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(e=[],r=!1,o="centripetal",V=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=r,this.curveType=o,this.tension=V}getPoint(e,r=new Vector3){const o=r,V=this.points,le=V.length,fe=(le-(this.closed?0:1))*e;let Le=Math.floor(fe),Ce=fe-Le;this.closed?Le+=Le>0?0:(Math.floor(Math.abs(Le)/le)+1)*le:Ce===0&&Le===le-1&&(Le=le-2,Ce=1);let Re,Pe;this.closed||Le>0?Re=V[(Le-1)%le]:(tmp.subVectors(V[0],V[1]).add(V[0]),Re=tmp);const ze=V[Le%le],Fe=V[(Le+1)%le];if(this.closed||Le+2<le?Pe=V[(Le+2)%le]:(tmp.subVectors(V[le-1],V[le-2]).add(V[le-1]),Pe=tmp),this.curveType==="centripetal"||this.curveType==="chordal"){const ke=this.curveType==="chordal"?.5:.25;let Gt=Math.pow(Re.distanceToSquared(ze),ke),Vt=Math.pow(ze.distanceToSquared(Fe),ke),Xt=Math.pow(Fe.distanceToSquared(Pe),ke);Vt<1e-4&&(Vt=1),Gt<1e-4&&(Gt=Vt),Xt<1e-4&&(Xt=Vt),px.initNonuniformCatmullRom(Re.x,ze.x,Fe.x,Pe.x,Gt,Vt,Xt),py.initNonuniformCatmullRom(Re.y,ze.y,Fe.y,Pe.y,Gt,Vt,Xt),pz.initNonuniformCatmullRom(Re.z,ze.z,Fe.z,Pe.z,Gt,Vt,Xt)}else this.curveType==="catmullrom"&&(px.initCatmullRom(Re.x,ze.x,Fe.x,Pe.x,this.tension),py.initCatmullRom(Re.y,ze.y,Fe.y,Pe.y,this.tension),pz.initCatmullRom(Re.z,ze.z,Fe.z,Pe.z,this.tension));return o.set(px.calc(Ce),py.calc(Ce),pz.calc(Ce)),o}copy(e){super.copy(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(V.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,o=this.points.length;r<o;r++){const V=this.points[r];e.points.push(V.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(new Vector3().fromArray(V))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function CatmullRom(v,e,r,o,V){const le=(o-e)*.5,fe=(V-r)*.5,Le=v*v,Ce=v*Le;return(2*r-2*o+le+fe)*Ce+(-3*r+3*o-2*le-fe)*Le+le*v+r}function QuadraticBezierP0(v,e){const r=1-v;return r*r*e}function QuadraticBezierP1(v,e){return 2*(1-v)*v*e}function QuadraticBezierP2(v,e){return v*v*e}function QuadraticBezier(v,e,r,o){return QuadraticBezierP0(v,e)+QuadraticBezierP1(v,r)+QuadraticBezierP2(v,o)}function CubicBezierP0(v,e){const r=1-v;return r*r*r*e}function CubicBezierP1(v,e){const r=1-v;return 3*r*r*v*e}function CubicBezierP2(v,e){return 3*(1-v)*v*v*e}function CubicBezierP3(v,e){return v*v*v*e}function CubicBezier(v,e,r,o,V){return CubicBezierP0(v,e)+CubicBezierP1(v,r)+CubicBezierP2(v,o)+CubicBezierP3(v,V)}class CubicBezierCurve extends Curve{constructor(e=new Vector2,r=new Vector2,o=new Vector2,V=new Vector2){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=r,this.v2=o,this.v3=V}getPoint(e,r=new Vector2){const o=r,V=this.v0,le=this.v1,fe=this.v2,Le=this.v3;return o.set(CubicBezier(e,V.x,le.x,fe.x,Le.x),CubicBezier(e,V.y,le.y,fe.y,Le.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class CubicBezierCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3,o=new Vector3,V=new Vector3){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=r,this.v2=o,this.v3=V}getPoint(e,r=new Vector3){const o=r,V=this.v0,le=this.v1,fe=this.v2,Le=this.v3;return o.set(CubicBezier(e,V.x,le.x,fe.x,Le.x),CubicBezier(e,V.y,le.y,fe.y,Le.y),CubicBezier(e,V.z,le.z,fe.z,Le.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class LineCurve extends Curve{constructor(e=new Vector2,r=new Vector2){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=r}getPoint(e,r=new Vector2){const o=r;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new Vector2){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class LineCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=r}getPoint(e,r=new Vector3){const o=r;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,r){return this.getPoint(e,r)}getTangent(e,r=new Vector3){return r.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,r){return this.getTangent(e,r)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class QuadraticBezierCurve extends Curve{constructor(e=new Vector2,r=new Vector2,o=new Vector2){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=r,this.v2=o}getPoint(e,r=new Vector2){const o=r,V=this.v0,le=this.v1,fe=this.v2;return o.set(QuadraticBezier(e,V.x,le.x,fe.x),QuadraticBezier(e,V.y,le.y,fe.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class QuadraticBezierCurve3 extends Curve{constructor(e=new Vector3,r=new Vector3,o=new Vector3){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=r,this.v2=o}getPoint(e,r=new Vector3){const o=r,V=this.v0,le=this.v1,fe=this.v2;return o.set(QuadraticBezier(e,V.x,le.x,fe.x),QuadraticBezier(e,V.y,le.y,fe.y),QuadraticBezier(e,V.z,le.z,fe.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class SplineCurve extends Curve{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,r=new Vector2){const o=r,V=this.points,le=(V.length-1)*e,fe=Math.floor(le),Le=le-fe,Ce=V[fe===0?fe:fe-1],Re=V[fe],Pe=V[fe>V.length-2?V.length-1:fe+1],ze=V[fe>V.length-3?V.length-1:fe+2];return o.set(CatmullRom(Le,Ce.x,Re.x,Pe.x,ze.x),CatmullRom(Le,Ce.y,Re.y,Pe.y,ze.y)),o}copy(e){super.copy(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(V.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let r=0,o=this.points.length;r<o;r++){const V=this.points[r];e.points.push(V.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let r=0,o=e.points.length;r<o;r++){const V=e.points[r];this.points.push(new Vector2().fromArray(V))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve,CatmullRomCurve3,CubicBezierCurve,CubicBezierCurve3,EllipseCurve,LineCurve,LineCurve3,QuadraticBezierCurve,QuadraticBezierCurve3,SplineCurve});class CurvePath extends Curve{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(r)){const o=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Curves[o](r,e))}return this}getPoint(e,r){const o=e*this.getLength(),V=this.getCurveLengths();let le=0;for(;le<V.length;){if(V[le]>=o){const fe=V[le]-o,Le=this.curves[le],Ce=Le.getLength(),Re=Ce===0?0:1-fe/Ce;return Le.getPointAt(Re,r)}le++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let r=0;for(let o=0,V=this.curves.length;o<V;o++)r+=this.curves[o].getLength(),e.push(r);return this.cacheLengths=e,e}getSpacedPoints(e=40){const r=[];for(let o=0;o<=e;o++)r.push(this.getPoint(o/e));return this.autoClose&&r.push(r[0]),r}getPoints(e=12){const r=[];let o;for(let V=0,le=this.curves;V<le.length;V++){const fe=le[V],Le=fe.isEllipseCurve?e*2:fe.isLineCurve||fe.isLineCurve3?1:fe.isSplineCurve?e*fe.points.length:e,Ce=fe.getPoints(Le);for(let Re=0;Re<Ce.length;Re++){const Pe=Ce[Re];o&&o.equals(Pe)||(r.push(Pe),o=Pe)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(e){super.copy(e),this.curves=[];for(let r=0,o=e.curves.length;r<o;r++){const V=e.curves[r];this.curves.push(V.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let r=0,o=this.curves.length;r<o;r++){const V=this.curves[r];e.curves.push(V.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let r=0,o=e.curves.length;r<o;r++){const V=e.curves[r];this.curves.push(new Curves[V.type]().fromJSON(V))}return this}}let Path$1=class extends CurvePath{constructor(e){super(),this.type="Path",this.currentPoint=new Vector2,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let r=1,o=e.length;r<o;r++)this.lineTo(e[r].x,e[r].y);return this}moveTo(e,r){return this.currentPoint.set(e,r),this}lineTo(e,r){const o=new LineCurve(this.currentPoint.clone(),new Vector2(e,r));return this.curves.push(o),this.currentPoint.set(e,r),this}quadraticCurveTo(e,r,o,V){const le=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(e,r),new Vector2(o,V));return this.curves.push(le),this.currentPoint.set(o,V),this}bezierCurveTo(e,r,o,V,le,fe){const Le=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(e,r),new Vector2(o,V),new Vector2(le,fe));return this.curves.push(Le),this.currentPoint.set(le,fe),this}splineThru(e){const r=[this.currentPoint.clone()].concat(e),o=new SplineCurve(r);return this.curves.push(o),this.currentPoint.copy(e[e.length-1]),this}arc(e,r,o,V,le,fe){const Le=this.currentPoint.x,Ce=this.currentPoint.y;return this.absarc(e+Le,r+Ce,o,V,le,fe),this}absarc(e,r,o,V,le,fe){return this.absellipse(e,r,o,o,V,le,fe),this}ellipse(e,r,o,V,le,fe,Le,Ce){const Re=this.currentPoint.x,Pe=this.currentPoint.y;return this.absellipse(e+Re,r+Pe,o,V,le,fe,Le,Ce),this}absellipse(e,r,o,V,le,fe,Le,Ce){const Re=new EllipseCurve(e,r,o,V,le,fe,Le,Ce);if(this.curves.length>0){const ze=Re.getPoint(0);ze.equals(this.currentPoint)||this.lineTo(ze.x,ze.y)}this.curves.push(Re);const Pe=Re.getPoint(1);return this.currentPoint.copy(Pe),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}};class Shape extends Path$1{constructor(e){super(e),this.uuid=generateUUID(),this.type="Shape",this.holes=[]}getPointsHoles(e){const r=[];for(let o=0,V=this.holes.length;o<V;o++)r[o]=this.holes[o].getPoints(e);return r}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let r=0,o=e.holes.length;r<o;r++){const V=e.holes[r];this.holes.push(V.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let r=0,o=this.holes.length;r<o;r++){const V=this.holes[r];e.holes.push(V.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let r=0,o=e.holes.length;r<o;r++){const V=e.holes[r];this.holes.push(new Path$1().fromJSON(V))}return this}}function earcut$1(v,e,r=2){const o=e&&e.length,V=o?e[0]*r:v.length;let le=linkedList$1(v,0,V,r,!0);const fe=[];if(!le||le.next===le.prev)return fe;let Le,Ce,Re;if(o&&(le=eliminateHoles$1(v,e,le,r)),v.length>80*r){Le=v[0],Ce=v[1];let Pe=Le,ze=Ce;for(let Fe=r;Fe<V;Fe+=r){const ke=v[Fe],Gt=v[Fe+1];ke<Le&&(Le=ke),Gt<Ce&&(Ce=Gt),ke>Pe&&(Pe=ke),Gt>ze&&(ze=Gt)}Re=Math.max(Pe-Le,ze-Ce),Re=Re!==0?32767/Re:0}return earcutLinked$1(le,fe,r,Le,Ce,Re,0),fe}function linkedList$1(v,e,r,o,V){let le;if(V===signedArea$1(v,e,r,o)>0)for(let fe=e;fe<r;fe+=o)le=insertNode$1(fe/o|0,v[fe],v[fe+1],le);else for(let fe=r-o;fe>=e;fe-=o)le=insertNode$1(fe/o|0,v[fe],v[fe+1],le);return le&&equals$1(le,le.next)&&(removeNode$1(le),le=le.next),le}function filterPoints$1(v,e){if(!v)return v;e||(e=v);let r=v,o;do if(o=!1,!r.steiner&&(equals$1(r,r.next)||area$1(r.prev,r,r.next)===0)){if(removeNode$1(r),r=e=r.prev,r===r.next)break;o=!0}else r=r.next;while(o||r!==e);return e}function earcutLinked$1(v,e,r,o,V,le,fe){if(!v)return;!fe&&le&&indexCurve$1(v,o,V,le);let Le=v;for(;v.prev!==v.next;){const Ce=v.prev,Re=v.next;if(le?isEarHashed$1(v,o,V,le):isEar$1(v)){e.push(Ce.i,v.i,Re.i),removeNode$1(v),v=Re.next,Le=Re.next;continue}if(v=Re,v===Le){fe?fe===1?(v=cureLocalIntersections$1(filterPoints$1(v),e),earcutLinked$1(v,e,r,o,V,le,2)):fe===2&&splitEarcut$1(v,e,r,o,V,le):earcutLinked$1(filterPoints$1(v),e,r,o,V,le,1);break}}}function isEar$1(v){const e=v.prev,r=v,o=v.next;if(area$1(e,r,o)>=0)return!1;const V=e.x,le=r.x,fe=o.x,Le=e.y,Ce=r.y,Re=o.y,Pe=Math.min(V,le,fe),ze=Math.min(Le,Ce,Re),Fe=Math.max(V,le,fe),ke=Math.max(Le,Ce,Re);let Gt=o.next;for(;Gt!==e;){if(Gt.x>=Pe&&Gt.x<=Fe&&Gt.y>=ze&&Gt.y<=ke&&pointInTriangleExceptFirst$1(V,Le,le,Ce,fe,Re,Gt.x,Gt.y)&&area$1(Gt.prev,Gt,Gt.next)>=0)return!1;Gt=Gt.next}return!0}function isEarHashed$1(v,e,r,o){const V=v.prev,le=v,fe=v.next;if(area$1(V,le,fe)>=0)return!1;const Le=V.x,Ce=le.x,Re=fe.x,Pe=V.y,ze=le.y,Fe=fe.y,ke=Math.min(Le,Ce,Re),Gt=Math.min(Pe,ze,Fe),Vt=Math.max(Le,Ce,Re),Xt=Math.max(Pe,ze,Fe),xt=zOrder$1(ke,Gt,e,r,o),Zt=zOrder$1(Vt,Xt,e,r,o);let wt=v.prevZ,Wt=v.nextZ;for(;wt&&wt.z>=xt&&Wt&&Wt.z<=Zt;){if(wt.x>=ke&&wt.x<=Vt&&wt.y>=Gt&&wt.y<=Xt&&wt!==V&&wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,wt.x,wt.y)&&area$1(wt.prev,wt,wt.next)>=0||(wt=wt.prevZ,Wt.x>=ke&&Wt.x<=Vt&&Wt.y>=Gt&&Wt.y<=Xt&&Wt!==V&&Wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,Wt.x,Wt.y)&&area$1(Wt.prev,Wt,Wt.next)>=0))return!1;Wt=Wt.nextZ}for(;wt&&wt.z>=xt;){if(wt.x>=ke&&wt.x<=Vt&&wt.y>=Gt&&wt.y<=Xt&&wt!==V&&wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,wt.x,wt.y)&&area$1(wt.prev,wt,wt.next)>=0)return!1;wt=wt.prevZ}for(;Wt&&Wt.z<=Zt;){if(Wt.x>=ke&&Wt.x<=Vt&&Wt.y>=Gt&&Wt.y<=Xt&&Wt!==V&&Wt!==fe&&pointInTriangleExceptFirst$1(Le,Pe,Ce,ze,Re,Fe,Wt.x,Wt.y)&&area$1(Wt.prev,Wt,Wt.next)>=0)return!1;Wt=Wt.nextZ}return!0}function cureLocalIntersections$1(v,e){let r=v;do{const o=r.prev,V=r.next.next;!equals$1(o,V)&&intersects$1(o,r,r.next,V)&&locallyInside$1(o,V)&&locallyInside$1(V,o)&&(e.push(o.i,r.i,V.i),removeNode$1(r),removeNode$1(r.next),r=v=V),r=r.next}while(r!==v);return filterPoints$1(r)}function splitEarcut$1(v,e,r,o,V,le){let fe=v;do{let Le=fe.next.next;for(;Le!==fe.prev;){if(fe.i!==Le.i&&isValidDiagonal$1(fe,Le)){let Ce=splitPolygon$1(fe,Le);fe=filterPoints$1(fe,fe.next),Ce=filterPoints$1(Ce,Ce.next),earcutLinked$1(fe,e,r,o,V,le,0),earcutLinked$1(Ce,e,r,o,V,le,0);return}Le=Le.next}fe=fe.next}while(fe!==v)}function eliminateHoles$1(v,e,r,o){const V=[];for(let le=0,fe=e.length;le<fe;le++){const Le=e[le]*o,Ce=le<fe-1?e[le+1]*o:v.length,Re=linkedList$1(v,Le,Ce,o,!1);Re===Re.next&&(Re.steiner=!0),V.push(getLeftmost$1(Re))}V.sort(compareXYSlope$1);for(let le=0;le<V.length;le++)r=eliminateHole$1(V[le],r);return r}function compareXYSlope$1(v,e){let r=v.x-e.x;if(r===0&&(r=v.y-e.y,r===0)){const o=(v.next.y-v.y)/(v.next.x-v.x),V=(e.next.y-e.y)/(e.next.x-e.x);r=o-V}return r}function eliminateHole$1(v,e){const r=findHoleBridge$1(v,e);if(!r)return e;const o=splitPolygon$1(r,v);return filterPoints$1(o,o.next),filterPoints$1(r,r.next)}function findHoleBridge$1(v,e){let r=e;const o=v.x,V=v.y;let le=-1/0,fe;if(equals$1(v,r))return r;do{if(equals$1(v,r.next))return r.next;if(V<=r.y&&V>=r.next.y&&r.next.y!==r.y){const ze=r.x+(V-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(ze<=o&&ze>le&&(le=ze,fe=r.x<r.next.x?r:r.next,ze===o))return fe}r=r.next}while(r!==e);if(!fe)return null;const Le=fe,Ce=fe.x,Re=fe.y;let Pe=1/0;r=fe;do{if(o>=r.x&&r.x>=Ce&&o!==r.x&&pointInTriangle$1(V<Re?o:le,V,Ce,Re,V<Re?le:o,V,r.x,r.y)){const ze=Math.abs(V-r.y)/(o-r.x);locallyInside$1(r,v)&&(ze<Pe||ze===Pe&&(r.x>fe.x||r.x===fe.x&§orContainsSector$1(fe,r)))&&(fe=r,Pe=ze)}r=r.next}while(r!==Le);return fe}function sectorContainsSector$1(v,e){return area$1(v.prev,v,e.prev)<0&&area$1(e.next,v,v.next)<0}function indexCurve$1(v,e,r,o){let V=v;do V.z===0&&(V.z=zOrder$1(V.x,V.y,e,r,o)),V.prevZ=V.prev,V.nextZ=V.next,V=V.next;while(V!==v);V.prevZ.nextZ=null,V.prevZ=null,sortLinked$1(V)}function sortLinked$1(v){let e,r=1;do{let o=v,V;v=null;let le=null;for(e=0;o;){e++;let fe=o,Le=0;for(let Re=0;Re<r&&(Le++,fe=fe.nextZ,!!fe);Re++);let Ce=r;for(;Le>0||Ce>0&&fe;)Le!==0&&(Ce===0||!fe||o.z<=fe.z)?(V=o,o=o.nextZ,Le--):(V=fe,fe=fe.nextZ,Ce--),le?le.nextZ=V:v=V,V.prevZ=le,le=V;o=fe}le.nextZ=null,r*=2}while(e>1);return v}function zOrder$1(v,e,r,o,V){return v=(v-r)*V|0,e=(e-o)*V|0,v=(v|v<<8)&16711935,v=(v|v<<4)&252645135,v=(v|v<<2)&858993459,v=(v|v<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,v|e<<1}function getLeftmost$1(v){let e=v,r=v;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==v);return r}function pointInTriangle$1(v,e,r,o,V,le,fe,Le){return(V-fe)*(e-Le)>=(v-fe)*(le-Le)&&(v-fe)*(o-Le)>=(r-fe)*(e-Le)&&(r-fe)*(le-Le)>=(V-fe)*(o-Le)}function pointInTriangleExceptFirst$1(v,e,r,o,V,le,fe,Le){return!(v===fe&&e===Le)&&pointInTriangle$1(v,e,r,o,V,le,fe,Le)}function isValidDiagonal$1(v,e){return v.next.i!==e.i&&v.prev.i!==e.i&&!intersectsPolygon$1(v,e)&&(locallyInside$1(v,e)&&locallyInside$1(e,v)&&middleInside$1(v,e)&&(area$1(v.prev,v,e.prev)||area$1(v,e.prev,e))||equals$1(v,e)&&area$1(v.prev,v,v.next)>0&&area$1(e.prev,e,e.next)>0)}function area$1(v,e,r){return(e.y-v.y)*(r.x-e.x)-(e.x-v.x)*(r.y-e.y)}function equals$1(v,e){return v.x===e.x&&v.y===e.y}function intersects$1(v,e,r,o){const V=sign$3(area$1(v,e,r)),le=sign$3(area$1(v,e,o)),fe=sign$3(area$1(r,o,v)),Le=sign$3(area$1(r,o,e));return!!(V!==le&&fe!==Le||V===0&&onSegment$1(v,r,e)||le===0&&onSegment$1(v,o,e)||fe===0&&onSegment$1(r,v,o)||Le===0&&onSegment$1(r,e,o))}function onSegment$1(v,e,r){return e.x<=Math.max(v.x,r.x)&&e.x>=Math.min(v.x,r.x)&&e.y<=Math.max(v.y,r.y)&&e.y>=Math.min(v.y,r.y)}function sign$3(v){return v>0?1:v<0?-1:0}function intersectsPolygon$1(v,e){let r=v;do{if(r.i!==v.i&&r.next.i!==v.i&&r.i!==e.i&&r.next.i!==e.i&&intersects$1(r,r.next,v,e))return!0;r=r.next}while(r!==v);return!1}function locallyInside$1(v,e){return area$1(v.prev,v,v.next)<0?area$1(v,e,v.next)>=0&&area$1(v,v.prev,e)>=0:area$1(v,e,v.prev)<0||area$1(v,v.next,e)<0}function middleInside$1(v,e){let r=v,o=!1;const V=(v.x+e.x)/2,le=(v.y+e.y)/2;do r.y>le!=r.next.y>le&&r.next.y!==r.y&&V<(r.next.x-r.x)*(le-r.y)/(r.next.y-r.y)+r.x&&(o=!o),r=r.next;while(r!==v);return o}function splitPolygon$1(v,e){const r=createNode$1(v.i,v.x,v.y),o=createNode$1(e.i,e.x,e.y),V=v.next,le=e.prev;return v.next=e,e.prev=v,r.next=V,V.prev=r,o.next=r,r.prev=o,le.next=o,o.prev=le,o}function insertNode$1(v,e,r,o){const V=createNode$1(v,e,r);return o?(V.next=o.next,V.prev=o,o.next.prev=V,o.next=V):(V.prev=V,V.next=V),V}function removeNode$1(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function createNode$1(v,e,r){return{i:v,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function signedArea$1(v,e,r,o){let V=0;for(let le=e,fe=r-o;le<r;le+=o)V+=(v[fe]-v[le])*(v[le+1]+v[fe+1]),fe=le;return V}class Earcut{static triangulate(e,r,o=2){return earcut$1(e,r,o)}}class ShapeUtils{static area(e){const r=e.length;let o=0;for(let V=r-1,le=0;le<r;V=le++)o+=e[V].x*e[le].y-e[le].x*e[V].y;return o*.5}static isClockWise(e){return ShapeUtils.area(e)<0}static triangulateShape(e,r){const o=[],V=[],le=[];removeDupEndPts(e),addContour(o,e);let fe=e.length;r.forEach(removeDupEndPts);for(let Ce=0;Ce<r.length;Ce++)V.push(fe),fe+=r[Ce].length,addContour(o,r[Ce]);const Le=Earcut.triangulate(o,V);for(let Ce=0;Ce<Le.length;Ce+=3)le.push(Le.slice(Ce,Ce+3));return le}}function removeDupEndPts(v){const e=v.length;e>2&&v[e-1].equals(v[0])&&v.pop()}function addContour(v,e){for(let r=0;r<e.length;r++)v.push(e[r].x),v.push(e[r].y)}class ExtrudeGeometry extends BufferGeometry{constructor(e=new Shape([new Vector2(.5,.5),new Vector2(-.5,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:r},e=Array.isArray(e)?e:[e];const o=this,V=[],le=[];for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le];fe(Re)}this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("uv",new Float32BufferAttribute(le,2)),this.computeVertexNormals();function fe(Le){const Ce=[],Re=r.curveSegments!==void 0?r.curveSegments:12,Pe=r.steps!==void 0?r.steps:1,ze=r.depth!==void 0?r.depth:1;let Fe=r.bevelEnabled!==void 0?r.bevelEnabled:!0,ke=r.bevelThickness!==void 0?r.bevelThickness:.2,Gt=r.bevelSize!==void 0?r.bevelSize:ke-.1,Vt=r.bevelOffset!==void 0?r.bevelOffset:0,Xt=r.bevelSegments!==void 0?r.bevelSegments:3;const xt=r.extrudePath,Zt=r.UVGenerator!==void 0?r.UVGenerator:WorldUVGenerator;let wt,Wt=!1,It,Nt,Ft,Ht;if(xt){wt=xt.getSpacedPoints(Pe),Wt=!0,Fe=!1;const A0=xt.isCatmullRomCurve3?xt.closed:!1;It=xt.computeFrenetFrames(Pe,A0),Nt=new Vector3,Ft=new Vector3,Ht=new Vector3}Fe||(Xt=0,ke=0,Gt=0,Vt=0);const Kt=Le.extractPoints(Re);let Yt=Kt.shape;const jt=Kt.holes;if(!ShapeUtils.isClockWise(Yt)){Yt=Yt.reverse();for(let A0=0,bi=jt.length;A0<bi;A0++){const $0=jt[A0];ShapeUtils.isClockWise($0)&&(jt[A0]=$0.reverse())}}function a0(A0){const $0=10000000000000001e-36;let Li=A0[0];for(let d0=1;d0<=A0.length;d0++){const K0=d0%A0.length,E0=A0[K0],B0=E0.x-Li.x,I0=E0.y-Li.y,c0=B0*B0+I0*I0,r0=Math.max(Math.abs(E0.x),Math.abs(E0.y),Math.abs(Li.x),Math.abs(Li.y)),M0=$0*r0*r0;if(c0<=M0){A0.splice(K0,1),d0--;continue}Li=E0}}a0(Yt),jt.forEach(a0);const l0=jt.length,s0=Yt;for(let A0=0;A0<l0;A0++){const bi=jt[A0];Yt=Yt.concat(bi)}function $t(A0,bi,$0){return bi||error$1("ExtrudeGeometry: vec does not exist"),A0.clone().addScaledVector(bi,$0)}const qt=Yt.length;function e0(A0,bi,$0){let Li,d0,K0;const E0=A0.x-bi.x,B0=A0.y-bi.y,I0=$0.x-A0.x,c0=$0.y-A0.y,r0=E0*E0+B0*B0,M0=E0*c0-B0*I0;if(Math.abs(M0)>Number.EPSILON){const T0=Math.sqrt(r0),k0=Math.sqrt(I0*I0+c0*c0),w0=bi.x-B0/T0,Pi=bi.y+E0/T0,Ci=$0.x-c0/k0,Wi=$0.y+I0/k0,Oi=((Ci-w0)*c0-(Wi-Pi)*I0)/(E0*c0-B0*I0);Li=w0+E0*Oi-A0.x,d0=Pi+B0*Oi-A0.y;const Gi=Li*Li+d0*d0;if(Gi<=2)return new Vector2(Li,d0);K0=Math.sqrt(Gi/2)}else{let T0=!1;E0>Number.EPSILON?I0>Number.EPSILON&&(T0=!0):E0<-Number.EPSILON?I0<-Number.EPSILON&&(T0=!0):Math.sign(B0)===Math.sign(c0)&&(T0=!0),T0?(Li=-B0,d0=E0,K0=Math.sqrt(r0)):(Li=E0,d0=B0,K0=Math.sqrt(r0/2))}return new Vector2(Li/K0,d0/K0)}const o0=[];for(let A0=0,bi=s0.length,$0=bi-1,Li=A0+1;A0<bi;A0++,$0++,Li++)$0===bi&&($0=0),Li===bi&&(Li=0),o0[A0]=e0(s0[A0],s0[$0],s0[Li]);const b0=[];let m0,P0=o0.concat();for(let A0=0,bi=l0;A0<bi;A0++){const $0=jt[A0];m0=[];for(let Li=0,d0=$0.length,K0=d0-1,E0=Li+1;Li<d0;Li++,K0++,E0++)K0===d0&&(K0=0),E0===d0&&(E0=0),m0[Li]=e0($0[Li],$0[K0],$0[E0]);b0.push(m0),P0=P0.concat(m0)}let Q0;if(Xt===0)Q0=ShapeUtils.triangulateShape(s0,jt);else{const A0=[],bi=[];for(let $0=0;$0<Xt;$0++){const Li=$0/Xt,d0=ke*Math.cos(Li*Math.PI/2),K0=Gt*Math.sin(Li*Math.PI/2)+Vt;for(let E0=0,B0=s0.length;E0<B0;E0++){const I0=$t(s0[E0],o0[E0],K0);Vi(I0.x,I0.y,-d0),Li===0&&A0.push(I0)}for(let E0=0,B0=l0;E0<B0;E0++){const I0=jt[E0];m0=b0[E0];const c0=[];for(let r0=0,M0=I0.length;r0<M0;r0++){const T0=$t(I0[r0],m0[r0],K0);Vi(T0.x,T0.y,-d0),Li===0&&c0.push(T0)}Li===0&&bi.push(c0)}}Q0=ShapeUtils.triangulateShape(A0,bi)}const Si=Q0.length,Ni=Gt+Vt;for(let A0=0;A0<qt;A0++){const bi=Fe?$t(Yt[A0],P0[A0],Ni):Yt[A0];Wt?(Ft.copy(It.normals[0]).multiplyScalar(bi.x),Nt.copy(It.binormals[0]).multiplyScalar(bi.y),Ht.copy(wt[0]).add(Ft).add(Nt),Vi(Ht.x,Ht.y,Ht.z)):Vi(bi.x,bi.y,0)}for(let A0=1;A0<=Pe;A0++)for(let bi=0;bi<qt;bi++){const $0=Fe?$t(Yt[bi],P0[bi],Ni):Yt[bi];Wt?(Ft.copy(It.normals[A0]).multiplyScalar($0.x),Nt.copy(It.binormals[A0]).multiplyScalar($0.y),Ht.copy(wt[A0]).add(Ft).add(Nt),Vi(Ht.x,Ht.y,Ht.z)):Vi($0.x,$0.y,ze/Pe*A0)}for(let A0=Xt-1;A0>=0;A0--){const bi=A0/Xt,$0=ke*Math.cos(bi*Math.PI/2),Li=Gt*Math.sin(bi*Math.PI/2)+Vt;for(let d0=0,K0=s0.length;d0<K0;d0++){const E0=$t(s0[d0],o0[d0],Li);Vi(E0.x,E0.y,ze+$0)}for(let d0=0,K0=jt.length;d0<K0;d0++){const E0=jt[d0];m0=b0[d0];for(let B0=0,I0=E0.length;B0<I0;B0++){const c0=$t(E0[B0],m0[B0],Li);Wt?Vi(c0.x,c0.y+wt[Pe-1].y,wt[Pe-1].x+$0):Vi(c0.x,c0.y,ze+$0)}}}G0(),R0();function G0(){const A0=V.length/3;if(Fe){let bi=0,$0=qt*bi;for(let Li=0;Li<Si;Li++){const d0=Q0[Li];vi(d0[2]+$0,d0[1]+$0,d0[0]+$0)}bi=Pe+Xt*2,$0=qt*bi;for(let Li=0;Li<Si;Li++){const d0=Q0[Li];vi(d0[0]+$0,d0[1]+$0,d0[2]+$0)}}else{for(let bi=0;bi<Si;bi++){const $0=Q0[bi];vi($0[2],$0[1],$0[0])}for(let bi=0;bi<Si;bi++){const $0=Q0[bi];vi($0[0]+qt*Pe,$0[1]+qt*Pe,$0[2]+qt*Pe)}}o.addGroup(A0,V.length/3-A0,0)}function R0(){const A0=V.length/3;let bi=0;O0(s0,bi),bi+=s0.length;for(let $0=0,Li=jt.length;$0<Li;$0++){const d0=jt[$0];O0(d0,bi),bi+=d0.length}o.addGroup(A0,V.length/3-A0,1)}function O0(A0,bi){let $0=A0.length;for(;--$0>=0;){const Li=$0;let d0=$0-1;d0<0&&(d0=A0.length-1);for(let K0=0,E0=Pe+Xt*2;K0<E0;K0++){const B0=qt*K0,I0=qt*(K0+1),c0=bi+Li+B0,r0=bi+d0+B0,M0=bi+d0+I0,T0=bi+Li+I0;Hi(c0,r0,M0,T0)}}}function Vi(A0,bi,$0){Ce.push(A0),Ce.push(bi),Ce.push($0)}function vi(A0,bi,$0){Yi(A0),Yi(bi),Yi($0);const Li=V.length/3,d0=Zt.generateTopUV(o,V,Li-3,Li-2,Li-1);j0(d0[0]),j0(d0[1]),j0(d0[2])}function Hi(A0,bi,$0,Li){Yi(A0),Yi(bi),Yi(Li),Yi(bi),Yi($0),Yi(Li);const d0=V.length/3,K0=Zt.generateSideWallUV(o,V,d0-6,d0-3,d0-2,d0-1);j0(K0[0]),j0(K0[1]),j0(K0[3]),j0(K0[1]),j0(K0[2]),j0(K0[3])}function Yi(A0){V.push(Ce[A0*3+0]),V.push(Ce[A0*3+1]),V.push(Ce[A0*3+2])}function j0(A0){le.push(A0.x),le.push(A0.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes,o=this.parameters.options;return toJSON$1(r,o,e)}static fromJSON(e,r){const o=[];for(let le=0,fe=e.shapes.length;le<fe;le++){const Le=r[e.shapes[le]];o.push(Le)}const V=e.options.extrudePath;return V!==void 0&&(e.options.extrudePath=new Curves[V.type]().fromJSON(V)),new ExtrudeGeometry(o,e.options)}}const WorldUVGenerator={generateTopUV:function(v,e,r,o,V){const le=e[r*3],fe=e[r*3+1],Le=e[o*3],Ce=e[o*3+1],Re=e[V*3],Pe=e[V*3+1];return[new Vector2(le,fe),new Vector2(Le,Ce),new Vector2(Re,Pe)]},generateSideWallUV:function(v,e,r,o,V,le){const fe=e[r*3],Le=e[r*3+1],Ce=e[r*3+2],Re=e[o*3],Pe=e[o*3+1],ze=e[o*3+2],Fe=e[V*3],ke=e[V*3+1],Gt=e[V*3+2],Vt=e[le*3],Xt=e[le*3+1],xt=e[le*3+2];return Math.abs(Le-Pe)<Math.abs(fe-Re)?[new Vector2(fe,1-Ce),new Vector2(Re,1-ze),new Vector2(Fe,1-Gt),new Vector2(Vt,1-xt)]:[new Vector2(Le,1-Ce),new Vector2(Pe,1-ze),new Vector2(ke,1-Gt),new Vector2(Xt,1-xt)]}};function toJSON$1(v,e,r){if(r.shapes=[],Array.isArray(v))for(let o=0,V=v.length;o<V;o++){const le=v[o];r.shapes.push(le.uuid)}else r.shapes.push(v.uuid);return r.options=Object.assign({},e),e.extrudePath!==void 0&&(r.options.extrudePath=e.extrudePath.toJSON()),r}class IcosahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=(1+Math.sqrt(5))/2,V=[-1,o,0,1,o,0,-1,-o,0,1,-o,0,0,-1,o,0,1,o,0,-1,-o,0,1,-o,o,0,-1,o,0,1,-o,0,-1,-o,0,1],le=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(V,le,e,r),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new IcosahedronGeometry(e.radius,e.detail)}}class LatheGeometry extends BufferGeometry{constructor(e=[new Vector2(0,-.5),new Vector2(.5,0),new Vector2(0,.5)],r=12,o=0,V=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:r,phiStart:o,phiLength:V},r=Math.floor(r),V=clamp(V,0,Math.PI*2);const le=[],fe=[],Le=[],Ce=[],Re=[],Pe=1/r,ze=new Vector3,Fe=new Vector2,ke=new Vector3,Gt=new Vector3,Vt=new Vector3;let Xt=0,xt=0;for(let Zt=0;Zt<=e.length-1;Zt++)switch(Zt){case 0:Xt=e[Zt+1].x-e[Zt].x,xt=e[Zt+1].y-e[Zt].y,ke.x=xt*1,ke.y=-Xt,ke.z=xt*0,Vt.copy(ke),ke.normalize(),Ce.push(ke.x,ke.y,ke.z);break;case e.length-1:Ce.push(Vt.x,Vt.y,Vt.z);break;default:Xt=e[Zt+1].x-e[Zt].x,xt=e[Zt+1].y-e[Zt].y,ke.x=xt*1,ke.y=-Xt,ke.z=xt*0,Gt.copy(ke),ke.x+=Vt.x,ke.y+=Vt.y,ke.z+=Vt.z,ke.normalize(),Ce.push(ke.x,ke.y,ke.z),Vt.copy(Gt)}for(let Zt=0;Zt<=r;Zt++){const wt=o+Zt*Pe*V,Wt=Math.sin(wt),It=Math.cos(wt);for(let Nt=0;Nt<=e.length-1;Nt++){ze.x=e[Nt].x*Wt,ze.y=e[Nt].y,ze.z=e[Nt].x*It,fe.push(ze.x,ze.y,ze.z),Fe.x=Zt/r,Fe.y=Nt/(e.length-1),Le.push(Fe.x,Fe.y);const Ft=Ce[3*Nt+0]*Wt,Ht=Ce[3*Nt+1],Kt=Ce[3*Nt+0]*It;Re.push(Ft,Ht,Kt)}}for(let Zt=0;Zt<r;Zt++)for(let wt=0;wt<e.length-1;wt++){const Wt=wt+Zt*e.length,It=Wt,Nt=Wt+e.length,Ft=Wt+e.length+1,Ht=Wt+1;le.push(It,Nt,Ht),le.push(Ft,Ht,Nt)}this.setIndex(le),this.setAttribute("position",new Float32BufferAttribute(fe,3)),this.setAttribute("uv",new Float32BufferAttribute(Le,2)),this.setAttribute("normal",new Float32BufferAttribute(Re,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new LatheGeometry(e.points,e.segments,e.phiStart,e.phiLength)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],V=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(o,V,e,r),this.type="OctahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new OctahedronGeometry(e.radius,e.detail)}}class PlaneGeometry extends BufferGeometry{constructor(e=1,r=1,o=1,V=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:r,widthSegments:o,heightSegments:V};const le=e/2,fe=r/2,Le=Math.floor(o),Ce=Math.floor(V),Re=Le+1,Pe=Ce+1,ze=e/Le,Fe=r/Ce,ke=[],Gt=[],Vt=[],Xt=[];for(let xt=0;xt<Pe;xt++){const Zt=xt*Fe-fe;for(let wt=0;wt<Re;wt++){const Wt=wt*ze-le;Gt.push(Wt,-Zt,0),Vt.push(0,0,1),Xt.push(wt/Le),Xt.push(1-xt/Ce)}}for(let xt=0;xt<Ce;xt++)for(let Zt=0;Zt<Le;Zt++){const wt=Zt+Re*xt,Wt=Zt+Re*(xt+1),It=Zt+1+Re*(xt+1),Nt=Zt+1+Re*xt;ke.push(wt,Wt,Nt),ke.push(Wt,It,Nt)}this.setIndex(ke),this.setAttribute("position",new Float32BufferAttribute(Gt,3)),this.setAttribute("normal",new Float32BufferAttribute(Vt,3)),this.setAttribute("uv",new Float32BufferAttribute(Xt,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new PlaneGeometry(e.width,e.height,e.widthSegments,e.heightSegments)}}class RingGeometry extends BufferGeometry{constructor(e=.5,r=1,o=32,V=1,le=0,fe=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:r,thetaSegments:o,phiSegments:V,thetaStart:le,thetaLength:fe},o=Math.max(3,o),V=Math.max(1,V);const Le=[],Ce=[],Re=[],Pe=[];let ze=e;const Fe=(r-e)/V,ke=new Vector3,Gt=new Vector2;for(let Vt=0;Vt<=V;Vt++){for(let Xt=0;Xt<=o;Xt++){const xt=le+Xt/o*fe;ke.x=ze*Math.cos(xt),ke.y=ze*Math.sin(xt),Ce.push(ke.x,ke.y,ke.z),Re.push(0,0,1),Gt.x=(ke.x/r+1)/2,Gt.y=(ke.y/r+1)/2,Pe.push(Gt.x,Gt.y)}ze+=Fe}for(let Vt=0;Vt<V;Vt++){const Xt=Vt*(o+1);for(let xt=0;xt<o;xt++){const Zt=xt+Xt,wt=Zt,Wt=Zt+o+1,It=Zt+o+2,Nt=Zt+1;Le.push(wt,Wt,Nt),Le.push(Wt,It,Nt)}}this.setIndex(Le),this.setAttribute("position",new Float32BufferAttribute(Ce,3)),this.setAttribute("normal",new Float32BufferAttribute(Re,3)),this.setAttribute("uv",new Float32BufferAttribute(Pe,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new RingGeometry(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(e=new Shape([new Vector2(0,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:r};const o=[],V=[],le=[],fe=[];let Le=0,Ce=0;if(Array.isArray(e)===!1)Re(e);else for(let Pe=0;Pe<e.length;Pe++)Re(e[Pe]),this.addGroup(Le,Ce,Pe),Le+=Ce,Ce=0;this.setIndex(o),this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("normal",new Float32BufferAttribute(le,3)),this.setAttribute("uv",new Float32BufferAttribute(fe,2));function Re(Pe){const ze=V.length/3,Fe=Pe.extractPoints(r);let ke=Fe.shape;const Gt=Fe.holes;ShapeUtils.isClockWise(ke)===!1&&(ke=ke.reverse());for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];ShapeUtils.isClockWise(Zt)===!0&&(Gt[Xt]=Zt.reverse())}const Vt=ShapeUtils.triangulateShape(ke,Gt);for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];ke=ke.concat(Zt)}for(let Xt=0,xt=ke.length;Xt<xt;Xt++){const Zt=ke[Xt];V.push(Zt.x,Zt.y,0),le.push(0,0,1),fe.push(Zt.x,Zt.y)}for(let Xt=0,xt=Vt.length;Xt<xt;Xt++){const Zt=Vt[Xt],wt=Zt[0]+ze,Wt=Zt[1]+ze,It=Zt[2]+ze;o.push(wt,Wt,It),Ce+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes;return toJSON(r,e)}static fromJSON(e,r){const o=[];for(let V=0,le=e.shapes.length;V<le;V++){const fe=r[e.shapes[V]];o.push(fe)}return new ShapeGeometry(o,e.curveSegments)}}function toJSON(v,e){if(e.shapes=[],Array.isArray(v))for(let r=0,o=v.length;r<o;r++){const V=v[r];e.shapes.push(V.uuid)}else e.shapes.push(v.uuid);return e}class SphereGeometry extends BufferGeometry{constructor(e=1,r=32,o=16,V=0,le=Math.PI*2,fe=0,Le=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:r,heightSegments:o,phiStart:V,phiLength:le,thetaStart:fe,thetaLength:Le},r=Math.max(3,Math.floor(r)),o=Math.max(2,Math.floor(o));const Ce=Math.min(fe+Le,Math.PI);let Re=0;const Pe=[],ze=new Vector3,Fe=new Vector3,ke=[],Gt=[],Vt=[],Xt=[];for(let xt=0;xt<=o;xt++){const Zt=[],wt=xt/o;let Wt=0;xt===0&&fe===0?Wt=.5/r:xt===o&&Ce===Math.PI&&(Wt=-.5/r);for(let It=0;It<=r;It++){const Nt=It/r;ze.x=-e*Math.cos(V+Nt*le)*Math.sin(fe+wt*Le),ze.y=e*Math.cos(fe+wt*Le),ze.z=e*Math.sin(V+Nt*le)*Math.sin(fe+wt*Le),Gt.push(ze.x,ze.y,ze.z),Fe.copy(ze).normalize(),Vt.push(Fe.x,Fe.y,Fe.z),Xt.push(Nt+Wt,1-wt),Zt.push(Re++)}Pe.push(Zt)}for(let xt=0;xt<o;xt++)for(let Zt=0;Zt<r;Zt++){const wt=Pe[xt][Zt+1],Wt=Pe[xt][Zt],It=Pe[xt+1][Zt],Nt=Pe[xt+1][Zt+1];(xt!==0||fe>0)&&ke.push(wt,Wt,Nt),(xt!==o-1||Ce<Math.PI)&&ke.push(Wt,It,Nt)}this.setIndex(ke),this.setAttribute("position",new Float32BufferAttribute(Gt,3)),this.setAttribute("normal",new Float32BufferAttribute(Vt,3)),this.setAttribute("uv",new Float32BufferAttribute(Xt,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new SphereGeometry(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(e=1,r=0){const o=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],V=[2,1,0,0,3,2,1,3,0,2,3,1];super(o,V,e,r),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:r}}static fromJSON(e){return new TetrahedronGeometry(e.radius,e.detail)}}class TorusGeometry extends BufferGeometry{constructor(e=1,r=.4,o=12,V=48,le=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:r,radialSegments:o,tubularSegments:V,arc:le},o=Math.floor(o),V=Math.floor(V);const fe=[],Le=[],Ce=[],Re=[],Pe=new Vector3,ze=new Vector3,Fe=new Vector3;for(let ke=0;ke<=o;ke++)for(let Gt=0;Gt<=V;Gt++){const Vt=Gt/V*le,Xt=ke/o*Math.PI*2;ze.x=(e+r*Math.cos(Xt))*Math.cos(Vt),ze.y=(e+r*Math.cos(Xt))*Math.sin(Vt),ze.z=r*Math.sin(Xt),Le.push(ze.x,ze.y,ze.z),Pe.x=e*Math.cos(Vt),Pe.y=e*Math.sin(Vt),Fe.subVectors(ze,Pe).normalize(),Ce.push(Fe.x,Fe.y,Fe.z),Re.push(Gt/V),Re.push(ke/o)}for(let ke=1;ke<=o;ke++)for(let Gt=1;Gt<=V;Gt++){const Vt=(V+1)*ke+Gt-1,Xt=(V+1)*(ke-1)+Gt-1,xt=(V+1)*(ke-1)+Gt,Zt=(V+1)*ke+Gt;fe.push(Vt,Xt,Zt),fe.push(Xt,xt,Zt)}this.setIndex(fe),this.setAttribute("position",new Float32BufferAttribute(Le,3)),this.setAttribute("normal",new Float32BufferAttribute(Ce,3)),this.setAttribute("uv",new Float32BufferAttribute(Re,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new TorusGeometry(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(e=1,r=.4,o=64,V=8,le=2,fe=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:r,tubularSegments:o,radialSegments:V,p:le,q:fe},o=Math.floor(o),V=Math.floor(V);const Le=[],Ce=[],Re=[],Pe=[],ze=new Vector3,Fe=new Vector3,ke=new Vector3,Gt=new Vector3,Vt=new Vector3,Xt=new Vector3,xt=new Vector3;for(let wt=0;wt<=o;++wt){const Wt=wt/o*le*Math.PI*2;Zt(Wt,le,fe,e,ke),Zt(Wt+.01,le,fe,e,Gt),Xt.subVectors(Gt,ke),xt.addVectors(Gt,ke),Vt.crossVectors(Xt,xt),xt.crossVectors(Vt,Xt),Vt.normalize(),xt.normalize();for(let It=0;It<=V;++It){const Nt=It/V*Math.PI*2,Ft=-r*Math.cos(Nt),Ht=r*Math.sin(Nt);ze.x=ke.x+(Ft*xt.x+Ht*Vt.x),ze.y=ke.y+(Ft*xt.y+Ht*Vt.y),ze.z=ke.z+(Ft*xt.z+Ht*Vt.z),Ce.push(ze.x,ze.y,ze.z),Fe.subVectors(ze,ke).normalize(),Re.push(Fe.x,Fe.y,Fe.z),Pe.push(wt/o),Pe.push(It/V)}}for(let wt=1;wt<=o;wt++)for(let Wt=1;Wt<=V;Wt++){const It=(V+1)*(wt-1)+(Wt-1),Nt=(V+1)*wt+(Wt-1),Ft=(V+1)*wt+Wt,Ht=(V+1)*(wt-1)+Wt;Le.push(It,Nt,Ht),Le.push(Nt,Ft,Ht)}this.setIndex(Le),this.setAttribute("position",new Float32BufferAttribute(Ce,3)),this.setAttribute("normal",new Float32BufferAttribute(Re,3)),this.setAttribute("uv",new Float32BufferAttribute(Pe,2));function Zt(wt,Wt,It,Nt,Ft){const Ht=Math.cos(wt),Kt=Math.sin(wt),Yt=It/Wt*wt,jt=Math.cos(Yt);Ft.x=Nt*(2+jt)*.5*Ht,Ft.y=Nt*(2+jt)*Kt*.5,Ft.z=Nt*Math.sin(Yt)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new TorusKnotGeometry(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class TubeGeometry extends BufferGeometry{constructor(e=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),r=64,o=1,V=8,le=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:r,radius:o,radialSegments:V,closed:le};const fe=e.computeFrenetFrames(r,le);this.tangents=fe.tangents,this.normals=fe.normals,this.binormals=fe.binormals;const Le=new Vector3,Ce=new Vector3,Re=new Vector2;let Pe=new Vector3;const ze=[],Fe=[],ke=[],Gt=[];Vt(),this.setIndex(Gt),this.setAttribute("position",new Float32BufferAttribute(ze,3)),this.setAttribute("normal",new Float32BufferAttribute(Fe,3)),this.setAttribute("uv",new Float32BufferAttribute(ke,2));function Vt(){for(let wt=0;wt<r;wt++)Xt(wt);Xt(le===!1?r:0),Zt(),xt()}function Xt(wt){Pe=e.getPointAt(wt/r,Pe);const Wt=fe.normals[wt],It=fe.binormals[wt];for(let Nt=0;Nt<=V;Nt++){const Ft=Nt/V*Math.PI*2,Ht=Math.sin(Ft),Kt=-Math.cos(Ft);Ce.x=Kt*Wt.x+Ht*It.x,Ce.y=Kt*Wt.y+Ht*It.y,Ce.z=Kt*Wt.z+Ht*It.z,Ce.normalize(),Fe.push(Ce.x,Ce.y,Ce.z),Le.x=Pe.x+o*Ce.x,Le.y=Pe.y+o*Ce.y,Le.z=Pe.z+o*Ce.z,ze.push(Le.x,Le.y,Le.z)}}function xt(){for(let wt=1;wt<=r;wt++)for(let Wt=1;Wt<=V;Wt++){const It=(V+1)*(wt-1)+(Wt-1),Nt=(V+1)*wt+(Wt-1),Ft=(V+1)*wt+Wt,Ht=(V+1)*(wt-1)+Wt;Gt.push(It,Nt,Ht),Gt.push(Nt,Ft,Ht)}}function Zt(){for(let wt=0;wt<=r;wt++)for(let Wt=0;Wt<=V;Wt++)Re.x=wt/r,Re.y=Wt/V,ke.push(Re.x,Re.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new TubeGeometry(new Curves[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class WireframeGeometry extends BufferGeometry{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const r=[],o=new Set,V=new Vector3,le=new Vector3;if(e.index!==null){const fe=e.attributes.position,Le=e.index;let Ce=e.groups;Ce.length===0&&(Ce=[{start:0,count:Le.count,materialIndex:0}]);for(let Re=0,Pe=Ce.length;Re<Pe;++Re){const ze=Ce[Re],Fe=ze.start,ke=ze.count;for(let Gt=Fe,Vt=Fe+ke;Gt<Vt;Gt+=3)for(let Xt=0;Xt<3;Xt++){const xt=Le.getX(Gt+Xt),Zt=Le.getX(Gt+(Xt+1)%3);V.fromBufferAttribute(fe,xt),le.fromBufferAttribute(fe,Zt),isUniqueEdge(V,le,o)===!0&&(r.push(V.x,V.y,V.z),r.push(le.x,le.y,le.z))}}}else{const fe=e.attributes.position;for(let Le=0,Ce=fe.count/3;Le<Ce;Le++)for(let Re=0;Re<3;Re++){const Pe=3*Le+Re,ze=3*Le+(Re+1)%3;V.fromBufferAttribute(fe,Pe),le.fromBufferAttribute(fe,ze),isUniqueEdge(V,le,o)===!0&&(r.push(V.x,V.y,V.z),r.push(le.x,le.y,le.z))}}this.setAttribute("position",new Float32BufferAttribute(r,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function isUniqueEdge(v,e,r){const o=`${v.x},${v.y},${v.z}-${e.x},${e.y},${e.z}`,V=`${e.x},${e.y},${e.z}-${v.x},${v.y},${v.z}`;return r.has(o)===!0||r.has(V)===!0?!1:(r.add(o),r.add(V),!0)}var Geometries=Object.freeze({__proto__:null,BoxGeometry,CapsuleGeometry,CircleGeometry,ConeGeometry,CylinderGeometry,DodecahedronGeometry,EdgesGeometry,ExtrudeGeometry,IcosahedronGeometry,LatheGeometry,OctahedronGeometry,PlaneGeometry,PolyhedronGeometry,RingGeometry,ShapeGeometry,SphereGeometry,TetrahedronGeometry,TorusGeometry,TorusKnotGeometry,TubeGeometry,WireframeGeometry});class ShadowMaterial extends Material{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Color$1(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class RawShaderMaterial extends ShaderMaterial{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Color$1(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Vector2(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(r){this.ior=(1+.4*r)/(1-.4*r)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Color$1(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Color$1(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Color$1(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class MeshPhongMaterial extends Material{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Color$1(16777215),this.specular=new Color$1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshToonMaterial extends Material{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Color$1(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class MeshNormalMaterial extends Material{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class MeshLambertMaterial extends Material{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshDepthMaterial extends Material{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class MeshMatcapMaterial extends Material{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Color$1(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class LineDashedMaterial extends LineBasicMaterial{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function convertArray(v,e){return!v||v.constructor===e?v:typeof e.BYTES_PER_ELEMENT=="number"?new e(v):Array.prototype.slice.call(v)}function getKeyframeOrder(v){function e(V,le){return v[V]-v[le]}const r=v.length,o=new Array(r);for(let V=0;V!==r;++V)o[V]=V;return o.sort(e),o}function sortedArray(v,e,r){const o=v.length,V=new v.constructor(o);for(let le=0,fe=0;fe!==o;++le){const Le=r[le]*e;for(let Ce=0;Ce!==e;++Ce)V[fe++]=v[Le+Ce]}return V}function flattenJSON(v,e,r,o){let V=1,le=v[0];for(;le!==void 0&&le[o]===void 0;)le=v[V++];if(le===void 0)return;let fe=le[o];if(fe!==void 0)if(Array.isArray(fe))do fe=le[o],fe!==void 0&&(e.push(le.time),r.push(...fe)),le=v[V++];while(le!==void 0);else if(fe.toArray!==void 0)do fe=le[o],fe!==void 0&&(e.push(le.time),fe.toArray(r,r.length)),le=v[V++];while(le!==void 0);else do fe=le[o],fe!==void 0&&(e.push(le.time),r.push(fe)),le=v[V++];while(le!==void 0)}function subclip(v,e,r,o,V=30){const le=v.clone();le.name=e;const fe=[];for(let Ce=0;Ce<le.tracks.length;++Ce){const Re=le.tracks[Ce],Pe=Re.getValueSize(),ze=[],Fe=[];for(let ke=0;ke<Re.times.length;++ke){const Gt=Re.times[ke]*V;if(!(Gt<r||Gt>=o)){ze.push(Re.times[ke]);for(let Vt=0;Vt<Pe;++Vt)Fe.push(Re.values[ke*Pe+Vt])}}ze.length!==0&&(Re.times=convertArray(ze,Re.times.constructor),Re.values=convertArray(Fe,Re.values.constructor),fe.push(Re))}le.tracks=fe;let Le=1/0;for(let Ce=0;Ce<le.tracks.length;++Ce)Le>le.tracks[Ce].times[0]&&(Le=le.tracks[Ce].times[0]);for(let Ce=0;Ce<le.tracks.length;++Ce)le.tracks[Ce].shift(-1*Le);return le.resetDuration(),le}function makeClipAdditive(v,e=0,r=v,o=30){o<=0&&(o=30);const V=r.tracks.length,le=e/o;for(let fe=0;fe<V;++fe){const Le=r.tracks[fe],Ce=Le.ValueTypeName;if(Ce==="bool"||Ce==="string")continue;const Re=v.tracks.find(function(xt){return xt.name===Le.name&&xt.ValueTypeName===Ce});if(Re===void 0)continue;let Pe=0;const ze=Le.getValueSize();Le.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Pe=ze/3);let Fe=0;const ke=Re.getValueSize();Re.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Fe=ke/3);const Gt=Le.times.length-1;let Vt;if(le<=Le.times[0]){const xt=Pe,Zt=ze-Pe;Vt=Le.values.slice(xt,Zt)}else if(le>=Le.times[Gt]){const xt=Gt*ze+Pe,Zt=xt+ze-Pe;Vt=Le.values.slice(xt,Zt)}else{const xt=Le.createInterpolant(),Zt=Pe,wt=ze-Pe;xt.evaluate(le),Vt=xt.resultBuffer.slice(Zt,wt)}Ce==="quaternion"&&new Quaternion().fromArray(Vt).normalize().conjugate().toArray(Vt);const Xt=Re.times.length;for(let xt=0;xt<Xt;++xt){const Zt=xt*ke+Fe;if(Ce==="quaternion")Quaternion.multiplyQuaternionsFlat(Re.values,Zt,Vt,0,Re.values,Zt);else{const wt=ke-Fe*2;for(let Wt=0;Wt<wt;++Wt)Re.values[Zt+Wt]-=Vt[Wt]}}}return v.blendMode=AdditiveAnimationBlendMode,v}class AnimationUtils{static convertArray(e,r){return convertArray(e,r)}static isTypedArray(e){return isTypedArray(e)}static getKeyframeOrder(e){return getKeyframeOrder(e)}static sortedArray(e,r,o){return sortedArray(e,r,o)}static flattenJSON(e,r,o,V){flattenJSON(e,r,o,V)}static subclip(e,r,o,V,le=30){return subclip(e,r,o,V,le)}static makeClipAdditive(e,r=0,o=e,V=30){return makeClipAdditive(e,r,o,V)}}class Interpolant{constructor(e,r,o,V){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=V!==void 0?V:new r.constructor(o),this.sampleValues=r,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(e){const r=this.parameterPositions;let o=this._cachedIndex,V=r[o],le=r[o-1];e:{t:{let fe;i:{n:if(!(e<V)){for(let Le=o+2;;){if(V===void 0){if(e<le)break n;return o=r.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===Le)break;if(le=V,V=r[++o],e<V)break t}fe=r.length;break i}if(!(e>=le)){const Le=r[1];e<Le&&(o=2,le=Le);for(let Ce=o-2;;){if(le===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(o===Ce)break;if(V=le,le=r[--o-1],e>=le)break t}fe=o,o=0;break i}break e}for(;o<fe;){const Le=o+fe>>>1;e<r[Le]?fe=Le:o=Le+1}if(V=r[o],le=r[o-1],le===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(V===void 0)return o=r.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,le,V)}return this.interpolate_(o,le,e,V)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const r=this.resultBuffer,o=this.sampleValues,V=this.valueSize,le=e*V;for(let fe=0;fe!==V;++fe)r[fe]=o[le+fe];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(e,r,o){const V=this.parameterPositions;let le=e-2,fe=e+1,Le=V[le],Ce=V[fe];if(Le===void 0)switch(this.getSettings_().endingStart){case ZeroSlopeEnding:le=e,Le=2*r-o;break;case WrapAroundEnding:le=V.length-2,Le=r+V[le]-V[le+1];break;default:le=e,Le=o}if(Ce===void 0)switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:fe=e,Ce=2*o-r;break;case WrapAroundEnding:fe=1,Ce=o+V[1]-V[0];break;default:fe=e-1,Ce=r}const Re=(o-r)*.5,Pe=this.valueSize;this._weightPrev=Re/(r-Le),this._weightNext=Re/(Ce-o),this._offsetPrev=le*Pe,this._offsetNext=fe*Pe}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=e*Le,Re=Ce-Le,Pe=this._offsetPrev,ze=this._offsetNext,Fe=this._weightPrev,ke=this._weightNext,Gt=(o-r)/(V-r),Vt=Gt*Gt,Xt=Vt*Gt,xt=-Fe*Xt+2*Fe*Vt-Fe*Gt,Zt=(1+Fe)*Xt+(-1.5-2*Fe)*Vt+(-.5+Fe)*Gt+1,wt=(-1-ke)*Xt+(1.5+ke)*Vt+.5*Gt,Wt=ke*Xt-ke*Vt;for(let It=0;It!==Le;++It)le[It]=xt*fe[Pe+It]+Zt*fe[Re+It]+wt*fe[Ce+It]+Wt*fe[ze+It];return le}}class LinearInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=e*Le,Re=Ce-Le,Pe=(o-r)/(V-r),ze=1-Pe;for(let Fe=0;Fe!==Le;++Fe)le[Fe]=fe[Re+Fe]*ze+fe[Ce+Fe]*Pe;return le}}class DiscreteInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e){return this.copySampleValue_(e-1)}}class KeyframeTrack{constructor(e,r,o,V){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=convertArray(r,this.TimeBufferType),this.values=convertArray(o,this.ValueBufferType),this.setInterpolation(V||this.DefaultInterpolation)}static toJSON(e){const r=e.constructor;let o;if(r.toJSON!==this.toJSON)o=r.toJSON(e);else{o={name:e.name,times:convertArray(e.times,Array),values:convertArray(e.values,Array)};const V=e.getInterpolation();V!==e.DefaultInterpolation&&(o.interpolation=V)}return o.type=e.ValueTypeName,o}InterpolantFactoryMethodDiscrete(e){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new LinearInterpolant(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new CubicInterpolant(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let r;switch(e){case InterpolateDiscrete:r=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:r=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){const o="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(o);return warn("KeyframeTrack:",o),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const r=this.times;for(let o=0,V=r.length;o!==V;++o)r[o]+=e}return this}scale(e){if(e!==1){const r=this.times;for(let o=0,V=r.length;o!==V;++o)r[o]*=e}return this}trim(e,r){const o=this.times,V=o.length;let le=0,fe=V-1;for(;le!==V&&o[le]<e;)++le;for(;fe!==-1&&o[fe]>r;)--fe;if(++fe,le!==0||fe!==V){le>=fe&&(fe=Math.max(fe,1),le=fe-1);const Le=this.getValueSize();this.times=o.slice(le,fe),this.values=this.values.slice(le*Le,fe*Le)}return this}validate(){let e=!0;const r=this.getValueSize();r-Math.floor(r)!==0&&(error$1("KeyframeTrack: Invalid value size in track.",this),e=!1);const o=this.times,V=this.values,le=o.length;le===0&&(error$1("KeyframeTrack: Track is empty.",this),e=!1);let fe=null;for(let Le=0;Le!==le;Le++){const Ce=o[Le];if(typeof Ce=="number"&&isNaN(Ce)){error$1("KeyframeTrack: Time is not a valid number.",this,Le,Ce),e=!1;break}if(fe!==null&&fe>Ce){error$1("KeyframeTrack: Out of order keys.",this,Le,Ce,fe),e=!1;break}fe=Ce}if(V!==void 0&&isTypedArray(V))for(let Le=0,Ce=V.length;Le!==Ce;++Le){const Re=V[Le];if(isNaN(Re)){error$1("KeyframeTrack: Value is not a valid number.",this,Le,Re),e=!1;break}}return e}optimize(){const e=this.times.slice(),r=this.values.slice(),o=this.getValueSize(),V=this.getInterpolation()===InterpolateSmooth,le=e.length-1;let fe=1;for(let Le=1;Le<le;++Le){let Ce=!1;const Re=e[Le],Pe=e[Le+1];if(Re!==Pe&&(Le!==1||Re!==e[0]))if(V)Ce=!0;else{const ze=Le*o,Fe=ze-o,ke=ze+o;for(let Gt=0;Gt!==o;++Gt){const Vt=r[ze+Gt];if(Vt!==r[Fe+Gt]||Vt!==r[ke+Gt]){Ce=!0;break}}}if(Ce){if(Le!==fe){e[fe]=e[Le];const ze=Le*o,Fe=fe*o;for(let ke=0;ke!==o;++ke)r[Fe+ke]=r[ze+ke]}++fe}}if(le>0){e[fe]=e[le];for(let Le=le*o,Ce=fe*o,Re=0;Re!==o;++Re)r[Ce+Re]=r[Le+Re];++fe}return fe!==e.length?(this.times=e.slice(0,fe),this.values=r.slice(0,fe*o)):(this.times=e,this.values=r),this}clone(){const e=this.times.slice(),r=this.values.slice(),o=this.constructor,V=new o(this.name,e,r);return V.createInterpolant=this.createInterpolant,V}}KeyframeTrack.prototype.ValueTypeName="";KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(e,r,o){super(e,r,o)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(e,r,o,V){super(e,r,o,V)}interpolate_(e,r,o,V){const le=this.resultBuffer,fe=this.sampleValues,Le=this.valueSize,Ce=(o-r)/(V-r);let Re=e*Le;for(let Pe=Re+Le;Re!==Pe;Re+=4)Quaternion.slerpFlat(le,0,fe,Re-Le,fe,Re,Ce);return le}}class QuaternionKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{constructor(e,r,o){super(e,r,o)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{constructor(e,r,o,V){super(e,r,o,V)}}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(e="",r=-1,o=[],V=NormalAnimationBlendMode){this.name=e,this.tracks=o,this.duration=r,this.blendMode=V,this.uuid=generateUUID(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const r=[],o=e.tracks,V=1/(e.fps||1);for(let fe=0,Le=o.length;fe!==Le;++fe)r.push(parseKeyframeTrack(o[fe]).scale(V));const le=new this(e.name,e.duration,r,e.blendMode);return le.uuid=e.uuid,le.userData=JSON.parse(e.userData||"{}"),le}static toJSON(e){const r=[],o=e.tracks,V={name:e.name,duration:e.duration,tracks:r,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let le=0,fe=o.length;le!==fe;++le)r.push(KeyframeTrack.toJSON(o[le]));return V}static CreateFromMorphTargetSequence(e,r,o,V){const le=r.length,fe=[];for(let Le=0;Le<le;Le++){let Ce=[],Re=[];Ce.push((Le+le-1)%le,Le,(Le+1)%le),Re.push(0,1,0);const Pe=getKeyframeOrder(Ce);Ce=sortedArray(Ce,1,Pe),Re=sortedArray(Re,1,Pe),!V&&Ce[0]===0&&(Ce.push(le),Re.push(Re[0])),fe.push(new NumberKeyframeTrack(".morphTargetInfluences["+r[Le].name+"]",Ce,Re).scale(1/o))}return new this(e,-1,fe)}static findByName(e,r){let o=e;if(!Array.isArray(e)){const V=e;o=V.geometry&&V.geometry.animations||V.animations}for(let V=0;V<o.length;V++)if(o[V].name===r)return o[V];return null}static CreateClipsFromMorphTargetSequences(e,r,o){const V={},le=/^([\w-]*?)([\d]+)$/;for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le],Pe=Re.name.match(le);if(Pe&&Pe.length>1){const ze=Pe[1];let Fe=V[ze];Fe||(V[ze]=Fe=[]),Fe.push(Re)}}const fe=[];for(const Le in V)fe.push(this.CreateFromMorphTargetSequence(Le,V[Le],r,o));return fe}static parseAnimation(e,r){if(warn("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return error$1("AnimationClip: No animation in JSONLoader data."),null;const o=function(ze,Fe,ke,Gt,Vt){if(ke.length!==0){const Xt=[],xt=[];flattenJSON(ke,Xt,xt,Gt),Xt.length!==0&&Vt.push(new ze(Fe,Xt,xt))}},V=[],le=e.name||"default",fe=e.fps||30,Le=e.blendMode;let Ce=e.length||-1;const Re=e.hierarchy||[];for(let ze=0;ze<Re.length;ze++){const Fe=Re[ze].keys;if(!(!Fe||Fe.length===0))if(Fe[0].morphTargets){const ke={};let Gt;for(Gt=0;Gt<Fe.length;Gt++)if(Fe[Gt].morphTargets)for(let Vt=0;Vt<Fe[Gt].morphTargets.length;Vt++)ke[Fe[Gt].morphTargets[Vt]]=-1;for(const Vt in ke){const Xt=[],xt=[];for(let Zt=0;Zt!==Fe[Gt].morphTargets.length;++Zt){const wt=Fe[Gt];Xt.push(wt.time),xt.push(wt.morphTarget===Vt?1:0)}V.push(new NumberKeyframeTrack(".morphTargetInfluence["+Vt+"]",Xt,xt))}Ce=ke.length*fe}else{const ke=".bones["+r[ze].name+"]";o(VectorKeyframeTrack,ke+".position",Fe,"pos",V),o(QuaternionKeyframeTrack,ke+".quaternion",Fe,"rot",V),o(VectorKeyframeTrack,ke+".scale",Fe,"scl",V)}}return V.length===0?null:new this(le,Ce,V,Le)}resetDuration(){const e=this.tracks;let r=0;for(let o=0,V=e.length;o!==V;++o){const le=this.tracks[o];r=Math.max(r,le.times[le.times.length-1])}return this.duration=r,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let r=0;r<this.tracks.length;r++)e=e&&this.tracks[r].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let o=0;o<this.tracks.length;o++)e.push(this.tracks[o].clone());const r=new this.constructor(this.name,this.duration,e,this.blendMode);return r.userData=JSON.parse(JSON.stringify(this.userData)),r}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(v){switch(v.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+v)}function parseKeyframeTrack(v){if(v.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=getTrackTypeForValueTypeName(v.type);if(v.times===void 0){const r=[],o=[];flattenJSON(v.keys,r,o,"value"),v.times=r,v.values=o}return e.parse!==void 0?e.parse(v):new e(v.name,v.times,v.values,v.interpolation)}const Cache={enabled:!1,files:{},add:function(v,e){this.enabled!==!1&&(this.files[v]=e)},get:function(v){if(this.enabled!==!1)return this.files[v]},remove:function(v){delete this.files[v]},clear:function(){this.files={}}};class LoadingManager{constructor(e,r,o){const V=this;let le=!1,fe=0,Le=0,Ce;const Re=[];this.onStart=void 0,this.onLoad=e,this.onProgress=r,this.onError=o,this._abortController=null,this.itemStart=function(Pe){Le++,le===!1&&V.onStart!==void 0&&V.onStart(Pe,fe,Le),le=!0},this.itemEnd=function(Pe){fe++,V.onProgress!==void 0&&V.onProgress(Pe,fe,Le),fe===Le&&(le=!1,V.onLoad!==void 0&&V.onLoad())},this.itemError=function(Pe){V.onError!==void 0&&V.onError(Pe)},this.resolveURL=function(Pe){return Ce?Ce(Pe):Pe},this.setURLModifier=function(Pe){return Ce=Pe,this},this.addHandler=function(Pe,ze){return Re.push(Pe,ze),this},this.removeHandler=function(Pe){const ze=Re.indexOf(Pe);return ze!==-1&&Re.splice(ze,2),this},this.getHandler=function(Pe){for(let ze=0,Fe=Re.length;ze<Fe;ze+=2){const ke=Re[ze],Gt=Re[ze+1];if(ke.global&&(ke.lastIndex=0),ke.test(Pe))return Gt}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(e){this.manager=e!==void 0?e:DefaultLoadingManager,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,r){const o=this;return new Promise(function(V,le){o.load(e,V,r,le)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(e,r){super(e),this.response=r}}class FileLoader extends Loader{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,r,o,V){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=Cache.get(`file:${e}`);if(le!==void 0)return this.manager.itemStart(e),setTimeout(()=>{r&&r(le),this.manager.itemEnd(e)},0),le;if(loading[e]!==void 0){loading[e].push({onLoad:r,onProgress:o,onError:V});return}loading[e]=[],loading[e].push({onLoad:r,onProgress:o,onError:V});const fe=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),Le=this.mimeType,Ce=this.responseType;fetch(fe).then(Re=>{if(Re.status===200||Re.status===0){if(Re.status===0&&warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||Re.body===void 0||Re.body.getReader===void 0)return Re;const Pe=loading[e],ze=Re.body.getReader(),Fe=Re.headers.get("X-File-Size")||Re.headers.get("Content-Length"),ke=Fe?parseInt(Fe):0,Gt=ke!==0;let Vt=0;const Xt=new ReadableStream({start(xt){Zt();function Zt(){ze.read().then(({done:wt,value:Wt})=>{if(wt)xt.close();else{Vt+=Wt.byteLength;const It=new ProgressEvent("progress",{lengthComputable:Gt,loaded:Vt,total:ke});for(let Nt=0,Ft=Pe.length;Nt<Ft;Nt++){const Ht=Pe[Nt];Ht.onProgress&&Ht.onProgress(It)}xt.enqueue(Wt),Zt()}},wt=>{xt.error(wt)})}}});return new Response(Xt)}else throw new HttpError(`fetch for "${Re.url}" responded with ${Re.status}: ${Re.statusText}`,Re)}).then(Re=>{switch(Ce){case"arraybuffer":return Re.arrayBuffer();case"blob":return Re.blob();case"document":return Re.text().then(Pe=>new DOMParser().parseFromString(Pe,Le));case"json":return Re.json();default:if(Le==="")return Re.text();{const ze=/charset="?([^;"\s]*)"?/i.exec(Le),Fe=ze&&ze[1]?ze[1].toLowerCase():void 0,ke=new TextDecoder(Fe);return Re.arrayBuffer().then(Gt=>ke.decode(Gt))}}}).then(Re=>{Cache.add(`file:${e}`,Re);const Pe=loading[e];delete loading[e];for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];ke.onLoad&&ke.onLoad(Re)}}).catch(Re=>{const Pe=loading[e];if(Pe===void 0)throw this.manager.itemError(e),Re;delete loading[e];for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];ke.onError&&ke.onError(Re)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class AnimationLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(this.manager);fe.setPath(this.path),fe.setRequestHeader(this.requestHeader),fe.setWithCredentials(this.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r=[];for(let o=0;o<e.length;o++){const V=AnimationClip.parse(e[o]);r.push(V)}return r}}class CompressedTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=[],Le=new CompressedTexture,Ce=new FileLoader(this.manager);Ce.setPath(this.path),Ce.setResponseType("arraybuffer"),Ce.setRequestHeader(this.requestHeader),Ce.setWithCredentials(le.withCredentials);let Re=0;function Pe(ze){Ce.load(e[ze],function(Fe){const ke=le.parse(Fe,!0);fe[ze]={width:ke.width,height:ke.height,format:ke.format,mipmaps:ke.mipmaps},Re+=1,Re===6&&(ke.mipmapCount===1&&(Le.minFilter=LinearFilter),Le.image=fe,Le.format=ke.format,Le.needsUpdate=!0,r&&r(Le))},o,V)}if(Array.isArray(e))for(let ze=0,Fe=e.length;ze<Fe;++ze)Pe(ze);else Ce.load(e,function(ze){const Fe=le.parse(ze,!0);if(Fe.isCubemap){const ke=Fe.mipmaps.length/Fe.mipmapCount;for(let Gt=0;Gt<ke;Gt++){fe[Gt]={mipmaps:[]};for(let Vt=0;Vt<Fe.mipmapCount;Vt++)fe[Gt].mipmaps.push(Fe.mipmaps[Gt*Fe.mipmapCount+Vt]),fe[Gt].format=Fe.format,fe[Gt].width=Fe.width,fe[Gt].height=Fe.height}Le.image=fe}else Le.image.width=Fe.width,Le.image.height=Fe.height,Le.mipmaps=Fe.mipmaps;Fe.mipmapCount===1&&(Le.minFilter=LinearFilter),Le.format=Fe.format,Le.needsUpdate=!0,r&&r(Le)},o,V);return Le}}const _loading=new WeakMap;class ImageLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=this,fe=Cache.get(`image:${e}`);if(fe!==void 0){if(fe.complete===!0)le.manager.itemStart(e),setTimeout(function(){r&&r(fe),le.manager.itemEnd(e)},0);else{let ze=_loading.get(fe);ze===void 0&&(ze=[],_loading.set(fe,ze)),ze.push({onLoad:r,onError:V})}return fe}const Le=createElementNS("img");function Ce(){Pe(),r&&r(this);const ze=_loading.get(this)||[];for(let Fe=0;Fe<ze.length;Fe++){const ke=ze[Fe];ke.onLoad&&ke.onLoad(this)}_loading.delete(this),le.manager.itemEnd(e)}function Re(ze){Pe(),V&&V(ze),Cache.remove(`image:${e}`);const Fe=_loading.get(this)||[];for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke];Gt.onError&&Gt.onError(ze)}_loading.delete(this),le.manager.itemError(e),le.manager.itemEnd(e)}function Pe(){Le.removeEventListener("load",Ce,!1),Le.removeEventListener("error",Re,!1)}return Le.addEventListener("load",Ce,!1),Le.addEventListener("error",Re,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(Le.crossOrigin=this.crossOrigin),Cache.add(`image:${e}`,Le),le.manager.itemStart(e),Le.src=e,Le}}class CubeTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=new CubeTexture;le.colorSpace=SRGBColorSpace;const fe=new ImageLoader(this.manager);fe.setCrossOrigin(this.crossOrigin),fe.setPath(this.path);let Le=0;function Ce(Re){fe.load(e[Re],function(Pe){le.images[Re]=Pe,Le++,Le===6&&(le.needsUpdate=!0,r&&r(le))},void 0,V)}for(let Re=0;Re<e.length;++Re)Ce(Re);return le}}class DataTextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new DataTexture,Le=new FileLoader(this.manager);return Le.setResponseType("arraybuffer"),Le.setRequestHeader(this.requestHeader),Le.setPath(this.path),Le.setWithCredentials(le.withCredentials),Le.load(e,function(Ce){let Re;try{Re=le.parse(Ce)}catch(Pe){if(V!==void 0)V(Pe);else{Pe(Pe);return}}Re.image!==void 0?fe.image=Re.image:Re.data!==void 0&&(fe.image.width=Re.width,fe.image.height=Re.height,fe.image.data=Re.data),fe.wrapS=Re.wrapS!==void 0?Re.wrapS:ClampToEdgeWrapping,fe.wrapT=Re.wrapT!==void 0?Re.wrapT:ClampToEdgeWrapping,fe.magFilter=Re.magFilter!==void 0?Re.magFilter:LinearFilter,fe.minFilter=Re.minFilter!==void 0?Re.minFilter:LinearFilter,fe.anisotropy=Re.anisotropy!==void 0?Re.anisotropy:1,Re.colorSpace!==void 0&&(fe.colorSpace=Re.colorSpace),Re.flipY!==void 0&&(fe.flipY=Re.flipY),Re.format!==void 0&&(fe.format=Re.format),Re.type!==void 0&&(fe.type=Re.type),Re.mipmaps!==void 0&&(fe.mipmaps=Re.mipmaps,fe.minFilter=LinearMipmapLinearFilter),Re.mipmapCount===1&&(fe.minFilter=LinearFilter),Re.generateMipmaps!==void 0&&(fe.generateMipmaps=Re.generateMipmaps),fe.needsUpdate=!0,r&&r(fe,Re)},o,V),fe}}class TextureLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=new Texture,fe=new ImageLoader(this.manager);return fe.setCrossOrigin(this.crossOrigin),fe.setPath(this.path),fe.load(e,function(Le){le.image=Le,le.needsUpdate=!0,r!==void 0&&r(le)},o,V),le}}let Light$1=class extends Object3D{constructor(e,r=1){super(),this.isLight=!0,this.type="Light",this.color=new Color$1(e),this.intensity=r}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,r){return super.copy(e,r),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const r=super.toJSON(e);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,r}};class HemisphereLight extends Light$1{constructor(e,r,o){super(e,o),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Color$1(r)}copy(e,r){return super.copy(e,r),this.groundColor.copy(e.groundColor),this}toJSON(e){const r=super.toJSON(e);return r.object.groundColor=this.groundColor.getHex(),r}}const _projScreenMatrix$2=new Matrix4,_lightPositionWorld$1=new Vector3,_lookTarget$1=new Vector3;class LightShadow{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Vector2(512,512),this.mapType=UnsignedByteType,this.map=null,this.mapPass=null,this.matrix=new Matrix4,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Frustum,this._frameExtents=new Vector2(1,1),this._viewportCount=1,this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const r=this.camera,o=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(e.matrixWorld),r.position.copy(_lightPositionWorld$1),_lookTarget$1.setFromMatrixPosition(e.target.matrixWorld),r.lookAt(_lookTarget$1),r.updateMatrixWorld(),_projScreenMatrix$2.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(_projScreenMatrix$2,r.coordinateSystem,r.reversedDepth),r.reversedDepth?o.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):o.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),o.multiply(_projScreenMatrix$2)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const r=this.camera,o=RAD2DEG*2*e.angle*this.focus,V=this.mapSize.width/this.mapSize.height*this.aspect,le=e.distance||r.far;(o!==r.fov||V!==r.aspect||le!==r.far)&&(r.fov=o,r.aspect=V,r.far=le,r.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class SpotLight extends Light$1{constructor(e,r,o=0,V=Math.PI/3,le=0,fe=2){super(e,r),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.distance=o,this.angle=V,this.penumbra=le,this.decay=fe,this.map=null,this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.distance=this.distance,r.object.angle=this.angle,r.object.decay=this.decay,r.object.penumbra=this.penumbra,r.object.target=this.target.uuid,this.map&&this.map.isTexture&&(r.object.map=this.map.toJSON(e).uuid),r.object.shadow=this.shadow.toJSON(),r}}class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,.5,500)),this.isPointLightShadow=!0}}class PointLight extends Light$1{constructor(e,r,o=0,V=2){super(e,r),this.isPointLight=!0,this.type="PointLight",this.distance=o,this.decay=V,this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,r){return super.copy(e,r),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.distance=this.distance,r.object.decay=this.decay,r.object.shadow=this.shadow.toJSON(),r}}class OrthographicCamera extends Camera$1{constructor(e=-1,r=1,o=1,V=-1,le=.1,fe=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=r,this.top=o,this.bottom=V,this.near=le,this.far=fe,this.updateProjectionMatrix()}copy(e,r){return super.copy(e,r),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,r,o,V,le,fe){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=r,this.view.offsetX=o,this.view.offsetY=V,this.view.width=le,this.view.height=fe,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),o=(this.right+this.left)/2,V=(this.top+this.bottom)/2;let le=o-e,fe=o+e,Le=V+r,Ce=V-r;if(this.view!==null&&this.view.enabled){const Re=(this.right-this.left)/this.view.fullWidth/this.zoom,Pe=(this.top-this.bottom)/this.view.fullHeight/this.zoom;le+=Re*this.view.offsetX,fe=le+Re*this.view.width,Le-=Pe*this.view.offsetY,Ce=Le-Pe*this.view.height}this.projectionMatrix.makeOrthographic(le,fe,Le,Ce,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const r=super.toJSON(e);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DirectionalLight extends Light$1{constructor(e,r){super(e,r),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.shadow=new DirectionalLightShadow}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const r=super.toJSON(e);return r.object.shadow=this.shadow.toJSON(),r.object.target=this.target.uuid,r}}class AmbientLight extends Light$1{constructor(e,r){super(e,r),this.isAmbientLight=!0,this.type="AmbientLight"}}class RectAreaLight extends Light$1{constructor(e,r,o=10,V=10){super(e,r),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=o,this.height=V}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const r=super.toJSON(e);return r.object.width=this.width,r.object.height=this.height,r}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Vector3)}set(e){for(let r=0;r<9;r++)this.coefficients[r].copy(e[r]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,r){const o=e.x,V=e.y,le=e.z,fe=this.coefficients;return r.copy(fe[0]).multiplyScalar(.282095),r.addScaledVector(fe[1],.488603*V),r.addScaledVector(fe[2],.488603*le),r.addScaledVector(fe[3],.488603*o),r.addScaledVector(fe[4],1.092548*(o*V)),r.addScaledVector(fe[5],1.092548*(V*le)),r.addScaledVector(fe[6],.315392*(3*le*le-1)),r.addScaledVector(fe[7],1.092548*(o*le)),r.addScaledVector(fe[8],.546274*(o*o-V*V)),r}getIrradianceAt(e,r){const o=e.x,V=e.y,le=e.z,fe=this.coefficients;return r.copy(fe[0]).multiplyScalar(.886227),r.addScaledVector(fe[1],2*.511664*V),r.addScaledVector(fe[2],2*.511664*le),r.addScaledVector(fe[3],2*.511664*o),r.addScaledVector(fe[4],2*.429043*o*V),r.addScaledVector(fe[5],2*.429043*V*le),r.addScaledVector(fe[6],.743125*le*le-.247708),r.addScaledVector(fe[7],2*.429043*o*le),r.addScaledVector(fe[8],.429043*(o*o-V*V)),r}add(e){for(let r=0;r<9;r++)this.coefficients[r].add(e.coefficients[r]);return this}addScaledSH(e,r){for(let o=0;o<9;o++)this.coefficients[o].addScaledVector(e.coefficients[o],r);return this}scale(e){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(e);return this}lerp(e,r){for(let o=0;o<9;o++)this.coefficients[o].lerp(e.coefficients[o],r);return this}equals(e){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(e.coefficients[r]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,r=0){const o=this.coefficients;for(let V=0;V<9;V++)o[V].fromArray(e,r+V*3);return this}toArray(e=[],r=0){const o=this.coefficients;for(let V=0;V<9;V++)o[V].toArray(e,r+V*3);return e}static getBasisAt(e,r){const o=e.x,V=e.y,le=e.z;r[0]=.282095,r[1]=.488603*V,r[2]=.488603*le,r[3]=.488603*o,r[4]=1.092548*o*V,r[5]=1.092548*V*le,r[6]=.315392*(3*le*le-1),r[7]=1.092548*o*le,r[8]=.546274*(o*o-V*V)}}class LightProbe extends Light$1{constructor(e=new SphericalHarmonics3,r=1){super(void 0,r),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const r=super.toJSON(e);return r.object.sh=this.sh.toArray(),r}}class MaterialLoader extends Loader{constructor(e){super(e),this.textures={}}load(e,r,o,V){const le=this,fe=new FileLoader(le.manager);fe.setPath(le.path),fe.setRequestHeader(le.requestHeader),fe.setWithCredentials(le.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r=this.textures;function o(le){return r[le]===void 0&&warn("MaterialLoader: Undefined texture",le),r[le]}const V=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(V.uuid=e.uuid),e.name!==void 0&&(V.name=e.name),e.color!==void 0&&V.color!==void 0&&V.color.setHex(e.color),e.roughness!==void 0&&(V.roughness=e.roughness),e.metalness!==void 0&&(V.metalness=e.metalness),e.sheen!==void 0&&(V.sheen=e.sheen),e.sheenColor!==void 0&&(V.sheenColor=new Color$1().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(V.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&V.emissive!==void 0&&V.emissive.setHex(e.emissive),e.specular!==void 0&&V.specular!==void 0&&V.specular.setHex(e.specular),e.specularIntensity!==void 0&&(V.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&V.specularColor!==void 0&&V.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(V.shininess=e.shininess),e.clearcoat!==void 0&&(V.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(V.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(V.dispersion=e.dispersion),e.iridescence!==void 0&&(V.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(V.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(V.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(V.transmission=e.transmission),e.thickness!==void 0&&(V.thickness=e.thickness),e.attenuationDistance!==void 0&&(V.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&V.attenuationColor!==void 0&&V.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(V.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(V.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(V.fog=e.fog),e.flatShading!==void 0&&(V.flatShading=e.flatShading),e.blending!==void 0&&(V.blending=e.blending),e.combine!==void 0&&(V.combine=e.combine),e.side!==void 0&&(V.side=e.side),e.shadowSide!==void 0&&(V.shadowSide=e.shadowSide),e.opacity!==void 0&&(V.opacity=e.opacity),e.transparent!==void 0&&(V.transparent=e.transparent),e.alphaTest!==void 0&&(V.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(V.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(V.depthFunc=e.depthFunc),e.depthTest!==void 0&&(V.depthTest=e.depthTest),e.depthWrite!==void 0&&(V.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(V.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(V.blendSrc=e.blendSrc),e.blendDst!==void 0&&(V.blendDst=e.blendDst),e.blendEquation!==void 0&&(V.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(V.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(V.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(V.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&V.blendColor!==void 0&&V.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(V.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(V.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(V.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(V.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(V.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(V.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(V.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(V.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(V.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(V.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(V.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(V.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(V.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(V.rotation=e.rotation),e.linewidth!==void 0&&(V.linewidth=e.linewidth),e.dashSize!==void 0&&(V.dashSize=e.dashSize),e.gapSize!==void 0&&(V.gapSize=e.gapSize),e.scale!==void 0&&(V.scale=e.scale),e.polygonOffset!==void 0&&(V.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(V.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(V.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(V.dithering=e.dithering),e.alphaToCoverage!==void 0&&(V.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(V.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(V.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(V.allowOverride=e.allowOverride),e.visible!==void 0&&(V.visible=e.visible),e.toneMapped!==void 0&&(V.toneMapped=e.toneMapped),e.userData!==void 0&&(V.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?V.vertexColors=e.vertexColors>0:V.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const le in e.uniforms){const fe=e.uniforms[le];switch(V.uniforms[le]={},fe.type){case"t":V.uniforms[le].value=o(fe.value);break;case"c":V.uniforms[le].value=new Color$1().setHex(fe.value);break;case"v2":V.uniforms[le].value=new Vector2().fromArray(fe.value);break;case"v3":V.uniforms[le].value=new Vector3().fromArray(fe.value);break;case"v4":V.uniforms[le].value=new Vector4().fromArray(fe.value);break;case"m3":V.uniforms[le].value=new Matrix3().fromArray(fe.value);break;case"m4":V.uniforms[le].value=new Matrix4().fromArray(fe.value);break;default:V.uniforms[le].value=fe.value}}if(e.defines!==void 0&&(V.defines=e.defines),e.vertexShader!==void 0&&(V.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(V.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(V.glslVersion=e.glslVersion),e.extensions!==void 0)for(const le in e.extensions)V.extensions[le]=e.extensions[le];if(e.lights!==void 0&&(V.lights=e.lights),e.clipping!==void 0&&(V.clipping=e.clipping),e.size!==void 0&&(V.size=e.size),e.sizeAttenuation!==void 0&&(V.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(V.map=o(e.map)),e.matcap!==void 0&&(V.matcap=o(e.matcap)),e.alphaMap!==void 0&&(V.alphaMap=o(e.alphaMap)),e.bumpMap!==void 0&&(V.bumpMap=o(e.bumpMap)),e.bumpScale!==void 0&&(V.bumpScale=e.bumpScale),e.normalMap!==void 0&&(V.normalMap=o(e.normalMap)),e.normalMapType!==void 0&&(V.normalMapType=e.normalMapType),e.normalScale!==void 0){let le=e.normalScale;Array.isArray(le)===!1&&(le=[le,le]),V.normalScale=new Vector2().fromArray(le)}return e.displacementMap!==void 0&&(V.displacementMap=o(e.displacementMap)),e.displacementScale!==void 0&&(V.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(V.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(V.roughnessMap=o(e.roughnessMap)),e.metalnessMap!==void 0&&(V.metalnessMap=o(e.metalnessMap)),e.emissiveMap!==void 0&&(V.emissiveMap=o(e.emissiveMap)),e.emissiveIntensity!==void 0&&(V.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(V.specularMap=o(e.specularMap)),e.specularIntensityMap!==void 0&&(V.specularIntensityMap=o(e.specularIntensityMap)),e.specularColorMap!==void 0&&(V.specularColorMap=o(e.specularColorMap)),e.envMap!==void 0&&(V.envMap=o(e.envMap)),e.envMapRotation!==void 0&&V.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(V.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(V.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(V.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(V.lightMap=o(e.lightMap)),e.lightMapIntensity!==void 0&&(V.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(V.aoMap=o(e.aoMap)),e.aoMapIntensity!==void 0&&(V.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(V.gradientMap=o(e.gradientMap)),e.clearcoatMap!==void 0&&(V.clearcoatMap=o(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(V.clearcoatRoughnessMap=o(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(V.clearcoatNormalMap=o(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(V.clearcoatNormalScale=new Vector2().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(V.iridescenceMap=o(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(V.iridescenceThicknessMap=o(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(V.transmissionMap=o(e.transmissionMap)),e.thicknessMap!==void 0&&(V.thicknessMap=o(e.thicknessMap)),e.anisotropyMap!==void 0&&(V.anisotropyMap=o(e.anisotropyMap)),e.sheenColorMap!==void 0&&(V.sheenColorMap=o(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(V.sheenRoughnessMap=o(e.sheenRoughnessMap)),V}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return MaterialLoader.createMaterialFromType(e)}static createMaterialFromType(e){const r={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new r[e]}}class LoaderUtils{static extractUrlBase(e){const r=e.lastIndexOf("/");return r===-1?"./":e.slice(0,r+1)}static resolveURL(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class BufferGeometryLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(le.manager);fe.setPath(le.path),fe.setRequestHeader(le.requestHeader),fe.setWithCredentials(le.withCredentials),fe.load(e,function(Le){try{r(le.parse(JSON.parse(Le)))}catch(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}},o,V)}parse(e){const r={},o={};function V(ke,Gt){if(r[Gt]!==void 0)return r[Gt];const Xt=ke.interleavedBuffers[Gt],xt=le(ke,Xt.buffer),Zt=getTypedArray(Xt.type,xt),wt=new InterleavedBuffer(Zt,Xt.stride);return wt.uuid=Xt.uuid,r[Gt]=wt,wt}function le(ke,Gt){if(o[Gt]!==void 0)return o[Gt];const Xt=ke.arrayBuffers[Gt],xt=new Uint32Array(Xt).buffer;return o[Gt]=xt,xt}const fe=e.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry,Le=e.data.index;if(Le!==void 0){const ke=getTypedArray(Le.type,Le.array);fe.setIndex(new BufferAttribute(ke,1))}const Ce=e.data.attributes;for(const ke in Ce){const Gt=Ce[ke];let Vt;if(Gt.isInterleavedBufferAttribute){const Xt=V(e.data,Gt.data);Vt=new InterleavedBufferAttribute(Xt,Gt.itemSize,Gt.offset,Gt.normalized)}else{const Xt=getTypedArray(Gt.type,Gt.array),xt=Gt.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;Vt=new xt(Xt,Gt.itemSize,Gt.normalized)}Gt.name!==void 0&&(Vt.name=Gt.name),Gt.usage!==void 0&&Vt.setUsage(Gt.usage),fe.setAttribute(ke,Vt)}const Re=e.data.morphAttributes;if(Re)for(const ke in Re){const Gt=Re[ke],Vt=[];for(let Xt=0,xt=Gt.length;Xt<xt;Xt++){const Zt=Gt[Xt];let wt;if(Zt.isInterleavedBufferAttribute){const Wt=V(e.data,Zt.data);wt=new InterleavedBufferAttribute(Wt,Zt.itemSize,Zt.offset,Zt.normalized)}else{const Wt=getTypedArray(Zt.type,Zt.array);wt=new BufferAttribute(Wt,Zt.itemSize,Zt.normalized)}Zt.name!==void 0&&(wt.name=Zt.name),Vt.push(wt)}fe.morphAttributes[ke]=Vt}e.data.morphTargetsRelative&&(fe.morphTargetsRelative=!0);const ze=e.data.groups||e.data.drawcalls||e.data.offsets;if(ze!==void 0)for(let ke=0,Gt=ze.length;ke!==Gt;++ke){const Vt=ze[ke];fe.addGroup(Vt.start,Vt.count,Vt.materialIndex)}const Fe=e.data.boundingSphere;return Fe!==void 0&&(fe.boundingSphere=new Sphere$1().fromJSON(Fe)),e.name&&(fe.name=e.name),e.userData&&(fe.userData=e.userData),fe}}class ObjectLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=this.path===""?LoaderUtils.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||fe;const Le=new FileLoader(this.manager);Le.setPath(this.path),Le.setRequestHeader(this.requestHeader),Le.setWithCredentials(this.withCredentials),Le.load(e,function(Ce){let Re=null;try{Re=JSON.parse(Ce)}catch(ze){V!==void 0&&V(ze),ze("ObjectLoader: Can't parse "+e+".",ze.message);return}const Pe=Re.metadata;if(Pe===void 0||Pe.type===void 0||Pe.type.toLowerCase()==="geometry"){V!==void 0&&V(new Error("THREE.ObjectLoader: Can't load "+e)),error$1("ObjectLoader: Can't load "+e);return}le.parse(Re,r)},o,V)}loadAsync(e,r){return U0(this,null,function*(){const o=this,V=this.path===""?LoaderUtils.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||V;const le=new FileLoader(this.manager);le.setPath(this.path),le.setRequestHeader(this.requestHeader),le.setWithCredentials(this.withCredentials);const fe=yield le.loadAsync(e,r),Le=JSON.parse(fe),Ce=Le.metadata;if(Ce===void 0||Ce.type===void 0||Ce.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return yield o.parseAsync(Le)})}parse(e,r){const o=this.parseAnimations(e.animations),V=this.parseShapes(e.shapes),le=this.parseGeometries(e.geometries,V),fe=this.parseImages(e.images,function(){r!==void 0&&r(Re)}),Le=this.parseTextures(e.textures,fe),Ce=this.parseMaterials(e.materials,Le),Re=this.parseObject(e.object,le,Ce,Le,o),Pe=this.parseSkeletons(e.skeletons,Re);if(this.bindSkeletons(Re,Pe),this.bindLightTargets(Re),r!==void 0){let ze=!1;for(const Fe in fe)if(fe[Fe].data instanceof HTMLImageElement){ze=!0;break}ze===!1&&r(Re)}return Re}parseAsync(e){return U0(this,null,function*(){const r=this.parseAnimations(e.animations),o=this.parseShapes(e.shapes),V=this.parseGeometries(e.geometries,o),le=yield this.parseImagesAsync(e.images),fe=this.parseTextures(e.textures,le),Le=this.parseMaterials(e.materials,fe),Ce=this.parseObject(e.object,V,Le,fe,r),Re=this.parseSkeletons(e.skeletons,Ce);return this.bindSkeletons(Ce,Re),this.bindLightTargets(Ce),Ce})}parseShapes(e){const r={};if(e!==void 0)for(let o=0,V=e.length;o<V;o++){const le=new Shape().fromJSON(e[o]);r[le.uuid]=le}return r}parseSkeletons(e,r){const o={},V={};if(r.traverse(function(le){le.isBone&&(V[le.uuid]=le)}),e!==void 0)for(let le=0,fe=e.length;le<fe;le++){const Le=new Skeleton().fromJSON(e[le],V);o[Le.uuid]=Le}return o}parseGeometries(e,r){const o={};if(e!==void 0){const V=new BufferGeometryLoader;for(let le=0,fe=e.length;le<fe;le++){let Le;const Ce=e[le];switch(Ce.type){case"BufferGeometry":case"InstancedBufferGeometry":Le=V.parse(Ce);break;default:Ce.type in Geometries?Le=Geometries[Ce.type].fromJSON(Ce,r):warn(`ObjectLoader: Unsupported geometry type "${Ce.type}"`)}Le.uuid=Ce.uuid,Ce.name!==void 0&&(Le.name=Ce.name),Ce.userData!==void 0&&(Le.userData=Ce.userData),o[Ce.uuid]=Le}}return o}parseMaterials(e,r){const o={},V={};if(e!==void 0){const le=new MaterialLoader;le.setTextures(r);for(let fe=0,Le=e.length;fe<Le;fe++){const Ce=e[fe];o[Ce.uuid]===void 0&&(o[Ce.uuid]=le.parse(Ce)),V[Ce.uuid]=o[Ce.uuid]}}return V}parseAnimations(e){const r={};if(e!==void 0)for(let o=0;o<e.length;o++){const V=e[o],le=AnimationClip.parse(V);r[le.uuid]=le}return r}parseImages(e,r){const o=this,V={};let le;function fe(Ce){return o.manager.itemStart(Ce),le.load(Ce,function(){o.manager.itemEnd(Ce)},void 0,function(){o.manager.itemError(Ce),o.manager.itemEnd(Ce)})}function Le(Ce){if(typeof Ce=="string"){const Re=Ce,Pe=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(Re)?Re:o.resourcePath+Re;return fe(Pe)}else return Ce.data?{data:getTypedArray(Ce.type,Ce.data),width:Ce.width,height:Ce.height}:null}if(e!==void 0&&e.length>0){const Ce=new LoadingManager(r);le=new ImageLoader(Ce),le.setCrossOrigin(this.crossOrigin);for(let Re=0,Pe=e.length;Re<Pe;Re++){const ze=e[Re],Fe=ze.url;if(Array.isArray(Fe)){const ke=[];for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt],xt=Le(Xt);xt!==null&&(xt instanceof HTMLImageElement?ke.push(xt):ke.push(new DataTexture(xt.data,xt.width,xt.height)))}V[ze.uuid]=new Source(ke)}else{const ke=Le(ze.url);V[ze.uuid]=new Source(ke)}}}return V}parseImagesAsync(e){return U0(this,null,function*(){const r=this,o={};let V;function le(fe){return U0(this,null,function*(){if(typeof fe=="string"){const Le=fe,Ce=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(Le)?Le:r.resourcePath+Le;return yield V.loadAsync(Ce)}else return fe.data?{data:getTypedArray(fe.type,fe.data),width:fe.width,height:fe.height}:null})}if(e!==void 0&&e.length>0){V=new ImageLoader(this.manager),V.setCrossOrigin(this.crossOrigin);for(let fe=0,Le=e.length;fe<Le;fe++){const Ce=e[fe],Re=Ce.url;if(Array.isArray(Re)){const Pe=[];for(let ze=0,Fe=Re.length;ze<Fe;ze++){const ke=Re[ze],Gt=yield le(ke);Gt!==null&&(Gt instanceof HTMLImageElement?Pe.push(Gt):Pe.push(new DataTexture(Gt.data,Gt.width,Gt.height)))}o[Ce.uuid]=new Source(Pe)}else{const Pe=yield le(Ce.url);o[Ce.uuid]=new Source(Pe)}}}return o})}parseTextures(e,r){function o(le,fe){return typeof le=="number"?le:(warn("ObjectLoader.parseTexture: Constant should be in numeric form.",le),fe[le])}const V={};if(e!==void 0)for(let le=0,fe=e.length;le<fe;le++){const Le=e[le];Le.image===void 0&&warn('ObjectLoader: No "image" specified for',Le.uuid),r[Le.image]===void 0&&warn("ObjectLoader: Undefined image",Le.image);const Ce=r[Le.image],Re=Ce.data;let Pe;Array.isArray(Re)?(Pe=new CubeTexture,Re.length===6&&(Pe.needsUpdate=!0)):(Re&&Re.data?Pe=new DataTexture:Pe=new Texture,Re&&(Pe.needsUpdate=!0)),Pe.source=Ce,Pe.uuid=Le.uuid,Le.name!==void 0&&(Pe.name=Le.name),Le.mapping!==void 0&&(Pe.mapping=o(Le.mapping,TEXTURE_MAPPING)),Le.channel!==void 0&&(Pe.channel=Le.channel),Le.offset!==void 0&&Pe.offset.fromArray(Le.offset),Le.repeat!==void 0&&Pe.repeat.fromArray(Le.repeat),Le.center!==void 0&&Pe.center.fromArray(Le.center),Le.rotation!==void 0&&(Pe.rotation=Le.rotation),Le.wrap!==void 0&&(Pe.wrapS=o(Le.wrap[0],TEXTURE_WRAPPING),Pe.wrapT=o(Le.wrap[1],TEXTURE_WRAPPING)),Le.format!==void 0&&(Pe.format=Le.format),Le.internalFormat!==void 0&&(Pe.internalFormat=Le.internalFormat),Le.type!==void 0&&(Pe.type=Le.type),Le.colorSpace!==void 0&&(Pe.colorSpace=Le.colorSpace),Le.minFilter!==void 0&&(Pe.minFilter=o(Le.minFilter,TEXTURE_FILTER)),Le.magFilter!==void 0&&(Pe.magFilter=o(Le.magFilter,TEXTURE_FILTER)),Le.anisotropy!==void 0&&(Pe.anisotropy=Le.anisotropy),Le.flipY!==void 0&&(Pe.flipY=Le.flipY),Le.generateMipmaps!==void 0&&(Pe.generateMipmaps=Le.generateMipmaps),Le.premultiplyAlpha!==void 0&&(Pe.premultiplyAlpha=Le.premultiplyAlpha),Le.unpackAlignment!==void 0&&(Pe.unpackAlignment=Le.unpackAlignment),Le.compareFunction!==void 0&&(Pe.compareFunction=Le.compareFunction),Le.userData!==void 0&&(Pe.userData=Le.userData),V[Le.uuid]=Pe}return V}parseObject(e,r,o,V,le){let fe;function Le(Fe){return r[Fe]===void 0&&warn("ObjectLoader: Undefined geometry",Fe),r[Fe]}function Ce(Fe){if(Fe!==void 0){if(Array.isArray(Fe)){const ke=[];for(let Gt=0,Vt=Fe.length;Gt<Vt;Gt++){const Xt=Fe[Gt];o[Xt]===void 0&&warn("ObjectLoader: Undefined material",Xt),ke.push(o[Xt])}return ke}return o[Fe]===void 0&&warn("ObjectLoader: Undefined material",Fe),o[Fe]}}function Re(Fe){return V[Fe]===void 0&&warn("ObjectLoader: Undefined texture",Fe),V[Fe]}let Pe,ze;switch(e.type){case"Scene":fe=new Scene,e.background!==void 0&&(Number.isInteger(e.background)?fe.background=new Color$1(e.background):fe.background=Re(e.background)),e.environment!==void 0&&(fe.environment=Re(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?fe.fog=new Fog(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(fe.fog=new FogExp2(e.fog.color,e.fog.density)),e.fog.name!==""&&(fe.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(fe.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(fe.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&fe.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(fe.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&fe.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":fe=new PerspectiveCamera(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(fe.focus=e.focus),e.zoom!==void 0&&(fe.zoom=e.zoom),e.filmGauge!==void 0&&(fe.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(fe.filmOffset=e.filmOffset),e.view!==void 0&&(fe.view=Object.assign({},e.view));break;case"OrthographicCamera":fe=new OrthographicCamera(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(fe.zoom=e.zoom),e.view!==void 0&&(fe.view=Object.assign({},e.view));break;case"AmbientLight":fe=new AmbientLight(e.color,e.intensity);break;case"DirectionalLight":fe=new DirectionalLight(e.color,e.intensity),fe.target=e.target||"";break;case"PointLight":fe=new PointLight(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":fe=new RectAreaLight(e.color,e.intensity,e.width,e.height);break;case"SpotLight":fe=new SpotLight(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),fe.target=e.target||"";break;case"HemisphereLight":fe=new HemisphereLight(e.color,e.groundColor,e.intensity);break;case"LightProbe":const Fe=new SphericalHarmonics3().fromArray(e.sh);fe=new LightProbe(Fe,e.intensity);break;case"SkinnedMesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new SkinnedMesh(Pe,ze),e.bindMode!==void 0&&(fe.bindMode=e.bindMode),e.bindMatrix!==void 0&&fe.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(fe.skeleton=e.skeleton);break;case"Mesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new Mesh(Pe,ze);break;case"InstancedMesh":Pe=Le(e.geometry),ze=Ce(e.material);const ke=e.count,Gt=e.instanceMatrix,Vt=e.instanceColor;fe=new InstancedMesh(Pe,ze,ke),fe.instanceMatrix=new InstancedBufferAttribute(new Float32Array(Gt.array),16),Vt!==void 0&&(fe.instanceColor=new InstancedBufferAttribute(new Float32Array(Vt.array),Vt.itemSize));break;case"BatchedMesh":Pe=Le(e.geometry),ze=Ce(e.material),fe=new BatchedMesh(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,ze),fe.geometry=Pe,fe.perObjectFrustumCulled=e.perObjectFrustumCulled,fe.sortObjects=e.sortObjects,fe._drawRanges=e.drawRanges,fe._reservedRanges=e.reservedRanges,fe._geometryInfo=e.geometryInfo.map(Xt=>{let xt=null,Zt=null;return Xt.boundingBox!==void 0&&(xt=new Box3().fromJSON(Xt.boundingBox)),Xt.boundingSphere!==void 0&&(Zt=new Sphere$1().fromJSON(Xt.boundingSphere)),qi(gi({},Xt),{boundingBox:xt,boundingSphere:Zt})}),fe._instanceInfo=e.instanceInfo,fe._availableInstanceIds=e._availableInstanceIds,fe._availableGeometryIds=e._availableGeometryIds,fe._nextIndexStart=e.nextIndexStart,fe._nextVertexStart=e.nextVertexStart,fe._geometryCount=e.geometryCount,fe._maxInstanceCount=e.maxInstanceCount,fe._maxVertexCount=e.maxVertexCount,fe._maxIndexCount=e.maxIndexCount,fe._geometryInitialized=e.geometryInitialized,fe._matricesTexture=Re(e.matricesTexture.uuid),fe._indirectTexture=Re(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(fe._colorsTexture=Re(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(fe.boundingSphere=new Sphere$1().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(fe.boundingBox=new Box3().fromJSON(e.boundingBox));break;case"LOD":fe=new LOD;break;case"Line":fe=new Line(Le(e.geometry),Ce(e.material));break;case"LineLoop":fe=new LineLoop(Le(e.geometry),Ce(e.material));break;case"LineSegments":fe=new LineSegments(Le(e.geometry),Ce(e.material));break;case"PointCloud":case"Points":fe=new Points(Le(e.geometry),Ce(e.material));break;case"Sprite":fe=new Sprite$1(Ce(e.material));break;case"Group":fe=new Group;break;case"Bone":fe=new Bone;break;default:fe=new Object3D}if(fe.uuid=e.uuid,e.name!==void 0&&(fe.name=e.name),e.matrix!==void 0?(fe.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(fe.matrixAutoUpdate=e.matrixAutoUpdate),fe.matrixAutoUpdate&&fe.matrix.decompose(fe.position,fe.quaternion,fe.scale)):(e.position!==void 0&&fe.position.fromArray(e.position),e.rotation!==void 0&&fe.rotation.fromArray(e.rotation),e.quaternion!==void 0&&fe.quaternion.fromArray(e.quaternion),e.scale!==void 0&&fe.scale.fromArray(e.scale)),e.up!==void 0&&fe.up.fromArray(e.up),e.castShadow!==void 0&&(fe.castShadow=e.castShadow),e.receiveShadow!==void 0&&(fe.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(fe.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(fe.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(fe.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(fe.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&fe.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(fe.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(fe.visible=e.visible),e.frustumCulled!==void 0&&(fe.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(fe.renderOrder=e.renderOrder),e.userData!==void 0&&(fe.userData=e.userData),e.layers!==void 0&&(fe.layers.mask=e.layers),e.children!==void 0){const Fe=e.children;for(let ke=0;ke<Fe.length;ke++)fe.add(this.parseObject(Fe[ke],r,o,V,le))}if(e.animations!==void 0){const Fe=e.animations;for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke];fe.animations.push(le[Gt])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(fe.autoUpdate=e.autoUpdate);const Fe=e.levels;for(let ke=0;ke<Fe.length;ke++){const Gt=Fe[ke],Vt=fe.getObjectByProperty("uuid",Gt.object);Vt!==void 0&&fe.addLevel(Vt,Gt.distance,Gt.hysteresis)}}return fe}bindSkeletons(e,r){Object.keys(r).length!==0&&e.traverse(function(o){if(o.isSkinnedMesh===!0&&o.skeleton!==void 0){const V=r[o.skeleton];V===void 0?warn("ObjectLoader: No skeleton found with UUID:",o.skeleton):o.bind(V,o.bindMatrix)}})}bindLightTargets(e){e.traverse(function(r){if(r.isDirectionalLight||r.isSpotLight){const o=r.target,V=e.getObjectByProperty("uuid",o);V!==void 0?r.target=V:r.target=new Object3D}})}}const TEXTURE_MAPPING={UVMapping,CubeReflectionMapping,CubeRefractionMapping,EquirectangularReflectionMapping,EquirectangularRefractionMapping,CubeUVReflectionMapping},TEXTURE_WRAPPING={RepeatWrapping,ClampToEdgeWrapping,MirroredRepeatWrapping},TEXTURE_FILTER={NearestFilter,NearestMipmapNearestFilter,NearestMipmapLinearFilter,LinearFilter,LinearMipmapNearestFilter,LinearMipmapLinearFilter},_errorMap=new WeakMap;class ImageBitmapLoader extends Loader{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap=="undefined"&&warn("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&warn("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,r,o,V){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const le=this,fe=Cache.get(`image-bitmap:${e}`);if(fe!==void 0){if(le.manager.itemStart(e),fe.then){fe.then(Re=>{if(_errorMap.has(fe)===!0)V&&V(_errorMap.get(fe)),le.manager.itemError(e),le.manager.itemEnd(e);else return r&&r(Re),le.manager.itemEnd(e),Re});return}return setTimeout(function(){r&&r(fe),le.manager.itemEnd(e)},0),fe}const Le={};Le.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",Le.headers=this.requestHeader,Le.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const Ce=fetch(e,Le).then(function(Re){return Re.blob()}).then(function(Re){return createImageBitmap(Re,Object.assign(le.options,{colorSpaceConversion:"none"}))}).then(function(Re){return Cache.add(`image-bitmap:${e}`,Re),r&&r(Re),le.manager.itemEnd(e),Re}).catch(function(Re){V&&V(Re),_errorMap.set(Ce,Re),Cache.remove(`image-bitmap:${e}`),le.manager.itemError(e),le.manager.itemEnd(e)});Cache.add(`image-bitmap:${e}`,Ce),le.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let _context;class AudioContext{static getContext(){return _context===void 0&&(_context=new(window.AudioContext||window.webkitAudioContext)),_context}static setContext(e){_context=e}}class AudioLoader extends Loader{constructor(e){super(e)}load(e,r,o,V){const le=this,fe=new FileLoader(this.manager);fe.setResponseType("arraybuffer"),fe.setPath(this.path),fe.setRequestHeader(this.requestHeader),fe.setWithCredentials(this.withCredentials),fe.load(e,function(Ce){try{const Re=Ce.slice(0);AudioContext.getContext().decodeAudioData(Re,function(ze){r(ze)}).catch(Le)}catch(Re){Le(Re)}},o,V);function Le(Ce){V?V(Ce):error$1(Ce),le.manager.itemError(e)}}}const _eyeRight=new Matrix4,_eyeLeft=new Matrix4,_projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const r=this._cache;if(r.focus!==e.focus||r.fov!==e.fov||r.aspect!==e.aspect*this.aspect||r.near!==e.near||r.far!==e.far||r.zoom!==e.zoom||r.eyeSep!==this.eyeSep){r.focus=e.focus,r.fov=e.fov,r.aspect=e.aspect*this.aspect,r.near=e.near,r.far=e.far,r.zoom=e.zoom,r.eyeSep=this.eyeSep,_projectionMatrix.copy(e.projectionMatrix);const V=r.eyeSep/2,le=V*r.near/r.focus,fe=r.near*Math.tan(DEG2RAD*r.fov*.5)/r.zoom;let Le,Ce;_eyeLeft.elements[12]=-V,_eyeRight.elements[12]=V,Le=-fe*r.aspect+le,Ce=fe*r.aspect+le,_projectionMatrix.elements[0]=2*r.near/(Ce-Le),_projectionMatrix.elements[8]=(Ce+Le)/(Ce-Le),this.cameraL.projectionMatrix.copy(_projectionMatrix),Le=-fe*r.aspect-le,Ce=fe*r.aspect-le,_projectionMatrix.elements[0]=2*r.near/(Ce-Le),_projectionMatrix.elements[8]=(Ce+Le)/(Ce-Le),this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(_eyeLeft),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(_eyeRight)}}class ArrayCamera extends PerspectiveCamera{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Clock{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const r=performance.now();e=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=e}return e}}const _position$1=new Vector3,_quaternion$1=new Quaternion,_scale$1=new Vector3,_forward=new Vector3,_up=new Vector3;class AudioListener extends Object3D{constructor(){super(),this.type="AudioListener",this.context=AudioContext.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Clock}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const r=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1),_forward.set(0,0,-1).applyQuaternion(_quaternion$1),_up.set(0,1,0).applyQuaternion(_quaternion$1),r.positionX){const o=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(_position$1.x,o),r.positionY.linearRampToValueAtTime(_position$1.y,o),r.positionZ.linearRampToValueAtTime(_position$1.z,o),r.forwardX.linearRampToValueAtTime(_forward.x,o),r.forwardY.linearRampToValueAtTime(_forward.y,o),r.forwardZ.linearRampToValueAtTime(_forward.z,o),r.upX.linearRampToValueAtTime(_up.x,o),r.upY.linearRampToValueAtTime(_up.y,o),r.upZ.linearRampToValueAtTime(_up.z,o)}else r.setPosition(_position$1.x,_position$1.y,_position$1.z),r.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}}class Audio extends Object3D{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){warn("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,r=this.filters.length;e<r;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(warn("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){warn("Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,r){return super.copy(e,r),e.sourceType!=="buffer"?(warn("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const _position=new Vector3,_quaternion$5=new Quaternion,_scale=new Vector3,_orientation=new Vector3;class PositionalAudio extends Audio{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,r,o){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=r,this.panner.coneOuterGain=o,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(_position,_quaternion$5,_scale),_orientation.set(0,0,1).applyQuaternion(_quaternion$5);const r=this.panner;if(r.positionX){const o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(_position.x,o),r.positionY.linearRampToValueAtTime(_position.y,o),r.positionZ.linearRampToValueAtTime(_position.z,o),r.orientationX.linearRampToValueAtTime(_orientation.x,o),r.orientationY.linearRampToValueAtTime(_orientation.y,o),r.orientationZ.linearRampToValueAtTime(_orientation.z,o)}else r.setPosition(_position.x,_position.y,_position.z),r.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}class AudioAnalyser{constructor(e,r=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const r=this.getFrequencyData();for(let o=0;o<r.length;o++)e+=r[o];return e/r.length}}class PropertyMixer{constructor(e,r,o){this.binding=e,this.valueSize=o;let V,le,fe;switch(r){case"quaternion":V=this._slerp,le=this._slerpAdditive,fe=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(o*6),this._workIndex=5;break;case"string":case"bool":V=this._select,le=this._select,fe=this._setAdditiveIdentityOther,this.buffer=new Array(o*5);break;default:V=this._lerp,le=this._lerpAdditive,fe=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(o*5)}this._mixBufferRegion=V,this._mixBufferRegionAdditive=le,this._setIdentity=fe,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,r){const o=this.buffer,V=this.valueSize,le=e*V+V;let fe=this.cumulativeWeight;if(fe===0){for(let Le=0;Le!==V;++Le)o[le+Le]=o[Le];fe=r}else{fe+=r;const Le=r/fe;this._mixBufferRegion(o,le,0,Le,V)}this.cumulativeWeight=fe}accumulateAdditive(e){const r=this.buffer,o=this.valueSize,V=o*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,V,0,e,o),this.cumulativeWeightAdditive+=e}apply(e){const r=this.valueSize,o=this.buffer,V=e*r+r,le=this.cumulativeWeight,fe=this.cumulativeWeightAdditive,Le=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,le<1){const Ce=r*this._origIndex;this._mixBufferRegion(o,V,Ce,1-le,r)}fe>0&&this._mixBufferRegionAdditive(o,V,this._addIndex*r,1,r);for(let Ce=r,Re=r+r;Ce!==Re;++Ce)if(o[Ce]!==o[Ce+r]){Le.setValue(o,V);break}}saveOriginalState(){const e=this.binding,r=this.buffer,o=this.valueSize,V=o*this._origIndex;e.getValue(r,V);for(let le=o,fe=V;le!==fe;++le)r[le]=r[V+le%o];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,r=e+this.valueSize;for(let o=e;o<r;o++)this.buffer[o]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let o=0;o<this.valueSize;o++)this.buffer[r+o]=this.buffer[e+o]}_select(e,r,o,V,le){if(V>=.5)for(let fe=0;fe!==le;++fe)e[r+fe]=e[o+fe]}_slerp(e,r,o,V){Quaternion.slerpFlat(e,r,e,r,e,o,V)}_slerpAdditive(e,r,o,V,le){const fe=this._workIndex*le;Quaternion.multiplyQuaternionsFlat(e,fe,e,r,e,o),Quaternion.slerpFlat(e,r,e,r,e,fe,V)}_lerp(e,r,o,V,le){const fe=1-V;for(let Le=0;Le!==le;++Le){const Ce=r+Le;e[Ce]=e[Ce]*fe+e[o+Le]*V}}_lerpAdditive(e,r,o,V,le){for(let fe=0;fe!==le;++fe){const Le=r+fe;e[Le]=e[Le]+e[o+fe]*V}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/",_reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g"),_wordChar="[^"+_RESERVED_CHARS_RE+"]",_wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]",_directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar),_nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot),_objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar),_propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar),_trackRe=new RegExp("^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$"),_supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(e,r,o){const V=o||PropertyBinding.parseTrackName(r);this._targetGroup=e,this._bindings=e.subscribe_(r,V)}getValue(e,r){this.bind();const o=this._targetGroup.nCachedObjects_,V=this._bindings[o];V!==void 0&&V.getValue(e,r)}setValue(e,r){const o=this._bindings;for(let V=this._targetGroup.nCachedObjects_,le=o.length;V!==le;++V)o[V].setValue(e,r)}bind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=e.length;r!==o;++r)e[r].bind()}unbind(){const e=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=e.length;r!==o;++r)e[r].unbind()}}class PropertyBinding{constructor(e,r,o){this.path=r,this.parsedPath=o||PropertyBinding.parseTrackName(r),this.node=PropertyBinding.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,r,o){return e&&e.isAnimationObjectGroup?new PropertyBinding.Composite(e,r,o):new PropertyBinding(e,r,o)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(e){const r=_trackRe.exec(e);if(r===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const o={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},V=o.nodeName&&o.nodeName.lastIndexOf(".");if(V!==void 0&&V!==-1){const le=o.nodeName.substring(V+1);_supportedObjectNames.indexOf(le)!==-1&&(o.nodeName=o.nodeName.substring(0,V),o.objectName=le)}if(o.propertyName===null||o.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return o}static findNode(e,r){if(r===void 0||r===""||r==="."||r===-1||r===e.name||r===e.uuid)return e;if(e.skeleton){const o=e.skeleton.getBoneByName(r);if(o!==void 0)return o}if(e.children){const o=function(le){for(let fe=0;fe<le.length;fe++){const Le=le[fe];if(Le.name===r||Le.uuid===r)return Le;const Ce=o(Le.children);if(Ce)return Ce}return null},V=o(e.children);if(V)return V}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,r){e[r]=this.targetObject[this.propertyName]}_getValue_array(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)e[r++]=o[V]}_getValue_arrayElement(e,r){e[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,r){this.resolvedProperty.toArray(e,r)}_setValue_direct(e,r){this.targetObject[this.propertyName]=e[r]}_setValue_direct_setNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,r){this.targetObject[this.propertyName]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++]}_setValue_array_setNeedsUpdate(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,r){const o=this.resolvedProperty;for(let V=0,le=o.length;V!==le;++V)o[V]=e[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,r){this.resolvedProperty[this.propertyIndex]=e[r]}_setValue_arrayElement_setNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty[this.propertyIndex]=e[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,r){this.resolvedProperty.fromArray(e,r)}_setValue_fromArray_setNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,r){this.resolvedProperty.fromArray(e,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,r){this.bind(),this.getValue(e,r)}_setValue_unbound(e,r){this.bind(),this.setValue(e,r)}bind(){let e=this.node;const r=this.parsedPath,o=r.objectName,V=r.propertyName;let le=r.propertyIndex;if(e||(e=PropertyBinding.findNode(this.rootNode,r.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){warn("PropertyBinding: No target node found for track: "+this.path+".");return}if(o){let Re=r.objectIndex;switch(o){case"materials":if(!e.material){error$1("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){error$1("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){error$1("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let Pe=0;Pe<e.length;Pe++)if(e[Pe].name===Re){Re=Pe;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){error$1("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){error$1("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[o]===void 0){error$1("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[o]}if(Re!==void 0){if(e[Re]===void 0){error$1("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[Re]}}const fe=e[V];if(fe===void 0){const Re=r.nodeName;error$1("PropertyBinding: Trying to update property for track: "+Re+"."+V+" but it wasn't found.",e);return}let Le=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?Le=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(Le=this.Versioning.MatrixWorldNeedsUpdate);let Ce=this.BindingType.Direct;if(le!==void 0){if(V==="morphTargetInfluences"){if(!e.geometry){error$1("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){error$1("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[le]!==void 0&&(le=e.morphTargetDictionary[le])}Ce=this.BindingType.ArrayElement,this.resolvedProperty=fe,this.propertyIndex=le}else fe.fromArray!==void 0&&fe.toArray!==void 0?(Ce=this.BindingType.HasFromToArray,this.resolvedProperty=fe):Array.isArray(fe)?(Ce=this.BindingType.EntireArray,this.resolvedProperty=fe):this.propertyName=V;this.getValue=this.GetterByBindingType[Ce],this.setValue=this.SetterByBindingTypeAndVersioning[Ce][Le]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=!0,this.uuid=generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let o=0,V=arguments.length;o!==V;++o)e[arguments[o].uuid]=o;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){const e=this._objects,r=this._indicesByUUID,o=this._paths,V=this._parsedPaths,le=this._bindings,fe=le.length;let Le,Ce=e.length,Re=this.nCachedObjects_;for(let Pe=0,ze=arguments.length;Pe!==ze;++Pe){const Fe=arguments[Pe],ke=Fe.uuid;let Gt=r[ke];if(Gt===void 0){Gt=Ce++,r[ke]=Gt,e.push(Fe);for(let Vt=0,Xt=fe;Vt!==Xt;++Vt)le[Vt].push(new PropertyBinding(Fe,o[Vt],V[Vt]))}else if(Gt<Re){Le=e[Gt];const Vt=--Re,Xt=e[Vt];r[Xt.uuid]=Gt,e[Gt]=Xt,r[ke]=Vt,e[Vt]=Fe;for(let xt=0,Zt=fe;xt!==Zt;++xt){const wt=le[xt],Wt=wt[Vt];let It=wt[Gt];wt[Gt]=Wt,It===void 0&&(It=new PropertyBinding(Fe,o[xt],V[xt])),wt[Vt]=It}}else e[Gt]!==Le&&error$1("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=Re}remove(){const e=this._objects,r=this._indicesByUUID,o=this._bindings,V=o.length;let le=this.nCachedObjects_;for(let fe=0,Le=arguments.length;fe!==Le;++fe){const Ce=arguments[fe],Re=Ce.uuid,Pe=r[Re];if(Pe!==void 0&&Pe>=le){const ze=le++,Fe=e[ze];r[Fe.uuid]=Pe,e[Pe]=Fe,r[Re]=ze,e[ze]=Ce;for(let ke=0,Gt=V;ke!==Gt;++ke){const Vt=o[ke],Xt=Vt[ze],xt=Vt[Pe];Vt[Pe]=Xt,Vt[ze]=xt}}}this.nCachedObjects_=le}uncache(){const e=this._objects,r=this._indicesByUUID,o=this._bindings,V=o.length;let le=this.nCachedObjects_,fe=e.length;for(let Le=0,Ce=arguments.length;Le!==Ce;++Le){const Re=arguments[Le],Pe=Re.uuid,ze=r[Pe];if(ze!==void 0)if(delete r[Pe],ze<le){const Fe=--le,ke=e[Fe],Gt=--fe,Vt=e[Gt];r[ke.uuid]=ze,e[ze]=ke,r[Vt.uuid]=Fe,e[Fe]=Vt,e.pop();for(let Xt=0,xt=V;Xt!==xt;++Xt){const Zt=o[Xt],wt=Zt[Fe],Wt=Zt[Gt];Zt[ze]=wt,Zt[Fe]=Wt,Zt.pop()}}else{const Fe=--fe,ke=e[Fe];Fe>0&&(r[ke.uuid]=ze),e[ze]=ke,e.pop();for(let Gt=0,Vt=V;Gt!==Vt;++Gt){const Xt=o[Gt];Xt[ze]=Xt[Fe],Xt.pop()}}}this.nCachedObjects_=le}subscribe_(e,r){const o=this._bindingsIndicesByPath;let V=o[e];const le=this._bindings;if(V!==void 0)return le[V];const fe=this._paths,Le=this._parsedPaths,Ce=this._objects,Re=Ce.length,Pe=this.nCachedObjects_,ze=new Array(Re);V=le.length,o[e]=V,fe.push(e),Le.push(r),le.push(ze);for(let Fe=Pe,ke=Ce.length;Fe!==ke;++Fe){const Gt=Ce[Fe];ze[Fe]=new PropertyBinding(Gt,e,r)}return ze}unsubscribe_(e){const r=this._bindingsIndicesByPath,o=r[e];if(o!==void 0){const V=this._paths,le=this._parsedPaths,fe=this._bindings,Le=fe.length-1,Ce=fe[Le],Re=e[Le];r[Re]=o,fe[o]=Ce,fe.pop(),le[o]=le[Le],le.pop(),V[o]=V[Le],V.pop()}}}class AnimationAction{constructor(e,r,o=null,V=r.blendMode){this._mixer=e,this._clip=r,this._localRoot=o,this.blendMode=V;const le=r.tracks,fe=le.length,Le=new Array(fe),Ce={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let Re=0;Re!==fe;++Re){const Pe=le[Re].createInterpolant(null);Le[Re]=Pe,Pe.settings=Ce}this._interpolantSettings=Ce,this._interpolants=Le,this._propertyBindings=new Array(fe),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,r){return this.loop=e,this.repetitions=r,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,r,o=!1){if(e.fadeOut(r),this.fadeIn(r),o===!0){const V=this._clip.duration,le=e._clip.duration,fe=le/V,Le=V/le;e.warp(1,fe,r),this.warp(Le,1,r)}return this}crossFadeTo(e,r,o=!1){return e.crossFadeFrom(this,r,o)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,r,o){const V=this._mixer,le=V.time,fe=this.timeScale;let Le=this._timeScaleInterpolant;Le===null&&(Le=V._lendControlInterpolant(),this._timeScaleInterpolant=Le);const Ce=Le.parameterPositions,Re=Le.sampleValues;return Ce[0]=le,Ce[1]=le+o,Re[0]=e/fe,Re[1]=r/fe,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,r,o,V){if(!this.enabled){this._updateWeight(e);return}const le=this._startTime;if(le!==null){const Ce=(e-le)*o;Ce<0||o===0?r=0:(this._startTime=null,r=o*Ce)}r*=this._updateTimeScale(e);const fe=this._updateTime(r),Le=this._updateWeight(e);if(Le>0){const Ce=this._interpolants,Re=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let Pe=0,ze=Ce.length;Pe!==ze;++Pe)Ce[Pe].evaluate(fe),Re[Pe].accumulateAdditive(Le);break;case NormalAnimationBlendMode:default:for(let Pe=0,ze=Ce.length;Pe!==ze;++Pe)Ce[Pe].evaluate(fe),Re[Pe].accumulate(V,Le)}}}_updateWeight(e){let r=0;if(this.enabled){r=this.weight;const o=this._weightInterpolant;if(o!==null){const V=o.evaluate(e)[0];r*=V,e>o.parameterPositions[1]&&(this.stopFading(),V===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(e){let r=0;if(!this.paused){r=this.timeScale;const o=this._timeScaleInterpolant;if(o!==null){const V=o.evaluate(e)[0];r*=V,e>o.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(e){const r=this._clip.duration,o=this.loop;let V=this.time+e,le=this._loopCount;const fe=o===LoopPingPong;if(e===0)return le===-1?V:fe&&(le&1)===1?r-V:V;if(o===LoopOnce){le===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(V>=r)V=r;else if(V<0)V=0;else{this.time=V;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=V,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(le===-1&&(e>=0?(le=0,this._setEndings(!0,this.repetitions===0,fe)):this._setEndings(this.repetitions===0,!0,fe)),V>=r||V<0){const Le=Math.floor(V/r);V-=r*Le,le+=Math.abs(Le);const Ce=this.repetitions-le;if(Ce<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,V=e>0?r:0,this.time=V,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(Ce===1){const Re=e<0;this._setEndings(Re,!Re,fe)}else this._setEndings(!1,!1,fe);this._loopCount=le,this.time=V,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:Le})}}else this.time=V;if(fe&&(le&1)===1)return r-V}return V}_setEndings(e,r,o){const V=this._interpolantSettings;o?(V.endingStart=ZeroSlopeEnding,V.endingEnd=ZeroSlopeEnding):(e?V.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding:V.endingStart=WrapAroundEnding,r?V.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding:V.endingEnd=WrapAroundEnding)}_scheduleFading(e,r,o){const V=this._mixer,le=V.time;let fe=this._weightInterpolant;fe===null&&(fe=V._lendControlInterpolant(),this._weightInterpolant=fe);const Le=fe.parameterPositions,Ce=fe.sampleValues;return Le[0]=le,Ce[0]=r,Le[1]=le+e,Ce[1]=o,this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,r){const o=e._localRoot||this._root,V=e._clip.tracks,le=V.length,fe=e._propertyBindings,Le=e._interpolants,Ce=o.uuid,Re=this._bindingsByRootAndName;let Pe=Re[Ce];Pe===void 0&&(Pe={},Re[Ce]=Pe);for(let ze=0;ze!==le;++ze){const Fe=V[ze],ke=Fe.name;let Gt=Pe[ke];if(Gt!==void 0)++Gt.referenceCount,fe[ze]=Gt;else{if(Gt=fe[ze],Gt!==void 0){Gt._cacheIndex===null&&(++Gt.referenceCount,this._addInactiveBinding(Gt,Ce,ke));continue}const Vt=r&&r._propertyBindings[ze].binding.parsedPath;Gt=new PropertyMixer(PropertyBinding.create(o,ke,Vt),Fe.ValueTypeName,Fe.getValueSize()),++Gt.referenceCount,this._addInactiveBinding(Gt,Ce,ke),fe[ze]=Gt}Le[ze].resultBuffer=Gt.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const o=(e._localRoot||this._root).uuid,V=e._clip.uuid,le=this._actionsByClip[V];this._bindAction(e,le&&le.knownActions[0]),this._addInactiveAction(e,V,o)}const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];le.useCount++===0&&(this._lendBinding(le),le.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];--le.useCount===0&&(le.restoreOriginalState(),this._takeBackBinding(le))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const r=e._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(e,r,o){const V=this._actions,le=this._actionsByClip;let fe=le[r];if(fe===void 0)fe={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,le[r]=fe;else{const Le=fe.knownActions;e._byClipCacheIndex=Le.length,Le.push(e)}e._cacheIndex=V.length,V.push(e),fe.actionByRoot[o]=e}_removeInactiveAction(e){const r=this._actions,o=r[r.length-1],V=e._cacheIndex;o._cacheIndex=V,r[V]=o,r.pop(),e._cacheIndex=null;const le=e._clip.uuid,fe=this._actionsByClip,Le=fe[le],Ce=Le.knownActions,Re=Ce[Ce.length-1],Pe=e._byClipCacheIndex;Re._byClipCacheIndex=Pe,Ce[Pe]=Re,Ce.pop(),e._byClipCacheIndex=null;const ze=Le.actionByRoot,Fe=(e._localRoot||this._root).uuid;delete ze[Fe],Ce.length===0&&delete fe[le],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const r=e._propertyBindings;for(let o=0,V=r.length;o!==V;++o){const le=r[o];--le.referenceCount===0&&this._removeInactiveBinding(le)}}_lendAction(e){const r=this._actions,o=e._cacheIndex,V=this._nActiveActions++,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_takeBackAction(e){const r=this._actions,o=e._cacheIndex,V=--this._nActiveActions,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_addInactiveBinding(e,r,o){const V=this._bindingsByRootAndName,le=this._bindings;let fe=V[r];fe===void 0&&(fe={},V[r]=fe),fe[o]=e,e._cacheIndex=le.length,le.push(e)}_removeInactiveBinding(e){const r=this._bindings,o=e.binding,V=o.rootNode.uuid,le=o.path,fe=this._bindingsByRootAndName,Le=fe[V],Ce=r[r.length-1],Re=e._cacheIndex;Ce._cacheIndex=Re,r[Re]=Ce,r.pop(),delete Le[le],Object.keys(Le).length===0&&delete fe[V]}_lendBinding(e){const r=this._bindings,o=e._cacheIndex,V=this._nActiveBindings++,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_takeBackBinding(e){const r=this._bindings,o=e._cacheIndex,V=--this._nActiveBindings,le=r[V];e._cacheIndex=V,r[V]=e,le._cacheIndex=o,r[o]=le}_lendControlInterpolant(){const e=this._controlInterpolants,r=this._nActiveControlInterpolants++;let o=e[r];return o===void 0&&(o=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer),o.__cacheIndex=r,e[r]=o),o}_takeBackControlInterpolant(e){const r=this._controlInterpolants,o=e.__cacheIndex,V=--this._nActiveControlInterpolants,le=r[V];e.__cacheIndex=V,r[V]=e,le.__cacheIndex=o,r[o]=le}clipAction(e,r,o){const V=r||this._root,le=V.uuid;let fe=typeof e=="string"?AnimationClip.findByName(V,e):e;const Le=fe!==null?fe.uuid:e,Ce=this._actionsByClip[Le];let Re=null;if(o===void 0&&(fe!==null?o=fe.blendMode:o=NormalAnimationBlendMode),Ce!==void 0){const ze=Ce.actionByRoot[le];if(ze!==void 0&&ze.blendMode===o)return ze;Re=Ce.knownActions[0],fe===null&&(fe=Re._clip)}if(fe===null)return null;const Pe=new AnimationAction(this,fe,r,o);return this._bindAction(Pe,Re),this._addInactiveAction(Pe,Le,le),Pe}existingAction(e,r){const o=r||this._root,V=o.uuid,le=typeof e=="string"?AnimationClip.findByName(o,e):e,fe=le?le.uuid:e,Le=this._actionsByClip[fe];return Le!==void 0&&Le.actionByRoot[V]||null}stopAllAction(){const e=this._actions,r=this._nActiveActions;for(let o=r-1;o>=0;--o)e[o].stop();return this}update(e){e*=this.timeScale;const r=this._actions,o=this._nActiveActions,V=this.time+=e,le=Math.sign(e),fe=this._accuIndex^=1;for(let Re=0;Re!==o;++Re)r[Re]._update(V,e,le,fe);const Le=this._bindings,Ce=this._nActiveBindings;for(let Re=0;Re!==Ce;++Re)Le[Re].apply(fe);return this}setTime(e){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const r=this._actions,o=e.uuid,V=this._actionsByClip,le=V[o];if(le!==void 0){const fe=le.knownActions;for(let Le=0,Ce=fe.length;Le!==Ce;++Le){const Re=fe[Le];this._deactivateAction(Re);const Pe=Re._cacheIndex,ze=r[r.length-1];Re._cacheIndex=null,Re._byClipCacheIndex=null,ze._cacheIndex=Pe,r[Pe]=ze,r.pop(),this._removeInactiveBindingsForAction(Re)}delete V[o]}}uncacheRoot(e){const r=e.uuid,o=this._actionsByClip;for(const fe in o){const Le=o[fe].actionByRoot,Ce=Le[r];Ce!==void 0&&(this._deactivateAction(Ce),this._removeInactiveAction(Ce))}const V=this._bindingsByRootAndName,le=V[r];if(le!==void 0)for(const fe in le){const Le=le[fe];Le.restoreOriginalState(),this._removeInactiveBinding(Le)}}uncacheAction(e,r){const o=this.existingAction(e,r);o!==null&&(this._deactivateAction(o),this._removeInactiveAction(o))}}class RenderTarget3D extends RenderTarget{constructor(e=1,r=1,o=1,V={}){super(e,r,V),this.isRenderTarget3D=!0,this.depth=o,this.texture=new Data3DTexture(null,e,r,o),this._setTextureOptions(V),this.texture.isRenderTargetTexture=!0}}class Uniform{constructor(e){this.value=e}clone(){return new Uniform(this.value.clone===void 0?this.value:this.value.clone())}}let _id$3=0;class UniformsGroup extends EventDispatcher{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:_id$3++}),this.name="",this.usage=StaticDrawUsage,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const r=this.uniforms.indexOf(e);return r!==-1&&this.uniforms.splice(r,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const r=e.uniforms;this.uniforms.length=0;for(let o=0,V=r.length;o<V;o++){const le=Array.isArray(r[o])?r[o]:[r[o]];for(let fe=0;fe<le.length;fe++)this.uniforms.push(le[fe].clone())}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(e,r,o=1){super(e,r),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=o}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const r=super.clone(e);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(e){const r=super.toJSON(e);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}}class GLBufferAttribute{constructor(e,r,o,V,le,fe=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=r,this.itemSize=o,this.elementSize=V,this.count=le,this.normalized=fe,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,r){return this.type=e,this.elementSize=r,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const _matrix$3=new Matrix4;class Raycaster{constructor(e,r,o=0,V=1/0){this.ray=new Ray(e,r),this.near=o,this.far=V,this.camera=null,this.layers=new Layers,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,r){this.ray.set(e,r)}setFromCamera(e,r){r.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(r.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(r).sub(this.ray.origin).normalize(),this.camera=r):r.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(r.near+r.far)/(r.near-r.far)).unproject(r),this.ray.direction.set(0,0,-1).transformDirection(r.matrixWorld),this.camera=r):error$1("Raycaster: Unsupported camera type: "+r.type)}setFromXRController(e){return _matrix$3.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(_matrix$3),this}intersectObject(e,r=!0,o=[]){return intersect(e,this,o,r),o.sort(ascSort),o}intersectObjects(e,r=!0,o=[]){for(let V=0,le=e.length;V<le;V++)intersect(e[V],this,o,r);return o.sort(ascSort),o}}function ascSort(v,e){return v.distance-e.distance}function intersect(v,e,r,o){let V=!0;if(v.layers.test(e.layers)&&v.raycast(e,r)===!1&&(V=!1),V===!0&&o===!0){const le=v.children;for(let fe=0,Le=le.length;fe<Le;fe++)intersect(le[fe],e,r,!0)}}class Timer{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=handleVisibilityChange.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function handleVisibilityChange(){this._document.hidden===!1&&this.reset()}class Spherical{constructor(e=1,r=0,o=0){this.radius=e,this.phi=r,this.theta=o}set(e,r,o){return this.radius=e,this.phi=r,this.theta=o,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=clamp(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,o){return this.radius=Math.sqrt(e*e+r*r+o*o),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,o),this.phi=Math.acos(clamp(r/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(e=1,r=0,o=0){this.radius=e,this.theta=r,this.y=o}set(e,r,o){return this.radius=e,this.theta=r,this.y=o,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,r,o){return this.radius=Math.sqrt(e*e+o*o),this.theta=Math.atan2(e,o),this.y=r,this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(e,r,o,V){Matrix2.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,r,o,V)}identity(){return this.set(1,0,0,1),this}fromArray(e,r=0){for(let o=0;o<4;o++)this.elements[o]=e[o+r];return this}set(e,r,o,V){const le=this.elements;return le[0]=e,le[2]=r,le[1]=o,le[3]=V,this}}const _vector$4=new Vector2;class Box2{constructor(e=new Vector2(1/0,1/0),r=new Vector2(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=r}set(e,r){return this.min.copy(e),this.max.copy(r),this}setFromPoints(e){this.makeEmpty();for(let r=0,o=e.length;r<o;r++)this.expandByPoint(e[r]);return this}setFromCenterAndSize(e,r){const o=_vector$4.copy(r).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,r){return r.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,r){return r.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,_vector$4).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const _startP=new Vector3,_startEnd=new Vector3,_d1=new Vector3,_d2=new Vector3,_r=new Vector3,_c1=new Vector3,_c2=new Vector3;class Line3{constructor(e=new Vector3,r=new Vector3){this.start=e,this.end=r}set(e,r){return this.start.copy(e),this.end.copy(r),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,r){return this.delta(r).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,r){_startP.subVectors(e,this.start),_startEnd.subVectors(this.end,this.start);const o=_startEnd.dot(_startEnd);let le=_startEnd.dot(_startP)/o;return r&&(le=clamp(le,0,1)),le}closestPointToPoint(e,r,o){const V=this.closestPointToPointParameter(e,r);return this.delta(o).multiplyScalar(V).add(this.start)}distanceSqToLine3(e,r=_c1,o=_c2){const V=10000000000000001e-32;let le,fe;const Le=this.start,Ce=e.start,Re=this.end,Pe=e.end;_d1.subVectors(Re,Le),_d2.subVectors(Pe,Ce),_r.subVectors(Le,Ce);const ze=_d1.dot(_d1),Fe=_d2.dot(_d2),ke=_d2.dot(_r);if(ze<=V&&Fe<=V)return r.copy(Le),o.copy(Ce),r.sub(o),r.dot(r);if(ze<=V)le=0,fe=ke/Fe,fe=clamp(fe,0,1);else{const Gt=_d1.dot(_r);if(Fe<=V)fe=0,le=clamp(-Gt/ze,0,1);else{const Vt=_d1.dot(_d2),Xt=ze*Fe-Vt*Vt;Xt!==0?le=clamp((Vt*ke-Gt*Fe)/Xt,0,1):le=0,fe=(Vt*le+ke)/Fe,fe<0?(fe=0,le=clamp(-Gt/ze,0,1)):fe>1&&(fe=1,le=clamp((Vt-Gt)/ze,0,1))}}return r.copy(Le).add(_d1.multiplyScalar(le)),o.copy(Ce).add(_d2.multiplyScalar(fe)),r.sub(o),r.dot(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(e,r){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=r,this.type="SpotLightHelper";const o=new BufferGeometry,V=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let fe=0,Le=1,Ce=32;fe<Ce;fe++,Le++){const Re=fe/Ce*Math.PI*2,Pe=Le/Ce*Math.PI*2;V.push(Math.cos(Re),Math.sin(Re),1,Math.cos(Pe),Math.sin(Pe),1)}o.setAttribute("position",new Float32BufferAttribute(V,3));const le=new LineBasicMaterial({fog:!1,toneMapped:!1});this.cone=new LineSegments(o,le),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const e=this.light.distance?this.light.distance:1e3,r=e*Math.tan(this.light.angle);this.cone.scale.set(r,r,e),_vector$3.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(_vector$3),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const _vector$2=new Vector3,_boneMatrix=new Matrix4,_matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(e){const r=getBoneList(e),o=new BufferGeometry,V=[],le=[];for(let Re=0;Re<r.length;Re++){const Pe=r[Re];Pe.parent&&Pe.parent.isBone&&(V.push(0,0,0),V.push(0,0,0),le.push(0,0,0),le.push(0,0,0))}o.setAttribute("position",new Float32BufferAttribute(V,3)),o.setAttribute("color",new Float32BufferAttribute(le,3));const fe=new LineBasicMaterial({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(o,fe),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=r,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const Le=new Color$1(255),Ce=new Color$1(65280);this.setColors(Le,Ce)}updateMatrixWorld(e){const r=this.bones,o=this.geometry,V=o.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let le=0,fe=0;le<r.length;le++){const Le=r[le];Le.parent&&Le.parent.isBone&&(_boneMatrix.multiplyMatrices(_matrixWorldInv,Le.matrixWorld),_vector$2.setFromMatrixPosition(_boneMatrix),V.setXYZ(fe,_vector$2.x,_vector$2.y,_vector$2.z),_boneMatrix.multiplyMatrices(_matrixWorldInv,Le.parent.matrixWorld),_vector$2.setFromMatrixPosition(_boneMatrix),V.setXYZ(fe+1,_vector$2.x,_vector$2.y,_vector$2.z),fe+=2)}o.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,r){const V=this.geometry.getAttribute("color");for(let le=0;le<V.count;le+=2)V.setXYZ(le,e.r,e.g,e.b),V.setXYZ(le+1,r.r,r.g,r.b);return V.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function getBoneList(v){const e=[];v.isBone===!0&&e.push(v);for(let r=0;r<v.children.length;r++)e.push(...getBoneList(v.children[r]));return e}class PointLightHelper extends Mesh{constructor(e,r,o){const V=new SphereGeometry(r,4,2),le=new MeshBasicMaterial({wireframe:!0,fog:!1,toneMapped:!1});super(V,le),this.light=e,this.color=o,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const _vector$1=new Vector3,_color1=new Color$1,_color2=new Color$1;class HemisphereLightHelper extends Object3D{constructor(e,r,o){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=o,this.type="HemisphereLightHelper";const V=new OctahedronGeometry(r);V.rotateY(Math.PI*.5),this.material=new MeshBasicMaterial({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const le=V.getAttribute("position"),fe=new Float32Array(le.count*3);V.setAttribute("color",new BufferAttribute(fe,3)),this.add(new Mesh(V,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const r=e.geometry.getAttribute("color");_color1.copy(this.light.color),_color2.copy(this.light.groundColor);for(let o=0,V=r.count;o<V;o++){const le=o<V/2?_color1:_color2;r.setXYZ(o,le.r,le.g,le.b)}r.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(e=10,r=10,o=4473924,V=8947848){o=new Color$1(o),V=new Color$1(V);const le=r/2,fe=e/r,Le=e/2,Ce=[],Re=[];for(let Fe=0,ke=0,Gt=-Le;Fe<=r;Fe++,Gt+=fe){Ce.push(-Le,0,Gt,Le,0,Gt),Ce.push(Gt,0,-Le,Gt,0,Le);const Vt=Fe===le?o:V;Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3,Vt.toArray(Re,ke),ke+=3}const Pe=new BufferGeometry;Pe.setAttribute("position",new Float32BufferAttribute(Ce,3)),Pe.setAttribute("color",new Float32BufferAttribute(Re,3));const ze=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(Pe,ze),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(e=10,r=16,o=8,V=64,le=4473924,fe=8947848){le=new Color$1(le),fe=new Color$1(fe);const Le=[],Ce=[];if(r>1)for(let ze=0;ze<r;ze++){const Fe=ze/r*(Math.PI*2),ke=Math.sin(Fe)*e,Gt=Math.cos(Fe)*e;Le.push(0,0,0),Le.push(ke,0,Gt);const Vt=ze&1?le:fe;Ce.push(Vt.r,Vt.g,Vt.b),Ce.push(Vt.r,Vt.g,Vt.b)}for(let ze=0;ze<o;ze++){const Fe=ze&1?le:fe,ke=e-e/o*ze;for(let Gt=0;Gt<V;Gt++){let Vt=Gt/V*(Math.PI*2),Xt=Math.sin(Vt)*ke,xt=Math.cos(Vt)*ke;Le.push(Xt,0,xt),Ce.push(Fe.r,Fe.g,Fe.b),Vt=(Gt+1)/V*(Math.PI*2),Xt=Math.sin(Vt)*ke,xt=Math.cos(Vt)*ke,Le.push(Xt,0,xt),Ce.push(Fe.r,Fe.g,Fe.b)}}const Re=new BufferGeometry;Re.setAttribute("position",new Float32BufferAttribute(Le,3)),Re.setAttribute("color",new Float32BufferAttribute(Ce,3));const Pe=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(Re,Pe),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const _v1$8=new Vector3,_v2$5=new Vector3,_v3$3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(e,r,o){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=o,this.type="DirectionalLightHelper",r===void 0&&(r=1);let V=new BufferGeometry;V.setAttribute("position",new Float32BufferAttribute([-r,r,0,r,r,0,r,-r,0,-r,-r,0,-r,r,0],3));const le=new LineBasicMaterial({fog:!1,toneMapped:!1});this.lightPlane=new Line(V,le),this.add(this.lightPlane),V=new BufferGeometry,V.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3)),this.targetLine=new Line(V,le),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),_v1$8.setFromMatrixPosition(this.light.matrixWorld),_v2$5.setFromMatrixPosition(this.light.target.matrixWorld),_v3$3.subVectors(_v2$5,_v1$8),this.lightPlane.lookAt(_v2$5),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(_v2$5),this.targetLine.scale.z=_v3$3.length()}}const _vector$d=new Vector3,_camera$1=new Camera$1;class CameraHelper extends LineSegments{constructor(e){const r=new BufferGeometry,o=new LineBasicMaterial({color:16777215,vertexColors:!0,toneMapped:!1}),V=[],le=[],fe={};Le("n1","n2"),Le("n2","n4"),Le("n4","n3"),Le("n3","n1"),Le("f1","f2"),Le("f2","f4"),Le("f4","f3"),Le("f3","f1"),Le("n1","f1"),Le("n2","f2"),Le("n3","f3"),Le("n4","f4"),Le("p","n1"),Le("p","n2"),Le("p","n3"),Le("p","n4"),Le("u1","u2"),Le("u2","u3"),Le("u3","u1"),Le("c","t"),Le("p","c"),Le("cn1","cn2"),Le("cn3","cn4"),Le("cf1","cf2"),Le("cf3","cf4");function Le(Gt,Vt){Ce(Gt),Ce(Vt)}function Ce(Gt){V.push(0,0,0),le.push(0,0,0),fe[Gt]===void 0&&(fe[Gt]=[]),fe[Gt].push(V.length/3-1)}r.setAttribute("position",new Float32BufferAttribute(V,3)),r.setAttribute("color",new Float32BufferAttribute(le,3)),super(r,o),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=fe,this.update();const Re=new Color$1(16755200),Pe=new Color$1(16711680),ze=new Color$1(43775),Fe=new Color$1(16777215),ke=new Color$1(3355443);this.setColors(Re,Pe,ze,Fe,ke)}setColors(e,r,o,V,le){const Le=this.geometry.getAttribute("color");return Le.setXYZ(0,e.r,e.g,e.b),Le.setXYZ(1,e.r,e.g,e.b),Le.setXYZ(2,e.r,e.g,e.b),Le.setXYZ(3,e.r,e.g,e.b),Le.setXYZ(4,e.r,e.g,e.b),Le.setXYZ(5,e.r,e.g,e.b),Le.setXYZ(6,e.r,e.g,e.b),Le.setXYZ(7,e.r,e.g,e.b),Le.setXYZ(8,e.r,e.g,e.b),Le.setXYZ(9,e.r,e.g,e.b),Le.setXYZ(10,e.r,e.g,e.b),Le.setXYZ(11,e.r,e.g,e.b),Le.setXYZ(12,e.r,e.g,e.b),Le.setXYZ(13,e.r,e.g,e.b),Le.setXYZ(14,e.r,e.g,e.b),Le.setXYZ(15,e.r,e.g,e.b),Le.setXYZ(16,e.r,e.g,e.b),Le.setXYZ(17,e.r,e.g,e.b),Le.setXYZ(18,e.r,e.g,e.b),Le.setXYZ(19,e.r,e.g,e.b),Le.setXYZ(20,e.r,e.g,e.b),Le.setXYZ(21,e.r,e.g,e.b),Le.setXYZ(22,e.r,e.g,e.b),Le.setXYZ(23,e.r,e.g,e.b),Le.setXYZ(24,r.r,r.g,r.b),Le.setXYZ(25,r.r,r.g,r.b),Le.setXYZ(26,r.r,r.g,r.b),Le.setXYZ(27,r.r,r.g,r.b),Le.setXYZ(28,r.r,r.g,r.b),Le.setXYZ(29,r.r,r.g,r.b),Le.setXYZ(30,r.r,r.g,r.b),Le.setXYZ(31,r.r,r.g,r.b),Le.setXYZ(32,o.r,o.g,o.b),Le.setXYZ(33,o.r,o.g,o.b),Le.setXYZ(34,o.r,o.g,o.b),Le.setXYZ(35,o.r,o.g,o.b),Le.setXYZ(36,o.r,o.g,o.b),Le.setXYZ(37,o.r,o.g,o.b),Le.setXYZ(38,V.r,V.g,V.b),Le.setXYZ(39,V.r,V.g,V.b),Le.setXYZ(40,le.r,le.g,le.b),Le.setXYZ(41,le.r,le.g,le.b),Le.setXYZ(42,le.r,le.g,le.b),Le.setXYZ(43,le.r,le.g,le.b),Le.setXYZ(44,le.r,le.g,le.b),Le.setXYZ(45,le.r,le.g,le.b),Le.setXYZ(46,le.r,le.g,le.b),Le.setXYZ(47,le.r,le.g,le.b),Le.setXYZ(48,le.r,le.g,le.b),Le.setXYZ(49,le.r,le.g,le.b),Le.needsUpdate=!0,this}update(){const e=this.geometry,r=this.pointMap,o=1,V=1;let le,fe;if(_camera$1.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)le=1,fe=0;else if(this.camera.coordinateSystem===WebGLCoordinateSystem)le=-1,fe=1;else if(this.camera.coordinateSystem===WebGPUCoordinateSystem)le=0,fe=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);setPoint("c",r,e,_camera$1,0,0,le),setPoint("t",r,e,_camera$1,0,0,fe),setPoint("n1",r,e,_camera$1,-o,-V,le),setPoint("n2",r,e,_camera$1,o,-V,le),setPoint("n3",r,e,_camera$1,-o,V,le),setPoint("n4",r,e,_camera$1,o,V,le),setPoint("f1",r,e,_camera$1,-o,-V,fe),setPoint("f2",r,e,_camera$1,o,-V,fe),setPoint("f3",r,e,_camera$1,-o,V,fe),setPoint("f4",r,e,_camera$1,o,V,fe),setPoint("u1",r,e,_camera$1,o*.7,V*1.1,le),setPoint("u2",r,e,_camera$1,-o*.7,V*1.1,le),setPoint("u3",r,e,_camera$1,0,V*2,le),setPoint("cf1",r,e,_camera$1,-o,0,fe),setPoint("cf2",r,e,_camera$1,o,0,fe),setPoint("cf3",r,e,_camera$1,0,-V,fe),setPoint("cf4",r,e,_camera$1,0,V,fe),setPoint("cn1",r,e,_camera$1,-o,0,le),setPoint("cn2",r,e,_camera$1,o,0,le),setPoint("cn3",r,e,_camera$1,0,-V,le),setPoint("cn4",r,e,_camera$1,0,V,le),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function setPoint(v,e,r,o,V,le,fe){_vector$d.set(V,le,fe).unproject(o);const Le=e[v];if(Le!==void 0){const Ce=r.getAttribute("position");for(let Re=0,Pe=Le.length;Re<Pe;Re++)Ce.setXYZ(Le[Re],_vector$d.x,_vector$d.y,_vector$d.z)}}const _box$5=new Box3;class BoxHelper extends LineSegments{constructor(e,r=16776960){const o=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),V=new Float32Array(8*3),le=new BufferGeometry;le.setIndex(new BufferAttribute(o,1)),le.setAttribute("position",new BufferAttribute(V,3)),super(le,new LineBasicMaterial({color:r,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&_box$5.setFromObject(this.object),_box$5.isEmpty())return;const e=_box$5.min,r=_box$5.max,o=this.geometry.attributes.position,V=o.array;V[0]=r.x,V[1]=r.y,V[2]=r.z,V[3]=e.x,V[4]=r.y,V[5]=r.z,V[6]=e.x,V[7]=e.y,V[8]=r.z,V[9]=r.x,V[10]=e.y,V[11]=r.z,V[12]=r.x,V[13]=r.y,V[14]=e.z,V[15]=e.x,V[16]=r.y,V[17]=e.z,V[18]=e.x,V[19]=e.y,V[20]=e.z,V[21]=r.x,V[22]=e.y,V[23]=e.z,o.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,r){return super.copy(e,r),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Box3Helper extends LineSegments{constructor(e,r=16776960){const o=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),V=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],le=new BufferGeometry;le.setIndex(new BufferAttribute(o,1)),le.setAttribute("position",new Float32BufferAttribute(V,3)),super(le,new LineBasicMaterial({color:r,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const r=this.box;r.isEmpty()||(r.getCenter(this.position),r.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class PlaneHelper extends Line{constructor(e,r=1,o=16776960){const V=o,le=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],fe=new BufferGeometry;fe.setAttribute("position",new Float32BufferAttribute(le,3)),fe.computeBoundingSphere(),super(fe,new LineBasicMaterial({color:V,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=r;const Le=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],Ce=new BufferGeometry;Ce.setAttribute("position",new Float32BufferAttribute(Le,3)),Ce.computeBoundingSphere(),this.add(new Mesh(Ce,new MeshBasicMaterial({color:V,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(e=new Vector3(0,0,1),r=new Vector3(0,0,0),o=1,V=16776960,le=o*.2,fe=le*.2){super(),this.type="ArrowHelper",_lineGeometry===void 0&&(_lineGeometry=new BufferGeometry,_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3)),_coneGeometry=new ConeGeometry(.5,1,5,1),_coneGeometry.translate(0,-.5,0)),this.position.copy(r),this.line=new Line(_lineGeometry,new LineBasicMaterial({color:V,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:V,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(o,le,fe)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{_axis.set(e.z,0,-e.x).normalize();const r=Math.acos(e.y);this.quaternion.setFromAxisAngle(_axis,r)}}setLength(e,r=e*.2,o=r*.2){this.line.scale.set(1,Math.max(1e-4,e-r),1),this.line.updateMatrix(),this.cone.scale.set(o,r,o),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(e=1){const r=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],o=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],V=new BufferGeometry;V.setAttribute("position",new Float32BufferAttribute(r,3)),V.setAttribute("color",new Float32BufferAttribute(o,3));const le=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(V,le),this.type="AxesHelper"}setColors(e,r,o){const V=new Color$1,le=this.geometry.attributes.color.array;return V.set(e),V.toArray(le,0),V.toArray(le,3),V.set(r),V.toArray(le,6),V.toArray(le,9),V.set(o),V.toArray(le,12),V.toArray(le,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath",this.color=new Color$1,this.subPaths=[],this.currentPath=null}moveTo(e,r){return this.currentPath=new Path$1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,r),this}lineTo(e,r){return this.currentPath.lineTo(e,r),this}quadraticCurveTo(e,r,o,V){return this.currentPath.quadraticCurveTo(e,r,o,V),this}bezierCurveTo(e,r,o,V,le,fe){return this.currentPath.bezierCurveTo(e,r,o,V,le,fe),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function r(xt){const Zt=[];for(let wt=0,Wt=xt.length;wt<Wt;wt++){const It=xt[wt],Nt=new Shape;Nt.curves=It.curves,Zt.push(Nt)}return Zt}function o(xt,Zt){const wt=Zt.length;let Wt=!1;for(let It=wt-1,Nt=0;Nt<wt;It=Nt++){let Ft=Zt[It],Ht=Zt[Nt],Kt=Ht.x-Ft.x,Yt=Ht.y-Ft.y;if(Math.abs(Yt)>Number.EPSILON){if(Yt<0&&(Ft=Zt[Nt],Kt=-Kt,Ht=Zt[It],Yt=-Yt),xt.y<Ft.y||xt.y>Ht.y)continue;if(xt.y===Ft.y){if(xt.x===Ft.x)return!0}else{const jt=Yt*(xt.x-Ft.x)-Kt*(xt.y-Ft.y);if(jt===0)return!0;if(jt<0)continue;Wt=!Wt}}else{if(xt.y!==Ft.y)continue;if(Ht.x<=xt.x&&xt.x<=Ft.x||Ft.x<=xt.x&&xt.x<=Ht.x)return!0}}return Wt}const V=ShapeUtils.isClockWise,le=this.subPaths;if(le.length===0)return[];let fe,Le,Ce;const Re=[];if(le.length===1)return Le=le[0],Ce=new Shape,Ce.curves=Le.curves,Re.push(Ce),Re;let Pe=!V(le[0].getPoints());Pe=e?!Pe:Pe;const ze=[],Fe=[];let ke=[],Gt=0,Vt;Fe[Gt]=void 0,ke[Gt]=[];for(let xt=0,Zt=le.length;xt<Zt;xt++)Le=le[xt],Vt=Le.getPoints(),fe=V(Vt),fe=e?!fe:fe,fe?(!Pe&&Fe[Gt]&&Gt++,Fe[Gt]={s:new Shape,p:Vt},Fe[Gt].s.curves=Le.curves,Pe&&Gt++,ke[Gt]=[]):ke[Gt].push({h:Le,p:Vt[0]});if(!Fe[0])return r(le);if(Fe.length>1){let xt=!1,Zt=0;for(let wt=0,Wt=Fe.length;wt<Wt;wt++)ze[wt]=[];for(let wt=0,Wt=Fe.length;wt<Wt;wt++){const It=ke[wt];for(let Nt=0;Nt<It.length;Nt++){const Ft=It[Nt];let Ht=!0;for(let Kt=0;Kt<Fe.length;Kt++)o(Ft.p,Fe[Kt].p)&&(wt!==Kt&&Zt++,Ht?(Ht=!1,ze[Kt].push(Ft)):xt=!0);Ht&&ze[wt].push(Ft)}}Zt>0&&xt===!1&&(ke=ze)}let Xt;for(let xt=0,Zt=Fe.length;xt<Zt;xt++){Ce=Fe[xt].s,Re.push(Ce),Xt=ke[xt];for(let wt=0,Wt=Xt.length;wt<Wt;wt++)Ce.holes.push(Xt[wt].h)}return Re}}class Controls extends EventDispatcher{constructor(e,r=null){super(),this.object=e,this.domElement=r,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){warn("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function contain(v,e){const r=v.image&&v.image.width?v.image.width/v.image.height:1;return r>e?(v.repeat.x=1,v.repeat.y=r/e,v.offset.x=0,v.offset.y=(1-v.repeat.y)/2):(v.repeat.x=e/r,v.repeat.y=1,v.offset.x=(1-v.repeat.x)/2,v.offset.y=0),v}function cover(v,e){const r=v.image&&v.image.width?v.image.width/v.image.height:1;return r>e?(v.repeat.x=e/r,v.repeat.y=1,v.offset.x=(1-v.repeat.x)/2,v.offset.y=0):(v.repeat.x=1,v.repeat.y=r/e,v.offset.x=0,v.offset.y=(1-v.repeat.y)/2),v}function fill(v){return v.repeat.x=1,v.repeat.y=1,v.offset.x=0,v.offset.y=0,v}function getByteLength(v,e,r,o){const V=getTextureTypeByteLength(o);switch(r){case AlphaFormat:return v*e;case RedFormat:return v*e/V.components*V.byteLength;case RedIntegerFormat:return v*e/V.components*V.byteLength;case RGFormat:return v*e*2/V.components*V.byteLength;case RGIntegerFormat:return v*e*2/V.components*V.byteLength;case RGBFormat:return v*e*3/V.components*V.byteLength;case RGBAFormat:return v*e*4/V.components*V.byteLength;case RGBAIntegerFormat:return v*e*4/V.components*V.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(v,16)*Math.max(e,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(v,8)*Math.max(e,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((v+3)/4)*Math.floor((e+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((v+4)/5)*Math.floor((e+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((v+4)/5)*Math.floor((e+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((v+5)/6)*Math.floor((e+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((v+5)/6)*Math.floor((e+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((v+7)/8)*Math.floor((e+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((v+7)/8)*Math.floor((e+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((v+7)/8)*Math.floor((e+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((v+9)/10)*Math.floor((e+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((v+9)/10)*Math.floor((e+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((v+9)/10)*Math.floor((e+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((v+9)/10)*Math.floor((e+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((v+11)/12)*Math.floor((e+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((v+11)/12)*Math.floor((e+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(v/4)*Math.ceil(e/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(v/4)*Math.ceil(e/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(v/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${r} format.`)}function getTextureTypeByteLength(v){switch(v){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:case UnsignedInt101111Type:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${v}.`)}class TextureUtils{static contain(e,r){return contain(e,r)}static cover(e,r){return cover(e,r)}static fill(e){return fill(e)}static getByteLength(e,r,o,V){return getByteLength(e,r,o,V)}}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}));typeof window!="undefined"&&(window.__THREE__?warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=REVISION);/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2010-2025 Three.js Authors
|
|
48
48
|
* SPDX-License-Identifier: MIT
|
|
@@ -4525,7 +4525,7 @@ void main() {
|
|
|
4525
4525
|
#include <logdepthbuf_vertex>
|
|
4526
4526
|
#include <fog_vertex>
|
|
4527
4527
|
}
|
|
4528
|
-
`;class zt extends ShaderMaterial{constructor(e={}){const r=e,{lineWidth:o=1,color:V="#ffffff",opacity:le=1,map:fe=null,dashOffset:Le=0,dashArray:Ce=0,dashRatio:Re=0,sizeAttenuation:Pe=!0,offsetLoop:ze=!0,offset:Fe=new Vector2(0,0),scaleDown:ke=0,alphaMap:Gt=void 0,alphaTest:Vt=0,repeat:Xt=new Vector2(1,1),resolution:xt=new Vector2(1,1)}=r,Zt=oe$1(r,["lineWidth","color","opacity","map","dashOffset","dashArray","dashRatio","sizeAttenuation","offsetLoop","offset","scaleDown","alphaMap","alphaTest","repeat","resolution"]);super(q$1(L$1({},Zt),{uniforms:{lineWidth:{value:o},color:{value:new Color$1(V)},opacity:{value:le},map:{value:fe},useMap:{value:fe?1:0},resolution:{value:xt},sizeAttenuation:{value:Pe?1:0},offset:{value:Fe},offsetLoop:{value:ze?1:0},dashArray:{value:Ce},dashOffset:{value:Le},dashRatio:{value:Re},useDash:{value:Ce>0?1:0},scaleDown:{value:ke/10},alphaTest:{value:Vt},alphaMap:{value:Gt},useAlphaMap:{value:Gt?1:0},repeat:{value:Xt}},vertexShader:mt$1,fragmentShader:pt})),this.type="MeshLineMaterial"}get color(){return this.uniforms.color.value}set color(e){this.uniforms.color.value=new Color$1(e)}get opacity(){var e;return((e=this.uniforms)==null?void 0:e.opacity.value)||1}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get alphaTest(){return this.uniforms.alphaTest.value}set alphaTest(e){this.uniforms&&(this.uniforms.alphaTest.value=e)}get map(){return this.uniforms.map.value}set map(e){this.uniforms.map.value=e,this.uniforms.useMap.value=e?1:0}get repeat(){return this.uniforms.repeat.value}set repeat(e){this.uniforms.repeat.value.copy(e)}get lineWidth(){return this.uniforms.lineWidth.value}set lineWidth(e){this.uniforms.lineWidth.value=e}get sizeAttenuation(){return this.uniforms.sizeAttenuation.value===1}set sizeAttenuation(e){this.uniforms.sizeAttenuation.value=e?1:0}}const Q$2=new Vector4,ge$1=new Vector3,Me$1=new Vector3,g=new Vector4,M$3=new Vector4,O=new Vector4,X$1=new Vector3,Y$1=new Matrix4,w=new Line3,we$1=new Vector3,U$2=new Box3,_=new Sphere$1,T$1=new Vector4;let E,z$2;function xe$1(v,e,r){return T$1.set(0,0,-e,1).applyMatrix4(v.projectionMatrix),T$1.multiplyScalar(1/T$1.w),T$1.x=z$2/r.width,T$1.y=z$2/r.height,T$1.applyMatrix4(v.projectionMatrixInverse),T$1.multiplyScalar(1/T$1.w),Math.abs(Math.max(T$1.x,T$1.y))}function vt$1(v,e){const r=v.matrixWorld,o=v.geometry,V=o.attributes.instanceStart,le=o.attributes.instanceEnd,fe=Math.min(o.instanceCount,V.count);for(let Le=0,Ce=fe;Le<Ce;Le++){w.start.fromBufferAttribute(V,Le),w.end.fromBufferAttribute(le,Le),w.applyMatrix4(r);const Re=new Vector3,Pe=new Vector3;E.distanceSqToSegment(w.start,w.end,Pe,Re),Pe.distanceTo(Re)<z$2*.5&&e.push({point:Pe,pointOnLine:Re,distance:E.origin.distanceTo(Pe),object:v,face:null,faceIndex:Le,uv:null,uv1:null})}}function bt(v,e,r){const o=e.projectionMatrix,V=v.material.resolution,le=v.matrixWorld,fe=v.geometry,Le=fe.attributes.instanceStart,Ce=fe.attributes.instanceEnd,Re=Math.min(fe.instanceCount,Le.count),Pe=-e.near;E.at(1,O),O.w=1,O.applyMatrix4(e.matrixWorldInverse),O.applyMatrix4(o),O.multiplyScalar(1/O.w),O.x*=V.x/2,O.y*=V.y/2,O.z=0,X$1.copy(O),Y$1.multiplyMatrices(e.matrixWorldInverse,le);for(let ze=0,Fe=Re;ze<Fe;ze++){if(g.fromBufferAttribute(Le,ze),M$3.fromBufferAttribute(Ce,ze),g.w=1,M$3.w=1,g.applyMatrix4(Y$1),M$3.applyMatrix4(Y$1),g.z>Pe&&M$3.z>Pe)continue;if(g.z>Pe){const xt=g.z-M$3.z,Zt=(g.z-Pe)/xt;g.lerp(M$3,Zt)}else if(M$3.z>Pe){const xt=M$3.z-g.z,Zt=(M$3.z-Pe)/xt;M$3.lerp(g,Zt)}g.applyMatrix4(o),M$3.applyMatrix4(o),g.multiplyScalar(1/g.w),M$3.multiplyScalar(1/M$3.w),g.x*=V.x/2,g.y*=V.y/2,M$3.x*=V.x/2,M$3.y*=V.y/2,w.start.copy(g),w.start.z=0,w.end.copy(M$3),w.end.z=0;const ke=w.closestPointToPointParameter(X$1,!0);w.at(ke,we$1);const Gt=MathUtils.lerp(g.z,M$3.z,ke),Vt=Gt>=-1&&Gt<=1,Xt=X$1.distanceTo(we$1)<z$2*.5;if(Vt&&Xt){w.start.fromBufferAttribute(Le,ze),w.end.fromBufferAttribute(Ce,ze),w.start.applyMatrix4(le),w.end.applyMatrix4(le);const xt=new Vector3,Zt=new Vector3;E.distanceSqToSegment(w.start,w.end,Zt,xt),r.push({point:Zt,pointOnLine:xt,distance:E.origin.distanceTo(Zt),object:v,face:null,faceIndex:ze,uv:null,uv1:null})}}}class Lt extends Mesh{constructor(e=new LineSegmentsGeometry,r){super(e,r),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,r=e.attributes.instanceStart,o=e.attributes.instanceEnd,V=new Float32Array(2*r.count);for(let fe=0,Le=0,Ce=r.count;fe<Ce;fe++,Le+=2)ge$1.fromBufferAttribute(r,fe),Me$1.fromBufferAttribute(o,fe),V[Le]=Le===0?0:V[Le-1],V[Le+1]=V[Le]+ge$1.distanceTo(Me$1);const le=new InstancedInterleavedBuffer(V,2,1);return e.setAttribute("instanceDistanceStart",new InterleavedBufferAttribute(le,1,0)),e.setAttribute("instanceDistanceEnd",new InterleavedBufferAttribute(le,1,1)),this}raycast(e,r){const o=this.material.worldUnits,V=e.camera;V===null&&!o&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const le=e.params.Line2!==void 0&&e.params.Line2.threshold||0;E=e.ray;const fe=this.matrixWorld,Le=this.geometry,Ce=this.material;z$2=Ce.linewidth+le,Le.boundingSphere===null&&Le.computeBoundingSphere(),_.copy(Le.boundingSphere).applyMatrix4(fe);let Re;if(o)Re=z$2*.5;else{const ze=Math.max(V.near,_.distanceToPoint(E.origin));Re=xe$1(V,ze,Ce.resolution)}if(_.radius+=Re,E.intersectsSphere(_)===!1)return;Le.boundingBox===null&&Le.computeBoundingBox(),U$2.copy(Le.boundingBox).applyMatrix4(fe);let Pe;if(o)Pe=z$2*.5;else{const ze=Math.max(V.near,U$2.distanceToPoint(E.origin));Pe=xe$1(V,ze,Ce.resolution)}U$2.expandByScalar(Pe),E.intersectsBox(U$2)!==!1&&(o?vt$1(this,r):bt(this,V,r))}onBeforeRender(e){const r=this.material.uniforms;r&&r.resolution&&(e.getViewport(Q$2),this.material.uniforms.resolution.value.set(Q$2.z,Q$2.w))}}const b$2=class pn extends Z$1{constructor(e){super(),this.objectType="Node",this.onNodePointerIndex=[],this.options=L$1({type:"2d"},e)}create(){const{position:e,children:r}=this.options,o=document.createElement("div");this.element=o,r&&o.appendChild(r),this.options.type==="3d"?this.createCSS3DObject(o):this.options.type==="3dSprite"?this.createCSS3DSprite(o):this.createCSS2DObject(o),e&&this.object3d.position.copy(e)}setChildren(e){this.options.children=e,this.element.innerHTML="",this.element.appendChild(e)}showAndEnsureVisible(){const e=this.options.children;e&&(e.style.visibility="hidden",this.show(),setTimeout(()=>{e.style.visibility="",this.ensureVisible()}))}moveElementToViewport(){const e=this.options.children;if(!e)return;const r=e.getBoundingClientRect(),o=window.innerWidth,V=window.innerHeight,le=r.width,fe=r.height;let Le=0,Ce=0;le>o?r.left>0&&(Le=-r.left):r.left<0?Le=-r.left:r.right>o&&(Le=o-r.right,r.left+Le<0&&(Le=-r.left)),fe>V?r.top>0&&(Ce=-r.top):r.top<0?Ce=-r.top:r.bottom>V&&(Ce=V-r.bottom,r.top+Ce<0&&(Ce=-r.top)),(Le!==0||Ce!==0)&&(e.style.transform=`translate(${Le}px, ${Ce}px)`)}ensureVisible(){const e=this.options.children;e&&(e.style.transform&&(e.style.transform=""),!pn.observerMap.has(e)&&(pn.sharedObserver||(pn.sharedObserver=new IntersectionObserver(r=>{r.forEach(o=>{const V=o.target,le=pn.observerMap.get(V);le&&o.isIntersecting&&(le.moveElementToViewport(),pn.observerMap.delete(V),pn.sharedObserver&&(pn.sharedObserver.unobserve(V),pn.observerMap.size===0&&(pn.sharedObserver.disconnect(),pn.sharedObserver=void 0)))})})),pn.observerMap.set(e,this),pn.sharedObserver.observe(e)))}onPointerEvent(e,r){const o=this.lead.handlePickNode([this],e,r);this.onNodePointerIndex.push(o)}dispose(){const e=this.options.children;e&&pn.sharedObserver&&(pn.observerMap.delete(e),pn.sharedObserver.unobserve(e),pn.observerMap.size===0&&(pn.sharedObserver.disconnect(),pn.sharedObserver=void 0)),this.onNodePointerIndex.forEach(r=>{this.lead.removePickNode(r)}),super.dispose()}};b$2.observerMap=new Map;let Se$1=b$2;function mergeAttributes(v){let e,r,o,V=-1,le=0;for(let Re=0;Re<v.length;++Re){const Pe=v[Re];if(e===void 0&&(e=Pe.array.constructor),e!==Pe.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=Pe.itemSize),r!==Pe.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(o===void 0&&(o=Pe.normalized),o!==Pe.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(V===-1&&(V=Pe.gpuType),V!==Pe.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;le+=Pe.count*r}const fe=new e(le),Le=new BufferAttribute(fe,r,o);let Ce=0;for(let Re=0;Re<v.length;++Re){const Pe=v[Re];if(Pe.isInterleavedBufferAttribute){const ze=Ce/r;for(let Fe=0,ke=Pe.count;Fe<ke;Fe++)for(let Gt=0;Gt<r;Gt++){const Vt=Pe.getComponent(Fe,Gt);Le.setComponent(Fe+ze,Gt,Vt)}}else fe.set(Pe.array,Ce);Ce+=Pe.count*r}return V!==void 0&&(Le.gpuType=V),Le}function toTrianglesDrawMode(v,e){if(e===TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),v;if(e===TriangleFanDrawMode||e===TriangleStripDrawMode){let r=v.getIndex();if(r===null){const fe=[],Le=v.getAttribute("position");if(Le!==void 0){for(let Ce=0;Ce<Le.count;Ce++)fe.push(Ce);v.setIndex(fe),r=v.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),v}const o=r.count-2,V=[];if(e===TriangleFanDrawMode)for(let fe=1;fe<=o;fe++)V.push(r.getX(0)),V.push(r.getX(fe)),V.push(r.getX(fe+1));else for(let fe=0;fe<o;fe++)fe%2===0?(V.push(r.getX(fe)),V.push(r.getX(fe+1)),V.push(r.getX(fe+2))):(V.push(r.getX(fe+2)),V.push(r.getX(fe+1)),V.push(r.getX(fe)));V.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const le=v.clone();return le.setIndex(V),le.clearGroups(),le}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),v}function mergeGroups(v){if(v.groups.length===0)return console.warn("THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge."),v;let e=v.groups;if(e=e.sort((fe,Le)=>fe.materialIndex!==Le.materialIndex?fe.materialIndex-Le.materialIndex:fe.start-Le.start),v.getIndex()===null){const fe=v.getAttribute("position"),Le=[];for(let Ce=0;Ce<fe.count;Ce+=3)Le.push(Ce,Ce+1,Ce+2);v.setIndex(Le)}const r=v.getIndex(),o=[];for(let fe=0;fe<e.length;fe++){const Le=e[fe],Ce=Le.start,Re=Ce+Le.count;for(let Pe=Ce;Pe<Re;Pe++)o.push(r.getX(Pe))}v.dispose(),v.setIndex(o);let V=0;for(let fe=0;fe<e.length;fe++){const Le=e[fe];Le.start=V,V+=Le.count}let le=e[0];v.groups=[le];for(let fe=1;fe<e.length;fe++){const Le=e[fe];le.materialIndex===Le.materialIndex?le.count+=Le.count:(le=Le,v.groups.push(le))}return v}const b$1=new Map,R$2=(v={})=>({generateTopUV(e,r,o,V,le){const fe=r[o*3],Le=r[o*3+1],Ce=r[V*3],Re=r[V*3+1],Pe=r[le*3],ze=r[le*3+1];let Fe;if(b$1.has(e))Fe=b$1.get(e);else{let Xt=v.box3;if(!Xt){Xt=new Box3;const Zt=e.parameters.shapes.getPoints().map(wt=>[wt.x,wt.y,0]).flat();Xt.setFromArray(Zt)}const xt=Xt.getSize(new Vector3);v.split&&(xt.y/=v.split),Fe={box:Xt,size:xt},b$1.set(e,Fe)}const{box:ke,size:Gt}=Fe,Vt=v.split?1-v.split:0;return[new Vector2((fe-ke.min.x)/Gt.x,(Le-ke.min.y)/Gt.y+Vt),new Vector2((Ce-ke.min.x)/Gt.x,(Re-ke.min.y)/Gt.y+Vt),new Vector2((Pe-ke.min.x)/Gt.x,(ze-ke.min.y)/Gt.y+Vt)]},generateSideWallUV(e,r,o,V,le,fe){const Le=r[o*3],Ce=r[o*3+1],Re=r[o*3+2],Pe=r[V*3],ze=r[V*3+1],Fe=r[V*3+2],ke=r[le*3],Gt=r[le*3+1],Vt=r[le*3+2],Xt=r[fe*3],xt=r[fe*3+1],Zt=r[fe*3+2];let wt;if(b$1.has(r))wt=b$1.get(r);else{const Nt=new Box3;Nt.setFromArray(r);const Ft=Nt.getSize(new Vector3);v.split&&(Ft.z/=1-v.split),v.sideRepeat&&(Ft.z/=v.sideRepeat),wt={box:Nt,size:Ft},b$1.set(r,wt)}const{box:Wt,size:It}=wt;return Math.abs(Ce-ze)<Math.abs(Le-Pe)?[new Vector2((Le-Wt.min.x)/It.x,(Re-Wt.min.z)/It.z),new Vector2((Pe-Wt.min.x)/It.x,(Fe-Wt.min.z)/It.z),new Vector2((ke-Wt.min.x)/It.x,(Vt-Wt.min.z)/It.z),new Vector2((Xt-Wt.min.x)/It.x,(Zt-Wt.min.z)/It.z)]:[new Vector2((Ce-Wt.min.y)/It.y,(Re-Wt.min.z)/It.z),new Vector2((ze-Wt.min.y)/It.y,(Fe-Wt.min.z)/It.z),new Vector2((Gt-Wt.min.y)/It.y,(Vt-Wt.min.z)/It.z),new Vector2((xt-Wt.min.y)/It.y,(Zt-Wt.min.z)/It.z)]}}),P$1=()=>{b$1.clear()},CENTER=0,AVERAGE=1,SAH=2,CONTAINED=2,TRIANGLE_INTERSECT_COST=1.25,TRAVERSAL_COST=1,BYTES_PER_NODE=6*4+4+4,IS_LEAFNODE_FLAG=65535,FLOAT32_EPSILON=Math.pow(2,-24),SKIP_GENERATION=Symbol("SKIP_GENERATION");function getVertexCount$1(v){return v.index?v.index.count:v.attributes.position.count}function getTriCount$1(v){return getVertexCount$1(v)/3}function getIndexArray$1(v,e=ArrayBuffer){return v>65535?new Uint32Array(new e(4*v)):new Uint16Array(new e(2*v))}function ensureIndex$1(v,e){if(!v.index){const r=v.attributes.position.count,o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=getIndexArray$1(r,o);v.setIndex(new BufferAttribute(V,1));for(let le=0;le<r;le++)V[le]=le}}function getFullGeometryRange(v,e){const r=getTriCount$1(v),o=e||v.drawRange,V=o.start/3,le=(o.start+o.count)/3,fe=Math.max(0,V),Le=Math.min(r,le)-fe;return[{offset:Math.floor(fe),count:Math.floor(Le)}]}function getRootIndexRanges(v,e){if(!v.groups||!v.groups.length)return getFullGeometryRange(v,e);const r=[],o=new Set,V=e||v.drawRange,le=V.start/3,fe=(V.start+V.count)/3;for(const Ce of v.groups){const Re=Ce.start/3,Pe=(Ce.start+Ce.count)/3;o.add(Math.max(le,Re)),o.add(Math.min(fe,Pe))}const Le=Array.from(o.values()).sort((Ce,Re)=>Ce-Re);for(let Ce=0;Ce<Le.length-1;Ce++){const Re=Le[Ce],Pe=Le[Ce+1];r.push({offset:Math.floor(Re),count:Math.floor(Pe-Re)})}return r}function hasGroupGaps(v,e){const r=getTriCount$1(v),o=getRootIndexRanges(v,e).sort((fe,Le)=>fe.offset-Le.offset),V=o[o.length-1];V.count=Math.min(r-V.offset,V.count);let le=0;return o.forEach(({count:fe})=>le+=fe),r!==le}function getBounds(v,e,r,o,V){let le=1/0,fe=1/0,Le=1/0,Ce=-1/0,Re=-1/0,Pe=-1/0,ze=1/0,Fe=1/0,ke=1/0,Gt=-1/0,Vt=-1/0,Xt=-1/0;for(let xt=e*6,Zt=(e+r)*6;xt<Zt;xt+=6){const wt=v[xt+0],Wt=v[xt+1],It=wt-Wt,Nt=wt+Wt;It<le&&(le=It),Nt>Ce&&(Ce=Nt),wt<ze&&(ze=wt),wt>Gt&&(Gt=wt);const Ft=v[xt+2],Ht=v[xt+3],Kt=Ft-Ht,Yt=Ft+Ht;Kt<fe&&(fe=Kt),Yt>Re&&(Re=Yt),Ft<Fe&&(Fe=Ft),Ft>Vt&&(Vt=Ft);const jt=v[xt+4],n0=v[xt+5],a0=jt-n0,l0=jt+n0;a0<Le&&(Le=a0),l0>Pe&&(Pe=l0),jt<ke&&(ke=jt),jt>Xt&&(Xt=jt)}o[0]=le,o[1]=fe,o[2]=Le,o[3]=Ce,o[4]=Re,o[5]=Pe,V[0]=ze,V[1]=Fe,V[2]=ke,V[3]=Gt,V[4]=Vt,V[5]=Xt}function computeTriangleBounds(v,e=null,r=null,o=null){const V=v.attributes.position,le=v.index?v.index.array:null,fe=getTriCount$1(v),Le=V.normalized;let Ce;e===null?(Ce=new Float32Array(fe*6),r=0,o=fe):(Ce=e,r=r||0,o=o||fe);const Re=V.array,Pe=V.offset||0;let ze=3;V.isInterleavedBufferAttribute&&(ze=V.data.stride);const Fe=["getX","getY","getZ"];for(let ke=r;ke<r+o;ke++){const Gt=ke*3,Vt=ke*6;let Xt=Gt+0,xt=Gt+1,Zt=Gt+2;le&&(Xt=le[Xt],xt=le[xt],Zt=le[Zt]),Le||(Xt=Xt*ze+Pe,xt=xt*ze+Pe,Zt=Zt*ze+Pe);for(let wt=0;wt<3;wt++){let Wt,It,Nt;Le?(Wt=V[Fe[wt]](Xt),It=V[Fe[wt]](xt),Nt=V[Fe[wt]](Zt)):(Wt=Re[Xt+wt],It=Re[xt+wt],Nt=Re[Zt+wt]);let Ft=Wt;It<Ft&&(Ft=It),Nt<Ft&&(Ft=Nt);let Ht=Wt;It>Ht&&(Ht=It),Nt>Ht&&(Ht=Nt);const Kt=(Ht-Ft)/2,Yt=wt*2;Ce[Vt+Yt+0]=Ft+Kt,Ce[Vt+Yt+1]=Kt+(Math.abs(Ft)+Kt)*FLOAT32_EPSILON}}return Ce}function arrayToBox(v,e,r){return r.min.x=e[v],r.min.y=e[v+1],r.min.z=e[v+2],r.max.x=e[v+3],r.max.y=e[v+4],r.max.z=e[v+5],r}function getLongestEdgeIndex(v){let e=-1,r=-1/0;for(let o=0;o<3;o++){const V=v[o+3]-v[o];V>r&&(r=V,e=o)}return e}function copyBounds(v,e){e.set(v)}function unionBounds(v,e,r){let o,V;for(let le=0;le<3;le++){const fe=le+3;o=v[le],V=e[le],r[le]=o<V?o:V,o=v[fe],V=e[fe],r[fe]=o>V?o:V}}function expandByTriangleBounds(v,e,r){for(let o=0;o<3;o++){const V=e[v+2*o],le=e[v+2*o+1],fe=V-le,Le=V+le;fe<r[o]&&(r[o]=fe),Le>r[o+3]&&(r[o+3]=Le)}}function computeSurfaceArea(v){const e=v[3]-v[0],r=v[4]-v[1],o=v[5]-v[2];return 2*(e*r+r*o+o*e)}const BIN_COUNT=32,binsSort=(v,e)=>v.candidate-e.candidate,sahBins=new Array(BIN_COUNT).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),leftBounds=new Float32Array(6);function getOptimalSplit(v,e,r,o,V,le){let fe=-1,Le=0;if(le===CENTER)fe=getLongestEdgeIndex(e),fe!==-1&&(Le=(e[fe]+e[fe+3])/2);else if(le===AVERAGE)fe=getLongestEdgeIndex(v),fe!==-1&&(Le=getAverage(r,o,V,fe));else if(le===SAH){const Ce=computeSurfaceArea(v);let Re=TRIANGLE_INTERSECT_COST*V;const Pe=o*6,ze=(o+V)*6;for(let Fe=0;Fe<3;Fe++){const ke=e[Fe],Xt=(e[Fe+3]-ke)/BIN_COUNT;if(V<BIN_COUNT/4){const xt=[...sahBins];xt.length=V;let Zt=0;for(let Wt=Pe;Wt<ze;Wt+=6,Zt++){const It=xt[Zt];It.candidate=r[Wt+2*Fe],It.count=0;const{bounds:Nt,leftCacheBounds:Ft,rightCacheBounds:Ht}=It;for(let Kt=0;Kt<3;Kt++)Ht[Kt]=1/0,Ht[Kt+3]=-1/0,Ft[Kt]=1/0,Ft[Kt+3]=-1/0,Nt[Kt]=1/0,Nt[Kt+3]=-1/0;expandByTriangleBounds(Wt,r,Nt)}xt.sort(binsSort);let wt=V;for(let Wt=0;Wt<wt;Wt++){const It=xt[Wt];for(;Wt+1<wt&&xt[Wt+1].candidate===It.candidate;)xt.splice(Wt+1,1),wt--}for(let Wt=Pe;Wt<ze;Wt+=6){const It=r[Wt+2*Fe];for(let Nt=0;Nt<wt;Nt++){const Ft=xt[Nt];It>=Ft.candidate?expandByTriangleBounds(Wt,r,Ft.rightCacheBounds):(expandByTriangleBounds(Wt,r,Ft.leftCacheBounds),Ft.count++)}}for(let Wt=0;Wt<wt;Wt++){const It=xt[Wt],Nt=It.count,Ft=V-It.count,Ht=It.leftCacheBounds,Kt=It.rightCacheBounds;let Yt=0;Nt!==0&&(Yt=computeSurfaceArea(Ht)/Ce);let jt=0;Ft!==0&&(jt=computeSurfaceArea(Kt)/Ce);const n0=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(Yt*Nt+jt*Ft);n0<Re&&(fe=Fe,Re=n0,Le=It.candidate)}}else{for(let wt=0;wt<BIN_COUNT;wt++){const Wt=sahBins[wt];Wt.count=0,Wt.candidate=ke+Xt+wt*Xt;const It=Wt.bounds;for(let Nt=0;Nt<3;Nt++)It[Nt]=1/0,It[Nt+3]=-1/0}for(let wt=Pe;wt<ze;wt+=6){let Nt=~~((r[wt+2*Fe]-ke)/Xt);Nt>=BIN_COUNT&&(Nt=BIN_COUNT-1);const Ft=sahBins[Nt];Ft.count++,expandByTriangleBounds(wt,r,Ft.bounds)}const xt=sahBins[BIN_COUNT-1];copyBounds(xt.bounds,xt.rightCacheBounds);for(let wt=BIN_COUNT-2;wt>=0;wt--){const Wt=sahBins[wt],It=sahBins[wt+1];unionBounds(Wt.bounds,It.rightCacheBounds,Wt.rightCacheBounds)}let Zt=0;for(let wt=0;wt<BIN_COUNT-1;wt++){const Wt=sahBins[wt],It=Wt.count,Nt=Wt.bounds,Ht=sahBins[wt+1].rightCacheBounds;It!==0&&(Zt===0?copyBounds(Nt,leftBounds):unionBounds(Nt,leftBounds,leftBounds)),Zt+=It;let Kt=0,Yt=0;Zt!==0&&(Kt=computeSurfaceArea(leftBounds)/Ce);const jt=V-Zt;jt!==0&&(Yt=computeSurfaceArea(Ht)/Ce);const n0=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(Kt*Zt+Yt*jt);n0<Re&&(fe=Fe,Re=n0,Le=Wt.candidate)}}}}else console.warn(`MeshBVH: Invalid build strategy value ${le} used.`);return{axis:fe,pos:Le}}function getAverage(v,e,r,o){let V=0;for(let le=e,fe=e+r;le<fe;le++)V+=v[le*6+o*2];return V/r}class MeshBVHNode{constructor(){this.boundingData=new Float32Array(6)}}function partition(v,e,r,o,V,le){let fe=o,Le=o+V-1;const Ce=le.pos,Re=le.axis*2;for(;;){for(;fe<=Le&&r[fe*6+Re]<Ce;)fe++;for(;fe<=Le&&r[Le*6+Re]>=Ce;)Le--;if(fe<Le){for(let Pe=0;Pe<3;Pe++){let ze=e[fe*3+Pe];e[fe*3+Pe]=e[Le*3+Pe],e[Le*3+Pe]=ze}for(let Pe=0;Pe<6;Pe++){let ze=r[fe*6+Pe];r[fe*6+Pe]=r[Le*6+Pe],r[Le*6+Pe]=ze}fe++,Le--}else return fe}}function partition_indirect(v,e,r,o,V,le){let fe=o,Le=o+V-1;const Ce=le.pos,Re=le.axis*2;for(;;){for(;fe<=Le&&r[fe*6+Re]<Ce;)fe++;for(;fe<=Le&&r[Le*6+Re]>=Ce;)Le--;if(fe<Le){let Pe=v[fe];v[fe]=v[Le],v[Le]=Pe;for(let ze=0;ze<6;ze++){let Fe=r[fe*6+ze];r[fe*6+ze]=r[Le*6+ze],r[Le*6+ze]=Fe}fe++,Le--}else return fe}}function IS_LEAF(v,e){return e[v+15]===65535}function OFFSET(v,e){return e[v+6]}function COUNT(v,e){return e[v+14]}function LEFT_NODE(v){return v+8}function RIGHT_NODE(v,e){return e[v+6]}function SPLIT_AXIS(v,e){return e[v+7]}function BOUNDING_DATA_INDEX(v){return v}let float32Array,uint32Array,uint16Array,uint8Array;const MAX_POINTER=Math.pow(2,32);function countNodes(v){return"count"in v?1:1+countNodes(v.left)+countNodes(v.right)}function populateBuffer(v,e,r){return float32Array=new Float32Array(r),uint32Array=new Uint32Array(r),uint16Array=new Uint16Array(r),uint8Array=new Uint8Array(r),_populateBuffer(v,e)}function _populateBuffer(v,e){const r=v/4,o=v/2,V="count"in e,le=e.boundingData;for(let fe=0;fe<6;fe++)float32Array[r+fe]=le[fe];if(V)if(e.buffer){const fe=e.buffer;uint8Array.set(new Uint8Array(fe),v);for(let Le=v,Ce=v+fe.byteLength;Le<Ce;Le+=BYTES_PER_NODE){const Re=Le/2;IS_LEAF(Re,uint16Array)||(uint32Array[Le/4+6]+=r)}return v+fe.byteLength}else{const fe=e.offset,Le=e.count;return uint32Array[r+6]=fe,uint16Array[o+14]=Le,uint16Array[o+15]=IS_LEAFNODE_FLAG,v+BYTES_PER_NODE}else{const fe=e.left,Le=e.right,Ce=e.splitAxis;let Re;if(Re=_populateBuffer(v+BYTES_PER_NODE,fe),Re/4>MAX_POINTER)throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return uint32Array[r+6]=Re/4,Re=_populateBuffer(Re,Le),uint32Array[r+7]=Ce,Re}}function generateIndirectBuffer(v,e){const r=(v.index?v.index.count:v.attributes.position.count)/3,o=r>Ln(2,16),V=o?4:2,le=e?new SharedArrayBuffer(r*V):new ArrayBuffer(r*V),fe=o?new Uint32Array(le):new Uint16Array(le);for(let Le=0,Ce=fe.length;Le<Ce;Le++)fe[Le]=Le;return fe}function buildTree(v,e,r,o,V){const{maxDepth:le,verbose:fe,maxLeafTris:Le,strategy:Ce,onProgress:Re,indirect:Pe}=V,ze=v._indirectBuffer,Fe=v.geometry,ke=Fe.index?Fe.index.array:null,Gt=Pe?partition_indirect:partition,Vt=getTriCount$1(Fe),Xt=new Float32Array(6);let xt=!1;const Zt=new MeshBVHNode;return getBounds(e,r,o,Zt.boundingData,Xt),Wt(Zt,r,o,Xt),Zt;function wt(It){Re&&Re(It/Vt)}function Wt(It,Nt,Ft,Ht=null,Kt=0){if(!xt&&Kt>=le&&(xt=!0,fe&&(console.warn(`MeshBVH: Max depth of ${le} reached when generating BVH. Consider increasing maxDepth.`),console.warn(Fe))),Ft<=Le||Kt>=le)return wt(Nt+Ft),It.offset=Nt,It.count=Ft,It;const Yt=getOptimalSplit(It.boundingData,Ht,e,Nt,Ft,Ce);if(Yt.axis===-1)return wt(Nt+Ft),It.offset=Nt,It.count=Ft,It;const jt=Gt(ze,ke,e,Nt,Ft,Yt);if(jt===Nt||jt===Nt+Ft)wt(Nt+Ft),It.offset=Nt,It.count=Ft;else{It.splitAxis=Yt.axis;const n0=new MeshBVHNode,a0=Nt,l0=jt-Nt;It.left=n0,getBounds(e,a0,l0,n0.boundingData,Xt),Wt(n0,a0,l0,Xt,Kt+1);const s0=new MeshBVHNode,$t=jt,qt=Ft-l0;It.right=s0,getBounds(e,$t,qt,s0.boundingData,Xt),Wt(s0,$t,qt,Xt,Kt+1)}return It}}function buildPackedTree(v,e){const r=v.geometry;e.indirect&&(v._indirectBuffer=generateIndirectBuffer(r,e.useSharedArrayBuffer),hasGroupGaps(r,e.range)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),v._indirectBuffer||ensureIndex$1(r,e);const o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=computeTriangleBounds(r),le=e.indirect?getFullGeometryRange(r,e.range):getRootIndexRanges(r,e.range);v._roots=le.map(fe=>{const Le=buildTree(v,V,fe.offset,fe.count,e),Ce=countNodes(Le),Re=new o(BYTES_PER_NODE*Ce);return populateBuffer(0,Le,Re),Re})}class SeparatingAxisBounds{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,r){let o=1/0,V=-1/0;for(let le=0,fe=e.length;le<fe;le++){const Ce=e[le][r];o=Ce<o?Ce:o,V=Ce>V?Ce:V}this.min=o,this.max=V}setFromPoints(e,r){let o=1/0,V=-1/0;for(let le=0,fe=r.length;le<fe;le++){const Le=r[le],Ce=e.dot(Le);o=Ce<o?Ce:o,V=Ce>V?Ce:V}this.min=o,this.max=V}isSeparated(e){return this.min>e.max||e.min>this.max}}SeparatingAxisBounds.prototype.setFromBox=function(){const v=new Vector3;return function(r,o){const V=o.min,le=o.max;let fe=1/0,Le=-1/0;for(let Ce=0;Ce<=1;Ce++)for(let Re=0;Re<=1;Re++)for(let Pe=0;Pe<=1;Pe++){v.x=V.x*Ce+le.x*(1-Ce),v.y=V.y*Re+le.y*(1-Re),v.z=V.z*Pe+le.z*(1-Pe);const ze=r.dot(v);fe=Math.min(ze,fe),Le=Math.max(ze,Le)}this.min=fe,this.max=Le}}();const closestPointLineToLine=function(){const v=new Vector3,e=new Vector3,r=new Vector3;return function(V,le,fe){const Le=V.start,Ce=v,Re=le.start,Pe=e;r.subVectors(Le,Re),v.subVectors(V.end,V.start),e.subVectors(le.end,le.start);const ze=r.dot(Pe),Fe=Pe.dot(Ce),ke=Pe.dot(Pe),Gt=r.dot(Ce),Xt=Ce.dot(Ce)*ke-Fe*Fe;let xt,Zt;Xt!==0?xt=(ze*Fe-Gt*ke)/Xt:xt=0,Zt=(ze+xt*Fe)/ke,fe.x=xt,fe.y=Zt}}(),closestPointsSegmentToSegment=function(){const v=new Vector2,e=new Vector3,r=new Vector3;return function(V,le,fe,Le){closestPointLineToLine(V,le,v);let Ce=v.x,Re=v.y;if(Ce>=0&&Ce<=1&&Re>=0&&Re<=1){V.at(Ce,fe),le.at(Re,Le);return}else if(Ce>=0&&Ce<=1){Re<0?le.at(0,Le):le.at(1,Le),V.closestPointToPoint(Le,!0,fe);return}else if(Re>=0&&Re<=1){Ce<0?V.at(0,fe):V.at(1,fe),le.closestPointToPoint(fe,!0,Le);return}else{let Pe;Ce<0?Pe=V.start:Pe=V.end;let ze;Re<0?ze=le.start:ze=le.end;const Fe=e,ke=r;if(V.closestPointToPoint(ze,!0,e),le.closestPointToPoint(Pe,!0,r),Fe.distanceToSquared(ze)<=ke.distanceToSquared(Pe)){fe.copy(Fe),Le.copy(ze);return}else{fe.copy(Pe),Le.copy(ke);return}}}}(),sphereIntersectTriangle=function(){const v=new Vector3,e=new Vector3,r=new Plane$1,o=new Line3;return function(le,fe){const{radius:Le,center:Ce}=le,{a:Re,b:Pe,c:ze}=fe;if(o.start=Re,o.end=Pe,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le||(o.start=Re,o.end=ze,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le)||(o.start=Pe,o.end=ze,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le))return!0;const Vt=fe.getPlane(r);if(Math.abs(Vt.distanceToPoint(Ce))<=Le){const xt=Vt.projectPoint(Ce,e);if(fe.containsPoint(xt))return!0}return!1}}(),ZERO_EPSILON=1e-15;function isNearZero(v){return Math.abs(v)<ZERO_EPSILON}class ExtendedTriangle extends Triangle{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map(()=>new Vector3),this.satBounds=new Array(4).fill().map(()=>new SeparatingAxisBounds),this.points=[this.a,this.b,this.c],this.sphere=new Sphere$1,this.plane=new Plane$1,this.needsUpdate=!0}intersectsSphere(e){return sphereIntersectTriangle(e,this)}update(){const e=this.a,r=this.b,o=this.c,V=this.points,le=this.satAxes,fe=this.satBounds,Le=le[0],Ce=fe[0];this.getNormal(Le),Ce.setFromPoints(Le,V);const Re=le[1],Pe=fe[1];Re.subVectors(e,r),Pe.setFromPoints(Re,V);const ze=le[2],Fe=fe[2];ze.subVectors(r,o),Fe.setFromPoints(ze,V);const ke=le[3],Gt=fe[3];ke.subVectors(o,e),Gt.setFromPoints(ke,V),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(Le,e),this.needsUpdate=!1}}ExtendedTriangle.prototype.closestPointToSegment=function(){const v=new Vector3,e=new Vector3,r=new Line3;return function(V,le=null,fe=null){const{start:Le,end:Ce}=V,Re=this.points;let Pe,ze=1/0;for(let Fe=0;Fe<3;Fe++){const ke=(Fe+1)%3;r.start.copy(Re[Fe]),r.end.copy(Re[ke]),closestPointsSegmentToSegment(r,V,v,e),Pe=v.distanceToSquared(e),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(e))}return this.closestPointToPoint(Le,v),Pe=Le.distanceToSquared(v),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(Le)),this.closestPointToPoint(Ce,v),Pe=Ce.distanceToSquared(v),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(Ce)),Math.sqrt(ze)}}();ExtendedTriangle.prototype.intersectsTriangle=function(){const v=new ExtendedTriangle,e=new Array(3),r=new Array(3),o=new SeparatingAxisBounds,V=new SeparatingAxisBounds,le=new Vector3,fe=new Vector3,Le=new Vector3,Ce=new Vector3,Re=new Vector3,Pe=new Line3,ze=new Line3,Fe=new Line3,ke=new Vector3;function Gt(Vt,Xt,xt){const Zt=Vt.points;let wt=0,Wt=-1;for(let It=0;It<3;It++){const{start:Nt,end:Ft}=Pe;Nt.copy(Zt[It]),Ft.copy(Zt[(It+1)%3]),Pe.delta(fe);const Ht=isNearZero(Xt.distanceToPoint(Nt));if(isNearZero(Xt.normal.dot(fe))&&Ht){xt.copy(Pe),wt=2;break}const Kt=Xt.intersectLine(Pe,ke);if(!Kt&&Ht&&ke.copy(Nt),(Kt||Ht)&&!isNearZero(ke.distanceTo(Ft))){if(wt<=1)(wt===1?xt.start:xt.end).copy(ke),Ht&&(Wt=wt);else if(wt>=2){(Wt===1?xt.start:xt.end).copy(ke),wt=2;break}if(wt++,wt===2&&Wt===-1)break}}return wt}return function(Xt,xt=null,Zt=!1){this.needsUpdate&&this.update(),Xt.isExtendedTriangle?Xt.needsUpdate&&Xt.update():(v.copy(Xt),v.update(),Xt=v);const wt=this.plane,Wt=Xt.plane;if(Math.abs(wt.normal.dot(Wt.normal))>1-1e-10){const It=this.satBounds,Nt=this.satAxes;r[0]=Xt.a,r[1]=Xt.b,r[2]=Xt.c;for(let Kt=0;Kt<4;Kt++){const Yt=It[Kt],jt=Nt[Kt];if(o.setFromPoints(jt,r),Yt.isSeparated(o))return!1}const Ft=Xt.satBounds,Ht=Xt.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let Kt=0;Kt<4;Kt++){const Yt=Ft[Kt],jt=Ht[Kt];if(o.setFromPoints(jt,e),Yt.isSeparated(o))return!1}for(let Kt=0;Kt<4;Kt++){const Yt=Nt[Kt];for(let jt=0;jt<4;jt++){const n0=Ht[jt];if(le.crossVectors(Yt,n0),o.setFromPoints(le,e),V.setFromPoints(le,r),o.isSeparated(V))return!1}}return xt&&(Zt||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),xt.start.set(0,0,0),xt.end.set(0,0,0)),!0}else{const It=Gt(this,Wt,ze);if(It===1&&Xt.containsPoint(ze.end))return xt&&(xt.start.copy(ze.end),xt.end.copy(ze.end)),!0;if(It!==2)return!1;const Nt=Gt(Xt,wt,Fe);if(Nt===1&&this.containsPoint(Fe.end))return xt&&(xt.start.copy(Fe.end),xt.end.copy(Fe.end)),!0;if(Nt!==2)return!1;if(ze.delta(Le),Fe.delta(Ce),Le.dot(Ce)<0){let a0=Fe.start;Fe.start=Fe.end,Fe.end=a0}const Ft=ze.start.dot(Le),Ht=ze.end.dot(Le),Kt=Fe.start.dot(Le),Yt=Fe.end.dot(Le),jt=Ht<Kt,n0=Ft<Yt;return Ft!==Yt&&Kt!==Ht&&jt===n0?!1:(xt&&(Re.subVectors(ze.start,Fe.start),Re.dot(Le)>0?xt.start.copy(ze.start):xt.start.copy(Fe.start),Re.subVectors(ze.end,Fe.end),Re.dot(Le)<0?xt.end.copy(ze.end):xt.end.copy(Fe.end)),!0)}}}();ExtendedTriangle.prototype.distanceToPoint=function(){const v=new Vector3;return function(r){return this.closestPointToPoint(r,v),r.distanceTo(v)}}();ExtendedTriangle.prototype.distanceToTriangle=function(){const v=new Vector3,e=new Vector3,r=["a","b","c"],o=new Line3,V=new Line3;return function(fe,Le=null,Ce=null){const Re=Le||Ce?o:null;if(this.intersectsTriangle(fe,Re))return(Le||Ce)&&(Le&&Re.getCenter(Le),Ce&&Re.getCenter(Ce)),0;let Pe=1/0;for(let ze=0;ze<3;ze++){let Fe;const ke=r[ze],Gt=fe[ke];this.closestPointToPoint(Gt,v),Fe=Gt.distanceToSquared(v),Fe<Pe&&(Pe=Fe,Le&&Le.copy(v),Ce&&Ce.copy(Gt));const Vt=this[ke];fe.closestPointToPoint(Vt,v),Fe=Vt.distanceToSquared(v),Fe<Pe&&(Pe=Fe,Le&&Le.copy(Vt),Ce&&Ce.copy(v))}for(let ze=0;ze<3;ze++){const Fe=r[ze],ke=r[(ze+1)%3];o.set(this[Fe],this[ke]);for(let Gt=0;Gt<3;Gt++){const Vt=r[Gt],Xt=r[(Gt+1)%3];V.set(fe[Vt],fe[Xt]),closestPointsSegmentToSegment(o,V,v,e);const xt=v.distanceToSquared(e);xt<Pe&&(Pe=xt,Le&&Le.copy(v),Ce&&Ce.copy(e))}}return Math.sqrt(Pe)}}();class OrientedBox{constructor(e,r,o){this.isOrientedBox=!0,this.min=new Vector3,this.max=new Vector3,this.matrix=new Matrix4,this.invMatrix=new Matrix4,this.points=new Array(8).fill().map(()=>new Vector3),this.satAxes=new Array(3).fill().map(()=>new Vector3),this.satBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds),this.alignedSatBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds),this.needsUpdate=!1,e&&this.min.copy(e),r&&this.max.copy(r),o&&this.matrix.copy(o)}set(e,r,o){this.min.copy(e),this.max.copy(r),this.matrix.copy(o),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}OrientedBox.prototype.update=function(){return function(){const e=this.matrix,r=this.min,o=this.max,V=this.points;for(let Re=0;Re<=1;Re++)for(let Pe=0;Pe<=1;Pe++)for(let ze=0;ze<=1;ze++){const Fe=1*Re|2*Pe|4*ze,ke=V[Fe];ke.x=Re?o.x:r.x,ke.y=Pe?o.y:r.y,ke.z=ze?o.z:r.z,ke.applyMatrix4(e)}const le=this.satBounds,fe=this.satAxes,Le=V[0];for(let Re=0;Re<3;Re++){const Pe=fe[Re],ze=le[Re],Fe=1<<Re,ke=V[Fe];Pe.subVectors(Le,ke),ze.setFromPoints(Pe,V)}const Ce=this.alignedSatBounds;Ce[0].setFromPointsField(V,"x"),Ce[1].setFromPointsField(V,"y"),Ce[2].setFromPointsField(V,"z"),this.invMatrix.copy(this.matrix).invert(),this.needsUpdate=!1}}();OrientedBox.prototype.intersectsBox=function(){const v=new SeparatingAxisBounds;return function(r){this.needsUpdate&&this.update();const o=r.min,V=r.max,le=this.satBounds,fe=this.satAxes,Le=this.alignedSatBounds;if(v.min=o.x,v.max=V.x,Le[0].isSeparated(v)||(v.min=o.y,v.max=V.y,Le[1].isSeparated(v))||(v.min=o.z,v.max=V.z,Le[2].isSeparated(v)))return!1;for(let Ce=0;Ce<3;Ce++){const Re=fe[Ce],Pe=le[Ce];if(v.setFromBox(Re,r),Pe.isSeparated(v))return!1}return!0}}();OrientedBox.prototype.intersectsTriangle=function(){const v=new ExtendedTriangle,e=new Array(3),r=new SeparatingAxisBounds,o=new SeparatingAxisBounds,V=new Vector3;return function(fe){this.needsUpdate&&this.update(),fe.isExtendedTriangle?fe.needsUpdate&&fe.update():(v.copy(fe),v.update(),fe=v);const Le=this.satBounds,Ce=this.satAxes;e[0]=fe.a,e[1]=fe.b,e[2]=fe.c;for(let Fe=0;Fe<3;Fe++){const ke=Le[Fe],Gt=Ce[Fe];if(r.setFromPoints(Gt,e),ke.isSeparated(r))return!1}const Re=fe.satBounds,Pe=fe.satAxes,ze=this.points;for(let Fe=0;Fe<3;Fe++){const ke=Re[Fe],Gt=Pe[Fe];if(r.setFromPoints(Gt,ze),ke.isSeparated(r))return!1}for(let Fe=0;Fe<3;Fe++){const ke=Ce[Fe];for(let Gt=0;Gt<4;Gt++){const Vt=Pe[Gt];if(V.crossVectors(ke,Vt),r.setFromPoints(V,e),o.setFromPoints(V,ze),r.isSeparated(o))return!1}}return!0}}();OrientedBox.prototype.closestPointToPoint=function(){return function(e,r){return this.needsUpdate&&this.update(),r.copy(e).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix),r}}();OrientedBox.prototype.distanceToPoint=function(){const v=new Vector3;return function(r){return this.closestPointToPoint(r,v),r.distanceTo(v)}}();OrientedBox.prototype.distanceToBox=function(){const v=["x","y","z"],e=new Array(12).fill().map(()=>new Line3),r=new Array(12).fill().map(()=>new Line3),o=new Vector3,V=new Vector3;return function(fe,Le=0,Ce=null,Re=null){if(this.needsUpdate&&this.update(),this.intersectsBox(fe))return(Ce||Re)&&(fe.getCenter(V),this.closestPointToPoint(V,o),fe.closestPointToPoint(o,V),Ce&&Ce.copy(o),Re&&Re.copy(V)),0;const Pe=Le*Le,ze=fe.min,Fe=fe.max,ke=this.points;let Gt=1/0;for(let Xt=0;Xt<8;Xt++){const xt=ke[Xt];V.copy(xt).clamp(ze,Fe);const Zt=xt.distanceToSquared(V);if(Zt<Gt&&(Gt=Zt,Ce&&Ce.copy(xt),Re&&Re.copy(V),Zt<Pe))return Math.sqrt(Zt)}let Vt=0;for(let Xt=0;Xt<3;Xt++)for(let xt=0;xt<=1;xt++)for(let Zt=0;Zt<=1;Zt++){const wt=(Xt+1)%3,Wt=(Xt+2)%3,It=xt<<wt|Zt<<Wt,Nt=1<<Xt|xt<<wt|Zt<<Wt,Ft=ke[It],Ht=ke[Nt];e[Vt].set(Ft,Ht);const Yt=v[Xt],jt=v[wt],n0=v[Wt],a0=r[Vt],l0=a0.start,s0=a0.end;l0[Yt]=ze[Yt],l0[jt]=xt?ze[jt]:Fe[jt],l0[n0]=Zt?ze[n0]:Fe[jt],s0[Yt]=Fe[Yt],s0[jt]=xt?ze[jt]:Fe[jt],s0[n0]=Zt?ze[n0]:Fe[jt],Vt++}for(let Xt=0;Xt<=1;Xt++)for(let xt=0;xt<=1;xt++)for(let Zt=0;Zt<=1;Zt++){V.x=Xt?Fe.x:ze.x,V.y=xt?Fe.y:ze.y,V.z=Zt?Fe.z:ze.z,this.closestPointToPoint(V,o);const wt=V.distanceToSquared(o);if(wt<Gt&&(Gt=wt,Ce&&Ce.copy(o),Re&&Re.copy(V),wt<Pe))return Math.sqrt(wt)}for(let Xt=0;Xt<12;Xt++){const xt=e[Xt];for(let Zt=0;Zt<12;Zt++){const wt=r[Zt];closestPointsSegmentToSegment(xt,wt,o,V);const Wt=o.distanceToSquared(V);if(Wt<Gt&&(Gt=Wt,Ce&&Ce.copy(o),Re&&Re.copy(V),Wt<Pe))return Math.sqrt(Wt)}}return Math.sqrt(Gt)}}();class PrimitivePool{constructor(e){this._getNewPrimitive=e,this._primitives=[]}getPrimitive(){const e=this._primitives;return e.length===0?this._getNewPrimitive():e.pop()}releasePrimitive(e){this._primitives.push(e)}}class ExtendedTrianglePoolBase extends PrimitivePool{constructor(){super(()=>new ExtendedTriangle)}}const ExtendedTrianglePool=new ExtendedTrianglePoolBase;class _BufferStack{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let r=null;this.setBuffer=o=>{r&&e.push(r),r=o,this.float32Array=new Float32Array(o),this.uint16Array=new Uint16Array(o),this.uint32Array=new Uint32Array(o)},this.clearBuffer=()=>{r=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const BufferStack=new _BufferStack;let _box1,_box2;const boxStack=[],boxPool=new PrimitivePool(()=>new Box3);function shapecast(v,e,r,o,V,le){_box1=boxPool.getPrimitive(),_box2=boxPool.getPrimitive(),boxStack.push(_box1,_box2),BufferStack.setBuffer(v._roots[e]);const fe=shapecastTraverse(0,v.geometry,r,o,V,le);BufferStack.clearBuffer(),boxPool.releasePrimitive(_box1),boxPool.releasePrimitive(_box2),boxStack.pop(),boxStack.pop();const Le=boxStack.length;return Le>0&&(_box2=boxStack[Le-1],_box1=boxStack[Le-2]),fe}function shapecastTraverse(v,e,r,o,V=null,le=0,fe=0){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack;let Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);return arrayToBox(v,Le,_box1),o(Fe,ke,!1,fe,le+v,_box1)}else{let Yt=function(n0){const{uint16Array:a0,uint32Array:l0}=BufferStack;let s0=n0*2;for(;!IS_LEAF(s0,a0);)n0=LEFT_NODE(n0),s0=n0*2;return OFFSET(n0,l0)},jt=function(n0){const{uint16Array:a0,uint32Array:l0}=BufferStack;let s0=n0*2;for(;!IS_LEAF(s0,a0);)n0=RIGHT_NODE(n0,l0),s0=n0*2;return OFFSET(n0,l0)+COUNT(s0,a0)};const Fe=LEFT_NODE(v),ke=RIGHT_NODE(v,Re);let Gt=Fe,Vt=ke,Xt,xt,Zt,wt;if(V&&(Zt=_box1,wt=_box2,arrayToBox(Gt,Le,Zt),arrayToBox(Vt,Le,wt),Xt=V(Zt),xt=V(wt),xt<Xt)){Gt=ke,Vt=Fe;const n0=Xt;Xt=xt,xt=n0,Zt=wt}Zt||(Zt=_box1,arrayToBox(Gt,Le,Zt));const Wt=IS_LEAF(Gt*2,Ce),It=r(Zt,Wt,Xt,fe+1,le+Gt);let Nt;if(It===CONTAINED){const n0=Yt(Gt),l0=jt(Gt)-n0;Nt=o(n0,l0,!0,fe+1,le+Gt,Zt)}else Nt=It&&shapecastTraverse(Gt,e,r,o,V,le,fe+1);if(Nt)return!0;wt=_box2,arrayToBox(Vt,Le,wt);const Ft=IS_LEAF(Vt*2,Ce),Ht=r(wt,Ft,xt,fe+1,le+Vt);let Kt;if(Ht===CONTAINED){const n0=Yt(Vt),l0=jt(Vt)-n0;Kt=o(n0,l0,!0,fe+1,le+Vt,wt)}else Kt=Ht&&shapecastTraverse(Vt,e,r,o,V,le,fe+1);return!!Kt}}const temp=new Vector3,temp1$2=new Vector3;function closestPointToPoint(v,e,r={},o=0,V=1/0){const le=o*o,fe=V*V;let Le=1/0,Ce=null;if(v.shapecast({boundsTraverseOrder:Pe=>(temp.copy(e).clamp(Pe.min,Pe.max),temp.distanceToSquared(e)),intersectsBounds:(Pe,ze,Fe)=>Fe<Le&&Fe<fe,intersectsTriangle:(Pe,ze)=>{Pe.closestPointToPoint(e,temp);const Fe=e.distanceToSquared(temp);return Fe<Le&&(temp1$2.copy(temp),Le=Fe,Ce=ze),Fe<le}}),Le===1/0)return null;const Re=Math.sqrt(Le);return r.point?r.point.copy(temp1$2):r.point=temp1$2.clone(),r.distance=Re,r.faceIndex=Ce,r}const IS_GT_REVISION_169=parseInt(REVISION)>=169,_vA=new Vector3,_vB=new Vector3,_vC=new Vector3,_uvA=new Vector2,_uvB=new Vector2,_uvC=new Vector2,_normalA=new Vector3,_normalB=new Vector3,_normalC=new Vector3,_intersectionPoint=new Vector3;function checkIntersection(v,e,r,o,V,le,fe,Le){let Ce;if(le===BackSide?Ce=v.intersectTriangle(o,r,e,!0,V):Ce=v.intersectTriangle(e,r,o,le!==DoubleSide,V),Ce===null)return null;const Re=v.origin.distanceTo(V);return Re<fe||Re>Le?null:{distance:Re,point:V.clone()}}function checkBufferGeometryIntersection(v,e,r,o,V,le,fe,Le,Ce,Re,Pe){_vA.fromBufferAttribute(e,le),_vB.fromBufferAttribute(e,fe),_vC.fromBufferAttribute(e,Le);const ze=checkIntersection(v,_vA,_vB,_vC,_intersectionPoint,Ce,Re,Pe);if(ze){const Fe=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA,_vB,_vC,Fe),o&&(_uvA.fromBufferAttribute(o,le),_uvB.fromBufferAttribute(o,fe),_uvC.fromBufferAttribute(o,Le),ze.uv=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2)),V&&(_uvA.fromBufferAttribute(V,le),_uvB.fromBufferAttribute(V,fe),_uvC.fromBufferAttribute(V,Le),ze.uv1=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2)),r&&(_normalA.fromBufferAttribute(r,le),_normalB.fromBufferAttribute(r,fe),_normalC.fromBufferAttribute(r,Le),ze.normal=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_normalA,_normalB,_normalC,new Vector3),ze.normal.dot(v.direction)>0&&ze.normal.multiplyScalar(-1));const ke={a:le,b:fe,c:Le,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA,_vB,_vC,ke.normal),ze.face=ke,ze.faceIndex=le,IS_GT_REVISION_169&&(ze.barycoord=Fe)}return ze}function intersectTri(v,e,r,o,V,le,fe){const Le=o*3;let Ce=Le+0,Re=Le+1,Pe=Le+2;const ze=v.index;v.index&&(Ce=ze.getX(Ce),Re=ze.getX(Re),Pe=ze.getX(Pe));const{position:Fe,normal:ke,uv:Gt,uv1:Vt}=v.attributes,Xt=checkBufferGeometryIntersection(r,Fe,ke,Gt,Vt,Ce,Re,Pe,e,le,fe);return Xt?(Xt.faceIndex=o,V&&V.push(Xt),Xt):null}function setTriangle(v,e,r,o){const V=v.a,le=v.b,fe=v.c;let Le=e,Ce=e+1,Re=e+2;r&&(Le=r.getX(Le),Ce=r.getX(Ce),Re=r.getX(Re)),V.x=o.getX(Le),V.y=o.getY(Le),V.z=o.getZ(Le),le.x=o.getX(Ce),le.y=o.getY(Ce),le.z=o.getZ(Ce),fe.x=o.getX(Re),fe.y=o.getY(Re),fe.z=o.getZ(Re)}function intersectTris(v,e,r,o,V,le,fe,Le){const{geometry:Ce,_indirectBuffer:Re}=v;for(let Pe=o,ze=o+V;Pe<ze;Pe++)intersectTri(Ce,e,r,Pe,le,fe,Le)}function intersectClosestTri(v,e,r,o,V,le,fe){const{geometry:Le,_indirectBuffer:Ce}=v;let Re=1/0,Pe=null;for(let ze=o,Fe=o+V;ze<Fe;ze++){let ke;ke=intersectTri(Le,e,r,ze,null,le,fe),ke&&ke.distance<Re&&(Pe=ke,Re=ke.distance)}return Pe}function iterateOverTriangles(v,e,r,o,V,le,fe){const{geometry:Le}=r,{index:Ce}=Le,Re=Le.attributes.position;for(let Pe=v,ze=e+v;Pe<ze;Pe++){let Fe;if(Fe=Pe,setTriangle(fe,Fe*3,Ce,Re),fe.needsUpdate=!0,o(fe,Fe,V,le))return!0}return!1}function refit(v,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=v.geometry,o=r.index?r.index.array:null,V=r.attributes.position;let le,fe,Le,Ce,Re=0;const Pe=v._roots;for(let Fe=0,ke=Pe.length;Fe<ke;Fe++)le=Pe[Fe],fe=new Uint32Array(le),Le=new Uint16Array(le),Ce=new Float32Array(le),ze(0,Re),Re+=le.byteLength;function ze(Fe,ke,Gt=!1){const Vt=Fe*2;if(Le[Vt+15]===IS_LEAFNODE_FLAG){const xt=fe[Fe+6],Zt=Le[Vt+14];let wt=1/0,Wt=1/0,It=1/0,Nt=-1/0,Ft=-1/0,Ht=-1/0;for(let Kt=3*xt,Yt=3*(xt+Zt);Kt<Yt;Kt++){let jt=o[Kt];const n0=V.getX(jt),a0=V.getY(jt),l0=V.getZ(jt);n0<wt&&(wt=n0),n0>Nt&&(Nt=n0),a0<Wt&&(Wt=a0),a0>Ft&&(Ft=a0),l0<It&&(It=l0),l0>Ht&&(Ht=l0)}return Ce[Fe+0]!==wt||Ce[Fe+1]!==Wt||Ce[Fe+2]!==It||Ce[Fe+3]!==Nt||Ce[Fe+4]!==Ft||Ce[Fe+5]!==Ht?(Ce[Fe+0]=wt,Ce[Fe+1]=Wt,Ce[Fe+2]=It,Ce[Fe+3]=Nt,Ce[Fe+4]=Ft,Ce[Fe+5]=Ht,!0):!1}else{const xt=Fe+8,Zt=fe[Fe+6],wt=xt+ke,Wt=Zt+ke;let It=Gt,Nt=!1,Ft=!1;e?It||(Nt=e.has(wt),Ft=e.has(Wt),It=!Nt&&!Ft):(Nt=!0,Ft=!0);const Ht=It||Nt,Kt=It||Ft;let Yt=!1;Ht&&(Yt=ze(xt,ke,It));let jt=!1;Kt&&(jt=ze(Zt,ke,It));const n0=Yt||jt;if(n0)for(let a0=0;a0<3;a0++){const l0=xt+a0,s0=Zt+a0,$t=Ce[l0],qt=Ce[l0+3],e0=Ce[s0],o0=Ce[s0+3];Ce[Fe+a0]=$t<e0?$t:e0,Ce[Fe+a0+3]=qt>o0?qt:o0}return n0}}}function intersectRay(v,e,r,o,V){let le,fe,Le,Ce,Re,Pe;const ze=1/r.direction.x,Fe=1/r.direction.y,ke=1/r.direction.z,Gt=r.origin.x,Vt=r.origin.y,Xt=r.origin.z;let xt=e[v],Zt=e[v+3],wt=e[v+1],Wt=e[v+3+1],It=e[v+2],Nt=e[v+3+2];return ze>=0?(le=(xt-Gt)*ze,fe=(Zt-Gt)*ze):(le=(Zt-Gt)*ze,fe=(xt-Gt)*ze),Fe>=0?(Le=(wt-Vt)*Fe,Ce=(Wt-Vt)*Fe):(Le=(Wt-Vt)*Fe,Ce=(wt-Vt)*Fe),le>Ce||Le>fe||((Le>le||isNaN(le))&&(le=Le),(Ce<fe||isNaN(fe))&&(fe=Ce),ke>=0?(Re=(It-Xt)*ke,Pe=(Nt-Xt)*ke):(Re=(Nt-Xt)*ke,Pe=(It-Xt)*ke),le>Pe||Re>fe)?!1:((Re>le||le!==le)&&(le=Re),(Pe<fe||fe!==fe)&&(fe=Pe),le<=V&&fe>=o)}function intersectTris_indirect(v,e,r,o,V,le,fe,Le){const{geometry:Ce,_indirectBuffer:Re}=v;for(let Pe=o,ze=o+V;Pe<ze;Pe++){let Fe=Re?Re[Pe]:Pe;intersectTri(Ce,e,r,Fe,le,fe,Le)}}function intersectClosestTri_indirect(v,e,r,o,V,le,fe){const{geometry:Le,_indirectBuffer:Ce}=v;let Re=1/0,Pe=null;for(let ze=o,Fe=o+V;ze<Fe;ze++){let ke;ke=intersectTri(Le,e,r,Ce?Ce[ze]:ze,null,le,fe),ke&&ke.distance<Re&&(Pe=ke,Re=ke.distance)}return Pe}function iterateOverTriangles_indirect(v,e,r,o,V,le,fe){const{geometry:Le}=r,{index:Ce}=Le,Re=Le.attributes.position;for(let Pe=v,ze=e+v;Pe<ze;Pe++){let Fe;if(Fe=r.resolveTriangleIndex(Pe),setTriangle(fe,Fe*3,Ce,Re),fe.needsUpdate=!0,o(fe,Fe,V,le))return!0}return!1}function raycast(v,e,r,o,V,le,fe){BufferStack.setBuffer(v._roots[e]),_raycast$1(0,v,r,o,V,le,fe),BufferStack.clearBuffer()}function _raycast$1(v,e,r,o,V,le,fe){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack,Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);intersectTris(e,r,o,Fe,ke,V,le,fe)}else{const Fe=LEFT_NODE(v);intersectRay(Fe,Le,o,le,fe)&&_raycast$1(Fe,e,r,o,V,le,fe);const ke=RIGHT_NODE(v,Re);intersectRay(ke,Le,o,le,fe)&&_raycast$1(ke,e,r,o,V,le,fe)}}const _xyzFields$1=["x","y","z"];function raycastFirst(v,e,r,o,V,le){BufferStack.setBuffer(v._roots[e]);const fe=_raycastFirst$1(0,v,r,o,V,le);return BufferStack.clearBuffer(),fe}function _raycastFirst$1(v,e,r,o,V,le){const{float32Array:fe,uint16Array:Le,uint32Array:Ce}=BufferStack;let Re=v*2;if(IS_LEAF(Re,Le)){const ze=OFFSET(v,Ce),Fe=COUNT(Re,Le);return intersectClosestTri(e,r,o,ze,Fe,V,le)}else{const ze=SPLIT_AXIS(v,Ce),Fe=_xyzFields$1[ze],Gt=o.direction[Fe]>=0;let Vt,Xt;Gt?(Vt=LEFT_NODE(v),Xt=RIGHT_NODE(v,Ce)):(Vt=RIGHT_NODE(v,Ce),Xt=LEFT_NODE(v));const Zt=intersectRay(Vt,fe,o,V,le)?_raycastFirst$1(Vt,e,r,o,V,le):null;if(Zt){const It=Zt.point[Fe];if(Gt?It<=fe[Xt+ze]:It>=fe[Xt+ze+3])return Zt}const Wt=intersectRay(Xt,fe,o,V,le)?_raycastFirst$1(Xt,e,r,o,V,le):null;return Zt&&Wt?Zt.distance<=Wt.distance?Zt:Wt:Zt||Wt||null}}const boundingBox$1=new Box3,triangle$1=new ExtendedTriangle,triangle2$1=new ExtendedTriangle,invertedMat$1=new Matrix4,obb$4=new OrientedBox,obb2$3=new OrientedBox;function intersectsGeometry(v,e,r,o){BufferStack.setBuffer(v._roots[e]);const V=_intersectsGeometry$1(0,v,r,o);return BufferStack.clearBuffer(),V}function _intersectsGeometry$1(v,e,r,o,V=null){const{float32Array:le,uint16Array:fe,uint32Array:Le}=BufferStack;let Ce=v*2;if(V===null&&(r.boundingBox||r.computeBoundingBox(),obb$4.set(r.boundingBox.min,r.boundingBox.max,o),V=obb$4),IS_LEAF(Ce,fe)){const Pe=e.geometry,ze=Pe.index,Fe=Pe.attributes.position,ke=r.index,Gt=r.attributes.position,Vt=OFFSET(v,Le),Xt=COUNT(Ce,fe);if(invertedMat$1.copy(o).invert(),r.boundsTree)return arrayToBox(v,le,obb2$3),obb2$3.matrix.copy(invertedMat$1),obb2$3.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:Zt=>obb2$3.intersectsBox(Zt),intersectsTriangle:Zt=>{Zt.a.applyMatrix4(o),Zt.b.applyMatrix4(o),Zt.c.applyMatrix4(o),Zt.needsUpdate=!0;for(let wt=Vt*3,Wt=(Xt+Vt)*3;wt<Wt;wt+=3)if(setTriangle(triangle2$1,wt,ze,Fe),triangle2$1.needsUpdate=!0,Zt.intersectsTriangle(triangle2$1))return!0;return!1}});for(let xt=Vt*3,Zt=(Xt+Vt)*3;xt<Zt;xt+=3){setTriangle(triangle$1,xt,ze,Fe),triangle$1.a.applyMatrix4(invertedMat$1),triangle$1.b.applyMatrix4(invertedMat$1),triangle$1.c.applyMatrix4(invertedMat$1),triangle$1.needsUpdate=!0;for(let wt=0,Wt=ke.count;wt<Wt;wt+=3)if(setTriangle(triangle2$1,wt,ke,Gt),triangle2$1.needsUpdate=!0,triangle$1.intersectsTriangle(triangle2$1))return!0}}else{const Pe=v+8,ze=Le[v+6];return arrayToBox(Pe,le,boundingBox$1),!!(V.intersectsBox(boundingBox$1)&&_intersectsGeometry$1(Pe,e,r,o,V)||(arrayToBox(ze,le,boundingBox$1),V.intersectsBox(boundingBox$1)&&_intersectsGeometry$1(ze,e,r,o,V)))}}const tempMatrix$1=new Matrix4,obb$3=new OrientedBox,obb2$2=new OrientedBox,temp1$1=new Vector3,temp2$1=new Vector3,temp3$1=new Vector3,temp4$1=new Vector3;function closestPointToGeometry(v,e,r,o={},V={},le=0,fe=1/0){e.boundingBox||e.computeBoundingBox(),obb$3.set(e.boundingBox.min,e.boundingBox.max,r),obb$3.needsUpdate=!0;const Le=v.geometry,Ce=Le.attributes.position,Re=Le.index,Pe=e.attributes.position,ze=e.index,Fe=ExtendedTrianglePool.getPrimitive(),ke=ExtendedTrianglePool.getPrimitive();let Gt=temp1$1,Vt=temp2$1,Xt=null,xt=null;V&&(Xt=temp3$1,xt=temp4$1);let Zt=1/0,wt=null,Wt=null;return tempMatrix$1.copy(r).invert(),obb2$2.matrix.copy(tempMatrix$1),v.shapecast({boundsTraverseOrder:It=>obb$3.distanceToBox(It),intersectsBounds:(It,Nt,Ft)=>Ft<Zt&&Ft<fe?(Nt&&(obb2$2.min.copy(It.min),obb2$2.max.copy(It.max),obb2$2.needsUpdate=!0),!0):!1,intersectsRange:(It,Nt)=>{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:Ht=>obb2$2.distanceToBox(Ht),intersectsBounds:(Ht,Kt,Yt)=>Yt<Zt&&Yt<fe,intersectsRange:(Ht,Kt)=>{for(let Yt=Ht,jt=Ht+Kt;Yt<jt;Yt++){setTriangle(ke,3*Yt,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let n0=It,a0=It+Nt;n0<a0;n0++){setTriangle(Fe,3*n0,Re,Ce),Fe.needsUpdate=!0;const l0=Fe.distanceToTriangle(ke,Gt,Xt);if(l0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=l0,wt=n0,Wt=Yt),l0<le)return!0}}}});{const Ft=getTriCount$1(e);for(let Ht=0,Kt=Ft;Ht<Kt;Ht++){setTriangle(ke,3*Ht,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let Yt=It,jt=It+Nt;Yt<jt;Yt++){setTriangle(Fe,3*Yt,Re,Ce),Fe.needsUpdate=!0;const n0=Fe.distanceToTriangle(ke,Gt,Xt);if(n0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=n0,wt=Yt,Wt=Ht),n0<le)return!0}}}}}),ExtendedTrianglePool.releasePrimitive(Fe),ExtendedTrianglePool.releasePrimitive(ke),Zt===1/0?null:(o.point?o.point.copy(Vt):o.point=Vt.clone(),o.distance=Zt,o.faceIndex=wt,V&&(V.point?V.point.copy(xt):V.point=xt.clone(),V.point.applyMatrix4(tempMatrix$1),Vt.applyMatrix4(tempMatrix$1),V.distance=Vt.sub(V.point).length(),V.faceIndex=Wt),o)}function refit_indirect(v,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=v.geometry,o=r.index?r.index.array:null,V=r.attributes.position;let le,fe,Le,Ce,Re=0;const Pe=v._roots;for(let Fe=0,ke=Pe.length;Fe<ke;Fe++)le=Pe[Fe],fe=new Uint32Array(le),Le=new Uint16Array(le),Ce=new Float32Array(le),ze(0,Re),Re+=le.byteLength;function ze(Fe,ke,Gt=!1){const Vt=Fe*2;if(Le[Vt+15]===IS_LEAFNODE_FLAG){const xt=fe[Fe+6],Zt=Le[Vt+14];let wt=1/0,Wt=1/0,It=1/0,Nt=-1/0,Ft=-1/0,Ht=-1/0;for(let Kt=xt,Yt=xt+Zt;Kt<Yt;Kt++){const jt=3*v.resolveTriangleIndex(Kt);for(let n0=0;n0<3;n0++){let a0=jt+n0;a0=o?o[a0]:a0;const l0=V.getX(a0),s0=V.getY(a0),$t=V.getZ(a0);l0<wt&&(wt=l0),l0>Nt&&(Nt=l0),s0<Wt&&(Wt=s0),s0>Ft&&(Ft=s0),$t<It&&(It=$t),$t>Ht&&(Ht=$t)}}return Ce[Fe+0]!==wt||Ce[Fe+1]!==Wt||Ce[Fe+2]!==It||Ce[Fe+3]!==Nt||Ce[Fe+4]!==Ft||Ce[Fe+5]!==Ht?(Ce[Fe+0]=wt,Ce[Fe+1]=Wt,Ce[Fe+2]=It,Ce[Fe+3]=Nt,Ce[Fe+4]=Ft,Ce[Fe+5]=Ht,!0):!1}else{const xt=Fe+8,Zt=fe[Fe+6],wt=xt+ke,Wt=Zt+ke;let It=Gt,Nt=!1,Ft=!1;e?It||(Nt=e.has(wt),Ft=e.has(Wt),It=!Nt&&!Ft):(Nt=!0,Ft=!0);const Ht=It||Nt,Kt=It||Ft;let Yt=!1;Ht&&(Yt=ze(xt,ke,It));let jt=!1;Kt&&(jt=ze(Zt,ke,It));const n0=Yt||jt;if(n0)for(let a0=0;a0<3;a0++){const l0=xt+a0,s0=Zt+a0,$t=Ce[l0],qt=Ce[l0+3],e0=Ce[s0],o0=Ce[s0+3];Ce[Fe+a0]=$t<e0?$t:e0,Ce[Fe+a0+3]=qt>o0?qt:o0}return n0}}}function raycast_indirect(v,e,r,o,V,le,fe){BufferStack.setBuffer(v._roots[e]),_raycast(0,v,r,o,V,le,fe),BufferStack.clearBuffer()}function _raycast(v,e,r,o,V,le,fe){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack,Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);intersectTris_indirect(e,r,o,Fe,ke,V,le,fe)}else{const Fe=LEFT_NODE(v);intersectRay(Fe,Le,o,le,fe)&&_raycast(Fe,e,r,o,V,le,fe);const ke=RIGHT_NODE(v,Re);intersectRay(ke,Le,o,le,fe)&&_raycast(ke,e,r,o,V,le,fe)}}const _xyzFields=["x","y","z"];function raycastFirst_indirect(v,e,r,o,V,le){BufferStack.setBuffer(v._roots[e]);const fe=_raycastFirst(0,v,r,o,V,le);return BufferStack.clearBuffer(),fe}function _raycastFirst(v,e,r,o,V,le){const{float32Array:fe,uint16Array:Le,uint32Array:Ce}=BufferStack;let Re=v*2;if(IS_LEAF(Re,Le)){const ze=OFFSET(v,Ce),Fe=COUNT(Re,Le);return intersectClosestTri_indirect(e,r,o,ze,Fe,V,le)}else{const ze=SPLIT_AXIS(v,Ce),Fe=_xyzFields[ze],Gt=o.direction[Fe]>=0;let Vt,Xt;Gt?(Vt=LEFT_NODE(v),Xt=RIGHT_NODE(v,Ce)):(Vt=RIGHT_NODE(v,Ce),Xt=LEFT_NODE(v));const Zt=intersectRay(Vt,fe,o,V,le)?_raycastFirst(Vt,e,r,o,V,le):null;if(Zt){const It=Zt.point[Fe];if(Gt?It<=fe[Xt+ze]:It>=fe[Xt+ze+3])return Zt}const Wt=intersectRay(Xt,fe,o,V,le)?_raycastFirst(Xt,e,r,o,V,le):null;return Zt&&Wt?Zt.distance<=Wt.distance?Zt:Wt:Zt||Wt||null}}const boundingBox=new Box3,triangle=new ExtendedTriangle,triangle2=new ExtendedTriangle,invertedMat=new Matrix4,obb$2=new OrientedBox,obb2$1=new OrientedBox;function intersectsGeometry_indirect(v,e,r,o){BufferStack.setBuffer(v._roots[e]);const V=_intersectsGeometry(0,v,r,o);return BufferStack.clearBuffer(),V}function _intersectsGeometry(v,e,r,o,V=null){const{float32Array:le,uint16Array:fe,uint32Array:Le}=BufferStack;let Ce=v*2;if(V===null&&(r.boundingBox||r.computeBoundingBox(),obb$2.set(r.boundingBox.min,r.boundingBox.max,o),V=obb$2),IS_LEAF(Ce,fe)){const Pe=e.geometry,ze=Pe.index,Fe=Pe.attributes.position,ke=r.index,Gt=r.attributes.position,Vt=OFFSET(v,Le),Xt=COUNT(Ce,fe);if(invertedMat.copy(o).invert(),r.boundsTree)return arrayToBox(v,le,obb2$1),obb2$1.matrix.copy(invertedMat),obb2$1.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:Zt=>obb2$1.intersectsBox(Zt),intersectsTriangle:Zt=>{Zt.a.applyMatrix4(o),Zt.b.applyMatrix4(o),Zt.c.applyMatrix4(o),Zt.needsUpdate=!0;for(let wt=Vt,Wt=Xt+Vt;wt<Wt;wt++)if(setTriangle(triangle2,3*e.resolveTriangleIndex(wt),ze,Fe),triangle2.needsUpdate=!0,Zt.intersectsTriangle(triangle2))return!0;return!1}});for(let xt=Vt,Zt=Xt+Vt;xt<Zt;xt++){const wt=e.resolveTriangleIndex(xt);setTriangle(triangle,3*wt,ze,Fe),triangle.a.applyMatrix4(invertedMat),triangle.b.applyMatrix4(invertedMat),triangle.c.applyMatrix4(invertedMat),triangle.needsUpdate=!0;for(let Wt=0,It=ke.count;Wt<It;Wt+=3)if(setTriangle(triangle2,Wt,ke,Gt),triangle2.needsUpdate=!0,triangle.intersectsTriangle(triangle2))return!0}}else{const Pe=v+8,ze=Le[v+6];return arrayToBox(Pe,le,boundingBox),!!(V.intersectsBox(boundingBox)&&_intersectsGeometry(Pe,e,r,o,V)||(arrayToBox(ze,le,boundingBox),V.intersectsBox(boundingBox)&&_intersectsGeometry(ze,e,r,o,V)))}}const tempMatrix=new Matrix4,obb$1=new OrientedBox,obb2=new OrientedBox,temp1=new Vector3,temp2=new Vector3,temp3=new Vector3,temp4=new Vector3;function closestPointToGeometry_indirect(v,e,r,o={},V={},le=0,fe=1/0){e.boundingBox||e.computeBoundingBox(),obb$1.set(e.boundingBox.min,e.boundingBox.max,r),obb$1.needsUpdate=!0;const Le=v.geometry,Ce=Le.attributes.position,Re=Le.index,Pe=e.attributes.position,ze=e.index,Fe=ExtendedTrianglePool.getPrimitive(),ke=ExtendedTrianglePool.getPrimitive();let Gt=temp1,Vt=temp2,Xt=null,xt=null;V&&(Xt=temp3,xt=temp4);let Zt=1/0,wt=null,Wt=null;return tempMatrix.copy(r).invert(),obb2.matrix.copy(tempMatrix),v.shapecast({boundsTraverseOrder:It=>obb$1.distanceToBox(It),intersectsBounds:(It,Nt,Ft)=>Ft<Zt&&Ft<fe?(Nt&&(obb2.min.copy(It.min),obb2.max.copy(It.max),obb2.needsUpdate=!0),!0):!1,intersectsRange:(It,Nt)=>{if(e.boundsTree){const Ft=e.boundsTree;return Ft.shapecast({boundsTraverseOrder:Ht=>obb2.distanceToBox(Ht),intersectsBounds:(Ht,Kt,Yt)=>Yt<Zt&&Yt<fe,intersectsRange:(Ht,Kt)=>{for(let Yt=Ht,jt=Ht+Kt;Yt<jt;Yt++){const n0=Ft.resolveTriangleIndex(Yt);setTriangle(ke,3*n0,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let a0=It,l0=It+Nt;a0<l0;a0++){const s0=v.resolveTriangleIndex(a0);setTriangle(Fe,3*s0,Re,Ce),Fe.needsUpdate=!0;const $t=Fe.distanceToTriangle(ke,Gt,Xt);if($t<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=$t,wt=a0,Wt=Yt),$t<le)return!0}}}})}else{const Ft=getTriCount$1(e);for(let Ht=0,Kt=Ft;Ht<Kt;Ht++){setTriangle(ke,3*Ht,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let Yt=It,jt=It+Nt;Yt<jt;Yt++){const n0=v.resolveTriangleIndex(Yt);setTriangle(Fe,3*n0,Re,Ce),Fe.needsUpdate=!0;const a0=Fe.distanceToTriangle(ke,Gt,Xt);if(a0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=a0,wt=Yt,Wt=Ht),a0<le)return!0}}}}}),ExtendedTrianglePool.releasePrimitive(Fe),ExtendedTrianglePool.releasePrimitive(ke),Zt===1/0?null:(o.point?o.point.copy(Vt):o.point=Vt.clone(),o.distance=Zt,o.faceIndex=wt,V&&(V.point?V.point.copy(xt):V.point=xt.clone(),V.point.applyMatrix4(tempMatrix),Vt.applyMatrix4(tempMatrix),V.distance=Vt.sub(V.point).length(),V.faceIndex=Wt),o)}function isSharedArrayBufferSupported(){return typeof SharedArrayBuffer!="undefined"}const _bufferStack1=new BufferStack.constructor,_bufferStack2=new BufferStack.constructor,_boxPool=new PrimitivePool(()=>new Box3),_leftBox1=new Box3,_rightBox1=new Box3,_leftBox2=new Box3,_rightBox2=new Box3;let _active=!1;function bvhcast(v,e,r,o){if(_active)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");_active=!0;const V=v._roots,le=e._roots;let fe,Le=0,Ce=0;const Re=new Matrix4().copy(r).invert();for(let Pe=0,ze=V.length;Pe<ze;Pe++){_bufferStack1.setBuffer(V[Pe]),Ce=0;const Fe=_boxPool.getPrimitive();arrayToBox(0,_bufferStack1.float32Array,Fe),Fe.applyMatrix4(Re);for(let ke=0,Gt=le.length;ke<Gt&&(_bufferStack2.setBuffer(le[ke]),fe=_traverse(0,0,r,Re,o,Le,Ce,0,0,Fe),_bufferStack2.clearBuffer(),Ce+=le[ke].length,!fe);ke++);if(_boxPool.releasePrimitive(Fe),_bufferStack1.clearBuffer(),Le+=V[Pe].length,fe)break}return _active=!1,fe}function _traverse(v,e,r,o,V,le=0,fe=0,Le=0,Ce=0,Re=null,Pe=!1){let ze,Fe;Pe?(ze=_bufferStack2,Fe=_bufferStack1):(ze=_bufferStack1,Fe=_bufferStack2);const ke=ze.float32Array,Gt=ze.uint32Array,Vt=ze.uint16Array,Xt=Fe.float32Array,xt=Fe.uint32Array,Zt=Fe.uint16Array,wt=v*2,Wt=e*2,It=IS_LEAF(wt,Vt),Nt=IS_LEAF(Wt,Zt);let Ft=!1;if(Nt&&It)Pe?Ft=V(OFFSET(e,xt),COUNT(e*2,Zt),OFFSET(v,Gt),COUNT(v*2,Vt),Ce,fe+e,Le,le+v):Ft=V(OFFSET(v,Gt),COUNT(v*2,Vt),OFFSET(e,xt),COUNT(e*2,Zt),Le,le+v,Ce,fe+e);else if(Nt){const Ht=_boxPool.getPrimitive();arrayToBox(e,Xt,Ht),Ht.applyMatrix4(r);const Kt=LEFT_NODE(v),Yt=RIGHT_NODE(v,Gt);arrayToBox(Kt,ke,_leftBox1),arrayToBox(Yt,ke,_rightBox1);const jt=Ht.intersectsBox(_leftBox1),n0=Ht.intersectsBox(_rightBox1);Ft=jt&&_traverse(e,Kt,o,r,V,fe,le,Ce,Le+1,Ht,!Pe)||n0&&_traverse(e,Yt,o,r,V,fe,le,Ce,Le+1,Ht,!Pe),_boxPool.releasePrimitive(Ht)}else{const Ht=LEFT_NODE(e),Kt=RIGHT_NODE(e,xt);arrayToBox(Ht,Xt,_leftBox2),arrayToBox(Kt,Xt,_rightBox2);const Yt=Re.intersectsBox(_leftBox2),jt=Re.intersectsBox(_rightBox2);if(Yt&&jt)Ft=_traverse(v,Ht,r,o,V,le,fe,Le,Ce+1,Re,Pe)||_traverse(v,Kt,r,o,V,le,fe,Le,Ce+1,Re,Pe);else if(Yt)if(It)Ft=_traverse(v,Ht,r,o,V,le,fe,Le,Ce+1,Re,Pe);else{const n0=_boxPool.getPrimitive();n0.copy(_leftBox2).applyMatrix4(r);const a0=LEFT_NODE(v),l0=RIGHT_NODE(v,Gt);arrayToBox(a0,ke,_leftBox1),arrayToBox(l0,ke,_rightBox1);const s0=n0.intersectsBox(_leftBox1),$t=n0.intersectsBox(_rightBox1);Ft=s0&&_traverse(Ht,a0,o,r,V,fe,le,Ce,Le+1,n0,!Pe)||$t&&_traverse(Ht,l0,o,r,V,fe,le,Ce,Le+1,n0,!Pe),_boxPool.releasePrimitive(n0)}else if(jt)if(It)Ft=_traverse(v,Kt,r,o,V,le,fe,Le,Ce+1,Re,Pe);else{const n0=_boxPool.getPrimitive();n0.copy(_rightBox2).applyMatrix4(r);const a0=LEFT_NODE(v),l0=RIGHT_NODE(v,Gt);arrayToBox(a0,ke,_leftBox1),arrayToBox(l0,ke,_rightBox1);const s0=n0.intersectsBox(_leftBox1),$t=n0.intersectsBox(_rightBox1);Ft=s0&&_traverse(Kt,a0,o,r,V,fe,le,Ce,Le+1,n0,!Pe)||$t&&_traverse(Kt,l0,o,r,V,fe,le,Ce,Le+1,n0,!Pe),_boxPool.releasePrimitive(n0)}}return Ft}const obb=new OrientedBox,tempBox=new Box3,DEFAULT_OPTIONS={strategy:CENTER,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,verbose:!0,range:null};class MeshBVH{static serialize(e,r={}){r=gi({cloneBuffers:!0},r);const o=e.geometry,V=e._roots,le=e._indirectBuffer,fe=o.getIndex();let Le;return r.cloneBuffers?Le={roots:V.map(Ce=>Ce.slice()),index:fe?fe.array.slice():null,indirectBuffer:le?le.slice():null}:Le={roots:V,index:fe?fe.array:null,indirectBuffer:le},Le}static deserialize(e,r,o={}){o=gi({setIndex:!0,indirect:!!e.indirectBuffer},o);const{index:V,roots:le,indirectBuffer:fe}=e,Le=new MeshBVH(r,qi(gi({},o),{[SKIP_GENERATION]:!0}));if(Le._roots=le,Le._indirectBuffer=fe||null,o.setIndex){const Ce=r.getIndex();if(Ce===null){const Re=new BufferAttribute(e.index,1,!1);r.setIndex(Re)}else Ce.array!==V&&(Ce.array.set(V),Ce.needsUpdate=!0)}return Le}get indirect(){return!!this._indirectBuffer}constructor(e,r={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(r=Object.assign(qi(gi({},DEFAULT_OPTIONS),{[SKIP_GENERATION]:!1}),r),r.useSharedArrayBuffer&&!isSharedArrayBufferSupported())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,r[SKIP_GENERATION]||(buildPackedTree(this,r),!e.boundingBox&&r.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new Box3))),this.resolveTriangleIndex=r.indirect?o=>this._indirectBuffer[o]:o=>o}refit(e=null){return(this.indirect?refit_indirect:refit)(this,e)}traverse(e,r=0){const o=this._roots[r],V=new Uint32Array(o),le=new Uint16Array(o);fe(0);function fe(Le,Ce=0){const Re=Le*2,Pe=le[Re+15]===IS_LEAFNODE_FLAG;if(Pe){const ze=V[Le+6],Fe=le[Re+14];e(Ce,Pe,new Float32Array(o,Le*4,6),ze,Fe)}else{const ze=Le+BYTES_PER_NODE/4,Fe=V[Le+6],ke=V[Le+7];e(Ce,Pe,new Float32Array(o,Le*4,6),ke)||(fe(ze,Ce+1),fe(Fe,Ce+1))}}}raycast(e,r=FrontSide,o=0,V=1/0){const le=this._roots,fe=this.geometry,Le=[],Ce=r.isMaterial,Re=Array.isArray(r),Pe=fe.groups,ze=Ce?r.side:r,Fe=this.indirect?raycast_indirect:raycast;for(let ke=0,Gt=le.length;ke<Gt;ke++){const Vt=Re?r[Pe[ke].materialIndex].side:ze,Xt=Le.length;if(Fe(this,ke,Vt,e,Le,o,V),Re){const xt=Pe[ke].materialIndex;for(let Zt=Xt,wt=Le.length;Zt<wt;Zt++)Le[Zt].face.materialIndex=xt}}return Le}raycastFirst(e,r=FrontSide,o=0,V=1/0){const le=this._roots,fe=this.geometry,Le=r.isMaterial,Ce=Array.isArray(r);let Re=null;const Pe=fe.groups,ze=Le?r.side:r,Fe=this.indirect?raycastFirst_indirect:raycastFirst;for(let ke=0,Gt=le.length;ke<Gt;ke++){const Vt=Ce?r[Pe[ke].materialIndex].side:ze,Xt=Fe(this,ke,Vt,e,o,V);Xt!=null&&(Re==null||Xt.distance<Re.distance)&&(Re=Xt,Ce&&(Xt.face.materialIndex=Pe[ke].materialIndex))}return Re}intersectsGeometry(e,r){let o=!1;const V=this._roots,le=this.indirect?intersectsGeometry_indirect:intersectsGeometry;for(let fe=0,Le=V.length;fe<Le&&(o=le(this,fe,e,r),!o);fe++);return o}shapecast(e){const r=ExtendedTrianglePool.getPrimitive(),o=this.indirect?iterateOverTriangles_indirect:iterateOverTriangles;let{boundsTraverseOrder:V,intersectsBounds:le,intersectsRange:fe,intersectsTriangle:Le}=e;if(fe&&Le){const ze=fe;fe=(Fe,ke,Gt,Vt,Xt)=>ze(Fe,ke,Gt,Vt,Xt)?!0:o(Fe,ke,this,Le,Gt,Vt,r)}else fe||(Le?fe=(ze,Fe,ke,Gt)=>o(ze,Fe,this,Le,ke,Gt,r):fe=(ze,Fe,ke)=>ke);let Ce=!1,Re=0;const Pe=this._roots;for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];if(Ce=shapecast(this,ze,le,fe,V,Re),Ce)break;Re+=ke.byteLength}return ExtendedTrianglePool.releasePrimitive(r),Ce}bvhcast(e,r,o){let{intersectsRanges:V,intersectsTriangles:le}=o;const fe=ExtendedTrianglePool.getPrimitive(),Le=this.geometry.index,Ce=this.geometry.attributes.position,Re=this.indirect?Gt=>{const Vt=this.resolveTriangleIndex(Gt);setTriangle(fe,Vt*3,Le,Ce)}:Gt=>{setTriangle(fe,Gt*3,Le,Ce)},Pe=ExtendedTrianglePool.getPrimitive(),ze=e.geometry.index,Fe=e.geometry.attributes.position,ke=e.indirect?Gt=>{const Vt=e.resolveTriangleIndex(Gt);setTriangle(Pe,Vt*3,ze,Fe)}:Gt=>{setTriangle(Pe,Gt*3,ze,Fe)};if(le){const Gt=(Vt,Xt,xt,Zt,wt,Wt,It,Nt)=>{for(let Ft=xt,Ht=xt+Zt;Ft<Ht;Ft++){ke(Ft),Pe.a.applyMatrix4(r),Pe.b.applyMatrix4(r),Pe.c.applyMatrix4(r),Pe.needsUpdate=!0;for(let Kt=Vt,Yt=Vt+Xt;Kt<Yt;Kt++)if(Re(Kt),fe.needsUpdate=!0,le(fe,Pe,Kt,Ft,wt,Wt,It,Nt))return!0}return!1};if(V){const Vt=V;V=function(Xt,xt,Zt,wt,Wt,It,Nt,Ft){return Vt(Xt,xt,Zt,wt,Wt,It,Nt,Ft)?!0:Gt(Xt,xt,Zt,wt,Wt,It,Nt,Ft)}}else V=Gt}return bvhcast(this,e,r,V)}intersectsBox(e,r){return obb.set(e.min,e.max,r),obb.needsUpdate=!0,this.shapecast({intersectsBounds:o=>obb.intersectsBox(o),intersectsTriangle:o=>obb.intersectsTriangle(o)})}intersectsSphere(e){return this.shapecast({intersectsBounds:r=>e.intersectsBox(r),intersectsTriangle:r=>r.intersectsSphere(e)})}closestPointToGeometry(e,r,o={},V={},le=0,fe=1/0){return(this.indirect?closestPointToGeometry_indirect:closestPointToGeometry)(this,e,r,o,V,le,fe)}closestPointToPoint(e,r={},o=0,V=1/0){return closestPointToPoint(this,e,r,o,V)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(o=>{arrayToBox(0,new Float32Array(o),tempBox),e.union(tempBox)}),e}}const HASH_WIDTH=1e-6,HASH_HALF_WIDTH=HASH_WIDTH*.5,HASH_MULTIPLIER=Math.pow(10,-Math.log10(HASH_WIDTH)),HASH_ADDITION=HASH_HALF_WIDTH*HASH_MULTIPLIER;function hashNumber(v){return~~(v*HASH_MULTIPLIER+HASH_ADDITION)}function hashVertex2(v){return`${hashNumber(v.x)},${hashNumber(v.y)}`}function hashVertex3(v){return`${hashNumber(v.x)},${hashNumber(v.y)},${hashNumber(v.z)}`}function hashVertex4(v){return`${hashNumber(v.x)},${hashNumber(v.y)},${hashNumber(v.z)},${hashNumber(v.w)}`}function toNormalizedRay(v,e,r){r.direction.subVectors(e,v).normalize();const o=v.dot(r.direction);return r.origin.copy(v).addScaledVector(r.direction,-o),r}function areSharedArrayBuffersSupported(){return typeof SharedArrayBuffer!="undefined"}function convertToSharedArrayBuffer(v){if(v.buffer instanceof SharedArrayBuffer)return v;const e=v.constructor,r=v.buffer,o=new SharedArrayBuffer(r.byteLength),V=new Uint8Array(r);return new Uint8Array(o).set(V,0),new e(o)}function getIndexArray(v,e=ArrayBuffer){return v>65535?new Uint32Array(new e(4*v)):new Uint16Array(new e(2*v))}function ensureIndex(v,e){if(!v.index){const r=v.attributes.position.count,o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=getIndexArray(r,o);v.setIndex(new BufferAttribute(V,1));for(let le=0;le<r;le++)V[le]=le}}function getVertexCount(v){return v.index?v.index.count:v.attributes.position.count}function getTriCount(v){return getVertexCount(v)/3}const DEGENERATE_EPSILON=1e-8,_tempVec=new Vector3;function toTriIndex(v){return~~(v/3)}function toEdgeIndex(v){return v%3}function sortEdgeFunc(v,e){return v.start-e.start}function getProjectedDistance(v,e){return _tempVec.subVectors(e,v.origin).dot(v.direction)}function matchEdges(v,e,r,o=DEGENERATE_EPSILON){v.sort(sortEdgeFunc),e.sort(sortEdgeFunc);for(let Le=0;Le<v.length;Le++){const Ce=v[Le];for(let Re=0;Re<e.length;Re++){const Pe=e[Re];if(!(Pe.start>Ce.end)){if(Ce.end<Pe.start||Pe.end<Ce.start)continue;if(Ce.start<=Pe.start&&Ce.end>=Pe.end)le(Pe.end,Ce.end)||v.splice(Le+1,0,{start:Pe.end,end:Ce.end,index:Ce.index}),Ce.end=Pe.start,Pe.start=0,Pe.end=0;else if(Ce.start>=Pe.start&&Ce.end<=Pe.end)le(Ce.end,Pe.end)||e.splice(Re+1,0,{start:Ce.end,end:Pe.end,index:Pe.index}),Pe.end=Ce.start,Ce.start=0,Ce.end=0;else if(Ce.start<=Pe.start&&Ce.end<=Pe.end){const ze=Ce.end;Ce.end=Pe.start,Pe.start=ze}else if(Ce.start>=Pe.start&&Ce.end>=Pe.end){const ze=Pe.end;Pe.end=Ce.start,Ce.start=ze}else throw new Error}if(r.has(Ce.index)||r.set(Ce.index,[]),r.has(Pe.index)||r.set(Pe.index,[]),r.get(Ce.index).push(Pe.index),r.get(Pe.index).push(Ce.index),fe(Pe)&&(e.splice(Re,1),Re--),fe(Ce)){v.splice(Le,1),Le--;break}}}V(v),V(e);function V(Le){for(let Ce=0;Ce<Le.length;Ce++)fe(Le[Ce])&&(Le.splice(Ce,1),Ce--)}function le(Le,Ce){return Math.abs(Ce-Le)<o}function fe(Le){return Math.abs(Le.end-Le.start)<o}}const DIST_EPSILON=1e-5,ANGLE_EPSILON=1e-4;class RaySet{constructor(){this._rays=[]}addRay(e){this._rays.push(e)}findClosestRay(e){const r=this._rays,o=e.clone();o.direction.multiplyScalar(-1);let V=1/0,le=null;for(let Ce=0,Re=r.length;Ce<Re;Ce++){const Pe=r[Ce];if(fe(Pe,e)&&fe(Pe,o))continue;const ze=Le(Pe,e),Fe=Le(Pe,o),ke=Math.min(ze,Fe);ke<V&&(V=ke,le=Pe)}return le;function fe(Ce,Re){const Pe=Ce.origin.distanceTo(Re.origin)>DIST_EPSILON;return Ce.direction.angleTo(Re.direction)>ANGLE_EPSILON||Pe}function Le(Ce,Re){const Pe=Ce.origin.distanceTo(Re.origin),ze=Ce.direction.angleTo(Re.direction);return Pe/DIST_EPSILON+ze/ANGLE_EPSILON}}}const _v0=new Vector3,_v1$1=new Vector3,_ray$2=new Ray;function computeDisjointEdges(v,e,r){const o=v.attributes,V=v.index,le=o.position,fe=new Map,Le=new Map,Ce=Array.from(e),Re=new RaySet;for(let Pe=0,ze=Ce.length;Pe<ze;Pe++){const Fe=Ce[Pe],ke=toTriIndex(Fe),Gt=toEdgeIndex(Fe);let Vt=3*ke+Gt,Xt=3*ke+(Gt+1)%3;V&&(Vt=V.getX(Vt),Xt=V.getX(Xt)),_v0.fromBufferAttribute(le,Vt),_v1$1.fromBufferAttribute(le,Xt),toNormalizedRay(_v0,_v1$1,_ray$2);let xt,Zt=Re.findClosestRay(_ray$2);Zt===null&&(Zt=_ray$2.clone(),Re.addRay(Zt)),Le.has(Zt)||Le.set(Zt,{forward:[],reverse:[],ray:Zt}),xt=Le.get(Zt);let wt=getProjectedDistance(Zt,_v0),Wt=getProjectedDistance(Zt,_v1$1);wt>Wt&&([wt,Wt]=[Wt,wt]),_ray$2.direction.dot(Zt.direction)<0?xt.reverse.push({start:wt,end:Wt,index:Fe}):xt.forward.push({start:wt,end:Wt,index:Fe})}return Le.forEach(({forward:Pe,reverse:ze},Fe)=>{matchEdges(Pe,ze,fe,r),Pe.length===0&&ze.length===0&&Le.delete(Fe)}),{disjointConnectivityMap:fe,fragmentMap:Le}}const _vec2=new Vector2,_vec3$1=new Vector3,_vec4=new Vector4,_hashes=["","",""];class HalfEdgeMap{constructor(e=null){this.data=null,this.disjointConnections=null,this.unmatchedDisjointEdges=null,this.unmatchedEdges=-1,this.matchedEdges=-1,this.useDrawRange=!0,this.useAllAttributes=!1,this.matchDisjointEdges=!1,this.degenerateEpsilon=1e-8,e&&this.updateFrom(e)}getSiblingTriangleIndex(e,r){const o=this.data[e*3+r];return o===-1?-1:~~(o/3)}getSiblingEdgeIndex(e,r){const o=this.data[e*3+r];return o===-1?-1:o%3}getDisjointSiblingTriangleIndices(e,r){const o=e*3+r,V=this.disjointConnections.get(o);return V?V.map(le=>~~(le/3)):[]}getDisjointSiblingEdgeIndices(e,r){const o=e*3+r,V=this.disjointConnections.get(o);return V?V.map(le=>le%3):[]}isFullyConnected(){return this.unmatchedEdges===0}updateFrom(e){const{useAllAttributes:r,useDrawRange:o,matchDisjointEdges:V,degenerateEpsilon:le}=this,fe=r?wt:Zt,Le=new Map,{attributes:Ce}=e,Re=r?Object.keys(Ce):null,Pe=e.index,ze=Ce.position;let Fe=getTriCount(e);const ke=Fe;let Gt=0;o&&(Gt=e.drawRange.start,e.drawRange.count!==1/0&&(Fe=~~(e.drawRange.count/3)));let Vt=this.data;(!Vt||Vt.length<3*ke)&&(Vt=new Int32Array(3*ke)),Vt.fill(-1);let Xt=0,xt=new Set;for(let Wt=Gt,It=Fe*3+Gt;Wt<It;Wt+=3){const Nt=Wt;for(let Ft=0;Ft<3;Ft++){let Ht=Nt+Ft;Pe&&(Ht=Pe.getX(Ht)),_hashes[Ft]=fe(Ht)}for(let Ft=0;Ft<3;Ft++){const Ht=(Ft+1)%3,Kt=_hashes[Ft],Yt=_hashes[Ht],jt=`${Yt}_${Kt}`;if(Le.has(jt)){const n0=Nt+Ft,a0=Le.get(jt);Vt[n0]=a0,Vt[a0]=n0,Le.delete(jt),Xt+=2,xt.delete(a0)}else{const n0=`${Kt}_${Yt}`,a0=Nt+Ft;Le.set(n0,a0),xt.add(a0)}}}if(V){const{fragmentMap:Wt,disjointConnectivityMap:It}=computeDisjointEdges(e,xt,le);xt.clear(),Wt.forEach(({forward:Nt,reverse:Ft})=>{Nt.forEach(({index:Ht})=>xt.add(Ht)),Ft.forEach(({index:Ht})=>xt.add(Ht))}),this.unmatchedDisjointEdges=Wt,this.disjointConnections=It,Xt=Fe*3-xt.size}this.matchedEdges=Xt,this.unmatchedEdges=xt.size,this.data=Vt;function Zt(Wt){return _vec3$1.fromBufferAttribute(ze,Wt),hashVertex3(_vec3$1)}function wt(Wt){let It="";for(let Nt=0,Ft=Re.length;Nt<Ft;Nt++){const Ht=Ce[Re[Nt]];let Kt;switch(Ht.itemSize){case 1:Kt=hashNumber(Ht.getX(Wt));break;case 2:Kt=hashVertex2(_vec2.fromBufferAttribute(Ht,Wt));break;case 3:Kt=hashVertex3(_vec3$1.fromBufferAttribute(Ht,Wt));break;case 4:Kt=hashVertex4(_vec4.fromBufferAttribute(Ht,Wt));break}It!==""&&(It+="|"),It+=Kt}return It}}}class Brush extends Mesh{constructor(...e){super(...e),this.isBrush=!0,this._previousMatrix=new Matrix4,this._previousMatrix.elements.fill(0)}markUpdated(){this._previousMatrix.copy(this.matrix)}isDirty(){const{matrix:e,_previousMatrix:r}=this,o=e.elements,V=r.elements;for(let le=0;le<16;le++)if(o[le]!==V[le])return!0;return!1}prepareGeometry(){const e=this.geometry,r=e.attributes,o=areSharedArrayBuffersSupported();if(o)for(const V in r){const le=r[V];if(le.isInterleavedBufferAttribute)throw new Error("Brush: InterleavedBufferAttributes are not supported.");le.array=convertToSharedArrayBuffer(le.array)}if(e.boundsTree||(ensureIndex(e,{useSharedArrayBuffer:o}),e.boundsTree=new MeshBVH(e,{maxLeafTris:3,indirect:!0,useSharedArrayBuffer:o})),e.halfEdges||(e.halfEdges=new HalfEdgeMap(e)),!e.groupIndices){const V=getTriCount(e),le=new Uint16Array(V),fe=e.groups;for(let Le=0,Ce=fe.length;Le<Ce;Le++){const{start:Re,count:Pe}=fe[Le];for(let ze=Re/3,Fe=(Re+Pe)/3;ze<Fe;ze++)le[ze]=Le}e.groupIndices=le}}disposeCacheData(){const{geometry:e}=this;e.halfEdges=null,e.boundsTree=null,e.groupIndices=null}}const EPSILON$1=1e-14,_AB=new Vector3,_AC=new Vector3,_CB=new Vector3;function isTriDegenerate(v,e=EPSILON$1){_AB.subVectors(v.b,v.a),_AC.subVectors(v.c,v.a),_CB.subVectors(v.b,v.c);const r=_AB.angleTo(_AC),o=_AB.angleTo(_CB),V=Math.PI-r-o;return Math.abs(r)<e||Math.abs(o)<e||Math.abs(V)<e||v.a.distanceToSquared(v.b)<e||v.a.distanceToSquared(v.c)<e||v.b.distanceToSquared(v.c)<e}const EPSILON=1e-10,COPLANAR_EPSILON=1e-10,PARALLEL_EPSILON=1e-10,_edge$1=new Line3,_foundEdge=new Line3,_vec=new Vector3,_triangleNormal=new Vector3,_planeNormal=new Vector3,_plane=new Plane$1,_splittingTriangle=new ExtendedTriangle;class TrianglePool{constructor(){this._pool=[],this._index=0}getTriangle(){return this._index>=this._pool.length&&this._pool.push(new Triangle),this._pool[this._index++]}clear(){this._index=0}reset(){this._pool.length=0,this._index=0}}class TriangleSplitter{constructor(){this.trianglePool=new TrianglePool,this.triangles=[],this.normal=new Vector3,this.coplanarTriangleUsed=!1}initialize(e){this.reset();const{triangles:r,trianglePool:o,normal:V}=this;if(Array.isArray(e))for(let le=0,fe=e.length;le<fe;le++){const Le=e[le];if(le===0)Le.getNormal(V);else if(Math.abs(1-Le.getNormal(_vec).dot(V))>EPSILON)throw new Error("Triangle Splitter: Cannot initialize with triangles that have different normals.");const Ce=o.getTriangle();Ce.copy(Le),r.push(Ce)}else{e.getNormal(V);const le=o.getTriangle();le.copy(e),r.push(le)}}splitByTriangle(e){const{normal:r,triangles:o}=this;if(e.getNormal(_triangleNormal).normalize(),Math.abs(1-Math.abs(_triangleNormal.dot(r)))<PARALLEL_EPSILON){this.coplanarTriangleUsed=!0;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le];Le.coplanarCount=0}const V=[e.a,e.b,e.c];for(let le=0;le<3;le++){const fe=(le+1)%3,Le=V[le],Ce=V[fe];_vec.subVectors(Ce,Le).normalize(),_planeNormal.crossVectors(_triangleNormal,_vec),_plane.setFromNormalAndCoplanarPoint(_planeNormal,Le),this.splitByPlane(_plane,e)}}else e.getPlane(_plane),this.splitByPlane(_plane,e)}splitByPlane(e,r){const{triangles:o,trianglePool:V}=this;_splittingTriangle.copy(r),_splittingTriangle.needsUpdate=!0;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le];if(!_splittingTriangle.intersectsTriangle(Le,_edge$1,!0))continue;const{a:Ce,b:Re,c:Pe}=Le;let ze=0,Fe=-1,ke=!1,Gt=[],Vt=[];const Xt=[Ce,Re,Pe];for(let xt=0;xt<3;xt++){const Zt=(xt+1)%3;_edge$1.start.copy(Xt[xt]),_edge$1.end.copy(Xt[Zt]);const wt=e.distanceToPoint(_edge$1.start),Wt=e.distanceToPoint(_edge$1.end);if(Math.abs(wt)<COPLANAR_EPSILON&&Math.abs(Wt)<COPLANAR_EPSILON){ke=!0;break}if(wt>0?Gt.push(xt):Vt.push(xt),Math.abs(wt)<COPLANAR_EPSILON)continue;let It=!!e.intersectLine(_edge$1,_vec);!It&&Math.abs(Wt)<COPLANAR_EPSILON&&(_vec.copy(_edge$1.end),It=!0),It&&!(_vec.distanceTo(_edge$1.start)<EPSILON)&&(_vec.distanceTo(_edge$1.end)<EPSILON&&(Fe=xt),ze===0?_foundEdge.start.copy(_vec):_foundEdge.end.copy(_vec),ze++)}if(!ke&&ze===2&&_foundEdge.distance()>COPLANAR_EPSILON)if(Fe!==-1){Fe=(Fe+1)%3;let xt=0;xt===Fe&&(xt=(xt+1)%3);let Zt=xt+1;Zt===Fe&&(Zt=(Zt+1)%3);const wt=V.getTriangle();wt.a.copy(Xt[Zt]),wt.b.copy(_foundEdge.end),wt.c.copy(_foundEdge.start),isTriDegenerate(wt)||o.push(wt),Le.a.copy(Xt[xt]),Le.b.copy(_foundEdge.start),Le.c.copy(_foundEdge.end),isTriDegenerate(Le)&&(o.splice(le,1),le--,fe--)}else{const xt=Gt.length>=2?Vt[0]:Gt[0];if(xt===0){let Nt=_foundEdge.start;_foundEdge.start=_foundEdge.end,_foundEdge.end=Nt}const Zt=(xt+1)%3,wt=(xt+2)%3,Wt=V.getTriangle(),It=V.getTriangle();Xt[Zt].distanceToSquared(_foundEdge.start)<Xt[wt].distanceToSquared(_foundEdge.end)?(Wt.a.copy(Xt[Zt]),Wt.b.copy(_foundEdge.start),Wt.c.copy(_foundEdge.end),It.a.copy(Xt[Zt]),It.b.copy(Xt[wt]),It.c.copy(_foundEdge.start)):(Wt.a.copy(Xt[wt]),Wt.b.copy(_foundEdge.start),Wt.c.copy(_foundEdge.end),It.a.copy(Xt[Zt]),It.b.copy(Xt[wt]),It.c.copy(_foundEdge.end)),Le.a.copy(Xt[xt]),Le.b.copy(_foundEdge.end),Le.c.copy(_foundEdge.start),isTriDegenerate(Wt)||o.push(Wt),isTriDegenerate(It)||o.push(It),isTriDegenerate(Le)&&(o.splice(le,1),le--,fe--)}else ze===3&&console.warn("TriangleClipper: Coplanar clip not handled")}}reset(){this.triangles.length=0,this.trianglePool.clear(),this.coplanarTriangleUsed=!1}}function ceilToFourByteStride(v){return v=~~v,v+4-v%4}class TypeBackedArray{constructor(e,r=500){this.expansionFactor=1.5,this.type=e,this.length=0,this.array=null,this.setSize(r)}setType(e){if(this.length!==0)throw new Error("TypeBackedArray: Cannot change the type while there is used data in the buffer.");const r=this.array.buffer;this.array=new e(r),this.type=e}setSize(e){if(this.array&&e===this.array.length)return;const r=this.type,o=areSharedArrayBuffersSupported()?SharedArrayBuffer:ArrayBuffer,V=new r(new o(ceilToFourByteStride(e*r.BYTES_PER_ELEMENT)));this.array&&V.set(this.array,0),this.array=V}expand(){const{array:e,expansionFactor:r}=this;this.setSize(e.length*r)}push(...e){let{array:r,length:o}=this;o+e.length>r.length&&(this.expand(),r=this.array);for(let V=0,le=e.length;V<le;V++)r[o+V]=e[V];this.length+=e.length}clear(){this.length=0}}class TypedAttributeData{constructor(){this.groupAttributes=[{}],this.groupCount=0}getType(e){return this.groupAttributes[0][e].type}getItemSize(e){return this.groupAttributes[0][e].itemSize}getNormalized(e){return this.groupAttributes[0][e].normalized}getCount(e){if(this.groupCount<=e)return 0;const r=this.getGroupAttrArray("position",e);return r.length/r.itemSize}getTotalLength(e){const{groupCount:r,groupAttributes:o}=this;let V=0;for(let le=0;le<r;le++){const fe=o[le];V+=fe[e].length}return V}getGroupAttrSet(e=0){const{groupAttributes:r}=this;if(r[e])return this.groupCount=Math.max(this.groupCount,e+1),r[e];const o=r[0];for(this.groupCount=Math.max(this.groupCount,e+1);e>=r.length;){const V={};r.push(V);for(const le in o){const fe=o[le],Le=new TypeBackedArray(fe.type);Le.itemSize=fe.itemSize,Le.normalized=fe.normalized,V[le]=Le}}return r[e]}getGroupAttrArray(e,r=0){const{groupAttributes:o}=this;if(!o[0][e])throw new Error(`TypedAttributeData: Attribute with "${e}" has not been initialized`);return this.getGroupAttrSet(r)[e]}initializeArray(e,r,o,V){const{groupAttributes:le}=this,Le=le[0][e];if(Le){if(Le.type!==r)for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=le[Ce][e];Pe.setType(r),Pe.itemSize=o,Pe.normalized=V}}else for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=new TypeBackedArray(r);Pe.itemSize=o,Pe.normalized=V,le[Ce][e]=Pe}}clear(){this.groupCount=0;const{groupAttributes:e}=this;e.forEach(r=>{for(const o in r)r[o].clear()})}delete(e){this.groupAttributes.forEach(r=>{delete r[e]})}reset(){this.groupAttributes=[],this.groupCount=0}}class IntersectionMap{constructor(){this.intersectionSet={},this.ids=[]}add(e,r){const{intersectionSet:o,ids:V}=this;o[e]||(o[e]=[],V.push(e)),o[e].push(r)}}const ADDITION=0,SUBTRACTION=1,REVERSE_SUBTRACTION=2,INTERSECTION=3,DIFFERENCE=4,HOLLOW_SUBTRACTION=5,HOLLOW_INTERSECTION=6,_ray$1=new Ray,_matrix$1=new Matrix4,_tri$1=new Triangle,_vec3=new Vector3,_vec4a=new Vector4,_vec4b=new Vector4,_vec4c=new Vector4,_vec4_0=new Vector4,_vec4_1=new Vector4,_vec4_2=new Vector4,_edge=new Line3,_normal=new Vector3,JITTER_EPSILON=1e-8,OFFSET_EPSILON=1e-15,BACK_SIDE=-1,FRONT_SIDE=1,COPLANAR_OPPOSITE=-2,COPLANAR_ALIGNED=2,INVERT_TRI=0,ADD_TRI=1,SKIP_TRI=2,FLOATING_COPLANAR_EPSILON=1e-14;let _debugContext=null;function setDebugContext(v){_debugContext=v}function getHitSide(v,e){v.getMidpoint(_ray$1.origin),v.getNormal(_ray$1.direction);const r=e.raycastFirst(_ray$1,DoubleSide);return!!(r&&_ray$1.direction.dot(r.face.normal)>0)?BACK_SIDE:FRONT_SIDE}function getHitSideWithCoplanarCheck(v,e){function r(){return Math.random()-.5}v.getNormal(_normal),_ray$1.direction.copy(_normal),v.getMidpoint(_ray$1.origin);const o=3;let V=0,le=1/0;for(let fe=0;fe<o;fe++){_ray$1.direction.x+=r()*JITTER_EPSILON,_ray$1.direction.y+=r()*JITTER_EPSILON,_ray$1.direction.z+=r()*JITTER_EPSILON,_ray$1.direction.multiplyScalar(-1);const Le=e.raycastFirst(_ray$1,DoubleSide);if(!!(Le&&_ray$1.direction.dot(Le.face.normal)>0)&&V++,Le!==null&&(le=Math.min(le,Le.distance)),le<=OFFSET_EPSILON)return Le.face.normal.dot(_normal)>0?COPLANAR_ALIGNED:COPLANAR_OPPOSITE;if(V/o>.5||(fe-V+1)/o>.5)break}return V/o>.5?BACK_SIDE:FRONT_SIDE}function collectIntersectingTriangles(v,e){const r=new IntersectionMap,o=new IntersectionMap;return _matrix$1.copy(v.matrixWorld).invert().multiply(e.matrixWorld),v.geometry.boundsTree.bvhcast(e.geometry.boundsTree,_matrix$1,{intersectsTriangles(V,le,fe,Le){if(!isTriDegenerate(V)&&!isTriDegenerate(le)){let Ce=V.intersectsTriangle(le,_edge,!0);if(!Ce){const Re=V.plane,Pe=le.plane,ze=Re.normal,Fe=Pe.normal;ze.dot(Fe)===1&&Math.abs(Re.constant-Pe.constant)<FLOATING_COPLANAR_EPSILON&&(Ce=!0)}if(Ce){let Re=v.geometry.boundsTree.resolveTriangleIndex(fe),Pe=e.geometry.boundsTree.resolveTriangleIndex(Le);r.add(Re,Pe),o.add(Pe,Re),_debugContext&&(_debugContext.addEdge(_edge),_debugContext.addIntersectingTriangles(fe,V,Le,le))}}return!1}}),{aIntersections:r,bIntersections:o}}function appendAttributeFromTriangle(v,e,r,o,V,le,fe=!1){const Le=r.attributes,Ce=r.index,Re=v*3,Pe=Ce.getX(Re+0),ze=Ce.getX(Re+1),Fe=Ce.getX(Re+2);for(const ke in le){const Gt=Le[ke],Vt=le[ke];if(!(ke in Le))throw new Error(`CSG Operations: Attribute ${ke} not available on geometry.`);const Xt=Gt.itemSize;ke==="position"?(_tri$1.a.fromBufferAttribute(Gt,Pe).applyMatrix4(o),_tri$1.b.fromBufferAttribute(Gt,ze).applyMatrix4(o),_tri$1.c.fromBufferAttribute(Gt,Fe).applyMatrix4(o),pushBarycoordInterpolatedValues(_tri$1.a,_tri$1.b,_tri$1.c,e,3,Vt,fe)):ke==="normal"?(_tri$1.a.fromBufferAttribute(Gt,Pe).applyNormalMatrix(V),_tri$1.b.fromBufferAttribute(Gt,ze).applyNormalMatrix(V),_tri$1.c.fromBufferAttribute(Gt,Fe).applyNormalMatrix(V),fe&&(_tri$1.a.multiplyScalar(-1),_tri$1.b.multiplyScalar(-1),_tri$1.c.multiplyScalar(-1)),pushBarycoordInterpolatedValues(_tri$1.a,_tri$1.b,_tri$1.c,e,3,Vt,fe,!0)):(_vec4a.fromBufferAttribute(Gt,Pe),_vec4b.fromBufferAttribute(Gt,ze),_vec4c.fromBufferAttribute(Gt,Fe),pushBarycoordInterpolatedValues(_vec4a,_vec4b,_vec4c,e,Xt,Vt,fe))}}function appendAttributesFromIndices(v,e,r,o,V,le,fe,Le=!1){appendAttributeFromIndex(v,o,V,le,fe,Le),appendAttributeFromIndex(Le?r:e,o,V,le,fe,Le),appendAttributeFromIndex(Le?e:r,o,V,le,fe,Le)}function getOperationAction(v,e,r=!1){switch(v){case ADDITION:if(e===FRONT_SIDE||e===COPLANAR_ALIGNED&&!r)return ADD_TRI;break;case SUBTRACTION:if(r){if(e===BACK_SIDE)return INVERT_TRI}else if(e===FRONT_SIDE||e===COPLANAR_OPPOSITE)return ADD_TRI;break;case REVERSE_SUBTRACTION:if(r){if(e===FRONT_SIDE||e===COPLANAR_OPPOSITE)return ADD_TRI}else if(e===BACK_SIDE)return INVERT_TRI;break;case DIFFERENCE:if(e===BACK_SIDE)return INVERT_TRI;if(e===FRONT_SIDE)return ADD_TRI;break;case INTERSECTION:if(e===BACK_SIDE||e===COPLANAR_ALIGNED&&!r)return ADD_TRI;break;case HOLLOW_SUBTRACTION:if(!r&&(e===FRONT_SIDE||e===COPLANAR_OPPOSITE))return ADD_TRI;break;case HOLLOW_INTERSECTION:if(!r&&(e===BACK_SIDE||e===COPLANAR_ALIGNED))return ADD_TRI;break;default:throw new Error(`Unrecognized CSG operation enum "${v}".`)}return SKIP_TRI}function pushBarycoordInterpolatedValues(v,e,r,o,V,le,fe=!1,Le=!1){const Ce=Re=>{le.push(Re.x),V>1&&le.push(Re.y),V>2&&le.push(Re.z),V>3&&le.push(Re.w)};_vec4_0.set(0,0,0,0).addScaledVector(v,o.a.x).addScaledVector(e,o.a.y).addScaledVector(r,o.a.z),_vec4_1.set(0,0,0,0).addScaledVector(v,o.b.x).addScaledVector(e,o.b.y).addScaledVector(r,o.b.z),_vec4_2.set(0,0,0,0).addScaledVector(v,o.c.x).addScaledVector(e,o.c.y).addScaledVector(r,o.c.z),Le&&(_vec4_0.normalize(),_vec4_1.normalize(),_vec4_2.normalize()),Ce(_vec4_0),fe?(Ce(_vec4_2),Ce(_vec4_1)):(Ce(_vec4_1),Ce(_vec4_2))}function appendAttributeFromIndex(v,e,r,o,V,le=!1){for(const fe in V){const Le=e[fe],Ce=V[fe];if(!(fe in e))throw new Error(`CSG Operations: Attribute ${fe} no available on geometry.`);const Re=Le.itemSize;fe==="position"?(_vec3.fromBufferAttribute(Le,v).applyMatrix4(r),Ce.push(_vec3.x,_vec3.y,_vec3.z)):fe==="normal"?(_vec3.fromBufferAttribute(Le,v).applyNormalMatrix(o),le&&_vec3.multiplyScalar(-1),Ce.push(_vec3.x,_vec3.y,_vec3.z)):(Ce.push(Le.getX(v)),Re>1&&Ce.push(Le.getY(v)),Re>2&&Ce.push(Le.getZ(v)),Re>3&&Ce.push(Le.getW(v)))}}class TriangleIntersectData{constructor(e){this.triangle=new Triangle().copy(e),this.intersects={}}addTriangle(e,r){this.intersects[e]=new Triangle().copy(r)}getIntersectArray(){const e=[],{intersects:r}=this;for(const o in r)e.push(r[o]);return e}}class TriangleIntersectionSets{constructor(){this.data={}}addTriangleIntersection(e,r,o,V){const{data:le}=this;le[e]||(le[e]=new TriangleIntersectData(r)),le[e].addTriangle(o,V)}getTrianglesAsArray(e=null){const{data:r}=this,o=[];if(e!==null)e in r&&o.push(r[e].triangle);else for(const V in r)o.push(r[V].triangle);return o}getTriangleIndices(){return Object.keys(this.data).map(e=>parseInt(e))}getIntersectionIndices(e){const{data:r}=this;return r[e]?Object.keys(r[e].intersects).map(o=>parseInt(o)):[]}getIntersectionsAsArray(e=null,r=null){const{data:o}=this,V=new Set,le=[],fe=Le=>{if(o[Le])if(r!==null)o[Le].intersects[r]&&le.push(o[Le].intersects[r]);else{const Ce=o[Le].intersects;for(const Re in Ce)V.has(Re)||(V.add(Re),le.push(Ce[Re]))}};if(e!==null)fe(e);else for(const Le in o)fe(Le);return le}reset(){this.data={}}}class OperationDebugData{constructor(){this.enabled=!1,this.triangleIntersectsA=new TriangleIntersectionSets,this.triangleIntersectsB=new TriangleIntersectionSets,this.intersectionEdges=[]}addIntersectingTriangles(e,r,o,V){const{triangleIntersectsA:le,triangleIntersectsB:fe}=this;le.addTriangleIntersection(e,r,o,V),fe.addTriangleIntersection(o,V,e,r)}addEdge(e){this.intersectionEdges.push(e.clone())}reset(){this.triangleIntersectsA.reset(),this.triangleIntersectsB.reset(),this.intersectionEdges=[]}init(){this.enabled&&(this.reset(),setDebugContext(this))}complete(){this.enabled&&setDebugContext(null)}}const _matrix=new Matrix4,_normalMatrix=new Matrix3,_triA=new Triangle,_triB=new Triangle,_tri=new Triangle,_barycoordTri=new Triangle,_attr=[],_actions=[];function getFirstIdFromSet(v){for(const e of v)return e}function performOperation(v,e,r,o,V,le={}){const{useGroups:fe=!0}=le,{aIntersections:Le,bIntersections:Ce}=collectIntersectingTriangles(v,e),Re=[];let Pe=null,ze;return ze=fe?0:-1,performSplitTriangleOperations(v,e,Le,r,!1,o,V,ze),performWholeTriangleOperations(v,e,Le,r,!1,V,ze),r.findIndex(ke=>ke!==HOLLOW_INTERSECTION&&ke!==HOLLOW_SUBTRACTION)!==-1&&(ze=fe?v.geometry.groups.length||1:-1,performSplitTriangleOperations(e,v,Ce,r,!0,o,V,ze),performWholeTriangleOperations(e,v,Ce,r,!0,V,ze)),_attr.length=0,_actions.length=0,{groups:Re,materials:Pe}}function performSplitTriangleOperations(v,e,r,o,V,le,fe,Le=0){const Ce=v.matrixWorld.determinant()<0;_matrix.copy(e.matrixWorld).invert().multiply(v.matrixWorld),_normalMatrix.getNormalMatrix(v.matrixWorld).multiplyScalar(Ce?-1:1);const Re=v.geometry.groupIndices,Pe=v.geometry.index,ze=v.geometry.attributes.position,Fe=e.geometry.boundsTree,ke=e.geometry.index,Gt=e.geometry.attributes.position,Vt=r.ids,Xt=r.intersectionSet;for(let xt=0,Zt=Vt.length;xt<Zt;xt++){const wt=Vt[xt],Wt=Le===-1?0:Re[wt]+Le,It=3*wt,Nt=Pe.getX(It+0),Ft=Pe.getX(It+1),Ht=Pe.getX(It+2);_triA.a.fromBufferAttribute(ze,Nt).applyMatrix4(_matrix),_triA.b.fromBufferAttribute(ze,Ft).applyMatrix4(_matrix),_triA.c.fromBufferAttribute(ze,Ht).applyMatrix4(_matrix),le.reset(),le.initialize(_triA);const Kt=Xt[wt];for(let jt=0,n0=Kt.length;jt<n0;jt++){const a0=3*Kt[jt],l0=ke.getX(a0+0),s0=ke.getX(a0+1),$t=ke.getX(a0+2);_triB.a.fromBufferAttribute(Gt,l0),_triB.b.fromBufferAttribute(Gt,s0),_triB.c.fromBufferAttribute(Gt,$t),le.splitByTriangle(_triB)}const Yt=le.triangles;for(let jt=0,n0=Yt.length;jt<n0;jt++){const a0=Yt[jt],l0=le.coplanarTriangleUsed?getHitSideWithCoplanarCheck(a0,Fe):getHitSide(a0,Fe);_attr.length=0,_actions.length=0;for(let s0=0,$t=o.length;s0<$t;s0++){const qt=getOperationAction(o[s0],l0,V);qt!==SKIP_TRI&&(_actions.push(qt),_attr.push(fe[s0].getGroupAttrSet(Wt)))}if(_attr.length!==0){_triA.getBarycoord(a0.a,_barycoordTri.a),_triA.getBarycoord(a0.b,_barycoordTri.b),_triA.getBarycoord(a0.c,_barycoordTri.c);for(let s0=0,$t=_attr.length;s0<$t;s0++){const qt=_attr[s0],o0=_actions[s0]===INVERT_TRI;appendAttributeFromTriangle(wt,_barycoordTri,v.geometry,v.matrixWorld,_normalMatrix,qt,Ce!==o0)}}}}return Vt.length}function performWholeTriangleOperations(v,e,r,o,V,le,fe=0){const Le=v.matrixWorld.determinant()<0;_matrix.copy(e.matrixWorld).invert().multiply(v.matrixWorld),_normalMatrix.getNormalMatrix(v.matrixWorld).multiplyScalar(Le?-1:1);const Ce=e.geometry.boundsTree,Re=v.geometry.groupIndices,Pe=v.geometry.index,ze=v.geometry.attributes,Fe=ze.position,ke=[],Gt=v.geometry.halfEdges,Vt=new Set,Xt=getTriCount(v.geometry);for(let xt=0,Zt=Xt;xt<Zt;xt++)xt in r.intersectionSet||Vt.add(xt);for(;Vt.size>0;){const xt=getFirstIdFromSet(Vt);Vt.delete(xt),ke.push(xt);const Zt=3*xt,wt=Pe.getX(Zt+0),Wt=Pe.getX(Zt+1),It=Pe.getX(Zt+2);_tri.a.fromBufferAttribute(Fe,wt).applyMatrix4(_matrix),_tri.b.fromBufferAttribute(Fe,Wt).applyMatrix4(_matrix),_tri.c.fromBufferAttribute(Fe,It).applyMatrix4(_matrix);const Nt=getHitSide(_tri,Ce);_actions.length=0,_attr.length=0;for(let Ft=0,Ht=o.length;Ft<Ht;Ft++){const Kt=getOperationAction(o[Ft],Nt,V);Kt!==SKIP_TRI&&(_actions.push(Kt),_attr.push(le[Ft]))}for(;ke.length>0;){const Ft=ke.pop();for(let Ht=0;Ht<3;Ht++){const Kt=Gt.getSiblingTriangleIndex(Ft,Ht);Kt!==-1&&Vt.has(Kt)&&(ke.push(Kt),Vt.delete(Kt))}if(_attr.length!==0){const Ht=3*Ft,Kt=Pe.getX(Ht+0),Yt=Pe.getX(Ht+1),jt=Pe.getX(Ht+2),n0=fe===-1?0:Re[Ft]+fe;if(_tri.a.fromBufferAttribute(Fe,Kt),_tri.b.fromBufferAttribute(Fe,Yt),_tri.c.fromBufferAttribute(Fe,jt),!isTriDegenerate(_tri))for(let a0=0,l0=_attr.length;a0<l0;a0++){const s0=_actions[a0],$t=_attr[a0].getGroupAttrSet(n0),qt=s0===INVERT_TRI;appendAttributesFromIndices(Kt,Yt,jt,ze,v.matrixWorld,_normalMatrix,$t,qt!==Le)}}}}}function joinGroups(v){for(let e=0;e<v.length-1;e++){const r=v[e],o=v[e+1];if(r.materialIndex===o.materialIndex){const V=r.start,le=o.start+o.count;o.start=V,o.count=le-V,v.splice(e,1),e--}}}function prepareAttributesData(v,e,r,o){r.clear();const V=v.attributes;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le],Ce=V[Le];r.initializeArray(Le,Ce.array.constructor,Ce.itemSize,Ce.normalized)}for(const le in r.attributes)o.includes(le)||r.delete(le);for(const le in e.attributes)o.includes(le)||(e.deleteAttribute(le),e.dispose())}function assignBufferData(v,e,r){let o=!1,V=-1;const le=v.attributes,fe=e.groupAttributes[0];for(const Ce in fe){const Re=e.getTotalLength(Ce),Pe=e.getType(Ce),ze=e.getItemSize(Ce),Fe=e.getNormalized(Ce);let ke=le[Ce];(!ke||ke.array.length<Re)&&(ke=new BufferAttribute(new Pe(Re),ze,Fe),v.setAttribute(Ce,ke),o=!0);let Gt=0;for(let Vt=0,Xt=Math.min(r.length,e.groupCount);Vt<Xt;Vt++){const xt=r[Vt].index,{array:Zt,type:wt,length:Wt}=e.groupAttributes[xt][Ce],It=new wt(Zt.buffer,0,Wt);ke.array.set(It,Gt),Gt+=It.length}ke.needsUpdate=!0,V=Re/ke.itemSize}if(v.index){const Ce=v.index.array;if(Ce.length<V)v.index=null,o=!0;else for(let Re=0,Pe=Ce.length;Re<Pe;Re++)Ce[Re]=Re}let Le=0;v.clearGroups();for(let Ce=0,Re=Math.min(r.length,e.groupCount);Ce<Re;Ce++){const{index:Pe,materialIndex:ze}=r[Ce],Fe=e.getCount(Pe);Fe!==0&&(v.addGroup(Le,Fe,ze),Le+=Fe)}v.setDrawRange(0,V),v.boundsTree=null,o&&v.dispose()}function getMaterialList(v,e){let r=e;return Array.isArray(e)||(r=[],v.forEach(o=>{r[o.materialIndex]=e})),r}class Evaluator{constructor(){this.triangleSplitter=new TriangleSplitter,this.attributeData=[],this.attributes=["position","uv","normal"],this.useGroups=!0,this.consolidateGroups=!0,this.debug=new OperationDebugData}getGroupRanges(e){return!this.useGroups||e.groups.length===0?[{start:0,count:1/0,materialIndex:0}]:e.groups.map(r=>gi({},r))}evaluate(e,r,o,V=new Brush){let le=!0;if(Array.isArray(o)||(o=[o]),Array.isArray(V)||(V=[V],le=!1),V.length!==o.length)throw new Error("Evaluator: operations and target array passed as different sizes.");e.prepareGeometry(),r.prepareGeometry();const{triangleSplitter:fe,attributeData:Le,attributes:Ce,useGroups:Re,consolidateGroups:Pe,debug:ze}=this;for(;Le.length<V.length;)Le.push(new TypedAttributeData);V.forEach((xt,Zt)=>{prepareAttributesData(e.geometry,xt.geometry,Le[Zt],Ce)}),ze.init(),performOperation(e,r,o,fe,Le,{useGroups:Re}),ze.complete();const Fe=this.getGroupRanges(e.geometry),ke=getMaterialList(Fe,e.material),Gt=this.getGroupRanges(r.geometry),Vt=getMaterialList(Gt,r.material);Gt.forEach(xt=>xt.materialIndex+=ke.length);let Xt=[...Fe,...Gt].map((xt,Zt)=>qi(gi({},xt),{index:Zt}));if(Re){const xt=[...ke,...Vt];Pe&&(Xt=Xt.map(wt=>{const Wt=xt[wt.materialIndex];return wt.materialIndex=xt.indexOf(Wt),wt}).sort((wt,Wt)=>wt.materialIndex-Wt.materialIndex));const Zt=[];for(let wt=0,Wt=xt.length;wt<Wt;wt++){let It=!1;for(let Nt=0,Ft=Xt.length;Nt<Ft;Nt++){const Ht=Xt[Nt];Ht.materialIndex===wt&&(It=!0,Ht.materialIndex=Zt.length)}It&&Zt.push(xt[wt])}V.forEach(wt=>{wt.material=Zt})}else Xt=[{start:0,count:1/0,index:0,materialIndex:0}],V.forEach(xt=>{xt.material=ke[0]});return V.forEach((xt,Zt)=>{const wt=xt.geometry;assignBufferData(wt,Le[Zt],Xt),Pe&&joinGroups(wt.groups)}),le?V:V[0]}evaluateHierarchy(e,r=new Brush){e.updateMatrixWorld(!0);const o=(le,fe)=>{const Le=le.children;for(let Ce=0,Re=Le.length;Ce<Re;Ce++){const Pe=Le[Ce];Pe.isOperationGroup?o(Pe,fe):fe(Pe)}},V=le=>{const fe=le.children;let Le=!1;for(let Re=0,Pe=fe.length;Re<Pe;Re++){const ze=fe[Re];Le=V(ze)||Le}const Ce=le.isDirty();if(Ce&&le.markUpdated(),Le&&!le.isOperationGroup){let Re;return o(le,Pe=>{Re?Re=this.evaluate(Re,Pe,Pe.operation):Re=this.evaluate(le,Pe,Pe.operation)}),le._cachedGeometry=Re.geometry,le._cachedMaterials=Re.material,!0}else return Le||Ce};return V(e),r.geometry=e._cachedGeometry,r.material=e._cachedMaterials,r}reset(){this.triangleSplitter.reset()}}class RectAreaLightTexturesLib{static init(){const e=[1,0,0,2e-5,1,0,0,503905e-9,1,0,0,.00201562,1,0,0,.00453516,1,0,0,.00806253,1,0,0,.0125978,1,0,0,.018141,1,0,0,.0246924,1,0,0,.0322525,1,0,0,.0408213,1,0,0,.0503999,1,0,0,.0609894,1,0,0,.0725906,1,0,0,.0852058,1,0,0,.0988363,1,0,0,.113484,1,0,0,.129153,1,0,0,.145839,1,0,0,.163548,1,0,0,.182266,1,0,0,.201942,1,0,0,.222314,1,0,0,.241906,1,0,0,.262314,1,0,0,.285754,1,0,0,.310159,1,0,0,.335426,1,0,0,.361341,1,0,0,.387445,1,0,0,.412784,1,0,0,.438197,1,0,0,.466966,1,0,0,.49559,1,0,0,.523448,1,0,0,.549938,1,0,0,.57979,1,0,0,.608746,1,0,0,.636185,1,0,0,.664748,1,0,0,.69313,1,0,0,.71966,1,0,0,.747662,1,0,0,.774023,1,0,0,.799775,1,0,0,.825274,1,0,0,.849156,1,0,0,.873248,1,0,0,.89532,1,0,0,.917565,1,0,0,.937863,1,0,0,.958139,1,0,0,.976563,1,0,0,.994658,1,0,0,1.0112,1,0,0,1.02712,1,0,0,1.04189,1,0,0,1.05568,1,0,0,1.06877,1,0,0,1.08058,1,0,0,1.09194,1,0,0,1.10191,1,0,0,1.11161,1,0,0,1.1199,1,0,0,1.12813,.999547,-448815e-12,.0224417,199902e-10,.999495,-113079e-10,.0224406,503651e-9,.999496,-452317e-10,.0224406,.00201461,.999496,-101772e-9,.0224406,.00453287,.999495,-180928e-9,.0224406,.00805845,.999497,-282702e-9,.0224406,.0125914,.999496,-407096e-9,.0224406,.0181319,.999498,-554114e-9,.0224406,.02468,.999499,-723768e-9,.0224406,.0322363,.999495,-916058e-9,.0224405,.0408009,.999499,-.00113101,.0224408,.050375,.999494,-.00136863,.0224405,.0609586,.999489,-.00162896,.0224401,.0725537,.999489,-.00191201,.0224414,.0851619,.999498,-.00221787,.0224413,.0987867,.999492,-.00254642,.0224409,.113426,.999507,-.00289779,.0224417,.129088,.999494,-.0032716,.0224386,.145767,.999546,-.0036673,.0224424,.163472,.999543,-.00408166,.0224387,.182182,.999499,-.00450056,.0224338,.201843,.999503,-.00483661,.0224203,.222198,.999546,-.00452928,.022315,.241714,.999508,-.00587403,.0224329,.262184,.999509,-.00638806,.0224271,.285609,.999501,-.00691028,.0224166,.309998,.999539,-.00741979,.0223989,.335262,.999454,-.00786282,.0223675,.361154,.999529,-.00811928,.0222828,.387224,.999503,-.00799941,.0221063,.41252,.999561,-.00952753,.0223057,.438006,.999557,-.0099134,.0222065,.466735,.999541,-.0100935,.0220402,.495332,.999562,-.00996821,.0218067,.523197,.999556,-.0105031,.0217096,.550223,.999561,-.0114191,.0217215,.579498,.999588,-.0111818,.0213357,.608416,.999633,-.0107725,.0208689,.635965,.999527,-.0121671,.0210149,.664476,.999508,-.0116005,.020431,.692786,.999568,-.0115604,.0199791,.719709,.999671,-.0121117,.0197415,.74737,.999688,-.0110769,.0188846,.773692,.99962,-.0122368,.0188452,.799534,.999823,-.0110325,.0178001,.825046,.999599,-.0114923,.0174221,.849075,.999619,-.0105923,.0164345,.872999,.999613,-.0105988,.0158227,.895371,.99964,-.00979861,.0148131,.917364,.99977,-.00967238,.0140721,.938002,.999726,-.00869175,.0129543,.957917,.99973,-.00866872,.0122329,.976557,.999773,-.00731956,.0108958,.994459,.999811,-.00756027,.0102715,1.01118,.999862,-.00583732,.00878781,1.02701,.999835,-.00631438,.00827529,1.04186,.999871,-.00450785,.00674583,1.05569,.999867,-.00486079,.00621041,1.06861,.999939,-.00322072,.00478301,1.08064,.999918,-.00318199,.00406395,1.09181,1.00003,-.00193348,.00280682,1.10207,.999928,-.00153729,.00198741,1.11152,.999933,-623666e-9,917714e-9,1.12009,1,-102387e-11,907581e-12,1.12813,.997866,-896716e-12,.0448334,199584e-10,.997987,-225945e-10,.0448389,502891e-9,.997987,-903781e-10,.0448388,.00201156,.997985,-203351e-9,.0448388,.00452602,.997986,-361514e-9,.0448388,.00804629,.997987,-56487e-8,.0448389,.0125724,.997988,-813423e-9,.0448389,.0181045,.997984,-.00110718,.0448387,.0246427,.997985,-.00144616,.0448388,.0321875,.997987,-.00183038,.044839,.0407392,.997983,-.00225987,.0448387,.0502986,.997991,-.00273467,.0448389,.0608667,.997984,-.00325481,.0448384,.0724444,.998002,-.00382043,.044839,.0850348,.997997,-.00443145,.0448396,.0986372,.998007,-.00508796,.0448397,.113255,.998008,-.00578985,.04484,.128891,.998003,-.00653683,.0448384,.145548,.997983,-.00732713,.0448358,.163221,.997985,-.00815454,.0448358,.181899,.998005,-.00898985,.0448286,.201533,.998026,-.00964404,.0447934,.221821,.998055,-.00922677,.044611,.241282,.99804,-.0117361,.0448245,.261791,.998048,-.0127628,.0448159,.285181,.998088,-.0138055,.0447996,.30954,.998058,-.0148206,.0447669,.334751,.998099,-.0156998,.044697,.36061,.998116,-.0161976,.0445122,.386603,.998195,-.015945,.0441711,.411844,.998168,-.0183947,.0444255,.43773,.998184,-.0197913,.0443809,.466009,.998251,-.0201426,.0440689,.494574,.998305,-.0198847,.0435632,.522405,.998273,-.0210577,.043414,.549967,.998254,-.0227901,.0433943,.578655,.998349,-.0223108,.0426529,.60758,.99843,-.0223088,.042,.635524,.998373,-.0241141,.0418987,.663621,.998425,-.0231446,.0408118,.691906,.998504,-.0233684,.0400565,.719339,.998443,-.0241652,.0394634,.74643,.99848,-.0228715,.0380002,.773086,.998569,-.023519,.0372322,.798988,.998619,-.0223108,.0356468,.824249,.998594,-.0223105,.034523,.848808,.998622,-.0213426,.0328887,.87227,.998669,-.0207912,.0314374,.895157,.998705,-.0198416,.0296925,.916769,.998786,-.0189168,.0279634,.937773,.998888,-.0178811,.0261597,.957431,.99906,-.0166845,.0242159,.976495,.999038,-.0155464,.0222638,.994169,.999237,-.0141349,.0201967,1.01112,.999378,-.0129324,.0181744,1.02692,.999433,-.0113192,.0159898,1.04174,.999439,-.0101244,.0140385,1.05559,.999614,-.00837456,.0117826,1.06852,.999722,-.00721769,.00983745,1.08069,.999817,-.00554067,.00769002,1.09176,.99983,-.00426961,.005782,1.10211,.999964,-.00273904,.00374503,1.11152,1.00001,-.00136739,.00187176,1.12031,.999946,393227e-10,-28919e-9,1.12804,.995847,-13435e-10,.0671785,19916e-9,.995464,-338387e-10,.0671527,501622e-9,.99547,-135355e-9,.0671531,.00200649,.995471,-30455e-8,.0671532,.00451461,.99547,-541423e-9,.0671531,.008026,.995471,-84598e-8,.0671531,.0125407,.99547,-.00121823,.0671531,.0180589,.99547,-.00165817,.0671531,.0245806,.995463,-.00216583,.0671526,.0321062,.995468,-.00274127,.0671527,.0406366,.995474,-.00338447,.0671534,.0501717,.995473,-.00409554,.0671533,.0607131,.995478,-.00487451,.0671531,.0722618,.995476,-.00572148,.0671532,.0848191,.995477,-.00663658,.0671539,.0983882,.995498,-.00761986,.0671541,.112972,.995509,-.00867094,.0671542,.128568,.995509,-.00978951,.0671531,.145183,.995503,-.0109725,.0671491,.162808,.995501,-.012211,.0671465,.181441,.99553,-.0134565,.0671371,.201015,.99555,-.014391,.0670831,.221206,.99558,-.014351,.0668883,.240813,.995577,-.0173997,.0671055,.261257,.995602,-.0191111,.0671178,.284467,.995623,-.0206705,.0670946,.308765,.995658,-.022184,.0670472,.333905,.995705,-.0234832,.0669417,.359677,.995719,-.0241933,.0666714,.385554,.995786,-.0243539,.066266,.410951,.995887,-.0271866,.0664367,.437163,.995944,-.0296012,.0664931,.464842,.996004,-.0301045,.0660105,.49332,.996128,-.0298311,.0652694,.521131,.996253,-.0316426,.0650739,.549167,.996244,-.0339043,.0649433,.57737,.996309,-.033329,.0638926,.606073,.996417,-.0338935,.0630849,.634527,.996372,-.0353104,.0625083,.66256,.996542,-.0348942,.0611986,.690516,.996568,-.0351614,.060069,.718317,.996711,-.0354317,.0588522,.74528,.996671,-.0349513,.0571902,.772061,.996865,-.0345622,.0555321,.798089,.996802,-.0342566,.0537816,.823178,.996992,-.0330862,.0516095,.847949,.996944,-.0324666,.0495537,.871431,.997146,-.0309544,.0470302,.894357,.997189,-.0299372,.0446043,.916142,.997471,-.0281389,.0418812,.937193,.997515,-.0268702,.0391823,.957,.997812,-.0247166,.0361338,.975936,.998027,-.0233525,.0333945,.99391,.998233,-.0209839,.0301917,1.01075,.998481,-.0194309,.027271,1.02669,.998859,-.0169728,.0240162,1.04173,.99894,-.0152322,.0210517,1.05551,.999132,-.0127497,.0178632,1.06856,.999369,-.0108282,.014787,1.08054,.999549,-.00845886,.0116185,1.09185,.999805,-.0063937,.00867209,1.10207,.99985,-.00414582,.00566823,1.1117,.999912,-.00207443,.00277562,1.12022,1.00001,870226e-10,-53766e-9,1.12832,.991943,-178672e-11,.0893382,198384e-10,.991952,-450183e-10,.089339,499849e-9,.991956,-180074e-9,.0893394,.0019994,.991955,-405167e-9,.0893393,.00449867,.991953,-720298e-9,.0893391,.00799764,.991955,-.00112548,.0893393,.0124964,.991957,-.0016207,.0893395,.0179951,.991958,-.00220601,.0893396,.0244939,.991947,-.00288137,.0893385,.0319929,.991962,-.00364693,.0893399,.0404933,.991965,-.00450264,.0893399,.049995,.99198,-.00544862,.0893411,.0604995,.99197,-.00648491,.0893397,.0720074,.991976,-.00761164,.089341,.0845207,.99198,-.00882891,.0893405,.0980413,.991982,-.0101367,.0893396,.112571,.992008,-.011535,.0893415,.128115,.992026,-.0130228,.0893414,.144672,.992064,-.0145966,.0893418,.162241,.992041,-.0162421,.0893359,.180801,.992086,-.0178888,.0893214,.200302,.992157,-.0190368,.0892401,.220332,.992181,-.0195584,.0890525,.240144,.992175,-.0227257,.0892153,.260728,.99221,-.0254195,.089304,.283473,.99222,-.0274883,.0892703,.307673,.992317,-.0294905,.0892027,.332729,.992374,-.0311861,.0890577,.358387,.992505,-.0320656,.0886994,.384102,.992568,-.0329715,.0883198,.409767,.992675,-.036006,.0883602,.436145,.992746,-.0392897,.0884591,.463217,.992873,-.0399337,.0878287,.491557,.992934,-.040231,.0870108,.519516,.993091,-.0422013,.0865857,.547741,.993259,-.0443503,.0861937,.575792,.993455,-.0446368,.0851187,.604233,.993497,-.0454299,.0840576,.632925,.993694,-.0463296,.0829671,.660985,.993718,-.0470619,.0817185,.688714,.993973,-.0468838,.0800294,.716743,.994207,-.046705,.0781286,.74377,.994168,-.0469698,.0763337,.77042,.9945,-.0456816,.0738184,.796659,.994356,-.0455518,.0715545,.821868,.994747,-.0439488,.0686085,.846572,.994937,-.0430056,.065869,.870435,.995142,-.0413414,.0626446,.893272,.995451,-.0396521,.05929,.915376,.995445,-.0378453,.0558503,.936196,.995967,-.0355219,.0520949,.956376,.996094,-.0335146,.048377,.975327,.996622,-.030682,.0442575,.993471,.996938,-.0285504,.0404693,1.01052,.997383,-.0253399,.0360903,1.02637,.997714,-.0231651,.0322176,1.04139,.998249,-.0198138,.0278433,1.05542,.998596,-.0174337,.0238759,1.06846,.998946,-.0141349,.0195944,1.08056,.99928,-.0115603,.0156279,1.09181,.999507,-.00839065,.0114607,1.10213,.999697,-.005666,.00763325,1.11169,.999869,-.00269902,.00364946,1.12042,1.00001,623836e-10,-319288e-10,1.12832,.987221,-222675e-11,.111332,197456e-10,.98739,-561116e-10,.111351,497563e-9,.987448,-224453e-9,.111357,.00199031,.987441,-505019e-9,.111357,.0044782,.987442,-897816e-9,.111357,.00796129,.987442,-.00140284,.111357,.0124396,.987444,-.00202012,.111357,.0179132,.987442,-.00274964,.111357,.0243824,.987446,-.00359147,.111357,.0318474,.987435,-.00454562,.111356,.0403086,.987461,-.00561225,.111358,.0497678,.987458,-.00679125,.111358,.0602239,.987443,-.0080828,.111356,.0716792,.987476,-.0094872,.111358,.0841364,.98749,-.0110044,.111361,.097597,.987508,-.0126344,.111362,.112062,.987494,-.0143767,.111357,.127533,.987526,-.0162307,.111359,.144015,.987558,-.0181912,.111361,.161502,.987602,-.0202393,.111355,.179979,.987692,-.022273,.111346,.199386,.987702,-.0235306,.111215,.219183,.987789,-.0247628,.111061,.239202,.987776,-.0280668,.111171,.259957,.987856,-.0316751,.111327,.282198,.987912,-.0342468,.111282,.306294,.988,-.0367205,.111198,.331219,.988055,-.0387766,.110994,.356708,.988241,-.0397722,.110547,.382234,.988399,-.0416076,.110198,.408227,.988539,-.0448192,.110137,.434662,.988661,-.0483793,.110143,.461442,.988967,-.0495895,.109453,.489318,.989073,-.0506797,.108628,.517516,.989274,-.0526953,.108003,.545844,.989528,-.054578,.107255,.573823,.989709,-.0561503,.106294,.601944,.989991,-.056866,.104896,.630855,.990392,-.0572914,.103336,.658925,.990374,-.0586224,.10189,.686661,.990747,-.0584764,.099783,.714548,.991041,-.0582662,.0974309,.74186,.991236,-.0584118,.0951678,.768422,.991585,-.0573055,.0921581,.794817,.991984,-.0564241,.0891167,.820336,.9921,-.0553608,.085805,.84493,.992749,-.0533816,.0820354,.868961,.99288,-.0518661,.0782181,.891931,.993511,-.0492492,.0738935,.914186,.993617,-.0471956,.0696402,.93532,.99411,-.044216,.0649659,.95543,.994595,-.0416654,.0603177,.974685,.994976,-.0384314,.0553493,.992807,.995579,-.0353491,.0503942,1.00996,.996069,-.0319787,.0452123,1.02606,.996718,-.028472,.0400112,1.04114,.997173,-.0250789,.0349456,1.05517,.997818,-.0213326,.029653,1.0683,.998318,-.0178509,.024549,1.0805,.998853,-.0141118,.0194197,1.09177,.999218,-.0105914,.0143869,1.1022,.999594,-.00693474,.00943517,1.11175,.99975,-.00340478,.00464051,1.12056,1.00001,109172e-9,-112821e-9,1.12853,.983383,-266524e-11,.133358,196534e-10,.981942,-671009e-10,.133162,494804e-9,.981946,-268405e-9,.133163,.00197923,.981944,-603912e-9,.133163,.00445326,.981941,-.00107362,.133162,.00791693,.981946,-.00167755,.133163,.0123703,.981944,-.00241569,.133162,.0178135,.981945,-.00328807,.133163,.0242466,.981945,-.00429472,.133162,.03167,.981955,-.00543573,.133164,.0400846,.981951,-.00671105,.133163,.0494901,.981968,-.00812092,.133165,.0598886,.981979,-.00966541,.133166,.0712811,.981996,-.0113446,.133168,.083669,.982014,-.0131585,.133169,.0970533,.982011,-.0151073,.133167,.111438,.982062,-.0171906,.133172,.126826,.9821,-.0194067,.133175,.143215,.982149,-.0217502,.133176,.160609,.982163,-.0241945,.133173,.178981,.982247,-.0265907,.133148,.198249,.982291,-.027916,.132974,.217795,.982396,-.0299663,.132868,.238042,.982456,-.0334544,.132934,.258901,.982499,-.0378636,.133137,.280639,.982617,-.0409274,.133085,.304604,.98274,-.0438523,.132985,.329376,.982944,-.0462288,.132728,.354697,.98308,-.0475995,.132228,.380102,.983391,-.0501901,.131924,.406256,.983514,-.0535899,.131737,.432735,.98373,-.0571858,.131567,.459359,.984056,-.0592353,.130932,.486637,.984234,-.0610488,.130092,.51509,.984748,-.0630758,.12923,.543461,.985073,-.0647398,.128174,.571376,.985195,-.0671941,.127133,.599414,.985734,-.0681345,.125576,.628134,.986241,-.0686089,.123639,.656399,.986356,-.0698511,.121834,.684258,.986894,-.0700931,.119454,.711818,.987382,-.0698321,.116718,.739511,.988109,-.0693975,.113699,.766267,.988363,-.0689584,.110454,.792456,.989112,-.0672353,.106602,.81813,.989241,-.0662034,.10267,.842889,.990333,-.0638938,.0981381,.867204,.990591,-.0618534,.0935388,.89038,.991106,-.0593117,.088553,.912576,.991919,-.0562676,.0832187,.934118,.992111,-.0534085,.0778302,.954254,.992997,-.0495459,.0720453,.973722,.993317,-.0463707,.0663458,.991949,.994133,-.0421245,.0601883,1.00936,.994705,-.0384977,.0542501,1.02559,.995495,-.0340956,.0479862,1.04083,.996206,-.030105,.041887,1.05497,.996971,-.0256095,.0355355,1.06824,.997796,-.0213932,.0293655,1.08056,.998272,-.0169612,.0232926,1.09182,.998857,-.0126756,.0172786,1.10219,.99939,-.00832486,.0113156,1.11192,.999752,-.00410826,.00557892,1.12075,1,150957e-9,-119101e-9,1.12885,.975169,-309397e-11,.154669,195073e-10,.975439,-779608e-10,.154712,491534e-9,.975464,-311847e-9,.154716,.00196617,.975464,-701656e-9,.154716,.00442387,.975462,-.0012474,.154715,.0078647,.975461,-.00194906,.154715,.0122886,.975464,-.00280667,.154715,.0176959,.975468,-.00382025,.154716,.0240867,.975471,-.00498985,.154716,.0314612,.975472,-.00631541,.154717,.0398199,.975486,-.00779719,.154718,.0491639,.975489,-.00943505,.154718,.0594932,.975509,-.0112295,.154721,.0708113,.97554,-.0131802,.154724,.0831176,.975557,-.0152876,.154726,.096415,.975585,-.0175512,.154728,.110705,.975605,-.0199713,.154729,.125992,.975645,-.0225447,.154729,.142272,.975711,-.0252649,.154735,.159549,.975788,-.0280986,.154736,.177805,.975872,-.0308232,.154704,.196911,.975968,-.0324841,.154525,.216324,.976063,-.0351281,.154432,.236628,.976157,-.0388618,.15446,.257539,.976204,-.0437704,.154665,.278975,.976358,-.047514,.154652,.302606,.976571,-.0508638,.154535,.327204,.976725,-.0534995,.154221,.352276,.977013,-.0555547,.153737,.377696,.977294,-.0586728,.153403,.403855,.977602,-.0622715,.15312,.430333,.977932,-.0658166,.152755,.456855,.978241,-.0689877,.152233,.483668,.978602,-.0712805,.15132,.512097,.979234,-.0732775,.150235,.540455,.97977,-.075163,.148978,.568486,.979995,-.0778026,.147755,.596524,.98078,-.0791854,.146019,.624825,.981628,-.0799666,.143906,.653403,.982067,-.0808532,.141561,.681445,.98271,-.0816024,.139025,.708918,.983734,-.0812511,.135764,.736594,.98431,-.0806201,.132152,.763576,.985071,-.0801605,.12846,.789797,.98618,-.0784208,.124084,.815804,.986886,-.0766643,.1193,.840869,.987485,-.0747744,.114236,.864952,.988431,-.0716701,.108654,.888431,.988886,-.0691609,.102994,.910963,.990024,-.0654048,.0967278,.932629,.990401,-.0619765,.090384,.95313,.991093,-.0579296,.0837885,.972587,.992018,-.0536576,.0770171,.991184,.992536,-.0493719,.0701486,1.00863,.993421,-.0444813,.062953,1.02494,.993928,-.040008,.0560455,1.04017,.994994,-.0347982,.04856,1.05463,.995866,-.0301017,.0416152,1.06807,.996916,-.0248225,.0342597,1.08039,.997766,-.0199229,.0271668,1.09177,.998479,-.0147422,.0201387,1.10235,.99921,-.00980173,.0131944,1.11206,.999652,-.0047426,.00640712,1.12104,.999998,891673e-10,-10379e-8,1.12906,.967868,-351885e-11,.175947,193569e-10,.968001,-886733e-10,.175972,487782e-9,.96801,-354697e-9,.175973,.00195115,.968012,-798063e-9,.175974,.00439006,.968011,-.00141879,.175973,.00780461,.968011,-.00221686,.175973,.0121948,.968016,-.00319231,.175974,.0175607,.968019,-.00434515,.175974,.0239027,.968018,-.00567538,.175974,.0312208,.968033,-.00718308,.175977,.0395158,.968049,-.00886836,.175979,.0487885,.968047,-.0107312,.175978,.0590394,.968072,-.0127719,.175981,.0702705,.968108,-.0149905,.175986,.0824836,.968112,-.0173866,.175985,.0956783,.968173,-.0199611,.175993,.109862,.96827,-.0227128,.176008,.125033,.968292,-.025639,.17601,.141193,.968339,-.0287299,.176007,.158336,.968389,-.0319399,.176001,.176441,.968501,-.034941,.175962,.195359,.968646,-.0370812,.175793,.214686,.968789,-.0402329,.175708,.234973,.96886,-.0442601,.1757,.255871,.969013,-.049398,.175876,.277238,.969242,-.0539932,.17594,.300326,.969419,-.0577299,.175781,.324702,.969763,-.0605643,.175432,.349527,.970093,-.0634488,.174992,.374976,.970361,-.0670589,.174611,.401097,.970825,-.0708246,.174226,.427496,.971214,-.0742871,.173684,.453858,.971622,-.0782608,.173186,.480637,.972175,-.0813151,.172288,.508655,.972944,-.0832678,.170979,.536973,.973595,-.0855964,.169573,.565138,.974345,-.0882163,.168152,.593222,.975233,-.0901671,.166314,.621201,.976239,-.0912111,.163931,.649919,.977289,-.0916959,.161106,.678011,.978076,-.0927061,.158272,.705717,.979533,-.0925562,.15475,.733228,.980335,-.0918159,.150638,.760454,.981808,-.0908508,.146201,.786918,.983061,-.0896172,.141386,.812953,.984148,-.0871588,.135837,.838281,.985047,-.0850624,.130135,.862594,.986219,-.0818541,.123882,.88633,.987043,-.0784523,.117126,.908952,.988107,-.0749601,.110341,.930744,.988955,-.0703548,.102885,.951728,.989426,-.0662798,.0954167,.971166,.990421,-.0610834,.0876331,.989984,.991032,-.0562936,.0797785,1.00765,.992041,-.0508154,.0718166,1.02434,.992794,-.0454045,.0637125,1.03976,.993691,-.0398194,.0555338,1.05418,.994778,-.0341482,.0473388,1.06772,.995915,-.028428,.0391016,1.08028,.997109,-.022642,.0309953,1.09185,.998095,-.0168738,.0230288,1.10247,.998985,-.0111274,.0150722,1.11229,.999581,-.00543881,.00740605,1.12131,1.00003,162239e-9,-105549e-9,1.12946,.959505,-393734e-11,.196876,191893e-10,.959599,-992157e-10,.196895,483544e-9,.959641,-396868e-9,.196903,.0019342,.959599,-892948e-9,.196895,.00435193,.959603,-.00158747,.196896,.0077368,.959604,-.00248042,.196896,.0120888,.959605,-.00357184,.196896,.0174082,.959605,-.00486169,.196896,.0236949,.959613,-.00635008,.196897,.0309497,.959619,-.00803696,.196898,.0391725,.959636,-.00992255,.196901,.0483649,.959634,-.0120067,.1969,.0585266,.959675,-.0142898,.196906,.0696609,.959712,-.0167717,.196911,.0817678,.959752,-.0194524,.196918,.0948494,.959807,-.0223321,.196925,.10891,.959828,-.0254091,.196924,.123947,.959906,-.0286815,.196934,.139968,.960005,-.0321371,.196944,.156968,.960071,-.0357114,.196936,.17491,.960237,-.0389064,.196882,.193597,.960367,-.041623,.196731,.21285,.960562,-.0452655,.196654,.233075,.960735,-.0496207,.196643,.253941,.960913,-.0549379,.196774,.275278,.961121,-.0603414,.196893,.297733,.96139,-.0644244,.196717,.321877,.961818,-.067556,.196314,.346476,.962175,-.0712709,.195917,.371907,.96255,-.0752848,.1955,.397916,.963164,-.0792073,.195026,.424229,.963782,-.0828225,.194424,.450637,.964306,-.0873119,.193831,.477288,.964923,-.0911051,.192973,.504716,.966048,-.093251,.19151,.533053,.967024,-.0958983,.190013,.561366,.968038,-.09835,.188253,.589464,.969152,-.100754,.186257,.617433,.970557,-.102239,.183775,.645801,.972104,-.102767,.180645,.674278,.973203,-.103492,.177242,.702004,.975123,-.103793,.17345,.729529,.97641,-.102839,.168886,.756712,.978313,-.101687,.163892,.783801,.980036,-.100314,.158439,.809671,.981339,-.097836,.152211,.835402,.982794,-.0950006,.145679,.860081,.984123,-.0920994,.138949,.883757,.984918,-.0878641,.131283,.90685,.985999,-.083939,.123464,.928786,.987151,-.0791234,.115324,.94983,.987827,-.0739332,.106854,.96962,.988806,-.0688088,.0982691,.98861,.989588,-.0628962,.0893456,1.00667,.990438,-.0573146,.0805392,1.02344,.991506,-.0509433,.0713725,1.03933,.992492,-.0448724,.0623732,1.05378,.993663,-.0383497,.0530838,1.06747,.994956,-.0319593,.0439512,1.08007,.99634,-.025401,.0347803,1.09182,.99761,-.0189687,.0257954,1.1025,.99863,-.0124441,.0169893,1.11247,.99947,-.00614003,.00829498,1.12151,1.00008,216624e-9,-146107e-9,1.12993,.950129,-434955e-11,.217413,190081e-10,.950264,-10957e-8,.217444,47884e-8,.9503,-438299e-9,.217451,.00191543,.950246,-986124e-9,.21744,.00430951,.950246,-.00175311,.21744,.00766137,.950245,-.00273923,.21744,.011971,.950253,-.00394453,.217441,.0172385,.950258,-.00536897,.217442,.0234641,.950267,-.00701262,.217444,.030648,.950277,-.00887551,.217446,.038791,.950284,-.0109576,.217446,.0478931,.950312,-.0132591,.217451,.0579568,.950334,-.01578,.217454,.0689821,.950378,-.0185204,.217462,.0809714,.950417,-.0214803,.217467,.0939265,.950488,-.0246594,.217479,.10785,.950534,-.0280565,.217483,.122743,.950633,-.0316685,.217498,.138611,.950698,-.0354787,.217499,.155442,.950844,-.0394003,.217507,.173208,.950999,-.0426812,.217419,.191605,.951221,-.0461302,.217317,.21084,.951412,-.0502131,.217238,.230945,.951623,-.0549183,.21722,.251745,.951867,-.0604493,.217306,.273001,.952069,-.0665189,.217466,.294874,.952459,-.0709179,.217266,.318732,.952996,-.0746112,.216891,.34318,.953425,-.0789252,.216503,.36849,.953885,-.0833293,.216042,.394373,.954617,-.087371,.215469,.420505,.955429,-.0914054,.214802,.446907,.956068,-.0961671,.214146,.473522,.957094,-.10048,.213286,.50052,.958372,-.103248,.211796,.528715,.959654,-.106033,.21016,.557065,.961305,-.108384,.208149,.585286,.962785,-.111122,.206024,.613334,.964848,-.112981,.203442,.641334,.966498,-.113717,.19996,.669955,.968678,-.114121,.196105,.698094,.970489,-.114524,.191906,.725643,.972903,-.113792,.186963,.752856,.974701,-.112406,.181343,.780013,.976718,-.110685,.175185,.806268,.978905,-.108468,.168535,.832073,.980267,-.105061,.161106,.857149,.981967,-.101675,.153387,.881145,.983063,-.0974492,.145199,.904255,.984432,-.0925815,.136527,.926686,.985734,-.0877983,.127584,.947901,.986228,-.081884,.118125,.968111,.98719,-.0761208,.108594,.98719,.988228,-.0698196,.0989996,1.00559,.989046,-.0632739,.0890074,1.02246,.990242,-.056522,.0790832,1.03841,.991252,-.0495272,.0689182,1.05347,.992542,-.0425373,.0588592,1.06724,.994096,-.0353198,.0486833,1.08009,.995593,-.028235,.0385977,1.09177,.99711,-.0209511,.0286457,1.10274,.998263,-.0139289,.0188497,1.11262,.999254,-.0067359,.009208,1.12191,.999967,141846e-9,-657764e-10,1.13024,.935608,-474692e-11,.236466,187817e-10,.93996,-11971e-8,.237568,473646e-9,.939959,-478845e-9,.237567,.0018946,.939954,-.0010774,.237566,.00426284,.939956,-.00191538,.237566,.00757842,.939954,-.00299277,.237566,.0118413,.93996,-.00430961,.237567,.0170518,.939969,-.00586589,.237569,.02321,.939982,-.00766166,.237572,.0303164,.939987,-.00969686,.237572,.0383711,.939997,-.0119715,.237574,.0473751,.940031,-.0144858,.237581,.0573298,.940073,-.0172399,.237589,.0682366,.94012,-.0202335,.237598,.080097,.940162,-.0234663,.237604,.0929116,.940237,-.0269387,.237615,.106686,.940328,-.0306489,.237632,.121421,.940419,-.0345917,.237645,.137115,.940522,-.0387481,.237654,.153766,.940702,-.0429906,.237661,.17133,.940871,-.0465089,.237561,.189502,.941103,-.050531,.23748,.208616,.941369,-.0550657,.237423,.228595,.941641,-.0601337,.237399,.249287,.941903,-.0658804,.237443,.270467,.942224,-.0722674,.237597,.292024,.942633,-.0771788,.237419,.315272,.943172,-.0815623,.237068,.339579,.943691,-.0863973,.236682,.364717,.944382,-.0911536,.236213,.390435,.945392,-.0952967,.235562,.416425,.946185,-.0998948,.234832,.442772,.947212,-.104796,.234114,.469347,.948778,-.10928,.233222,.496162,.950149,-.113081,.231845,.523978,.951989,-.115893,.230005,.552295,.953921,-.11846,.227862,.580569,.955624,-.12115,.225439,.608698,.958234,-.123373,.222635,.636696,.960593,-.124519,.219093,.665208,.963201,-.124736,.214749,.693557,.965642,-.125012,.210059,.721334,.968765,-.124661,.204935,.748613,.971753,-.122996,.198661,.776224,.973751,-.120998,.191823,.802461,.976709,-.118583,.184359,.828399,.977956,-.115102,.176437,.853693,.979672,-.111077,.167681,.877962,.981816,-.10688,.158872,.901564,.98238,-.101469,.149398,.924057,.983964,-.0960013,.139436,.945751,.984933,-.0899626,.12943,.966272,.985694,-.0832973,.11894,.985741,.986822,-.0767082,.108349,1.00407,.987725,-.0693614,.0976026,1.02154,.98877,-.06211,.086652,1.03757,.990129,-.0544143,.0756182,1.05296,.991337,-.046744,.0645753,1.06683,.992978,-.0387931,.0534683,1.0798,.994676,-.030973,.0424137,1.09181,.99645,-.0230311,.0314035,1.10286,.997967,-.0152065,.0206869,1.11291,.99922,-.00744837,.010155,1.12237,1.00002,240209e-9,-752767e-10,1.13089,.922948,-515351e-11,.255626,186069e-10,.928785,-129623e-9,.257244,468009e-9,.928761,-51849e-8,.257237,.00187202,.928751,-.0011666,.257235,.00421204,.928751,-.00207395,.257234,.0074881,.928754,-.00324055,.257235,.0117002,.92876,-.00466639,.257236,.0168486,.928763,-.00635149,.257237,.0229334,.928774,-.00829584,.257239,.029955,.928791,-.0104995,.257243,.0379139,.928804,-.0129623,.257245,.0468108,.928847,-.0156846,.257255,.0566473,.92889,-.0186661,.257263,.0674246,.928924,-.0219067,.257268,.0791433,.928989,-.0254066,.257282,.0918076,.92909,-.0291651,.257301,.105419,.92918,-.0331801,.257316,.119978,.92929,-.0374469,.257332,.135491,.929453,-.041939,.257357,.151948,.929586,-.0464612,.257347,.169275,.929858,-.0503426,.257269,.187257,.930125,-.0548409,.257199,.206204,.930403,-.0598063,.257149,.22601,.930726,-.0652437,.257122,.246561,.931098,-.0712376,.257153,.267618,.931396,-.0777506,.257237,.288993,.931947,-.0832374,.257124,.311527,.932579,-.0883955,.25683,.335697,.933194,-.0937037,.256444,.360634,.934013,-.0987292,.255939,.386126,.935307,-.103215,.255282,.412018,.936374,-.108234,.254538,.438292,.93776,-.113234,.253728,.464805,.939599,-.118013,.25275,.491464,.941036,-.122661,.251404,.518751,.94337,-.125477,.249435,.547133,.945318,-.128374,.247113,.575456,.947995,-.130996,.244441,.60372,.950818,-.133438,.241352,.63174,.954378,-.135004,.237849,.659971,.957151,-.135313,.233188,.688478,.960743,-.13521,.228001,.716767,.964352,-.135007,.222249,.744349,.967273,-.133523,.21542,.771786,.969767,-.131155,.208039,.798639,.973195,-.128492,.200076,.824774,.975557,-.125094,.191451,.850222,.977692,-.120578,.18184,.874761,.98026,-.115882,.172102,.898497,.981394,-.110372,.161859,.921636,.982386,-.10415,.15108,.943467,.983783,-.0978128,.140407,.964045,.98422,-.0906171,.129058,.98398,.985447,-.0832921,.117614,1.00276,.986682,-.0754412,.10585,1.02047,.987326,-.0673885,.0940943,1.03678,.988707,-.0592565,.0822093,1.05218,.990185,-.050717,.070192,1.06652,.991866,-.0423486,.0582081,1.07965,.993897,-.0336118,.0460985,1.09188,.995841,-.0252178,.0342737,1.10307,.997605,-.0164893,.0224829,1.11324,.999037,-.00817112,.0110647,1.12262,1.00003,291686e-9,-168673e-9,1.13139,.915304,-552675e-11,.275999,183285e-10,.91668,-139285e-9,.276414,461914e-9,.916664,-55713e-8,.276409,.00184763,.916653,-.00125354,.276406,.00415715,.916651,-.00222851,.276405,.00739053,.916655,-.00348205,.276406,.0115478,.916653,-.00501414,.276405,.0166291,.916667,-.00682478,.276409,.0226346,.91668,-.00891398,.276412,.0295648,.91669,-.0112817,.276413,.0374199,.916727,-.013928,.276422,.0462016,.916759,-.0168528,.276429,.0559101,.916793,-.0200558,.276436,.0665466,.916849,-.0235373,.276448,.0781139,.916964,-.0272973,.276474,.0906156,.917047,-.0313344,.276491,.104051,.917152,-.0356465,.276511,.118424,.917286,-.0402271,.276533,.133736,.917469,-.0450408,.276564,.149978,.917686,-.0497872,.276563,.167057,.917953,-.0540937,.276493,.184846,.918228,-.0590709,.276437,.203614,.918572,-.0644277,.276398,.223212,.918918,-.0702326,.276362,.243584,.919356,-.076484,.276383,.264465,.919842,-.0830808,.276434,.285701,.920451,-.0892972,.276407,.307559,.921113,-.095016,.276128,.331501,.921881,-.100771,.275754,.356207,.923027,-.106029,.275254,.381477,.924364,-.111029,.274595,.40722,.925818,-.116345,.273841,.433385,.92746,-.121424,.272913,.459848,.929167,-.12657,.271837,.486493,.931426,-.131581,.270575,.513432,.934001,-.135038,.268512,.541502,.936296,-.138039,.266135,.569658,.939985,-.140687,.263271,.598375,.943516,-.143247,.260058,.626563,.94782,-.145135,.256138,.654711,.951023,-.145733,.251154,.683285,.955338,-.145554,.245562,.711831,.959629,-.145008,.239265,.739573,.963123,-.144003,.232064,.767027,.966742,-.141289,.224036,.794359,.969991,-.138247,.215305,.820361,.973403,-.134786,.206051,.846548,.975317,-.129966,.195914,.871541,.977647,-.12471,.185184,.895313,.980137,-.119086,.174161,.918398,.981031,-.112297,.162792,.940679,.982037,-.105372,.150952,.961991,.983164,-.097821,.138921,.981913,.983757,-.0897245,.126611,1.00109,.985036,-.0815974,.114228,1.01902,.986289,-.0727725,.101389,1.03604,.987329,-.0639323,.0886476,1.05149,.989193,-.0548109,.0756837,1.06619,.990716,-.045687,.0627581,1.07948,.992769,-.0364315,.0498337,1.09172,.99524,-.0271761,.0370305,1.1033,.997154,-.0179609,.0243959,1.11353,.998845,-.00878063,.0119567,1.12319,1.00002,259038e-9,-108146e-9,1.13177,.903945,-591681e-11,.295126,181226e-10,.903668,-148672e-9,.295037,455367e-9,.903677,-594683e-9,.29504,.00182145,.903673,-.00133805,.295039,.00409831,.903666,-.00237872,.295036,.00728584,.903668,-.00371676,.295037,.0113842,.903679,-.00535212,.29504,.0163936,.903684,-.00728479,.295041,.0223141,.903698,-.00951473,.295044,.0291462,.903718,-.0120419,.295049,.0368904,.903754,-.0148664,.295058,.0455477,.903801,-.017988,.29507,.0551194,.903851,-.0214064,.295082,.0656058,.903921,-.0251219,.295097,.0770109,.904002,-.0291337,.295116,.0893354,.904111,-.033441,.29514,.102583,.904246,-.0380415,.295169,.116755,.904408,-.0429258,.295202,.131853,.904637,-.0480468,.295245,.147869,.904821,-.0529208,.295214,.164658,.905163,-.0577748,.295185,.182274,.905469,-.0631763,.295143,.200828,.905851,-.068917,.295112,.2202,.906322,-.0750861,.295104,.240372,.906761,-.0815855,.295086,.261082,.90735,-.0882138,.295095,.282123,.908087,-.095082,.295139,.303563,.908826,-.101488,.29492,.327028,.909832,-.107577,.294577,.351464,.911393,-.113033,.294115,.376497,.912804,-.118629,.293446,.402115,.914081,-.124232,.292581,.428111,.91637,-.129399,.29166,.454442,.91814,-.134892,.290422,.481024,.921179,-.140069,.289194,.507924,.924544,-.144431,.287421,.535557,.927995,-.147498,.284867,.563984,.931556,-.150197,.281722,.5923,.935777,-.152711,.278207,.620832,.940869,-.154836,.274148,.649069,.945994,-.155912,.269057,.677746,.949634,-.155641,.262799,.706293,.955032,-.154809,.256097,.734278,.95917,-.153678,.248618,.761751,.962931,-.151253,.239794,.789032,.966045,-.147625,.230281,.815422,.96971,-.143964,.220382,.841787,.972747,-.139464,.209846,.867446,.975545,-.133459,.198189,.892004,.978381,-.127424,.186362,.915458,.979935,-.120506,.173964,.937948,.980948,-.11282,.161429,.959732,.982234,-.104941,.148557,.980118,.982767,-.0962905,.135508,.999463,.983544,-.0873625,.122338,1.01756,.984965,-.0783447,.108669,1.03492,.986233,-.0684798,.0949911,1.05087,.987796,-.0590867,.0811386,1.0656,.989885,-.0489145,.0673099,1.0794,.991821,-.0391,.0535665,1.09174,.99448,-.029087,.0397529,1.10341,.996769,-.019114,.0261463,1.11383,.998641,-.00947007,.0128731,1.1237,.999978,446316e-9,-169093e-9,1.13253,.888362,-627064e-11,.312578,178215e-10,.889988,-157791e-9,.313148,448451e-9,.889825,-631076e-9,.313092,.00179356,.88984,-.00141994,.313097,.00403554,.889828,-.0025243,.313092,.00717429,.889831,-.00394421,.313093,.0112099,.889831,-.00567962,.313093,.0161425,.889844,-.00773051,.313096,.0219724,.889858,-.0100968,.3131,.0286999,.889882,-.0127786,.313106,.0363256,.889918,-.0157757,.313116,.0448509,.889967,-.0190878,.313129,.0542758,.89003,-.022715,.313145,.0646032,.890108,-.0266566,.313165,.0758339,.890218,-.0309131,.313193,.0879729,.890351,-.0354819,.313226,.101019,.89051,-.0403613,.313263,.114979,.890672,-.0455385,.313294,.129848,.890882,-.0509444,.313333,.145616,.891189,-.0559657,.313324,.162122,.891457,-.0613123,.313281,.179524,.891856,-.0671488,.313281,.197855,.892312,-.0732732,.313268,.216991,.892819,-.0797865,.313263,.236924,.893369,-.0865269,.313247,.257433,.894045,-.0931592,.313205,.278215,.894884,-.100532,.313276,.299467,.895832,-.107716,.313205,.322276,.897043,-.114099,.312873,.34642,.898515,-.119941,.312331,.371187,.900191,-.126044,.311731,.396656,.90188,-.131808,.310859,.422488,.904359,-.137289,.309857,.448744,.906923,-.142991,.308714,.475239,.910634,-.148253,.307465,.501983,.914502,-.153332,.305774,.529254,.919046,-.156646,.303156,.557709,.923194,-.159612,.299928,.586267,.928858,-.162027,.296245,.614925,.934464,-.164203,.291832,.643187,.939824,-.165602,.286565,.671601,.944582,-.165383,.280073,.700213,.949257,-.164439,.272891,.728432,.954389,-.162953,.264771,.756082,.958595,-.161007,.255927,.78369,.962138,-.157243,.245769,.810769,.966979,-.152872,.235127,.836999,.969566,-.148209,.22347,.862684,.972372,-.142211,.211147,.887847,.975916,-.135458,.198606,.911843,.978026,-.128398,.185498,.934795,.979686,-.120313,.17171,.956787,.980748,-.11166,.158159,.978046,.981622,-.103035,.144399,.997693,.982356,-.0930328,.13001,1.01642,.983308,-.0834627,.115778,1.03366,.985037,-.0732249,.101327,1.05014,.986493,-.0628145,.086554,1.06507,.988484,-.0526556,.0720413,1.07907,.991051,-.0415744,.0571151,1.09189,.993523,-.0314275,.0426643,1.10369,.99628,-.0203603,.0279325,1.11423,.998344,-.0102446,.0138182,1.12421,.999997,42612e-8,-193628e-9,1.1333,.871555,-660007e-11,.329176,174749e-10,.875255,-166579e-9,.330571,441051e-9,.875644,-666394e-9,.330718,.00176441,.875159,-.00149903,.330536,.00396899,.87516,-.00266493,.330536,.007056,.875158,-.00416393,.330535,.0110251,.87516,-.00599598,.330535,.0158764,.875163,-.00816108,.330536,.0216101,.875174,-.0106591,.330538,.0282266,.875199,-.0134899,.330545,.0357266,.875257,-.0166538,.330563,.0441117,.875304,-.0201501,.330575,.0533821,.875373,-.0239785,.330595,.0635395,.875464,-.0281389,.330619,.0745872,.875565,-.0326301,.330645,.0865255,.875691,-.0374516,.330676,.0993599,.875897,-.0425993,.330733,.113093,.876091,-.0480576,.330776,.127722,.876353,-.0537216,.330826,.143227,.876649,-.0589807,.330809,.159462,.877034,-.0647865,.330819,.176642,.877443,-.0709789,.330817,.194702,.877956,-.0774782,.330832,.213577,.878499,-.0843175,.330822,.233246,.879144,-.0912714,.330804,.253512,.879982,-.0980824,.330766,.274137,.88097,-.105823,.330864,.295209,.882051,-.113671,.330896,.317226,.883397,-.120303,.330545,.341068,.884987,-.12667,.330068,.365613,.886789,-.133118,.329418,.390807,.889311,-.139024,.328683,.416494,.891995,-.144971,.327729,.442618,.895106,-.150747,.326521,.469131,.899527,-.156283,.325229,.495921,.90504,-.161707,.32378,.523162,.909875,-.165661,.32122,.55092,.91561,-.168755,.317942,.579928,.921225,-.171193,.313983,.608539,.927308,-.17319,.309636,.636854,.933077,-.174819,.304262,.66523,.938766,-.175002,.297563,.693609,.943667,-.173946,.289613,.722157,.949033,-.172221,.281227,.750021,.953765,-.169869,.271545,.777466,.95804,-.166578,.261034,.804853,.962302,-.161761,.249434,.831569,.966544,-.156636,.237484,.857779,.969372,-.150784,.224395,.883051,.972486,-.143672,.210786,.907864,.975853,-.135772,.196556,.931223,.977975,-.127942,.182307,.954061,.979122,-.118347,.167607,.97531,.980719,-.109112,.152739,.995666,.981223,-.0991789,.137932,1.01475,.98216,-.0883553,.122692,1.03253,.983379,-.0780825,.107493,1.04917,.985434,-.0665646,.0917791,1.06464,.987332,-.0557714,.0764949,1.07896,.990004,-.0442805,.060721,1.09199,.992975,-.0331676,.0452284,1.10393,.995811,-.0219547,.0297934,1.11476,.9982,-.0107613,.0146415,1.12484,1.00002,248678e-9,-14555e-8,1.13413,.859519,-693595e-11,.347264,171673e-10,.859843,-17503e-8,.347394,433219e-9,.859656,-700076e-9,.347319,.00173277,.859671,-.00157517,.347325,.00389875,.859669,-.00280028,.347324,.00693112,.85967,-.0043754,.347324,.01083,.859665,-.00630049,.347321,.0155954,.859685,-.0085755,.347328,.0212278,.859694,-.0112003,.347329,.0277273,.859718,-.0141747,.347336,.0350946,.85976,-.0174988,.347348,.0433314,.85982,-.0211722,.347366,.0524384,.859892,-.0251941,.347387,.0624168,.860006,-.0295649,.347422,.0732708,.860122,-.0342825,.347453,.0849999,.860282,-.0393462,.347499,.0976102,.860482,-.0447513,.347554,.111104,.860719,-.0504775,.347614,.125479,.860998,-.0563577,.347666,.140703,.861322,-.0619473,.347662,.156681,.861724,-.0681277,.347684,.173597,.862198,-.0746567,.347709,.191371,.862733,-.0815234,.347727,.209976,.863371,-.0886643,.347744,.229351,.86414,-.0957908,.347734,.24934,.865138,-.102912,.34772,.269797,.866182,-.110924,.3478,.290654,.867436,-.119223,.347911,.312074,.869087,-.126197,.347649,.335438,.870859,-.133145,.347222,.359732,.872997,-.139869,.346645,.38467,.875939,-.146089,.345935,.41019,.879012,-.152334,.345012,.436218,.883353,-.15821,.343924,.462641,.888362,-.164097,.342636,.489449,.895026,-.169528,.341351,.516629,.900753,-.174408,.339115,.544109,.906814,-.17751,.335809,.572857,.912855,-.180101,.331597,.601554,.919438,-.182116,.32698,.630198,.925962,-.183494,.321449,.658404,.931734,-.184159,.314595,.686625,.93762,-.18304,.306462,.71531,.943858,-.181323,.297514,.744272,.948662,-.178683,.287447,.771462,.953299,-.175379,.276166,.798593,.957346,-.170395,.263758,.8256,.962565,-.165042,.251019,.852575,.966075,-.158655,.237011,.878316,.969048,-.151707,.222518,.90329,.972423,-.143271,.207848,.927745,.975833,-.134824,.192463,.950859,.977629,-.125444,.1768,.972947,.978995,-.114949,.161033,.993263,.980533,-.104936,.145523,1.01337,.980745,-.0935577,.129799,1.03128,.981814,-.0822956,.113486,1.04825,.983943,-.0710082,.0972925,1.06405,.986141,-.0587931,.0808138,1.0785,.988878,-.0472755,.0644915,1.09204,.992132,-.0349128,.0478128,1.10413,.9953,-.0232407,.031621,1.11527,.998117,-.0112713,.0154935,1.12551,1.00003,339743e-9,-195763e-9,1.13504,.845441,-729126e-11,.364305,169208e-10,.843588,-183164e-9,.363506,425067e-9,.843412,-73253e-8,.36343,.00169999,.843401,-.00164818,.363426,.00382495,.843399,-.00293008,.363425,.00679993,.843401,-.00457822,.363425,.010625,.843394,-.00659249,.363421,.0153002,.843398,-.00897282,.363421,.0208258,.843415,-.0117191,.363426,.0272024,.843438,-.0148312,.363432,.0344305,.843483,-.018309,.363447,.0425116,.84356,-.0221521,.363472,.0514471,.843646,-.0263597,.363499,.061238,.843743,-.0309315,.363527,.0718873,.84388,-.0358658,.363569,.0833969,.844079,-.0411624,.363631,.0957742,.844279,-.0468128,.363688,.109015,.844549,-.0527923,.363761,.123124,.844858,-.0588204,.363817,.138044,.84522,-.0647573,.36383,.153755,.845669,-.0713181,.363879,.170394,.846155,-.0781697,.363908,.187861,.846789,-.0853913,.363969,.206176,.847502,-.0928086,.363999,.225244,.8484,-.10005,.363997,.244926,.849461,-.107615,.364008,.265188,.850562,-.115814,.364055,.28587,.851962,-.124334,.364179,.306926,.854326,-.131995,.364233,.329605,.856295,-.139338,.363856,.35359,.858857,-.146346,.363347,.37831,.862428,-.152994,.362807,.403722,.866203,-.159463,.361963,.429537,.871629,-.165623,.36112,.456,.877365,-.171649,.359917,.482773,.883744,-.177151,.35848,.509705,.890693,-.182381,.356523,.537215,.897278,-.186076,.3533,.565493,.903958,-.188602,.349095,.594293,.910908,-.190755,.344215,.623165,.918117,-.192063,.338606,.651573,.924644,-.192758,.331544,.679869,.931054,-.192238,.323163,.708668,.937303,-.190035,.313529,.737201,.943387,-.187162,.303152,.764977,.948494,-.183876,.29146,.792683,.952546,-.178901,.277917,.819228,.958077,-.173173,.264753,.846559,.962462,-.16645,.25002,.872962,.966569,-.159452,.234873,.898729,.969108,-.15074,.218752,.923126,.973072,-.141523,.202673,.947278,.975452,-.132075,.186326,.969938,.977784,-.121257,.169396,.991325,.97899,-.110182,.153044,1.01123,.979777,-.0989634,.136485,1.0299,.980865,-.0865894,.119343,1.04727,.982432,-.0746115,.102452,1.06341,.984935,-.0621822,.0852423,1.07834,.987776,-.0495694,.0678546,1.092,.99103,-.0372386,.0506917,1.1043,.99474,-.0244353,.0333316,1.11576,.997768,-.0121448,.0164348,1.12617,1.00003,31774e-8,-169504e-9,1.13598,.825551,-756799e-11,.378425,165099e-10,.82664,-190922e-9,.378923,416504e-9,.826323,-763495e-9,.378779,.0016656,.826359,-.00171789,.378795,.00374768,.82636,-.00305402,.378795,.00666259,.826368,-.00477185,.378798,.0104104,.826364,-.00687131,.378795,.0149912,.826368,-.00935232,.378795,.0204054,.826376,-.0122146,.378797,.0266532,.826399,-.0154581,.378803,.0337355,.82646,-.0190825,.378824,.0416537,.826525,-.0230873,.378846,.0504091,.826614,-.0274719,.378876,.0600032,.82674,-.0322355,.378917,.0704393,.826888,-.0373766,.378964,.0817195,.827078,-.0428936,.379024,.0938492,.827318,-.0487778,.379099,.106828,.82764,-.0549935,.379199,.120659,.827926,-.0611058,.379227,.13526,.828325,-.0675054,.379275,.150713,.828801,-.0743455,.379332,.167034,.8294,-.0815523,.379415,.184209,.830094,-.0890779,.379495,.202203,.8309,-.096736,.379555,.220945,.831943,-.104135,.379577,.240306,.833037,-.112106,.379604,.260317,.834278,-.120554,.379668,.2808,.836192,-.129128,.3799,.301654,.838671,-.137541,.380109,.323502,.840939,-.14523,.379809,.347176,.844575,-.15248,.379593,.371706,.848379,-.159607,.37909,.39688,.853616,-.166267,.378617,.422702,.858921,-.172698,.377746,.448919,.865324,-.178823,.376749,.475661,.872207,-.184542,.375363,.502599,.880018,-.189836,.373657,.529914,.88694,-.194294,.370673,.557683,.894779,-.197022,.36662,.586848,.902242,-.199108,.36138,.615831,.909914,-.200398,.355434,.644478,.917088,-.20094,.348173,.672905,.923888,-.200671,.339482,.701327,.930495,-.198773,.32956,.730101,.937247,-.195394,.318363,.758383,.943108,-.191956,.306323,.786539,.948296,-.187227,.292576,.813637,.953472,-.181165,.278234,.840793,.958485,-.174119,.263054,.867712,.962714,-.166564,.246756,.893635,.966185,-.158181,.229945,.919028,.970146,-.148275,.212633,.943413,.973491,-.138157,.195229,.966627,.975741,-.127574,.178048,.988817,.977238,-.11554,.160312,1.00924,.978411,-.10364,.142857,1.02845,.979811,-.0913122,.125317,1.04648,.98116,-.0782558,.107627,1.06284,.983543,-.0655957,.0895862,1.07798,.986789,-.0520411,.0713756,1.092,.990292,-.0389727,.053228,1.10484,.994187,-.025808,.0351945,1.11642,.997499,-.0126071,.0173198,1.12703,.999999,275604e-9,-148602e-9,1.13674,.81075,-78735e-10,.394456,161829e-10,.808692,-198293e-9,.393453,407564e-9,.80846,-792877e-9,.39334,.00162965,.808595,-.00178416,.393407,.00366711,.808597,-.00317182,.393408,.00651934,.808598,-.00495589,.393408,.0101866,.808591,-.00713627,.393403,.0146689,.808592,-.00971285,.393402,.0199667,.80861,-.0126855,.393407,.0260803,.808633,-.0160538,.393413,.0330107,.80868,-.0198175,.393429,.0407589,.808748,-.0239758,.393453,.0493264,.808854,-.0285286,.39349,.0587161,.808992,-.0334748,.39354,.0689304,.809141,-.0388116,.393588,.0799707,.809352,-.0445375,.39366,.0918432,.809608,-.0506427,.393742,.104549,.809915,-.0570708,.393834,.118085,.810253,-.0633526,.393885,.132377,.810687,-.0700966,.393953,.147537,.811233,-.0772274,.394047,.163543,.811865,-.0847629,.394148,.180394,.812648,-.0925663,.394265,.198051,.813583,-.100416,.394363,.216443,.814683,-.108119,.394402,.235502,.815948,-.11644,.394489,.255242,.817278,-.125036,.394542,.275441,.819605,-.133655,.39486,.296094,.822256,-.142682,.395248,.317309,.825349,-.150756,.395241,.340516,.829605,-.158392,.395285,.364819,.83391,-.165801,.394922,.389736,.839808,-.172677,.394691,.415409,.845708,-.179448,.394006,.441546,.853025,-.185746,.393279,.46832,.859666,-.191684,.391655,.495302,.86789,-.197146,.390068,.52262,.875845,-.201904,.38727,.550336,.882634,-.205023,.382688,.578825,.891076,-.207098,.377543,.608103,.900589,-.208474,.371752,.63723,.90791,-.209068,.364016,.665769,.915971,-.208655,.355593,.694428,.923455,-.20729,.345439,.723224,.931514,-.203821,.334099,.751925,.937885,-.19986,.321069,.780249,.943136,-.194993,.306571,.8077,.948818,-.189132,.291556,.83497,.954433,-.181617,.275745,.86188,.959078,-.173595,.258695,.888562,.962705,-.164855,.240825,.914008,.966753,-.155129,.22268,.939145,.970704,-.144241,.204542,.963393,.973367,-.133188,.185927,.985983,.975984,-.121146,.167743,1.00704,.976994,-.108366,.149218,1.02715,.978485,-.0956746,.13131,1.0455,.980074,-.0820733,.112513,1.06221,.98225,-.0684061,.0938323,1.07782,.98553,-.0549503,.0749508,1.09199,.989529,-.0407857,.055848,1.10508,.993536,-.0271978,.0368581,1.11684,.997247,-.0132716,.0181845,1.12789,1,431817e-9,-198809e-9,1.13792,.785886,-812608e-11,.405036,157669e-10,.790388,-205278e-9,.407355,398297e-9,.790145,-820824e-9,.407231,.00159263,.790135,-.00184681,.407226,.00358336,.790119,-.00328316,.407218,.00637039,.790126,-.00512988,.40722,.0099539,.79013,-.00738684,.407221,.0143339,.790135,-.0100538,.407221,.0195107,.790134,-.0131306,.407217,.0254848,.79016,-.0166169,.407224,.0322572,.790197,-.020512,.407236,.0398284,.790273,-.0248157,.407263,.0482014,.790381,-.029527,.407304,.0573777,.790521,-.0346446,.407355,.0673602,.790704,-.0401665,.40742,.0781522,.790925,-.0460896,.407499,.0897582,.791195,-.0524017,.407589,.10218,.791522,-.0590121,.407691,.11541,.791878,-.0654876,.407748,.12939,.792361,-.0725207,.407849,.144237,.792942,-.0799844,.407963,.159924,.79362,-.0877896,.408087,.176425,.794529,-.0958451,.408259,.193733,.795521,-.103827,.408362,.211756,.796778,-.111937,.408482,.230524,.798027,-.120521,.408547,.249967,.799813,-.129242,.408721,.269926,.802387,-.138048,.409148,.290338,.805279,-.147301,.409641,.311193,.809251,-.155895,.410154,.333611,.813733,-.163942,.410297,.357615,.819081,-.171666,.410373,.382339,.825427,-.178905,.410348,.407828,.83172,-.185812,.409486,.434034,.83877,-.192318,.408776,.460493,.845817,-.198249,.407176,.487346,.854664,-.204034,.405719,.514832,.863495,-.208908,.403282,.542401,.871883,-.212765,.399293,.570683,.88065,-.214911,.393803,.599947,.89004,-.216214,.387536,.62932,.898476,-.216745,.379846,.658319,.906738,-.216387,.370625,.687138,.914844,-.215053,.360139,.71601,.923877,-.212007,.348849,.745124,.931925,-.207481,.335639,.773366,.938054,-.202418,.320798,.801636,.943895,-.196507,.304772,.829055,.949468,-.189009,.288033,.856097,.955152,-.180539,.270532,.88301,.959403,-.171437,.251639,.909296,.963309,-.161661,.232563,.934868,.967399,-.150425,.213231,.959662,.972009,-.138659,.194247,.98302,.97433,-.126595,.174718,1.00517,.975823,-.113205,.155518,1.02566,.976371,-.0996096,.136709,1.04418,.978705,-.0860754,.117571,1.06146,.981477,-.0714438,.0980046,1.07777,.984263,-.0572304,.0782181,1.09214,.988423,-.0428875,.0584052,1.10553,.993,-.0282442,.038522,1.11758,.99704,-.0140183,.0190148,1.12864,.999913,369494e-9,-145203e-9,1.13901,.777662,-84153e-10,.423844,154403e-10,.770458,-211714e-9,.419915,38845e-8,.770716,-846888e-9,.420055,.00155386,.770982,-.00190567,.420202,.00349653,.770981,-.00338782,.420201,.00621606,.77098,-.00529338,.4202,.00971274,.770983,-.00762223,.4202,.0139867,.770985,-.0103741,.420198,.0190381,.770996,-.0135489,.4202,.0248677,.771029,-.0171461,.420212,.0314764,.771052,-.0211647,.420215,.0388648,.771131,-.0256048,.420245,.047036,.771235,-.0304647,.420284,.0559911,.771383,-.0357436,.420341,.0657346,.771591,-.0414392,.420423,.0762694,.771819,-.0475462,.420506,.0875984,.772123,-.0540506,.420617,.099727,.772464,-.060797,.42072,.112637,.772855,-.0675393,.420799,.126313,.773317,-.0748323,.420893,.140824,.773981,-.0825681,.421058,.15617,.774746,-.0906307,.421226,.172322,.77566,-.0988982,.421397,.189253,.776837,-.106994,.421569,.206912,.778097,-.115528,.421704,.225359,.779588,-.124317,.421849,.24447,.781574,-.133139,.422097,.264156,.784451,-.142179,.422615,.284318,.787682,-.15165,.423269,.304902,.792433,-.160771,.424396,.3265,.797359,-.169166,.424772,.35014,.803986,-.177149,.425475,.374768,.809504,-.184745,.424996,.399928,.815885,-.19173,.424247,.425796,.823513,-.198525,.423515,.452287,.832549,-.204709,.422787,.479321,.841653,-.210447,.421187,.506718,.850401,-.215501,.418519,.53432,.859854,-.219752,.414715,.56242,.869364,-.222305,.409462,.591558,.878837,-.223744,.402926,.621074,.888636,-.224065,.395043,.650538,.898132,-.223742,.38564,.679538,.907181,-.222308,.375378,.708674,.915621,-.219837,.363212,.737714,.9239,-.215233,.349313,.767014,.931644,-.209592,.334162,.795133,.938887,-.203644,.317943,.823228,.945282,-.196349,.300581,.850822,.950758,-.18742,.282195,.877594,.956146,-.177879,.262481,.904564,.960355,-.167643,.242487,.930741,.965256,-.156671,.222668,.955868,.968029,-.144123,.201907,.979869,.97251,-.131305,.18202,1.00291,.974925,-.118335,.161909,1.02392,.975402,-.103714,.142129,1.0433,.976987,-.089415,.122447,1.06089,.979677,-.0748858,.102248,1.07713,.983184,-.0596086,.0814851,1.09218,.987466,-.0447671,.0609484,1.10585,.992348,-.0295217,.0401835,1.11829,.996674,-.0143917,.0198163,1.12966,1.00003,321364e-9,-149983e-9,1.1402,.757901,-869074e-11,.436176,151011e-10,.751195,-217848e-9,.432317,378533e-9,.751178,-871373e-9,.432307,.0015141,.751195,-.00196061,.432317,.0034068,.751198,-.00348552,.432318,.00605659,.751195,-.00544599,.432315,.00946353,.751207,-.00784203,.43232,.013628,.751213,-.0106732,.43232,.0185499,.751221,-.0139393,.432319,.0242302,.751244,-.0176398,.432325,.0306694,.7513,-.0217743,.432348,.0378698,.751358,-.0263412,.432367,.0458321,.751458,-.0313396,.432404,.0545587,.751608,-.0367682,.432464,.0640543,.7518,-.0426246,.43254,.0743222,.752065,-.0489031,.432645,.0853668,.752376,-.0555828,.432762,.0971911,.752715,-.0623861,.432859,.109768,.753137,-.069415,.432958,.123126,.753676,-.0770039,.433099,.137308,.754345,-.084971,.433272,.15229,.755235,-.0932681,.433504,.168075,.756186,-.10171,.433693,.184625,.757363,-.110019,.433857,.201897,.75884,-.11887,.434102,.220014,.760467,-.127881,.434306,.238778,.762969,-.136766,.434751,.258172,.765823,-.14612,.43529,.278062,.769676,-.15566,.436236,.298437,.774909,-.165177,.437754,.319532,.77994,-.17402,.438343,.342505,.785757,-.182201,.438609,.366693,.792487,-.190104,.438762,.391668,.80038,-.197438,.438795,.417494,.808494,-.204365,.438226,.443933,.817695,-.210714,.437283,.470929,.828111,-.216651,.436087,.498569,.837901,-.221804,.433717,.526165,.847813,-.226318,.430133,.554155,.858314,-.229297,.425213,.582822,.868891,-.230999,.418576,.612847,.878941,-.231155,.410405,.642445,.888809,-.230935,.400544,.672024,.898089,-.229343,.389613,.701366,.908081,-.226886,.377197,.730763,.916819,-.222676,.363397,.759642,.924968,-.216835,.347437,.788775,.932906,-.210245,.32995,.817135,.940025,-.202992,.312262,.844912,.946101,-.19436,.293313,.872164,.952835,-.184125,.273638,.899443,.957347,-.173657,.252385,.926389,.961434,-.162204,.231038,.951947,.965522,-.14979,.209834,.976751,.969412,-.136307,.188821,1.00022,.973902,-.122527,.168013,1.02229,.974045,-.108213,.147634,1.04199,.975775,-.0927397,.12705,1.06019,.978383,-.0778212,.106309,1.07711,.98211,-.0621216,.0849279,1.09245,.986517,-.0463847,.0633519,1.10651,.991696,-.0309353,.0419698,1.11903,.996349,-.0150914,.0206272,1.13073,1.00003,442449e-9,-231396e-9,1.14146,.727498,-885074e-11,.441528,145832e-10,.730897,-223525e-9,.443589,368298e-9,.730796,-893996e-9,.443528,.00147303,.730805,-.00201149,.443533,.00331433,.730814,-.00357596,.443538,.00589222,.730815,-.00558734,.443538,.00920678,.730822,-.00804544,.44354,.0132582,.730836,-.0109501,.443545,.0180468,.730848,-.0143008,.443546,.0235732,.730871,-.0180969,.443552,.0298382,.730915,-.022338,.443567,.0368438,.730982,-.0270225,.443591,.044591,.731076,-.0321491,.443627,.0530831,.731245,-.0377166,.443699,.0623243,.73144,-.0437216,.443777,.0723181,.7317,-.0501576,.443881,.0830691,.732034,-.0569942,.444014,.0945809,.732388,-.0638756,.444113,.106825,.732853,-.071203,.444247,.119859,.733473,-.0790076,.444442,.13369,.734195,-.0871937,.444645,.148304,.735069,-.095696,.444877,.163702,.736169,-.10426,.445133,.179861,.73747,-.112853,.44537,.196778,.738991,-.12199,.445651,.214496,.740865,-.131153,.445958,.232913,.743637,-.140245,.446548,.251977,.746797,-.149722,.447246,.271551,.751517,-.159341,.448656,.291774,.756156,-.169106,.449866,.312455,.761519,-.178436,.450919,.334552,.768295,-.186904,.451776,.358491,.776613,-.195117,.452832,.383446,.783966,-.202695,.45249,.408945,.793542,-.20985,.452587,.435364,.803192,-.216403,.451852,.462336,.813892,-.22251,.450708,.48987,.824968,-.227676,.4486,.517697,.835859,-.232443,.445156,.545975,.846825,-.235775,.440351,.574483,.858085,-.237897,.433641,.604246,.868825,-.238074,.425354,.634101,.879638,-.237661,.415383,.664201,.889966,-.236186,.404136,.693918,.899479,-.233599,.390917,.723481,.908769,-.229737,.376352,.75258,.917966,-.223836,.360372,.781764,.926304,-.217067,.342551,.811139,.934626,-.209309,.324238,.839585,.941841,-.20071,.304484,.867044,.94789,-.190602,.283607,.894579,.954196,-.179253,.262205,.921743,.958383,-.167646,.239847,.948026,.963119,-.155073,.218078,.973296,.966941,-.141426,.195899,.998135,.970836,-.126849,.174121,1.02021,.973301,-.112296,.153052,1.04085,.97448,-.0964965,.131733,1.05946,.977045,-.080489,.10997,1.07693,.980751,-.064844,.0881657,1.09254,.985475,-.0481938,.0657987,1.10697,.991089,-.0319185,.0435215,1.12004,.996122,-.0158088,.0214779,1.13173,1.00001,372455e-9,-200295e-9,1.14291,.708622,-907597e-11,.45304,141962e-10,.711162,-228911e-9,.454662,358052e-9,.709812,-914446e-9,.453797,.00143034,.709865,-.00205819,.453834,.00321935,.709864,-.00365894,.453833,.00572331,.709855,-.00571692,.453826,.00894278,.709862,-.00823201,.453828,.012878,.709875,-.011204,.453832,.0175295,.709896,-.0146323,.453839,.0228978,.709925,-.0185163,.453847,.0289839,.709974,-.0228551,.453866,.0357894,.710045,-.0276473,.453892,.0433161,.710133,-.032891,.453924,.0515665,.710292,-.0385851,.453992,.0605458,.710485,-.0447254,.45407,.0702574,.710769,-.0513051,.454192,.0807077,.711106,-.0582733,.454329,.091896,.711516,-.0652866,.45446,.103814,.712071,-.0728426,.454653,.116508,.712676,-.0808307,.45484,.129968,.713476,-.0892216,.455096,.144206,.714377,-.0979047,.455346,.159212,.715579,-.106531,.455647,.174973,.716977,-.115492,.455961,.191504,.71862,-.124821,.456315,.208835,.72084,-.134079,.4568,.226869,.723786,-.143427,.457521,.245582,.727464,-.153061,.458475,.264957,.732771,-.162768,.460239,.284948,.736515,-.172627,.460899,.30522,.743519,-.182487,.463225,.326717,.750041,-.191295,.464027,.350113,.758589,-.199746,.465227,.374782,.767703,-.207584,.465877,.400226,.777484,-.214973,.465996,.426442,.788792,-.221796,.466019,.453688,.800194,-.228038,.465083,.481246,.811234,-.233346,.462506,.509086,.822859,-.238073,.459257,.537338,.835082,-.241764,.454863,.566108,.846332,-.244241,.448163,.595126,.858355,-.244736,.439709,.625574,.87034,-.244278,.429837,.65617,.881027,-.24255,.418002,.686029,.891007,-.239912,.404325,.716039,.900874,-.236133,.389222,.745518,.911072,-.230672,.373269,.775026,.920359,-.22356,.355083,.804521,.928604,-.215591,.335533,.834045,.937175,-.206503,.315278,.861612,.942825,-.196684,.293653,.889131,.949805,-.185116,.271503,.916853,.955535,-.172703,.248821,.943541,.959843,-.159978,.225591,.970132,.964393,-.146375,.202719,.994709,.968008,-.131269,.179928,1.0186,.971013,-.11569,.158007,1.03928,.973334,-.1003,.13624,1.05887,.975775,-.0833352,.1138,1.07652,.979579,-.0668981,.0913141,1.09297,.984323,-.0500902,.0683051,1.10734,.990351,-.0332377,.0451771,1.12084,.995823,-.0161491,.0221705,1.13296,1.0001,234083e-9,-108712e-9,1.14441,.683895,-924677e-11,.46015,137429e-10,.68833,-233383e-9,.463134,346865e-9,.688368,-933547e-9,.463159,.00138748,.688367,-.00210049,.463159,.00312187,.688369,-.00373415,.463159,.00555004,.688377,-.00583449,.463163,.00867216,.688386,-.00840128,.463166,.0124884,.688398,-.0114343,.463169,.0169993,.688418,-.0149329,.463175,.0222054,.688453,-.0188964,.463188,.028108,.688515,-.0233239,.463214,.0347085,.68857,-.0282136,.463231,.0420091,.688679,-.033564,.463276,.0500132,.688854,-.0393733,.463356,.0587255,.689038,-.0456354,.46343,.0681476,.689321,-.0523433,.463553,.0782897,.689662,-.059412,.463693,.0891501,.690188,-.0665736,.4639,.100735,.690755,-.0743106,.464107,.113074,.691405,-.0824722,.464329,.126161,.692198,-.0910484,.464585,.140007,.693196,-.0998778,.464893,.154612,.69454,-.108651,.465285,.169984,.695921,-.117855,.465596,.186106,.697749,-.12734,.466056,.203034,.700375,-.136714,.466771,.220703,.703395,-.146386,.467579,.239062,.707904,-.156096,.469067,.258188,.711673,-.165904,.469851,.277759,.717489,-.175812,.471815,.297935,.724051,-.185931,.47389,.318916,.731965,-.195238,.47587,.341591,.741151,-.204021,.477523,.366062,.751416,-.212113,.478881,.391396,.761848,-.21979,.479226,.417599,.771886,-.2267,.478495,.444401,.783998,-.232991,.477622,.472084,.796523,-.238645,.475833,.500193,.808851,-.243396,.472568,.52865,.821191,-.247226,.467857,.557362,.834261,-.250102,.461871,.586768,.846762,-.251056,.453543,.617085,.859867,-.250604,.443494,.647659,.871948,-.248783,.431711,.678119,.882967,-.245855,.417911,.708399,.892826,-.242168,.401993,.738256,.90332,-.237062,.385371,.767999,.913633,-.22997,.366837,.798191,.922774,-.221687,.346372,.827756,.931371,-.212345,.325682,.856425,.938929,-.20206,.303665,.884299,.944821,-.190981,.280786,.912023,.951792,-.178065,.2573,.939669,.957712,-.164634,.233448,.96655,.961912,-.150863,.209504,.992366,.966382,-.13577,.18597,1.01633,.969588,-.119593,.162905,1.03843,.971777,-.103203,.14053,1.05841,.97433,-.0865888,.117909,1.07632,.978686,-.0690829,.0944101,1.09326,.983281,-.0516568,.0705671,1.10796,.989562,-.034558,.0468592,1.12182,.995465,-.0167808,.0229846,1.1342,.999991,373016e-9,-235606e-9,1.1459,.662251,-939016e-11,.468575,132714e-10,.666634,-237624e-9,.471675,335842e-9,.666411,-950385e-9,.471516,.00134321,.666399,-.00213833,.471509,.00302221,.666386,-.0038014,.471499,.00537283,.666405,-.00593958,.471511,.00839533,.666406,-.00855253,.471508,.0120898,.666428,-.0116401,.471519,.0164569,.666444,-.0152015,.471522,.0214971,.66649,-.0192362,.471543,.027212,.666537,-.0237428,.471558,.033603,.666617,-.0287198,.471591,.0406728,.666718,-.0341647,.471631,.0484238,.666889,-.0400759,.47171,.0568621,.667104,-.0464479,.471805,.0659915,.667374,-.0532677,.471923,.0758178,.667772,-.0603805,.472098,.0863425,.668371,-.0677392,.472363,.0975917,.668971,-.0756028,.472596,.109567,.669696,-.0839293,.472869,.122272,.670481,-.0926683,.473126,.135718,.6715,-.1016,.473442,.149914,.672911,-.110566,.47389,.164882,.674512,-.119984,.474354,.180602,.67651,-.129574,.474922,.19711,.679292,-.139106,.475764,.214371,.682798,-.148993,.476886,.232405,.686955,-.158737,.478179,.251153,.691406,-.168754,.479432,.270436,.697438,-.178703,.481481,.290374,.704761,-.188955,.484143,.311044,.713599,-.198814,.487007,.333003,.723194,-.207869,.488962,.357144,.732601,-.216189,.489815,.382169,.744193,-.22398,.490888,.408227,.754907,-.231156,.490355,.434928,.767403,-.23747,.489548,.462599,.78107,-.243503,.488274,.490908,.793893,-.248114,.484843,.519421,.807296,-.25222,.4803,.548561,.820529,-.255265,.474097,.577772,.833716,-.256741,.466041,.607782,.848403,-.25637,.456547,.638807,.860755,-.254804,.443946,.670058,.874012,-.251834,.430852,.700749,.885619,-.247867,.414903,.731446,.896069,-.242634,.397276,.761191,.906266,-.236093,.378535,.791053,.916759,-.227543,.358038,.821298,.92523,-.21783,.335705,.850747,.93436,-.207534,.313797,.879258,.941631,-.195983,.289671,.907734,.947564,-.183567,.265319,.935206,.953681,-.169345,.240815,.962739,.960008,-.154909,.216119,.989227,.964145,-.140161,.192096,1.01465,.968171,-.123411,.167855,1.03737,.969859,-.106525,.144817,1.05767,.972666,-.0891023,.12149,1.0761,.977055,-.0718094,.0975306,1.09336,.982527,-.0534213,.0730217,1.10878,.989001,-.0355579,.0483366,1.12285,.99512,-.0176383,.023938,1.13548,1.00007,368831e-9,-211581e-9,1.14744,.651047,-960845e-11,.484101,12922e-9,.644145,-241347e-9,.478968,324578e-9,.64396,-965142e-9,.478831,.00129798,.64396,-.00217154,.47883,.00292046,.643968,-.00386049,.478835,.00519202,.643974,-.00603186,.478838,.0081128,.643977,-.0086854,.478836,.011683,.643982,-.0118207,.478834,.0159031,.644024,-.0154374,.478856,.0207743,.644059,-.0195343,.478868,.0262975,.644122,-.0241103,.478896,.0324747,.644207,-.0291638,.478933,.039309,.64432,-.0346919,.478981,.0468029,.644481,-.0406919,.479053,.0549614,.644722,-.047159,.479169,.0637909,.645013,-.0540748,.479302,.0732974,.645503,-.0612001,.479541,.0834898,.646117,-.0687303,.479829,.0943873,.646707,-.0767846,.480061,.105991,.647431,-.0852465,.480343,.11831,.64831,-.0940719,.48066,.131348,.649486,-.103056,.481083,.14514,.650864,-.112261,.481528,.159676,.652604,-.121852,.482102,.174979,.654825,-.131505,.482813,.191079,.657876,-.141189,.483876,.207927,.661339,-.151239,.48499,.225586,.665463,-.161091,.486279,.243947,.670542,-.171235,.487968,.262957,.677361,-.181347,.49053,.282781,.685672,-.191679,.493862,.303311,.694551,-.201781,.49699,.324607,.703753,-.211164,.498884,.347916,.713703,-.219675,.500086,.372628,.725911,-.227836,.501554,.398694,.73862,-.23533,.502193,.425529,.752118,-.241786,.501811,.453209,.76579,-.247865,.500185,.481381,.779568,-.252696,.497159,.51011,.793991,-.256802,.492765,.539322,.808182,-.259942,.486827,.569078,.821698,-.261703,.478386,.598818,.836009,-.262006,.468772,.629762,.849824,-.260333,.456352,.661366,.863888,-.257398,.442533,.69295,.876585,-.253264,.426573,.723608,.888665,-.248026,.408964,.754378,.899537,-.241487,.389677,.784761,.9094,-.233463,.368516,.814688,.920166,-.223397,.346624,.845009,.928899,-.21255,.322717,.874431,.937156,-.200869,.298698,.902922,.943861,-.188387,.273491,.931356,.949557,-.174341,.247866,.958854,.955862,-.158994,.222496,.986098,.961721,-.143664,.197522,1.01229,.965976,-.127412,.17302,1.03571,.968652,-.109798,.148954,1.05699,.971084,-.0916787,.125044,1.07587,.975584,-.0739634,.100577,1.09372,.98122,-.055322,.0753666,1.10948,.988253,-.0366825,.0498899,1.12394,.99482,-.0180389,.024611,1.13694,1.00001,229839e-9,-188283e-9,1.14919,.613867,-964198e-11,.479449,123452e-10,.621485,-244534e-9,.485399,313091e-9,.621429,-978202e-9,.485353,.00125245,.62112,-.00220004,.485114,.00281687,.621119,-.0039111,.485112,.00500783,.621122,-.00611091,.485112,.00782498,.621133,-.00879922,.485117,.0112687,.621152,-.0119756,.485125,.0153394,.621183,-.0156396,.485139,.0200382,.621227,-.0197898,.485158,.0253663,.621298,-.0244253,.485192,.0313261,.621388,-.0295441,.485233,.0379204,.621507,-.0351432,.485286,.0451523,.621693,-.0412198,.485378,.0530277,.621933,-.0477673,.485495,.0615522,.622232,-.0547574,.485635,.0707316,.622809,-.0619417,.485943,.0805883,.623407,-.069625,.486232,.0911267,.62406,-.077796,.486516,.102354,.624835,-.0863731,.486838,.114279,.625758,-.095251,.487188,.126902,.627043,-.104299,.487695,.140285,.628438,-.113724,.488163,.154397,.630325,-.123417,.488858,.169267,.632801,-.133137,.489754,.184941,.635784,-.143052,.490815,.20136,.639406,-.153132,.492048,.218643,.643872,-.163143,.49363,.236615,.6499,-.17333,.496009,.255449,.657201,-.183622,.498994,.275006,.666221,-.194019,.502888,.295354,.674419,-.204192,.505459,.316244,.683729,-.21406,.507771,.33849,.695584,-.222854,.510245,.363166,.708583,-.231315,.512293,.389071,.721233,-.238911,.512747,.415737,.735134,-.245657,.512482,.443331,.750179,-.251879,.511526,.471891,.765073,-.256911,.508935,.500892,.779794,-.261144,.504341,.530294,.794801,-.264316,.498515,.560144,.810339,-.266276,.491015,.590213,.824818,-.266981,.481126,.620865,.839375,-.265778,.468685,.652687,.853043,-.262748,.453925,.684759,.867335,-.258474,.437912,.716209,.88037,-.253187,.419648,.747508,.891711,-.246476,.39982,.77797,.902896,-.238735,.37879,.808586,.913601,-.22885,.355891,.838843,.923019,-.217656,.331773,.869014,.933432,-.205539,.307356,.898512,.939691,-.192595,.281321,.9269,.946938,-.178945,.255441,.955297,.952372,-.163587,.229013,.983231,.95909,-.147214,.203179,1.00971,.963675,-.13064,.17792,1.03438,.968247,-.113121,.152898,1.05625,.97001,-.0945824,.128712,1.07598,.974458,-.0755648,.103349,1.094,.980168,-.0571998,.0776731,1.1104,.987295,-.0377994,.0514445,1.12491,.994432,-.0186417,.025429,1.13851,.999975,542714e-9,-282356e-9,1.15108,.592656,-980249e-11,.486018,119532e-10,.598467,-247275e-9,.490781,301531e-9,.597934,-988317e-9,.490343,.00120517,.597903,-.00222366,.490319,.0027116,.597913,-.00395315,.490327,.00482077,.597919,-.00617653,.490329,.00753264,.597936,-.00889375,.490339,.0108478,.597956,-.0121043,.490347,.0147668,.597992,-.0158073,.490365,.0192905,.598032,-.0200017,.490382,.0244204,.598109,-.0246865,.49042,.0301593,.598215,-.0298594,.490474,.03651,.59833,-.0355167,.490524,.0434757,.598525,-.0416559,.490624,.0510629,.598778,-.0482692,.490753,.0592781,.599135,-.0553114,.49094,.0681304,.599802,-.062542,.491328,.0776467,.600361,-.0703638,.491598,.0878184,.60101,-.0786256,.491882,.0986573,.601811,-.0872962,.492232,.11018,.602861,-.0962284,.492684,.1224,.604167,-.10538,.493213,.135354,.605693,-.114896,.493799,.149034,.607682,-.124654,.494576,.163469,.610672,-.13456,.4959,.178747,.613313,-.144581,.496713,.194723,.617603,-.154703,.498499,.211617,.622174,-.16489,.500188,.229183,.628855,-.175164,.503072,.247786,.636963,-.185565,.506798,.267116,.644866,-.195911,.509719,.28702,.653741,-.206104,.512776,.307763,.664942,-.216447,.516812,.329631,.67633,-.22552,.519181,.353515,.690012,-.234316,.521681,.379226,.704243,-.242032,.523129,.405901,.719396,-.249172,.523768,.433585,.734471,-.255543,.522541,.462085,.750539,-.260697,.520217,.491233,.766365,-.26501,.516293,.521094,.781677,-.268409,.509708,.551014,.797132,-.270399,.501944,.581463,.812655,-.271247,.492025,.612402,.828592,-.270708,.480424,.643798,.844044,-.268085,.465955,.67682,.857305,-.263459,.448425,.708496,.87114,-.258151,.430243,.74046,.884936,-.251171,.410578,.771583,.895772,-.243305,.38862,.802234,.906961,-.234037,.365214,.833179,.917775,-.222714,.34116,.86353,.927883,-.210175,.31572,.893557,.936617,-.196925,.289159,.922976,.943384,-.182788,.261996,.951606,.949713,-.167965,.235324,.979958,.955818,-.151109,.208408,1.00765,.961344,-.133834,.182591,1.03329,.965469,-.115987,.156958,1.0557,.968693,-.09746,.132239,1.07583,.973165,-.0778514,.106195,1.09451,.979387,-.0585067,.0797669,1.11137,.98671,-.0390409,.0530263,1.12643,.994093,-.019408,.0263163,1.14016,1.00002,540029e-9,-194487e-9,1.15299,.574483,-989066e-11,.494533,114896e-10,.574478,-249127e-9,.494528,289403e-9,.574607,-996811e-9,.494637,.00115797,.574396,-.00224241,.494458,.00260498,.574377,-.00398632,.49444,.00463102,.574386,-.00622836,.494445,.00723623,.574401,-.0089683,.494453,.010421,.574419,-.0122056,.49446,.0141859,.574459,-.0159396,.494481,.0185322,.574525,-.0201692,.49452,.0234617,.574587,-.0248924,.494547,.0289762,.574697,-.0301074,.494604,.0350797,.574853,-.0358114,.494688,.0417767,.575027,-.041999,.494772,.0490718,.575294,-.0486618,.494915,.0569728,.575733,-.0557148,.495173,.0654955,.576356,-.0630489,.495537,.0746612,.576944,-.0709285,.495836,.0844615,.57765,-.0792723,.496177,.0949142,.578491,-.0880167,.496563,.10603,.579639,-.0969462,.497096,.117841,.580989,-.10622,.497684,.130367,.582587,-.115861,.498337,.143609,.584951,-.125605,.499414,.157625,.587602,-.135608,.500518,.172413,.59076,-.145742,.501767,.187999,.594992,-.155934,.503542,.20445,.600656,-.166303,.506135,.221764,.607816,-.176681,.509542,.24002,.61522,-.187071,.51263,.258992,.623702,-.197465,.516021,.278773,.634192,-.207816,.520422,.299377,.644936,-.218183,.524073,.320802,.657888,-.2278,.528049,.34384,.670666,-.236747,.52986,.36916,.685626,-.24484,.531892,.395867,.701304,-.252071,.532727,.423488,.717727,-.258714,.532146,.452201,.733914,-.264211,.529883,.481579,.750529,-.26859,.5259,.511558,.76747,-.272046,.51999,.542042,.785189,-.274225,.513083,.572799,.800954,-.275189,.502936,.603816,.816962,-.274946,.490921,.635461,.83336,-.272695,.47684,.6676,.848143,-.268223,.459405,.70051,.861818,-.262768,.440319,.732902,.876828,-.255872,.420123,.765084,.889312,-.247703,.398379,.796391,.900412,-.238381,.374496,.827333,.912251,-.227783,.349874,.858385,.921792,-.214832,.323181,.888652,.931273,-.200949,.296624,.917763,.940295,-.186537,.269211,.947878,.946812,-.171538,.241447,.977016,.953588,-.155254,.213829,1.00501,.958841,-.137156,.186807,1.03179,.963746,-.118699,.160706,1.05502,.966468,-.0998358,.135504,1.07568,.971178,-.0805186,.109131,1.09479,.97831,-.0599348,.0818293,1.1123,.985886,-.0399661,.0545872,1.12771,.994021,-.0198682,.0269405,1.14186,1.00009,271022e-9,-12989e-8,1.15514,.538716,-990918e-11,.486732,109675e-10,.550656,-250642e-9,.497518,277412e-9,.55057,-.00100265,.497441,.00110974,.550903,-.00225672,.497733,.00249779,.550568,-.00401046,.497438,.00443906,.550574,-.00626613,.49744,.00693637,.550591,-.0090226,.497449,.00998921,.550623,-.0122795,.497469,.0135984,.550667,-.0160361,.497495,.0177654,.550724,-.0202908,.497526,.0224915,.550792,-.0250421,.497557,.0277795,.550918,-.0302878,.49763,.0336334,.551058,-.0360241,.497701,.0400573,.551276,-.0422473,.497824,.0470585,.551551,-.0489441,.497977,.0546433,.552074,-.0559596,.498312,.0628367,.552681,-.0633978,.498679,.071646,.553324,-.0713176,.499031,.0810746,.554011,-.0797268,.499365,.091129,.55488,-.0885238,.499779,.101837,.556171,-.0974417,.500444,.113239,.557498,-.106841,.501025,.125316,.559299,-.116533,.501864,.138128,.561647,-.126298,.502967,.151695,.564347,-.136388,.504129,.16604,.567863,-.146576,.505713,.181207,.572569,-.156832,.507953,.197259,.578919,-.167323,.511186,.214258,.585387,-.177712,.514042,.232038,.593134,-.188184,.517484,.250733,.603295,-.198717,.522345,.270454,.613854,-.209177,.526751,.290807,.626092,-.219644,.531595,.312202,.637868,-.229494,.534721,.334435,.652458,-.238718,.538304,.359184,.666985,-.247061,.539875,.385637,.683301,-.254652,.541042,.41328,.69998,-.261376,.540735,.441903,.717824,-.267085,.539139,.471609,.734617,-.271465,.534958,.501446,.753663,-.27528,.53032,.532571,.770512,-.277617,.522134,.563641,.787356,-.278525,.51206,.595067,.806252,-.278512,.50119,.627226,.822061,-.277023,.486791,.659402,.838959,-.273175,.470467,.692874,.85379,-.267238,.450688,.725702,.868268,-.260327,.429741,.75832,.881994,-.251946,.407223,.790189,.893885,-.242432,.383214,.821625,.905118,-.231904,.357297,.853011,.916045,-.219545,.330733,.883773,.927614,-.205378,.303916,.914435,.936005,-.190388,.275941,.944502,.944533,-.1749,.247493,.974439,.950758,-.158588,.218996,1.00286,.957078,-.141027,.191559,1.0304,.962448,-.121507,.164457,1.05466,.964993,-.102068,.138636,1.0761,.970017,-.0822598,.111861,1.09541,.97661,-.062033,.0843438,1.11317,.985073,-.0409832,.0558496,1.12911,.993515,-.020146,.0275331,1.1438,1.00006,27329e-8,-107883e-9,1.15736,.525324,-999341e-11,.498153,105385e-10,.526513,-251605e-9,.499277,265329e-9,.526517,-.00100641,.499282,.0010613,.526588,-.00226466,.499337,.00238823,.526539,-.0040255,.499302,.00424535,.526547,-.00628954,.499306,.00663364,.526561,-.00905628,.499313,.00955337,.526593,-.0123253,.499334,.0130054,.526642,-.0160957,.499365,.0169911,.5267,-.0203661,.499396,.0215122,.526792,-.0251347,.499451,.0265718,.526904,-.0303985,.499511,.0321732,.527079,-.0361554,.499617,.0383231,.527285,-.0423982,.499731,.045026,.527602,-.0491121,.499924,.0522936,.528166,-.0561127,.500306,.0601528,.52879,-.0635988,.5007,.0686059,.529421,-.071581,.501048,.0776518,.530144,-.0799854,.501421,.0873148,.531062,-.0888032,.501884,.0976084,.532374,-.0977643,.50259,.108588,.533828,-.107197,.50329,.120234,.53581,-.116887,.504312,.132602,.538063,-.126755,.505365,.145721,.5409,-.136819,.506668,.159617,.544882,-.147117,.508731,.174369,.550238,-.157446,.511601,.190028,.556038,-.167988,.514431,.206587,.563031,-.178364,.517808,.224046,.571543,-.189007,.521937,.242503,.582255,-.199546,.527415,.261977,.59272,-.210084,.531682,.282162,.605648,-.220448,.537123,.303426,.61785,-.230593,.540664,.325323,.632223,-.240238,.544467,.348993,.648819,-.24887,.547594,.375462,.665825,-.256657,.54912,.403024,.683389,-.263711,.549294,.431773,.701495,-.269666,.547649,.461494,.719197,-.274169,.543786,.491623,.737906,-.278124,.538644,.522994,.756652,-.280632,.531057,.554775,.775279,-.281741,.521972,.586441,.792688,-.281652,.509613,.618596,.811894,-.280345,.496497,.651462,.827938,-.277128,.47968,.684023,.844837,-.271646,.460688,.718024,.859239,-.264397,.438872,.751207,.874088,-.256144,.41577,.784232,.887693,-.246311,.391369,.816191,.899402,-.235497,.365872,.847828,.910973,-.223631,.338618,.87934,.92204,-.209874,.310803,.910325,.930987,-.194265,.281802,.940695,.94,-.178125,.252836,.970958,.948018,-.161479,.224239,1.00078,.955141,-.144038,.195857,1.0288,.960513,-.124915,.168487,1.05371,.963964,-.104284,.141495,1.07596,.968713,-.0838732,.114437,1.09628,.975524,-.0635579,.0863105,1.11448,.98431,-.042291,.0574774,1.13069,.992916,-.0209131,.0284343,1.14568,.999926,743097e-9,-379265e-9,1.15955,.501042,-998428e-11,.498726,100306e-10,.502992,-252112e-9,.500665,253283e-9,.502417,-.00100791,.500092,.00101259,.502965,-.00226919,.500621,.00227978,.502318,-.00403109,.499994,.00405011,.502333,-.00629832,.500005,.00632868,.502362,-.00906907,.500027,.00911446,.502369,-.0123423,.500023,.0124078,.50243,-.0161178,.500066,.016211,.502493,-.0203937,.500103,.0205256,.502592,-.0251684,.500166,.0253548,.502707,-.0304389,.50023,.0307029,.502881,-.0362015,.500335,.0365753,.503124,-.0424507,.500488,.0429798,.503443,-.0491582,.500686,.0499268,.504083,-.0561476,.501155,.0574541,.504668,-.0636846,.501524,.0655408,.505319,-.0716834,.501904,.0742072,.50609,-.0800925,.502321,.0834699,.507122,-.0888425,.502896,.0933603,.508414,-.097855,.503603,.10391,.509955,-.107304,.504416,.115113,.512061,-.116921,.505565,.127054,.514419,-.12689,.506732,.139709,.517529,-.136934,.508338,.153173,.522085,-.147327,.510987,.167528,.526986,-.157612,.513527,.182708,.533122,-.168213,.516717,.198881,.540807,-.178688,.520832,.215986,.550687,-.189511,.52632,.234335,.560567,-.199998,.531009,.253375,.571698,-.210652,.535839,.273499,.584364,-.220917,.541091,.294355,.599066,-.23137,.546875,.316525,.614148,-.241206,.551306,.339671,.631157,-.250379,.555187,.36531,.647919,-.258397,.556595,.392767,.666112,-.265528,.556949,.421397,.686158,-.271827,.556617,.451433,.704838,-.27674,.552975,.482131,.723957,-.280733,.547814,.513458,.74262,-.283359,.53997,.545446,.762009,-.284541,.530422,.57775,.781314,-.284507,.518546,.610434,.799116,-.283309,.504178,.643178,.817604,-.280378,.48843,.676248,.83459,-.275619,.469457,.709698,.850974,-.26856,.447698,.744245,.866747,-.260094,.424791,.777695,.881412,-.249929,.399913,.810392,.8936,-.239137,.37308,.842872,.905943,-.226818,.345705,.874677,.916408,-.213699,.31706,.906257,.927215,-.198428,.288444,.936881,.935625,-.181643,.258329,.96795,.944076,-.164386,.228488,.998216,.951229,-.146339,.199763,1.02689,.958793,-.127709,.172153,1.0535,.963219,-.107244,.144989,1.07646,.967562,-.0857764,.11685,1.09675,.974866,-.0645377,.0880571,1.11576,.983353,-.0431732,.0587352,1.13227,.992503,-.0218356,.0294181,1.1478,1.00003,605203e-9,-231013e-9,1.16207,.482935,-101177e-10,.504695,968142e-11,.477554,-251521e-9,.499071,240676e-9,.477904,-.00100683,.499436,96342e-8,.478368,-.00226636,.499899,.0021687,.477977,-.00402719,.499513,.00385384,.477993,-.00629226,.499525,.0060221,.478011,-.00906011,.499536,.00867289,.478051,-.0123305,.499566,.0118074,.478089,-.016102,.499587,.0154269,.478171,-.0203736,.499645,.0195341,.478254,-.025143,.499692,.0241318,.47839,-.0304071,.499779,.0292247,.478588,-.0361631,.499911,.0348196,.478812,-.0424023,.500046,.0409231,.479208,-.0490724,.500326,.047552,.479841,-.0560722,.500805,.0547377,.480392,-.0636125,.501152,.0624607,.481068,-.0716134,.501561,.0707473,.481898,-.0800062,.502054,.0796118,.483022,-.0886568,.502728,.0890974,.484332,-.0977553,.503479,.0992099,.486126,-.107173,.504546,.10999,.488066,-.11677,.50557,.121476,.490521,-.126725,.506849,.133672,.494232,-.136793,.50911,.146731,.498302,-.147116,.511345,.160577,.503565,-.157446,.514344,.175335,.510902,-.168121,.518824,.191207,.519263,-.178799,.523666,.208058,.528204,-.189407,.528296,.225875,.538854,-.200145,.533724,.244782,.551278,-.210701,.539833,.264753,.565222,-.221303,.546131,.285745,.579403,-.231688,.551496,.307592,.595469,-.241718,.556809,.330582,.610929,-.250992,.559641,.354995,.629433,-.259602,.562379,.382471,.648504,-.267038,.563676,.411126,.66756,-.273388,.562092,.440924,.689143,-.278788,.560807,.472118,.709056,-.282783,.555701,.503774,.729855,-.285836,.548698,.536364,.748954,-.287078,.538544,.56895,.768373,-.287133,.526711,.601991,.78827,-.285839,.512511,.635403,.807465,-.283238,.496323,.668797,.825194,-.27906,.477638,.702584,.842203,-.272286,.456253,.736393,.857749,-.263854,.432412,.77096,.874799,-.253943,.407806,.80489,.887497,-.24237,.38033,.83771,.89966,-.230278,.352446,.870376,.911753,-.21646,.323268,.902256,.923011,-.202071,.294314,.933306,.932375,-.185519,.264104,.965177,.940537,-.167604,.234035,.996303,.948904,-.149068,.20412,1.0261,.955263,-.129539,.175431,1.05304,.960303,-.109932,.148116,1.07617,.965512,-.0880572,.119693,1.09742,.973466,-.0660548,.0901619,1.11721,.98284,-.0439228,.0599875,1.13436,.992216,-.0219588,.0298975,1.15006,.999946,119402e-9,-208547e-10,1.16471,.447827,-100414e-10,.491543,914833e-11,.454778,-251257e-9,.499172,22891e-8,.453519,-.00100342,.497787,914184e-9,.45357,-.00225776,.497847,.00205701,.453578,-.00401371,.497855,.00365705,.45357,-.00627107,.497841,.00571453,.453598,-.00902968,.497864,.00823019,.453627,-.0122888,.497882,.0112049,.453684,-.0160475,.497923,.0146405,.453764,-.0203044,.49798,.0185394,.453866,-.0250576,.498049,.0229054,.453996,-.0303028,.49813,.0277424,.454196,-.0360379,.498267,.0330587,.454457,-.0422521,.498445,.0388613,.454926,-.0488393,.498812,.0451767,.455525,-.0558653,.499272,.0520153,.456074,-.0633772,.499625,.0593754,.456752,-.0713606,.500049,.0672751,.457648,-.07971,.500615,.0757447,.458849,-.0883032,.501399,.0848231,.46029,-.0974095,.502293,.0945135,.462,-.106729,.503301,.104848,.464121,-.116354,.504533,.115884,.466889,-.126214,.506172,.127652,.470744,-.136324,.508667,.14024,.47488,-.146595,.510995,.153673,.480845,-.157027,.514832,.168053,.488262,-.167658,.519506,.183508,.496547,-.178343,.524347,.199948,.506254,-.188916,.52983,.217503,.517961,-.199975,.536357,.236272,.531484,-.210624,.543641,.256096,.545496,-.221227,.550048,.277085,.559497,-.231568,.555076,.298615,.575752,-.241698,.560541,.321547,.591999,-.251172,.564156,.345602,.610654,-.260178,.567607,.371851,.630484,-.268094,.56923,.40076,.651807,-.274661,.569779,.430801,.67239,-.280331,.566791,.461939,.693024,-.284501,.562007,.493854,.715473,-.287852,.555791,.526992,.736323,-.28929,.546345,.560102,.755771,-.289405,.534,.593543,.775424,-.2881,.519114,.627256,.795447,-.285562,.502543,.661464,.815319,-.281416,.484773,.695206,.831769,-.275523,.463445,.729044,.849464,-.267516,.440269,.764069,.866775,-.257584,.415049,.799089,.881252,-.245817,.388049,.831948,.894209,-.233127,.35889,.865526,.906922,-.219579,.329915,.89818,.919686,-.204491,.300441,.930013,.929044,-.188962,.269445,.962061,.938393,-.171079,.238402,.994214,.94661,-.15199,.208204,1.02533,.953095,-.131953,.178653,1.0529,.958644,-.111233,.150684,1.0771,.963925,-.0903098,.122359,1.09855,.971995,-.0680505,.0923342,1.11874,.981658,-.0448512,.0614195,1.13635,.991649,-.0221931,.0303582,1.15238,.999985,393403e-9,-111086e-9,1.16772,.396806,-971563e-11,.457671,842355e-11,.429186,-249421e-9,.495017,21625e-8,.429324,-998052e-9,.495173,865322e-9,.429175,-.00224487,.494999,.00194637,.429129,-.00399041,.494952,.00346004,.429153,-.00623476,.494974,.00540684,.429168,-.0089773,.494983,.00778714,.429207,-.0122175,.495012,.0106022,.429257,-.0159542,.495047,.0138535,.429338,-.0201864,.495106,.0175443,.429431,-.0249104,.495165,.0216774,.429587,-.0301252,.495279,.0262594,.429796,-.0358249,.495432,.0312968,.430065,-.0419972,.495621,.0367985,.430588,-.0485144,.496061,.042798,.43113,-.0555028,.496472,.0492914,.431743,-.0629852,.496904,.0562907,.432448,-.0709256,.497369,.0638056,.433414,-.0791942,.498032,.071885,.434638,-.0877346,.498854,.0805517,.43611,-.0968056,.499812,.0898047,.437859,-.106002,.500891,.0997142,.440017,-.115648,.502198,.110289,.443236,-.125427,.504389,.121644,.44697,-.135492,.506809,.133769,.451689,-.145746,.509858,.146787,.45811,-.156219,.514247,.160793,.465305,-.166834,.518816,.175791,.474085,-.177546,.524331,.191906,.484808,-.188262,.53104,.209199,.49732,-.199346,.538511,.227825,.509693,-.209951,.544554,.247269,.524367,-.220533,.551616,.267978,.539228,-.231082,.557368,.289672,.55644,-.241342,.563782,.31268,.574204,-.250964,.568851,.33651,.593388,-.260306,.57312,.362219,.613358,-.268667,.574916,.390322,.634512,-.275591,.575053,.420478,.65563,-.281328,.572404,.451614,.678265,-.285948,.568893,.484112,.70011,-.289408,.561878,.517348,.723005,-.291328,.55359,.551355,.743744,-.291418,.541099,.585109,.763949,-.290252,.526489,.619487,.784186,-.287648,.509496,.65404,.804304,-.283782,.491484,.688649,.823629,-.278067,.470517,.723133,.84094,-.270588,.44705,.757163,.857852,-.261188,.421252,.792816,.874934,-.249313,.394191,.827248,.888709,-.236492,.365359,.861074,.902589,-.222185,.336016,.894417,.914201,-.207314,.30527,.926825,.925978,-.191146,.274532,.9595,.93512,-.174135,.243393,.991583,.943656,-.155231,.212414,1.02356,.951719,-.134403,.182005,1.05239,.957164,-.113023,.153043,1.07754,.962656,-.0914493,.124186,1.09984,.970695,-.0694179,.0941654,1.12,.980749,-.0466199,.0629671,1.13849,.991205,-.0227032,.0311146,1.15494,.999884,632388e-9,-254483e-9,1.1706,.379821,-957289e-11,.460637,789337e-11,.405188,-247483e-9,.491396,204064e-9,.404796,-989434e-9,.490914,815853e-9,.40483,-.00222607,.490949,.00183559,.40473,-.00395723,.49084,.00326332,.404731,-.00618287,.490836,.00509945,.404768,-.00890258,.490871,.00734463,.404791,-.0121156,.490883,.00999992,.404857,-.0158214,.490938,.0130676,.404943,-.0200178,.491004,.0165503,.405059,-.0247027,.491093,.0204521,.405213,-.0298729,.491205,.0247788,.405399,-.0355226,.491333,.0295373,.405731,-.0416352,.491604,.034741,.406303,-.0480807,.492116,.0404255,.406814,-.0550458,.492506,.0465732,.407404,-.0624652,.492926,.0532058,.408149,-.0702958,.493442,.0603442,.409128,-.0784623,.494136,.0680297,.410408,-.087007,.495054,.0762786,.411813,-.0959639,.495962,.0851046,.413735,-.105075,.497257,.0945878,.416137,-.114646,.498882,.104725,.41934,-.124394,.501132,.11563,.423326,-.134328,.503883,.127325,.428419,-.14458,.50747,.139911,.43484,-.154979,.511964,.153481,.442641,-.165628,.517328,.168114,.452511,-.176365,.524258,.183995,.463473,-.187298,.531248,.200953,.475564,-.198244,.538367,.219176,.488664,-.208938,.545175,.238514,.504073,-.219599,.553227,.259129,.520832,-.230378,.560653,.280997,.538455,-.240703,.567523,.303821,.55709,-.250548,.573287,.327948,.576646,-.259964,.577795,.353362,.596705,-.268721,.580077,.380336,.618053,-.276054,.58018,.4101,.640303,-.282176,.578747,.44161,.662365,-.286931,.574294,.474106,.684542,-.290521,.567035,.507549,.707984,-.292672,.558687,.541853,.730913,-.293189,.547606,.576581,.752948,-.292199,.533471,.61172,.773452,-.289508,.516395,.646339,.794715,-.285716,.497873,.682131,.814251,-.280051,.476845,.716396,.833057,-.272873,.453449,.751503,.84959,-.263982,.427857,.786085,.867022,-.252745,.400335,.821355,.882277,-.239655,.371304,.85646,.895375,-.225386,.340397,.890828,.909347,-.209587,.310005,.923532,.921885,-.193433,.2796,.956419,.932127,-.176135,.247276,.989445,.941869,-.157872,.216186,1.02221,.949735,-.137577,.185602,1.05195,.956617,-.115285,.155767,1.07822,.961974,-.0928418,.126103,1.10149,.96972,-.0700592,.0956758,1.12207,.98012,-.0474671,.0643269,1.1408,.990825,-.0238113,.0320863,1.1577,.999876,381574e-9,-812203e-10,1.17403,.367636,-961342e-11,.469176,753287e-11,.380377,-244772e-9,.485434,191797e-9,.380416,-978857e-9,.485475,767015e-9,.380376,-.00220165,.485435,.00172522,.380419,-.00391408,.485487,.00306734,.380438,-.00611549,.485505,.00479332,.380462,-.00880558,.485525,.00690391,.380496,-.0119837,.485551,.00940039,.38056,-.0156487,.485605,.0122848,.38064,-.0197988,.485666,.0155601,.380767,-.0244324,.48577,.0192313,.380909,-.0295444,.485871,.0233032,.381142,-.0351321,.48606,.0277861,.381472,-.0411535,.486336,.0326939,.382015,-.0475408,.486833,.0380565,.382523,-.0544395,.487231,.0438615,.383129,-.061784,.487683,.0501332,.383952,-.0695085,.488313,.0568996,.38498,-.0775819,.489077,.0641952,.386331,-.0860443,.490113,.0720324,.387788,-.0948406,.491099,.0804379,.389808,-.103899,.492566,.0894899,.39252,-.113313,.494601,.0992098,.395493,-.123007,.496619,.109641,.399826,-.132859,.499912,.120919,.405341,-.143077,.504061,.133107,.411932,-.153465,.508905,.146263,.420591,-.164108,.515482,.160544,.43101,-.174893,.523191,.176123,.441881,-.185839,.53026,.192757,.453919,-.196633,.537295,.210535,.468715,-.207611,.546156,.229886,.485182,-.218517,.555173,.250543,.501926,-.229249,.562728,.27221,.51785,-.239481,.567494,.294892,.536947,-.249395,.573889,.318987,.557115,-.259,.578831,.344348,.577966,-.268075,.582055,.371223,.599489,-.276115,.583307,.399834,.62479,-.282523,.583902,.431415,.647504,-.287663,.57953,.464301,.670601,-.291538,.573103,.498123,.693539,-.293842,.563731,.532662,.717385,-.294681,.553169,.567925,.741533,-.293717,.539908,.603502,.762142,-.291156,.521902,.639074,.783014,-.28719,.502815,.674439,.805158,-.281773,.482598,.710497,.823646,-.274682,.458949,.7456,.841879,-.266184,.433129,.781085,.859515,-.255682,.406064,.816,.875335,-.242849,.376509,.851074,.890147,-.228329,.345502,.886473,.903144,-.212491,.31428,.920751,.916618,-.195695,.282994,.954606,.927953,-.178267,.251091,.988402,.937414,-.159549,.219107,1.02141,.946823,-.140022,.18896,1.05167,.954651,-.118154,.158667,1.07819,.959955,-.0946636,.128808,1.1025,.96858,-.0711792,.0973787,1.12391,.97938,-.0475046,.0650965,1.14322,.990498,-.024059,.0326267,1.16077,.999844,-512408e-10,112444e-9,1.17727,.316912,-934977e-11,.425996,695559e-11,.356423,-241372e-9,.479108,179562e-9,.356272,-965292e-9,.478897,71811e-8,.356262,-.00217182,.478894,.00161574,.356265,-.00386092,.478895,.00287261,.356278,-.0060324,.478905,.00448907,.356293,-.00868565,.478914,.00646572,.356346,-.0118207,.478965,.00880438,.356395,-.0154355,.479001,.0115066,.356484,-.019529,.479075,.0145762,.356609,-.0240991,.47918,.018018,.356766,-.0291413,.479305,.0218379,.357009,-.0346498,.479512,.0260454,.357424,-.0405462,.479909,.0306657,.357899,-.0468825,.480337,.0357054,.358424,-.0536887,.480771,.0411728,.359041,-.0609416,.481242,.0470841,.359903,-.0685239,.481943,.0534831,.360932,-.0764883,.482741,.0603795,.362196,-.0848364,.483688,.0678028,.363847,-.0935002,.484947,.0758086,.365972,-.102471,.486588,.0844173,.368741,-.111751,.488787,.0937199,.372146,-.121334,.491405,.103732,.377114,-.131147,.495604,.114608,.38226,-.141213,.499436,.126345,.389609,-.151632,.505334,.139116,.397925,-.162073,.51168,.152995,.407824,-.172819,.518876,.168071,.420014,-.183929,.527639,.184495,.434266,-.195032,.537588,.20232,.447352,-.205792,.544379,.221189,.463726,-.216704,.553422,.241616,.481406,-.227531,.562074,.263298,.498707,-.238017,.568227,.286116,.518039,-.247936,.574473,.3101,.538277,-.257437,.579191,.335401,.561166,-.266829,.584807,.362246,.583189,-.275329,.586476,.390609,.606024,-.28234,.585578,.420998,.632419,-.287924,.584496,.454357,.656128,-.291972,.577766,.488233,.679953,-.29456,.56875,.523248,.704654,-.295816,.558388,.559168,.729016,-.295157,.544826,.595326,.752062,-.292779,.528273,.631864,.773138,-.288681,.508482,.667793,.794869,-.283358,.487341,.704035,.815101,-.27608,.46354,.739925,.834212,-.26767,.438672,.775539,.852368,-.257397,.411239,.810895,.870207,-.245689,.3829,.846472,.884063,-.231452,.351496,.881788,.898284,-.215561,.31895,.917438,.912964,-.198208,.287367,.952422,.924666,-.180426,.254487,.987551,.934429,-.161525,.222226,1.02142,.943485,-.141197,.191143,1.05218,.9521,-.120085,.161112,1.07937,.957876,-.0975881,.130982,1.10403,.966943,-.0726842,.0990553,1.12616,.978313,-.0483705,.0662818,1.14619,.990048,-.0239072,.0329243,1.16413,.999984,461885e-9,-772859e-10,1.18099,.321287,-935049e-11,.455413,659662e-11,.332595,-237513e-9,.471437,167562e-9,.332729,-949964e-9,.471618,670192e-9,.332305,-.00213618,.471028,.00150712,.332326,-.00379765,.471055,.00267959,.332344,-.00593353,.471072,.00418751,.332356,-.00854349,.471077,.00603172,.332403,-.0116268,.471121,.00821362,.332461,-.0151824,.47117,.0107357,.332552,-.0192088,.471251,.0136014,.332657,-.0237024,.47133,.0168152,.332835,-.0286615,.471487,.0203853,.333083,-.0340765,.471708,.0243212,.333547,-.0398563,.47219,.0286518,.333989,-.0460916,.472587,.0333763,.334532,-.0527897,.473054,.0385084,.335167,-.0599284,.473568,.0440638,.33608,-.0673514,.474362,.0500962,.337146,-.0752237,.475231,.0566022,.338462,-.083418,.476282,.0636272,.34014,-.0919382,.477615,.0712153,.342341,-.100741,.479404,.079417,.345088,-.109905,.481618,.0882631,.349049,-.119369,.485081,.0978851,.353939,-.129033,.489317,.108336,.359893,-.139038,.494309,.119698,.366945,-.149411,.499983,.132024,.375814,-.159843,.507185,.145558,.387112,-.170664,.516392,.160433,.40023,-.181897,.526519,.176648,.412555,-.192785,.53423,.193922,.427023,-.203663,.542741,.212662,.443685,-.214695,.552066,.232944,.461499,-.225561,.560762,.254495,.480975,-.236257,.569421,.277531,.501,-.24639,.576101,.301724,.521691,-.256101,.581493,.327112,.543478,-.265289,.585221,.353917,.566094,-.273938,.587614,.381941,.589578,-.281679,.587991,.41172,.614583,-.287655,.585928,.444148,.641813,-.292228,.582092,.478617,.666189,-.295172,.57398,.51397,.690475,-.29648,.561676,.550118,.715543,-.296203,.548758,.586933,.740405,-.293999,.532792,.62384,.762183,-.28998,.512735,.660723,.786069,-.28478,.492402,.69807,.806812,-.277568,.469058,.734422,.826987,-.268951,.443017,.770946,.844588,-.259049,.415501,.80699,.863725,-.2471,.387328,.842107,.879137,-.234157,.356108,.878078,.894634,-.218719,.324315,.914058,.909162,-.201293,.291813,.949922,.92072,-.18267,.258474,.985337,.93158,-.163212,.225593,1.0205,.941238,-.142771,.193986,1.05273,.949293,-.120956,.163392,1.08075,.956226,-.0985743,.132934,1.10559,.96546,-.075118,.101255,1.12823,.977403,-.0497921,.0675441,1.149,.989648,-.0241574,.0334681,1.16765,1.00001,5762e-7,-184807e-9,1.18519,.303474,-916603e-11,.4542,61243e-10,.308894,-232869e-9,.462306,155592e-9,.309426,-931661e-9,.463093,622499e-9,.308643,-.0020949,.461933,.00139979,.308651,-.0037242,.461941,.00248874,.308662,-.00581873,.46195,.00388933,.308687,-.00837818,.461974,.00560247,.308728,-.0114016,.462011,.00762948,.308789,-.0148884,.462067,.00997326,.308882,-.0188369,.462151,.0126375,.309007,-.0232436,.462263,.0156271,.30918,-.0281054,.462417,.0189498,.309442,-.0334065,.462667,.0226167,.309901,-.0390589,.463162,.0266614,.310331,-.0452042,.463555,.0310715,.310858,-.0517735,.464019,.0358698,.311576,-.0587359,.464669,.0410848,.312436,-.0660383,.465406,.0467453,.313526,-.0737266,.466339,.0528718,.314903,-.0817574,.467504,.0595039,.316814,-.090167,.469226,.0666888,.318965,-.0987555,.470981,.0744658,.322077,-.107792,.473814,.082912,.325947,-.117098,.477241,.0920846,.331008,-.126602,.48184,.102137,.337893,-.136619,.488334,.113135,.345106,-.146838,.494415,.12511,.355111,-.157357,.503275,.138356,.365095,-.167955,.510966,.152686,.378344,-.179157,.521508,.16856,.391599,-.190143,.530455,.18561,.407786,-.20123,.541275,.204308,.425294,-.212456,.551784,.224623,.444021,-.223568,.561493,.246172,.463418,-.234154,.569886,.268979,.484077,-.244546,.577116,.293411,.505513,-.254301,.582914,.318936,.527672,-.263564,.587208,.345856,.550565,-.272332,.589277,.374054,.573656,-.280011,.588426,.403276,.59827,-.286924,.587504,.43474,.624731,-.291994,.583401,.468767,.652396,-.295159,.576997,.504411,.67732,-.296954,.565863,.54114,.703147,-.296877,.552316,.57816,.728715,-.295147,.536773,.616124,.752448,-.291275,.51771,.653885,.775169,-.285905,.496087,.691537,.799307,-.279064,.474232,.729251,.819482,-.270294,.447676,.766267,.837659,-.260032,.419656,.802616,.856903,-.248497,.391328,.838583,.873325,-.235252,.360285,.874711,.889788,-.221126,.329215,.91077,.904486,-.204304,.296392,.94653,.917711,-.185562,.262159,.983828,.928969,-.165635,.229142,1.01955,.939707,-.14442,.19673,1.05317,.948167,-.122147,.165095,1.0823,.955222,-.099098,.13451,1.10791,.964401,-.0755332,.102476,1.1312,.976605,-.0513817,.0689667,1.15218,.989085,-.0258499,.034506,1.17129,.999908,617773e-9,-271268e-9,1.18961,.285803,-905752e-11,.452348,572272e-11,.284689,-22732e-8,.450581,143626e-9,.285263,-910214e-9,.451482,575099e-9,.285302,-.00204784,.451553,.00129395,.285318,-.00364057,.451574,.0023006,.28533,-.00568813,.451585,.00359547,.285361,-.00819001,.451618,.00517934,.285397,-.0111458,.45165,.007054,.285447,-.0145536,.451688,.00922167,.285527,-.0184127,.451758,.0116869,.285688,-.0227207,.451929,.0144555,.28584,-.0274712,.452055,.0175341,.286136,-.0326278,.452369,.0209406,.286574,-.0381792,.452853,.0246965,.287012,-.0441879,.453272,.0287996,.287542,-.0506096,.453752,.033268,.288299,-.0573634,.454488,.0381504,.289186,-.0645458,.455294,.0434447,.290302,-.0720405,.456301,.0491973,.291776,-.0799046,.457648,.0554453,.29372,-.088117,.459483,.0622311,.296052,-.0965328,.461571,.0695992,.299563,-.105409,.465085,.077658,.30335,-.114553,.468506,.0864176,.309167,-.123917,.474423,.0961078,.31529,-.13381,.47995,.106643,.324163,-.144021,.488592,.118322,.333272,-.154382,.496461,.131133,.344224,-.165015,.50562,.145208,.357733,-.176168,.516719,.16073,.373046,-.187468,.528513,.177807,.38788,-.198488,.537713,.196072,.405133,-.209545,.547999,.21605,.423845,-.220724,.55759,.237484,.443777,-.231518,.566246,.26039,.464824,-.242035,.574326,.284835,.486635,-.251898,.58037,.310518,.51012,-.261304,.58568,.337678,.535301,-.270384,.590197,.366242,.559193,-.27841,.590569,.395873,.583544,-.285325,.588161,.426857,.608834,-.291113,.584249,.459477,.635753,-.294882,.57763,.494734,.664367,-.297088,.569479,.532023,.689688,-.297364,.555064,.569629,.715732,-.295949,.539522,.608124,.741307,-.292259,.521613,.646231,.764949,-.287063,.49969,.684938,.788599,-.28012,.476747,.723548,.81048,-.27153,.45116,.761135,.831372,-.261289,.424101,.798916,.850092,-.249559,.39443,.835952,.867777,-.236348,.363849,.871606,.884632,-.221569,.332477,.907843,.90047,-.20618,.300667,.944187,.914524,-.188771,.266552,.981371,.926892,-.168362,.232349,1.01841,.937951,-.146761,.199359,1.05308,.947236,-.123813,.1675,1.0839,.954367,-.099984,.136166,1.11047,.963907,-.0759278,.103808,1.13414,.976218,-.0511367,.0697061,1.15575,.988772,-.0267415,.0352529,1.17531,.999888,-520778e-9,289926e-9,1.19389,.263546,-883274e-11,.441896,526783e-11,.262352,-221849e-9,.439889,132311e-9,.262325,-886683e-9,.439848,528824e-9,.26228,-.00199476,.439765,.00118975,.262372,-.00354671,.439922,.00211568,.26239,-.00554141,.439941,.00330652,.262412,-.00797888,.439961,.00476346,.262453,-.0108584,.440002,.00648818,.262528,-.0141788,.440085,.0084835,.262615,-.017938,.440166,.0107533,.262744,-.0221346,.440291,.0133044,.262939,-.026762,.440493,.0161445,.263277,-.0317573,.440889,.0192974,.26368,-.0371832,.441338,.0227699,.264106,-.0430371,.441753,.0265698,.264624,-.0493035,.442227,.0307178,.265378,-.0558669,.442985,.0352616,.266253,-.0628718,.443795,.0401968,.267478,-.0701569,.445008,.04559,.269062,-.077845,.446599,.0514539,.270926,-.0857941,.448349,.0578382,.273693,-.0940773,.451221,.0648363,.276746,-.102704,.454097,.0724389,.281693,-.111735,.459517,.0808744,.287335,-.121004,.46531,.0901551,.29448,-.130734,.472605,.100371,.30257,-.140777,.480251,.111644,.312465,-.15111,.489444,.124111,.324856,-.16189,.500919,.137979,.33774,-.172946,.511317,.153163,.35255,-.184152,.522684,.169817,.367786,-.19522,.53248,.187886,.385474,-.20632,.543326,.207634,.404976,-.217744,.554109,.229165,.425203,-.228691,.563395,.252068,.446704,-.239299,.571565,.276471,.468951,-.249348,.577935,.302323,.493487,-.258933,.584309,.329882,.517861,-.268009,.58773,.358525,.543309,-.276238,.589612,.388585,.569704,-.28356,.589294,.419787,.594871,-.289497,.585137,.452114,.622555,-.294452,.580356,.486466,.651167,-.296918,.57185,.523079,.677332,-.297647,.558428,.5611,.703718,-.296321,.542232,.599592,.730262,-.293339,.524541,.639138,.754304,-.288036,.502691,.677978,.778051,-.281018,.479212,.716537,.801557,-.272414,.454071,.75586,.822559,-.262419,.425952,.794477,.843051,-.250702,.397313,.832664,.86232,-.237264,.366534,.869876,.879044,-.222716,.334816,.906973,.896362,-.206827,.303143,.943558,.910342,-.189659,.269699,.979759,.924119,-.171108,.236411,1.01718,.935374,-.149579,.202224,1.05289,.944295,-.126295,.16989,1.08496,.952227,-.101511,.138089,1.11256,.962041,-.0766392,.105053,1.1375,.97528,-.0511967,.070329,1.15983,.988476,-.025463,.0351268,1.17987,.999962,286808e-10,145564e-10,1.19901,.227089,-841413e-11,.404216,472707e-11,.239725,-215083e-9,.426708,120833e-9,.239904,-860718e-9,.427028,483555e-9,.239911,-.00193661,.427039,.00108806,.239914,-.00344276,.42704,.00193457,.239933,-.00537907,.427064,.00302363,.239944,-.00774482,.427065,.00435604,.239993,-.01054,.427122,.00593398,.240052,-.0137626,.427179,.00775987,.240148,-.0174115,.427279,.00983854,.240278,-.021484,.42741,.0121763,.240472,-.0259729,.427618,.0147827,.240839,-.0308131,.428086,.0176837,.241201,-.0360893,.428482,.0208775,.241626,-.0417723,.428907,.0243821,.242207,-.0478337,.42952,.0282228,.24298,-.0542199,.430332,.0324333,.243881,-.0610015,.431222,.0370252,.245123,-.0680874,.432512,.0420535,.24667,-.0755482,.434088,.0475414,.248779,-.0832873,.436323,.0535542,.251665,-.0913546,.439509,.0601716,.255305,-.0998489,.443478,.0674282,.260049,-.108576,.448713,.0754673,.266192,-.117754,.455524,.084339,.273158,-.127294,.4627,.0941683,.282131,-.137311,.472068,.10515,.293332,-.147736,.483565,.117402,.304667,-.158357,.493702,.130824,.317785,-.169274,.504708,.145724,.333245,-.180595,.517107,.16215,.349843,-.191892,.528849,.180149,.367944,-.203168,.540301,.199746,.387579,-.214443,.551514,.221047,.408247,-.225624,.560906,.243981,.43014,-.236422,.56959,.268513,.452669,-.24654,.576098,.294409,.476196,-.256157,.580925,.322002,.501157,-.265289,.584839,.351052,.527632,-.273671,.587614,.3812,.555754,-.281254,.589119,.412994,.581682,-.287448,.585204,.445498,.608196,-.292614,.579006,.479505,.635661,-.296068,.571297,.514643,.664999,-.297395,.560855,.552213,.691039,-.296645,.544525,.591365,.7179,-.293785,.526535,.630883,.744059,-.289089,.50545,.670932,.76863,-.282239,.482514,.710904,.793273,-.273688,.457246,.750259,.814731,-.26328,.428872,.78948,.835603,-.251526,.399384,.828597,.85489,-.238339,.368811,.866892,.872828,-.223607,.336617,.90563,.889462,-.207538,.303997,.943538,.904929,-.190297,.270812,.980591,.919101,-.172034,.237453,1.01935,.930536,-.152058,.204431,1.05498,.941223,-.129515,.172495,1.08717,.94982,-.104263,.140175,1.11551,.960592,-.0781944,.106465,1.14098,.974629,-.051688,.0711592,1.16418,.98811,-.0253929,.0354432,1.18465,1.00004,804378e-9,-330876e-9,1.20462,.214668,-821282e-11,.406619,433582e-11,.218053,-208144e-9,.413025,109887e-9,.217987,-832212e-9,.412901,439362e-9,.217971,-.00187246,.412876,988623e-9,.217968,-.00332855,.41286,.00175772,.217985,-.00520055,.412882,.00274729,.218014,-.00748814,.412916,.00395842,.218054,-.0101901,.412957,.00539274,.218106,-.0133057,.413005,.00705348,.218217,-.0168342,.413139,.00894581,.218338,-.0207707,.413258,.0110754,.21855,-.0251001,.413509,.0134551,.218913,-.0297861,.413992,.0161081,.219265,-.0348956,.414383,.0190307,.219696,-.0403909,.414839,.0222458,.220329,-.0462003,.415567,.025792,.220989,-.0524208,.41621,.0296637,.222027,-.058948,.417385,.0339323,.223301,-.0658208,.418779,.0386055,.224988,-.0730347,.420665,.0437355,.227211,-.0805274,.423198,.0493844,.230131,-.088395,.426566,.0556135,.233908,-.0966208,.43091,.0624829,.239092,-.105223,.437148,.0701636,.245315,-.11424,.444302,.0786949,.253166,-.12368,.453262,.0882382,.262374,-.133569,.463211,.0988682,.273145,-.143836,.474271,.110727,.285512,-.154577,.4863,.123945,.299512,-.165501,.498817,.138581,.314287,-.176698,.510341,.154676,.331083,-.188066,.522583,.172459,.349615,-.199597,.534879,.191979,.369318,-.210843,.546083,.21309,.390377,-.222068,.5562,.235998,.412411,-.233059,.564704,.260518,.435715,-.24357,.572314,.286795,.461196,-.253356,.579395,.314559,.485587,-.262362,.581985,.343581,.511908,-.270895,.584347,.374367,.539798,-.278452,.58505,.406015,.567974,-.284877,.583344,.439168,.594303,-.290124,.577348,.473005,.622951,-.294183,.570751,.508534,.652404,-.296389,.561541,.544764,.679291,-.296605,.546426,.582927,.706437,-.294095,.528599,.622681,.734485,-.28978,.508676,.663567,.758841,-.283363,.484768,.704092,.78537,-.275015,.460434,.745101,.807315,-.264689,.432166,.784712,.8271,-.252597,.401807,.824241,.849191,-.239154,.371458,.863803,.867046,-.224451,.338873,.903063,.8852,-.208342,.306175,.942763,.901771,-.190684,.272759,.981559,.915958,-.172105,.239306,1.02048,.928046,-.152214,.206071,1.05765,.939961,-.130247,.17367,1.08999,.948711,-.10672,.142201,1.11829,.959305,-.0808688,.108454,1.14467,.973009,-.0539145,.0728109,1.16839,.987631,-.0262947,.0360625,1.19004,.999978,.00132758,-559424e-9,1.21058,.193925,-793421e-11,.391974,392537e-11,.196746,-200315e-9,.397675,991033e-10,.19667,-801099e-9,.397521,396342e-9,.196633,-.00180246,.397445,891829e-9,.196654,-.00320443,.397482,.00158582,.196659,-.00500647,.39748,.00247867,.196683,-.0072086,.397506,.00357167,.196728,-.00981001,.397562,.00486675,.196792,-.0128096,.397633,.00636707,.19689,-.0162055,.397746,.00807752,.197017,-.0199943,.397884,.0100052,.19729,-.024139,.39827,.0121691,.197583,-.0286671,.398639,.0145755,.197927,-.0335858,.399034,.0172355,.198383,-.0388806,.399554,.0201718,.199002,-.0444736,.400289,.0234194,.199739,-.0504583,.401111,.026984,.200784,-.056729,.402349,.0309217,.202075,-.0633643,.403841,.0352496,.203898,-.0703247,.406076,.0400313,.206199,-.0775565,.408841,.0453282,.209252,-.085184,.41259,.0511794,.213638,-.0931994,.418288,.0577459,.21881,-.101617,.424681,.0650508,.225642,-.11052,.433429,.0732759,.233717,-.119772,.442897,.0824683,.242823,-.129505,.452888,.0927484,.254772,-.139906,.466407,.104417,.266603,-.150402,.477413,.117211,.28073,-.161395,.490519,.131598,.295399,-.172465,.50201,.147407,.312705,-.183982,.515311,.165031,.331335,-.195532,.52786,.184336,.351037,-.206971,.5392,.205361,.372175,-.218117,.54941,.228043,.394548,-.229327,.558642,.25267,.419598,-.240052,.567861,.279071,.443922,-.249937,.573332,.306882,.471495,-.259407,.58013,.33661,.496769,-.267749,.580564,.367328,.524951,-.275524,.581696,.399753,.55318,-.282148,.579885,.433134,.581577,-.287533,.575471,.467534,.609231,-.291612,.567445,.502943,.637478,-.293911,.557657,.53871,.667795,-.295096,.546535,.576568,.694272,-.294073,.529561,.614929,.722937,-.290386,.510561,.655909,.749682,-.284481,.487846,.697663,.774754,-.276188,.462487,.738515,.799301,-.266215,.43481,.779802,.820762,-.254116,.404879,.820045,.843231,-.240393,.374559,.860294,.861857,-.225503,.341582,.900965,.880815,-.209382,.308778,.941727,.89766,-.19155,.275232,.980916,.912926,-.172346,.240938,1.02162,.926391,-.151799,.207223,1.0597,.938429,-.129968,.17484,1.09291,.947834,-.10651,.142984,1.12248,.958432,-.0824098,.109902,1.149,.972402,-.0565242,.0744454,1.1733,.987191,-.028427,.0373794,1.19538,.999975,385685e-10,-4203e-8,1.21676,.178114,-766075e-11,.385418,354027e-11,.176074,-191966e-9,.381002,887135e-10,.17601,-767549e-9,.380861,354715e-9,.17598,-.00172696,.380798,798168e-9,.175994,-.00307012,.380824,.00141928,.176017,-.00479684,.380858,.00221859,.176019,-.00690648,.380839,.00319714,.176072,-.00939888,.380913,.0043572,.176131,-.0122726,.380979,.005702,.176239,-.0155264,.38112,.00723689,.176371,-.0191551,.381272,.00896907,.176638,-.023117,.381669,.0109194,.176912,-.0274633,.382015,.0130903,.177279,-.032173,.382476,.0154949,.17774,-.0372219,.383041,.0181669,.178344,-.0426132,.38378,.0211209,.179153,-.0483309,.384773,.0243899,.180197,-.0543447,.386076,.0280062,.181581,-.0607122,.387809,.032004,.18344,-.0673855,.390205,.036453,.186139,-.0743989,.393944,.0414162,.189432,-.0817731,.39832,.0469394,.193795,-.0895464,.404188,.0531442,.199641,-.0978264,.4121,.0601374,.206679,-.106499,.421425,.0680078,.214865,-.115654,.431504,.076919,.224406,-.125268,.442526,.0868835,.235876,-.135475,.455465,.0981875,.248335,-.146023,.4681,.110759,.262868,-.157016,.482069,.124885,.278962,-.168245,.496182,.140645,.295082,-.17958,.507401,.157838,.313738,-.191227,.520252,.17695,.333573,-.202718,.531708,.197817,.356433,-.214424,.544509,.220785,.378853,-.225492,.55373,.245306,.402717,-.236236,.561348,.271593,.428375,-.246568,.568538,.299776,.454724,-.255941,.573462,.329433,.482291,-.264511,.576356,.360598,.509706,-.272129,.576446,.393204,.538805,-.278979,.575298,.427227,.568919,-.284528,.572154,.462157,.596804,-.288801,.564691,.497997,.625987,-.291334,.555134,.534467,.656414,-.292722,.545051,.571736,.683916,-.292185,.528813,.610158,.711809,-.290043,.51106,.649061,.739547,-.285246,.490103,.690081,.766914,-.277647,.465523,.732554,.791375,-.267603,.437718,.773982,.814772,-.256109,.40882,.81609,.836691,-.242281,.377823,.856849,.856984,-.227155,.34496,.898363,.876332,-.210395,.311335,.939471,.894988,-.192612,.277703,.980799,.911113,-.173236,.243019,1.02215,.924092,-.152258,.209037,1.06139,.936828,-.129575,.175909,1.09635,.946869,-.10594,.143852,1.12707,.958284,-.081318,.110289,1.15419,.972325,-.0556133,.0747232,1.17909,.986878,-.0297899,.0383149,1.20163,.999936,-.00197169,912402e-9,1.22338,.151174,-720365e-11,.351531,309789e-11,.155594,-18279e-8,.361806,78608e-9,.156099,-731569e-9,.362982,314615e-9,.156053,-.00164578,.362869,707845e-9,.156093,-.0029261,.362961,.00125884,.156099,-.00457155,.362959,.00196783,.15612,-.00658224,.362982,.00283622,.156168,-.00895774,.363048,.00386625,.156221,-.0116962,.363101,.00506109,.156324,-.0147973,.363241,.00642675,.156476,-.0182503,.363448,.00797175,.156731,-.0220266,.36384,.00971484,.156994,-.026176,.364179,.0116575,.157341,-.0306701,.36462,.0138207,.157867,-.0354591,.365364,.0162356,.15846,-.0406141,.366111,.0189092,.159308,-.0460519,.367248,.021885,.160426,-.0518096,.368767,.0252004,.161877,-.0578906,.370745,.0288825,.163995,-.0642812,.373831,.0330139,.16655,-.0710067,.377366,.0376283,.170237,-.0781522,.382799,.0428493,.175096,-.0857172,.389915,.0487324,.181069,-.0938025,.398487,.0554214,.188487,-.102363,.408799,.0630189,.197029,-.111343,.419991,.071634,.206684,-.120812,.431455,.0812797,.218698,-.131033,.445746,.0923651,.230726,-.141373,.457471,.104545,.245516,-.152387,.472388,.118449,.261551,-.163628,.486671,.133923,.277437,-.174814,.49762,.150849,.296662,-.186713,.51162,.169924,.31795,-.198513,.525435,.190848,.339422,-.210119,.536267,.213504,.362143,-.221354,.545982,.237947,.387198,-.23224,.555364,.264427,.412349,-.24257,.561489,.292519,.439274,-.252284,.566903,.322561,.466779,-.261023,.569614,.353952,.496011,-.26899,.571589,.387278,.524964,-.275498,.570325,.421356,.556518,-.281449,.568792,.457314,.584363,-.285526,.560268,.493199,.614214,-.28844,.55205,.530276,.645684,-.289777,.541906,.56855,.673446,-.289722,.526464,.606927,.701924,-.287792,.509872,.645945,.73037,-.284315,.490649,.685564,.757405,-.278804,.467964,.726511,.784025,-.269543,.441468,.768601,.808255,-.258117,.41216,.811321,.830739,-.244728,.380606,.853496,.851914,-.229428,.348111,.895374,.872586,-.212508,.314732,.937674,.891581,-.194025,.280338,.979869,.907641,-.174711,.245203,1.02253,.922233,-.153509,.21077,1.06371,.935878,-.130418,.177399,1.09972,.946338,-.105558,.144507,1.13124,.957265,-.080059,.110508,1.15973,.971668,-.0539766,.0742311,1.18515,.9866,-.0277101,.0375224,1.20858,1.00021,-515531e-9,135226e-9,1.23135,.137468,-686011e-11,.345041,273315e-11,.13703,-173378e-9,.343936,690761e-10,.136986,-693048e-9,.34383,276126e-9,.136964,-.00155931,.343761,621337e-9,.137003,-.00277211,.343863,.00110494,.137012,-.00433103,.343868,.00172744,.137043,-.00623606,.343916,.00249022,.13709,-.0084868,.343986,.00339559,.137145,-.0110814,.344045,.00444687,.137242,-.0140187,.344177,.00565007,.137431,-.0172713,.344491,.00701868,.137644,-.0208605,.344805,.00856042,.13791,-.024792,.345172,.0102863,.138295,-.0290461,.345734,.0122185,.138764,-.0335957,.346371,.0143771,.139415,-.038467,.347298,.0167894,.140272,-.0436176,.348527,.0194895,.141457,-.0491016,.350276,.0225043,.14303,-.0548764,.352646,.0258962,.145289,-.0610096,.356206,.0297168,.148502,-.0674777,.361488,.0340562,.152188,-.074345,.367103,.0389534,.157359,-.0817442,.375247,.0445541,.16379,-.0896334,.385064,.0509535,.171376,-.098005,.396082,.0582611,.179901,-.106817,.407418,.06654,.189892,-.116239,.420031,.075994,.201838,-.12627,.434321,.0867239,.214311,-.136701,.447631,.0987517,.228902,-.147616,.462046,.112353,.245107,-.158871,.476942,.127605,.262292,-.170261,.490285,.144469,.281215,-.182017,.503783,.163282,.301058,-.193729,.515505,.183873,.322752,-.205512,.52682,.206466,.347547,-.217214,.539473,.231194,.370969,-.227966,.546625,.257288,.397533,-.238555,.55472,.285789,.42398,-.248278,.559468,.315746,.452928,-.257422,.564095,.347724,.482121,-.265306,.565426,.380922,.510438,-.272043,.563205,.415639,.541188,-.277614,.561087,.451702,.571667,-.281927,.554922,.48845,.602432,-.285015,.546838,.526442,.634126,-.286512,.537415,.564896,.662816,-.286388,.522906,.604037,.692411,-.284734,.507003,.643795,.720946,-.281297,.488398,.68298,.748293,-.276262,.466353,.723466,.776931,-.269978,.443573,.764565,.801065,-.260305,.415279,.805838,.825843,-.247426,.384773,.849985,.84807,-.232437,.352555,.893174,.869122,-.215806,.318642,.936564,.888963,-.197307,.28381,.980253,.905547,-.177203,.247888,1.02463,.918554,-.155542,.212904,1.06714,.931395,-.131948,.1787,1.10451,.941749,-.106723,.145902,1.13694,.954551,-.0804939,.111193,1.1666,.970279,-.0534239,.0744697,1.19249,.986117,-.0257452,.0368788,1.21665,.999938,.00190634,-.0010291,1.23981,.118493,-647439e-11,.32272,23772e-10,.118765,-163023e-9,.323456,598573e-10,.118772,-65212e-8,.323477,239447e-9,.118843,-.00146741,.323657,538881e-9,.118804,-.00260846,.323553,95826e-8,.118826,-.00407576,.323595,.00149845,.118846,-.00586826,.323617,.00216047,.118886,-.00798578,.32367,.00294679,.118947,-.0104273,.323753,.00386124,.119055,-.0131909,.323922,.00490999,.119241,-.0162444,.324251,.00610804,.11944,-.0196339,.324544,.00745805,.119739,-.0233378,.325026,.00897805,.12011,-.0273179,.325586,.0106895,.120571,-.0316143,.326231,.0126073,.12124,-.0361939,.327264,.0147654,.122162,-.0410511,.328733,.0172001,.123378,-.0462233,.330659,.0199375,.125183,-.0517109,.333754,.0230498,.127832,-.0575652,.338507,.026597,.130909,-.0637441,.343666,.0306345,.135221,-.0704302,.351063,.035273,.14082,-.0776364,.360604,.0406137,.146781,-.0852293,.369638,.0466788,.155121,-.0935351,.3827,.0537628,.16398,-.102234,.39522,.0617985,.173926,-.111465,.40793,.07097,.185137,-.121296,.42105,.0813426,.19826,-.13169,.435735,.0931596,.212938,-.142614,.450932,.106547,.229046,-.153884,.465726,.121575,.246246,-.165382,.479461,.138286,.264637,-.176806,.492106,.15666,.284959,-.188793,.504774,.17728,.308157,-.200763,.518805,.19988,.330951,-.21239,.528231,.224293,.3549,-.223521,.536376,.250541,.381502,-.234169,.544846,.278902,.409529,-.244077,.551717,.309227,.437523,-.253363,.55517,.341426,.467624,-.261659,.557772,.37518,.497268,-.268498,.556442,.41007,.528294,-.274018,.553915,.446445,.559053,-.278169,.549153,.483779,.589329,-.281229,.539878,.522249,.622503,-.282902,.53162,.561754,.652382,-.282815,.518119,.601544,.681847,-.281247,.502187,.641574,.712285,-.277986,.484824,.682633,.740094,-.273017,.463483,.723426,.768478,-.266692,.441299,.763747,.794556,-.258358,.415238,.805565,.819408,-.248807,.386912,.847254,.843411,-.236214,.356165,.891091,.862397,-.219794,.320562,.936174,.883113,-.201768,.285322,.982562,.90023,-.181672,.249713,1.02862,.915192,-.159279,.214546,1.07163,.928458,-.134725,.180285,1.10995,.94069,-.10913,.147119,1.14354,.953409,-.0821315,.112492,1.17372,.969537,-.0542677,.0752014,1.20043,.985612,-.0259096,.0370361,1.22528,.999835,.00298198,-.00151801,1.24959,.10097,-602574e-11,.300277,202619e-11,.101577,-152164e-9,.302077,511662e-10,.101572,-608889e-9,.302066,204751e-9,.101566,-.00136997,.302047,460753e-9,.101592,-.00243557,.302114,819497e-9,.101608,-.0038053,.30214,.00128154,.101627,-.00547906,.30216,.0018483,.101669,-.00745647,.302224,.00252223,.101732,-.00973615,.302318,.00330716,.101844,-.0123097,.302513,.00421061,.102025,-.0151681,.30285,.00524481,.102224,-.0183334,.303166,.0064154,.102515,-.0217819,.303654,.00774063,.102886,-.0255067,.304243,.0092398,.103395,-.029514,.305089,.0109339,.104109,-.0337912,.306301,.0128561,.105074,-.0383565,.30798,.0150338,.10654,-.0432132,.310726,.0175228,.108478,-.0484244,.314351,.0203648,.111015,-.0539339,.319032,.0236325,.114682,-.0598885,.32605,.0274188,.11911,-.0663375,.334109,.0317905,.124736,-.0733011,.344013,.0368502,.131479,-.0807744,.355358,.0427104,.139283,-.0888204,.367614,.0494788,.148054,-.0973394,.380072,.0572367,.159037,-.10665,.395678,.0662704,.169794,-.116221,.40795,.0763192,.18314,-.126632,.423546,.087956,.197515,-.137383,.438213,.101042,.213514,-.148641,.453248,.115827,.23065,-.160117,.46688,.132283,.249148,-.171807,.479962,.150644,.270219,-.183695,.494618,.171073,.292338,-.195574,.506937,.193378,.314999,-.207205,.516463,.217585,.340991,-.218955,.528123,.24428,.367982,-.229917,.537025,.272784,.39432,-.239737,.541627,.302742,.423364,-.249048,.546466,.335112,.453751,-.257329,.549466,.369032,.48416,-.264623,.549503,.404577,.515262,-.270411,.547008,.441337,.547036,-.274581,.542249,.479162,.576614,-.277266,.533015,.517904,.611143,-.279144,.525512,.558508,.640989,-.279001,.51154,.598995,.671182,-.277324,.495641,.639935,.700848,-.273908,.477526,.681017,.729862,-.269063,.457955,.722764,.758273,-.262282,.434846,.764349,.784121,-.254281,.409203,.806206,.809798,-.24505,.382694,.848617,.834953,-.233861,.354034,.892445,.856817,-.221308,.321764,.936263,.877609,-.205996,.288118,.982401,.897489,-.186702,.253277,1.02975,.913792,-.164618,.217963,1.07488,.92785,-.140023,.183221,1.11487,.940378,-.11328,.149385,1.14947,.95273,-.0853958,.114152,1.1807,.969059,-.0568698,.0769845,1.20912,.985574,-.0276502,.0381186,1.23498,.999943,.00239052,-.00126861,1.25987,.0852715,-560067e-11,.279021,171162e-11,.0854143,-140871e-9,.279483,430516e-10,.0854191,-563385e-9,.2795,172184e-9,.0854188,-.00126753,.279493,387464e-9,.0854229,-.00225337,.279501,68918e-8,.0854443,-.00352086,.279549,.00107803,.0854697,-.00506962,.279591,.00155536,.0855093,-.00689873,.279652,.00212354,.0855724,-.00900821,.279752,.00278703,.0856991,-.0113799,.280011,.0035551,.085855,-.0140314,.280297,.00443449,.0860682,-.016963,.280682,.00543636,.086344,-.0201438,.281159,.0065788,.0867426,-.0235999,.281886,.00787977,.087239,-.0273069,.282745,.0093606,.0879815,-.031269,.284139,.011056,.0891258,-.035531,.28647,.0130065,.0906909,-.0400947,.289708,.0152495,.0927624,-.0449638,.293904,.0178454,.0958376,-.0502427,.300471,.0208915,.0995827,-.0559514,.30806,.0244247,.104526,-.0622152,.317874,.0285721,.110532,-.0690046,.329332,.0334227,.117385,-.0763068,.341217,.0390466,.12522,-.084184,.353968,.0455786,.134037,-.0925248,.366797,.0530773,.144014,-.101487,.380209,.0617424,.156013,-.111273,.395956,.071777,.168872,-.121431,.41053,.0830905,.183089,-.132105,.425073,.0959341,.198763,-.143286,.439833,.110448,.216159,-.154841,.454507,.126769,.234859,-.166588,.468368,.14495,.255879,-.178626,.482846,.165233,.27677,-.190218,.493489,.187217,.301184,-.202227,.506549,.211659,.325852,-.213764,.5158,.237922,.352824,-.22487,.525442,.26632,.380882,-.235246,.532487,.296691,.410137,-.244847,.537703,.329179,.439787,-.253122,.540361,.363135,.472291,-.260517,.542734,.399222,.501856,-.266519,.538826,.436352,.534816,-.270905,.535152,.474505,.565069,-.273826,.525979,.513988,.597154,-.275333,.516394,.554852,.630473,-.275314,.506206,.596592,.660574,-.273323,.489769,.638117,.692015,-.270008,.472578,.680457,.720647,-.265001,.452134,.723008,.750528,-.258311,.430344,.765954,.777568,-.250046,.405624,.809012,.80387,-.240114,.378339,.852425,.828439,-.228737,.349877,.895346,.851472,-.216632,.318968,.940695,.873906,-.202782,.287489,.987235,.89467,-.187059,.254394,1.03348,.912281,-.168818,.221294,1.07812,.927358,-.146494,.18675,1.11928,.940385,-.120009,.152322,1.15609,.952672,-.0917183,.117514,1.18875,.968496,-.0620321,.0797405,1.21821,.985236,-.0314945,.0402383,1.24523,.99998,-575153e-9,110644e-9,1.27133,.0702429,-512222e-11,.255273,140947e-11,.0702981,-128826e-9,.255469,354488e-10,.0703691,-515562e-9,.255727,141874e-9,.0703805,-.00116,.255754,31929e-8,.0703961,-.00206224,.255813,567999e-9,.0704102,-.00322223,.255839,88871e-8,.0704298,-.00463928,.255863,.00128272,.0704759,-.00631375,.255953,.00175283,.0705434,-.00824317,.256079,.00230342,.0706693,-.010412,.25636,.0029443,.0708189,-.0128439,.256647,.00368031,.0710364,-.0155177,.257084,.00452614,.0713223,-.0184374,.257637,.00549706,.0717182,-.0216002,.258416,.00661246,.072321,-.0249966,.259699,.00790147,.0731446,-.0286566,.261475,.0093884,.0743352,-.0325888,.264132,.0111186,.0760676,-.036843,.26815,.013145,.078454,-.0414292,.273636,.0155251,.0818618,-.0464634,.281653,.0183525,.0857382,-.0519478,.289992,.0216642,.0908131,-.0579836,.30066,.0255956,.0967512,-.0645124,.312204,.0301954,.103717,-.0716505,.325001,.0356017,.111596,-.0793232,.338129,.041896,.120933,-.087645,.352853,.0492447,.130787,-.096492,.366192,.0576749,.142311,-.105973,.380864,.0673969,.155344,-.116182,.396575,.0785899,.169535,-.126815,.411443,.0912377,.185173,-.138015,.426256,.105607,.201755,-.149325,.439607,.121551,.221334,-.161207,.455467,.139608,.241461,-.173162,.469096,.159591,.26294,-.18504,.481014,.18156,.286776,-.196881,.493291,.205781,.311596,-.208311,.503556,.231819,.338667,-.219671,.513268,.260274,.366021,-.230451,.519414,.290862,.395875,-.240131,.526766,.323196,.425564,-.248566,.52905,.357071,.457094,-.256195,.530796,.393262,.488286,-.262331,.528703,.430797,.522291,-.267141,.52727,.470231,.554172,-.270411,.519848,.510477,.586427,-.271986,.510307,.551594,.619638,-.27192,.499158,.593849,.650656,-.269817,.483852,.636314,.68284,-.266267,.467515,.679679,.714356,-.26113,.44931,.723884,.742717,-.254067,.425789,.767245,.770894,-.245652,.401144,.811819,.797358,-.235554,.374224,.856315,.823377,-.223896,.346167,.901077,.847456,-.210865,.316056,.946502,.870697,-.196574,.284503,.993711,.891068,-.180814,.251628,1.04134,.909267,-.163314,.219065,1.08609,.925653,-.143304,.186446,1.12702,.940017,-.121322,.153416,1.16371,.952398,-.0973872,.120334,1.19712,.967568,-.0698785,.08352,1.22791,.984772,-.0390031,.0439209,1.25672,1.00026,-.0070087,.00315668,1.28428,.0556653,-459654e-11,.227325,112556e-11,.0565238,-116382e-9,.230826,284985e-10,.0565717,-465666e-9,.231026,114036e-9,.0565859,-.00104773,.231079,256656e-9,.0565761,-.00186255,.231025,45663e-8,.0565913,-.00291002,.231058,714664e-9,.0566108,-.00418998,.231085,.00103224,.0566532,-.00570206,.231169,.00141202,.0567473,-.00743666,.231417,.00186018,.0568567,-.00940298,.231661,.00238264,.0569859,-.0115991,.231895,.00298699,.0572221,-.0140096,.232456,.00368957,.057519,-.0166508,.233096,.00450303,.0579534,-.01951,.234094,.00544945,.0585922,-.0225991,.235629,.00655564,.0595647,-.0259416,.238106,.00785724,.0609109,-.0295661,.241557,.00939127,.0628751,-.0335126,.246652,.0112198,.0656908,-.0378604,.254091,.0134168,.0691347,-.0426543,.262666,.0160374,.0732165,-.0478967,.272029,.0191514,.0782863,-.0536716,.283007,.0228597,.0843973,-.0600683,.295732,.0272829,.0913598,-.0670095,.308779,.032484,.0994407,-.0745516,.322886,.0385886,.108189,-.082712,.336408,.0457133,.118574,-.0914927,.351692,.0539832,.129989,-.100854,.366502,.0635162,.142722,-.110837,.381675,.0744386,.156654,-.121353,.3963,.0868483,.172151,-.132414,.411477,.100963,.188712,-.143809,.42508,.116795,.208093,-.155765,.441328,.134715,.227936,-.167608,.454328,.154396,.249495,-.179579,.467235,.176179,.27362,-.191488,.480248,.200193,.296371,-.202618,.487886,.225775,.324234,-.214133,.499632,.25441,.353049,-.225212,.509532,.285077,.381785,-.234875,.514265,.317047,.414038,-.244205,.521282,.351874,.445251,-.252145,.522931,.388279,.476819,-.258433,.520947,.425825,.509209,-.263411,.517669,.465104,.542759,-.266732,.512841,.505741,.574822,-.268263,.503317,.547611,.609324,-.268489,.493035,.590953,.641772,-.266941,.478816,.63488,.674049,-.263297,.462863,.679072,.705071,-.257618,.442931,.723487,.734709,-.250625,.421299,.768708,.763704,-.24179,.397085,.814375,.791818,-.231115,.370577,.859907,.817439,-.21922,.34232,.906715,.843202,-.205658,.312627,.953943,.866639,-.190563,.280933,1.00185,.888129,-.173978,.248393,1.05105,.907239,-.155485,.216007,1.09704,.923893,-.134782,.183233,1.13857,.938882,-.11249,.150376,1.17539,.952464,-.0890706,.117177,1.20924,.968529,-.0646523,.0813095,1.24055,.984763,-.038606,.0439378,1.27018,1.00053,-.01238,.00598668,1.29873,.0437928,-409594e-11,.204012,879224e-12,.0440166,-103395e-9,.205049,221946e-10,.0440529,-413633e-9,.205225,887981e-10,.0440493,-930594e-9,.2052,199858e-9,.0439884,-.00165352,.204901,355495e-9,.0440716,-.0025849,.205255,556983e-9,.0440968,-.00372222,.205311,805326e-9,.0441359,-.00506478,.205391,.00110333,.0442231,-.00660384,.205638,.00145768,.0443254,-.00835246,.205877,.00187275,.0444832,-.0102992,.20627,.00235938,.0447001,-.0124449,.206796,.0029299,.0450168,-.0147935,.207593,.0036005,.0454816,-.017336,.208819,.00439246,.0462446,-.0201156,.211036,.00533864,.0473694,-.0231568,.214388,.00646984,.0490191,-.0264941,.219357,.00783856,.0512776,-.030184,.226061,.00950182,.0541279,-.0342661,.234094,.0115156,.0578989,-.0388539,.244297,.0139687,.0620835,-.0438735,.254457,.0169015,.0673497,-.04951,.266706,.0204554,.0731759,-.0556263,.278753,.0246606,.0803937,-.0624585,.29309,.0297126,.0879287,-.0697556,.305856,.0355868,.0970669,-.0778795,.321059,.0425768,.106508,-.0863541,.333873,.05056,.11776,-.0955935,.349008,.0598972,.130081,-.105438,.363776,.0706314,.144454,-.115899,.380112,.0828822,.1596,-.126827,.394843,.0967611,.176097,-.138161,.409033,.112381,.194726,-.149904,.424257,.129952,.213944,-.161675,.436945,.149333,.235516,-.173659,.450176,.170892,.260564,-.185963,.466305,.194984,.285183,-.197582,.477328,.220805,.311095,-.208697,.486566,.248694,.338924,-.219519,.494811,.279015,.369757,-.229766,.504065,.311725,.3996,-.238879,.507909,.345844,.430484,-.246802,.509805,.381749,.46413,-.253924,.511436,.420251,.497077,-.259319,.508787,.459957,.530434,-.263297,.50394,.501356,.565725,-.265619,.49804,.544252,.599254,-.265842,.487346,.587856,.631251,-.263978,.472975,.631969,.663972,-.26043,.457135,.677471,.697724,-.255358,.439844,.723744,.727725,-.248308,.417872,.770653,.756417,-.239181,.39273,.817357,.785419,-.22814,.367839,.864221,.81266,-.215681,.339449,.912701,.839391,-.201623,.309279,.962419,.86366,-.185624,.278029,1.0122,.885028,-.16797,.245294,1.06186,.904639,-.148336,.212689,1.10934,.922048,-.12637,.179616,1.15063,.936952,-.102928,.146749,1.18885,.951895,-.0785268,.112733,1.22352,.967198,-.0530153,.0760056,1.25681,.984405,-.02649,.0383183,1.28762,1.00021,70019e-8,-20039e-8,1.31656,.0325964,-355447e-11,.176706,655682e-12,.0329333,-899174e-10,.178527,165869e-10,.0329181,-359637e-9,.178453,663498e-10,.0329085,-808991e-9,.178383,149332e-9,.0329181,-.00143826,.178394,265873e-9,.0329425,-.00224678,.178517,416597e-9,.0329511,-.00323575,.17849,603299e-9,.033011,-.00439875,.178695,829422e-9,.0330733,-.00574059,.178843,.00109908,.0331857,-.00725896,.179176,.00141933,.0333445,-.00895289,.179618,.0017999,.0335674,-.0108219,.180238,.00225316,.033939,-.0128687,.181417,.00279765,.0345239,-.015114,.183395,.0034564,.0354458,-.017596,.186616,.00425864,.0368313,-.0203524,.191547,.00524936,.0386115,-.0234105,.197508,.00647033,.0410303,-.0268509,.205395,.00798121,.0442245,-.0307481,.215365,.0098557,.0478659,-.0350863,.225595,.0121417,.0522416,-.0399506,.236946,.0149385,.0574513,-.045357,.249442,.0183189,.0631208,-.0512863,.261222,.0223644,.0701124,-.0579273,.275418,.0272418,.0777331,-.0650652,.288989,.0329458,.0862709,-.0728813,.302546,.0396819,.096103,-.081363,.317164,.04757,.106976,-.0904463,.331733,.0567012,.119175,-.100105,.34661,.067202,.132919,-.110375,.362249,.0792588,.147727,-.121115,.376978,.0928672,.163618,-.132299,.390681,.108228,.182234,-.143887,.406571,.125502,.201809,-.155827,.42042,.144836,.225041,-.168357,.438411,.166706,.247621,-.18004,.450368,.189909,.27097,-.191536,.460083,.215251,.296658,-.203024,.469765,.243164,.325892,-.214056,.481837,.273388,.35406,-.224104,.487474,.305344,.384372,-.233489,.492773,.339741,.41749,-.241874,.498451,.376287,.45013,-.248834,.499632,.414195,.481285,-.254658,.495233,.454077,.519183,-.259367,.496401,.496352,.551544,-.261818,.487686,.538798,.587349,-.262964,.479453,.583626,.621679,-.262128,.467709,.629451,.654991,-.258998,.452123,.67566,.686873,-.254119,.433495,.723248,.719801,-.246946,.413657,.771156,.750355,-.237709,.390366,.81989,.780033,-.226549,.364947,.868601,.809254,-.214186,.337256,.920034,.836576,-.199639,.307395,.971706,.861774,-.183169,.275431,1.02479,.885707,-.165111,.243431,1.07837,.904742,-.144363,.210921,1.12783,.915604,-.121305,.17647,1.17254,.930959,-.0962119,.143106,1.21012,.948404,-.069969,.108112,1.24474,.967012,-.0427586,.0708478,1.27718,.984183,-.0147043,.032335,1.3083,.999577,.0142165,-.00726867,1.3382,.0229227,-299799e-11,.148623,462391e-12,.0232194,-758796e-10,.15054,117033e-10,.0232315,-303636e-9,.15063,468397e-10,.0232354,-683189e-9,.150624,105472e-9,.0232092,-.0012136,.150445,187744e-9,.0232523,-.00189765,.150679,294847e-9,.0232828,-.00273247,.150789,428013e-9,.0233371,-.00371287,.150995,591134e-9,.0234015,-.00484794,.15118,787642e-9,.023514,-.00612877,.151562,.00102547,.023679,-.00756125,.152116,.00131351,.0239559,-.00914651,.153162,.00166594,.0244334,-.010904,.155133,.00210182,.025139,-.0128615,.158035,.00264406,.0262598,-.0150628,.162751,.00332923,.0277875,-.0175532,.168944,.00419773,.0298472,-.0203981,.176835,.00530034,.0325444,-.023655,.186686,.00669777,.0355581,-.0272982,.196248,.00842661,.0392841,-.0314457,.207352,.0105854,.0436815,-.0361157,.219279,.0132458,.0485272,-.0412932,.230728,.0164736,.0541574,-.0470337,.242994,.0203715,.0609479,-.0535002,.257042,.0250953,.0685228,-.0605409,.27102,.0306856,.0768042,-.0680553,.28406,.037193,.0864844,-.0765011,.299186,.0449795,.0969415,-.0852674,.3132,.0538316,.108478,-.0947333,.327138,.0641149,.121705,-.10481,.342345,.0759185,.136743,-.115474,.358472,.0894116,.152986,-.126536,.374067,.104562,.170397,-.138061,.388267,.121632,.191392,-.150203,.406467,.140996,.211566,-.161751,.418641,.161696,.233567,-.173407,.430418,.184557,.257769,-.185397,.44277,.210092,.28531,-.197048,.457191,.237827,.311726,-.20784,.464712,.267253,.340537,-.218345,.472539,.299332,.372921,-.228306,.482331,.333988,.402924,-.236665,.484378,.369722,.434475,-.244097,.484717,.407836,.469736,-.250547,.487093,.448465,.505045,-.25511,.485575,.490263,.540262,-.258444,.481225,.534495,.576347,-.259903,.473481,.579451,.608656,-.259572,.4603,.625604,.646679,-.257908,.450341,.674511,.679902,-.253663,.431561,.723269,.714159,-.247419,.412684,.773263,.745345,-.239122,.389388,.824182,.778248,-.228837,.365361,.876634,.807208,-.216197,.337667,.92945,.835019,-.201772,.307197,.985261,.860261,-.185291,.274205,1.04299,.877601,-.165809,.240178,1.09816,.898211,-.143897,.207571,1.14694,.915789,-.119513,.174904,1.19008,.931831,-.0932919,.141423,1.2297,.949244,-.0656528,.105603,1.26553,.967527,-.0370262,.0679551,1.29986,.984139,-.00730117,.0283133,1.33252,.999713,.0234648,-.0121785,1.36397,.0152135,-245447e-11,.122795,304092e-12,.0151652,-615778e-10,.122399,76292e-10,.0151181,-245948e-9,.122023,304802e-10,.0151203,-553394e-9,.12203,686634e-10,.015125,-983841e-9,.122037,122463e-9,.0151427,-.00153774,.12214,192706e-9,.0151708,-.0022103,.122237,281219e-9,.0152115,-.00300741,.12238,390804e-9,.0152877,-.00392494,.1227,526317e-9,.015412,-.00496597,.123244,69443e-8,.0156201,-.00613314,.124228,90547e-8,.0159658,-.00744113,.125945,.0011732,.0165674,-.00892546,.129098,.00151888,.017487,-.010627,.133865,.00197007,.018839,-.0126043,.140682,.0025637,.020554,-.0148814,.148534,.00333637,.0226727,-.0175123,.157381,.00433738,.0251879,-.0205266,.166685,.00561664,.0283635,-.0240319,.177796,.00725563,.0318694,-.0279432,.188251,.00928811,.0361044,-.0324313,.200038,.011835,.0406656,-.0373527,.210685,.0149146,.0463846,-.0430132,.224182,.0187254,.0525696,-.0491013,.23634,.0232283,.0598083,-.0559175,.250013,.0286521,.0679437,-.0633657,.263981,.0350634,.0771181,-.0714602,.278072,.0425882,.0881273,-.0803502,.29511,.0514487,.0996628,-.0896903,.309976,.0615766,.112702,-.099644,.325611,.0732139,.126488,-.109829,.339321,.0862324,.142625,-.120859,.35574,.101275,.15953,-.131956,.369845,.117892,.176991,-.143145,.38146,.136205,.199715,-.155292,.40052,.157252,.220787,-.167066,.412055,.179966,.243697,-.178396,.423133,.204418,.272106,-.190433,.439524,.232141,.297637,-.201265,.447041,.261109,.325273,-.211834,.454488,.292627,.357219,-.221889,.465004,.326669,.387362,-.230729,.468527,.362426,.423131,-.23924,.475836,.401533,.45543,-.246067,.475017,.441902,.493393,-.251557,.478017,.484239,.526253,-.255571,.4709,.528586,.560554,-.257752,.463167,.574346,.599306,-.258076,.456452,.621655,.634541,-.256471,.443725,.670492,.668907,-.253283,.428719,.721943,.705619,-.247562,.411348,.772477,.739034,-.240626,.388939,.8264,.771408,-.231493,.36425,.881702,.803312,-.220125,.337321,.9385,.828457,-.206645,.305364,.997437,.854819,-.190664,.273715,1.05693,.878666,-.171429,.242218,1.11251,.898404,-.149235,.209556,1.16398,.917416,-.12435,.176863,1.21014,.933133,-.0972703,.142775,1.25178,.95066,-.0683607,.106735,1.29028,.968589,-.0378724,.0681609,1.32703,.984776,-.00605712,.0273966,1.36158,.99994,.0263276,-.0138124,1.3943,.00867437,-186005e-11,.0928979,173682e-12,.00864003,-466389e-10,.0925237,435505e-11,.00864593,-186594e-9,.0925806,174322e-10,.00864095,-419639e-9,.0924903,392862e-10,.00863851,-746272e-9,.0924589,702598e-10,.00868531,-.00116456,.0929,111188e-9,.00869667,-.00167711,.0928529,163867e-9,.00874332,-.00228051,.0930914,23104e-8,.00882709,-.00297864,.0935679,31741e-8,.00898874,-.00377557,.0946165,430186e-9,.00929346,-.00469247,.0967406,580383e-9,.00978271,-.00575491,.100084,783529e-9,.0105746,-.00701514,.105447,.00106304,.0116949,-.00851797,.112494,.00144685,.0130419,-.0102757,.119876,.00196439,.0148375,-.012381,.129034,.00266433,.0168725,-.01482,.137812,.00358364,.0193689,-.0176563,.147696,.00478132,.0222691,-.0209211,.157795,.00631721,.0256891,-.0246655,.168431,.00826346,.0294686,-.0288597,.178587,.0106714,.0340412,-.0336441,.190251,.0136629,.0393918,-.039033,.202999,.0173272,.0453947,-.0450087,.215655,.0217448,.0521936,-.0515461,.228686,.0269941,.0600279,-.058817,.242838,.033272,.0692398,-.0667228,.258145,.0406457,.0793832,-.0752401,.273565,.0492239,.0902297,-.0841851,.287735,.0590105,.102014,-.0936479,.301161,.0702021,.116054,-.103967,.317438,.0832001,.13191,-.114622,.334166,.0977951,.148239,-.125452,.348192,.113985,.165809,-.136453,.361094,.131928,.184616,-.147648,.373534,.151811,.207491,-.159607,.39101,.174476,.230106,-.171119,.402504,.198798,.257036,-.182906,.418032,.225796,.281172,-.193605,.425468,.254027,.312034,-.204771,.440379,.285713,.340402,-.214988,.445406,.319196,.370231,-.224711,.44968,.35537,.407105,-.233516,.460747,.393838,.439037,-.240801,.460624,.433747,.47781,-.24762,.465957,.477234,.510655,-.251823,.460054,.52044,.550584,-.255552,.459172,.567853,.585872,-.257036,.450311,.615943,.620466,-.257535,.437763,.667693,.660496,-.255248,.426639,.718988,.695578,-.251141,.409185,.772503,.732176,-.244718,.39015,.827023,.760782,-.236782,.362594,.885651,.79422,-.225923,.33711,.943756,.824521,-.213855,.308272,1.00874,.854964,-.197723,.278529,1.06764,.878065,-.179209,.246208,1.12836,.899834,-.157569,.21329,1.18318,.918815,-.133206,.181038,1.23161,.934934,-.106545,.146993,1.27644,.952115,-.0780574,.111175,1.31842,.96906,-.0478279,.0728553,1.35839,.985178,-.0160014,.032579,1.39697,1.00039,.0173126,-.0095256,1.43312,.00384146,-124311e-11,.0613583,778271e-13,.00390023,-314043e-10,.0622919,196626e-11,.00389971,-125622e-9,.0622632,787379e-11,.00389491,-282352e-9,.0620659,1778e-8,.00391618,-502512e-9,.0624687,320918e-10,.00392662,-784458e-9,.0625113,515573e-10,.00396053,-.00112907,.0628175,778668e-10,.00401911,-.00153821,.0633286,113811e-9,.00414994,-.0020208,.0646443,16445e-8,.00441223,-.00260007,.0673886,237734e-9,.00484427,-.0033097,.0716528,345929e-9,.00549109,-.00418966,.0774998,505987e-9,.00636293,-.00527331,.0844758,739208e-9,.00746566,-.00660428,.0921325,.00107347,.00876625,-.00818826,.0997067,.00153691,.0103125,-.0100811,.107433,.00217153,.0123309,-.0123643,.117088,.00303427,.0146274,-.0150007,.126438,.00416018,.0172295,-.0180531,.135672,.00561513,.0204248,-.0215962,.146244,.007478,.0241597,-.0256234,.157481,.00981046,.0284693,-.0302209,.169125,.0127148,.033445,-.0353333,.181659,.0162453,.0391251,-.0410845,.1944,.0205417,.0454721,-.0473451,.207082,.0256333,.0530983,-.0542858,.221656,.0317036,.0615356,-.0618384,.236036,.0388319,.0703363,-.0697631,.248398,.046974,.0810391,-.0784757,.263611,.0565246,.0920144,-.0873488,.275857,.0671724,.105584,-.0973652,.292555,.0798105,.119506,-.107271,.306333,.0935945,.134434,-.117608,.318888,.109106,.153399,-.128938,.337552,.127074,.171258,-.139944,.349955,.14643,.191059,-.151288,.361545,.168,.215069,-.163018,.378421,.192082,.237838,-.174226,.38879,.217838,.266965,-.186063,.405857,.246931,.292827,-.196909,.414146,.277505,.324352,-.207473,.426955,.310711,.354427,-.217713,.433429,.346794,.389854,-.227183,.443966,.385237,.420749,-.235131,.44471,.424955,.459597,-.242786,.451729,.468446,.495316,-.248767,.45072,.513422,.534903,-.253351,.450924,.560618,.572369,-.256277,.445266,.609677,.612383,-.2576,.438798,.660995,.644037,-.256931,.421693,.713807,.686749,-.254036,.4109,.767616,.719814,-.249785,.390151,.82533,.754719,-.244283,.367847,.888311,.792022,-.235076,.345013,.948177,.822404,-.225061,.316193,1.01661,.853084,-.211113,.287013,1.08075,.879871,-.19449,.255424,1.14501,.901655,-.174023,.222879,1.20203,.919957,-.1509,.18989,1.25698,.938412,-.124923,.15606,1.30588,.953471,-.0968139,.120512,1.3529,.970451,-.066734,.0828515,1.3986,.985522,-.034734,.0424458,1.44148,1.00099,-.00102222,678929e-9,1.48398,965494e-9,-627338e-12,.0306409,197672e-13,99168e-8,-158573e-10,.0314638,499803e-12,991068e-9,-634012e-10,.031363,200682e-11,974567e-9,-14144e-8,.03036,457312e-11,998079e-9,-252812e-9,.031496,860131e-11,.00102243,-396506e-9,.0319955,148288e-10,.00107877,-577593e-9,.0331376,249141e-10,.00121622,-816816e-9,.0359396,423011e-10,.0014455,-.00113761,.0399652,724613e-10,.00178791,-.00156959,.0450556,123929e-9,.00225668,-.00214064,.0508025,208531e-9,.00285627,-.00287655,.0568443,341969e-9,.0035991,-.00380271,.0630892,544158e-9,.00455524,-.00496264,.0702204,842423e-9,.00569143,-.0063793,.0773426,.00126704,.00716928,-.00813531,.0860839,.00186642,.00885307,-.0101946,.0944079,.00267014,.0109316,-.0126386,.103951,.00374033,.0133704,-.0154876,.113786,.0051304,.0161525,-.0187317,.123477,.00688858,.0194267,-.0224652,.133986,.00910557,.0230967,-.0265976,.143979,.0118074,.0273627,-.0312848,.154645,.0151266,.0323898,-.0365949,.166765,.0191791,.0379225,-.0422914,.177932,.0239236,.0447501,-.0487469,.19167,.0296568,.0519391,-.0556398,.203224,.0362924,.0599464,-.0631646,.215652,.0440585,.0702427,-.0714308,.232089,.0531619,.0806902,-.0800605,.245258,.0634564,.0923194,-.0892815,.258609,.0752481,.106938,-.09931,.276654,.0888914,.121238,-.109575,.289847,.104055,.138817,-.120461,.307566,.121266,.15595,-.131209,.320117,.139944,.178418,-.143049,.339677,.161591,.197875,-.154074,.349886,.184303,.224368,-.166307,.369352,.210669,.252213,-.178051,.386242,.238895,.277321,-.189335,.395294,.269182,.310332,-.200683,.412148,.302508,.338809,-.210856,.418266,.337264,.372678,-.220655,.428723,.374881,.405632,-.230053,.433887,.415656,.442293,-.237993,.439911,.457982,.477256,-.244897,.440175,.502831,.515592,-.250657,.441079,.550277,.550969,-.255459,.435219,.601102,.592883,-.257696,.432882,.651785,.629092,-.259894,.421054,.708961,.672033,-.258592,.41177,.763806,.709147,-.256525,.395267,.824249,.745367,-.254677,.375013,.8951,.784715,-.247892,.353906,.959317,.818107,-.240162,.327801,1.03153,.847895,-.229741,.298821,1.10601,.879603,-.213084,.269115,1.164,.902605,-.195242,.236606,1.22854,.922788,-.174505,.203442,1.29017,.944831,-.150169,.169594,1.34157,.959656,-.124099,.135909,1.3956,.972399,-.0960626,.0990563,1.45128,.986549,-.0657097,.0602348,1.50312,1.00013,-.0333558,.0186694,1.55364,619747e-11,-1e-7,.00778326,796756e-16,237499e-13,-999999e-13,282592e-10,114596e-15,100292e-11,-166369e-11,250354e-9,677492e-14,350752e-11,-637769e-11,357289e-9,631655e-13,826445e-11,-174689e-10,516179e-9,31851e-11,242481e-10,-450868e-10,.0010223,130577e-11,455631e-10,-89044e-9,.00144302,374587e-11,971222e-10,-178311e-9,.00241912,102584e-10,171403e-9,-313976e-9,.00354938,236481e-10,292747e-9,-520026e-9,.00513765,496014e-10,789827e-9,-.00118187,.0238621,139056e-9,.00114093,-.00171827,.0286691,244093e-9,.00176119,-.00249667,.0368565,420623e-9,.0022233,-.00333742,.0400469,65673e-8,.00343382,-.00481976,.0535751,.00109323,.00427602,-.00600755,.057099,.00155268,.00461435,-.00737637,.0551084,.00215031,.00695698,-.00971401,.0715767,.00316529,.00867619,-.0120943,.0793314,.00436995,.0106694,-.0148202,.0869391,.0058959,.0140351,-.0183501,.101572,.00798757,.0168939,-.022006,.11018,.0104233,.020197,-.0261568,.119041,.0134167,.0254702,-.0312778,.135404,.0173009,.0298384,-.0362469,.1437,.0215428,.035159,-.042237,.15512,.0268882,.0427685,-.0488711,.17128,.033235,.0494848,-.0557997,.181813,.0404443,.0592394,-.0635578,.198745,.0490043,.0681463,-.071838,.210497,.0588239,.0804753,-.0809297,.228864,.0702835,.0942205,-.0906488,.247008,.0834012,.106777,-.100216,.258812,.0975952,.124471,-.110827,.278617,.114162,.138389,-.121193,.287049,.131983,.159543,-.13253,.307151,.152541,.176432,-.143611,.31564,.174673,.201723,-.15548,.33538,.199842,.229721,-.167166,.355256,.227097,.250206,-.178238,.360047,.256014,.282118,-.189905,.378761,.28855,.312821,-.201033,.39181,.323348,.341482,-.211584,.397716,.360564,.377368,-.221314,.410141,.400004,.418229,-.230474,.423485,.442371,.444881,-.239443,.418874,.488796,.488899,-.245987,.427545,.535012,.520317,-.253948,.422147,.589678,.568566,-.256616,.42719,.637683,.599607,-.26376,.415114,.703363,.64222,-.268687,.408715,.771363,.685698,-.2694,.399722,.83574,.732327,-.266642,.388651,.897764,.769873,-.267712,.369198,.983312,.806733,-.263479,.346802,1.06222,.843466,-.254575,.321368,1.13477,.873008,-.242749,.29211,1.20712,.908438,-.22725,.262143,1.27465,.936321,-.207621,.228876,1.33203,.950353,-.187932,.19484,1.40439,.96442,-.165154,.163178,1.4732,.979856,-.139302,.127531,1.53574,.982561,-.11134,.0903457,1.59982,.996389,-.0808124,.0489007,1.6577],r=[1,0,0,0,1,791421e-36,0,0,1,104392e-29,0,0,1,349405e-26,0,0,1,109923e-23,0,0,1,947414e-22,0,0,1,359627e-20,0,0,1,772053e-19,0,0,1,108799e-17,0,0,1,110655e-16,0,0,1,865818e-16,0,0,.999998,545037e-15,0,0,.999994,285095e-14,0,0,.999989,126931e-13,0,0,.999973,489938e-13,0,0,.999947,166347e-12,0,0,.999894,502694e-12,0,0,.999798,136532e-11,0,0,.999617,335898e-11,0,0,.999234,752126e-11,0,0,.998258,152586e-10,0,0,.99504,266207e-10,0,0,.980816,236802e-10,0,0,.967553,207684e-11,0,0,.966877,403733e-11,0,0,.965752,741174e-11,0,0,.96382,127746e-10,0,0,.960306,202792e-10,0,0,.953619,280232e-10,0,0,.941103,278816e-10,0,0,.926619,160221e-10,0,0,.920983,235164e-10,0,0,.912293,311924e-10,0,.0158731,.899277,348118e-10,0,.0476191,.880884,26041e-9,0,.0793651,.870399,338726e-10,0,.111111,.856138,392906e-10,0,.142857,.837436,372874e-10,0,.174603,.820973,392558e-10,0,.206349,.803583,434658e-10,0,.238095,.782168,40256e-9,0,.269841,.764107,448159e-10,0,.301587,.743092,457627e-10,0,.333333,.721626,455314e-10,0,.365079,.700375,477335e-10,0,.396825,.677334,461072e-10,0,.428571,.655702,484393e-10,0,.460317,.632059,464583e-10,0,.492064,.610125,483923e-10,0,.52381,.58653,464342e-10,0,.555556,.564508,477033e-10,0,.587302,.541405,459263e-10,0,.619048,.519556,46412e-9,0,.650794,.497292,448913e-10,0,.68254,.475898,445789e-10,0,.714286,.454722,433496e-10,0,.746032,.434042,423054e-10,0,.777778,.414126,413737e-10,0,.809524,.394387,397265e-10,0,.84127,.375841,390709e-10,0,.873016,.357219,369938e-10,0,.904762,.340084,365618e-10,0,.936508,.322714,342533e-10,0,.968254,.306974,339596e-10,0,1,1,101524e-23,0,0,1,10292e-22,0,0,1,130908e-23,0,0,1,473331e-23,0,0,1,625319e-22,0,0,1,107932e-20,0,0,1,163779e-19,0,0,1,203198e-18,0,0,1,204717e-17,0,0,.999999,168995e-16,0,0,.999998,115855e-15,0,0,.999996,66947e-14,0,0,.999991,330863e-14,0,0,.999983,141737e-13,0,0,.999968,532626e-13,0,0,.99994,177431e-12,0,0,.999891,528835e-12,0,0,.999797,142169e-11,0,0,.999617,347057e-11,0,0,.999227,77231e-10,0,0,.998239,155753e-10,0,0,.994937,268495e-10,0,0,.980225,213742e-10,0,0,.967549,21631e-10,0,0,.966865,417989e-11,0,0,.965739,763341e-11,0,0,.963794,130892e-10,0,0,.960244,206456e-10,0,0,.953495,282016e-10,0,148105e-9,.940876,271581e-10,0,.002454,.926569,164159e-10,0,.00867491,.920905,239521e-10,0,.01956,.912169,315127e-10,0,.035433,.899095,346626e-10,0,.056294,.882209,290223e-10,0,.0818191,.870272,342992e-10,0,.111259,.855977,394164e-10,0,.142857,.837431,372343e-10,0,.174603,.820826,396691e-10,0,.206349,.803408,435395e-10,0,.238095,.782838,419579e-10,0,.269841,.763941,450953e-10,0,.301587,.742904,455847e-10,0,.333333,.721463,458833e-10,0,.365079,.700197,477159e-10,0,.396825,.677501,470641e-10,0,.428571,.655527,484732e-10,0,.460317,.6324,476834e-10,0,.492064,.609964,484213e-10,0,.52381,.586839,475541e-10,0,.555556,.564353,476951e-10,0,.587302,.541589,467611e-10,0,.619048,.519413,463493e-10,0,.650794,.497337,453994e-10,0,.68254,.475797,445308e-10,0,.714286,.454659,435787e-10,0,.746032,.434065,424839e-10,0,.777778,.414018,41436e-9,0,.809524,.39455,401902e-10,0,.84127,.375742,390813e-10,0,.873016,.357501,377116e-10,0,.904762,.339996,36535e-9,0,.936508,.323069,351265e-10,0,.968254,.306897,339112e-10,0,1,1,10396e-19,0,0,1,104326e-20,0,0,1,110153e-20,0,0,1,144668e-20,0,0,1,34528e-19,0,0,1,175958e-19,0,0,1,12627e-17,0,0,1,936074e-18,0,0,1,645742e-17,0,0,.999998,401228e-16,0,0,.999997,222338e-15,0,0,.999995,10967e-13,0,0,.999991,482132e-14,0,0,.999981,189434e-13,0,0,.999967,667716e-13,0,0,.999938,212066e-12,0,0,.999886,60977e-11,0,0,.999792,159504e-11,0,0,.999608,381191e-11,0,0,.999209,833727e-11,0,0,.998179,165288e-10,0,0,.994605,274387e-10,0,0,.979468,167316e-10,0,0,.967529,242877e-11,0,0,.966836,461696e-11,0,0,.96569,830977e-11,0,0,.963706,140427e-10,0,244659e-11,.960063,217353e-10,0,760774e-9,.953113,286606e-10,0,.00367261,.940192,247691e-10,0,.00940263,.927731,195814e-10,0,.018333,.920669,252531e-10,0,.0306825,.911799,324277e-10,0,.0465556,.89857,340982e-10,0,.0659521,.883283,319622e-10,0,.0887677,.86989,35548e-9,0,.114784,.855483,397143e-10,0,.143618,.837987,391665e-10,0,.174606,.820546,411306e-10,0,.206349,.802878,436753e-10,0,.238095,.783402,444e-7,0,.269841,.763439,458726e-10,0,.301587,.742925,467097e-10,0,.333333,.721633,478887e-10,0,.365079,.69985,481251e-10,0,.396825,.67783,491811e-10,0,.428571,.655126,488199e-10,0,.460318,.632697,496025e-10,0,.492064,.609613,48829e-9,0,.52381,.587098,492754e-10,0,.555556,.564119,482625e-10,0,.587302,.541813,482807e-10,0,.619048,.519342,471552e-10,0,.650794,.497514,466765e-10,0,.68254,.475879,455582e-10,0,.714286,.454789,446007e-10,0,.746032,.434217,435382e-10,0,.777778,.414086,421753e-10,0,.809524,.394744,412093e-10,0,.84127,.375782,396634e-10,0,.873016,.357707,386419e-10,0,.904762,.340038,370345e-10,0,.936508,.323284,359725e-10,0,.968254,.306954,3436e-8,0,1,1,599567e-19,0,0,1,600497e-19,0,0,1,614839e-19,0,0,1,686641e-19,0,0,1,972658e-19,0,0,1,221271e-18,0,0,1,833195e-18,0,0,1,403601e-17,0,0,.999999,206001e-16,0,0,.999998,101739e-15,0,0,.999997,470132e-15,0,0,.999993,200436e-14,0,0,.999988,783682e-14,0,0,.999979,280338e-13,0,0,.999962,917033e-13,0,0,.999933,274514e-12,0,0,.999881,753201e-12,0,0,.999783,189826e-11,0,0,.999594,440279e-11,0,0,.999178,93898e-10,0,0,.998073,181265e-10,0,0,.993993,280487e-10,0,0,.979982,149422e-10,0,0,.968145,378481e-11,0,0,.966786,53771e-10,0,0,.965611,947508e-11,0,388934e-10,.963557,156616e-10,0,9693e-7,.959752,235144e-10,0,.00370329,.952461,291568e-10,0,.00868428,.940193,240102e-10,0,.0161889,.929042,231235e-10,0,.0263948,.920266,273968e-10,0,.0394088,.911178,337915e-10,0,.0552818,.897873,333629e-10,0,.0740138,.884053,351405e-10,0,.0955539,.869455,378034e-10,0,.119795,.854655,399378e-10,0,.14656,.838347,419108e-10,0,.175573,.820693,440831e-10,0,.206388,.802277,445599e-10,0,.238095,.783634,472691e-10,0,.269841,.763159,476984e-10,0,.301587,.742914,491487e-10,0,.333333,.721662,502312e-10,0,.365079,.699668,502817e-10,0,.396825,.677839,51406e-9,0,.428571,.655091,511095e-10,0,.460317,.632665,516067e-10,0,.492064,.609734,512255e-10,0,.52381,.587043,510263e-10,0,.555556,.564298,50565e-9,0,.587302,.541769,497951e-10,0,.619048,.519529,492698e-10,0,.650794,.497574,482066e-10,0,.68254,.476028,473689e-10,0,.714286,.454961,461941e-10,0,.746032,.434341,450618e-10,0,.777778,.414364,438355e-10,0,.809524,.394832,424196e-10,0,.84127,.376109,412563e-10,0,.873016,.35779,396226e-10,0,.904762,.340379,384886e-10,0,.936508,.323385,368214e-10,0,.968254,.307295,356636e-10,0,1,1,106465e-17,0,0,1,106555e-17,0,0,1,107966e-17,0,0,1,114601e-17,0,0,1,137123e-17,0,0,1,21243e-16,0,0,.999999,489653e-17,0,0,.999999,160283e-16,0,0,.999998,62269e-15,0,0,.999997,251859e-15,0,0,.999996,996192e-15,0,0,.999992,374531e-14,0,0,.999986,132022e-13,0,0,.999975,433315e-13,0,0,.999959,131956e-12,0,0,.999927,372249e-12,0,0,.999871,972461e-12,0,0,.999771,235343e-11,0,0,.999572,52768e-10,0,0,.999133,109237e-10,0,0,.997912,203675e-10,0,0,.993008,279396e-10,0,0,.980645,139604e-10,0,0,.970057,646596e-11,0,0,.966717,65089e-10,0,474145e-10,.965497,111863e-10,0,89544e-8,.96334,179857e-10,0,.0032647,.959294,259045e-10,0,.0075144,.951519,292327e-10,0,.0138734,.940517,249769e-10,0,.0224952,.93014,26803e-9,0,.0334828,.91972,303656e-10,0,.0468973,.910294,353323e-10,0,.0627703,.897701,351002e-10,0,.0811019,.884522,388104e-10,0,.10186,.869489,412932e-10,0,.124985,.853983,415781e-10,0,.150372,.838425,454066e-10,0,.177868,.820656,471624e-10,0,.207245,.801875,475243e-10,0,.238143,.783521,505621e-10,0,.269841,.763131,50721e-9,0,.301587,.74261,523293e-10,0,.333333,.72148,528699e-10,0,.365079,.699696,538677e-10,0,.396825,.677592,539255e-10,0,.428571,.65525,546367e-10,0,.460317,.632452,541348e-10,0,.492064,.609903,544976e-10,0,.52381,.586928,536201e-10,0,.555556,.564464,535185e-10,0,.587302,.541801,524949e-10,0,.619048,.519681,51812e-9,0,.650794,.497685,507687e-10,0,.68254,.47622,496243e-10,0,.714286,.455135,485714e-10,0,.746032,.4346,471847e-10,0,.777778,.414564,459294e-10,0,.809524,.395165,444705e-10,0,.84127,.376333,430772e-10,0,.873016,.358197,416229e-10,0,.904762,.34064,401019e-10,0,.936508,.323816,386623e-10,0,.968254,.307581,370933e-10,0,1,1,991541e-17,0,0,1,992077e-17,0,0,1,100041e-16,0,0,1,10385e-15,0,0,1,115777e-16,0,0,1,150215e-16,0,0,.999999,254738e-16,0,0,.999999,598822e-16,0,0,.999998,179597e-15,0,0,.999997,602367e-15,0,0,.999994,206835e-14,0,0,.99999,694952e-14,0,0,.999984,223363e-13,0,0,.999972,678578e-13,0,0,.999952,193571e-12,0,0,.999919,516594e-12,0,0,.99986,128739e-11,0,0,.999753,299298e-11,0,0,.999546,648258e-11,0,0,.999074,129985e-10,0,0,.997671,232176e-10,0,0,.991504,256701e-10,0,0,.981148,131141e-10,0,0,.971965,869048e-11,0,280182e-10,.966624,808301e-11,0,695475e-9,.965344,135235e-10,0,.00265522,.963048,210592e-10,0,.00622975,.958673,287473e-10,0,.0116234,.950262,281379e-10,0,.018976,.940836,271089e-10,0,.0283844,.930996,30926e-9,0,.0399151,.919848,348359e-10,0,.0536063,.909136,366092e-10,0,.0694793,.897554,384162e-10,0,.0875342,.884691,430971e-10,0,.107749,.869414,447803e-10,0,.130087,.853462,452858e-10,0,.154481,.838187,495769e-10,0,.180833,.820381,502709e-10,0,.209005,.801844,522713e-10,0,.238791,.783061,541505e-10,0,.269869,.763205,553712e-10,0,.301587,.742362,564909e-10,0,.333333,.721393,572646e-10,0,.365079,.699676,581012e-10,0,.396825,.677395,58096e-9,0,.428571,.655208,585766e-10,0,.460317,.632451,583602e-10,0,.492064,.609839,580234e-10,0,.52381,.587093,577161e-10,0,.555556,.564467,568447e-10,0,.587302,.542043,563166e-10,0,.619048,.519826,55156e-9,0,.650794,.497952,541682e-10,0,.68254,.476477,528971e-10,0,.714286,.455412,514952e-10,0,.746032,.434926,502222e-10,0,.777778,.4149,485779e-10,0,.809524,.395552,472242e-10,0,.84127,.376712,454891e-10,0,.873016,.358622,440924e-10,0,.904762,.341048,422984e-10,0,.936508,.324262,408582e-10,0,.968254,.308013,390839e-10,0,1,1,613913e-16,0,0,1,614145e-16,0,0,1,617708e-16,0,0,1,633717e-16,0,0,1,681648e-16,0,0,1,808291e-16,0,0,1,114608e-15,0,0,.999998,210507e-15,0,0,.999997,499595e-15,0,0,.999995,139897e-14,0,0,.999994,419818e-14,0,0,.999988,127042e-13,0,0,.999979,375153e-13,0,0,.999965,106206e-12,0,0,.999945,285381e-12,0,0,.999908,723611e-12,0,0,.999846,17255e-10,0,0,.999733,386104e-11,0,0,.999511,808493e-11,0,0,.998993,156884e-10,0,0,.997326,265538e-10,0,0,.989706,206466e-10,0,0,.981713,130756e-10,0,70005e-10,.973636,106473e-10,0,464797e-9,.966509,10194e-9,0,.00201743,.965149,165881e-10,0,.00497549,.962669,249147e-10,0,.00953262,.95786,317449e-10,0,.0158211,.949334,281045e-10,0,.0239343,.941041,303263e-10,0,.0339372,.931575,356754e-10,0,.0458738,.920102,397075e-10,0,.059772,.908002,384886e-10,0,.075645,.897269,43027e-9,0,.0934929,.884559,479925e-10,0,.113302,.869161,48246e-9,0,.135045,.853342,509505e-10,0,.158678,.837633,542846e-10,0,.184136,.820252,554139e-10,0,.211325,.801872,581412e-10,0,.240113,.782418,585535e-10,0,.270306,.7631,610923e-10,0,.301594,.742183,613678e-10,0,.333333,.721098,627275e-10,0,.365079,.699512,629413e-10,0,.396825,.677372,636351e-10,0,.428571,.655059,633555e-10,0,.460317,.632567,636513e-10,0,.492064,.609784,628965e-10,0,.52381,.587237,625546e-10,0,.555556,.564525,615825e-10,0,.587302,.542181,605048e-10,0,.619048,.520017,596329e-10,0,.650794,.498204,581516e-10,0,.68254,.476742,569186e-10,0,.714286,.455803,553833e-10,0,.746032,.435251,537807e-10,0,.777778,.415374,522025e-10,0,.809524,.395921,503421e-10,0,.84127,.377253,488211e-10,0,.873016,.359021,468234e-10,0,.904762,.341637,453269e-10,0,.936508,.3247,433014e-10,0,.968254,.308625,418007e-10,0,1,1,286798e-15,0,0,1,286877e-15,0,0,1,288094e-15,0,0,1,293506e-15,0,0,1,309262e-15,0,0,.999999,348593e-15,0,0,.999999,444582e-15,0,0,.999998,688591e-15,0,0,.999996,134391e-14,0,0,.999993,317438e-14,0,0,.999989,835609e-14,0,0,.999983,228677e-13,0,0,.999974,623361e-13,0,0,.999959,165225e-12,0,0,.999936,419983e-12,0,0,.999896,101546e-11,0,0,.99983,232376e-11,0,0,.999709,50156e-10,0,0,.999469,10167e-9,0,0,.998886,190775e-10,0,0,.996819,300511e-10,0,0,.988837,185092e-10,0,168222e-12,.982178,134622e-10,0,259622e-9,.975017,125961e-10,0,.00142595,.967101,13507e-9,0,.00382273,.964905,205003e-10,0,.00764164,.96218,29546e-9,0,.0130121,.956821,343738e-10,0,.0200253,.948829,305063e-10,0,.0287452,.941092,346487e-10,0,.039218,.931883,412061e-10,0,.0514748,.920211,444651e-10,0,.0655351,.907307,431252e-10,0,.0814082,.89684,490382e-10,0,.0990939,.884119,53334e-9,0,.118583,.869148,54114e-9,0,.139856,.853377,578536e-10,0,.162882,.836753,592285e-10,0,.187615,.820063,622787e-10,0,.213991,.801694,645492e-10,0,.241918,.782116,65353e-9,0,.271267,.762673,674344e-10,0,.301847,.742133,682788e-10,0,.333333,.720779,691959e-10,0,.365079,.699386,696817e-10,0,.396826,.67732,699583e-10,0,.428572,.654888,698447e-10,0,.460318,.632499,694063e-10,0,.492064,.609825,691612e-10,0,.52381,.587287,681576e-10,0,.555556,.564743,674138e-10,0,.587302,.542409,661617e-10,0,.619048,.520282,647785e-10,0,.650794,.498506,633836e-10,0,.68254,.477102,615905e-10,0,.714286,.456167,601013e-10,0,.746032,.435728,581457e-10,0,.777778,.415809,564215e-10,0,.809524,.396517,544997e-10,0,.84127,.377737,525061e-10,0,.873016,.359698,506831e-10,0,.904762,.342164,48568e-9,0,.936508,.325417,467826e-10,0,.968254,.309186,446736e-10,0,1,1,109018e-14,0,0,1,10904e-13,0,0,1,109393e-14,0,0,1,11095e-13,0,0,1,1154e-12,0,0,1,126089e-14,0,0,.999999,15059e-13,0,0,.999997,207899e-14,0,0,.999994,348164e-14,0,0,.999993,705728e-14,0,0,.999987,163692e-13,0,0,.999981,406033e-13,0,0,.999969,10245e-11,0,0,.999953,255023e-12,0,0,.999925,61511e-11,0,0,.999881,142218e-11,0,0,.99981,313086e-11,0,0,.99968,653119e-11,0,0,.999418,12832e-9,0,0,.998748,232497e-10,0,0,.996066,329522e-10,0,0,.988379,179613e-10,0,108799e-9,.982567,143715e-10,0,921302e-9,.976097,148096e-10,0,.00280738,.968475,178905e-10,0,.00596622,.964606,253921e-10,0,.0105284,.961564,348623e-10,0,.0165848,.955517,357612e-10,0,.0242,.948381,343493e-10,0,.03342,.941095,405849e-10,0,.0442777,.931923,475394e-10,0,.0567958,.91996,484328e-10,0,.0709879,.907419,502146e-10,0,.086861,.89618,561654e-10,0,.104415,.88337,587612e-10,0,.123643,.869046,618057e-10,0,.144531,.853278,657392e-10,0,.167057,.836091,66303e-9,0,.191188,.819644,704445e-10,0,.216878,.801246,714071e-10,0,.244062,.782031,740093e-10,0,.272649,.762066,74685e-9,0,.302509,.741964,766647e-10,0,.333442,.720554,766328e-10,0,.365079,.699098,777857e-10,0,.396826,.677189,774633e-10,0,.428572,.65484,776235e-10,0,.460318,.632496,770316e-10,0,.492064,.609908,762669e-10,0,.52381,.587312,753972e-10,0,.555556,.564938,739994e-10,0,.587302,.542577,728382e-10,0,.619048,.52062,71112e-9,0,.650794,.498819,694004e-10,0,.68254,.477555,675575e-10,0,.714286,.456568,653449e-10,0,.746032,.436278,636068e-10,0,.777778,.41637,613466e-10,0,.809524,.397144,594177e-10,0,.84127,.378412,570987e-10,0,.873016,.360376,550419e-10,0,.904762,.342906,527422e-10,0,.936508,.326136,506544e-10,0,.968254,.30997,484307e-10,0,1,1,354014e-14,0,0,1,354073e-14,0,0,1,354972e-14,0,0,1,358929e-14,0,0,1,370093e-14,0,0,.999999,396194e-14,0,0,.999998,453352e-14,0,0,.999997,578828e-14,0,0,.999994,863812e-14,0,0,.999991,153622e-13,0,0,.999985,316356e-13,0,0,.999977,712781e-13,0,0,.999964,166725e-12,0,0,.999945,390501e-12,0,0,.999912,895622e-12,0,0,.999866,198428e-11,0,0,.999786,421038e-11,0,0,.999647,850239e-11,0,0,.999356,162059e-10,0,0,.998563,282652e-10,0,0,.994928,336309e-10,0,244244e-10,.987999,178458e-10,0,523891e-9,.982893,159162e-10,0,.00194729,.977044,178056e-10,0,.00451099,.969972,230624e-10,0,.00835132,.964237,313922e-10,0,.013561,.960791,406145e-10,0,.0202056,.954292,372796e-10,0,.0283321,.948052,403199e-10,0,.0379739,.940938,479537e-10,0,.0491551,.931689,545292e-10,0,.0618918,.91987,54038e-9,0,.0761941,.907665,589909e-10,0,.0920672,.895281,642651e-10,0,.109511,.882621,659707e-10,0,.12852,.86873,709973e-10,0,.149085,.853008,742221e-10,0,.171189,.835944,761754e-10,0,.194809,.818949,797052e-10,0,.21991,.800951,812434e-10,0,.246447,.781847,838075e-10,0,.274352,.761649,84501e-9,0,.303535,.74152,860258e-10,0,.333857,.720495,866233e-10,0,.365104,.698742,868326e-10,0,.396826,.677096,87133e-9,0,.428572,.654782,863497e-10,0,.460318,.632335,860206e-10,0,.492064,.610031,849337e-10,0,.52381,.587457,838279e-10,0,.555556,.56513,82309e-9,0,.587302,.542877,803542e-10,0,.619048,.5209,786928e-10,0,.650794,.499291,765171e-10,0,.68254,.477971,744753e-10,0,.714286,.457221,72209e-9,0,.746032,.436803,697448e-10,0,.777778,.417083,675333e-10,0,.809524,.397749,648058e-10,0,.84127,.379177,625759e-10,0,.873016,.361061,598584e-10,0,.904762,.343713,575797e-10,0,.936508,.326894,549999e-10,0,.968254,.310816,527482e-10,0,1,1,10153e-12,0,0,1,101544e-13,0,0,1,101751e-13,0,0,1,102662e-13,0,0,1,10521e-12,0,0,.999999,111049e-13,0,0,.999999,123408e-13,0,0,.999996,14924e-12,0,0,.999992,204471e-13,0,0,.999989,326539e-13,0,0,.99998,603559e-13,0,0,.999971,123936e-12,0,0,.999955,269058e-12,0,0,.999933,593604e-12,0,0,.999901,129633e-11,0,0,.999847,275621e-11,0,0,.999761,564494e-11,0,0,.999607,110485e-10,0,0,.999282,204388e-10,0,0,.99831,341084e-10,0,22038e-11,.993288,294949e-10,0,242388e-9,.987855,192736e-10,0,.0012503,.983167,182383e-10,0,.0032745,.977908,218633e-10,0,.00646321,.971194,290662e-10,0,.0109133,.963867,386401e-10,0,.0166927,.95982,462827e-10,0,.0238494,.953497,420705e-10,0,.0324178,.947621,477743e-10,0,.0424225,.940611,568258e-10,0,.0538808,.931174,618061e-10,0,.0668047,.919919,627098e-10,0,.0812014,.907856,694714e-10,0,.0970745,.894509,735008e-10,0,.114424,.881954,763369e-10,0,.133246,.868309,821896e-10,0,.153534,.852511,83769e-9,0,.175275,.835821,881615e-10,0,.198453,.817981,896368e-10,0,.223042,.800504,930906e-10,0,.249009,.78141,945056e-10,0,.276304,.761427,963605e-10,0,.304862,.74094,968088e-10,0,.334584,.720233,981481e-10,0,.365322,.698592,979122e-10,0,.396826,.676763,981057e-10,0,.428571,.654808,973956e-10,0,.460318,.632326,962619e-10,0,.492064,.610049,952996e-10,0,.52381,.58763,933334e-10,0,.555556,.565261,917573e-10,0,.587302,.543244,896636e-10,0,.619048,.521273,873304e-10,0,.650794,.499818,852648e-10,0,.68254,.478536,823961e-10,0,.714286,.457826,79939e-9,0,.746032,.437549,77126e-9,0,.777778,.41776,743043e-10,0,.809524,.39863,716426e-10,0,.84127,.379954,686456e-10,0,.873016,.362025,660514e-10,0,.904762,.344581,630755e-10,0,.936508,.327909,605439e-10,0,.968254,.311736,576345e-10,0,1,1,263344e-13,0,0,1,263373e-13,0,0,1,263815e-13,0,0,1,265753e-13,0,0,1,271132e-13,0,0,.999999,283279e-13,0,0,.999997,30833e-12,0,0,.999995,358711e-13,0,0,.999992,461266e-13,0,0,.999985,67574e-12,0,0,.999977,11358e-11,0,0,.999966,213657e-12,0,0,.999948,431151e-12,0,0,.999923,896656e-12,0,0,.999884,186603e-11,0,0,.999826,381115e-11,0,0,.999732,754184e-11,0,0,.999561,143192e-10,0,0,.999191,257061e-10,0,0,.997955,405724e-10,0,744132e-10,.992228,276537e-10,0,716477e-9,.987638,208885e-10,0,.0022524,.983395,215226e-10,0,.00484816,.978614,270795e-10,0,.00860962,.972389,365282e-10,0,.0136083,.964392,474747e-10,0,.0198941,.95861,509141e-10,0,.0275023,.952806,48963e-9,0,.0364584,.94712,571119e-10,0,.04678,.940104,671704e-10,0,.0584799,.930398,687586e-10,0,.0715665,.919866,738161e-10,0,.086045,.907853,813235e-10,0,.101918,.894078,834582e-10,0,.119186,.881177,892093e-10,0,.137845,.867575,944548e-10,0,.157891,.852107,969607e-10,0,.179316,.835502,101456e-9,0,.202106,.81756,103256e-9,0,.226243,.79984,106954e-9,0,.251704,.780998,108066e-9,0,.278451,.761132,110111e-9,0,.306436,.740429,110459e-9,0,.335586,.719836,111219e-9,0,.365796,.698467,11145e-8,0,.3969,.676446,110393e-9,0,.428571,.654635,110035e-9,0,.460318,.632411,108548e-9,0,.492064,.609986,106963e-9,0,.52381,.587872,105238e-9,0,.555556,.565528,102665e-9,0,.587302,.543563,100543e-9,0,.619048,.52176,976182e-10,0,.650794,.500188,947099e-10,0,.68254,.479204,919929e-10,0,.714286,.458413,886139e-10,0,.746032,.438314,857839e-10,0,.777778,.418573,82411e-9,0,.809524,.39947,792211e-10,0,.84127,.380892,759546e-10,0,.873016,.362953,727571e-10,0,.904762,.345601,695738e-10,0,.936508,.328895,664907e-10,0,.968254,.312808,634277e-10,0,1,1,628647e-13,0,0,1,628705e-13,0,0,1,629587e-13,0,0,1,633441e-13,0,0,.999999,644087e-13,0,0,.999998,667856e-13,0,0,.999997,715889e-13,0,0,.999995,809577e-13,0,0,.999989,992764e-13,0,0,.999983,135834e-12,0,0,.999974,210482e-12,0,0,.999959,365215e-12,0,0,.999939,686693e-12,0,0,.999911,13472e-10,0,0,.999868,26731e-10,0,0,.999804,524756e-11,0,0,.9997,100403e-10,0,0,.99951,185019e-10,0,0,.999078,322036e-10,0,620676e-11,.997428,470002e-10,0,341552e-9,.99162,287123e-10,0,.00143727,.987479,234706e-10,0,.00349201,.983582,260083e-10,0,.0066242,.979186,337927e-10,0,.0109113,.97325,454689e-10,0,.0164064,.965221,573759e-10,0,.0231463,.957262,544114e-10,0,.0311571,.952211,587006e-10,0,.0404572,.946631,692256e-10,0,.0510592,.939391,787819e-10,0,.0629723,.929795,792368e-10,0,.0762025,.91965,875075e-10,0,.090753,.907737,950903e-10,0,.106626,.893899,972963e-10,0,.123822,.880239,10459e-8,0,.142337,.866562,107689e-9,0,.16217,.85164,113081e-9,0,.183314,.835021,116636e-9,0,.20576,.817311,120074e-9,0,.229496,.798845,121921e-9,0,.254502,.780479,12475e-8,0,.280753,.760694,125255e-9,0,.308212,.740142,126719e-9,0,.336825,.719248,12636e-8,0,.366517,.698209,126712e-9,0,.397167,.676398,125769e-9,0,.428578,.654378,124432e-9,0,.460318,.632484,123272e-9,0,.492064,.610113,12085e-8,0,.52381,.587931,118411e-9,0,.555556,.565872,11569e-8,0,.587302,.543814,112521e-9,0,.619048,.522265,109737e-9,0,.650794,.500835,106228e-9,0,.68254,.479818,102591e-9,0,.714286,.459258,991288e-10,0,.746032,.439061,952325e-10,0,.777778,.419552,91895e-9,0,.809524,.400399,879051e-10,0,.84127,.381976,844775e-10,0,.873016,.364009,806316e-10,0,.904762,.346761,771848e-10,0,.936508,.330049,735429e-10,0,.968254,.314018,702103e-10,0,1,1,139968e-12,0,0,1,139979e-12,0,0,1,140145e-12,0,0,1,14087e-11,0,0,.999999,142865e-12,0,0,.999998,147279e-12,0,0,.999997,156057e-12,0,0,.999992,17276e-11,0,0,.999989,204352e-12,0,0,.99998,26494e-11,0,0,.999969,383435e-12,0,0,.999953,618641e-12,0,0,.999929,108755e-11,0,0,.999898,201497e-11,0,0,.999849,381346e-11,0,0,.999778,719815e-11,0,0,.999661,133215e-10,0,0,.999451,238313e-10,0,0,.998936,401343e-10,0,113724e-9,.99662,517346e-10,0,820171e-9,.991094,304323e-10,0,.00238143,.987487,281757e-10,0,.00493527,.983731,320048e-10,0,.00856859,.979647,423905e-10,0,.0133393,.973837,562935e-10,0,.0192863,.96584,677442e-10,0,.0264369,.956309,623073e-10,0,.03481,.951523,704131e-10,0,.0444184,.946003,836594e-10,0,.0552713,.938454,911736e-10,0,.0673749,.929279,938264e-10,0,.0807329,.919239,103754e-9,0,.0953479,.907293,109928e-9,0,.111221,.893936,115257e-9,0,.128352,.879674,122265e-9,0,.14674,.865668,125733e-9,0,.166382,.850998,132305e-9,0,.187276,.834498,134844e-9,0,.209413,.816903,139276e-9,0,.232786,.798235,140984e-9,0,.257382,.779724,14378e-8,0,.283181,.760251,144623e-9,0,.310156,.739808,145228e-9,0,.338269,.718762,14539e-8,0,.367461,.697815,144432e-9,0,.397646,.67631,143893e-9,0,.428685,.654278,141846e-9,0,.460318,.632347,13935e-8,0,.492064,.610296,137138e-9,0,.52381,.588039,133806e-9,0,.555556,.566218,130755e-9,0,.587302,.544346,127128e-9,0,.619048,.522701,123002e-9,0,.650794,.501542,119443e-9,0,.68254,.480508,115055e-9,0,.714286,.460092,111032e-9,0,.746032,.440021,106635e-9,0,.777778,.420446,102162e-9,0,.809524,.401512,98184e-9,0,.84127,.38299,936497e-10,0,.873016,.365232,89813e-9,0,.904762,.347865,853073e-10,0,.936508,.331342,817068e-10,0,.968254,.315202,773818e-10,0,1,1,29368e-11,0,0,1,2937e-10,0,0,1,293998e-12,0,0,1,295298e-12,0,0,.999999,298865e-12,0,0,.999998,3067e-10,0,0,.999995,322082e-12,0,0,.999992,350767e-12,0,0,.999986,403538e-12,0,0,.999976,501372e-12,0,0,.999964,68562e-11,0,0,.999945,10374e-10,0,0,.999919,171269e-11,0,0,.999882,300175e-11,0,0,.999829,542144e-11,0,0,.999749,984182e-11,0,0,.99962,176213e-10,0,0,.999382,305995e-10,0,138418e-10,.998751,496686e-10,0,389844e-9,.995344,510733e-10,0,.00150343,.990768,345829e-10,0,.00352451,.987464,342841e-10,0,.00655379,.983846,399072e-10,0,.0106554,.980007,533219e-10,0,.0158723,.974494,696992e-10,0,.0222333,.96622,776754e-10,0,.029758,.956273,747718e-10,0,.0384596,.950952,864611e-10,0,.0483473,.945215,100464e-9,0,.0594266,.937287,103729e-9,0,.0717019,.928649,111665e-9,0,.0851752,.918791,12353e-8,0,.0998479,.906685,127115e-9,0,.115721,.893706,13628e-8,0,.132794,.879248,142427e-9,0,.151067,.864685,148091e-9,0,.170538,.850032,153517e-9,0,.191204,.833853,157322e-9,0,.213063,.816353,161086e-9,0,.236107,.797834,164111e-9,0,.260329,.778831,165446e-9,0,.285714,.759756,167492e-9,0,.312243,.739419,166928e-9,0,.339887,.718491,167e-6,0,.368604,.697392,165674e-9,0,.398329,.676102,163815e-9,0,.428961,.654243,162003e-9,0,.460331,.632176,158831e-9,0,.492064,.610407,155463e-9,0,.52381,.588394,152062e-9,0,.555556,.56645,147665e-9,0,.587302,.5449,14375e-8,0,.619048,.523276,138905e-9,0,.650794,.502179,134189e-9,0,.68254,.481359,129392e-9,0,.714286,.46092,124556e-9,0,.746032,.441084,11957e-8,0,.777778,.421517,114652e-9,0,.809524,.402721,109688e-9,0,.84127,.384222,104667e-9,0,.873016,.366534,999633e-10,0,.904762,.349205,950177e-10,0,.936508,.332702,907301e-10,0,.968254,.316599,859769e-10,0,1,1,585473e-12,0,0,1,585507e-12,0,0,1,58602e-11,0,0,.999999,588259e-12,0,0,.999999,594381e-12,0,0,.999998,607754e-12,0,0,.999995,633729e-12,0,0,.99999,68137e-11,0,0,.999984,767003e-12,0,0,.999973,921212e-12,0,0,.999959,120218e-11,0,0,.999936,172024e-11,0,0,.999907,268088e-11,0,0,.999866,445512e-11,0,0,.999806,768481e-11,0,0,.999716,1342e-8,0,0,.999576,232473e-10,0,0,.9993,391694e-10,0,129917e-9,.998498,608429e-10,0,845035e-9,.994132,489743e-10,0,.00237616,.99031,384644e-10,0,.00484456,.987409,421768e-10,0,.00832472,.983981,504854e-10,0,.0128643,.980268,671028e-10,0,.0184947,.974875,852749e-10,0,.025237,.966063,85531e-9,0,.0331046,.956779,900588e-10,0,.0421067,.950259,10577e-8,0,.0522487,.944239,119458e-9,0,.0635343,.936341,122164e-9,0,.0759654,.928047,134929e-9,0,.0895434,.918065,145544e-9,0,.104269,.906267,150531e-9,0,.120142,.893419,161652e-9,0,.137163,.878758,16593e-8,0,.15533,.863699,174014e-9,0,.174645,.848876,177877e-9,0,.195106,.833032,184049e-9,0,.21671,.815557,186088e-9,0,.239454,.797323,19054e-8,0,.263332,.778124,191765e-9,0,.288336,.758929,192535e-9,0,.314451,.738979,192688e-9,0,.341658,.718213,191522e-9,0,.369924,.696947,190491e-9,0,.399202,.675807,187913e-9,0,.429416,.654147,184451e-9,0,.460447,.63229,181442e-9,0,.492064,.610499,177139e-9,0,.523809,.588747,172596e-9,0,.555555,.566783,167457e-9,0,.587301,.545359,162518e-9,0,.619048,.523984,156818e-9,0,.650794,.502917,151884e-9,0,.68254,.482294,145514e-9,0,.714286,.461945,140199e-9,0,.746032,.442133,134101e-9,0,.777778,.422705,128374e-9,0,.809524,.403916,122996e-9,0,.84127,.38554,116808e-9,0,.873016,.367909,111973e-9,0,.904762,.350651,105938e-9,0,.936508,.334208,101355e-9,0,.968254,.318123,957629e-10,0,1,1,111633e-11,0,0,1,111639e-11,0,0,1,111725e-11,0,0,1,112096e-11,0,0,.999999,11311e-10,0,0,.999997,115315e-11,0,0,.999995,11956e-10,0,0,.999989,127239e-11,0,0,.999981,140772e-11,0,0,.999969,164541e-11,0,0,.999952,206607e-11,0,0,.999928,281783e-11,0,0,.999895,416835e-11,0,0,.999848,658728e-11,0,0,.999781,108648e-10,0,0,.999682,182579e-10,0,0,.999523,306003e-10,0,159122e-10,.999205,499862e-10,0,391184e-9,.998131,73306e-9,0,.00147534,.993334,513229e-10,0,.0034227,.99016,467783e-10,0,.00632232,.987321,523413e-10,0,.0102295,.984099,64267e-9,0,.0151794,.980432,843042e-10,0,.0211947,.974976,102819e-9,0,.0282899,.966429,996234e-10,0,.0364739,.957633,111074e-9,0,.0457522,.949422,128644e-9,0,.0561278,.943045,140076e-9,0,.0676023,.935448,146349e-9,0,.0801762,.927225,161854e-9,0,.0938499,.917033,169135e-9,0,.108623,.905762,179987e-9,0,.124496,.892879,189832e-9,0,.141469,.878435,195881e-9,0,.159541,.863114,20466e-8,0,.178713,.84776,209473e-9,0,.198985,.832084,214861e-9,0,.220355,.814915,217695e-9,0,.242823,.796711,220313e-9,0,.266385,.777603,22313e-8,0,.291036,.757991,222471e-9,0,.316767,.738371,222869e-9,0,.343563,.717872,221243e-9,0,.371402,.696619,218089e-9,0,.400248,.675379,21562e-8,0,.430047,.65411,21169e-8,0,.460709,.63241,206947e-9,0,.492079,.61046,201709e-9,0,.52381,.58903,196753e-9,0,.555556,.567267,189637e-9,0,.587302,.545886,184735e-9,0,.619048,.524714,177257e-9,0,.650794,.503789,171424e-9,0,.68254,.483204,164688e-9,0,.714286,.462976,157172e-9,0,.746032,.443294,151341e-9,0,.777778,.423988,143737e-9,0,.809524,.405325,138098e-9,0,.84127,.386981,130698e-9,0,.873016,.369436,125276e-9,0,.904762,.35219,118349e-9,0,.936508,.335804,11312e-8,0,.968254,.319749,106687e-9,0,1,1,204685e-11,0,0,1,204694e-11,0,0,1,204831e-11,0,0,.999999,205428e-11,0,0,.999999,207056e-11,0,0,.999997,210581e-11,0,0,.999993,21732e-10,0,0,.999987,229365e-11,0,0,.999979,250243e-11,0,0,.999965,286127e-11,0,0,.999947,348028e-11,0,0,.999918,455588e-11,0,0,.999881,643303e-11,0,0,.999828,970064e-11,0,0,.999753,153233e-10,0,0,.999642,24793e-9,0,0,.999464,402032e-10,0,122947e-9,.999089,635852e-10,0,807414e-9,.997567,857026e-10,0,.00227206,.992903,594912e-10,0,.00462812,.990011,578515e-10,0,.00794162,.987192,65399e-9,0,.0122534,.98418,819675e-10,0,.0175888,.980491,105514e-9,0,.0239635,.974779,121532e-9,0,.031387,.96675,119144e-9,0,.0398644,.958248,136125e-9,0,.0493982,.948884,155408e-9,0,.0599896,.941673,162281e-9,0,.0716382,.934521,176754e-9,0,.0843437,.926205,192873e-9,0,.0981056,.916089,200038e-9,0,.112923,.904963,213624e-9,0,.128796,.892089,221834e-9,0,.145725,.878028,232619e-9,0,.163709,.86249,238632e-9,0,.182749,.846587,247002e-9,0,.202847,.830988,250702e-9,0,.224001,.814165,255562e-9,0,.246214,.796135,257505e-9,0,.269482,.777052,258625e-9,0,.293805,.757201,258398e-9,0,.319176,.737655,256714e-9,0,.345587,.717477,255187e-9,0,.373021,.696433,251792e-9,0,.401454,.675084,247223e-9,0,.430844,.653907,242213e-9,0,.461125,.632561,237397e-9,0,.492187,.610658,229313e-9,0,.52381,.589322,224402e-9,0,.555556,.567857,216116e-9,0,.587302,.54652,209124e-9,0,.619048,.525433,201601e-9,0,.650794,.504679,192957e-9,0,.68254,.484203,186052e-9,0,.714286,.464203,177672e-9,0,.746032,.444549,170005e-9,0,.777778,.425346,162401e-9,0,.809524,.406706,1544e-7,0,.84127,.388576,147437e-9,0,.873016,.37094,139493e-9,0,.904762,.353996,133219e-9,0,.936508,.337391,125573e-9,0,.968254,.321648,119867e-9,0,1,1,362511e-11,0,0,1,362525e-11,0,0,1,362739e-11,0,0,.999999,363673e-11,0,0,.999998,366214e-11,0,0,.999996,371698e-11,0,0,.999992,382116e-11,0,0,.999986,400554e-11,0,0,.999976,432058e-11,0,0,.999961,485194e-11,0,0,.999938,574808e-11,0,0,.999908,726643e-11,0,0,.999865,984707e-11,0,0,.999807,142217e-10,0,0,.999723,215581e-10,0,0,.999602,336114e-10,0,119113e-10,.999398,527353e-10,0,355813e-9,.998946,805809e-10,0,.00137768,.996647,942908e-10,0,.00322469,.992298,668733e-10,0,.00597897,.989802,716564e-10,0,.00968903,.987019,821355e-10,0,.0143845,.984219,104555e-9,0,.0200831,.980425,131245e-9,0,.0267948,.974241,139613e-9,0,.034525,.967006,145931e-9,0,.0432757,.95893,167153e-9,0,.0530471,.949157,188146e-9,0,.0638386,.94062,194625e-9,0,.0756487,.933509,213721e-9,0,.0884762,.925088,229616e-9,0,.10232,.915178,239638e-9,0,.117178,.904093,254814e-9,0,.133051,.891337,263685e-9,0,.149939,.877326,274789e-9,0,.167841,.861794,280534e-9,0,.18676,.845758,289534e-9,0,.206696,.829792,294446e-9,0,.22765,.813037,296877e-9,0,.249625,.795285,300217e-9,0,.27262,.776323,299826e-9,0,.296636,.756673,299787e-9,0,.321671,.736856,297867e-9,0,.347718,.716883,294052e-9,0,.374768,.696089,289462e-9,0,.402804,.67505,285212e-9,0,.431796,.653509,27653e-8,0,.461695,.63258,271759e-9,0,.49242,.61104,262811e-9,0,.523822,.589567,255151e-9,0,.555556,.568322,246434e-9,0,.587302,.547235,237061e-9,0,.619048,.52616,228343e-9,0,.650794,.505716,219236e-9,0,.68254,.485274,209595e-9,0,.714286,.465411,201011e-9,0,.746032,.445854,19109e-8,0,.777778,.426911,182897e-9,0,.809524,.408222,173569e-9,0,.84127,.390307,165496e-9,0,.873016,.372624,156799e-9,0,.904762,.355804,14917e-8,0,.936508,.33924,140907e-9,0,.968254,.323534,134062e-9,0,1,1,622487e-11,0,0,1,62251e-10,0,0,1,622837e-11,0,0,.999999,624259e-11,0,0,.999998,628127e-11,0,0,.999996,636451e-11,0,0,.999991,65218e-10,0,0,.999984,679782e-11,0,0,.999973,726361e-11,0,0,.999955,803644e-11,0,0,.999931,931397e-11,0,0,.999896,114299e-10,0,0,.999847,149402e-10,0,0,.999784,207461e-10,0,0,.999692,302493e-10,0,0,.999554,454957e-10,0,997275e-10,.999326,690762e-10,0,724813e-9,.998757,101605e-9,0,.0020972,.995367,958745e-10,0,.00432324,.99209,832808e-10,0,.00746347,.989517,887601e-10,0,.0115534,.987008,10564e-8,0,.0166134,.98421,133179e-9,0,.0226552,.98021,161746e-9,0,.0296838,.973676,161821e-9,0,.0377016,.967052,178635e-9,0,.0467079,.959385,206765e-9,0,.0567013,.949461,22476e-8,0,.0676796,.939578,23574e-8,0,.0796403,.932416,25893e-8,0,.0925812,.923759,271228e-9,0,.106501,.914223,289165e-9,0,.121397,.902942,301156e-9,0,.13727,.890419,313852e-9,0,.15412,.876639,324408e-9,0,.171946,.861316,33249e-8,0,.190751,.84496,338497e-9,0,.210537,.828427,345861e-9,0,.231305,.811871,347863e-9,0,.253057,.794397,350225e-9,0,.275797,.775726,349915e-9,0,.299525,.75617,347297e-9,0,.324242,.736091,344232e-9,0,.349947,.716213,340835e-9,0,.376633,.695736,332369e-9,0,.404289,.674961,327943e-9,0,.432895,.653518,318533e-9,0,.462415,.632574,310391e-9,0,.492788,.61134,300755e-9,0,.523909,.590017,290506e-9,0,.555556,.568752,280446e-9,0,.587302,.548061,269902e-9,0,.619048,.52711,258815e-9,0,.650794,.506682,248481e-9,0,.68254,.486524,237141e-9,0,.714286,.466812,226872e-9,0,.746032,.44732,216037e-9,0,.777778,.428473,205629e-9,0,.809524,.409921,195691e-9,0,.84127,.392028,185457e-9,0,.873016,.374606,176436e-9,0,.904762,.357601,166508e-9,0,.936508,.341348,158385e-9,0,.968254,.32542,149203e-9,0,1,1,103967e-10,0,0,1,10397e-9,0,0,1,104019e-10,0,0,.999999,104231e-10,0,0,.999998,104806e-10,0,0,.999995,106042e-10,0,0,.999991,108366e-10,0,0,.999982,112415e-10,0,0,.999968,119174e-10,0,0,.99995,130227e-10,0,0,.999922,148176e-10,0,0,.999884,177303e-10,0,0,.99983,224564e-10,0,0,.999758,300966e-10,0,0,.999654,423193e-10,0,549083e-11,.999503,614848e-10,0,296087e-9,.999237,903576e-10,0,.00123144,.998491,1271e-7,0,.00295954,.994594,107754e-9,0,.00555829,.99178,103025e-9,0,.00907209,.989265,11154e-8,0,.0135257,.986998,136296e-9,0,.0189327,.984137,169154e-9,0,.0252993,.979798,196671e-9,0,.0326272,.97337,196678e-9,0,.0409157,.967239,223121e-9,0,.0501623,.959543,253809e-9,0,.0603638,.949466,265972e-9,0,.0715171,.939074,288372e-9,0,.0836187,.931118,310983e-9,0,.0966657,.922525,325561e-9,0,.110656,.912983,345725e-9,0,.125588,.901617,3556e-7,0,.141461,.889487,374012e-9,0,.158275,.875787,383445e-9,0,.176031,.860654,393972e-9,0,.19473,.844417,400311e-9,0,.214374,.82741,405004e-9,0,.234967,.810545,407378e-9,0,.256512,.793312,407351e-9,0,.279011,.774847,406563e-9,0,.302468,.755621,404903e-9,0,.326887,.735511,397486e-9,0,.352266,.715435,39357e-8,0,.378605,.695403,384739e-9,0,.405897,.674681,376108e-9,0,.43413,.65359,365997e-9,0,.463277,.632471,354957e-9,0,.493295,.61151,343593e-9,0,.524106,.59064,331841e-9,0,.555561,.569386,318891e-9,0,.587302,.548785,3072e-7,0,.619048,.528146,29361e-8,0,.650794,.507872,281709e-9,0,.68254,.487805,268627e-9,0,.714286,.468196,255887e-9,0,.746032,.448922,243997e-9,0,.777778,.430093,231662e-9,0,.809524,.411845,220339e-9,0,.84127,.393808,208694e-9,0,.873016,.376615,198045e-9,0,.904762,.359655,187375e-9,0,.936508,.343452,177371e-9,0,.968254,.32765,167525e-9,0,1,1,169351e-10,0,0,1,169356e-10,0,0,1,169427e-10,0,0,.999999,169736e-10,0,0,.999998,170575e-10,0,0,.999995,172372e-10,0,0,.99999,175739e-10,0,0,.999979,181568e-10,0,0,.999966,191206e-10,0,0,.999944,20677e-9,0,0,.999912,231644e-10,0,0,.999869,271268e-10,0,0,.999811,334272e-10,0,0,.99973,433979e-10,0,0,.999617,590083e-10,0,680315e-10,.999445,829497e-10,0,612796e-9,.999138,118019e-9,0,.00187408,.998095,156712e-9,0,.00395791,.993919,125054e-9,0,.00692144,.991333,126091e-9,0,.0107962,.989226,144912e-9,0,.0155986,.986954,175737e-9,0,.0213364,.983982,213883e-9,0,.0280114,.979128,234526e-9,0,.0356226,.973327,243725e-9,0,.0441668,.967416,2773e-7,0,.0536399,.959729,308799e-9,0,.0640376,.949758,322447e-9,0,.0753554,.939173,350021e-9,0,.0875893,.9296,370089e-9,0,.100736,.921181,391365e-9,0,.114793,.91164,413636e-9,0,.129759,.900435,427068e-9,0,.145632,.888183,441046e-9,0,.162412,.874772,454968e-9,0,.180101,.859566,461882e-9,0,.1987,.843579,471556e-9,0,.218213,.826453,474335e-9,0,.238641,.809164,477078e-9,0,.259989,.792179,47755e-8,0,.282262,.773866,472573e-9,0,.305464,.754944,469765e-9,0,.329599,.735133,462371e-9,0,.35467,.714858,453674e-9,0,.380678,.694829,443888e-9,0,.407622,.674453,432052e-9,0,.435493,.653685,420315e-9,0,.464275,.632666,406829e-9,0,.493938,.611676,392234e-9,0,.524422,.591193,379208e-9,0,.555624,.570145,36319e-8,0,.587302,.549566,349111e-9,0,.619048,.529278,334166e-9,0,.650794,.509026,318456e-9,0,.68254,.489186,30449e-8,0,.714286,.469662,289051e-9,0,.746032,.450691,275494e-9,0,.777778,.431841,261437e-9,0,.809524,.413752,247846e-9,0,.84127,.395951,235085e-9,0,.873016,.378633,222245e-9,0,.904762,.36194,210533e-9,0,.936508,.345599,198494e-9,0,.968254,.329999,188133e-9,0,1,1,269663e-10,0,0,1,26967e-9,0,0,1,269772e-10,0,0,.999999,270214e-10,0,0,.999998,271415e-10,0,0,.999994,27398e-9,0,0,.999988,278771e-10,0,0,.999977,287019e-10,0,0,.999961,300544e-10,0,0,.999937,322138e-10,0,0,.999904,356163e-10,0,0,.999854,409465e-10,0,0,.99979,492651e-10,0,0,.999699,621722e-10,0,88288e-11,.999572,819715e-10,0,223369e-9,.999381,111689e-9,0,.00105414,.999016,153862e-9,0,.0026493,.997437,187667e-9,0,.00508608,.993545,155672e-9,0,.00840554,.991135,161455e-9,0,.012629,.989157,188241e-9,0,.0177661,.986874,226229e-9,0,.0238198,.983714,268668e-9,0,.0307887,.978301,277109e-9,0,.0386688,.973227,303446e-9,0,.0474554,.967317,341851e-9,0,.0571428,.959477,370885e-9,0,.0677256,.950012,392753e-9,0,.0791988,.939484,42781e-8,0,.0915576,.928135,443866e-9,0,.104798,.919819,472959e-9,0,.118918,.910049,491551e-9,0,.133915,.899181,512616e-9,0,.149788,.886881,523563e-9,0,.166537,.87359,540183e-9,0,.184164,.858613,547386e-9,0,.202669,.842809,554809e-9,0,.222056,.825727,558316e-9,0,.242329,.808086,557824e-9,0,.263492,.790728,556346e-9,0,.285551,.772987,552672e-9,0,.30851,.7541,543738e-9,0,.332376,.734669,536107e-9,0,.357153,.714411,523342e-9,0,.382845,.694196,512238e-9,0,.409454,.674252,497465e-9,0,.436977,.65357,481096e-9,0,.465404,.632999,467054e-9,0,.494713,.611994,448771e-9,0,.524864,.591604,431889e-9,0,.555779,.571134,415238e-9,0,.587302,.550528,396369e-9,0,.619048,.530292,379477e-9,0,.650794,.510364,361488e-9,0,.68254,.490749,343787e-9,0,.714286,.471266,327822e-9,0,.746032,.452462,310626e-9,0,.777778,.433907,295352e-9,0,.809524,.415659,279179e-9,0,.84127,.398138,264685e-9,0,.873016,.380833,249905e-9,0,.904762,.364247,236282e-9,0,.936508,.348041,222905e-9,0,.968254,.332389,210522e-9,0,1,1,420604e-10,0,0,1,420614e-10,0,0,1,420757e-10,0,0,.999999,42138e-9,0,0,.999997,423067e-10,0,0,.999993,426668e-10,0,0,.999986,433372e-10,0,0,.999974,444857e-10,0,0,.999956,463554e-10,0,0,.99993,493105e-10,0,0,.999892,539077e-10,0,0,.999838,610005e-10,0,0,.999767,718822e-10,0,0,.999666,884581e-10,0,365471e-10,.999525,113398e-9,0,485623e-9,.999311,150043e-9,0,.00162096,.998865,200063e-9,0,.00355319,.996278,211014e-9,0,.00633818,.992956,189672e-9,0,.0100043,.991017,210262e-9,0,.0145648,.989055,244292e-9,0,.0200237,.986741,290481e-9,0,.0263798,.983288,334303e-9,0,.033629,.977784,340307e-9,0,.0417652,.973037,377864e-9,0,.0507821,.967181,4239e-7,0,.060673,.958971,443854e-9,0,.0714314,.950093,483039e-9,0,.0830518,.939552,517934e-9,0,.0955288,.927678,539449e-9,0,.108859,.918278,568604e-9,0,.123038,.908449,588505e-9,0,.138065,.897713,612473e-9,0,.153938,.885533,625575e-9,0,.170657,.872131,63854e-8,0,.188224,.857517,647034e-9,0,.20664,.841796,65209e-8,0,.225909,.824726,6544e-7,0,.246035,.807297,655744e-9,0,.267022,.789058,646716e-9,0,.288878,.77189,643898e-9,0,.311607,.753082,629973e-9,0,.335216,.7341,621564e-9,0,.359713,.714094,605171e-9,0,.385103,.693839,588752e-9,0,.41139,.673891,573294e-9,0,.438576,.653565,552682e-9,0,.466656,.633326,533446e-9,0,.495617,.612582,514635e-9,0,.525431,.59205,49303e-8,0,.556041,.571918,471842e-9,0,.587338,.551572,451713e-9,0,.619048,.531553,430049e-9,0,.650794,.51175,410445e-9,0,.68254,.49238,390098e-9,0,.714286,.473143,370033e-9,0,.746032,.45423,351205e-9,0,.777778,.435963,332049e-9,0,.809524,.41787,315021e-9,0,.84127,.400387,297315e-9,0,.873016,.383332,281385e-9,0,.904762,.366665,265397e-9,0,.936508,.350633,250601e-9,0,.968254,.334964,23589e-8,0,1,1,643736e-10,0,0,1,64375e-9,0,0,1,643947e-10,0,0,.999999,64481e-9,0,0,.999997,647143e-10,0,0,.999994,652119e-10,0,0,.999985,661359e-10,0,0,.999972,677116e-10,0,0,.999952,702599e-10,0,0,.999922,742517e-10,0,0,.99988,803906e-10,0,0,.99982,897315e-10,0,0,.999741,103838e-9,0,0,.999629,12496e-8,0,149024e-9,.999474,156161e-9,0,861027e-9,.999229,201034e-9,0,.00231198,.998662,259069e-9,0,.00458147,.995299,245439e-9,0,.00770895,.992732,24498e-8,0,.0117126,.990847,273211e-9,0,.0165989,.988911,316492e-9,0,.0223674,.98654,37161e-8,0,.0290135,.982636,410352e-9,0,.0365309,.977346,421756e-9,0,.0449117,.972909,475578e-9,0,.0541481,.966821,522482e-9,0,.0642326,.958686,545008e-9,0,.075158,.949754,589286e-9,0,.0869181,.939184,619995e-9,0,.0995074,.927505,654266e-9,0,.112922,.916606,682362e-9,0,.127157,.906707,704286e-9,0,.142212,.895937,725909e-9,0,.158085,.883913,743939e-9,0,.174776,.870642,755157e-9,0,.192287,.856241,764387e-9,0,.210619,.84069,771032e-9,0,.229775,.823728,765906e-9,0,.249761,.806481,767604e-9,0,.270582,.787924,754385e-9,0,.292243,.770588,749668e-9,0,.314753,.751991,731613e-9,0,.338118,.733407,717655e-9,0,.362347,.713688,700604e-9,0,.387447,.693595,678765e-9,0,.413424,.673426,657042e-9,0,.440284,.65359,635892e-9,0,.468027,.633576,611569e-9,0,.496645,.613144,586011e-9,0,.526122,.592711,563111e-9,0,.556417,.572722,537699e-9,0,.587451,.552762,512556e-9,0,.619048,.532985,489757e-9,0,.650794,.513219,464139e-9,0,.68254,.493992,442193e-9,0,.714286,.47509,418629e-9,0,.746032,.456287,397045e-9,0,.777778,.438152,375504e-9,0,.809524,.420294,35492e-8,0,.84127,.402749,335327e-9,0,.873016,.385879,316422e-9,0,.904762,.369352,298333e-9,0,.936508,.353301,281417e-9,0,.968254,.337781,265203e-9,0,1,1,968267e-10,0,0,1,968284e-10,0,0,1,968556e-10,0,0,.999999,969733e-10,0,0,.999997,972913e-10,0,0,.999993,979688e-10,0,0,.999984,992239e-10,0,0,.999969,101356e-9,0,0,.999946,104784e-9,0,0,.999913,110111e-9,0,0,.999868,118217e-9,0,0,.999801,130396e-9,0,0,.999712,148523e-9,0,124907e-10,.999589,175233e-9,0,355405e-9,.999416,213999e-9,0,.0013528,.999136,268529e-9,0,.00312557,.998367,333088e-9,0,.00573045,.994701,304757e-9,0,.00919397,.992497,318031e-9,0,.0135261,.990608,353863e-9,0,.0187278,.988715,409044e-9,0,.0247947,.986241,472967e-9,0,.0317196,.981696,495104e-9,0,.039494,.977097,532873e-9,0,.0481087,.972583,594447e-9,0,.0575549,.966142,636867e-9,0,.0678242,.95823,669899e-9,0,.0789089,.949677,719499e-9,0,.0908023,.939226,750584e-9,0,.103499,.927501,793183e-9,0,.116993,.915199,81995e-8,0,.131282,.90498,847654e-9,0,.146364,.894243,868929e-9,0,.162237,.882154,884278e-9,0,.178902,.869161,898108e-9,0,.196358,.854751,901254e-9,0,.21461,.839368,90679e-8,0,.23366,.822874,901541e-9,0,.253512,.805514,897297e-9,0,.274174,.78716,881856e-9,0,.29565,.769061,870032e-9,0,.31795,.751,851719e-9,0,.341081,.732614,830671e-9,0,.365053,.713171,806569e-9,0,.389874,.693472,78338e-8,0,.415553,.673528,756404e-9,0,.442098,.653397,726872e-9,0,.469512,.633781,700494e-9,0,.497794,.613877,67105e-8,0,.526935,.593506,640361e-9,0,.556908,.573667,613502e-9,0,.587657,.553932,583177e-9,0,.61906,.534345,554375e-9,0,.650794,.515042,527811e-9,0,.68254,.495674,499367e-9,0,.714286,.477132,47429e-8,0,.746032,.458609,447726e-9,0,.777778,.440354,424205e-9,0,.809524,.422765,399549e-9,0,.84127,.405472,378315e-9,0,.873016,.388482,355327e-9,0,.904762,.372191,336122e-9,0,.936508,.356099,315247e-9,0,.968254,.340737,29794e-8,0,1,1,143327e-9,0,0,1,14333e-8,0,0,1,143366e-9,0,0,.999999,143524e-9,0,0,.999996,143952e-9,0,0,.999991,144862e-9,0,0,.999981,146544e-9,0,0,.999966,149391e-9,0,0,.999941,153946e-9,0,0,.999905,160971e-9,0,0,.999852,171562e-9,0,0,.99978,18729e-8,0,0,.999681,210386e-9,0,826239e-10,.999546,243906e-9,0,664807e-9,.999352,291739e-9,0,.00196192,.999027,357419e-9,0,.00405941,.997886,422349e-9,0,.00699664,.99419,385008e-9,0,.0107896,.99214,409775e-9,0,.0154415,.990274,456418e-9,0,.0209488,.988455,527008e-9,0,.0273037,.985804,597685e-9,0,.0344969,.98103,613124e-9,0,.0425183,.976674,668321e-9,0,.0513575,.972021,736985e-9,0,.0610046,.965274,773789e-9,0,.0714508,.958046,830852e-9,0,.0826877,.949333,875766e-9,0,.0947085,.939135,917088e-9,0,.107507,.927119,952244e-9,0,.121078,.91469,990626e-9,0,.135419,.903006,.00101304,0,.150526,.892368,.00103834,0,.166399,.880231,.00105002,0,.183038,.867432,.00106331,0,.200443,.853208,.00106783,0,.218618,.837956,.00106458,0,.237566,.821772,.00105945,0,.257291,.804328,.00104685,0,.2778,.786465,.00103178,0,.2991,.768004,.00101077,0,.321199,.74972,985504e-9,0,.344106,.731682,962893e-9,0,.36783,.712813,932146e-9,0,.392383,.693139,89871e-8,0,.417774,.673566,869678e-9,0,.444013,.653483,835525e-9,0,.471107,.633891,799853e-9,0,.49906,.614433,766838e-9,0,.527869,.594586,732227e-9,0,.557517,.574769,696442e-9,0,.587966,.555149,663935e-9,0,.61913,.535898,629826e-9,0,.650794,.516753,596486e-9,0,.68254,.497816,567078e-9,0,.714286,.479034,534399e-9,0,.746032,.460975,507013e-9,0,.777778,.442935,477421e-9,0,.809524,.425263,451101e-9,0,.84127,.408248,424964e-9,0,.873016,.391339,39993e-8,0,.904762,.37513,377619e-9,0,.936508,.359172,354418e-9,0,.968254,.343876,334823e-9,0,1,1,209042e-9,0,0,1,209045e-9,0,0,1,209093e-9,0,0,.999999,209304e-9,0,0,.999996,209871e-9,0,0,.999991,211078e-9,0,0,.999979,213304e-9,0,0,.999963,217061e-9,0,0,.999933,223042e-9,0,0,.999894,232206e-9,0,0,.999837,245901e-9,0,0,.999756,266023e-9,0,102927e-11,.999648,295204e-9,0,233468e-9,.999499,336958e-9,0,.00108237,.999283,395563e-9,0,.00268832,.998896,473785e-9,0,.00511138,.997006,520008e-9,0,.00837705,.993819,497261e-9,0,.0124928,.991632,523722e-9,0,.0174561,.989875,587258e-9,0,.0232596,.988109,676329e-9,0,.0298932,.985155,747701e-9,0,.0373453,.980479,768803e-9,0,.0456045,.976271,841054e-9,0,.0546593,.971347,911469e-9,0,.0644994,.964528,953057e-9,0,.0751152,.957632,.00102221,0,.0864981,.948681,.00106122,0,.0986407,.938716,.00111857,0,.111537,.926629,.00114762,0,.125182,.914025,.00118995,0,.139571,.901026,.00121228,0,.154703,.890358,.00123946,0,.170576,.878283,.0012527,0,.18719,.865459,.00125536,0,.204547,.851407,.00126134,0,.222648,.836276,.00124759,0,.241498,.820436,.00124443,0,.261101,.803253,.00122071,0,.281465,.785562,.00120107,0,.302595,.76718,.00117762,0,.324501,.748551,.00114289,0,.347192,.730564,.00110872,0,.370679,.712253,.00107636,0,.394973,.692867,.00103646,0,.420085,.673695,996793e-9,0,.446027,.653912,95675e-8,0,.47281,.634129,916739e-9,0,.500441,.615004,874401e-9,0,.528921,.595587,833411e-9,0,.558244,.575965,794556e-9,0,.588384,.5566,75196e-8,0,.619281,.537428,716381e-9,0,.650795,.518623,676558e-9,0,.68254,.499964,64074e-8,0,.714286,.481356,605984e-9,0,.746032,.463279,570256e-9,0,.777778,.445673,540138e-9,0,.809524,.428032,507299e-9,0,.84127,.411112,479553e-9,0,.873016,.394444,450737e-9,0,.904762,.378247,424269e-9,0,.936508,.362415,399111e-9,0,.968254,.347103,375274e-9,0,1,1,300729e-9,0,0,1,300733e-9,0,0,1,300797e-9,0,0,.999998,301072e-9,0,0,.999996,301817e-9,0,0,.999989,303398e-9,0,0,.999977,306309e-9,0,0,.999958,311209e-9,0,0,.999927,318975e-9,0,0,.999884,330804e-9,0,0,.99982,34834e-8,0,0,.999733,373854e-9,0,326995e-10,.999613,410424e-9,0,477174e-9,.999447,462047e-9,0,.00161099,.999204,533322e-9,0,.00353153,.998725,624964e-9,0,.00627965,.995871,631786e-9,0,.0098693,.993194,632017e-9,0,.0143011,.991541,68923e-8,0,.019568,.989773,766892e-9,0,.0256593,.987647,863668e-9,0,.0325625,.984193,922089e-9,0,.0402647,.980016,970749e-9,0,.0487532,.975859,.00106027,0,.058016,.970514,.00112239,0,.0680419,.963625,.00117212,0,.0788208,.956959,.00125211,0,.0903439,.947956,.00129411,0,.102604,.93809,.00135879,0,.115594,.92659,.00139309,0,.129309,.913829,.00143253,0,.143745,.90005,.00145809,0,.158901,.888129,.0014748,0,.174774,.87607,.00148756,0,.191365,.863461,.00148714,0,.208674,.849594,.00148892,0,.226705,.834531,.00146496,0,.245461,.81903,.0014579,0,.264947,.802122,.00143039,0,.28517,.78445,.00139717,0,.306137,.766434,.00136312,0,.327857,.747816,.00132597,0,.350341,.729519,.00128323,0,.373598,.711454,.00123803,0,.397642,.692699,.00119097,0,.422485,.673723,.00114565,0,.448139,.654386,.00109552,0,.474619,.634673,.00104553,0,.501933,.615554,99985e-8,0,.530089,.596462,948207e-9,0,.559087,.577385,902299e-9,0,.588913,.558257,856448e-9,0,.619525,.5392,810395e-9,0,.650826,.520543,768558e-9,0,.68254,.502206,7239e-7,0,.714286,.48402,685794e-9,0,.746032,.465779,64471e-8,0,.777778,.448455,609583e-9,0,.809524,.431091,57227e-8,0,.84127,.414147,54042e-8,0,.873016,.39765,506545e-9,0,.904762,.381576,477635e-9,0,.936508,.365881,448446e-9,0,.968254,.350582,421424e-9,0,1,1,427144e-9,0,0,1,427151e-9,0,0,1,427232e-9,0,0,.999998,42759e-8,0,0,.999995,428555e-9,0,0,.999988,430603e-9,0,0,.999976,434368e-9,0,0,.999952,440688e-9,0,0,.999919,450667e-9,0,0,.999871,46578e-8,0,0,.999801,488024e-9,0,0,.999704,520092e-9,0,129791e-9,.999572,565553e-9,0,821056e-9,.999389,628906e-9,0,.00225241,.999114,714911e-9,0,.00449109,.998488,819218e-9,0,.00756249,.995234,80415e-8,0,.0114716,.993021,830181e-9,0,.0162131,.991407,902645e-9,0,.021776,.989625,996934e-9,0,.0281471,.987064,.00109707,0,.0353118,.983265,.00114353,0,.0432562,.979535,.0012272,0,.0519665,.975224,.00132642,0,.0614298,.969574,.00138092,0,.0716348,.963021,.00145896,0,.0825709,.956046,.00152834,0,.094229,.947136,.00158217,0,.106602,.937313,.0016347,0,.119682,.926073,.00168383,0,.133465,.913121,.00171627,0,.147947,.899165,.00174229,0,.163125,.885891,.00176137,0,.178998,.873783,.00176406,0,.195566,.861331,.00176156,0,.21283,.847569,.00175346,0,.230793,.832785,.00172753,0,.249459,.817442,.00170204,0,.268832,.800613,.00166576,0,.28892,.783597,.00162909,0,.30973,.76571,.0015826,0,.331271,.747021,.00153106,0,.353554,.728593,.00148036,0,.37659,.710661,.00142808,0,.400391,.692426,.00136906,0,.424973,.673623,.00131066,0,.450347,.65494,.00125569,0,.476531,.635448,.00119517,0,.503535,.616221,.00113828,0,.531372,.597531,.0010816,0,.560047,.578795,.00102673,0,.589554,.559892,970985e-9,0,.619869,.541307,919773e-9,0,.650923,.522608,868479e-9,0,.68254,.504484,82137e-8,0,.714286,.486603,772916e-9,0,.746032,.468802,730353e-9,0,.777778,.451172,684955e-9,0,.809524,.434348,647565e-9,0,.84127,.417445,605863e-9,0,.873016,.401077,571885e-9,0,.904762,.385039,536034e-9,0,.936508,.369483,504227e-9,0,.968254,.354272,473165e-9,0,1,1,599525e-9,0,0,1,599533e-9,0,0,1,599639e-9,0,0,.999998,600097e-9,0,0,.999994,601336e-9,0,0,.999987,603958e-9,0,0,.999972,608775e-9,0,0,.999949,616842e-9,0,0,.999912,629534e-9,0,0,.999857,648658e-9,0,0,.999781,676615e-9,0,538873e-11,.999674,716574e-9,0,308602e-9,.999528,772641e-9,0,.00127003,.999326,849806e-9,0,.00300783,.999009,952682e-9,0,.00556637,.998112,.00106394,0,.00895889,.994496,.00102228,0,.0131827,.992806,.00108586,0,.0182277,.991211,.0011759,0,.0240795,.989415,.00128955,0,.030723,.986499,.00139038,0,.0381418,.982679,.00144539,0,.046321,.978839,.00153954,0,.0552459,.974295,.00164417,0,.0649034,.968784,.00171517,0,.0752814,.962324,.00180282,0,.0863693,.954956,.00186387,0,.0981578,.94624,.00193817,0,.110639,.936517,.00198156,0,.123806,.925186,.00203042,0,.137655,.91252,.0020664,0,.15218,.898441,.00207822,0,.16738,.884394,.0020992,0,.183253,.871273,.00208748,0,.199799,.859057,.00208686,0,.21702,.845243,.00205519,0,.234918,.830723,.00202868,0,.253496,.815801,.00199501,0,.272761,.79914,.00194193,0,.292719,.782372,.00188824,0,.313377,.76482,.00183695,0,.334745,.746586,.00177418,0,.356833,.7281,.00170628,0,.379654,.709842,.00164063,0,.403221,.692019,.00157355,0,.427548,.67364,.00150262,0,.452651,.655277,.00143473,0,.478545,.636438,.00136371,0,.505246,.617364,.00129911,0,.532768,.598603,.00123014,0,.561122,.580195,.00116587,0,.590309,.561786,.00110398,0,.620318,.543377,.00104148,0,.651102,.525093,983984e-9,0,.682545,.506791,92667e-8,0,.714286,.489291,874326e-9,0,.746032,.471811,821734e-9,0,.777778,.454435,774698e-9,0,.809524,.437493,727302e-9,0,.84127,.420977,684039e-9,0,.873016,.404729,64373e-8,0,.904762,.388756,60285e-8,0,.936508,.373344,56765e-8,0,.968254,.358191,531929e-9,0,1,1,832169e-9,0,0,1,832178e-9,0,0,1,83231e-8,0,0,.999998,832893e-9,0,0,.999995,834465e-9,0,0,.999985,837791e-9,0,0,.999969,843893e-9,0,0,.999944,854086e-9,0,0,.999903,870071e-9,0,0,.999843,894042e-9,0,0,.999759,928865e-9,0,531805e-10,.999643,978242e-9,0,579365e-9,.99948,.00104684,0,.00182774,.999255,.00114012,0,.00387804,.998885,.00126188,0,.00675709,.997405,.00135888,0,.010468,.99424,.00133626,0,.0150018,.992458,.00140905,0,.0203443,.990929,.00152305,0,.0264786,.989116,.00165882,0,.0333875,.985624,.00174128,0,.0410536,.982003,.00182108,0,.0494609,.978336,.00194498,0,.0585941,.973184,.00202708,0,.0684396,.9678,.00212166,0,.0789851,.961348,.00221366,0,.0902199,.953841,.00228219,0,.102134,.94534,.00235662,0,.114721,.935552,.00240572,0,.127972,.924064,.00244405,0,.141884,.911827,.00247557,0,.156451,.897731,.00248374,0,.171672,.883409,.00249863,0,.187545,.868625,.00246688,0,.20407,.856529,.00246523,0,.221249,.842999,.00242368,0,.239083,.828505,.00237354,0,.257578,.813825,.00232588,0,.276738,.797813,.00226731,0,.296569,.781097,.00219704,0,.31708,.764038,.00212394,0,.338281,.746067,.00204786,0,.360181,.727687,.00196728,0,.382794,.709571,.00188779,0,.406133,.691503,.00180532,0,.430213,.673673,.00171849,0,.45505,.655732,.00164147,0,.480662,.637399,.00155858,0,.507065,.618616,.00147641,0,.534278,.60005,.00140125,0,.562313,.581713,.00132441,0,.59118,.563546,.00125014,0,.620875,.545605,.00118249,0,.651373,.527559,.0011116,0,.682593,.509764,.00104979,0,.714286,.49193,985977e-9,0,.746032,.475011,928592e-9,0,.777778,.457878,873466e-9,0,.809524,.440979,819585e-9,0,.84127,.424613,772365e-9,0,.873016,.408549,722195e-9,0,.904762,.392771,680014e-9,0,.936508,.377317,636797e-9,0,.968254,.362352,598318e-9,0,1,1,.00114313,0,0,1,.00114314,0,0,.999999,.00114331,0,0,.999998,.00114404,0,0,.999994,.00114601,0,0,.999984,.00115019,0,0,.999967,.00115784,0,0,.999937,.0011706,0,0,.999894,.00119054,0,0,.999828,.00122031,0,0,.999735,.00126331,0,169263e-9,.999606,.00132382,0,949167e-9,.999426,.0014071,0,.00249668,.999173,.00151895,0,.00486392,.99873,.00166102,0,.00806323,.996243,.0017023,0,.0120895,.993779,.00172782,0,.0169288,.9919,.0018108,0,.0225633,.990524,.00196028,0,.028974,.98868,.00212014,0,.036142,.984663,.00217598,0,.044049,.981457,.00230563,0,.0526781,.977608,.00243966,0,.0620137,.972215,.00251336,0,.0720418,.966798,.0026285,0,.0827499,.960241,.00271409,0,.0941271,.952489,.00278381,0,.106164,.944127,.00285399,0,.118852,.934282,.00290994,0,.132185,.923271,.00294558,0,.146157,.910803,.00296269,0,.160766,.896705,.00296803,0,.176007,.88238,.00296637,0,.19188,.867116,.00293163,0,.208385,.853636,.00289418,0,.225523,.840469,.00284663,0,.243296,.82639,.00278594,0,.261709,.811759,.00271618,0,.280767,.796113,.00263187,0,.300476,.779518,.00254589,0,.320845,.763142,.00246003,0,.341883,.745464,.00236529,0,.363601,.727491,.00226536,0,.386011,.709414,.00216375,0,.409128,.691396,.00207127,0,.432967,.67368,.00197106,0,.457545,.656049,.00187022,0,.482881,.638188,.00177605,0,.508992,.620177,.00168482,0,.535899,.601506,.00158909,0,.563619,.58362,.00150583,0,.592165,.565496,.00141791,0,.621544,.54789,.00133693,0,.651743,.530323,.00126038,0,.682709,.512795,.00118556,0,.714286,.495199,.00111527,0,.746032,.478101,.0010489,0,.777778,.461511,984264e-9,0,.809524,.444879,92591e-8,0,.84127,.428424,866582e-9,0,.873016,.412495,814463e-9,0,.904762,.396975,764498e-9,0,.936508,.381614,715967e-9,0,.968254,.366732,672483e-9,0,1,1,.00155501,0,0,1,.00155503,0,0,1,.00155524,0,0,.999998,.00155615,0,0,.999994,.0015586,0,0,.999983,.00156379,0,0,.999963,.0015733,0,0,.999932,.00158911,0,0,.999882,.00161376,0,0,.99981,.00165041,0,100875e-10,.999708,.00170304,0,367658e-9,.999565,.00177658,0,.0014234,.999368,.00187688,0,.00327939,.999081,.00200989,0,.00596629,.99852,.00217177,0,.0094852,.99549,.0021745,0,.013824,.993252,.00222357,0,.0189642,.991727,.00235022,0,.0248856,.989951,.00250561,0,.0315669,.988029,.00268829,0,.0389882,.984029,.0027496,0,.0471302,.980683,.00289793,0,.0559754,.976554,.00303315,0,.0655081,.97139,.00313257,0,.0757138,.965544,.00323656,0,.08658,.95912,.00333432,0,.0980954,.951183,.0034039,0,.110251,.942974,.00347515,0,.123038,.932642,.00350381,0,.13645,.922158,.00354519,0,.150482,.909404,.00353851,0,.165129,.896071,.0035435,0,.18039,.881206,.00349936,0,.196263,.866077,.00347256,0,.212748,.85093,.003415,0,.229847,.837703,.00333367,0,.247561,.823878,.003249,0,.265895,.809449,.00316347,0,.284854,.794379,.00306351,0,.304445,.778138,.0029499,0,.324675,.761997,.00284099,0,.345555,.744938,.00272104,0,.367095,.727212,.00260715,0,.389309,.709549,.00248855,0,.41221,.691704,.00236783,0,.435814,.673689,.00225178,0,.460138,.656453,.00213765,0,.485203,.639128,.00202178,0,.511028,.621512,.00191443,0,.537634,.603598,.00180977,0,.565041,.58559,.00170456,0,.593268,.567852,.00160927,0,.622327,.5503,.00151395,0,.652217,.533033,.00142499,0,.682907,.515942,.00133955,0,.714296,.498814,.0012602,0,.746032,.481595,.00118188,0,.777778,.465117,.00111171,0,.809524,.448865,.00104091,0,.84127,.432711,976618e-9,0,.873016,.416822,91859e-8,0,.904762,.401272,857704e-9,0,.936508,.386226,807172e-9,0,.968254,.371321,75464e-8,0,1,1,.00209596,0,0,1,.00209598,0,0,1,.00209624,0,0,.999997,.00209736,0,0,.999991,.00210039,0,0,.999979,.00210678,0,0,.999959,.00211847,0,0,.999925,.0021379,0,0,.99987,.00216809,0,0,.999791,.00221281,0,681487e-10,.999677,.00227669,0,658161e-9,.999521,.00236533,0,.00200635,.999301,.00248514,0,.0041779,.998977,.00264185,0,.00718648,.998191,.00281695,0,.0110239,.994801,.00278518,0,.015672,.993091,.00288774,0,.0211091,.991571,.00303931,0,.0273123,.9897,.00321643,0,.034259,.987023,.00337332,0,.0419282,.983289,.00346146,0,.0502998,.979892,.00363704,0,.0593562,.975111,.00373601,0,.069081,.970351,.0038842,0,.0794598,.964131,.00397053,0,.0904798,.957747,.00408078,0,.10213,.949536,.00413533,0,.1144,.941372,.00420305,0,.127284,.931049,.00422815,0,.140772,.920647,.00425048,0,.154862,.908033,.0042281,0,.169548,.895028,.00422026,0,.184828,.879968,.00415042,0,.200701,.864875,.00408821,0,.217167,.84918,.00400909,0,.234227,.834934,.00391178,0,.251884,.821397,.00380066,0,.270141,.807135,.00367974,0,.289004,.792363,.00355172,0,.308479,.776661,.003411,0,.328575,.760705,.00328123,0,.349301,.744408,.00314003,0,.370668,.726994,.0029906,0,.392689,.709598,.00285034,0,.415379,.692112,.00271179,0,.438754,.674435,.00257185,0,.46283,.65676,.00243425,0,.48763,.639982,.00230351,0,.513173,.622983,.0021777,0,.539482,.605471,.00204991,0,.566579,.58796,.00193759,0,.594488,.570463,.00181976,0,.623226,.553058,.00171497,0,.6528,.535894,.00161109,0,.683198,.519089,.00151394,0,.714354,.502454,.00142122,0,.746032,.485681,.00133488,0,.777778,.468935,.00124975,0,.809524,.452951,.00117309,0,.84127,.437139,.00110155,0,.873016,.421446,.00103124,0,.904762,.405951,966387e-9,0,.936508,.391003,908119e-9,0,.968254,.376198,848057e-9,0,1,1,.00280076,0,0,1,.00280078,0,0,.999999,.00280109,0,0,.999997,.00280246,0,0,.999992,.00280616,0,0,.999979,.00281396,0,0,.999956,.00282822,0,0,.999916,.00285186,0,0,.999857,.0028885,0,0,.999768,.00294259,0,196026e-9,.999645,.00301946,0,.00104842,.99947,.00312541,0,.00270199,.999229,.00326733,0,.00519449,.998852,.00344992,0,.00852602,.997558,.00361052,0,.0126804,.994417,.0035898,0,.017635,.992824,.00372393,0,.023365,.991344,.00390695,0,.0298456,.989337,.00410392,0,.0370529,.985811,.00420987,0,.0449651,.982772,.00437488,0,.0535615,.979001,.00455069,0,.0628243,.974102,.00464462,0,.0727368,.969197,.00480577,0,.0832844,.962759,.00487818,0,.0944545,.956207,.00498176,0,.106236,.947909,.00503392,0,.118619,.939596,.00507474,0,.131595,.929642,.00509798,0,.145159,.918807,.00508476,0,.159305,.906921,.00505634,0,.174028,.893312,.00498845,0,.189327,.878933,.0049133,0,.2052,.863986,.0048259,0,.221647,.847936,.00470848,0,.23867,.832253,.00456889,0,.25627,.818619,.00442726,0,.274453,.804788,.00427677,0,.293222,.790241,.00411906,0,.312585,.775162,.00394833,0,.33255,.759463,.00377366,0,.353126,.743598,.00361026,0,.374324,.72697,.00343627,0,.396158,.709646,.00326422,0,.418641,.69277,.00309717,0,.44179,.675371,.0029356,0,.465624,.657863,.00277712,0,.490163,.640772,.00261738,0,.515429,.624441,.0024737,0,.541445,.607497,.00233125,0,.568236,.590438,.00218994,0,.595828,.573224,.0020664,0,.624242,.556168,.00193526,0,.653496,.539232,.00182463,0,.683588,.522352,.00170735,0,.714482,.506172,.00160555,0,.746032,.489842,.00150451,0,.777778,.473463,.00140938,0,.809524,.457266,.00132568,0,.84127,.441609,.0012376,0,.873016,.426348,.00116265,0,.904762,.411002,.00108935,0,.936508,.396045,.00101946,0,.968254,.381448,955665e-9,0,1,1,.0037121,0,0,1,.00371213,0,0,1,.00371251,0,0,.999997,.00371417,0,0,.99999,.00371863,0,0,.999977,.00372807,0,0,.99995,.00374529,0,0,.999908,.0037738,0,0,.999843,.00381789,0,123596e-10,.999745,.00388273,0,407442e-9,.999608,.00397443,0,.0015447,.999415,.00409998,0,.00351385,.999143,.00426662,0,.0063316,.9987,.00447625,0,.00998679,.996363,.00455323,0,.0144569,.994021,.00461052,0,.0197151,.992372,.00476359,0,.0257344,.991007,.00499101,0,.0324882,.988767,.0051972,0,.0399517,.984872,.00528407,0,.0481022,.982004,.00548926,0,.0569191,.977714,.00564385,0,.0663839,.973076,.0057693,0,.0764801,.967565,.0058924,0,.0871928,.961384,.00599629,0,.0985095,.954435,.00605998,0,.110419,.946303,.0061133,0,.122912,.937662,.00612028,0,.13598,.927867,.00612209,0,.149617,.916475,.00604813,0,.163817,.90541,.00603088,0,.178577,.891591,.00592218,0,.193894,.877573,.00578854,0,.209767,.862511,.00566648,0,.226196,.846861,.00551481,0,.243182,.83068,.00533754,0,.260728,.815725,.00515487,0,.278837,.802321,.0049655,0,.297515,.787826,.00475421,0,.316768,.773454,.00456002,0,.336605,.758224,.00434727,0,.357034,.74265,.00414444,0,.378067,.726729,.00393738,0,.399717,.710155,.00373575,0,.421998,.693312,.00353736,0,.444928,.67653,.00334368,0,.468523,.659444,.00315981,0,.492806,.642051,.00297809,0,.517798,.625758,.00280592,0,.543525,.609615,.00264254,0,.570012,.592919,.00248459,0,.597288,.576298,.00233327,0,.625379,.559489,.00219519,0,.654307,.542891,.00205441,0,.684084,.526255,.00193385,0,.714693,.509853,.00180745,0,.746044,.494131,.00169817,0,.777778,.478114,.0015913,0,.809524,.462274,.00148981,0,.84127,.446412,.00139537,0,.873016,.431274,.00130984,0,.904762,.41635,.00122403,0,.936508,.401476,.00114809,0,.968254,.386993,.00107563,0,1,1,.00488216,0,0,1,.0048822,0,0,1,.00488265,0,0,.999997,.00488463,0,0,.999988,.00488999,0,0,.999974,.00490129,0,0,.999946,.00492191,0,0,.999897,.00495598,0,0,.999825,.00500855,0,744791e-10,.999718,.00508559,0,712744e-9,.999565,.005194,0,.00215249,.999352,.00534147,0,.00444576,.999046,.00553523,0,.00759218,.998492,.00577016,0,.0115714,.995564,.00578487,0,.0163557,.993339,.00586414,0,.021915,.991834,.00606002,0,.0282201,.990496,.00633312,0,.0352433,.987826,.00651941,0,.042959,.98383,.00660842,0,.0513439,.98109,.00685523,0,.0603772,.976131,.00695778,0,.0700402,.971922,.00714236,0,.0803163,.965901,.00721437,0,.0911908,.959606,.00732017,0,.102651,.952504,.00735788,0,.114686,.944365,.00738493,0,.127286,.935652,.00737969,0,.140443,.925813,.00733612,0,.154151,.914397,.00723094,0,.168405,.903257,.00714002,0,.183201,.890015,.00700149,0,.198536,.876014,.00682813,0,.214409,.861436,.00665567,0,.23082,.845752,.00644526,0,.24777,.829169,.00621635,0,.265263,.813435,.00597789,0,.283301,.799701,.00575694,0,.301889,.785726,.00549866,0,.321035,.77152,.0052503,0,.340746,.75683,.00499619,0,.361032,.741951,.0047543,0,.381904,.726367,.0045084,0,.403374,.710537,.00426784,0,.425457,.693965,.00403487,0,.448169,.677724,.0038075,0,.47153,.66117,.00359431,0,.495561,.644274,.00338354,0,.520284,.627449,.00318163,0,.545725,.611645,.00299672,0,.571911,.595614,.00281016,0,.598873,.579426,.00264252,0,.62664,.563016,.00247509,0,.655239,.546728,.00232647,0,.684692,.530539,.00217803,0,.714999,.514164,.00204216,0,.746106,.498344,.00191403,0,.777778,.482957,.00179203,0,.809524,.467336,.00167695,0,.84127,.451994,.00157567,0,.873016,.436514,.00147113,0,.904762,.42178,.00138034,0,.936508,.407271,.00129219,0,.968254,.392822,.0012098,0,1,1,.00637427,0,0,1,.00637431,0,0,.999999,.00637485,0,0,.999996,.00637721,0,0,.999987,.00638357,0,0,.999971,.006397,0,0,.999939,.00642142,0,0,.999888,.00646177,0,0,.999807,.00652387,0,207916e-9,.999689,.00661454,0,.00112051,.99952,.00674155,0,.00287719,.999283,.00691313,0,.00550145,.998936,.00713598,0,.00897928,.998165,.00738501,0,.0132829,.994847,.00734388,0,.01838,.993182,.00749991,0,.0242381,.991665,.0077246,0,.030826,.989708,.00797579,0,.0381152,.986663,.00813011,0,.0460794,.983288,.00830365,0,.0546951,.980104,.00853496,0,.0639411,.974855,.00861045,0,.0737988,.97045,.00879133,0,.0842516,.964509,.00886377,0,.0952848,.957594,.00890346,0,.106886,.950546,.00893289,0,.119044,.942225,.00890074,0,.131749,.933365,.00886826,0,.144994,.923202,.0087316,0,.158772,.912605,.00863082,0,.173078,.901099,.00847403,0,.187908,.888177,.00825838,0,.203261,.873955,.00801834,0,.219134,.860091,.00779026,0,.235527,.84434,.00752478,0,.252443,.828517,.00724074,0,.269883,.81239,.00693769,0,.287851,.79721,.00664817,0,.306352,.783489,.00634763,0,.325393,.769514,.00604221,0,.344981,.755419,.00573568,0,.365126,.741083,.00544359,0,.385839,.726059,.00515515,0,.407132,.710809,.00487139,0,.42902,.695052,.00459846,0,.45152,.678886,.00433412,0,.474651,.663042,.00407981,0,.498433,.646634,.00384264,0,.52289,.630117,.00360897,0,.548048,.613804,.00338863,0,.573936,.598338,.00318486,0,.600584,.582687,.00298377,0,.628027,.566809,.00280082,0,.656295,.550817,.00262255,0,.685417,.534937,.00245835,0,.715406,.519151,.00230574,0,.74624,.503118,.0021549,0,.777778,.487723,.00202008,0,.809524,.472725,.00189355,0,.84127,.457599,.00177108,0,.873016,.442558,.00165843,0,.904762,.427624,.00155494,0,.936508,.413171,.00145273,0,.968254,.399122,.00136454,0,1,1,.00826496,0,0,1,.00826499,0,0,1,.00826564,0,0,.999996,.00826842,0,0,.999987,.00827589,0,0,.999967,.00829167,0,0,.999933,.00832037,0,0,.999876,.00836768,0,109338e-10,.999786,.00844031,0,427145e-9,.999655,.00854603,0,.0016384,.999468,.00869337,0,.00372392,.999203,.008891,0,.00668513,.998803,.00914387,0,.0104968,.99748,.00935838,0,.015125,.994446,.00933309,0,.0205338,.99292,.00953084,0,.0266884,.991414,.0097893,0,.0335565,.989049,.0100228,0,.0411086,.98582,.0101664,0,.0493181,.982441,.0103582,0,.0581613,.978595,.0105292,0,.0676169,.973495,.0106274,0,.0776661,.968405,.0107261,0,.0882926,.962717,.0108234,0,.0994817,.955478,.0108102,0,.111221,.948275,.0107914,0,.123499,.940006,.0107161,0,.136308,.930831,.0106309,0,.149639,.920648,.0104083,0,.163485,.910205,.0102312,0,.177843,.898445,.0100051,0,.192707,.885986,.00971928,0,.208077,.872204,.00940747,0,.22395,.858436,.0091085,0,.240326,.843454,.00876595,0,.257208,.827437,.00839794,0,.274596,.811488,.00803692,0,.292496,.796039,.00767352,0,.310911,.781083,.0073097,0,.329849,.767642,.00694032,0,.349316,.753901,.00657476,0,.369323,.740131,.00622699,0,.38988,.725845,.0058838,0,.410999,.710991,.00555586,0,.432696,.696002,.00523089,0,.454987,.680461,.00492494,0,.47789,.664875,.00463464,0,.501426,.649273,.00435422,0,.52562,.63302,.0040875,0,.550498,.61705,.00384075,0,.576089,.601154,.00359557,0,.602427,.586008,.00337636,0,.629544,.570699,.00316019,0,.657479,.555166,.00296033,0,.686264,.539645,.00277552,0,.715924,.524159,.00259499,0,.746459,.508682,.00243257,0,.777789,.493163,.00227851,0,.809524,.478004,.00213083,0,.84127,.46347,.00199502,0,.873016,.448778,.00186967,0,.904762,.434105,.00174732,0,.936508,.419576,.00163861,0,.968254,.405541,.00153341,0,1,1,.0106462,0,0,1,.0106462,0,0,.999999,.010647,0,0,.999995,.0106502,0,0,.999985,.0106589,0,0,.999964,.0106773,0,0,.999925,.0107106,0,0,.999861,.0107655,0,712986e-10,.999763,.0108497,0,743959e-9,.999616,.0109716,0,.00227361,.999408,.0111408,0,.0046983,.999112,.0113659,0,.00800158,.998637,.0116475,0,.0121493,.996223,.0117231,0,.0171023,.994006,.0118064,0,.0228218,.992444,.0120254,0,.0292711,.991028,.0123314,0,.036417,.98803,.0124954,0,.0442295,.984816,.0126538,0,.0526815,.981399,.0128537,0,.0617492,.977085,.0129694,0,.0714114,.972154,.013091,0,.0816495,.966617,.0131166,0,.0924472,.960628,.0131583,0,.10379,.953295,.0131094,0,.115665,.94575,.0129966,0,.128062,.937654,.0128796,0,.140972,.927716,.0126477,0,.154387,.917932,.0123889,0,.168301,.907719,.012131,0,.182709,.89584,.0118013,0,.197608,.883526,.0114145,0,.212994,.870301,.0110075,0,.228867,.856272,.0106019,0,.245227,.842251,.0101938,0,.262074,.826466,.00973254,0,.279412,.810859,.0092846,0,.297244,.795051,.00883304,0,.315575,.780053,.00840272,0,.334412,.76575,.00796438,0,.35376,.752298,.00752526,0,.373631,.739153,.00711486,0,.394034,.725514,.00670361,0,.414983,.711473,.00632656,0,.436491,.696936,.00595206,0,.458575,.682126,.00559191,0,.481253,.667027,.00525362,0,.504547,.651875,.00493805,0,.528481,.636463,.00462848,0,.553081,.620641,.00433936,0,.578377,.604931,.00407,0,.604404,.589549,.00380864,0,.631197,.574712,.00357049,0,.658795,.559775,.00334466,0,.687238,.544514,.00312505,0,.716559,.529555,.00293199,0,.746776,.514402,.00274204,0,.777849,.499302,.00256647,0,.809524,.484114,.00239901,0,.84127,.469308,.00225148,0,.873016,.455133,.00210178,0,.904762,.440939,.0019727,0,.936508,.426627,.00184382,0,.968254,.412509,.00172548,0,1,1,.013628,0,0,1,.0136281,0,0,.999999,.0136289,0,0,.999995,.0136327,0,0,.999983,.0136427,0,0,.99996,.0136638,0,0,.999917,.0137022,0,0,.999846,.0137652,0,204597e-9,.999736,.0138615,0,.00116837,.999573,.0140007,0,.00303325,.99934,.0141927,0,.00580613,.999004,.0144457,0,.00945626,.998407,.0147489,0,.0139421,.995464,.014731,0,.0192202,.993328,.0148283,0,.0252495,.991799,.0150797,0,.0319921,.990397,.0154316,0,.0394138,.986835,.0155005,0,.0474843,.983938,.0157308,0,.0561763,.980154,.0158753,0,.0654661,.975659,.0159581,0,.0753326,.970171,.0159832,0,.0857571,.964803,.0160084,0,.0967236,.958366,.0159484,0,.108218,.950613,.0158001,0,.120227,.942874,.0155845,0,.132741,.935005,.0154292,0,.145751,.924991,.0150742,0,.159249,.914814,.0146757,0,.17323,.904743,.0143097,0,.187687,.893216,.0138695,0,.202619,.880769,.0133706,0,.218021,.868136,.0128606,0,.233894,.85469,.0123403,0,.250238,.840593,.0118091,0,.267052,.825808,.011253,0,.284341,.81009,.0107099,0,.302106,.79504,.0101636,0,.320354,.779757,.00964041,0,.33909,.764697,.00911896,0,.358322,.750913,.00859533,0,.378059,.738175,.00811592,0,.398311,.725242,.00764504,0,.41909,.711864,.00718885,0,.440412,.698009,.00675843,0,.462292,.683841,.00634984,0,.484748,.669391,.00595502,0,.507802,.654731,.00558671,0,.531477,.639805,.00523578,0,.555802,.624789,.00490834,0,.580805,.609325,.00459448,0,.606522,.593975,.00430342,0,.63299,.578983,.00403019,0,.66025,.564442,.0037707,0,.688346,.549835,.0035316,0,.717319,.535039,.00330255,0,.7472,.520403,.00308932,0,.777982,.505687,.00289335,0,.809524,.490939,.00270818,0,.84127,.476233,.0025343,0,.873016,.461624,.00237097,0,.904762,.447833,.00222065,0,.936508,.433992,.00207561,0,.968254,.420147,.00194955,0,1,1,.0173415,0,0,1,.0173416,0,0,.999999,.0173426,0,0,.999995,.0173468,0,0,.999983,.0173582,0,0,.999954,.0173822,0,0,.999908,.0174258,0,669501e-11,.999828,.0174973,0,427399e-9,.999705,.0176063,0,.00171019,.999524,.0177631,0,.0039248,.999263,.0179781,0,.00705382,.998878,.018258,0,.0110552,.998012,.0185551,0,.0158812,.994614,.0184264,0,.0214852,.993132,.0186385,0,.0278239,.991563,.0189067,0,.0348585,.989298,.0191577,0,.0425544,.986036,.0192522,0,.050881,.982558,.0194063,0,.059811,.978531,.019486,0,.0693209,.974198,.0195847,0,.0793895,.968148,.0194749,0,.0899984,.962565,.0194277,0,.101132,.956041,.0192991,0,.112775,.947749,.0189893,0,.124917,.94018,.018704,0,.137547,.93165,.0183458,0,.150655,.921798,.0178775,0,.164236,.911573,.0173618,0,.178281,.901569,.0168482,0,.192788,.890341,.016265,0,.207752,.877835,.0156199,0,.223171,.865472,.0149516,0,.239044,.852905,.0143274,0,.255371,.838906,.0136643,0,.272153,.824888,.0129903,0,.289393,.809977,.0123218,0,.307093,.794697,.0116572,0,.325259,.780028,.0110307,0,.343896,.765124,.0104236,0,.363012,.750411,.0098219,0,.382617,.737264,.00924397,0,.402719,.724799,.00868719,0,.423332,.712253,.00816476,0,.444469,.699267,.00767262,0,.466146,.685618,.00719746,0,.488383,.671736,.00673916,0,.511199,.657777,.00631937,0,.534618,.643497,.00592411,0,.558668,.62889,.00553928,0,.58338,.614299,.0051934,0,.608787,.599197,.00485985,0,.634929,.584175,.00454357,0,.661849,.569541,.00425787,0,.689594,.555193,.00397905,0,.718211,.540947,.00372364,0,.747742,.526593,.00348599,0,.778205,.512335,.00326103,0,.80953,.498017,.00305137,0,.84127,.483609,.00285485,0,.873016,.469368,.00267472,0,.904762,.455037,.00249945,0,.936508,.441493,.00234792,0,.968254,.428147,.00219936,0,1,1,.0219422,0,0,1,.0219423,0,0,.999998,.0219434,0,0,.999993,.0219481,0,0,.999981,.021961,0,0,.999949,.0219879,0,0,.999896,.0220367,0,593194e-10,.999808,.0221167,0,75364e-8,.99967,.0222383,0,.00237884,.999466,.0224125,0,.00495612,.999174,.0226495,0,.00844887,.998725,.0229525,0,.0128058,.996979,.0231123,0,.0179742,.994317,.0230742,0,.0239047,.992781,.0232895,0,.0305526,.991191,.0235734,0,.0378786,.987787,.0236152,0,.0458475,.985092,.0237994,0,.0544287,.981121,.0238553,0,.0635952,.976924,.0238706,0,.0733233,.97218,.0238704,0,.0835922,.965956,.0236598,0,.0943839,.959998,.0234735,0,.105682,.953245,.0232277,0,.117474,.944445,.0226973,0,.129747,.937087,.0223527,0,.142491,.928341,.0218144,0,.155697,.9184,.0211516,0,.169358,.907959,.0204553,0,.183469,.89808,.0197673,0,.198024,.887047,.0189915,0,.21302,.875221,.0182082,0,.228455,.86269,.0173584,0,.244329,.850735,.0165718,0,.260639,.837545,.0157524,0,.277389,.823639,.0149482,0,.29458,.809699,.0141431,0,.312216,.794797,.0133527,0,.3303,.780578,.0126193,0,.34884,.766019,.0118914,0,.367842,.751447,.0111839,0,.387315,.737275,.010514,0,.40727,.724545,.00987277,0,.427717,.712644,.00926569,0,.448671,.700432,.00869029,0,.470149,.687664,.00814691,0,.492167,.674288,.00763012,0,.514746,.660966,.00714437,0,.537911,.647264,.00668457,0,.561688,.633431,.00626581,0,.586108,.619133,.00585593,0,.611206,.604935,.00548188,0,.637022,.590236,.00513288,0,.663599,.575473,.0047906,0,.690989,.561228,.00448895,0,.719242,.547054,.00420233,0,.748411,.533175,.00392869,0,.778531,.519163,.00367445,0,.809583,.505328,.00344097,0,.84127,.491446,.00322003,0,.873016,.477356,.00301283,0,.904762,.46356,.00282592,0,.936508,.449623,.00264956,0,.968254,.436068,.00246956,0,1,1,.0276135,0,0,1,.0276136,0,0,.999998,.0276148,0,0,.999993,.0276201,0,0,.999976,.0276342,0,0,.999945,.027664,0,0,.999884,.0277179,0,18679e-8,.999784,.027806,0,.00119607,.99963,.0279394,0,.00318407,.999401,.0281295,0,.00613601,.999066,.0283858,0,.00999963,.998524,.0287027,0,.0147164,.995702,.0286256,0,.0202295,.993593,.0286733,0,.0264876,.992067,.0288989,0,.0334452,.990548,.0292135,0,.0410621,.986775,.0291296,0,.0493032,.984054,.0293099,0,.0581381,.979481,.0291881,0,.0675397,.975297,.0291598,0,.0774848,.96981,.028954,0,.0879528,.963524,.028628,0,.0989258,.957398,.0283135,0,.110388,.950088,.0278469,0,.122327,.941538,.0271798,0,.134729,.933332,.0265388,0,.147587,.924392,.0257776,0,.160889,.914581,.024916,0,.174631,.904347,.0240242,0,.188806,.894324,.0231229,0,.203409,.883724,.022153,0,.218437,.872207,.0211355,0,.233888,.859927,.0201048,0,.249761,.848373,.0191263,0,.266056,.836023,.0181306,0,.282774,.82289,.0171718,0,.299917,.809324,.0162196,0,.317488,.795361,.0152622,0,.335493,.781253,.01439,0,.353936,.767338,.013533,0,.372825,.753156,.0127244,0,.392168,.739122,.0119454,0,.411976,.725358,.0112054,0,.432259,.712949,.010487,0,.453032,.701621,.00984032,0,.47431,.689703,.00921495,0,.496111,.677216,.00862492,0,.518456,.664217,.00806882,0,.541367,.65137,.00755922,0,.564872,.638,.00705705,0,.589001,.62453,.00661266,0,.613789,.610601,.00618432,0,.639277,.59676,.00578033,0,.66551,.582433,.00540927,0,.692539,.568026,.00506104,0,.720422,.55414,.0047353,0,.749216,.540178,.00442889,0,.778974,.526513,.00414363,0,.809711,.512954,.00388237,0,.84127,.499403,.00362875,0,.873016,.486026,.00340827,0,.904762,.472345,.00318598,0,.936508,.458828,.00297635,0,.968254,.445379,.00279447,0,1,1,.0345716,0,0,1,.0345717,0,0,.999999,.034573,0,0,.999991,.0345787,0,0,.999974,.0345941,0,0,.999937,.0346263,0,188589e-11,.999869,.0346847,0,409238e-9,.999757,.0347798,0,.0017674,.999582,.0349233,0,.00413658,.999322,.0351265,0,.00747408,.998939,.0353967,0,.0117157,.998219,.0357018,0,.0167966,.994974,.0354726,0,.0226572,.993201,.0355621,0,.0292445,.991573,.0357641,0,.0365123,.989301,.0359252,0,.0444203,.985712,.0358017,0,.0529334,.982411,.0358353,0,.0620214,.977827,.035617,0,.0716574,.973278,.0354398,0,.0818186,.967397,.0350483,0,.0924846,.960696,.0344795,0,.103638,.954349,.0339861,0,.115263,.946066,.0331323,0,.127348,.938012,.032359,0,.13988,.929413,.0314413,0,.152849,.920355,.0304103,0,.166248,.910586,.0292785,0,.18007,.900609,.0281391,0,.194308,.890093,.0269103,0,.208958,.880013,.0257269,0,.224018,.869001,.0244671,0,.239485,.85751,.0232252,0,.255359,.84582,.0220117,0,.271638,.834383,.0208274,0,.288324,.822158,.0196628,0,.305419,.809056,.0185306,0,.322927,.795832,.0174174,0,.340851,.782547,.0163758,0,.359199,.7689,.015391,0,.377975,.755526,.0144488,0,.397189,.741681,.0135372,0,.416851,.728178,.0126957,0,.436971,.714642,.0118812,0,.457564,.702756,.0111165,0,.478644,.69175,.0104145,0,.500229,.680159,.00974439,0,.522339,.668073,.00911926,0,.544997,.655405,.00851393,0,.56823,.642921,.00797637,0,.592068,.629993,.00745119,0,.616546,.616828,.00696972,0,.641705,.603305,.00652425,0,.66759,.589833,.00610188,0,.694255,.575945,.00570834,0,.72176,.561745,.00533384,0,.750168,.548277,.00500001,0,.779545,.534467,.00467582,0,.809933,.521032,.00438092,0,.841272,.507877,.00410348,0,.873016,.494654,.00383618,0,.904762,.481592,.00358699,0,.936508,.468509,.00337281,0,.968254,.455293,.00316196,0,1,1,.0430698,0,0,1,.0430699,0,0,.999998,.0430713,0,0,.999991,.0430773,0,0,.99997,.0430936,0,0,.999928,.0431277,0,406396e-10,.999852,.0431893,0,744376e-9,.999724,.0432895,0,.0024806,.999527,.0434397,0,.00524779,.99923,.0436507,0,.00898164,.998783,.0439255,0,.0136083,.997507,.0441104,0,.0190582,.994418,.0438225,0,.0252694,.992864,.0439396,0,.0321879,.991127,.0440962,0,.039767,.987331,.0438408,0,.0479667,.984819,.0438991,0,.056752,.980384,.0435906,0,.0660929,.975846,.0432543,0,.075963,.970748,.0428293,0,.0863398,.964303,.042153,0,.0972035,.95772,.0414111,0,.108537,.950747,.0405893,0,.120325,.942533,.0394887,0,.132554,.934045,.0383544,0,.145215,.924942,.037057,0,.158296,.915811,.0356993,0,.17179,.90612,.0342401,0,.185691,.896434,.0328078,0,.199993,.886021,.031288,0,.214691,.876081,.0297776,0,.229782,.865608,.0282334,0,.245265,.854924,.026749,0,.261138,.843607,.02526,0,.277401,.832456,.0238214,0,.294056,.821342,.0224682,0,.311104,.809303,.0211297,0,.328548,.796468,.0198387,0,.346394,.784046,.0186227,0,.364645,.771262,.0174561,0,.38331,.758118,.0163806,0,.402396,.745075,.0153287,0,.421912,.731926,.0143647,0,.44187,.71863,.0134363,0,.462283,.705414,.0125603,0,.483165,.693792,.0117508,0,.504535,.683108,.0110016,0,.52641,.67183,.0102757,0,.548816,.66015,.00962044,0,.571776,.647907,.00898031,0,.595323,.635734,.00840811,0,.619489,.623208,.00786211,0,.644317,.610438,.00734953,0,.669852,.597345,.00687688,0,.696148,.584138,.00643469,0,.723267,.5707,.00602236,0,.75128,.556966,.0056324,0,.780258,.543607,.00528277,0,.810268,.530213,.00493999,0,.841311,.516912,.00462265,0,.873016,.503916,.0043307,0,.904762,.491146,.00406858,0,.936508,.478439,.00381436,0,.968254,.465834,.00358003,0,1,1,.0534039,0,0,1,.053404,0,0,.999998,.0534055,0,0,.999989,.0534116,0,0,.999968,.0534283,0,0,.999918,.0534633,0,155895e-9,.99983,.0535262,0,.00120914,.999685,.0536281,0,.00334944,.999461,.0537799,0,.00653077,.999119,.0539902,0,.0106718,.998582,.0542524,0,.0156907,.995919,.0540318,0,.0215147,.993735,.0538914,0,.0280801,.992126,.0539557,0,.0353323,.990266,.0540401,0,.0432247,.986317,.0536064,0,.0517172,.983213,.0534425,0,.0607754,.978303,.0528622,0,.0703698,.973665,.0523363,0,.0804742,.968091,.0516165,0,.0910667,.961026,.0505434,0,.102128,.954333,.049523,0,.113641,.946372,.0481698,0,.125591,.938254,.0467674,0,.137965,.929516,.0452341,0,.150754,.920106,.0435083,0,.163947,.910899,.0417399,0,.177537,.901532,.0399389,0,.191516,.891919,.0380901,0,.205881,.882006,.0362341,0,.220626,.871965,.0343444,0,.235749,.862145,.0324832,0,.251248,.852058,.0306681,0,.267121,.84161,.0289097,0,.283368,.830806,.0272079,0,.299992,.820476,.0256089,0,.316992,.809514,.0240394,0,.334374,.797865,.0225379,0,.35214,.785621,.0211235,0,.370296,.773765,.0197908,0,.388849,.761629,.0185235,0,.407807,.748891,.0173358,0,.427178,.736437,.0162305,0,.446974,.723707,.0151778,0,.467207,.710606,.0141791,0,.487892,.698019,.0132592,0,.509046,.686203,.0123887,0,.530687,.675692,.0115976,0,.552839,.664826,.0108325,0,.575527,.65349,.0101348,0,.59878,.641774,.00947756,0,.622634,.629794,.00886058,0,.647128,.617647,.00828526,0,.672308,.60534,.00775312,0,.698231,.592718,.00726033,0,.724958,.579746,.00679731,0,.752563,.566763,.00636111,0,.781127,.553515,.00595228,0,.810733,.540118,.00556876,0,.841426,.527325,.00523051,0,.873016,.514265,.00490712,0,.904762,.501406,.00460297,0,.936508,.488922,.00431247,0,.968254,.476541,.0040472,0,1,1,.0659184,0,0,1,.0659185,0,0,.999998,.06592,0,0,.999988,.0659259,0,0,.999963,.0659423,0,0,.999907,.0659764,0,374198e-9,.999806,.0660376,0,.00182071,.999639,.0661361,0,.0043894,.999378,.0662814,0,.00800055,.998985,.0664779,0,.0125594,.998285,.0666914,0,.0179786,.995071,.0661989,0,.0241822,.993172,.0660454,0,.031106,.991438,.0660105,0,.0386952,.988428,.0656875,0,.0469032,.985218,.0652913,0,.0556905,.981128,.0647107,0,.065023,.976015,.0638491,0,.0748717,.97097,.062993,0,.0852112,.964582,.0617927,0,.0960199,.957383,.0603626,0,.107279,.949969,.0588128,0,.118971,.941843,.0570274,0,.131084,.933624,.0551885,0,.143604,.924543,.053122,0,.156521,.914919,.0508897,0,.169825,.905773,.0486418,0,.18351,.896434,.0463364,0,.197569,.887195,.0440623,0,.211997,.877706,.0417799,0,.226789,.867719,.03945,0,.241944,.858587,.037243,0,.257458,.849317,.0350956,0,.273331,.839585,.0329852,0,.289563,.829856,.0310028,0,.306154,.819589,.0290953,0,.323108,.809714,.0272738,0,.340426,.79934,.0255631,0,.358113,.788224,.0239175,0,.376175,.776619,.0223831,0,.394616,.76521,.0209298,0,.413445,.753716,.0195786,0,.432671,.741564,.0183001,0,.452305,.729413,.0171259,0,.472358,.717146,.0159933,0,.492845,.70436,.0149495,0,.513783,.69219,.0139681,0,.535189,.680289,.0130577,0,.557087,.669611,.0122198,0,.5795,.659113,.0114174,0,.602459,.648148,.0106729,0,.625997,.636905,.00998997,0,.650154,.625154,.00934313,0,.674976,.613481,.00874839,0,.700518,.60154,.00818265,0,.726845,.58943,.00766889,0,.754032,.576828,.00717153,0,.782167,.564194,.00672696,0,.811344,.551501,.00630863,0,.841644,.538635,.00592177,0,.873016,.525724,.00554888,0,.904762,.513209,.00520225,0,.936508,.500457,.00488231,0,.968254,.48799,.00457153,0,1,1,.0810131,0,0,1,.0810133,0,0,.999997,.0810145,0,0,.999985,.08102,0,0,.999956,.0810347,0,195026e-10,.999893,.0810656,0,719316e-9,.999777,.0811205,0,.00259774,.999583,.081208,0,.00561807,.999281,.0813343,0,.00967472,.998813,.0814969,0,.0146627,.997597,.0815217,0,.0204902,.994379,.0808502,0,.0270802,.992744,.0806792,0,.0343674,.990745,.0804589,0,.0422974,.986646,.0796107,0,.0508242,.983611,.0790913,0,.0599087,.978869,.0780746,0,.0695175,.973475,.0768218,0,.0796223,.967845,.0754926,0,.0901983,.960778,.0737063,0,.101224,.953333,.0718052,0,.112682,.945274,.0695946,0,.124555,.936955,.0672492,0,.136831,.928319,.0647732,0,.149496,.919075,.0620947,0,.162542,.909114,.0591816,0,.175958,.900137,.0563917,0,.189739,.891069,.0535392,0,.203877,.882262,.0507642,0,.218368,.873232,.0479793,0,.233208,.864042,.045226,0,.248393,.855002,.0425413,0,.263923,.846569,.0400126,0,.279796,.837714,.0375269,0,.296012,.828918,.0352027,0,.312573,.819783,.0330011,0,.329479,.810129,.0308908,0,.346734,.800866,.0289112,0,.364342,.79093,.0270255,0,.382307,.780593,.0252758,0,.400637,.769511,.0236178,0,.419337,.758558,.0220652,0,.438418,.747632,.0206289,0,.457889,.736146,.0192873,0,.477761,.724093,.0180333,0,.49805,.71234,.0168264,0,.51877,.700201,.015746,0,.53994,.687949,.0147027,0,.561581,.676163,.0137512,0,.583718,.665001,.0128655,0,.60638,.65472,.0120366,0,.629599,.644213,.0112604,0,.653415,.633382,.0105413,0,.677874,.62212,.00986498,0,.70303,.610631,.00923308,0,.728948,.599078,.00864206,0,.755706,.587519,.00811784,0,.783396,.575505,.00761237,0,.812121,.563148,.00713949,0,.841989,.550828,.00668379,0,.873035,.538458,.00627715,0,.904762,.525905,.00588336,0,.936508,.513517,.00552687,0,.968254,.501395,.00519681,0,1,1,.0991506,0,0,1,.0991504,0,0,.999996,.0991515,0,0,.999984,.0991558,0,0,.999947,.0991672,0,114389e-9,.999874,.0991912,0,.00121503,.999739,.0992331,0,.00356108,.999514,.0992983,0,.00705578,.999159,.0993877,0,.011574,.998586,.0994837,0,.017003,.995731,.0988425,0,.0232484,.993384,.098276,0,.0302318,.991615,.0979269,0,.0378884,.989029,.0973432,0,.0461641,.985373,.0963539,0,.0550136,.981278,.0952306,0,.0643988,.975777,.0936233,0,.0742868,.970526,.0920219,0,.0846501,.963755,.0898912,0,.0954644,.956676,.0876064,0,.106709,.948099,.0847751,0,.118367,.939718,.0818638,0,.130423,.931305,.078857,0,.142862,.922342,.0756127,0,.155674,.912842,.0721473,0,.168849,.903304,.0686195,0,.182378,.89411,.0650589,0,.196255,.885512,.0616022,0,.210473,.877193,.0582434,0,.225027,.86877,.0548979,0,.239915,.860267,.0516095,0,.255132,.851915,.048468,0,.270678,.843912,.0454447,0,.286551,.83604,.0425612,0,.302751,.828245,.0398752,0,.31928,.820159,.0373198,0,.336138,.81167,.034916,0,.35333,.802659,.0326402,0,.370858,.793921,.0304901,0,.388728,.784713,.0284857,0,.406944,.774946,.0266186,0,.425515,.76448,.0248593,0,.444449,.753793,.0232114,0,.463756,.743506,.0217039,0,.483447,.732555,.0202841,0,.503535,.720965,.0189648,0,.524036,.709422,.0177189,0,.544968,.697756,.0165626,0,.56635,.685565,.015483,0,.588208,.673987,.0144892,0,.610569,.66244,.0135607,0,.633466,.651675,.0126956,0,.656936,.641598,.0118788,0,.681025,.63121,.0111261,0,.705788,.620514,.010437,0,.731289,.609366,.00978747,0,.757606,.598137,.00917257,0,.784834,.586966,.00859778,0,.813085,.575549,.00806803,0,.842485,.563797,.00757294,0,.87313,.551758,.00710592,0,.904762,.539894,.0066841,0,.936508,.527901,.00627901,0,.968254,.515819,.00590506,0,1,1,.120864,0,0,1,.120864,0,0,.999996,.120864,0,0,.99998,.120867,0,0,.99994,.120872,0,323781e-9,.999852,.120884,0,.00188693,.999693,.120903,0,.00473489,.999426,.120929,0,.00872704,.999002,.120955,0,.0137237,.998235,.120918,0,.0196068,.994608,.119764,0,.0262803,.992997,.119265,0,.0336657,.990968,.11863,0,.0416987,.987002,.117261,0,.0503261,.983524,.116009,0,.0595035,.97875,.114252,0,.0691935,.972652,.11193,0,.0793645,.966613,.109555,0,.0899894,.959275,.106612,0,.101045,.951272,.103375,0,.112512,.942323,.0996594,0,.124372,.933679,.0958841,0,.136611,.924822,.0919265,0,.149216,.915742,.0878061,0,.162176,.906348,.0834894,0,.175482,.896883,.079085,0,.189125,.88774,.0746745,0,.203098,.87986,.0705773,0,.217396,.871998,.0665005,0,.232015,.864325,.0625413,0,.24695,.856685,.0586781,0,.2622,.84925,.0550063,0,.277761,.841719,.0514727,0,.293634,.834755,.0481398,0,.309819,.827853,.0450172,0,.326315,.820888,.0420969,0,.343126,.813616,.0393702,0,.360254,.805767,.0367771,0,.377701,.797338,.0343274,0,.395474,.789122,.0320529,0,.413577,.780601,.0299485,0,.432018,.771424,.0279812,0,.450804,.761502,.0261054,0,.469944,.751166,.0243942,0,.489451,.741276,.0228087,0,.509337,.730898,.0213265,0,.529617,.719878,.0199307,0,.550307,.708379,.0186574,0,.571428,.697165,.0174446,0,.593003,.685554,.0163144,0,.615059,.673631,.015276,0,.637628,.662385,.0143003,0,.660746,.651059,.0134112,0,.68446,.640451,.0125794,0,.70882,.630536,.011793,0,.733893,.620316,.0110547,0,.759756,.609722,.0103668,0,.786505,.598804,.00973009,0,.814259,.587871,.00912812,0,.843157,.577121,.00858916,0,.87334,.566019,.00807333,0,.904762,.554664,.00759687,0,.936508,.543101,.00714759,0,.968254,.531558,.00673418,0,1,1,.146767,0,0,1,.146767,0,0,.999997,.146767,0,0,.999977,.146765,0,320658e-11,.999929,.146762,0,682576e-9,.999823,.146753,0,.00276402,.999633,.146735,0,.00614771,.999314,.146699,0,.0106613,.998796,.14662,0,.0161546,.997124,.146107,0,.0225063,.994062,.144857,0,.0296198,.992154,.144011,0,.037417,.989186,.142712,0,.0458348,.985279,.140926,0,.0548211,.980826,.13885,0,.0643326,.975056,.136168,0,.074333,.969005,.133217,0,.0847917,.961554,.12959,0,.0956828,.954206,.125886,0,.106984,.945046,.121335,0,.118675,.935678,.116492,0,.130741,.926748,.111635,0,.143166,.917764,.106625,0,.155939,.908358,.101325,0,.169049,.899219,.0960249,0,.182487,.890089,.0906527,0,.196245,.881488,.0853905,0,.210317,.874031,.0804177,0,.224697,.866932,.0756005,0,.23938,.859976,.0709019,0,.254364,.853375,.0664391,0,.269646,.846971,.0622012,0,.285223,.840483,.058129,0,.301096,.833969,.0542762,0,.317265,.82806,.0507042,0,.333729,.822128,.047368,0,.350491,.815989,.044272,0,.367554,.809336,.0413444,0,.38492,.802177,.038601,0,.402594,.79441,.0360227,0,.420582,.786573,.0336383,0,.438891,.778619,.0314321,0,.457527,.77,.029362,0,.476499,.760698,.0274102,0,.49582,.750932,.0256146,0,.5155,.740993,.023974,0,.535555,.731159,.0224182,0,.556,.720836,.0209889,0,.576855,.709913,.0196411,0,.598143,.698415,.0183824,0,.619888,.68745,.0172222,0,.642123,.676154,.0161509,0,.664883,.664383,.0151397,0,.688211,.6533,.0141873,0,.71216,.642072,.0133105,0,.736792,.631412,.0124932,0,.762186,.621622,.0117408,0,.788439,.611681,.0110358,0,.815672,.60142,.0103775,0,.844034,.59083,.00975623,0,.873699,.580254,.00918084,0,.904765,.569841,.00864721,0,.936508,.559224,.00815731,0,.968254,.548315,.00767924,0,1,1,.177563,0,0,1,.177563,0,0,.999994,.177562,0,0,.999972,.177555,0,664171e-10,.999914,.177536,0,.0012276,.999787,.177496,0,.00388025,.999556,.17742,0,.00783463,.999165,.177285,0,.0128953,.9985,.177037,0,.0189053,.995388,.175634,0,.025742,.993102,.174375,0,.033309,.990992,.173121,0,.0415298,.986932,.170896,0,.0503425,.982786,.16847,0,.0596964,.977592,.165455,0,.0695498,.971075,.161676,0,.0798676,.963967,.157458,0,.0906201,.956397,.152836,0,.101783,.947489,.147467,0,.113333,.937564,.14145,0,.125254,.928182,.135383,0,.137529,.919027,.129212,0,.150144,.909618,.12276,0,.163088,.900492,.116273,0,.176351,.891671,.1098,0,.189924,.883146,.103362,0,.203799,.875151,.0970799,0,.21797,.868338,.0911732,0,.232433,.862033,.0854966,0,.247182,.856107,.0800691,0,.262216,.850644,.0749618,0,.27753,.845261,.070079,0,.293124,.839885,.0654321,0,.308997,.834609,.0610975,0,.325149,.829083,.0569741,0,.341581,.82404,.0531736,0,.358294,.818968,.049665,0,.37529,.813496,.0463856,0,.392573,.807533,.0433217,0,.410148,.80099,.0404402,0,.428019,.793891,.0377578,0,.446192,.786281,.0352616,0,.464676,.778773,.0329577,0,.483478,.770737,.030808,0,.502608,.762094,.0287964,0,.522079,.752898,.0269254,0,.541905,.743306,.0251926,0,.5621,.733416,.023595,0,.582684,.723742,.0221155,0,.603677,.713542,.0207435,0,.625106,.702755,.019434,0,.646998,.691484,.0182046,0,.66939,.680531,.0170771,0,.692324,.66953,.0160339,0,.715849,.658126,.0150677,0,.740028,.646933,.0141551,0,.764937,.636107,.0133179,0,.790673,.625271,.0125284,0,.817358,.615225,.0117937,0,.84515,.605678,.0111181,0,.874244,.59583,.0104759,0,.904828,.585704,.00986672,0,.936508,.575413,.00929712,0,.968254,.565373,.00876713,0,1,1,.214058,0,0,.999999,.214058,0,0,.999994,.214055,0,0,.999966,.214039,0,259642e-9,.999893,.213998,0,.00200075,.999737,.21391,0,.00527775,.999449,.213745,0,.00983959,.99896,.213458,0,.0154755,.9979,.212855,0,.0220249,.994278,.210779,0,.0293654,.992254,.20926,0,.0374021,.98881,.206908,0,.0460604,.984715,.204009,0,.0552802,.979738,.200471,0,.0650127,.972884,.195813,0,.0752175,.965996,.190856,0,.0858612,.957974,.185077,0,.0969155,.949155,.17868,0,.108356,.939288,.171513,0,.120163,.928996,.163838,0,.132319,.919563,.156246,0,.144808,.910004,.148359,0,.157618,.900791,.140417,0,.170737,.892135,.132569,0,.184155,.883803,.124741,0,.197866,.876034,.117091,0,.211861,.869219,.109835,0,.226134,.863062,.102859,0,.240682,.857795,.0962928,0,.255499,.853009,.0900725,0,.270583,.848603,.0842101,0,.285931,.844335,.0786527,0,.301542,.840208,.0734397,0,.317415,.836035,.0685334,0,.33355,.83172,.0639275,0,.349948,.827135,.0595909,0,.36661,.822797,.0556204,0,.383539,.818387,.0519394,0,.400738,.813565,.0485317,0,.41821,.808142,.0453138,0,.435961,.802212,.0423354,0,.453997,.79573,.0395553,0,.472324,.788741,.036988,0,.490951,.781093,.0345688,0,.509887,.773597,.0323297,0,.529144,.765622,.0302719,0,.548735,.757083,.0283477,0,.568674,.747992,.0265562,0,.588979,.738591,.0248844,0,.609671,.728719,.0233342,0,.630773,.719146,.0219081,0,.652314,.709165,.0205711,0,.674328,.69875,.0193248,0,.696854,.687884,.0181582,0,.719942,.676818,.0170746,0,.743651,.666247,.0160718,0,.768057,.655284,.0151262,0,.793253,.64401,.0142561,0,.819363,.633353,.0134327,0,.846547,.622674,.012653,0,.875017,.612265,.0119354,0,.905021,.602455,.0112533,0,.936508,.593147,.0106234,0,.968254,.583592,.0100213,0,1,1,.25717,0,0,1,.25717,0,0,.999992,.257164,0,0,.999958,.257135,0,641715e-9,.999864,.25706,0,.00305314,.999666,.256897,0,.00700975,.999302,.256596,0,.0122194,.998663,.25607,0,.0184622,.995607,.254123,0,.0255773,.993094,.252081,0,.0334439,.9907,.249867,0,.0419696,.98594,.246118,0,.0510823,.981214,.242049,0,.0607242,.974966,.236869,0,.0708486,.967589,.230724,0,.081417,.95915,.223635,0,.0923974,.950257,.21596,0,.103763,.940165,.207296,0,.115491,.929396,.197901,0,.127562,.919288,.188437,0,.13996,.909428,.178762,0,.15267,.900105,.169072,0,.165679,.891418,.159478,0,.178979,.883347,.15002,0,.192558,.875992,.140813,0,.20641,.869466,.13196,0,.220529,.863699,.123501,0,.234907,.858553,.115436,0,.249542,.854379,.107901,0,.264428,.850894,.10088,0,.279564,.847632,.0942296,0,.294947,.844571,.0879861,0,.310575,.84163,.0821534,0,.326448,.838542,.0766409,0,.342566,.835412,.0715322,0,.358929,.831899,.0666883,0,.37554,.828177,.0622175,0,.392399,.82416,.0580452,0,.409511,.820393,.054267,0,.426878,.816068,.0507172,0,.444506,.811201,.0474041,0,.4624,.805785,.0443174,0,.480566,.799878,.0414562,0,.499013,.793469,.0388147,0,.517749,.786473,.0363453,0,.536785,.778874,.0340225,0,.556134,.771277,.0318599,0,.575809,.763426,.0298859,0,.595827,.755044,.0280357,0,.616207,.746161,.0262979,0,.636973,.737124,.0247295,0,.65815,.72761,.0232514,0,.679772,.717822,.0218755,0,.701876,.708279,.0205942,0,.724509,.698333,.0193947,0,.74773,.68802,.0182717,0,.771609,.677321,.0172044,0,.79624,.666504,.0162122,0,.821743,.656184,.0152924,0,.84828,.64556,.0144326,0,.876069,.634636,.0136157,0,.905404,.624124,.0128612,0,.936508,.613914,.0121435,0,.968254,.603589,.0114887,0,1,1,.307946,0,0,.999999,.307945,0,0,.999988,.307934,0,204479e-10,.999944,.307886,0,.00127833,.999824,.307756,0,.00445047,.999565,.30748,0,.00914673,.999085,.306966,0,.0150498,.998103,.306004,0,.0219367,.994249,.303028,0,.0296485,.991807,.300435,0,.038068,.987773,.296554,0,.0471062,.982673,.2916,0,.0566942,.976623,.285641,0,.0667768,.968757,.27815,0,.0773099,.959849,.269529,0,.088257,.950663,.260248,0,.0995879,.940129,.249704,0,.111277,.92895,.238291,0,.123304,.917996,.226501,0,.13565,.907813,.214669,0,.148299,.898305,.202835,0,.161237,.889626,.191158,0,.174455,.88175,.179695,0,.187941,.874715,.168548,0,.201687,.868746,.15792,0,.215687,.863703,.147807,0,.229933,.859315,.138149,0,.24442,.855538,.128993,0,.259145,.852428,.120414,0,.274103,.850168,.112498,0,.289293,.848132,.105054,0,.304711,.846291,.0981087,0,.320357,.844431,.0915942,0,.33623,.842493,.0855056,0,.35233,.840368,.0798204,0,.368658,.83798,.0745097,0,.385214,.83523,.0695424,0,.402002,.832091,.0649092,0,.419023,.828667,.0606291,0,.436282,.824805,.0566523,0,.453782,.820988,.0530229,0,.471529,.816635,.0496364,0,.489528,.811725,.0464658,0,.507788,.806316,.0435082,0,.526317,.800469,.0407873,0,.545124,.794107,.038255,0,.564221,.787218,.0358825,0,.583621,.779872,.0336785,0,.603341,.772097,.0316379,0,.623397,.764484,.0297379,0,.643812,.756428,.0279581,0,.664611,.748022,.0263153,0,.685824,.739268,.0247799,0,.707488,.73024,.0233385,0,.729646,.720893,.0220035,0,.752354,.71119,.0207555,0,.77568,.701791,.0195843,0,.799715,.692184,.0184891,0,.824574,.682258,.0174541,0,.850417,.67206,.0164873,0,.877466,.661717,.0155959,0,.90604,.651462,.0147519,0,.936528,.641467,.0139727,0,.968254,.631229,.0132363,0,1,1,.367573,0,0,.999999,.367571,0,0,.999984,.367553,0,183382e-9,.999925,.367473,0,.00225254,.999759,.367259,0,.00628165,.99941,.366801,0,.0117858,.998739,.365946,0,.0184359,.995529,.363191,0,.0260114,.992875,.360171,0,.0343581,.989135,.355981,0,.0433637,.984166,.350401,0,.0529438,.977871,.343348,0,.0630334,.96951,.334341,0,.0735805,.959964,.323862,0,.0845437,.950162,.312521,0,.095889,.938882,.299577,0,.107588,.926992,.285573,0,.119617,.915589,.271212,0,.131957,.904791,.256611,0,.144591,.895177,.242224,0,.157503,.886403,.227952,0,.170682,.878957,.214192,0,.184117,.872418,.200795,0,.197799,.867029,.188015,0,.21172,.862835,.175975,0,.225873,.859411,.164526,0,.240253,.856655,.153693,0,.254854,.854519,.14352,0,.269673,.852828,.13397,0,.284707,.851412,.124984,0,.299953,.850609,.116748,0,.315408,.849855,.10905,0,.331073,.849017,.101839,0,.346946,.848079,.0951359,0,.363028,.846911,.0888774,0,.379318,.845445,.0830375,0,.395818,.84362,.0775844,0,.41253,.841411,.0725054,0,.429457,.838768,.0677691,0,.446602,.835801,.0634016,0,.463968,.832341,.0593095,0,.481561,.828424,.0555121,0,.499386,.824312,.052024,0,.51745,.819918,.0487865,0,.535761,.815072,.0457801,0,.554328,.809863,.0430184,0,.573162,.804164,.0404245,0,.592275,.798034,.0380146,0,.611681,.791436,.0357436,0,.631398,.784498,.0336475,0,.651445,.777125,.0316666,0,.671845,.769365,.0298122,0,.692628,.761579,.0281001,0,.713827,.753746,.0265049,0,.735484,.745573,.0250067,0,.75765,.737083,.0236026,0,.78039,.728545,.0223302,0,.803789,.719691,.0211243,0,.82796,.710569,.0199983,0,.853056,.701216,.0189569,0,.879298,.692094,.0179702,0,.907014,.682909,.0170418,0,.936691,.673509,.0161732,0,.968254,.663863,.0153406,0,1,1,.437395,0,0,.999998,.437394,0,0,.99998,.437363,0,616704e-9,.999891,.437232,0,.00367925,.999656,.436877,0,.00867446,.999148,.436121,0,.0150679,.997959,.434564,0,.022531,.993464,.430134,0,.0308507,.990606,.426077,0,.0398805,.985027,.419397,0,.0495148,.978491,.41118,0,.0596749,.969643,.40048,0,.0703001,.959189,.38769,0,.0813427,.948223,.373575,0,.0927641,.935955,.357622,0,.104533,.923237,.34043,0,.116624,.911074,.322735,0,.129015,.899724,.30479,0,.141687,.890189,.287392,0,.154626,.881796,.270248,0,.167818,.874781,.253659,0,.181252,.869166,.237786,0,.194918,.864725,.222618,0,.208807,.861565,.208356,0,.222913,.859284,.194867,0,.237229,.857677,.18212,0,.25175,.856714,.17018,0,.266473,.856155,.158969,0,.281392,.8558,.148413,0,.296505,.855672,.138578,0,.311811,.855538,.129345,0,.327306,.855689,.120861,0,.342991,.855767,.112969,0,.358864,.855618,.105593,0,.374925,.85525,.0987451,0,.391176,.854583,.0923727,0,.407616,.853534,.0864143,0,.424249,.852061,.0808338,0,.441076,.850253,.0756771,0,.4581,.848004,.0708612,0,.475324,.845333,.0663784,0,.492754,.842376,.0622631,0,.510394,.838956,.0584112,0,.528251,.835121,.0548328,0,.546331,.830842,.0514838,0,.564644,.826212,.048355,0,.583198,.821522,.0454714,0,.602005,.816551,.0428263,0,.621078,.811211,.0403612,0,.640434,.805479,.038039,0,.660089,.799409,.0358739,0,.680066,.79306,.0338727,0,.70039,.786395,.0319985,0,.721094,.779416,.030241,0,.742215,.77214,.0285951,0,.7638,.764636,.0270747,0,.785912,.756836,.0256354,0,.808628,.749315,.0243027,0,.832055,.741561,.0230497,0,.856338,.733589,.0218801,0,.88169,.725479,.020784,0,.908441,.717255,.0197702,0,.937125,.708829,.0188168,0,.968254,.700191,.0179113,0,1,1,.518937,0,0,.999998,.518933,0,0,.999967,.518883,0,.00147741,.999832,.51866,0,.00573221,.999466,.518057,0,.011826,.998644,.516752,0,.0192116,.994458,.512347,0,.027573,.991223,.507675,0,.0367099,.985515,.500188,0,.046487,.978308,.490408,0,.0568071,.968359,.477357,0,.0675984,.95682,.461752,0,.0788059,.943929,.443796,0,.090386,.930224,.423893,0,.102304,.916514,.402682,0,.114532,.903653,.380914,0,.127047,.892315,.359212,0,.139828,.882942,.338102,0,.152861,.875438,.31773,0,.16613,.869642,.298186,0,.179624,.865304,.279491,0,.193332,.862382,.261804,0,.207247,.860666,.245146,0,.22136,.859788,.229406,0,.235666,.859608,.214605,0,.250158,.859912,.200691,0,.264832,.86053,.187623,0,.279684,.861368,.17539,0,.294711,.862237,.163901,0,.309911,.863127,.153175,0,.32528,.863923,.143147,0,.340819,.864567,.133781,0,.356524,.865013,.125042,0,.372397,.86539,.116952,0,.388438,.865591,.109476,0,.404645,.865517,.102542,0,.421022,.865084,.0960688,0,.437569,.864309,.0900499,0,.454287,.863151,.0844328,0,.471181,.861649,.0792218,0,.488253,.859742,.0743482,0,.505507,.857446,.0697963,0,.522947,.854757,.0655364,0,.54058,.851783,.061608,0,.558412,.848516,.0579701,0,.576449,.844897,.0545742,0,.594701,.840956,.0514167,0,.613178,.836676,.0484598,0,.631892,.832075,.0456934,0,.650856,.827191,.0431178,0,.670088,.822295,.0407718,0,.689606,.817294,.0386032,0,.709434,.812013,.0365675,0,.7296,.806465,.0346547,0,.750138,.800691,.0328717,0,.771093,.794709,.031211,0,.792519,.788493,.0296504,0,.814488,.782049,.0281782,0,.837097,.775403,.0267965,0,.860481,.76857,.0255002,0,.884842,.761536,.0242759,0,.910494,.754303,.0231142,0,.937985,.74692,.0220305,0,.968254,.739745,.0210192,0,1,1,.613914,0,0,.999996,.613907,0,963597e-10,.999942,.613814,0,.00301247,.999704,.613407,0,.00870385,.999046,.612302,0,.0160714,.995516,.608266,0,.0245899,.991726,.602863,0,.0339681,.985157,.593956,0,.0440254,.97642,.581748,0,.0546409,.964404,.565183,0,.0657284,.950601,.545273,0,.0772246,.935158,.522129,0,.0890812,.919364,.496782,0,.10126,.904754,.470571,0,.113731,.89176,.444037,0,.126469,.881492,.418322,0,.139454,.873656,.393522,0,.15267,.868053,.369795,0,.166101,.864336,.347171,0,.179736,.862259,.325737,0,.193565,.861556,.305532,0,.207578,.861776,.286416,0,.221769,.862661,.268355,0,.23613,.864015,.251334,0,.250656,.865711,.235352,0,.265343,.867519,.220302,0,.280187,.869351,.206161,0,.295183,.871144,.192908,0,.31033,.872839,.180505,0,.325624,.874307,.168848,0,.341065,.875667,.158021,0,.35665,.876758,.147877,0,.37238,.87764,.138441,0,.388253,.878237,.129627,0,.404269,.878563,.121415,0,.42043,.878572,.113741,0,.436735,.87842,.106652,0,.453187,.878057,.100097,0,.469786,.877413,.0940128,0,.486536,.87646,.0883462,0,.503439,.875233,.0830924,0,.520498,.8737,.0781975,0,.537717,.871873,.07364,0,.555102,.86978,.0694103,0,.572657,.867405,.0654696,0,.59039,.864751,.0617914,0,.608307,.861818,.0583491,0,.626419,.858645,.0551443,0,.644733,.855307,.0521894,0,.663264,.851736,.0494334,0,.682025,.847927,.0468504,0,.701032,.843888,.0444261,0,.720308,.839629,.0421497,0,.739875,.835158,.0400082,0,.759764,.830509,.0380076,0,.780014,.825714,.0361488,0,.800673,.820729,.0343956,0,.821803,.815751,.0327781,0,.843492,.810752,.031275,0,.86586,.805587,.0298542,0,.889087,.800317,.0285397,0,.913466,.79489,.0272948,0,.93952,.789314,.0261139,0,.96835,.783593,.0249938,0,1,1,.724258,0,0,.999992,.724243,0,726889e-9,.99987,.724044,0,.00569574,.999336,.72317,0,.0131702,.996271,.719432,0,.0220738,.991159,.712576,0,.0319405,.982465,.700927,0,.0425202,.97049,.684297,0,.0536599,.953973,.661244,0,.065258,.935546,.633804,0,.0772427,.916596,.603071,0,.0895616,.899353,.57105,0,.102175,.885216,.539206,0,.11505,.875076,.508714,0,.128164,.868334,.479571,0,.141495,.864414,.451796,0,.155026,.862678,.425328,0,.168745,.862835,.400352,0,.182639,.864067,.376532,0,.196699,.866086,.35391,0,.210915,.868557,.332424,0,.225282,.871271,.312053,0,.239792,.874058,.292764,0,.25444,.8768,.27453,0,.269223,.87939,.257297,0,.284135,.8819,.24114,0,.299174,.884187,.225934,0,.314337,.886262,.211669,0,.329622,.888119,.198311,0,.345026,.889709,.185783,0,.360549,.891054,.174063,0,.376189,.892196,.163143,0,.391946,.893101,.152952,0,.407819,.893803,.143475,0,.423808,.894277,.134647,0,.439914,.894532,.126434,0,.456137,.894576,.1188,0,.472479,.894393,.111694,0,.48894,.893976,.105069,0,.505523,.893346,.0989077,0,.52223,.892502,.0931724,0,.539064,.891441,.0878276,0,.556028,.890276,.082903,0,.573125,.888972,.0783505,0,.590361,.887469,.0741083,0,.607741,.885785,.0701633,0,.62527,.883914,.0664835,0,.642957,.881872,.0630567,0,.660809,.879651,.0598527,0,.678836,.877267,.0568615,0,.69705,.874717,.05406,0,.715465,.872012,.0514378,0,.734098,.869157,.0489805,0,.752968,.866155,.0466727,0,.772101,.863014,.0445056,0,.791529,.859748,.0424733,0,.81129,.856416,.0405957,0,.831438,.852958,.0388273,0,.852044,.849382,.0371619,0,.87321,.845694,.0355959,0,.89509,.841893,.0341155,0,.917932,.837981,.0327141,0,.942204,.833963,.0313856,0,.968981,.829847,.0301275,0,1,1,.85214,0,0,.999969,.852095,0,.00279627,.999483,.851408,0,.0107635,.994545,.84579,0,.0206454,.986188,.835231,0,.0315756,.969847,.814687,0,.0432021,.945951,.783735,0,.0553396,.91917,.746074,0,.0678766,.895488,.706938,0,.0807395,.878232,.669534,0,.0938767,.868252,.635168,0,.10725,.863873,.603069,0,.120832,.863369,.572514,0,.134598,.86545,.543169,0,.148533,.868803,.514578,0,.16262,.872794,.486762,0,.176849,.87702,.459811,0,.19121,.881054,.433654,0,.205694,.884974,.408574,0,.220294,.888587,.384525,0,.235005,.891877,.36156,0,.24982,.894793,.339661,0,.264737,.89743,.318913,0,.279751,.899796,.299302,0,.294859,.901943,.280843,0,.310058,.903858,.263481,0,.325346,.905574,.247197,0,.340721,.907069,.231915,0,.356181,.908379,.217614,0,.371725,.90952,.20425,0,.387353,.910483,.191758,0,.403063,.91128,.180092,0,.418854,.911936,.169222,0,.434727,.912454,.159098,0,.450682,.912835,.149668,0,.466718,.913078,.140884,0,.482837,.913192,.132709,0,.499038,.913175,.125095,0,.515324,.91304,.118012,0,.531695,.912781,.111417,0,.548153,.91241,.105281,0,.5647,.911924,.0995691,0,.581338,.911331,.0942531,0,.59807,.910637,.0893076,0,.6149,.90984,.0846998,0,.63183,.908941,.0804044,0,.648865,.907944,.0763984,0,.666011,.906857,.0726638,0,.683273,.90568,.0691783,0,.700659,.904416,.0659222,0,.718176,.903067,.0628782,0,.735834,.901637,.0600307,0,.753646,.900128,.0573647,0,.771625,.898544,.0548668,0,.78979,.89689,.052527,0,.808162,.895165,.0503306,0,.826771,.893371,.0482668,0,.845654,.891572,.0463605,0,.864863,.889763,.0445998,0,.884472,.887894,.0429451,0,.904592,.885967,.0413884,0,.925407,.883984,.0399225,0,.947271,.881945,.0385405,0,.97105,.879854,.0372362,0,1,.999804,.995833,0,0,.938155,.933611,0,.0158731,.864755,.854311,0,.0317461,.888594,.865264,0,.0476191,.905575,.863922,0,.0634921,.915125,.850558,0,.0793651,.920665,.829254,0,.0952381,.924073,.802578,0,.111111,.926304,.772211,0,.126984,.927829,.739366,0,.142857,.928924,.705033,0,.15873,.92973,.670019,0,.174603,.930339,.634993,0,.190476,.930811,.600485,0,.206349,.931191,.566897,0,.222222,.93149,.534485,0,.238095,.931737,.503429,0,.253968,.931939,.473811,0,.269841,.932108,.445668,0,.285714,.93225,.418993,0,.301587,.932371,.393762,0,.31746,.932474,.369939,0,.333333,.932562,.347479,0,.349206,.932638,.326336,0,.365079,.932703,.306462,0,.380952,.93276,.287805,0,.396825,.932809,.270313,0,.412698,.932851,.253933,0,.428571,.932887,.23861,0,.444444,.932917,.224289,0,.460317,.932943,.210917,0,.47619,.932965,.19844,0,.492063,.932982,.186807,0,.507937,.932995,.175966,0,.52381,.933005,.165869,0,.539683,.933011,.156468,0,.555556,.933013,.147719,0,.571429,.933013,.139579,0,.587302,.93301,.132007,0,.603175,.933004,.124965,0,.619048,.932994,.118416,0,.634921,.932982,.112326,0,.650794,.932968,.106663,0,.666667,.93295,.101397,0,.68254,.932931,.0964993,0,.698413,.932908,.0919438,0,.714286,.932883,.0877057,0,.730159,.932856,.0837623,0,.746032,.932827,.0800921,0,.761905,.932796,.0766754,0,.777778,.932762,.0734936,0,.793651,.932727,.0705296,0,.809524,.932689,.0677676,0,.825397,.93265,.0651929,0,.84127,.932609,.0627917,0,.857143,.932565,.0605515,0,.873016,.932521,.0584606,0,.888889,.932474,.0565082,0,.904762,.932427,.0546841,0,.920635,.932377,.0529793,0,.936508,.932326,.0513851,0,.952381,.932274,.0498936,0,.968254,.93222,.0484975,0,.984127,.932164,.0471899,0,1],o=new Float32Array(e),V=new Float32Array(r),le=new DataTexture(o,64,64,RGBAFormat,FloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1),fe=new DataTexture(V,64,64,RGBAFormat,FloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1);le.needsUpdate=!0,fe.needsUpdate=!0;const Le=new Uint16Array(e.length);e.forEach(function(ze,Fe){Le[Fe]=DataUtils.toHalfFloat(ze)});const Ce=new Uint16Array(r.length);r.forEach(function(ze,Fe){Ce[Fe]=DataUtils.toHalfFloat(ze)});const Re=new DataTexture(Le,64,64,RGBAFormat,HalfFloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1),Pe=new DataTexture(Ce,64,64,RGBAFormat,HalfFloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1);return Re.needsUpdate=!0,Pe.needsUpdate=!0,this.LTC_HALF_1=Re,this.LTC_HALF_2=Pe,this.LTC_FLOAT_1=le,this.LTC_FLOAT_2=fe,this}}RectAreaLightTexturesLib.LTC_HALF_1=null;RectAreaLightTexturesLib.LTC_HALF_2=null;RectAreaLightTexturesLib.LTC_FLOAT_1=null;RectAreaLightTexturesLib.LTC_FLOAT_2=null;class RectAreaLightUniformsLib{static init(){RectAreaLightTexturesLib.init();const{LTC_FLOAT_1:e,LTC_FLOAT_2:r,LTC_HALF_1:o,LTC_HALF_2:V}=RectAreaLightTexturesLib;UniformsLib.LTC_FLOAT_1=e,UniformsLib.LTC_FLOAT_2=r,UniformsLib.LTC_HALF_1=o,UniformsLib.LTC_HALF_2=V}}const _viewport=new Vector4,_start=new Vector3,_end=new Vector3,_start4=new Vector4,_end4=new Vector4,_ssOrigin=new Vector4,_ssOrigin3=new Vector3,_mvMatrix=new Matrix4,_line=new Line3,_closestPoint=new Vector3,_box=new Box3,_sphere=new Sphere$1,_clipToWorldVector=new Vector4;let _ray,_lineWidth;function getWorldSpaceHalfWidth(v,e,r){return _clipToWorldVector.set(0,0,-e,1).applyMatrix4(v.projectionMatrix),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),_clipToWorldVector.x=_lineWidth/r.width,_clipToWorldVector.y=_lineWidth/r.height,_clipToWorldVector.applyMatrix4(v.projectionMatrixInverse),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),Math.abs(Math.max(_clipToWorldVector.x,_clipToWorldVector.y))}function raycastWorldUnits(v,e){const r=v.matrixWorld,o=v.geometry,V=o.attributes.instanceStart,le=o.attributes.instanceEnd,fe=Math.min(o.instanceCount,V.count);for(let Le=0,Ce=fe;Le<Ce;Le++){_line.start.fromBufferAttribute(V,Le),_line.end.fromBufferAttribute(le,Le),_line.applyMatrix4(r);const Re=new Vector3,Pe=new Vector3;_ray.distanceSqToSegment(_line.start,_line.end,Pe,Re),Pe.distanceTo(Re)<_lineWidth*.5&&e.push({point:Pe,pointOnLine:Re,distance:_ray.origin.distanceTo(Pe),object:v,face:null,faceIndex:Le,uv:null,uv1:null})}}function raycastScreenSpace(v,e,r){const o=e.projectionMatrix,le=v.material.resolution,fe=v.matrixWorld,Le=v.geometry,Ce=Le.attributes.instanceStart,Re=Le.attributes.instanceEnd,Pe=Math.min(Le.instanceCount,Ce.count),ze=-e.near;_ray.at(1,_ssOrigin),_ssOrigin.w=1,_ssOrigin.applyMatrix4(e.matrixWorldInverse),_ssOrigin.applyMatrix4(o),_ssOrigin.multiplyScalar(1/_ssOrigin.w),_ssOrigin.x*=le.x/2,_ssOrigin.y*=le.y/2,_ssOrigin.z=0,_ssOrigin3.copy(_ssOrigin),_mvMatrix.multiplyMatrices(e.matrixWorldInverse,fe);for(let Fe=0,ke=Pe;Fe<ke;Fe++){if(_start4.fromBufferAttribute(Ce,Fe),_end4.fromBufferAttribute(Re,Fe),_start4.w=1,_end4.w=1,_start4.applyMatrix4(_mvMatrix),_end4.applyMatrix4(_mvMatrix),_start4.z>ze&&_end4.z>ze)continue;if(_start4.z>ze){const wt=_start4.z-_end4.z,Wt=(_start4.z-ze)/wt;_start4.lerp(_end4,Wt)}else if(_end4.z>ze){const wt=_end4.z-_start4.z,Wt=(_end4.z-ze)/wt;_end4.lerp(_start4,Wt)}_start4.applyMatrix4(o),_end4.applyMatrix4(o),_start4.multiplyScalar(1/_start4.w),_end4.multiplyScalar(1/_end4.w),_start4.x*=le.x/2,_start4.y*=le.y/2,_end4.x*=le.x/2,_end4.y*=le.y/2,_line.start.copy(_start4),_line.start.z=0,_line.end.copy(_end4),_line.end.z=0;const Vt=_line.closestPointToPointParameter(_ssOrigin3,!0);_line.at(Vt,_closestPoint);const Xt=MathUtils.lerp(_start4.z,_end4.z,Vt),xt=Xt>=-1&&Xt<=1,Zt=_ssOrigin3.distanceTo(_closestPoint)<_lineWidth*.5;if(xt&&Zt){_line.start.fromBufferAttribute(Ce,Fe),_line.end.fromBufferAttribute(Re,Fe),_line.start.applyMatrix4(fe),_line.end.applyMatrix4(fe);const wt=new Vector3,Wt=new Vector3;_ray.distanceSqToSegment(_line.start,_line.end,Wt,wt),r.push({point:Wt,pointOnLine:wt,distance:_ray.origin.distanceTo(Wt),object:v,face:null,faceIndex:Fe,uv:null,uv1:null})}}}class LineSegments2 extends Mesh{constructor(e=new LineSegmentsGeometry,r=new LineMaterial({color:Math.random()*16777215})){super(e,r),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,r=e.attributes.instanceStart,o=e.attributes.instanceEnd,V=new Float32Array(2*r.count);for(let fe=0,Le=0,Ce=r.count;fe<Ce;fe++,Le+=2)_start.fromBufferAttribute(r,fe),_end.fromBufferAttribute(o,fe),V[Le]=Le===0?0:V[Le-1],V[Le+1]=V[Le]+_start.distanceTo(_end);const le=new InstancedInterleavedBuffer(V,2,1);return e.setAttribute("instanceDistanceStart",new InterleavedBufferAttribute(le,1,0)),e.setAttribute("instanceDistanceEnd",new InterleavedBufferAttribute(le,1,1)),this}raycast(e,r){const o=this.material.worldUnits,V=e.camera;V===null&&!o&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const le=e.params.Line2!==void 0&&e.params.Line2.threshold||0;_ray=e.ray;const fe=this.matrixWorld,Le=this.geometry,Ce=this.material;_lineWidth=Ce.linewidth+le,Le.boundingSphere===null&&Le.computeBoundingSphere(),_sphere.copy(Le.boundingSphere).applyMatrix4(fe);let Re;if(o)Re=_lineWidth*.5;else{const ze=Math.max(V.near,_sphere.distanceToPoint(_ray.origin));Re=getWorldSpaceHalfWidth(V,ze,Ce.resolution)}if(_sphere.radius+=Re,_ray.intersectsSphere(_sphere)===!1)return;Le.boundingBox===null&&Le.computeBoundingBox(),_box.copy(Le.boundingBox).applyMatrix4(fe);let Pe;if(o)Pe=_lineWidth*.5;else{const ze=Math.max(V.near,_box.distanceToPoint(_ray.origin));Pe=getWorldSpaceHalfWidth(V,ze,Ce.resolution)}_box.expandByScalar(Pe),_ray.intersectsBox(_box)!==!1&&(o?raycastWorldUnits(this,r):raycastScreenSpace(this,V,r))}onBeforeRender(e){const r=this.material.uniforms;r&&r.resolution&&(e.getViewport(_viewport),this.material.uniforms.resolution.value.set(_viewport.z,_viewport.w))}}var Je$1=Object.defineProperty,Qe$1=Object.defineProperties,Ke$1=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Be$1=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Ie$1=(v,e,r)=>e in v?Je$1(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,U$1=(v,e)=>{for(var r in e||(e={}))Be$1.call(e,r)&&Ie$1(v,r,e[r]);if(he)for(var r of he(e))Ue.call(e,r)&&Ie$1(v,r,e[r]);return v},ue$1=(v,e)=>Qe$1(v,Ke$1(e)),ye$1=(v,e)=>{var r={};for(var o in v)Be$1.call(v,o)&&e.indexOf(o)<0&&(r[o]=v[o]);if(v!=null&&he)for(var o of he(v))e.indexOf(o)<0&&Ue.call(v,o)&&(r[o]=v[o]);return r},ie$1=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())});function H$1(v,e=0){const r=v[0].index!==null,o=new Set(Object.keys(v[0].attributes)),V=new Set(Object.keys(v[0].morphAttributes)),le={},fe={},Le=v[0].morphTargetsRelative,Ce=new BufferGeometry;let Re=0;for(let Pe=0;Pe<v.length;++Pe){const ze=v[Pe];let Fe=0;if(r!==(ze.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const ke in ze.attributes){if(!o.has(ke))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+'. All geometries must have compatible attributes; make sure "'+ke+'" attribute exists among all geometries, or in none of them.'),null;le[ke]===void 0&&(le[ke]=[]),le[ke].push(ze.attributes[ke]),Fe++}if(Fe!==o.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". Make sure all geometries have the same number of attributes."),null;if(Le!==ze.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const ke in ze.morphAttributes){if(!V.has(ke))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". .morphAttributes must be consistent throughout all geometries."),null;fe[ke]===void 0&&(fe[ke]=[]),fe[ke].push(ze.morphAttributes[ke])}if(e){let ke;if(r)ke=ze.index.count;else if(ze.attributes.position!==void 0)ke=ze.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". The geometry must have either an index or a position attribute"),null;if(e===1)Ce.addGroup(Re,ke,Pe);else if(e===2&&ze.groups.length>0)for(let Gt of ze.groups){let Vt=Gt.materialIndex;Ce.addGroup(Re+Gt.start,Math.min(Gt.count,ke),Vt)}Re+=ke}}if(r){let Pe=0;const ze=[];for(let Fe=0;Fe<v.length;++Fe){const ke=v[Fe].index;for(let Gt=0;Gt<ke.count;++Gt)ze.push(ke.getX(Gt)+Pe);Pe+=v[Fe].attributes.position.count}Ce.setIndex(ze)}for(const Pe in le){const ze=mergeAttributes(le[Pe]);if(!ze)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+Pe+" attribute."),null;Ce.setAttribute(Pe,ze)}for(const Pe in fe){const ze=fe[Pe][0].length;if(ze===0)break;Ce.morphAttributes=Ce.morphAttributes||{},Ce.morphAttributes[Pe]=[];for(let Fe=0;Fe<ze;++Fe){const ke=[];for(let Vt=0;Vt<fe[Pe].length;++Vt)ke.push(fe[Pe][Vt][Fe]);const Gt=mergeAttributes(ke);if(!Gt)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+Pe+" morphAttribute."),null;Ce.morphAttributes[Pe].push(Gt)}}return e===2?mergeGroups(Ce):Ce}const De=v=>{const e=v,{coordinate:r,startHeight:o,height:V}=e,le=ye$1(e,["coordinate","startHeight","height"]);let fe=o||0;return typeof o!="undefined"&&typeof V!="undefined"&&(fe=o+V),new kt([r],ue$1(U$1({},le),{startHeight:o,endHeight:fe}))};class Jt extends Z$1{constructor(e){super(),this.options=U$1({},e)}create(){const e=this.options,{geometry:r,coordinateArr:o,coordinate:V,material:le,useGroups:fe}=e,Le=ye$1(e,["geometry","coordinateArr","coordinate","material","useGroups"]);let Ce=r;if(!Ce&&V)Ce=De(U$1({coordinate:V},Le));else if(!Ce&&o){const Re=o.map(Pe=>De(U$1({coordinate:Pe},Le)));Ce=H$1(Re,fe!=null?fe:0)}this.createMesh(Ce,le)}}const Bt={ArcCurve,CatmullRomCurve3,CubicBezierCurve,CubicBezierCurve3,EllipseCurve,LineCurve,LineCurve3,QuadraticBezierCurve,QuadraticBezierCurve3,SplineCurve};let Q$1=class On extends BufferGeometry{constructor(e=new Shape([new Vector2(.5,.5),new Vector2(-.5,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:r},e=Array.isArray(e)?e:[e];const o=this,V=[],le=[];for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le];fe(Re)}this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("uv",new Float32BufferAttribute(le,2)),this.computeVertexNormals();function fe(Le){var Ce,Re,Pe;const ze=[],Fe=r.curveSegments!==void 0?r.curveSegments:12,ke=r.steps!==void 0?r.steps:1,Gt=r.depth!==void 0?r.depth:1;let Vt=r.bevelEnabled!==void 0?r.bevelEnabled:!0,Xt=r.bevelThickness!==void 0?r.bevelThickness:.2,xt=r.bevelSize!==void 0?r.bevelSize:Xt-.1,Zt=r.bevelOffset!==void 0?r.bevelOffset:0,wt=r.bevelSegments!==void 0?r.bevelSegments:3;const Wt=r.extrudePath,It=r.UVGenerator!==void 0?r.UVGenerator:Ut,Nt=(Ce=r.hasTop)!=null?Ce:!0,Ft=(Re=r.hasBottom)!=null?Re:!0,Ht=(Pe=r.hasSide)!=null?Pe:!0;let Kt,Yt=!1,jt,n0,a0,l0;Wt&&(Kt=Wt.getSpacedPoints(ke),Yt=!0,Vt=!1,jt=Wt.computeFrenetFrames(ke,!1),n0=new Vector3,a0=new Vector3,l0=new Vector3),Vt||(wt=0,Xt=0,xt=0,Zt=0);const s0=Le.extractPoints(Fe);let $t=s0.shape;const qt=s0.holes;if(!ShapeUtils.isClockWise($t)){$t=$t.reverse();for(let K0=0,E0=qt.length;K0<E0;K0++){const B0=qt[K0];ShapeUtils.isClockWise(B0)&&(qt[K0]=B0.reverse())}}function e0(K0){const E0=10000000000000001e-36;let B0=K0[0];for(let I0=1;I0<=K0.length;I0++){const c0=I0%K0.length,r0=K0[c0],M0=r0.x-B0.x,T0=r0.y-B0.y,k0=M0*M0+T0*T0,w0=Math.max(Math.abs(r0.x),Math.abs(r0.y),Math.abs(B0.x),Math.abs(B0.y)),Pi=E0*w0*w0;if(k0<=Pi){K0.splice(c0,1),I0--;continue}B0=r0}}e0($t),qt.forEach(e0);const o0=qt.length,b0=$t;for(let K0=0;K0<o0;K0++){const E0=qt[K0];$t=$t.concat(E0)}function m0(K0,E0,B0){return E0||error("ExtrudeGeometry: vec does not exist"),K0.clone().addScaledVector(E0,B0)}const P0=$t.length;function Q0(K0,E0,B0){let I0,c0,r0;const M0=K0.x-E0.x,T0=K0.y-E0.y,k0=B0.x-K0.x,w0=B0.y-K0.y,Pi=M0*M0+T0*T0,Ci=M0*w0-T0*k0;if(Math.abs(Ci)>Number.EPSILON){const Wi=Math.sqrt(Pi),Oi=Math.sqrt(k0*k0+w0*w0),Gi=E0.x-T0/Wi,Zi=E0.y+M0/Wi,zi=B0.x-w0/Oi,Ui=B0.y+k0/Oi,Ti=((zi-Gi)*w0-(Ui-Zi)*k0)/(M0*w0-T0*k0);I0=Gi+M0*Ti-K0.x,c0=Zi+T0*Ti-K0.y;const Bi=I0*I0+c0*c0;if(Bi<=2)return new Vector2(I0,c0);r0=Math.sqrt(Bi/2)}else{let Wi=!1;M0>Number.EPSILON?k0>Number.EPSILON&&(Wi=!0):M0<-Number.EPSILON?k0<-Number.EPSILON&&(Wi=!0):Math.sign(T0)===Math.sign(w0)&&(Wi=!0),Wi?(I0=-T0,c0=M0,r0=Math.sqrt(Pi)):(I0=M0,c0=T0,r0=Math.sqrt(Pi/2))}return new Vector2(I0/r0,c0/r0)}const Si=[];for(let K0=0,E0=b0.length,B0=E0-1,I0=K0+1;K0<E0;K0++,B0++,I0++)B0===E0&&(B0=0),I0===E0&&(I0=0),Si[K0]=Q0(b0[K0],b0[B0],b0[I0]);const Ni=[];let G0,R0=Si.concat();for(let K0=0,E0=o0;K0<E0;K0++){const B0=qt[K0];G0=[];for(let I0=0,c0=B0.length,r0=c0-1,M0=I0+1;I0<c0;I0++,r0++,M0++)r0===c0&&(r0=0),M0===c0&&(M0=0),G0[I0]=Q0(B0[I0],B0[r0],B0[M0]);Ni.push(G0),R0=R0.concat(G0)}let O0;if(wt===0)O0=ShapeUtils.triangulateShape(b0,qt);else{const K0=[],E0=[];for(let B0=0;B0<wt;B0++){const I0=B0/wt,c0=Xt*Math.cos(I0*Math.PI/2),r0=xt*Math.sin(I0*Math.PI/2)+Zt;for(let M0=0,T0=b0.length;M0<T0;M0++){const k0=m0(b0[M0],Si[M0],r0);A0(k0.x,k0.y,-c0),I0===0&&K0.push(k0)}for(let M0=0,T0=o0;M0<T0;M0++){const k0=qt[M0];G0=Ni[M0];const w0=[];for(let Pi=0,Ci=k0.length;Pi<Ci;Pi++){const Wi=m0(k0[Pi],G0[Pi],r0);A0(Wi.x,Wi.y,-c0),I0===0&&w0.push(Wi)}I0===0&&E0.push(w0)}}O0=ShapeUtils.triangulateShape(K0,E0)}const Vi=O0.length,vi=xt+Zt;for(let K0=0;K0<P0;K0++){const E0=Vt?m0($t[K0],R0[K0],vi):$t[K0];Yt?(a0.copy(jt.normals[0]).multiplyScalar(E0.x),n0.copy(jt.binormals[0]).multiplyScalar(E0.y),l0.copy(Kt[0]).add(a0).add(n0),A0(l0.x,l0.y,l0.z)):A0(E0.x,E0.y,0)}for(let K0=1;K0<=ke;K0++)for(let E0=0;E0<P0;E0++){const B0=Vt?m0($t[E0],R0[E0],vi):$t[E0];Yt?(a0.copy(jt.normals[K0]).multiplyScalar(B0.x),n0.copy(jt.binormals[K0]).multiplyScalar(B0.y),l0.copy(Kt[K0]).add(a0).add(n0),A0(l0.x,l0.y,l0.z)):A0(B0.x,B0.y,Gt/ke*K0)}for(let K0=wt-1;K0>=0;K0--){const E0=K0/wt,B0=Xt*Math.cos(E0*Math.PI/2),I0=xt*Math.sin(E0*Math.PI/2)+Zt;for(let c0=0,r0=b0.length;c0<r0;c0++){const M0=m0(b0[c0],Si[c0],I0);A0(M0.x,M0.y,Gt+B0)}for(let c0=0,r0=qt.length;c0<r0;c0++){const M0=qt[c0];G0=Ni[c0];for(let T0=0,k0=M0.length;T0<k0;T0++){const w0=m0(M0[T0],G0[T0],I0);Yt?A0(w0.x,w0.y+Kt[ke-1].y,Kt[ke-1].x+B0):A0(w0.x,w0.y,Gt+B0)}}}Hi(),Ht&&Yi();function Hi(){const K0=V.length/3;if(Vt){let E0=0,B0=P0*E0;if(Ft)for(let I0=0;I0<Vi;I0++){const c0=O0[I0];bi(c0[2]+B0,c0[1]+B0,c0[0]+B0)}if(E0=ke+wt*2,B0=P0*E0,Nt)for(let I0=0;I0<Vi;I0++){const c0=O0[I0];bi(c0[0]+B0,c0[1]+B0,c0[2]+B0)}}else{if(Ft)for(let E0=0;E0<Vi;E0++){const B0=O0[E0];bi(B0[2],B0[1],B0[0])}if(Nt)for(let E0=0;E0<Vi;E0++){const B0=O0[E0];bi(B0[0]+P0*ke,B0[1]+P0*ke,B0[2]+P0*ke)}}o.addGroup(K0,V.length/3-K0,0)}function Yi(){const K0=V.length/3;let E0=0;j0(b0,E0),E0+=b0.length;for(let B0=0,I0=qt.length;B0<I0;B0++){const c0=qt[B0];j0(c0,E0),E0+=c0.length}o.addGroup(K0,V.length/3-K0,1)}function j0(K0,E0){let B0=K0.length;for(;--B0>=0;){const I0=B0;let c0=B0-1;c0<0&&(c0=K0.length-1);for(let r0=0,M0=ke+wt*2;r0<M0;r0++){const T0=P0*r0,k0=P0*(r0+1),w0=E0+I0+T0,Pi=E0+c0+T0,Ci=E0+c0+k0,Wi=E0+I0+k0;$0(w0,Pi,Ci,Wi)}}}function A0(K0,E0,B0){ze.push(K0),ze.push(E0),ze.push(B0)}function bi(K0,E0,B0){Li(K0),Li(E0),Li(B0);const I0=V.length/3,c0=It.generateTopUV(o,V,I0-3,I0-2,I0-1);d0(c0[0]),d0(c0[1]),d0(c0[2])}function $0(K0,E0,B0,I0){Li(K0),Li(E0),Li(I0),Li(E0),Li(B0),Li(I0);const c0=V.length/3,r0=It.generateSideWallUV(o,V,c0-6,c0-3,c0-2,c0-1);d0(r0[0]),d0(r0[1]),d0(r0[3]),d0(r0[1]),d0(r0[2]),d0(r0[3])}function Li(K0){V.push(ze[K0*3+0]),V.push(ze[K0*3+1]),V.push(ze[K0*3+2])}function d0(K0){le.push(K0.x),le.push(K0.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes,o=this.parameters.options;return Ot$1(r,o,e)}static fromJSON(e,r){const o=[];for(let le=0,fe=e.shapes.length;le<fe;le++){const Le=r[e.shapes[le]];o.push(Le)}const V=e.options.extrudePath;return V!==void 0&&(e.options.extrudePath=new Bt[V.type]().fromJSON(V)),new On(o,e.options)}};const Ut={generateTopUV:function(v,e,r,o,V){const le=e[r*3],fe=e[r*3+1],Le=e[o*3],Ce=e[o*3+1],Re=e[V*3],Pe=e[V*3+1];return[new Vector2(le,fe),new Vector2(Le,Ce),new Vector2(Re,Pe)]},generateSideWallUV:function(v,e,r,o,V,le){const fe=e[r*3],Le=e[r*3+1],Ce=e[r*3+2],Re=e[o*3],Pe=e[o*3+1],ze=e[o*3+2],Fe=e[V*3],ke=e[V*3+1],Gt=e[V*3+2],Vt=e[le*3],Xt=e[le*3+1],xt=e[le*3+2];return Math.abs(Le-Pe)<Math.abs(fe-Re)?[new Vector2(fe,1-Ce),new Vector2(Re,1-ze),new Vector2(Fe,1-Gt),new Vector2(Vt,1-xt)]:[new Vector2(Le,1-Ce),new Vector2(Pe,1-ze),new Vector2(ke,1-Gt),new Vector2(Xt,1-xt)]}};function Ot$1(v,e,r){if(r.shapes=[],Array.isArray(v))for(let o=0,V=v.length;o<V;o++){const le=v[o];r.shapes.push(le.uuid)}else r.shapes.push(v.uuid);return r.options=Object.assign({},e),e.extrudePath!==void 0&&(r.options.extrudePath=e.extrudePath.toJSON()),r}let Rt$1=class extends Q$1{constructor(e,r){super(e,r);const o=new Brush(new Q$1(e,ue$1(U$1({},r),{hasTop:!0,hasSide:!0,hasBottom:!1})));o.updateMatrixWorld();const V=new Box3().setFromObject(o),le=new Vector3;V.getSize(le);const fe=new Vector3(V.min.x+le.x/2,V.min.y+le.y/2,0);let Le=r.topSegments,Ce=r.box3;if(Ce){Ce=Ce.union(V);const Xt=new Vector3;Ce.getSize(Xt);const xt=Math.max(le.x/Xt.x,le.y/Xt.y);Le=Math.ceil(r.topSegments*xt)}if(Le<4)return this;const Re=new PlaneGeometry(le.x,le.y,Le,Le),Pe=new Brush(Re);Pe.position.set(fe.x,fe.y,fe.z),Pe.updateMatrixWorld();const ze=new Evaluator().evaluate(Pe,o,INTERSECTION),Fe=ze.geometry.getAttribute("position"),ke=new Float32BufferAttribute(Fe.count*2,2);for(let Xt=0;Xt<Fe.count;Xt++){const xt=Fe.getZ(Xt);Fe.setZ(Xt,r.depth+xt)}if(Ce){const Xt=Ce.min,xt=Ce.max,Zt=new Vector3().subVectors(xt,Xt);for(let wt=0;wt<Fe.count;wt++){const Wt=Fe.getX(wt),It=Fe.getY(wt),Nt=(Wt-Xt.x)/Zt.x,Ft=(It-Xt.y)/Zt.y;ke.setXY(wt,Nt,Ft)}ze.geometry.setAttribute("uv",ke)}Fe.needsUpdate=!0;const Gt=new Q$1(e,ue$1(U$1({},r),{hasTop:!1})),Vt=H$1([ze.geometry,Gt],2);this.copy(Vt.toNonIndexed())}};const He$1=v=>{const{split:e,depth:r,points:o,box3:V,hasTop:le,hasBottom:fe,hasSide:Le,sideRepeat:Ce,topSegments:Re}=v,Pe=Re?Rt$1:Q$1,ze=new Pe(new Shape(o),{depth:r,bevelEnabled:!1,box3:V,UVGenerator:R$2({split:e,box3:V,sideRepeat:Ce}),hasTop:le,hasBottom:fe,hasSide:Le,topSegments:Re});return P$1(),ze};class Qt extends Z$1{constructor(e){super(),this.options=U$1({depth:1},e)}create(){return ie$1(this,null,function*(){const{points:e,pointsArr:r,useGroups:o,depth:V,geometry:le,geometryArr:fe,material:Le,box3:Ce,split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe}=this.options,ke=Array.isArray(V)?V:[V],Gt=Array.isArray(Ce)?Ce:[Ce],Vt=Le;let Xt=le;Vt||console.log("material is null"),!Xt&&e?Xt=He$1({points:e,depth:ke[0],box3:Gt[0],split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe}):!Xt&&r?Xt=H$1(r.map((xt,Zt)=>{var wt,Wt;return He$1({points:xt,depth:(wt=ke[Zt])!=null?wt:ke[0],box3:(Wt=Gt[Zt])!=null?Wt:Gt[0],split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe})}),o!=null?o:0):!Xt&&fe&&fe.length>1?Xt=H$1(fe,o!=null?o:0):!Xt&&fe&&fe.length===1&&([Xt]=fe),this.createMesh(Xt,Vt)})}addGeometries(e){const r=this.object3d,o=H$1([r.geometry,...e]);r.geometry=o}setTextureAnisotropic(e,r){e.anisotropy=r||this.pencil.renderer.capabilities.getMaxAnisotropy()}}class en extends Z$1{create(){this.createGroup()}}class tn extends Z$1{constructor(e){super(),this.rectAreaLightUniformsLibInit=!1,this.options=e}create(){var e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt,xt;const Zt=this.options;if(Zt.type==="AmbientLight"){const wt=new AmbientLight(Zt.color);wt.name="环境光",this.object3d=wt}else if(Zt.type==="DirectionalLight"){const wt=new DirectionalLight(Zt.color,Zt.intensity);wt.name="平行光",wt.target.position.set(0,0,0),this.object3d=wt,wt.target.name="平行光目标",wt.shadow.camera.name="平行光阴影相机",wt.shadow.camera.userData.directionalLightShadow=!0,this.directionalLight=wt}else if(Zt.type==="PointLight"){const wt=new PointLight((e=Zt.color)!=null?e:16777215,(r=Zt.intensity)!=null?r:1,(o=Zt.distance)!=null?o:0,(V=Zt.decay)!=null?V:2);wt.name="点光源",this.object3d=wt,this.pointLight=wt}else if(Zt.type==="SpotLight"){const wt=new SpotLight((le=Zt.color)!=null?le:16777215,(fe=Zt.intensity)!=null?fe:1,(Le=Zt.distance)!=null?Le:0,(Ce=Zt.angle)!=null?Ce:Math.PI/3,(Re=Zt.penumbra)!=null?Re:1,(Pe=Zt.decay)!=null?Pe:2);wt.name="聚光灯",this.object3d=wt,this.spotLight=wt,wt.target.name="聚光灯目标"}else if(Zt.type==="HemisphereLight"){const wt=new HemisphereLight((ze=Zt.color)!=null?ze:16777215,(Fe=Zt.groundColor)!=null?Fe:16777215,(ke=Zt.intensity)!=null?ke:1);wt.name="半球光",this.object3d=wt,this.hemisphereLight=wt}else if(Zt.type==="RectAreaLight"){this.rectAreaLightUniformsLibInit||(RectAreaLightUniformsLib.init(),this.rectAreaLightUniformsLibInit=!0);const wt=new RectAreaLight((Gt=Zt.color)!=null?Gt:16777215,(Vt=Zt.intensity)!=null?Vt:1,(Xt=Zt.width)!=null?Xt:10,(xt=Zt.height)!=null?xt:10);wt.name="矩形区域光",this.object3d=wt,this.rectAreaLight=wt}}render(){const e=this.object3d;e.target&&this.pencil.scene.add(e.target);const r=this.pencil.cameraTarget;if(this.spotLight||this.directionalLight){const o=this.spotLight||this.directionalLight;o.position.copy(r),o.target.position.copy(r)}else this.pointLight&&this.pointLight.position.copy(r)}dispose(){const e=this.object3d;e.target&&this.pencil.scene.remove(e.target),super.dispose()}}let Dt$1=class extends BufferGeometry{constructor(e=[],r="none",o){super(),this.type="MeshLineGeometry",this.pointCount=0,this._points=[],this.shape="none",this.shapeFunction=V=>1,this.matrixWorld=new Matrix4,this.shape=r,o&&(this.shapeFunction=o),e.length>0&&this.setPoints(e)}convertToVector3Array(e){if(typeof e[0]=="number"){const r=[],o=e;for(let V=0;V<o.length;V+=3)r.push(new Vector3(o[V],o[V+1],o[V+2]));return r}else return e.map(r=>{if(r instanceof Vector2)return new Vector3(r.x,r.y,0);if(r instanceof Vector3)return r;if(Array.isArray(r)&&r.length===2)return new Vector3(r[0],r[1],0);if(Array.isArray(r)&&r.length===3)return new Vector3(r[0],r[1],r[2])}).filter(Boolean)}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,r){!e||e.length===0||(this._points=this.convertToVector3Array(e),this.pointCount=this._points.length,r&&(this.shapeFunction=r,this.shape="custom"),this.initializeGeometry(),this.updateGeometry())}initializeGeometry(){const e=new BufferAttribute(new Float32Array(this.pointCount*6),3),r=new BufferAttribute(new Float32Array(this.pointCount*6),3),o=new BufferAttribute(new Float32Array(this.pointCount*6),3),V=new BufferAttribute(new Float32Array(this.pointCount*2),1),le=new BufferAttribute(new Float32Array(this.pointCount*2),1),fe=new BufferAttribute(new Float32Array(this.pointCount*2),1),Le=new BufferAttribute(new Float32Array(this.pointCount*4),2),Ce=new BufferAttribute(new Uint16Array((this.pointCount-1)*6),1);this.shape==="taper"&&(this.shapeFunction=Re=>1*Math.pow(4*Re*(1-Re),1));for(let Re=0,Pe=0,ze=0;Re<this.pointCount;Re+=1,Pe+=2,ze+=6){V.setX(Pe,Re/this.pointCount),V.setX(Pe+1,Re/this.pointCount),le.setX(Pe,1),le.setX(Pe+1,-1);const Fe=this.shape==="none"?1:this.shapeFunction(Re/(this.pointCount-1));fe.setX(Pe,Fe),fe.setX(Pe+1,Fe);const ke=Re/(this.pointCount-1);if(Le.setXY(Pe,ke,0),Le.setXY(Pe+1,ke,1),Re<this.pointCount-1){const Gt=Re*2;Ce.setX(ze+0,Gt+0),Ce.setX(ze+1,Gt+1),Ce.setX(ze+2,Gt+2),Ce.setX(ze+3,Gt+2),Ce.setX(ze+4,Gt+1),Ce.setX(ze+5,Gt+3)}}this.setAttribute("position",e),this.setAttribute("previous",r),this.setAttribute("next",o),this.setAttribute("counters",V),this.setAttribute("side",le),this.setAttribute("width",fe),this.setAttribute("uv",Le),this.setIndex(Ce)}updateGeometry(){if(!this._points[0])return;const e=this.getAttribute("position"),r=this.getAttribute("previous"),o=this.getAttribute("next");let V=0,le=0,fe=0;const Le=this._points[0];r.setXYZ(le,Le.x,Le.y,Le.z),le+=1,r.setXYZ(le,Le.x,Le.y,Le.z),le+=1;for(let Re=0;Re<this.pointCount;Re++){const Pe=this._points[Re];e.setXYZ(V,Pe.x,Pe.y,Pe.z),V+=1,e.setXYZ(V,Pe.x,Pe.y,Pe.z),V+=1,Re<this.pointCount-1&&(r.setXYZ(le,Pe.x,Pe.y,Pe.z),le+=1,r.setXYZ(le,Pe.x,Pe.y,Pe.z),le+=1),Re>0&&Re+1<=this.pointCount&&(o.setXYZ(fe,Pe.x,Pe.y,Pe.z),fe+=1,o.setXYZ(fe,Pe.x,Pe.y,Pe.z),fe+=1)}const Ce=this._points[this.pointCount-1];o.setXYZ(fe,Ce.x,Ce.y,Ce.z),fe+=1,o.setXYZ(fe,Ce.x,Ce.y,Ce.z),fe+=1,e.needsUpdate=!0,r.needsUpdate=!0,o.needsUpdate=!0,this.computeBoundingSphere(),this.computeBoundingBox()}get points(){return this._points}set points(e){this.setPoints(e)}updatePoints(e,r){const o=this.convertToVector3Array(e);if(o.length!==this.pointCount){console.warn("MeshLineGeometry: Cannot update points with different length. Use setPoints() instead.");return}this._points=o,r&&(this.shapeFunction=r,this.shape="custom",this.initializeGeometry()),this.updateGeometry()}setShape(e,r){this.shape=e,r&&(this.shapeFunction=r),this._points.length>0&&(this.initializeGeometry(),this.updateGeometry())}};const be$1=v=>{const{setPointWidth:e,nodes:r}=v,o=new Dt$1;return o.setPoints(r,e),o},Xe$1=new WeakMap,me$1=new Map;let sn=class extends Z$1{constructor(v={}){super(),this.options=U$1({},v)}get material(){var v;return(v=this.object3d)==null?void 0:v.material}create(){return ie$1(this,null,function*(){const{nodes:v,nodesArr:e,geometry:r,geometryArr:o,material:V,useGroups:le,setPointWidth:fe,lineWidthArr:Le,materialParameters:Ce}=this.options;let Re=V,Pe=r;!Re&&Ce&&(Re=this.getMaterial(Ce)),!Pe&&v?Pe=be$1({nodes:v,setPointWidth:fe}):!Pe&&e?Pe=H$1(e.map((ze,Fe)=>{let ke=fe;return!ke&&Le&&(ke=()=>{var Gt;return(Gt=Le[Fe])!=null?Gt:Le[0]}),be$1({nodes:ze,setPointWidth:ke})}),le!=null?le:0):!Pe&&o&&o.length>1?Pe=H$1(o,le!=null?le:0):!Pe&&o&&o.length===1&&([Pe]=o),this.createMesh(Pe,Re)})}setGeometry(v,e){const r=be$1({nodes:v,setPointWidth:e}),o=this.object3d,V=o.geometry;o.geometry=r,V.dispose()}getMaterial(v){const{width:e,height:r}=this.pencil.getSize(),o=new zt(U$1({color:new Color$1("#ffffff")},v));return o.uniforms.resolution.value.set(e,r),o}addGeometries(v){const e=this.object3d,r=H$1([e.geometry,...v]);e.geometry=r}resize(v,e){var r,o;(o=(r=this.material)==null?void 0:r.uniforms)==null||o.resolution.value.set(v,e)}handleMaterialChange(v){if(v){const{width:e,height:r}=this.pencil.getSize();this.resize(e,r)}}animate({duration:v=1e3,delay:e=0,repeat:r=0,lineLoop:o,onRepeat:V,onUpdate:le,onComplete:fe,startShow:Le}={}){const{offset:Ce,offsetLoop:Re}=this.material.uniforms,Pe=this.pencil.userData.debugLine?me$1:Xe$1;if(Pe.get(this.material)&&this.stopAnimation(),v===0)return;const ze=o!=null?o:!0;Ce.value.x=1,Re.value=ze&&Le?1:0;let Fe=0;const ke=new Tween(Ce.value).to({x:-1},v).delay(e).repeat(r).onUpdate(({x:Gt})=>{ze&&Gt<=0&&Re.value===0&&(Re.value=1),le==null||le(Gt)}).onRepeat(()=>{Fe+=1,V==null||V(Fe)}).onComplete(()=>{fe==null||fe()}).start();Pe.set(this.material,ke),this.material.addEventListener("dispose",()=>{this.stopAnimation()}),this.pencil.userData.debugLine&&console.log("animate",me$1.size)}stopAnimation(){const v=this.pencil.userData.debugLine?me$1:Xe$1,e=v.get(this.material);e&&(e.stop(),remove(e),v.delete(this.material),this.material.uniforms.offset.value.x=0,this.material.uniforms.offsetLoop.value=1),this.pencil.userData.debugLine&&console.log("stopAnimation",me$1.size)}render(){const{width:v,height:e}=this.pencil.getSize();this.resize(v,e)}};const Ve$1=v=>{const{points:e}=v,r=e.reduce((o,V,le)=>(le<e.length-1&&o.push(V,e[le+1]),o),[]);return new BufferGeometry().setFromPoints(r)};class rn extends Z$1{constructor(e={}){super(),this.options=U$1({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return ie$1(this,null,function*(){const{points:e,pointsArr:r,geometry:o,geometryArr:V,material:le,useGroups:fe,setPointWidth:Le,lineWidthArr:Ce,materialParameters:Re,instanceCount:Pe}=this.options;let ze=le,Fe=o;!ze&&Re&&(ze=this.getMaterial(Re)),!Fe&&e?Fe=Ve$1({points:e}):!Fe&&r?Fe=H$1(r.map(Gt=>Ve$1({points:Gt})),fe!=null?fe:0):!Fe&&V&&V.length>1?Fe=H$1(V,fe!=null?fe:0):!Fe&&V&&V.length===1&&([Fe]=V);const ke=new LineSegmentsGeometry().fromLineSegments(new LineSegments(Fe));if(this.pencil.options.WebGPUTHREE){Pe&&(ke.instanceCount=Pe);const Gt=new Lt(ke,ze);Gt.computeLineDistances(),this.object3d=Gt}else{const Gt=new LineSegments2(ke,ze);Gt.computeLineDistances(),this.object3d=Gt}})}getMaterial(e){return new LineMaterial(U$1({color:new Color$1("#ffffff")},e))}}class Light extends tn{constructor(e){super(e),this.keyType=e.type}update(e,r){var V;super.update(e,r);const o=this.object3d;(V=o.shadow)!=null&&V.camera&&(o.shadow.camera.near!==this.pencil.camera.near&&(o.shadow.camera.near=this.pencil.camera.near),o.shadow.camera.far!==this.pencil.camera.far&&(o.shadow.camera.far=this.pencil.camera.far))}render(){super.render();const e=this.object3d;e.userData=new Proxy({},{set:(le,fe,Le)=>(fe==="keepCamera"&&(Le?(this.pencil.render(),this.pencil.camera.attach(e),e.target&&this.pencil.camera.attach(e.target),this.userData.disabledTC=!0):Le||(this.pencil.render(),this.lead.group.object3d.attach(e),e.target&&this.lead.scene.object3d.attach(e.target),this.userData.disabledTC=!1)),Reflect.set(le,fe,Le))}),e.target&&(e.target.userData.light=e);const r=this.object3d;r.isDirectionalLight&&(r.shadow.mapSize.width=1024,r.shadow.mapSize.height=1024);const o=this.object3d;o.isSpotLight&&o.shadow.mapSize.set(1024,1024);const V=this.object3d;V.isPointLight&&(V.shadow.mapSize.width=1024,V.shadow.mapSize.height=1024)}}function getDefaultExportFromCjs(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(v){return!!v&&typeof v=="object"}function isSpecial(v){var e=Object.prototype.toString.call(v);return e==="[object RegExp]"||e==="[object Date]"||isReactElement(v)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(v){return v.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(v){return Array.isArray(v)?[]:{}}function cloneUnlessOtherwiseSpecified(v,e){return e.clone!==!1&&e.isMergeableObject(v)?deepmerge(emptyTarget(v),v,e):v}function defaultArrayMerge(v,e,r){return v.concat(e).map(function(o){return cloneUnlessOtherwiseSpecified(o,r)})}function getMergeFunction(v,e){if(!e.customMerge)return deepmerge;var r=e.customMerge(v);return typeof r=="function"?r:deepmerge}function getEnumerableOwnPropertySymbols(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(e){return Object.propertyIsEnumerable.call(v,e)}):[]}function getKeys(v){return Object.keys(v).concat(getEnumerableOwnPropertySymbols(v))}function propertyIsOnObject(v,e){try{return e in v}catch(r){return!1}}function propertyIsUnsafe(v,e){return propertyIsOnObject(v,e)&&!(Object.hasOwnProperty.call(v,e)&&Object.propertyIsEnumerable.call(v,e))}function mergeObject(v,e,r){var o={};return r.isMergeableObject(v)&&getKeys(v).forEach(function(V){o[V]=cloneUnlessOtherwiseSpecified(v[V],r)}),getKeys(e).forEach(function(V){propertyIsUnsafe(v,V)||(propertyIsOnObject(v,V)&&r.isMergeableObject(e[V])?o[V]=getMergeFunction(V,r)(v[V],e[V],r):o[V]=cloneUnlessOtherwiseSpecified(e[V],r))}),o}function deepmerge(v,e,r){r=r||{},r.arrayMerge=r.arrayMerge||defaultArrayMerge,r.isMergeableObject=r.isMergeableObject||isMergeableObject,r.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var o=Array.isArray(e),V=Array.isArray(v),le=o===V;return le?o?r.arrayMerge(v,e,r):mergeObject(v,e,r):cloneUnlessOtherwiseSpecified(e,r)}deepmerge.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,V){return deepmerge(o,V,r)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;const Rt=getDefaultExportFromCjs(cjs);class Panel{constructor(e,r,o){this.id=0,this.name=e,this.fg=r,this.bg=o,this.gradient=null,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width="90px",this.canvas.style.height="48px",this.canvas.style.position="absolute",this.canvas.style.cssText="width:90px;height:48px;background-color: transparent !important;",this.context=this.canvas.getContext("2d"),this.initializeCanvas()}createGradient(){if(!this.context)throw new Error("No context");const e=this.context.createLinearGradient(0,this.GRAPH_Y,0,this.GRAPH_Y+this.GRAPH_HEIGHT);let r;const o=this.fg;switch(this.fg.toLowerCase()){case"#0ff":r="#006666";break;case"#0f0":r="#006600";break;case"#ff0":r="#666600";break;case"#e1e1e1":r="#666666";break;default:r=this.bg;break}return e.addColorStop(0,r),e.addColorStop(1,o),e}initializeCanvas(){this.context&&(this.context.imageSmoothingEnabled=!1,this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.gradient=this.createGradient(),this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,r,o=0){if(!this.context||!this.gradient)return;const V=Math.min(1/0,e),le=Math.max(r,e);this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(`${e.toFixed(o)} ${this.name} (${V.toFixed(o)}-${parseFloat(le.toFixed(o))})`,this.TEXT_X,this.TEXT_Y)}updateGraph(e,r){if(!this.context||!this.gradient)return;e===0&&r===0&&(r=1),r=Math.max(r,e,.1),e=Math.max(e,0);const o=Math.round(this.GRAPH_X),V=Math.round(this.GRAPH_Y),le=Math.round(this.GRAPH_WIDTH),fe=Math.round(this.GRAPH_HEIGHT),Le=Math.round(this.PR);this.context.drawImage(this.canvas,o+Le,V,le-Le,fe,o,V,le-Le,fe),this.context.fillStyle=this.bg,this.context.fillRect(o+le-Le,V,Le,fe);const Ce=Math.min(fe,Math.round(e/r*fe));Ce>0&&(this.context.globalAlpha=.9,this.context.fillStyle=this.gradient,this.context.fillRect(o+le-Le,V+(fe-Ce),Le,Ce)),this.context.globalAlpha=1}}class PanelVSync extends Panel{constructor(e,r,o){super(e,r,o),this.vsyncValue=0,this.SMALL_HEIGHT=9*this.PR,this.HEIGHT=this.SMALL_HEIGHT,this.WIDTH=35*this.PR,this.TEXT_Y=0*this.PR,this.canvas.height=this.HEIGHT,this.canvas.width=this.WIDTH,this.canvas.style.height="9px",this.canvas.style.width="35px",this.canvas.style.cssText=`
|
|
4528
|
+
`;class zt extends ShaderMaterial{constructor(e={}){const r=e,{lineWidth:o=1,color:V="#ffffff",opacity:le=1,map:fe=null,dashOffset:Le=0,dashArray:Ce=0,dashRatio:Re=0,sizeAttenuation:Pe=!0,offsetLoop:ze=!0,offset:Fe=new Vector2(0,0),scaleDown:ke=0,alphaMap:Gt=void 0,alphaTest:Vt=0,repeat:Xt=new Vector2(1,1),resolution:xt=new Vector2(1,1)}=r,Zt=oe$1(r,["lineWidth","color","opacity","map","dashOffset","dashArray","dashRatio","sizeAttenuation","offsetLoop","offset","scaleDown","alphaMap","alphaTest","repeat","resolution"]);super(q$1(L$1({},Zt),{uniforms:{lineWidth:{value:o},color:{value:new Color$1(V)},opacity:{value:le},map:{value:fe},useMap:{value:fe?1:0},resolution:{value:xt},sizeAttenuation:{value:Pe?1:0},offset:{value:Fe},offsetLoop:{value:ze?1:0},dashArray:{value:Ce},dashOffset:{value:Le},dashRatio:{value:Re},useDash:{value:Ce>0?1:0},scaleDown:{value:ke/10},alphaTest:{value:Vt},alphaMap:{value:Gt},useAlphaMap:{value:Gt?1:0},repeat:{value:Xt}},vertexShader:mt$1,fragmentShader:pt})),this.type="MeshLineMaterial"}get color(){return this.uniforms.color.value}set color(e){this.uniforms.color.value=new Color$1(e)}get opacity(){var e;return((e=this.uniforms)==null?void 0:e.opacity.value)||1}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get alphaTest(){return this.uniforms.alphaTest.value}set alphaTest(e){this.uniforms&&(this.uniforms.alphaTest.value=e)}get map(){return this.uniforms.map.value}set map(e){this.uniforms.map.value=e,this.uniforms.useMap.value=e?1:0}get repeat(){return this.uniforms.repeat.value}set repeat(e){this.uniforms.repeat.value.copy(e)}get lineWidth(){return this.uniforms.lineWidth.value}set lineWidth(e){this.uniforms.lineWidth.value=e}get sizeAttenuation(){return this.uniforms.sizeAttenuation.value===1}set sizeAttenuation(e){this.uniforms.sizeAttenuation.value=e?1:0}}const Q$2=new Vector4,ge$1=new Vector3,Me$1=new Vector3,g=new Vector4,M$3=new Vector4,O=new Vector4,X$1=new Vector3,Y$1=new Matrix4,w=new Line3,we$1=new Vector3,U$2=new Box3,_=new Sphere$1,T$1=new Vector4;let E,z$2;function xe$1(v,e,r){return T$1.set(0,0,-e,1).applyMatrix4(v.projectionMatrix),T$1.multiplyScalar(1/T$1.w),T$1.x=z$2/r.width,T$1.y=z$2/r.height,T$1.applyMatrix4(v.projectionMatrixInverse),T$1.multiplyScalar(1/T$1.w),Math.abs(Math.max(T$1.x,T$1.y))}function vt$1(v,e){const r=v.matrixWorld,o=v.geometry,V=o.attributes.instanceStart,le=o.attributes.instanceEnd,fe=Math.min(o.instanceCount,V.count);for(let Le=0,Ce=fe;Le<Ce;Le++){w.start.fromBufferAttribute(V,Le),w.end.fromBufferAttribute(le,Le),w.applyMatrix4(r);const Re=new Vector3,Pe=new Vector3;E.distanceSqToSegment(w.start,w.end,Pe,Re),Pe.distanceTo(Re)<z$2*.5&&e.push({point:Pe,pointOnLine:Re,distance:E.origin.distanceTo(Pe),object:v,face:null,faceIndex:Le,uv:null,uv1:null})}}function bt(v,e,r){const o=e.projectionMatrix,V=v.material.resolution,le=v.matrixWorld,fe=v.geometry,Le=fe.attributes.instanceStart,Ce=fe.attributes.instanceEnd,Re=Math.min(fe.instanceCount,Le.count),Pe=-e.near;E.at(1,O),O.w=1,O.applyMatrix4(e.matrixWorldInverse),O.applyMatrix4(o),O.multiplyScalar(1/O.w),O.x*=V.x/2,O.y*=V.y/2,O.z=0,X$1.copy(O),Y$1.multiplyMatrices(e.matrixWorldInverse,le);for(let ze=0,Fe=Re;ze<Fe;ze++){if(g.fromBufferAttribute(Le,ze),M$3.fromBufferAttribute(Ce,ze),g.w=1,M$3.w=1,g.applyMatrix4(Y$1),M$3.applyMatrix4(Y$1),g.z>Pe&&M$3.z>Pe)continue;if(g.z>Pe){const xt=g.z-M$3.z,Zt=(g.z-Pe)/xt;g.lerp(M$3,Zt)}else if(M$3.z>Pe){const xt=M$3.z-g.z,Zt=(M$3.z-Pe)/xt;M$3.lerp(g,Zt)}g.applyMatrix4(o),M$3.applyMatrix4(o),g.multiplyScalar(1/g.w),M$3.multiplyScalar(1/M$3.w),g.x*=V.x/2,g.y*=V.y/2,M$3.x*=V.x/2,M$3.y*=V.y/2,w.start.copy(g),w.start.z=0,w.end.copy(M$3),w.end.z=0;const ke=w.closestPointToPointParameter(X$1,!0);w.at(ke,we$1);const Gt=MathUtils.lerp(g.z,M$3.z,ke),Vt=Gt>=-1&&Gt<=1,Xt=X$1.distanceTo(we$1)<z$2*.5;if(Vt&&Xt){w.start.fromBufferAttribute(Le,ze),w.end.fromBufferAttribute(Ce,ze),w.start.applyMatrix4(le),w.end.applyMatrix4(le);const xt=new Vector3,Zt=new Vector3;E.distanceSqToSegment(w.start,w.end,Zt,xt),r.push({point:Zt,pointOnLine:xt,distance:E.origin.distanceTo(Zt),object:v,face:null,faceIndex:ze,uv:null,uv1:null})}}}class Lt extends Mesh{constructor(e=new LineSegmentsGeometry,r){super(e,r),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,r=e.attributes.instanceStart,o=e.attributes.instanceEnd,V=new Float32Array(2*r.count);for(let fe=0,Le=0,Ce=r.count;fe<Ce;fe++,Le+=2)ge$1.fromBufferAttribute(r,fe),Me$1.fromBufferAttribute(o,fe),V[Le]=Le===0?0:V[Le-1],V[Le+1]=V[Le]+ge$1.distanceTo(Me$1);const le=new InstancedInterleavedBuffer(V,2,1);return e.setAttribute("instanceDistanceStart",new InterleavedBufferAttribute(le,1,0)),e.setAttribute("instanceDistanceEnd",new InterleavedBufferAttribute(le,1,1)),this}raycast(e,r){const o=this.material.worldUnits,V=e.camera;V===null&&!o&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const le=e.params.Line2!==void 0&&e.params.Line2.threshold||0;E=e.ray;const fe=this.matrixWorld,Le=this.geometry,Ce=this.material;z$2=Ce.linewidth+le,Le.boundingSphere===null&&Le.computeBoundingSphere(),_.copy(Le.boundingSphere).applyMatrix4(fe);let Re;if(o)Re=z$2*.5;else{const ze=Math.max(V.near,_.distanceToPoint(E.origin));Re=xe$1(V,ze,Ce.resolution)}if(_.radius+=Re,E.intersectsSphere(_)===!1)return;Le.boundingBox===null&&Le.computeBoundingBox(),U$2.copy(Le.boundingBox).applyMatrix4(fe);let Pe;if(o)Pe=z$2*.5;else{const ze=Math.max(V.near,U$2.distanceToPoint(E.origin));Pe=xe$1(V,ze,Ce.resolution)}U$2.expandByScalar(Pe),E.intersectsBox(U$2)!==!1&&(o?vt$1(this,r):bt(this,V,r))}onBeforeRender(e){const r=this.material.uniforms;r&&r.resolution&&(e.getViewport(Q$2),this.material.uniforms.resolution.value.set(Q$2.z,Q$2.w))}}const b$2=class pn extends Z$1{constructor(e){super(),this.objectType="Node",this.onNodePointerIndex=[],this.options=L$1({type:"2d"},e)}create(){const{position:e,children:r}=this.options,o=document.createElement("div");this.element=o,r&&o.appendChild(r),this.options.type==="3d"?this.createCSS3DObject(o):this.options.type==="3dSprite"?this.createCSS3DSprite(o):this.createCSS2DObject(o),e&&this.object3d.position.copy(e)}setChildren(e){this.options.children=e,this.element.innerHTML="",this.element.appendChild(e)}showAndEnsureVisible(){const e=this.options.children;e&&(e.style.visibility="hidden",this.show(),setTimeout(()=>{e.style.visibility="",this.ensureVisible()}))}moveElementToViewport(){const e=this.options.children;if(!e)return;const r=e.getBoundingClientRect(),o=window.innerWidth,V=window.innerHeight,le=r.width,fe=r.height;let Le=0,Ce=0;le>o?r.left>0&&(Le=-r.left):r.left<0?Le=-r.left:r.right>o&&(Le=o-r.right,r.left+Le<0&&(Le=-r.left)),fe>V?r.top>0&&(Ce=-r.top):r.top<0?Ce=-r.top:r.bottom>V&&(Ce=V-r.bottom,r.top+Ce<0&&(Ce=-r.top)),(Le!==0||Ce!==0)&&(e.style.transform=`translate(${Le}px, ${Ce}px)`)}ensureVisible(){const e=this.options.children;e&&(e.style.transform&&(e.style.transform=""),!pn.observerMap.has(e)&&(pn.sharedObserver||(pn.sharedObserver=new IntersectionObserver(r=>{r.forEach(o=>{const V=o.target,le=pn.observerMap.get(V);le&&o.isIntersecting&&(le.moveElementToViewport(),pn.observerMap.delete(V),pn.sharedObserver&&(pn.sharedObserver.unobserve(V),pn.observerMap.size===0&&(pn.sharedObserver.disconnect(),pn.sharedObserver=void 0)))})})),pn.observerMap.set(e,this),pn.sharedObserver.observe(e)))}onPointerEvent(e,r){const o=this.lead.handlePickNode([this],e,r);this.onNodePointerIndex.push(o)}dispose(){const e=this.options.children;e&&pn.sharedObserver&&(pn.observerMap.delete(e),pn.sharedObserver.unobserve(e),pn.observerMap.size===0&&(pn.sharedObserver.disconnect(),pn.sharedObserver=void 0)),this.onNodePointerIndex.forEach(r=>{this.lead.removePickNode(r)}),super.dispose()}};b$2.observerMap=new Map;let Se$1=b$2;function mergeAttributes(v){let e,r,o,V=-1,le=0;for(let Re=0;Re<v.length;++Re){const Pe=v[Re];if(e===void 0&&(e=Pe.array.constructor),e!==Pe.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=Pe.itemSize),r!==Pe.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(o===void 0&&(o=Pe.normalized),o!==Pe.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(V===-1&&(V=Pe.gpuType),V!==Pe.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;le+=Pe.count*r}const fe=new e(le),Le=new BufferAttribute(fe,r,o);let Ce=0;for(let Re=0;Re<v.length;++Re){const Pe=v[Re];if(Pe.isInterleavedBufferAttribute){const ze=Ce/r;for(let Fe=0,ke=Pe.count;Fe<ke;Fe++)for(let Gt=0;Gt<r;Gt++){const Vt=Pe.getComponent(Fe,Gt);Le.setComponent(Fe+ze,Gt,Vt)}}else fe.set(Pe.array,Ce);Ce+=Pe.count*r}return V!==void 0&&(Le.gpuType=V),Le}function toTrianglesDrawMode(v,e){if(e===TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),v;if(e===TriangleFanDrawMode||e===TriangleStripDrawMode){let r=v.getIndex();if(r===null){const fe=[],Le=v.getAttribute("position");if(Le!==void 0){for(let Ce=0;Ce<Le.count;Ce++)fe.push(Ce);v.setIndex(fe),r=v.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),v}const o=r.count-2,V=[];if(e===TriangleFanDrawMode)for(let fe=1;fe<=o;fe++)V.push(r.getX(0)),V.push(r.getX(fe)),V.push(r.getX(fe+1));else for(let fe=0;fe<o;fe++)fe%2===0?(V.push(r.getX(fe)),V.push(r.getX(fe+1)),V.push(r.getX(fe+2))):(V.push(r.getX(fe+2)),V.push(r.getX(fe+1)),V.push(r.getX(fe)));V.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const le=v.clone();return le.setIndex(V),le.clearGroups(),le}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),v}function mergeGroups(v){if(v.groups.length===0)return console.warn("THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge."),v;let e=v.groups;if(e=e.sort((fe,Le)=>fe.materialIndex!==Le.materialIndex?fe.materialIndex-Le.materialIndex:fe.start-Le.start),v.getIndex()===null){const fe=v.getAttribute("position"),Le=[];for(let Ce=0;Ce<fe.count;Ce+=3)Le.push(Ce,Ce+1,Ce+2);v.setIndex(Le)}const r=v.getIndex(),o=[];for(let fe=0;fe<e.length;fe++){const Le=e[fe],Ce=Le.start,Re=Ce+Le.count;for(let Pe=Ce;Pe<Re;Pe++)o.push(r.getX(Pe))}v.dispose(),v.setIndex(o);let V=0;for(let fe=0;fe<e.length;fe++){const Le=e[fe];Le.start=V,V+=Le.count}let le=e[0];v.groups=[le];for(let fe=1;fe<e.length;fe++){const Le=e[fe];le.materialIndex===Le.materialIndex?le.count+=Le.count:(le=Le,v.groups.push(le))}return v}const b$1=new Map,R$2=(v={})=>({generateTopUV(e,r,o,V,le){const fe=r[o*3],Le=r[o*3+1],Ce=r[V*3],Re=r[V*3+1],Pe=r[le*3],ze=r[le*3+1];let Fe;if(b$1.has(e))Fe=b$1.get(e);else{let Xt=v.box3;if(!Xt){Xt=new Box3;const Zt=e.parameters.shapes.getPoints().map(wt=>[wt.x,wt.y,0]).flat();Xt.setFromArray(Zt)}const xt=Xt.getSize(new Vector3);v.split&&(xt.y/=v.split),Fe={box:Xt,size:xt},b$1.set(e,Fe)}const{box:ke,size:Gt}=Fe,Vt=v.split?1-v.split:0;return[new Vector2((fe-ke.min.x)/Gt.x,(Le-ke.min.y)/Gt.y+Vt),new Vector2((Ce-ke.min.x)/Gt.x,(Re-ke.min.y)/Gt.y+Vt),new Vector2((Pe-ke.min.x)/Gt.x,(ze-ke.min.y)/Gt.y+Vt)]},generateSideWallUV(e,r,o,V,le,fe){const Le=r[o*3],Ce=r[o*3+1],Re=r[o*3+2],Pe=r[V*3],ze=r[V*3+1],Fe=r[V*3+2],ke=r[le*3],Gt=r[le*3+1],Vt=r[le*3+2],Xt=r[fe*3],xt=r[fe*3+1],Zt=r[fe*3+2];let wt;if(b$1.has(r))wt=b$1.get(r);else{const Nt=new Box3;Nt.setFromArray(r);const Ft=Nt.getSize(new Vector3);v.split&&(Ft.z/=1-v.split),v.sideRepeat&&(Ft.z/=v.sideRepeat),wt={box:Nt,size:Ft},b$1.set(r,wt)}const{box:Wt,size:It}=wt;return Math.abs(Ce-ze)<Math.abs(Le-Pe)?[new Vector2((Le-Wt.min.x)/It.x,(Re-Wt.min.z)/It.z),new Vector2((Pe-Wt.min.x)/It.x,(Fe-Wt.min.z)/It.z),new Vector2((ke-Wt.min.x)/It.x,(Vt-Wt.min.z)/It.z),new Vector2((Xt-Wt.min.x)/It.x,(Zt-Wt.min.z)/It.z)]:[new Vector2((Ce-Wt.min.y)/It.y,(Re-Wt.min.z)/It.z),new Vector2((ze-Wt.min.y)/It.y,(Fe-Wt.min.z)/It.z),new Vector2((Gt-Wt.min.y)/It.y,(Vt-Wt.min.z)/It.z),new Vector2((xt-Wt.min.y)/It.y,(Zt-Wt.min.z)/It.z)]}}),P$1=()=>{b$1.clear()},CENTER=0,AVERAGE=1,SAH=2,CONTAINED=2,TRIANGLE_INTERSECT_COST=1.25,TRAVERSAL_COST=1,BYTES_PER_NODE=6*4+4+4,IS_LEAFNODE_FLAG=65535,FLOAT32_EPSILON=Math.pow(2,-24),SKIP_GENERATION=Symbol("SKIP_GENERATION");function getVertexCount$1(v){return v.index?v.index.count:v.attributes.position.count}function getTriCount$1(v){return getVertexCount$1(v)/3}function getIndexArray$1(v,e=ArrayBuffer){return v>65535?new Uint32Array(new e(4*v)):new Uint16Array(new e(2*v))}function ensureIndex$1(v,e){if(!v.index){const r=v.attributes.position.count,o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=getIndexArray$1(r,o);v.setIndex(new BufferAttribute(V,1));for(let le=0;le<r;le++)V[le]=le}}function getFullGeometryRange(v,e){const r=getTriCount$1(v),o=e||v.drawRange,V=o.start/3,le=(o.start+o.count)/3,fe=Math.max(0,V),Le=Math.min(r,le)-fe;return[{offset:Math.floor(fe),count:Math.floor(Le)}]}function getRootIndexRanges(v,e){if(!v.groups||!v.groups.length)return getFullGeometryRange(v,e);const r=[],o=new Set,V=e||v.drawRange,le=V.start/3,fe=(V.start+V.count)/3;for(const Ce of v.groups){const Re=Ce.start/3,Pe=(Ce.start+Ce.count)/3;o.add(Math.max(le,Re)),o.add(Math.min(fe,Pe))}const Le=Array.from(o.values()).sort((Ce,Re)=>Ce-Re);for(let Ce=0;Ce<Le.length-1;Ce++){const Re=Le[Ce],Pe=Le[Ce+1];r.push({offset:Math.floor(Re),count:Math.floor(Pe-Re)})}return r}function hasGroupGaps(v,e){const r=getTriCount$1(v),o=getRootIndexRanges(v,e).sort((fe,Le)=>fe.offset-Le.offset),V=o[o.length-1];V.count=Math.min(r-V.offset,V.count);let le=0;return o.forEach(({count:fe})=>le+=fe),r!==le}function getBounds(v,e,r,o,V){let le=1/0,fe=1/0,Le=1/0,Ce=-1/0,Re=-1/0,Pe=-1/0,ze=1/0,Fe=1/0,ke=1/0,Gt=-1/0,Vt=-1/0,Xt=-1/0;for(let xt=e*6,Zt=(e+r)*6;xt<Zt;xt+=6){const wt=v[xt+0],Wt=v[xt+1],It=wt-Wt,Nt=wt+Wt;It<le&&(le=It),Nt>Ce&&(Ce=Nt),wt<ze&&(ze=wt),wt>Gt&&(Gt=wt);const Ft=v[xt+2],Ht=v[xt+3],Kt=Ft-Ht,Yt=Ft+Ht;Kt<fe&&(fe=Kt),Yt>Re&&(Re=Yt),Ft<Fe&&(Fe=Ft),Ft>Vt&&(Vt=Ft);const jt=v[xt+4],n0=v[xt+5],a0=jt-n0,l0=jt+n0;a0<Le&&(Le=a0),l0>Pe&&(Pe=l0),jt<ke&&(ke=jt),jt>Xt&&(Xt=jt)}o[0]=le,o[1]=fe,o[2]=Le,o[3]=Ce,o[4]=Re,o[5]=Pe,V[0]=ze,V[1]=Fe,V[2]=ke,V[3]=Gt,V[4]=Vt,V[5]=Xt}function computeTriangleBounds(v,e=null,r=null,o=null){const V=v.attributes.position,le=v.index?v.index.array:null,fe=getTriCount$1(v),Le=V.normalized;let Ce;e===null?(Ce=new Float32Array(fe*6),r=0,o=fe):(Ce=e,r=r||0,o=o||fe);const Re=V.array,Pe=V.offset||0;let ze=3;V.isInterleavedBufferAttribute&&(ze=V.data.stride);const Fe=["getX","getY","getZ"];for(let ke=r;ke<r+o;ke++){const Gt=ke*3,Vt=ke*6;let Xt=Gt+0,xt=Gt+1,Zt=Gt+2;le&&(Xt=le[Xt],xt=le[xt],Zt=le[Zt]),Le||(Xt=Xt*ze+Pe,xt=xt*ze+Pe,Zt=Zt*ze+Pe);for(let wt=0;wt<3;wt++){let Wt,It,Nt;Le?(Wt=V[Fe[wt]](Xt),It=V[Fe[wt]](xt),Nt=V[Fe[wt]](Zt)):(Wt=Re[Xt+wt],It=Re[xt+wt],Nt=Re[Zt+wt]);let Ft=Wt;It<Ft&&(Ft=It),Nt<Ft&&(Ft=Nt);let Ht=Wt;It>Ht&&(Ht=It),Nt>Ht&&(Ht=Nt);const Kt=(Ht-Ft)/2,Yt=wt*2;Ce[Vt+Yt+0]=Ft+Kt,Ce[Vt+Yt+1]=Kt+(Math.abs(Ft)+Kt)*FLOAT32_EPSILON}}return Ce}function arrayToBox(v,e,r){return r.min.x=e[v],r.min.y=e[v+1],r.min.z=e[v+2],r.max.x=e[v+3],r.max.y=e[v+4],r.max.z=e[v+5],r}function getLongestEdgeIndex(v){let e=-1,r=-1/0;for(let o=0;o<3;o++){const V=v[o+3]-v[o];V>r&&(r=V,e=o)}return e}function copyBounds(v,e){e.set(v)}function unionBounds(v,e,r){let o,V;for(let le=0;le<3;le++){const fe=le+3;o=v[le],V=e[le],r[le]=o<V?o:V,o=v[fe],V=e[fe],r[fe]=o>V?o:V}}function expandByTriangleBounds(v,e,r){for(let o=0;o<3;o++){const V=e[v+2*o],le=e[v+2*o+1],fe=V-le,Le=V+le;fe<r[o]&&(r[o]=fe),Le>r[o+3]&&(r[o+3]=Le)}}function computeSurfaceArea(v){const e=v[3]-v[0],r=v[4]-v[1],o=v[5]-v[2];return 2*(e*r+r*o+o*e)}const BIN_COUNT=32,binsSort=(v,e)=>v.candidate-e.candidate,sahBins=new Array(BIN_COUNT).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),leftBounds=new Float32Array(6);function getOptimalSplit(v,e,r,o,V,le){let fe=-1,Le=0;if(le===CENTER)fe=getLongestEdgeIndex(e),fe!==-1&&(Le=(e[fe]+e[fe+3])/2);else if(le===AVERAGE)fe=getLongestEdgeIndex(v),fe!==-1&&(Le=getAverage(r,o,V,fe));else if(le===SAH){const Ce=computeSurfaceArea(v);let Re=TRIANGLE_INTERSECT_COST*V;const Pe=o*6,ze=(o+V)*6;for(let Fe=0;Fe<3;Fe++){const ke=e[Fe],Xt=(e[Fe+3]-ke)/BIN_COUNT;if(V<BIN_COUNT/4){const xt=[...sahBins];xt.length=V;let Zt=0;for(let Wt=Pe;Wt<ze;Wt+=6,Zt++){const It=xt[Zt];It.candidate=r[Wt+2*Fe],It.count=0;const{bounds:Nt,leftCacheBounds:Ft,rightCacheBounds:Ht}=It;for(let Kt=0;Kt<3;Kt++)Ht[Kt]=1/0,Ht[Kt+3]=-1/0,Ft[Kt]=1/0,Ft[Kt+3]=-1/0,Nt[Kt]=1/0,Nt[Kt+3]=-1/0;expandByTriangleBounds(Wt,r,Nt)}xt.sort(binsSort);let wt=V;for(let Wt=0;Wt<wt;Wt++){const It=xt[Wt];for(;Wt+1<wt&&xt[Wt+1].candidate===It.candidate;)xt.splice(Wt+1,1),wt--}for(let Wt=Pe;Wt<ze;Wt+=6){const It=r[Wt+2*Fe];for(let Nt=0;Nt<wt;Nt++){const Ft=xt[Nt];It>=Ft.candidate?expandByTriangleBounds(Wt,r,Ft.rightCacheBounds):(expandByTriangleBounds(Wt,r,Ft.leftCacheBounds),Ft.count++)}}for(let Wt=0;Wt<wt;Wt++){const It=xt[Wt],Nt=It.count,Ft=V-It.count,Ht=It.leftCacheBounds,Kt=It.rightCacheBounds;let Yt=0;Nt!==0&&(Yt=computeSurfaceArea(Ht)/Ce);let jt=0;Ft!==0&&(jt=computeSurfaceArea(Kt)/Ce);const n0=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(Yt*Nt+jt*Ft);n0<Re&&(fe=Fe,Re=n0,Le=It.candidate)}}else{for(let wt=0;wt<BIN_COUNT;wt++){const Wt=sahBins[wt];Wt.count=0,Wt.candidate=ke+Xt+wt*Xt;const It=Wt.bounds;for(let Nt=0;Nt<3;Nt++)It[Nt]=1/0,It[Nt+3]=-1/0}for(let wt=Pe;wt<ze;wt+=6){let Nt=~~((r[wt+2*Fe]-ke)/Xt);Nt>=BIN_COUNT&&(Nt=BIN_COUNT-1);const Ft=sahBins[Nt];Ft.count++,expandByTriangleBounds(wt,r,Ft.bounds)}const xt=sahBins[BIN_COUNT-1];copyBounds(xt.bounds,xt.rightCacheBounds);for(let wt=BIN_COUNT-2;wt>=0;wt--){const Wt=sahBins[wt],It=sahBins[wt+1];unionBounds(Wt.bounds,It.rightCacheBounds,Wt.rightCacheBounds)}let Zt=0;for(let wt=0;wt<BIN_COUNT-1;wt++){const Wt=sahBins[wt],It=Wt.count,Nt=Wt.bounds,Ht=sahBins[wt+1].rightCacheBounds;It!==0&&(Zt===0?copyBounds(Nt,leftBounds):unionBounds(Nt,leftBounds,leftBounds)),Zt+=It;let Kt=0,Yt=0;Zt!==0&&(Kt=computeSurfaceArea(leftBounds)/Ce);const jt=V-Zt;jt!==0&&(Yt=computeSurfaceArea(Ht)/Ce);const n0=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(Kt*Zt+Yt*jt);n0<Re&&(fe=Fe,Re=n0,Le=Wt.candidate)}}}}else console.warn(`MeshBVH: Invalid build strategy value ${le} used.`);return{axis:fe,pos:Le}}function getAverage(v,e,r,o){let V=0;for(let le=e,fe=e+r;le<fe;le++)V+=v[le*6+o*2];return V/r}class MeshBVHNode{constructor(){this.boundingData=new Float32Array(6)}}function partition(v,e,r,o,V,le){let fe=o,Le=o+V-1;const Ce=le.pos,Re=le.axis*2;for(;;){for(;fe<=Le&&r[fe*6+Re]<Ce;)fe++;for(;fe<=Le&&r[Le*6+Re]>=Ce;)Le--;if(fe<Le){for(let Pe=0;Pe<3;Pe++){let ze=e[fe*3+Pe];e[fe*3+Pe]=e[Le*3+Pe],e[Le*3+Pe]=ze}for(let Pe=0;Pe<6;Pe++){let ze=r[fe*6+Pe];r[fe*6+Pe]=r[Le*6+Pe],r[Le*6+Pe]=ze}fe++,Le--}else return fe}}function partition_indirect(v,e,r,o,V,le){let fe=o,Le=o+V-1;const Ce=le.pos,Re=le.axis*2;for(;;){for(;fe<=Le&&r[fe*6+Re]<Ce;)fe++;for(;fe<=Le&&r[Le*6+Re]>=Ce;)Le--;if(fe<Le){let Pe=v[fe];v[fe]=v[Le],v[Le]=Pe;for(let ze=0;ze<6;ze++){let Fe=r[fe*6+ze];r[fe*6+ze]=r[Le*6+ze],r[Le*6+ze]=Fe}fe++,Le--}else return fe}}function IS_LEAF(v,e){return e[v+15]===65535}function OFFSET(v,e){return e[v+6]}function COUNT(v,e){return e[v+14]}function LEFT_NODE(v){return v+8}function RIGHT_NODE(v,e){return e[v+6]}function SPLIT_AXIS(v,e){return e[v+7]}function BOUNDING_DATA_INDEX(v){return v}let float32Array,uint32Array,uint16Array,uint8Array;const MAX_POINTER=Math.pow(2,32);function countNodes(v){return"count"in v?1:1+countNodes(v.left)+countNodes(v.right)}function populateBuffer(v,e,r){return float32Array=new Float32Array(r),uint32Array=new Uint32Array(r),uint16Array=new Uint16Array(r),uint8Array=new Uint8Array(r),_populateBuffer(v,e)}function _populateBuffer(v,e){const r=v/4,o=v/2,V="count"in e,le=e.boundingData;for(let fe=0;fe<6;fe++)float32Array[r+fe]=le[fe];if(V)if(e.buffer){const fe=e.buffer;uint8Array.set(new Uint8Array(fe),v);for(let Le=v,Ce=v+fe.byteLength;Le<Ce;Le+=BYTES_PER_NODE){const Re=Le/2;IS_LEAF(Re,uint16Array)||(uint32Array[Le/4+6]+=r)}return v+fe.byteLength}else{const fe=e.offset,Le=e.count;return uint32Array[r+6]=fe,uint16Array[o+14]=Le,uint16Array[o+15]=IS_LEAFNODE_FLAG,v+BYTES_PER_NODE}else{const fe=e.left,Le=e.right,Ce=e.splitAxis;let Re;if(Re=_populateBuffer(v+BYTES_PER_NODE,fe),Re/4>MAX_POINTER)throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return uint32Array[r+6]=Re/4,Re=_populateBuffer(Re,Le),uint32Array[r+7]=Ce,Re}}function generateIndirectBuffer(v,e){const r=(v.index?v.index.count:v.attributes.position.count)/3,o=r>Ln(2,16),V=o?4:2,le=e?new SharedArrayBuffer(r*V):new ArrayBuffer(r*V),fe=o?new Uint32Array(le):new Uint16Array(le);for(let Le=0,Ce=fe.length;Le<Ce;Le++)fe[Le]=Le;return fe}function buildTree(v,e,r,o,V){const{maxDepth:le,verbose:fe,maxLeafTris:Le,strategy:Ce,onProgress:Re,indirect:Pe}=V,ze=v._indirectBuffer,Fe=v.geometry,ke=Fe.index?Fe.index.array:null,Gt=Pe?partition_indirect:partition,Vt=getTriCount$1(Fe),Xt=new Float32Array(6);let xt=!1;const Zt=new MeshBVHNode;return getBounds(e,r,o,Zt.boundingData,Xt),Wt(Zt,r,o,Xt),Zt;function wt(It){Re&&Re(It/Vt)}function Wt(It,Nt,Ft,Ht=null,Kt=0){if(!xt&&Kt>=le&&(xt=!0,fe&&(console.warn(`MeshBVH: Max depth of ${le} reached when generating BVH. Consider increasing maxDepth.`),console.warn(Fe))),Ft<=Le||Kt>=le)return wt(Nt+Ft),It.offset=Nt,It.count=Ft,It;const Yt=getOptimalSplit(It.boundingData,Ht,e,Nt,Ft,Ce);if(Yt.axis===-1)return wt(Nt+Ft),It.offset=Nt,It.count=Ft,It;const jt=Gt(ze,ke,e,Nt,Ft,Yt);if(jt===Nt||jt===Nt+Ft)wt(Nt+Ft),It.offset=Nt,It.count=Ft;else{It.splitAxis=Yt.axis;const n0=new MeshBVHNode,a0=Nt,l0=jt-Nt;It.left=n0,getBounds(e,a0,l0,n0.boundingData,Xt),Wt(n0,a0,l0,Xt,Kt+1);const s0=new MeshBVHNode,$t=jt,qt=Ft-l0;It.right=s0,getBounds(e,$t,qt,s0.boundingData,Xt),Wt(s0,$t,qt,Xt,Kt+1)}return It}}function buildPackedTree(v,e){const r=v.geometry;e.indirect&&(v._indirectBuffer=generateIndirectBuffer(r,e.useSharedArrayBuffer),hasGroupGaps(r,e.range)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),v._indirectBuffer||ensureIndex$1(r,e);const o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=computeTriangleBounds(r),le=e.indirect?getFullGeometryRange(r,e.range):getRootIndexRanges(r,e.range);v._roots=le.map(fe=>{const Le=buildTree(v,V,fe.offset,fe.count,e),Ce=countNodes(Le),Re=new o(BYTES_PER_NODE*Ce);return populateBuffer(0,Le,Re),Re})}class SeparatingAxisBounds{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,r){let o=1/0,V=-1/0;for(let le=0,fe=e.length;le<fe;le++){const Ce=e[le][r];o=Ce<o?Ce:o,V=Ce>V?Ce:V}this.min=o,this.max=V}setFromPoints(e,r){let o=1/0,V=-1/0;for(let le=0,fe=r.length;le<fe;le++){const Le=r[le],Ce=e.dot(Le);o=Ce<o?Ce:o,V=Ce>V?Ce:V}this.min=o,this.max=V}isSeparated(e){return this.min>e.max||e.min>this.max}}SeparatingAxisBounds.prototype.setFromBox=function(){const v=new Vector3;return function(r,o){const V=o.min,le=o.max;let fe=1/0,Le=-1/0;for(let Ce=0;Ce<=1;Ce++)for(let Re=0;Re<=1;Re++)for(let Pe=0;Pe<=1;Pe++){v.x=V.x*Ce+le.x*(1-Ce),v.y=V.y*Re+le.y*(1-Re),v.z=V.z*Pe+le.z*(1-Pe);const ze=r.dot(v);fe=Math.min(ze,fe),Le=Math.max(ze,Le)}this.min=fe,this.max=Le}}();const closestPointLineToLine=function(){const v=new Vector3,e=new Vector3,r=new Vector3;return function(V,le,fe){const Le=V.start,Ce=v,Re=le.start,Pe=e;r.subVectors(Le,Re),v.subVectors(V.end,V.start),e.subVectors(le.end,le.start);const ze=r.dot(Pe),Fe=Pe.dot(Ce),ke=Pe.dot(Pe),Gt=r.dot(Ce),Xt=Ce.dot(Ce)*ke-Fe*Fe;let xt,Zt;Xt!==0?xt=(ze*Fe-Gt*ke)/Xt:xt=0,Zt=(ze+xt*Fe)/ke,fe.x=xt,fe.y=Zt}}(),closestPointsSegmentToSegment=function(){const v=new Vector2,e=new Vector3,r=new Vector3;return function(V,le,fe,Le){closestPointLineToLine(V,le,v);let Ce=v.x,Re=v.y;if(Ce>=0&&Ce<=1&&Re>=0&&Re<=1){V.at(Ce,fe),le.at(Re,Le);return}else if(Ce>=0&&Ce<=1){Re<0?le.at(0,Le):le.at(1,Le),V.closestPointToPoint(Le,!0,fe);return}else if(Re>=0&&Re<=1){Ce<0?V.at(0,fe):V.at(1,fe),le.closestPointToPoint(fe,!0,Le);return}else{let Pe;Ce<0?Pe=V.start:Pe=V.end;let ze;Re<0?ze=le.start:ze=le.end;const Fe=e,ke=r;if(V.closestPointToPoint(ze,!0,e),le.closestPointToPoint(Pe,!0,r),Fe.distanceToSquared(ze)<=ke.distanceToSquared(Pe)){fe.copy(Fe),Le.copy(ze);return}else{fe.copy(Pe),Le.copy(ke);return}}}}(),sphereIntersectTriangle=function(){const v=new Vector3,e=new Vector3,r=new Plane$1,o=new Line3;return function(le,fe){const{radius:Le,center:Ce}=le,{a:Re,b:Pe,c:ze}=fe;if(o.start=Re,o.end=Pe,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le||(o.start=Re,o.end=ze,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le)||(o.start=Pe,o.end=ze,o.closestPointToPoint(Ce,!0,v).distanceTo(Ce)<=Le))return!0;const Vt=fe.getPlane(r);if(Math.abs(Vt.distanceToPoint(Ce))<=Le){const xt=Vt.projectPoint(Ce,e);if(fe.containsPoint(xt))return!0}return!1}}(),ZERO_EPSILON=1e-15;function isNearZero(v){return Math.abs(v)<ZERO_EPSILON}class ExtendedTriangle extends Triangle{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map(()=>new Vector3),this.satBounds=new Array(4).fill().map(()=>new SeparatingAxisBounds),this.points=[this.a,this.b,this.c],this.sphere=new Sphere$1,this.plane=new Plane$1,this.needsUpdate=!0}intersectsSphere(e){return sphereIntersectTriangle(e,this)}update(){const e=this.a,r=this.b,o=this.c,V=this.points,le=this.satAxes,fe=this.satBounds,Le=le[0],Ce=fe[0];this.getNormal(Le),Ce.setFromPoints(Le,V);const Re=le[1],Pe=fe[1];Re.subVectors(e,r),Pe.setFromPoints(Re,V);const ze=le[2],Fe=fe[2];ze.subVectors(r,o),Fe.setFromPoints(ze,V);const ke=le[3],Gt=fe[3];ke.subVectors(o,e),Gt.setFromPoints(ke,V),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(Le,e),this.needsUpdate=!1}}ExtendedTriangle.prototype.closestPointToSegment=function(){const v=new Vector3,e=new Vector3,r=new Line3;return function(V,le=null,fe=null){const{start:Le,end:Ce}=V,Re=this.points;let Pe,ze=1/0;for(let Fe=0;Fe<3;Fe++){const ke=(Fe+1)%3;r.start.copy(Re[Fe]),r.end.copy(Re[ke]),closestPointsSegmentToSegment(r,V,v,e),Pe=v.distanceToSquared(e),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(e))}return this.closestPointToPoint(Le,v),Pe=Le.distanceToSquared(v),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(Le)),this.closestPointToPoint(Ce,v),Pe=Ce.distanceToSquared(v),Pe<ze&&(ze=Pe,le&&le.copy(v),fe&&fe.copy(Ce)),Math.sqrt(ze)}}();ExtendedTriangle.prototype.intersectsTriangle=function(){const v=new ExtendedTriangle,e=new Array(3),r=new Array(3),o=new SeparatingAxisBounds,V=new SeparatingAxisBounds,le=new Vector3,fe=new Vector3,Le=new Vector3,Ce=new Vector3,Re=new Vector3,Pe=new Line3,ze=new Line3,Fe=new Line3,ke=new Vector3;function Gt(Vt,Xt,xt){const Zt=Vt.points;let wt=0,Wt=-1;for(let It=0;It<3;It++){const{start:Nt,end:Ft}=Pe;Nt.copy(Zt[It]),Ft.copy(Zt[(It+1)%3]),Pe.delta(fe);const Ht=isNearZero(Xt.distanceToPoint(Nt));if(isNearZero(Xt.normal.dot(fe))&&Ht){xt.copy(Pe),wt=2;break}const Kt=Xt.intersectLine(Pe,ke);if(!Kt&&Ht&&ke.copy(Nt),(Kt||Ht)&&!isNearZero(ke.distanceTo(Ft))){if(wt<=1)(wt===1?xt.start:xt.end).copy(ke),Ht&&(Wt=wt);else if(wt>=2){(Wt===1?xt.start:xt.end).copy(ke),wt=2;break}if(wt++,wt===2&&Wt===-1)break}}return wt}return function(Xt,xt=null,Zt=!1){this.needsUpdate&&this.update(),Xt.isExtendedTriangle?Xt.needsUpdate&&Xt.update():(v.copy(Xt),v.update(),Xt=v);const wt=this.plane,Wt=Xt.plane;if(Math.abs(wt.normal.dot(Wt.normal))>1-1e-10){const It=this.satBounds,Nt=this.satAxes;r[0]=Xt.a,r[1]=Xt.b,r[2]=Xt.c;for(let Kt=0;Kt<4;Kt++){const Yt=It[Kt],jt=Nt[Kt];if(o.setFromPoints(jt,r),Yt.isSeparated(o))return!1}const Ft=Xt.satBounds,Ht=Xt.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let Kt=0;Kt<4;Kt++){const Yt=Ft[Kt],jt=Ht[Kt];if(o.setFromPoints(jt,e),Yt.isSeparated(o))return!1}for(let Kt=0;Kt<4;Kt++){const Yt=Nt[Kt];for(let jt=0;jt<4;jt++){const n0=Ht[jt];if(le.crossVectors(Yt,n0),o.setFromPoints(le,e),V.setFromPoints(le,r),o.isSeparated(V))return!1}}return xt&&(Zt||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),xt.start.set(0,0,0),xt.end.set(0,0,0)),!0}else{const It=Gt(this,Wt,ze);if(It===1&&Xt.containsPoint(ze.end))return xt&&(xt.start.copy(ze.end),xt.end.copy(ze.end)),!0;if(It!==2)return!1;const Nt=Gt(Xt,wt,Fe);if(Nt===1&&this.containsPoint(Fe.end))return xt&&(xt.start.copy(Fe.end),xt.end.copy(Fe.end)),!0;if(Nt!==2)return!1;if(ze.delta(Le),Fe.delta(Ce),Le.dot(Ce)<0){let a0=Fe.start;Fe.start=Fe.end,Fe.end=a0}const Ft=ze.start.dot(Le),Ht=ze.end.dot(Le),Kt=Fe.start.dot(Le),Yt=Fe.end.dot(Le),jt=Ht<Kt,n0=Ft<Yt;return Ft!==Yt&&Kt!==Ht&&jt===n0?!1:(xt&&(Re.subVectors(ze.start,Fe.start),Re.dot(Le)>0?xt.start.copy(ze.start):xt.start.copy(Fe.start),Re.subVectors(ze.end,Fe.end),Re.dot(Le)<0?xt.end.copy(ze.end):xt.end.copy(Fe.end)),!0)}}}();ExtendedTriangle.prototype.distanceToPoint=function(){const v=new Vector3;return function(r){return this.closestPointToPoint(r,v),r.distanceTo(v)}}();ExtendedTriangle.prototype.distanceToTriangle=function(){const v=new Vector3,e=new Vector3,r=["a","b","c"],o=new Line3,V=new Line3;return function(fe,Le=null,Ce=null){const Re=Le||Ce?o:null;if(this.intersectsTriangle(fe,Re))return(Le||Ce)&&(Le&&Re.getCenter(Le),Ce&&Re.getCenter(Ce)),0;let Pe=1/0;for(let ze=0;ze<3;ze++){let Fe;const ke=r[ze],Gt=fe[ke];this.closestPointToPoint(Gt,v),Fe=Gt.distanceToSquared(v),Fe<Pe&&(Pe=Fe,Le&&Le.copy(v),Ce&&Ce.copy(Gt));const Vt=this[ke];fe.closestPointToPoint(Vt,v),Fe=Vt.distanceToSquared(v),Fe<Pe&&(Pe=Fe,Le&&Le.copy(Vt),Ce&&Ce.copy(v))}for(let ze=0;ze<3;ze++){const Fe=r[ze],ke=r[(ze+1)%3];o.set(this[Fe],this[ke]);for(let Gt=0;Gt<3;Gt++){const Vt=r[Gt],Xt=r[(Gt+1)%3];V.set(fe[Vt],fe[Xt]),closestPointsSegmentToSegment(o,V,v,e);const xt=v.distanceToSquared(e);xt<Pe&&(Pe=xt,Le&&Le.copy(v),Ce&&Ce.copy(e))}}return Math.sqrt(Pe)}}();class OrientedBox{constructor(e,r,o){this.isOrientedBox=!0,this.min=new Vector3,this.max=new Vector3,this.matrix=new Matrix4,this.invMatrix=new Matrix4,this.points=new Array(8).fill().map(()=>new Vector3),this.satAxes=new Array(3).fill().map(()=>new Vector3),this.satBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds),this.alignedSatBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds),this.needsUpdate=!1,e&&this.min.copy(e),r&&this.max.copy(r),o&&this.matrix.copy(o)}set(e,r,o){this.min.copy(e),this.max.copy(r),this.matrix.copy(o),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}OrientedBox.prototype.update=function(){return function(){const e=this.matrix,r=this.min,o=this.max,V=this.points;for(let Re=0;Re<=1;Re++)for(let Pe=0;Pe<=1;Pe++)for(let ze=0;ze<=1;ze++){const Fe=1*Re|2*Pe|4*ze,ke=V[Fe];ke.x=Re?o.x:r.x,ke.y=Pe?o.y:r.y,ke.z=ze?o.z:r.z,ke.applyMatrix4(e)}const le=this.satBounds,fe=this.satAxes,Le=V[0];for(let Re=0;Re<3;Re++){const Pe=fe[Re],ze=le[Re],Fe=1<<Re,ke=V[Fe];Pe.subVectors(Le,ke),ze.setFromPoints(Pe,V)}const Ce=this.alignedSatBounds;Ce[0].setFromPointsField(V,"x"),Ce[1].setFromPointsField(V,"y"),Ce[2].setFromPointsField(V,"z"),this.invMatrix.copy(this.matrix).invert(),this.needsUpdate=!1}}();OrientedBox.prototype.intersectsBox=function(){const v=new SeparatingAxisBounds;return function(r){this.needsUpdate&&this.update();const o=r.min,V=r.max,le=this.satBounds,fe=this.satAxes,Le=this.alignedSatBounds;if(v.min=o.x,v.max=V.x,Le[0].isSeparated(v)||(v.min=o.y,v.max=V.y,Le[1].isSeparated(v))||(v.min=o.z,v.max=V.z,Le[2].isSeparated(v)))return!1;for(let Ce=0;Ce<3;Ce++){const Re=fe[Ce],Pe=le[Ce];if(v.setFromBox(Re,r),Pe.isSeparated(v))return!1}return!0}}();OrientedBox.prototype.intersectsTriangle=function(){const v=new ExtendedTriangle,e=new Array(3),r=new SeparatingAxisBounds,o=new SeparatingAxisBounds,V=new Vector3;return function(fe){this.needsUpdate&&this.update(),fe.isExtendedTriangle?fe.needsUpdate&&fe.update():(v.copy(fe),v.update(),fe=v);const Le=this.satBounds,Ce=this.satAxes;e[0]=fe.a,e[1]=fe.b,e[2]=fe.c;for(let Fe=0;Fe<3;Fe++){const ke=Le[Fe],Gt=Ce[Fe];if(r.setFromPoints(Gt,e),ke.isSeparated(r))return!1}const Re=fe.satBounds,Pe=fe.satAxes,ze=this.points;for(let Fe=0;Fe<3;Fe++){const ke=Re[Fe],Gt=Pe[Fe];if(r.setFromPoints(Gt,ze),ke.isSeparated(r))return!1}for(let Fe=0;Fe<3;Fe++){const ke=Ce[Fe];for(let Gt=0;Gt<4;Gt++){const Vt=Pe[Gt];if(V.crossVectors(ke,Vt),r.setFromPoints(V,e),o.setFromPoints(V,ze),r.isSeparated(o))return!1}}return!0}}();OrientedBox.prototype.closestPointToPoint=function(){return function(e,r){return this.needsUpdate&&this.update(),r.copy(e).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix),r}}();OrientedBox.prototype.distanceToPoint=function(){const v=new Vector3;return function(r){return this.closestPointToPoint(r,v),r.distanceTo(v)}}();OrientedBox.prototype.distanceToBox=function(){const v=["x","y","z"],e=new Array(12).fill().map(()=>new Line3),r=new Array(12).fill().map(()=>new Line3),o=new Vector3,V=new Vector3;return function(fe,Le=0,Ce=null,Re=null){if(this.needsUpdate&&this.update(),this.intersectsBox(fe))return(Ce||Re)&&(fe.getCenter(V),this.closestPointToPoint(V,o),fe.closestPointToPoint(o,V),Ce&&Ce.copy(o),Re&&Re.copy(V)),0;const Pe=Le*Le,ze=fe.min,Fe=fe.max,ke=this.points;let Gt=1/0;for(let Xt=0;Xt<8;Xt++){const xt=ke[Xt];V.copy(xt).clamp(ze,Fe);const Zt=xt.distanceToSquared(V);if(Zt<Gt&&(Gt=Zt,Ce&&Ce.copy(xt),Re&&Re.copy(V),Zt<Pe))return Math.sqrt(Zt)}let Vt=0;for(let Xt=0;Xt<3;Xt++)for(let xt=0;xt<=1;xt++)for(let Zt=0;Zt<=1;Zt++){const wt=(Xt+1)%3,Wt=(Xt+2)%3,It=xt<<wt|Zt<<Wt,Nt=1<<Xt|xt<<wt|Zt<<Wt,Ft=ke[It],Ht=ke[Nt];e[Vt].set(Ft,Ht);const Yt=v[Xt],jt=v[wt],n0=v[Wt],a0=r[Vt],l0=a0.start,s0=a0.end;l0[Yt]=ze[Yt],l0[jt]=xt?ze[jt]:Fe[jt],l0[n0]=Zt?ze[n0]:Fe[jt],s0[Yt]=Fe[Yt],s0[jt]=xt?ze[jt]:Fe[jt],s0[n0]=Zt?ze[n0]:Fe[jt],Vt++}for(let Xt=0;Xt<=1;Xt++)for(let xt=0;xt<=1;xt++)for(let Zt=0;Zt<=1;Zt++){V.x=Xt?Fe.x:ze.x,V.y=xt?Fe.y:ze.y,V.z=Zt?Fe.z:ze.z,this.closestPointToPoint(V,o);const wt=V.distanceToSquared(o);if(wt<Gt&&(Gt=wt,Ce&&Ce.copy(o),Re&&Re.copy(V),wt<Pe))return Math.sqrt(wt)}for(let Xt=0;Xt<12;Xt++){const xt=e[Xt];for(let Zt=0;Zt<12;Zt++){const wt=r[Zt];closestPointsSegmentToSegment(xt,wt,o,V);const Wt=o.distanceToSquared(V);if(Wt<Gt&&(Gt=Wt,Ce&&Ce.copy(o),Re&&Re.copy(V),Wt<Pe))return Math.sqrt(Wt)}}return Math.sqrt(Gt)}}();class PrimitivePool{constructor(e){this._getNewPrimitive=e,this._primitives=[]}getPrimitive(){const e=this._primitives;return e.length===0?this._getNewPrimitive():e.pop()}releasePrimitive(e){this._primitives.push(e)}}class ExtendedTrianglePoolBase extends PrimitivePool{constructor(){super(()=>new ExtendedTriangle)}}const ExtendedTrianglePool=new ExtendedTrianglePoolBase;class _BufferStack{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let r=null;this.setBuffer=o=>{r&&e.push(r),r=o,this.float32Array=new Float32Array(o),this.uint16Array=new Uint16Array(o),this.uint32Array=new Uint32Array(o)},this.clearBuffer=()=>{r=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const BufferStack=new _BufferStack;let _box1,_box2;const boxStack=[],boxPool=new PrimitivePool(()=>new Box3);function shapecast(v,e,r,o,V,le){_box1=boxPool.getPrimitive(),_box2=boxPool.getPrimitive(),boxStack.push(_box1,_box2),BufferStack.setBuffer(v._roots[e]);const fe=shapecastTraverse(0,v.geometry,r,o,V,le);BufferStack.clearBuffer(),boxPool.releasePrimitive(_box1),boxPool.releasePrimitive(_box2),boxStack.pop(),boxStack.pop();const Le=boxStack.length;return Le>0&&(_box2=boxStack[Le-1],_box1=boxStack[Le-2]),fe}function shapecastTraverse(v,e,r,o,V=null,le=0,fe=0){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack;let Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);return arrayToBox(v,Le,_box1),o(Fe,ke,!1,fe,le+v,_box1)}else{let Yt=function(n0){const{uint16Array:a0,uint32Array:l0}=BufferStack;let s0=n0*2;for(;!IS_LEAF(s0,a0);)n0=LEFT_NODE(n0),s0=n0*2;return OFFSET(n0,l0)},jt=function(n0){const{uint16Array:a0,uint32Array:l0}=BufferStack;let s0=n0*2;for(;!IS_LEAF(s0,a0);)n0=RIGHT_NODE(n0,l0),s0=n0*2;return OFFSET(n0,l0)+COUNT(s0,a0)};const Fe=LEFT_NODE(v),ke=RIGHT_NODE(v,Re);let Gt=Fe,Vt=ke,Xt,xt,Zt,wt;if(V&&(Zt=_box1,wt=_box2,arrayToBox(Gt,Le,Zt),arrayToBox(Vt,Le,wt),Xt=V(Zt),xt=V(wt),xt<Xt)){Gt=ke,Vt=Fe;const n0=Xt;Xt=xt,xt=n0,Zt=wt}Zt||(Zt=_box1,arrayToBox(Gt,Le,Zt));const Wt=IS_LEAF(Gt*2,Ce),It=r(Zt,Wt,Xt,fe+1,le+Gt);let Nt;if(It===CONTAINED){const n0=Yt(Gt),l0=jt(Gt)-n0;Nt=o(n0,l0,!0,fe+1,le+Gt,Zt)}else Nt=It&&shapecastTraverse(Gt,e,r,o,V,le,fe+1);if(Nt)return!0;wt=_box2,arrayToBox(Vt,Le,wt);const Ft=IS_LEAF(Vt*2,Ce),Ht=r(wt,Ft,xt,fe+1,le+Vt);let Kt;if(Ht===CONTAINED){const n0=Yt(Vt),l0=jt(Vt)-n0;Kt=o(n0,l0,!0,fe+1,le+Vt,wt)}else Kt=Ht&&shapecastTraverse(Vt,e,r,o,V,le,fe+1);return!!Kt}}const temp=new Vector3,temp1$2=new Vector3;function closestPointToPoint(v,e,r={},o=0,V=1/0){const le=o*o,fe=V*V;let Le=1/0,Ce=null;if(v.shapecast({boundsTraverseOrder:Pe=>(temp.copy(e).clamp(Pe.min,Pe.max),temp.distanceToSquared(e)),intersectsBounds:(Pe,ze,Fe)=>Fe<Le&&Fe<fe,intersectsTriangle:(Pe,ze)=>{Pe.closestPointToPoint(e,temp);const Fe=e.distanceToSquared(temp);return Fe<Le&&(temp1$2.copy(temp),Le=Fe,Ce=ze),Fe<le}}),Le===1/0)return null;const Re=Math.sqrt(Le);return r.point?r.point.copy(temp1$2):r.point=temp1$2.clone(),r.distance=Re,r.faceIndex=Ce,r}const IS_GT_REVISION_169=parseInt(REVISION)>=169,_vA=new Vector3,_vB=new Vector3,_vC=new Vector3,_uvA=new Vector2,_uvB=new Vector2,_uvC=new Vector2,_normalA=new Vector3,_normalB=new Vector3,_normalC=new Vector3,_intersectionPoint=new Vector3;function checkIntersection(v,e,r,o,V,le,fe,Le){let Ce;if(le===BackSide?Ce=v.intersectTriangle(o,r,e,!0,V):Ce=v.intersectTriangle(e,r,o,le!==DoubleSide,V),Ce===null)return null;const Re=v.origin.distanceTo(V);return Re<fe||Re>Le?null:{distance:Re,point:V.clone()}}function checkBufferGeometryIntersection(v,e,r,o,V,le,fe,Le,Ce,Re,Pe){_vA.fromBufferAttribute(e,le),_vB.fromBufferAttribute(e,fe),_vC.fromBufferAttribute(e,Le);const ze=checkIntersection(v,_vA,_vB,_vC,_intersectionPoint,Ce,Re,Pe);if(ze){const Fe=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA,_vB,_vC,Fe),o&&(_uvA.fromBufferAttribute(o,le),_uvB.fromBufferAttribute(o,fe),_uvC.fromBufferAttribute(o,Le),ze.uv=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2)),V&&(_uvA.fromBufferAttribute(V,le),_uvB.fromBufferAttribute(V,fe),_uvC.fromBufferAttribute(V,Le),ze.uv1=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2)),r&&(_normalA.fromBufferAttribute(r,le),_normalB.fromBufferAttribute(r,fe),_normalC.fromBufferAttribute(r,Le),ze.normal=Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_normalA,_normalB,_normalC,new Vector3),ze.normal.dot(v.direction)>0&&ze.normal.multiplyScalar(-1));const ke={a:le,b:fe,c:Le,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA,_vB,_vC,ke.normal),ze.face=ke,ze.faceIndex=le,IS_GT_REVISION_169&&(ze.barycoord=Fe)}return ze}function intersectTri(v,e,r,o,V,le,fe){const Le=o*3;let Ce=Le+0,Re=Le+1,Pe=Le+2;const ze=v.index;v.index&&(Ce=ze.getX(Ce),Re=ze.getX(Re),Pe=ze.getX(Pe));const{position:Fe,normal:ke,uv:Gt,uv1:Vt}=v.attributes,Xt=checkBufferGeometryIntersection(r,Fe,ke,Gt,Vt,Ce,Re,Pe,e,le,fe);return Xt?(Xt.faceIndex=o,V&&V.push(Xt),Xt):null}function setTriangle(v,e,r,o){const V=v.a,le=v.b,fe=v.c;let Le=e,Ce=e+1,Re=e+2;r&&(Le=r.getX(Le),Ce=r.getX(Ce),Re=r.getX(Re)),V.x=o.getX(Le),V.y=o.getY(Le),V.z=o.getZ(Le),le.x=o.getX(Ce),le.y=o.getY(Ce),le.z=o.getZ(Ce),fe.x=o.getX(Re),fe.y=o.getY(Re),fe.z=o.getZ(Re)}function intersectTris(v,e,r,o,V,le,fe,Le){const{geometry:Ce,_indirectBuffer:Re}=v;for(let Pe=o,ze=o+V;Pe<ze;Pe++)intersectTri(Ce,e,r,Pe,le,fe,Le)}function intersectClosestTri(v,e,r,o,V,le,fe){const{geometry:Le,_indirectBuffer:Ce}=v;let Re=1/0,Pe=null;for(let ze=o,Fe=o+V;ze<Fe;ze++){let ke;ke=intersectTri(Le,e,r,ze,null,le,fe),ke&&ke.distance<Re&&(Pe=ke,Re=ke.distance)}return Pe}function iterateOverTriangles(v,e,r,o,V,le,fe){const{geometry:Le}=r,{index:Ce}=Le,Re=Le.attributes.position;for(let Pe=v,ze=e+v;Pe<ze;Pe++){let Fe;if(Fe=Pe,setTriangle(fe,Fe*3,Ce,Re),fe.needsUpdate=!0,o(fe,Fe,V,le))return!0}return!1}function refit(v,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=v.geometry,o=r.index?r.index.array:null,V=r.attributes.position;let le,fe,Le,Ce,Re=0;const Pe=v._roots;for(let Fe=0,ke=Pe.length;Fe<ke;Fe++)le=Pe[Fe],fe=new Uint32Array(le),Le=new Uint16Array(le),Ce=new Float32Array(le),ze(0,Re),Re+=le.byteLength;function ze(Fe,ke,Gt=!1){const Vt=Fe*2;if(Le[Vt+15]===IS_LEAFNODE_FLAG){const xt=fe[Fe+6],Zt=Le[Vt+14];let wt=1/0,Wt=1/0,It=1/0,Nt=-1/0,Ft=-1/0,Ht=-1/0;for(let Kt=3*xt,Yt=3*(xt+Zt);Kt<Yt;Kt++){let jt=o[Kt];const n0=V.getX(jt),a0=V.getY(jt),l0=V.getZ(jt);n0<wt&&(wt=n0),n0>Nt&&(Nt=n0),a0<Wt&&(Wt=a0),a0>Ft&&(Ft=a0),l0<It&&(It=l0),l0>Ht&&(Ht=l0)}return Ce[Fe+0]!==wt||Ce[Fe+1]!==Wt||Ce[Fe+2]!==It||Ce[Fe+3]!==Nt||Ce[Fe+4]!==Ft||Ce[Fe+5]!==Ht?(Ce[Fe+0]=wt,Ce[Fe+1]=Wt,Ce[Fe+2]=It,Ce[Fe+3]=Nt,Ce[Fe+4]=Ft,Ce[Fe+5]=Ht,!0):!1}else{const xt=Fe+8,Zt=fe[Fe+6],wt=xt+ke,Wt=Zt+ke;let It=Gt,Nt=!1,Ft=!1;e?It||(Nt=e.has(wt),Ft=e.has(Wt),It=!Nt&&!Ft):(Nt=!0,Ft=!0);const Ht=It||Nt,Kt=It||Ft;let Yt=!1;Ht&&(Yt=ze(xt,ke,It));let jt=!1;Kt&&(jt=ze(Zt,ke,It));const n0=Yt||jt;if(n0)for(let a0=0;a0<3;a0++){const l0=xt+a0,s0=Zt+a0,$t=Ce[l0],qt=Ce[l0+3],e0=Ce[s0],o0=Ce[s0+3];Ce[Fe+a0]=$t<e0?$t:e0,Ce[Fe+a0+3]=qt>o0?qt:o0}return n0}}}function intersectRay(v,e,r,o,V){let le,fe,Le,Ce,Re,Pe;const ze=1/r.direction.x,Fe=1/r.direction.y,ke=1/r.direction.z,Gt=r.origin.x,Vt=r.origin.y,Xt=r.origin.z;let xt=e[v],Zt=e[v+3],wt=e[v+1],Wt=e[v+3+1],It=e[v+2],Nt=e[v+3+2];return ze>=0?(le=(xt-Gt)*ze,fe=(Zt-Gt)*ze):(le=(Zt-Gt)*ze,fe=(xt-Gt)*ze),Fe>=0?(Le=(wt-Vt)*Fe,Ce=(Wt-Vt)*Fe):(Le=(Wt-Vt)*Fe,Ce=(wt-Vt)*Fe),le>Ce||Le>fe||((Le>le||isNaN(le))&&(le=Le),(Ce<fe||isNaN(fe))&&(fe=Ce),ke>=0?(Re=(It-Xt)*ke,Pe=(Nt-Xt)*ke):(Re=(Nt-Xt)*ke,Pe=(It-Xt)*ke),le>Pe||Re>fe)?!1:((Re>le||le!==le)&&(le=Re),(Pe<fe||fe!==fe)&&(fe=Pe),le<=V&&fe>=o)}function intersectTris_indirect(v,e,r,o,V,le,fe,Le){const{geometry:Ce,_indirectBuffer:Re}=v;for(let Pe=o,ze=o+V;Pe<ze;Pe++){let Fe=Re?Re[Pe]:Pe;intersectTri(Ce,e,r,Fe,le,fe,Le)}}function intersectClosestTri_indirect(v,e,r,o,V,le,fe){const{geometry:Le,_indirectBuffer:Ce}=v;let Re=1/0,Pe=null;for(let ze=o,Fe=o+V;ze<Fe;ze++){let ke;ke=intersectTri(Le,e,r,Ce?Ce[ze]:ze,null,le,fe),ke&&ke.distance<Re&&(Pe=ke,Re=ke.distance)}return Pe}function iterateOverTriangles_indirect(v,e,r,o,V,le,fe){const{geometry:Le}=r,{index:Ce}=Le,Re=Le.attributes.position;for(let Pe=v,ze=e+v;Pe<ze;Pe++){let Fe;if(Fe=r.resolveTriangleIndex(Pe),setTriangle(fe,Fe*3,Ce,Re),fe.needsUpdate=!0,o(fe,Fe,V,le))return!0}return!1}function raycast(v,e,r,o,V,le,fe){BufferStack.setBuffer(v._roots[e]),_raycast$1(0,v,r,o,V,le,fe),BufferStack.clearBuffer()}function _raycast$1(v,e,r,o,V,le,fe){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack,Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);intersectTris(e,r,o,Fe,ke,V,le,fe)}else{const Fe=LEFT_NODE(v);intersectRay(Fe,Le,o,le,fe)&&_raycast$1(Fe,e,r,o,V,le,fe);const ke=RIGHT_NODE(v,Re);intersectRay(ke,Le,o,le,fe)&&_raycast$1(ke,e,r,o,V,le,fe)}}const _xyzFields$1=["x","y","z"];function raycastFirst(v,e,r,o,V,le){BufferStack.setBuffer(v._roots[e]);const fe=_raycastFirst$1(0,v,r,o,V,le);return BufferStack.clearBuffer(),fe}function _raycastFirst$1(v,e,r,o,V,le){const{float32Array:fe,uint16Array:Le,uint32Array:Ce}=BufferStack;let Re=v*2;if(IS_LEAF(Re,Le)){const ze=OFFSET(v,Ce),Fe=COUNT(Re,Le);return intersectClosestTri(e,r,o,ze,Fe,V,le)}else{const ze=SPLIT_AXIS(v,Ce),Fe=_xyzFields$1[ze],Gt=o.direction[Fe]>=0;let Vt,Xt;Gt?(Vt=LEFT_NODE(v),Xt=RIGHT_NODE(v,Ce)):(Vt=RIGHT_NODE(v,Ce),Xt=LEFT_NODE(v));const Zt=intersectRay(Vt,fe,o,V,le)?_raycastFirst$1(Vt,e,r,o,V,le):null;if(Zt){const It=Zt.point[Fe];if(Gt?It<=fe[Xt+ze]:It>=fe[Xt+ze+3])return Zt}const Wt=intersectRay(Xt,fe,o,V,le)?_raycastFirst$1(Xt,e,r,o,V,le):null;return Zt&&Wt?Zt.distance<=Wt.distance?Zt:Wt:Zt||Wt||null}}const boundingBox$1=new Box3,triangle$1=new ExtendedTriangle,triangle2$1=new ExtendedTriangle,invertedMat$1=new Matrix4,obb$4=new OrientedBox,obb2$3=new OrientedBox;function intersectsGeometry(v,e,r,o){BufferStack.setBuffer(v._roots[e]);const V=_intersectsGeometry$1(0,v,r,o);return BufferStack.clearBuffer(),V}function _intersectsGeometry$1(v,e,r,o,V=null){const{float32Array:le,uint16Array:fe,uint32Array:Le}=BufferStack;let Ce=v*2;if(V===null&&(r.boundingBox||r.computeBoundingBox(),obb$4.set(r.boundingBox.min,r.boundingBox.max,o),V=obb$4),IS_LEAF(Ce,fe)){const Pe=e.geometry,ze=Pe.index,Fe=Pe.attributes.position,ke=r.index,Gt=r.attributes.position,Vt=OFFSET(v,Le),Xt=COUNT(Ce,fe);if(invertedMat$1.copy(o).invert(),r.boundsTree)return arrayToBox(v,le,obb2$3),obb2$3.matrix.copy(invertedMat$1),obb2$3.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:Zt=>obb2$3.intersectsBox(Zt),intersectsTriangle:Zt=>{Zt.a.applyMatrix4(o),Zt.b.applyMatrix4(o),Zt.c.applyMatrix4(o),Zt.needsUpdate=!0;for(let wt=Vt*3,Wt=(Xt+Vt)*3;wt<Wt;wt+=3)if(setTriangle(triangle2$1,wt,ze,Fe),triangle2$1.needsUpdate=!0,Zt.intersectsTriangle(triangle2$1))return!0;return!1}});for(let xt=Vt*3,Zt=(Xt+Vt)*3;xt<Zt;xt+=3){setTriangle(triangle$1,xt,ze,Fe),triangle$1.a.applyMatrix4(invertedMat$1),triangle$1.b.applyMatrix4(invertedMat$1),triangle$1.c.applyMatrix4(invertedMat$1),triangle$1.needsUpdate=!0;for(let wt=0,Wt=ke.count;wt<Wt;wt+=3)if(setTriangle(triangle2$1,wt,ke,Gt),triangle2$1.needsUpdate=!0,triangle$1.intersectsTriangle(triangle2$1))return!0}}else{const Pe=v+8,ze=Le[v+6];return arrayToBox(Pe,le,boundingBox$1),!!(V.intersectsBox(boundingBox$1)&&_intersectsGeometry$1(Pe,e,r,o,V)||(arrayToBox(ze,le,boundingBox$1),V.intersectsBox(boundingBox$1)&&_intersectsGeometry$1(ze,e,r,o,V)))}}const tempMatrix$1=new Matrix4,obb$3=new OrientedBox,obb2$2=new OrientedBox,temp1$1=new Vector3,temp2$1=new Vector3,temp3$1=new Vector3,temp4$1=new Vector3;function closestPointToGeometry(v,e,r,o={},V={},le=0,fe=1/0){e.boundingBox||e.computeBoundingBox(),obb$3.set(e.boundingBox.min,e.boundingBox.max,r),obb$3.needsUpdate=!0;const Le=v.geometry,Ce=Le.attributes.position,Re=Le.index,Pe=e.attributes.position,ze=e.index,Fe=ExtendedTrianglePool.getPrimitive(),ke=ExtendedTrianglePool.getPrimitive();let Gt=temp1$1,Vt=temp2$1,Xt=null,xt=null;V&&(Xt=temp3$1,xt=temp4$1);let Zt=1/0,wt=null,Wt=null;return tempMatrix$1.copy(r).invert(),obb2$2.matrix.copy(tempMatrix$1),v.shapecast({boundsTraverseOrder:It=>obb$3.distanceToBox(It),intersectsBounds:(It,Nt,Ft)=>Ft<Zt&&Ft<fe?(Nt&&(obb2$2.min.copy(It.min),obb2$2.max.copy(It.max),obb2$2.needsUpdate=!0),!0):!1,intersectsRange:(It,Nt)=>{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:Ht=>obb2$2.distanceToBox(Ht),intersectsBounds:(Ht,Kt,Yt)=>Yt<Zt&&Yt<fe,intersectsRange:(Ht,Kt)=>{for(let Yt=Ht,jt=Ht+Kt;Yt<jt;Yt++){setTriangle(ke,3*Yt,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let n0=It,a0=It+Nt;n0<a0;n0++){setTriangle(Fe,3*n0,Re,Ce),Fe.needsUpdate=!0;const l0=Fe.distanceToTriangle(ke,Gt,Xt);if(l0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=l0,wt=n0,Wt=Yt),l0<le)return!0}}}});{const Ft=getTriCount$1(e);for(let Ht=0,Kt=Ft;Ht<Kt;Ht++){setTriangle(ke,3*Ht,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let Yt=It,jt=It+Nt;Yt<jt;Yt++){setTriangle(Fe,3*Yt,Re,Ce),Fe.needsUpdate=!0;const n0=Fe.distanceToTriangle(ke,Gt,Xt);if(n0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=n0,wt=Yt,Wt=Ht),n0<le)return!0}}}}}),ExtendedTrianglePool.releasePrimitive(Fe),ExtendedTrianglePool.releasePrimitive(ke),Zt===1/0?null:(o.point?o.point.copy(Vt):o.point=Vt.clone(),o.distance=Zt,o.faceIndex=wt,V&&(V.point?V.point.copy(xt):V.point=xt.clone(),V.point.applyMatrix4(tempMatrix$1),Vt.applyMatrix4(tempMatrix$1),V.distance=Vt.sub(V.point).length(),V.faceIndex=Wt),o)}function refit_indirect(v,e=null){e&&Array.isArray(e)&&(e=new Set(e));const r=v.geometry,o=r.index?r.index.array:null,V=r.attributes.position;let le,fe,Le,Ce,Re=0;const Pe=v._roots;for(let Fe=0,ke=Pe.length;Fe<ke;Fe++)le=Pe[Fe],fe=new Uint32Array(le),Le=new Uint16Array(le),Ce=new Float32Array(le),ze(0,Re),Re+=le.byteLength;function ze(Fe,ke,Gt=!1){const Vt=Fe*2;if(Le[Vt+15]===IS_LEAFNODE_FLAG){const xt=fe[Fe+6],Zt=Le[Vt+14];let wt=1/0,Wt=1/0,It=1/0,Nt=-1/0,Ft=-1/0,Ht=-1/0;for(let Kt=xt,Yt=xt+Zt;Kt<Yt;Kt++){const jt=3*v.resolveTriangleIndex(Kt);for(let n0=0;n0<3;n0++){let a0=jt+n0;a0=o?o[a0]:a0;const l0=V.getX(a0),s0=V.getY(a0),$t=V.getZ(a0);l0<wt&&(wt=l0),l0>Nt&&(Nt=l0),s0<Wt&&(Wt=s0),s0>Ft&&(Ft=s0),$t<It&&(It=$t),$t>Ht&&(Ht=$t)}}return Ce[Fe+0]!==wt||Ce[Fe+1]!==Wt||Ce[Fe+2]!==It||Ce[Fe+3]!==Nt||Ce[Fe+4]!==Ft||Ce[Fe+5]!==Ht?(Ce[Fe+0]=wt,Ce[Fe+1]=Wt,Ce[Fe+2]=It,Ce[Fe+3]=Nt,Ce[Fe+4]=Ft,Ce[Fe+5]=Ht,!0):!1}else{const xt=Fe+8,Zt=fe[Fe+6],wt=xt+ke,Wt=Zt+ke;let It=Gt,Nt=!1,Ft=!1;e?It||(Nt=e.has(wt),Ft=e.has(Wt),It=!Nt&&!Ft):(Nt=!0,Ft=!0);const Ht=It||Nt,Kt=It||Ft;let Yt=!1;Ht&&(Yt=ze(xt,ke,It));let jt=!1;Kt&&(jt=ze(Zt,ke,It));const n0=Yt||jt;if(n0)for(let a0=0;a0<3;a0++){const l0=xt+a0,s0=Zt+a0,$t=Ce[l0],qt=Ce[l0+3],e0=Ce[s0],o0=Ce[s0+3];Ce[Fe+a0]=$t<e0?$t:e0,Ce[Fe+a0+3]=qt>o0?qt:o0}return n0}}}function raycast_indirect(v,e,r,o,V,le,fe){BufferStack.setBuffer(v._roots[e]),_raycast(0,v,r,o,V,le,fe),BufferStack.clearBuffer()}function _raycast(v,e,r,o,V,le,fe){const{float32Array:Le,uint16Array:Ce,uint32Array:Re}=BufferStack,Pe=v*2;if(IS_LEAF(Pe,Ce)){const Fe=OFFSET(v,Re),ke=COUNT(Pe,Ce);intersectTris_indirect(e,r,o,Fe,ke,V,le,fe)}else{const Fe=LEFT_NODE(v);intersectRay(Fe,Le,o,le,fe)&&_raycast(Fe,e,r,o,V,le,fe);const ke=RIGHT_NODE(v,Re);intersectRay(ke,Le,o,le,fe)&&_raycast(ke,e,r,o,V,le,fe)}}const _xyzFields=["x","y","z"];function raycastFirst_indirect(v,e,r,o,V,le){BufferStack.setBuffer(v._roots[e]);const fe=_raycastFirst(0,v,r,o,V,le);return BufferStack.clearBuffer(),fe}function _raycastFirst(v,e,r,o,V,le){const{float32Array:fe,uint16Array:Le,uint32Array:Ce}=BufferStack;let Re=v*2;if(IS_LEAF(Re,Le)){const ze=OFFSET(v,Ce),Fe=COUNT(Re,Le);return intersectClosestTri_indirect(e,r,o,ze,Fe,V,le)}else{const ze=SPLIT_AXIS(v,Ce),Fe=_xyzFields[ze],Gt=o.direction[Fe]>=0;let Vt,Xt;Gt?(Vt=LEFT_NODE(v),Xt=RIGHT_NODE(v,Ce)):(Vt=RIGHT_NODE(v,Ce),Xt=LEFT_NODE(v));const Zt=intersectRay(Vt,fe,o,V,le)?_raycastFirst(Vt,e,r,o,V,le):null;if(Zt){const It=Zt.point[Fe];if(Gt?It<=fe[Xt+ze]:It>=fe[Xt+ze+3])return Zt}const Wt=intersectRay(Xt,fe,o,V,le)?_raycastFirst(Xt,e,r,o,V,le):null;return Zt&&Wt?Zt.distance<=Wt.distance?Zt:Wt:Zt||Wt||null}}const boundingBox=new Box3,triangle=new ExtendedTriangle,triangle2=new ExtendedTriangle,invertedMat=new Matrix4,obb$2=new OrientedBox,obb2$1=new OrientedBox;function intersectsGeometry_indirect(v,e,r,o){BufferStack.setBuffer(v._roots[e]);const V=_intersectsGeometry(0,v,r,o);return BufferStack.clearBuffer(),V}function _intersectsGeometry(v,e,r,o,V=null){const{float32Array:le,uint16Array:fe,uint32Array:Le}=BufferStack;let Ce=v*2;if(V===null&&(r.boundingBox||r.computeBoundingBox(),obb$2.set(r.boundingBox.min,r.boundingBox.max,o),V=obb$2),IS_LEAF(Ce,fe)){const Pe=e.geometry,ze=Pe.index,Fe=Pe.attributes.position,ke=r.index,Gt=r.attributes.position,Vt=OFFSET(v,Le),Xt=COUNT(Ce,fe);if(invertedMat.copy(o).invert(),r.boundsTree)return arrayToBox(v,le,obb2$1),obb2$1.matrix.copy(invertedMat),obb2$1.needsUpdate=!0,r.boundsTree.shapecast({intersectsBounds:Zt=>obb2$1.intersectsBox(Zt),intersectsTriangle:Zt=>{Zt.a.applyMatrix4(o),Zt.b.applyMatrix4(o),Zt.c.applyMatrix4(o),Zt.needsUpdate=!0;for(let wt=Vt,Wt=Xt+Vt;wt<Wt;wt++)if(setTriangle(triangle2,3*e.resolveTriangleIndex(wt),ze,Fe),triangle2.needsUpdate=!0,Zt.intersectsTriangle(triangle2))return!0;return!1}});for(let xt=Vt,Zt=Xt+Vt;xt<Zt;xt++){const wt=e.resolveTriangleIndex(xt);setTriangle(triangle,3*wt,ze,Fe),triangle.a.applyMatrix4(invertedMat),triangle.b.applyMatrix4(invertedMat),triangle.c.applyMatrix4(invertedMat),triangle.needsUpdate=!0;for(let Wt=0,It=ke.count;Wt<It;Wt+=3)if(setTriangle(triangle2,Wt,ke,Gt),triangle2.needsUpdate=!0,triangle.intersectsTriangle(triangle2))return!0}}else{const Pe=v+8,ze=Le[v+6];return arrayToBox(Pe,le,boundingBox),!!(V.intersectsBox(boundingBox)&&_intersectsGeometry(Pe,e,r,o,V)||(arrayToBox(ze,le,boundingBox),V.intersectsBox(boundingBox)&&_intersectsGeometry(ze,e,r,o,V)))}}const tempMatrix=new Matrix4,obb$1=new OrientedBox,obb2=new OrientedBox,temp1=new Vector3,temp2=new Vector3,temp3=new Vector3,temp4=new Vector3;function closestPointToGeometry_indirect(v,e,r,o={},V={},le=0,fe=1/0){e.boundingBox||e.computeBoundingBox(),obb$1.set(e.boundingBox.min,e.boundingBox.max,r),obb$1.needsUpdate=!0;const Le=v.geometry,Ce=Le.attributes.position,Re=Le.index,Pe=e.attributes.position,ze=e.index,Fe=ExtendedTrianglePool.getPrimitive(),ke=ExtendedTrianglePool.getPrimitive();let Gt=temp1,Vt=temp2,Xt=null,xt=null;V&&(Xt=temp3,xt=temp4);let Zt=1/0,wt=null,Wt=null;return tempMatrix.copy(r).invert(),obb2.matrix.copy(tempMatrix),v.shapecast({boundsTraverseOrder:It=>obb$1.distanceToBox(It),intersectsBounds:(It,Nt,Ft)=>Ft<Zt&&Ft<fe?(Nt&&(obb2.min.copy(It.min),obb2.max.copy(It.max),obb2.needsUpdate=!0),!0):!1,intersectsRange:(It,Nt)=>{if(e.boundsTree){const Ft=e.boundsTree;return Ft.shapecast({boundsTraverseOrder:Ht=>obb2.distanceToBox(Ht),intersectsBounds:(Ht,Kt,Yt)=>Yt<Zt&&Yt<fe,intersectsRange:(Ht,Kt)=>{for(let Yt=Ht,jt=Ht+Kt;Yt<jt;Yt++){const n0=Ft.resolveTriangleIndex(Yt);setTriangle(ke,3*n0,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let a0=It,l0=It+Nt;a0<l0;a0++){const s0=v.resolveTriangleIndex(a0);setTriangle(Fe,3*s0,Re,Ce),Fe.needsUpdate=!0;const $t=Fe.distanceToTriangle(ke,Gt,Xt);if($t<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=$t,wt=a0,Wt=Yt),$t<le)return!0}}}})}else{const Ft=getTriCount$1(e);for(let Ht=0,Kt=Ft;Ht<Kt;Ht++){setTriangle(ke,3*Ht,ze,Pe),ke.a.applyMatrix4(r),ke.b.applyMatrix4(r),ke.c.applyMatrix4(r),ke.needsUpdate=!0;for(let Yt=It,jt=It+Nt;Yt<jt;Yt++){const n0=v.resolveTriangleIndex(Yt);setTriangle(Fe,3*n0,Re,Ce),Fe.needsUpdate=!0;const a0=Fe.distanceToTriangle(ke,Gt,Xt);if(a0<Zt&&(Vt.copy(Gt),xt&&xt.copy(Xt),Zt=a0,wt=Yt,Wt=Ht),a0<le)return!0}}}}}),ExtendedTrianglePool.releasePrimitive(Fe),ExtendedTrianglePool.releasePrimitive(ke),Zt===1/0?null:(o.point?o.point.copy(Vt):o.point=Vt.clone(),o.distance=Zt,o.faceIndex=wt,V&&(V.point?V.point.copy(xt):V.point=xt.clone(),V.point.applyMatrix4(tempMatrix),Vt.applyMatrix4(tempMatrix),V.distance=Vt.sub(V.point).length(),V.faceIndex=Wt),o)}function isSharedArrayBufferSupported(){return typeof SharedArrayBuffer!="undefined"}const _bufferStack1=new BufferStack.constructor,_bufferStack2=new BufferStack.constructor,_boxPool=new PrimitivePool(()=>new Box3),_leftBox1=new Box3,_rightBox1=new Box3,_leftBox2=new Box3,_rightBox2=new Box3;let _active=!1;function bvhcast(v,e,r,o){if(_active)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");_active=!0;const V=v._roots,le=e._roots;let fe,Le=0,Ce=0;const Re=new Matrix4().copy(r).invert();for(let Pe=0,ze=V.length;Pe<ze;Pe++){_bufferStack1.setBuffer(V[Pe]),Ce=0;const Fe=_boxPool.getPrimitive();arrayToBox(0,_bufferStack1.float32Array,Fe),Fe.applyMatrix4(Re);for(let ke=0,Gt=le.length;ke<Gt&&(_bufferStack2.setBuffer(le[ke]),fe=_traverse(0,0,r,Re,o,Le,Ce,0,0,Fe),_bufferStack2.clearBuffer(),Ce+=le[ke].length,!fe);ke++);if(_boxPool.releasePrimitive(Fe),_bufferStack1.clearBuffer(),Le+=V[Pe].length,fe)break}return _active=!1,fe}function _traverse(v,e,r,o,V,le=0,fe=0,Le=0,Ce=0,Re=null,Pe=!1){let ze,Fe;Pe?(ze=_bufferStack2,Fe=_bufferStack1):(ze=_bufferStack1,Fe=_bufferStack2);const ke=ze.float32Array,Gt=ze.uint32Array,Vt=ze.uint16Array,Xt=Fe.float32Array,xt=Fe.uint32Array,Zt=Fe.uint16Array,wt=v*2,Wt=e*2,It=IS_LEAF(wt,Vt),Nt=IS_LEAF(Wt,Zt);let Ft=!1;if(Nt&&It)Pe?Ft=V(OFFSET(e,xt),COUNT(e*2,Zt),OFFSET(v,Gt),COUNT(v*2,Vt),Ce,fe+e,Le,le+v):Ft=V(OFFSET(v,Gt),COUNT(v*2,Vt),OFFSET(e,xt),COUNT(e*2,Zt),Le,le+v,Ce,fe+e);else if(Nt){const Ht=_boxPool.getPrimitive();arrayToBox(e,Xt,Ht),Ht.applyMatrix4(r);const Kt=LEFT_NODE(v),Yt=RIGHT_NODE(v,Gt);arrayToBox(Kt,ke,_leftBox1),arrayToBox(Yt,ke,_rightBox1);const jt=Ht.intersectsBox(_leftBox1),n0=Ht.intersectsBox(_rightBox1);Ft=jt&&_traverse(e,Kt,o,r,V,fe,le,Ce,Le+1,Ht,!Pe)||n0&&_traverse(e,Yt,o,r,V,fe,le,Ce,Le+1,Ht,!Pe),_boxPool.releasePrimitive(Ht)}else{const Ht=LEFT_NODE(e),Kt=RIGHT_NODE(e,xt);arrayToBox(Ht,Xt,_leftBox2),arrayToBox(Kt,Xt,_rightBox2);const Yt=Re.intersectsBox(_leftBox2),jt=Re.intersectsBox(_rightBox2);if(Yt&&jt)Ft=_traverse(v,Ht,r,o,V,le,fe,Le,Ce+1,Re,Pe)||_traverse(v,Kt,r,o,V,le,fe,Le,Ce+1,Re,Pe);else if(Yt)if(It)Ft=_traverse(v,Ht,r,o,V,le,fe,Le,Ce+1,Re,Pe);else{const n0=_boxPool.getPrimitive();n0.copy(_leftBox2).applyMatrix4(r);const a0=LEFT_NODE(v),l0=RIGHT_NODE(v,Gt);arrayToBox(a0,ke,_leftBox1),arrayToBox(l0,ke,_rightBox1);const s0=n0.intersectsBox(_leftBox1),$t=n0.intersectsBox(_rightBox1);Ft=s0&&_traverse(Ht,a0,o,r,V,fe,le,Ce,Le+1,n0,!Pe)||$t&&_traverse(Ht,l0,o,r,V,fe,le,Ce,Le+1,n0,!Pe),_boxPool.releasePrimitive(n0)}else if(jt)if(It)Ft=_traverse(v,Kt,r,o,V,le,fe,Le,Ce+1,Re,Pe);else{const n0=_boxPool.getPrimitive();n0.copy(_rightBox2).applyMatrix4(r);const a0=LEFT_NODE(v),l0=RIGHT_NODE(v,Gt);arrayToBox(a0,ke,_leftBox1),arrayToBox(l0,ke,_rightBox1);const s0=n0.intersectsBox(_leftBox1),$t=n0.intersectsBox(_rightBox1);Ft=s0&&_traverse(Kt,a0,o,r,V,fe,le,Ce,Le+1,n0,!Pe)||$t&&_traverse(Kt,l0,o,r,V,fe,le,Ce,Le+1,n0,!Pe),_boxPool.releasePrimitive(n0)}}return Ft}const obb=new OrientedBox,tempBox=new Box3,DEFAULT_OPTIONS={strategy:CENTER,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,verbose:!0,range:null};class MeshBVH{static serialize(e,r={}){r=gi({cloneBuffers:!0},r);const o=e.geometry,V=e._roots,le=e._indirectBuffer,fe=o.getIndex();let Le;return r.cloneBuffers?Le={roots:V.map(Ce=>Ce.slice()),index:fe?fe.array.slice():null,indirectBuffer:le?le.slice():null}:Le={roots:V,index:fe?fe.array:null,indirectBuffer:le},Le}static deserialize(e,r,o={}){o=gi({setIndex:!0,indirect:!!e.indirectBuffer},o);const{index:V,roots:le,indirectBuffer:fe}=e,Le=new MeshBVH(r,qi(gi({},o),{[SKIP_GENERATION]:!0}));if(Le._roots=le,Le._indirectBuffer=fe||null,o.setIndex){const Ce=r.getIndex();if(Ce===null){const Re=new BufferAttribute(e.index,1,!1);r.setIndex(Re)}else Ce.array!==V&&(Ce.array.set(V),Ce.needsUpdate=!0)}return Le}get indirect(){return!!this._indirectBuffer}constructor(e,r={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(r=Object.assign(qi(gi({},DEFAULT_OPTIONS),{[SKIP_GENERATION]:!1}),r),r.useSharedArrayBuffer&&!isSharedArrayBufferSupported())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,r[SKIP_GENERATION]||(buildPackedTree(this,r),!e.boundingBox&&r.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new Box3))),this.resolveTriangleIndex=r.indirect?o=>this._indirectBuffer[o]:o=>o}refit(e=null){return(this.indirect?refit_indirect:refit)(this,e)}traverse(e,r=0){const o=this._roots[r],V=new Uint32Array(o),le=new Uint16Array(o);fe(0);function fe(Le,Ce=0){const Re=Le*2,Pe=le[Re+15]===IS_LEAFNODE_FLAG;if(Pe){const ze=V[Le+6],Fe=le[Re+14];e(Ce,Pe,new Float32Array(o,Le*4,6),ze,Fe)}else{const ze=Le+BYTES_PER_NODE/4,Fe=V[Le+6],ke=V[Le+7];e(Ce,Pe,new Float32Array(o,Le*4,6),ke)||(fe(ze,Ce+1),fe(Fe,Ce+1))}}}raycast(e,r=FrontSide,o=0,V=1/0){const le=this._roots,fe=this.geometry,Le=[],Ce=r.isMaterial,Re=Array.isArray(r),Pe=fe.groups,ze=Ce?r.side:r,Fe=this.indirect?raycast_indirect:raycast;for(let ke=0,Gt=le.length;ke<Gt;ke++){const Vt=Re?r[Pe[ke].materialIndex].side:ze,Xt=Le.length;if(Fe(this,ke,Vt,e,Le,o,V),Re){const xt=Pe[ke].materialIndex;for(let Zt=Xt,wt=Le.length;Zt<wt;Zt++)Le[Zt].face.materialIndex=xt}}return Le}raycastFirst(e,r=FrontSide,o=0,V=1/0){const le=this._roots,fe=this.geometry,Le=r.isMaterial,Ce=Array.isArray(r);let Re=null;const Pe=fe.groups,ze=Le?r.side:r,Fe=this.indirect?raycastFirst_indirect:raycastFirst;for(let ke=0,Gt=le.length;ke<Gt;ke++){const Vt=Ce?r[Pe[ke].materialIndex].side:ze,Xt=Fe(this,ke,Vt,e,o,V);Xt!=null&&(Re==null||Xt.distance<Re.distance)&&(Re=Xt,Ce&&(Xt.face.materialIndex=Pe[ke].materialIndex))}return Re}intersectsGeometry(e,r){let o=!1;const V=this._roots,le=this.indirect?intersectsGeometry_indirect:intersectsGeometry;for(let fe=0,Le=V.length;fe<Le&&(o=le(this,fe,e,r),!o);fe++);return o}shapecast(e){const r=ExtendedTrianglePool.getPrimitive(),o=this.indirect?iterateOverTriangles_indirect:iterateOverTriangles;let{boundsTraverseOrder:V,intersectsBounds:le,intersectsRange:fe,intersectsTriangle:Le}=e;if(fe&&Le){const ze=fe;fe=(Fe,ke,Gt,Vt,Xt)=>ze(Fe,ke,Gt,Vt,Xt)?!0:o(Fe,ke,this,Le,Gt,Vt,r)}else fe||(Le?fe=(ze,Fe,ke,Gt)=>o(ze,Fe,this,Le,ke,Gt,r):fe=(ze,Fe,ke)=>ke);let Ce=!1,Re=0;const Pe=this._roots;for(let ze=0,Fe=Pe.length;ze<Fe;ze++){const ke=Pe[ze];if(Ce=shapecast(this,ze,le,fe,V,Re),Ce)break;Re+=ke.byteLength}return ExtendedTrianglePool.releasePrimitive(r),Ce}bvhcast(e,r,o){let{intersectsRanges:V,intersectsTriangles:le}=o;const fe=ExtendedTrianglePool.getPrimitive(),Le=this.geometry.index,Ce=this.geometry.attributes.position,Re=this.indirect?Gt=>{const Vt=this.resolveTriangleIndex(Gt);setTriangle(fe,Vt*3,Le,Ce)}:Gt=>{setTriangle(fe,Gt*3,Le,Ce)},Pe=ExtendedTrianglePool.getPrimitive(),ze=e.geometry.index,Fe=e.geometry.attributes.position,ke=e.indirect?Gt=>{const Vt=e.resolveTriangleIndex(Gt);setTriangle(Pe,Vt*3,ze,Fe)}:Gt=>{setTriangle(Pe,Gt*3,ze,Fe)};if(le){const Gt=(Vt,Xt,xt,Zt,wt,Wt,It,Nt)=>{for(let Ft=xt,Ht=xt+Zt;Ft<Ht;Ft++){ke(Ft),Pe.a.applyMatrix4(r),Pe.b.applyMatrix4(r),Pe.c.applyMatrix4(r),Pe.needsUpdate=!0;for(let Kt=Vt,Yt=Vt+Xt;Kt<Yt;Kt++)if(Re(Kt),fe.needsUpdate=!0,le(fe,Pe,Kt,Ft,wt,Wt,It,Nt))return!0}return!1};if(V){const Vt=V;V=function(Xt,xt,Zt,wt,Wt,It,Nt,Ft){return Vt(Xt,xt,Zt,wt,Wt,It,Nt,Ft)?!0:Gt(Xt,xt,Zt,wt,Wt,It,Nt,Ft)}}else V=Gt}return bvhcast(this,e,r,V)}intersectsBox(e,r){return obb.set(e.min,e.max,r),obb.needsUpdate=!0,this.shapecast({intersectsBounds:o=>obb.intersectsBox(o),intersectsTriangle:o=>obb.intersectsTriangle(o)})}intersectsSphere(e){return this.shapecast({intersectsBounds:r=>e.intersectsBox(r),intersectsTriangle:r=>r.intersectsSphere(e)})}closestPointToGeometry(e,r,o={},V={},le=0,fe=1/0){return(this.indirect?closestPointToGeometry_indirect:closestPointToGeometry)(this,e,r,o,V,le,fe)}closestPointToPoint(e,r={},o=0,V=1/0){return closestPointToPoint(this,e,r,o,V)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(o=>{arrayToBox(0,new Float32Array(o),tempBox),e.union(tempBox)}),e}}const HASH_WIDTH=1e-6,HASH_HALF_WIDTH=HASH_WIDTH*.5,HASH_MULTIPLIER=Math.pow(10,-Math.log10(HASH_WIDTH)),HASH_ADDITION=HASH_HALF_WIDTH*HASH_MULTIPLIER;function hashNumber(v){return~~(v*HASH_MULTIPLIER+HASH_ADDITION)}function hashVertex2(v){return`${hashNumber(v.x)},${hashNumber(v.y)}`}function hashVertex3(v){return`${hashNumber(v.x)},${hashNumber(v.y)},${hashNumber(v.z)}`}function hashVertex4(v){return`${hashNumber(v.x)},${hashNumber(v.y)},${hashNumber(v.z)},${hashNumber(v.w)}`}function toNormalizedRay(v,e,r){r.direction.subVectors(e,v).normalize();const o=v.dot(r.direction);return r.origin.copy(v).addScaledVector(r.direction,-o),r}function areSharedArrayBuffersSupported(){return typeof SharedArrayBuffer!="undefined"}function convertToSharedArrayBuffer(v){if(v.buffer instanceof SharedArrayBuffer)return v;const e=v.constructor,r=v.buffer,o=new SharedArrayBuffer(r.byteLength),V=new Uint8Array(r);return new Uint8Array(o).set(V,0),new e(o)}function getIndexArray(v,e=ArrayBuffer){return v>65535?new Uint32Array(new e(4*v)):new Uint16Array(new e(2*v))}function ensureIndex(v,e){if(!v.index){const r=v.attributes.position.count,o=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,V=getIndexArray(r,o);v.setIndex(new BufferAttribute(V,1));for(let le=0;le<r;le++)V[le]=le}}function getVertexCount(v){return v.index?v.index.count:v.attributes.position.count}function getTriCount(v){return getVertexCount(v)/3}const DEGENERATE_EPSILON=1e-8,_tempVec=new Vector3;function toTriIndex(v){return~~(v/3)}function toEdgeIndex(v){return v%3}function sortEdgeFunc(v,e){return v.start-e.start}function getProjectedDistance(v,e){return _tempVec.subVectors(e,v.origin).dot(v.direction)}function matchEdges(v,e,r,o=DEGENERATE_EPSILON){v.sort(sortEdgeFunc),e.sort(sortEdgeFunc);for(let Le=0;Le<v.length;Le++){const Ce=v[Le];for(let Re=0;Re<e.length;Re++){const Pe=e[Re];if(!(Pe.start>Ce.end)){if(Ce.end<Pe.start||Pe.end<Ce.start)continue;if(Ce.start<=Pe.start&&Ce.end>=Pe.end)le(Pe.end,Ce.end)||v.splice(Le+1,0,{start:Pe.end,end:Ce.end,index:Ce.index}),Ce.end=Pe.start,Pe.start=0,Pe.end=0;else if(Ce.start>=Pe.start&&Ce.end<=Pe.end)le(Ce.end,Pe.end)||e.splice(Re+1,0,{start:Ce.end,end:Pe.end,index:Pe.index}),Pe.end=Ce.start,Ce.start=0,Ce.end=0;else if(Ce.start<=Pe.start&&Ce.end<=Pe.end){const ze=Ce.end;Ce.end=Pe.start,Pe.start=ze}else if(Ce.start>=Pe.start&&Ce.end>=Pe.end){const ze=Pe.end;Pe.end=Ce.start,Ce.start=ze}else throw new Error}if(r.has(Ce.index)||r.set(Ce.index,[]),r.has(Pe.index)||r.set(Pe.index,[]),r.get(Ce.index).push(Pe.index),r.get(Pe.index).push(Ce.index),fe(Pe)&&(e.splice(Re,1),Re--),fe(Ce)){v.splice(Le,1),Le--;break}}}V(v),V(e);function V(Le){for(let Ce=0;Ce<Le.length;Ce++)fe(Le[Ce])&&(Le.splice(Ce,1),Ce--)}function le(Le,Ce){return Math.abs(Ce-Le)<o}function fe(Le){return Math.abs(Le.end-Le.start)<o}}const DIST_EPSILON=1e-5,ANGLE_EPSILON=1e-4;class RaySet{constructor(){this._rays=[]}addRay(e){this._rays.push(e)}findClosestRay(e){const r=this._rays,o=e.clone();o.direction.multiplyScalar(-1);let V=1/0,le=null;for(let Ce=0,Re=r.length;Ce<Re;Ce++){const Pe=r[Ce];if(fe(Pe,e)&&fe(Pe,o))continue;const ze=Le(Pe,e),Fe=Le(Pe,o),ke=Math.min(ze,Fe);ke<V&&(V=ke,le=Pe)}return le;function fe(Ce,Re){const Pe=Ce.origin.distanceTo(Re.origin)>DIST_EPSILON;return Ce.direction.angleTo(Re.direction)>ANGLE_EPSILON||Pe}function Le(Ce,Re){const Pe=Ce.origin.distanceTo(Re.origin),ze=Ce.direction.angleTo(Re.direction);return Pe/DIST_EPSILON+ze/ANGLE_EPSILON}}}const _v0=new Vector3,_v1$1=new Vector3,_ray$3=new Ray;function computeDisjointEdges(v,e,r){const o=v.attributes,V=v.index,le=o.position,fe=new Map,Le=new Map,Ce=Array.from(e),Re=new RaySet;for(let Pe=0,ze=Ce.length;Pe<ze;Pe++){const Fe=Ce[Pe],ke=toTriIndex(Fe),Gt=toEdgeIndex(Fe);let Vt=3*ke+Gt,Xt=3*ke+(Gt+1)%3;V&&(Vt=V.getX(Vt),Xt=V.getX(Xt)),_v0.fromBufferAttribute(le,Vt),_v1$1.fromBufferAttribute(le,Xt),toNormalizedRay(_v0,_v1$1,_ray$3);let xt,Zt=Re.findClosestRay(_ray$3);Zt===null&&(Zt=_ray$3.clone(),Re.addRay(Zt)),Le.has(Zt)||Le.set(Zt,{forward:[],reverse:[],ray:Zt}),xt=Le.get(Zt);let wt=getProjectedDistance(Zt,_v0),Wt=getProjectedDistance(Zt,_v1$1);wt>Wt&&([wt,Wt]=[Wt,wt]),_ray$3.direction.dot(Zt.direction)<0?xt.reverse.push({start:wt,end:Wt,index:Fe}):xt.forward.push({start:wt,end:Wt,index:Fe})}return Le.forEach(({forward:Pe,reverse:ze},Fe)=>{matchEdges(Pe,ze,fe,r),Pe.length===0&&ze.length===0&&Le.delete(Fe)}),{disjointConnectivityMap:fe,fragmentMap:Le}}const _vec2=new Vector2,_vec3$1=new Vector3,_vec4=new Vector4,_hashes=["","",""];class HalfEdgeMap{constructor(e=null){this.data=null,this.disjointConnections=null,this.unmatchedDisjointEdges=null,this.unmatchedEdges=-1,this.matchedEdges=-1,this.useDrawRange=!0,this.useAllAttributes=!1,this.matchDisjointEdges=!1,this.degenerateEpsilon=1e-8,e&&this.updateFrom(e)}getSiblingTriangleIndex(e,r){const o=this.data[e*3+r];return o===-1?-1:~~(o/3)}getSiblingEdgeIndex(e,r){const o=this.data[e*3+r];return o===-1?-1:o%3}getDisjointSiblingTriangleIndices(e,r){const o=e*3+r,V=this.disjointConnections.get(o);return V?V.map(le=>~~(le/3)):[]}getDisjointSiblingEdgeIndices(e,r){const o=e*3+r,V=this.disjointConnections.get(o);return V?V.map(le=>le%3):[]}isFullyConnected(){return this.unmatchedEdges===0}updateFrom(e){const{useAllAttributes:r,useDrawRange:o,matchDisjointEdges:V,degenerateEpsilon:le}=this,fe=r?wt:Zt,Le=new Map,{attributes:Ce}=e,Re=r?Object.keys(Ce):null,Pe=e.index,ze=Ce.position;let Fe=getTriCount(e);const ke=Fe;let Gt=0;o&&(Gt=e.drawRange.start,e.drawRange.count!==1/0&&(Fe=~~(e.drawRange.count/3)));let Vt=this.data;(!Vt||Vt.length<3*ke)&&(Vt=new Int32Array(3*ke)),Vt.fill(-1);let Xt=0,xt=new Set;for(let Wt=Gt,It=Fe*3+Gt;Wt<It;Wt+=3){const Nt=Wt;for(let Ft=0;Ft<3;Ft++){let Ht=Nt+Ft;Pe&&(Ht=Pe.getX(Ht)),_hashes[Ft]=fe(Ht)}for(let Ft=0;Ft<3;Ft++){const Ht=(Ft+1)%3,Kt=_hashes[Ft],Yt=_hashes[Ht],jt=`${Yt}_${Kt}`;if(Le.has(jt)){const n0=Nt+Ft,a0=Le.get(jt);Vt[n0]=a0,Vt[a0]=n0,Le.delete(jt),Xt+=2,xt.delete(a0)}else{const n0=`${Kt}_${Yt}`,a0=Nt+Ft;Le.set(n0,a0),xt.add(a0)}}}if(V){const{fragmentMap:Wt,disjointConnectivityMap:It}=computeDisjointEdges(e,xt,le);xt.clear(),Wt.forEach(({forward:Nt,reverse:Ft})=>{Nt.forEach(({index:Ht})=>xt.add(Ht)),Ft.forEach(({index:Ht})=>xt.add(Ht))}),this.unmatchedDisjointEdges=Wt,this.disjointConnections=It,Xt=Fe*3-xt.size}this.matchedEdges=Xt,this.unmatchedEdges=xt.size,this.data=Vt;function Zt(Wt){return _vec3$1.fromBufferAttribute(ze,Wt),hashVertex3(_vec3$1)}function wt(Wt){let It="";for(let Nt=0,Ft=Re.length;Nt<Ft;Nt++){const Ht=Ce[Re[Nt]];let Kt;switch(Ht.itemSize){case 1:Kt=hashNumber(Ht.getX(Wt));break;case 2:Kt=hashVertex2(_vec2.fromBufferAttribute(Ht,Wt));break;case 3:Kt=hashVertex3(_vec3$1.fromBufferAttribute(Ht,Wt));break;case 4:Kt=hashVertex4(_vec4.fromBufferAttribute(Ht,Wt));break}It!==""&&(It+="|"),It+=Kt}return It}}}class Brush extends Mesh{constructor(...e){super(...e),this.isBrush=!0,this._previousMatrix=new Matrix4,this._previousMatrix.elements.fill(0)}markUpdated(){this._previousMatrix.copy(this.matrix)}isDirty(){const{matrix:e,_previousMatrix:r}=this,o=e.elements,V=r.elements;for(let le=0;le<16;le++)if(o[le]!==V[le])return!0;return!1}prepareGeometry(){const e=this.geometry,r=e.attributes,o=areSharedArrayBuffersSupported();if(o)for(const V in r){const le=r[V];if(le.isInterleavedBufferAttribute)throw new Error("Brush: InterleavedBufferAttributes are not supported.");le.array=convertToSharedArrayBuffer(le.array)}if(e.boundsTree||(ensureIndex(e,{useSharedArrayBuffer:o}),e.boundsTree=new MeshBVH(e,{maxLeafTris:3,indirect:!0,useSharedArrayBuffer:o})),e.halfEdges||(e.halfEdges=new HalfEdgeMap(e)),!e.groupIndices){const V=getTriCount(e),le=new Uint16Array(V),fe=e.groups;for(let Le=0,Ce=fe.length;Le<Ce;Le++){const{start:Re,count:Pe}=fe[Le];for(let ze=Re/3,Fe=(Re+Pe)/3;ze<Fe;ze++)le[ze]=Le}e.groupIndices=le}}disposeCacheData(){const{geometry:e}=this;e.halfEdges=null,e.boundsTree=null,e.groupIndices=null}}const EPSILON$1=1e-14,_AB=new Vector3,_AC=new Vector3,_CB=new Vector3;function isTriDegenerate(v,e=EPSILON$1){_AB.subVectors(v.b,v.a),_AC.subVectors(v.c,v.a),_CB.subVectors(v.b,v.c);const r=_AB.angleTo(_AC),o=_AB.angleTo(_CB),V=Math.PI-r-o;return Math.abs(r)<e||Math.abs(o)<e||Math.abs(V)<e||v.a.distanceToSquared(v.b)<e||v.a.distanceToSquared(v.c)<e||v.b.distanceToSquared(v.c)<e}const EPSILON=1e-10,COPLANAR_EPSILON=1e-10,PARALLEL_EPSILON=1e-10,_edge$1=new Line3,_foundEdge=new Line3,_vec=new Vector3,_triangleNormal=new Vector3,_planeNormal=new Vector3,_plane=new Plane$1,_splittingTriangle=new ExtendedTriangle;class TrianglePool{constructor(){this._pool=[],this._index=0}getTriangle(){return this._index>=this._pool.length&&this._pool.push(new Triangle),this._pool[this._index++]}clear(){this._index=0}reset(){this._pool.length=0,this._index=0}}class TriangleSplitter{constructor(){this.trianglePool=new TrianglePool,this.triangles=[],this.normal=new Vector3,this.coplanarTriangleUsed=!1}initialize(e){this.reset();const{triangles:r,trianglePool:o,normal:V}=this;if(Array.isArray(e))for(let le=0,fe=e.length;le<fe;le++){const Le=e[le];if(le===0)Le.getNormal(V);else if(Math.abs(1-Le.getNormal(_vec).dot(V))>EPSILON)throw new Error("Triangle Splitter: Cannot initialize with triangles that have different normals.");const Ce=o.getTriangle();Ce.copy(Le),r.push(Ce)}else{e.getNormal(V);const le=o.getTriangle();le.copy(e),r.push(le)}}splitByTriangle(e){const{normal:r,triangles:o}=this;if(e.getNormal(_triangleNormal).normalize(),Math.abs(1-Math.abs(_triangleNormal.dot(r)))<PARALLEL_EPSILON){this.coplanarTriangleUsed=!0;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le];Le.coplanarCount=0}const V=[e.a,e.b,e.c];for(let le=0;le<3;le++){const fe=(le+1)%3,Le=V[le],Ce=V[fe];_vec.subVectors(Ce,Le).normalize(),_planeNormal.crossVectors(_triangleNormal,_vec),_plane.setFromNormalAndCoplanarPoint(_planeNormal,Le),this.splitByPlane(_plane,e)}}else e.getPlane(_plane),this.splitByPlane(_plane,e)}splitByPlane(e,r){const{triangles:o,trianglePool:V}=this;_splittingTriangle.copy(r),_splittingTriangle.needsUpdate=!0;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le];if(!_splittingTriangle.intersectsTriangle(Le,_edge$1,!0))continue;const{a:Ce,b:Re,c:Pe}=Le;let ze=0,Fe=-1,ke=!1,Gt=[],Vt=[];const Xt=[Ce,Re,Pe];for(let xt=0;xt<3;xt++){const Zt=(xt+1)%3;_edge$1.start.copy(Xt[xt]),_edge$1.end.copy(Xt[Zt]);const wt=e.distanceToPoint(_edge$1.start),Wt=e.distanceToPoint(_edge$1.end);if(Math.abs(wt)<COPLANAR_EPSILON&&Math.abs(Wt)<COPLANAR_EPSILON){ke=!0;break}if(wt>0?Gt.push(xt):Vt.push(xt),Math.abs(wt)<COPLANAR_EPSILON)continue;let It=!!e.intersectLine(_edge$1,_vec);!It&&Math.abs(Wt)<COPLANAR_EPSILON&&(_vec.copy(_edge$1.end),It=!0),It&&!(_vec.distanceTo(_edge$1.start)<EPSILON)&&(_vec.distanceTo(_edge$1.end)<EPSILON&&(Fe=xt),ze===0?_foundEdge.start.copy(_vec):_foundEdge.end.copy(_vec),ze++)}if(!ke&&ze===2&&_foundEdge.distance()>COPLANAR_EPSILON)if(Fe!==-1){Fe=(Fe+1)%3;let xt=0;xt===Fe&&(xt=(xt+1)%3);let Zt=xt+1;Zt===Fe&&(Zt=(Zt+1)%3);const wt=V.getTriangle();wt.a.copy(Xt[Zt]),wt.b.copy(_foundEdge.end),wt.c.copy(_foundEdge.start),isTriDegenerate(wt)||o.push(wt),Le.a.copy(Xt[xt]),Le.b.copy(_foundEdge.start),Le.c.copy(_foundEdge.end),isTriDegenerate(Le)&&(o.splice(le,1),le--,fe--)}else{const xt=Gt.length>=2?Vt[0]:Gt[0];if(xt===0){let Nt=_foundEdge.start;_foundEdge.start=_foundEdge.end,_foundEdge.end=Nt}const Zt=(xt+1)%3,wt=(xt+2)%3,Wt=V.getTriangle(),It=V.getTriangle();Xt[Zt].distanceToSquared(_foundEdge.start)<Xt[wt].distanceToSquared(_foundEdge.end)?(Wt.a.copy(Xt[Zt]),Wt.b.copy(_foundEdge.start),Wt.c.copy(_foundEdge.end),It.a.copy(Xt[Zt]),It.b.copy(Xt[wt]),It.c.copy(_foundEdge.start)):(Wt.a.copy(Xt[wt]),Wt.b.copy(_foundEdge.start),Wt.c.copy(_foundEdge.end),It.a.copy(Xt[Zt]),It.b.copy(Xt[wt]),It.c.copy(_foundEdge.end)),Le.a.copy(Xt[xt]),Le.b.copy(_foundEdge.end),Le.c.copy(_foundEdge.start),isTriDegenerate(Wt)||o.push(Wt),isTriDegenerate(It)||o.push(It),isTriDegenerate(Le)&&(o.splice(le,1),le--,fe--)}else ze===3&&console.warn("TriangleClipper: Coplanar clip not handled")}}reset(){this.triangles.length=0,this.trianglePool.clear(),this.coplanarTriangleUsed=!1}}function ceilToFourByteStride(v){return v=~~v,v+4-v%4}class TypeBackedArray{constructor(e,r=500){this.expansionFactor=1.5,this.type=e,this.length=0,this.array=null,this.setSize(r)}setType(e){if(this.length!==0)throw new Error("TypeBackedArray: Cannot change the type while there is used data in the buffer.");const r=this.array.buffer;this.array=new e(r),this.type=e}setSize(e){if(this.array&&e===this.array.length)return;const r=this.type,o=areSharedArrayBuffersSupported()?SharedArrayBuffer:ArrayBuffer,V=new r(new o(ceilToFourByteStride(e*r.BYTES_PER_ELEMENT)));this.array&&V.set(this.array,0),this.array=V}expand(){const{array:e,expansionFactor:r}=this;this.setSize(e.length*r)}push(...e){let{array:r,length:o}=this;o+e.length>r.length&&(this.expand(),r=this.array);for(let V=0,le=e.length;V<le;V++)r[o+V]=e[V];this.length+=e.length}clear(){this.length=0}}class TypedAttributeData{constructor(){this.groupAttributes=[{}],this.groupCount=0}getType(e){return this.groupAttributes[0][e].type}getItemSize(e){return this.groupAttributes[0][e].itemSize}getNormalized(e){return this.groupAttributes[0][e].normalized}getCount(e){if(this.groupCount<=e)return 0;const r=this.getGroupAttrArray("position",e);return r.length/r.itemSize}getTotalLength(e){const{groupCount:r,groupAttributes:o}=this;let V=0;for(let le=0;le<r;le++){const fe=o[le];V+=fe[e].length}return V}getGroupAttrSet(e=0){const{groupAttributes:r}=this;if(r[e])return this.groupCount=Math.max(this.groupCount,e+1),r[e];const o=r[0];for(this.groupCount=Math.max(this.groupCount,e+1);e>=r.length;){const V={};r.push(V);for(const le in o){const fe=o[le],Le=new TypeBackedArray(fe.type);Le.itemSize=fe.itemSize,Le.normalized=fe.normalized,V[le]=Le}}return r[e]}getGroupAttrArray(e,r=0){const{groupAttributes:o}=this;if(!o[0][e])throw new Error(`TypedAttributeData: Attribute with "${e}" has not been initialized`);return this.getGroupAttrSet(r)[e]}initializeArray(e,r,o,V){const{groupAttributes:le}=this,Le=le[0][e];if(Le){if(Le.type!==r)for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=le[Ce][e];Pe.setType(r),Pe.itemSize=o,Pe.normalized=V}}else for(let Ce=0,Re=le.length;Ce<Re;Ce++){const Pe=new TypeBackedArray(r);Pe.itemSize=o,Pe.normalized=V,le[Ce][e]=Pe}}clear(){this.groupCount=0;const{groupAttributes:e}=this;e.forEach(r=>{for(const o in r)r[o].clear()})}delete(e){this.groupAttributes.forEach(r=>{delete r[e]})}reset(){this.groupAttributes=[],this.groupCount=0}}class IntersectionMap{constructor(){this.intersectionSet={},this.ids=[]}add(e,r){const{intersectionSet:o,ids:V}=this;o[e]||(o[e]=[],V.push(e)),o[e].push(r)}}const ADDITION=0,SUBTRACTION=1,REVERSE_SUBTRACTION=2,INTERSECTION=3,DIFFERENCE=4,HOLLOW_SUBTRACTION=5,HOLLOW_INTERSECTION=6,_ray$2=new Ray,_matrix$1=new Matrix4,_tri$1=new Triangle,_vec3=new Vector3,_vec4a=new Vector4,_vec4b=new Vector4,_vec4c=new Vector4,_vec4_0=new Vector4,_vec4_1=new Vector4,_vec4_2=new Vector4,_edge=new Line3,_normal=new Vector3,JITTER_EPSILON=1e-8,OFFSET_EPSILON=1e-15,BACK_SIDE=-1,FRONT_SIDE=1,COPLANAR_OPPOSITE=-2,COPLANAR_ALIGNED=2,INVERT_TRI=0,ADD_TRI=1,SKIP_TRI=2,FLOATING_COPLANAR_EPSILON=1e-14;let _debugContext=null;function setDebugContext(v){_debugContext=v}function getHitSide(v,e){v.getMidpoint(_ray$2.origin),v.getNormal(_ray$2.direction);const r=e.raycastFirst(_ray$2,DoubleSide);return!!(r&&_ray$2.direction.dot(r.face.normal)>0)?BACK_SIDE:FRONT_SIDE}function getHitSideWithCoplanarCheck(v,e){function r(){return Math.random()-.5}v.getNormal(_normal),_ray$2.direction.copy(_normal),v.getMidpoint(_ray$2.origin);const o=3;let V=0,le=1/0;for(let fe=0;fe<o;fe++){_ray$2.direction.x+=r()*JITTER_EPSILON,_ray$2.direction.y+=r()*JITTER_EPSILON,_ray$2.direction.z+=r()*JITTER_EPSILON,_ray$2.direction.multiplyScalar(-1);const Le=e.raycastFirst(_ray$2,DoubleSide);if(!!(Le&&_ray$2.direction.dot(Le.face.normal)>0)&&V++,Le!==null&&(le=Math.min(le,Le.distance)),le<=OFFSET_EPSILON)return Le.face.normal.dot(_normal)>0?COPLANAR_ALIGNED:COPLANAR_OPPOSITE;if(V/o>.5||(fe-V+1)/o>.5)break}return V/o>.5?BACK_SIDE:FRONT_SIDE}function collectIntersectingTriangles(v,e){const r=new IntersectionMap,o=new IntersectionMap;return _matrix$1.copy(v.matrixWorld).invert().multiply(e.matrixWorld),v.geometry.boundsTree.bvhcast(e.geometry.boundsTree,_matrix$1,{intersectsTriangles(V,le,fe,Le){if(!isTriDegenerate(V)&&!isTriDegenerate(le)){let Ce=V.intersectsTriangle(le,_edge,!0);if(!Ce){const Re=V.plane,Pe=le.plane,ze=Re.normal,Fe=Pe.normal;ze.dot(Fe)===1&&Math.abs(Re.constant-Pe.constant)<FLOATING_COPLANAR_EPSILON&&(Ce=!0)}if(Ce){let Re=v.geometry.boundsTree.resolveTriangleIndex(fe),Pe=e.geometry.boundsTree.resolveTriangleIndex(Le);r.add(Re,Pe),o.add(Pe,Re),_debugContext&&(_debugContext.addEdge(_edge),_debugContext.addIntersectingTriangles(fe,V,Le,le))}}return!1}}),{aIntersections:r,bIntersections:o}}function appendAttributeFromTriangle(v,e,r,o,V,le,fe=!1){const Le=r.attributes,Ce=r.index,Re=v*3,Pe=Ce.getX(Re+0),ze=Ce.getX(Re+1),Fe=Ce.getX(Re+2);for(const ke in le){const Gt=Le[ke],Vt=le[ke];if(!(ke in Le))throw new Error(`CSG Operations: Attribute ${ke} not available on geometry.`);const Xt=Gt.itemSize;ke==="position"?(_tri$1.a.fromBufferAttribute(Gt,Pe).applyMatrix4(o),_tri$1.b.fromBufferAttribute(Gt,ze).applyMatrix4(o),_tri$1.c.fromBufferAttribute(Gt,Fe).applyMatrix4(o),pushBarycoordInterpolatedValues(_tri$1.a,_tri$1.b,_tri$1.c,e,3,Vt,fe)):ke==="normal"?(_tri$1.a.fromBufferAttribute(Gt,Pe).applyNormalMatrix(V),_tri$1.b.fromBufferAttribute(Gt,ze).applyNormalMatrix(V),_tri$1.c.fromBufferAttribute(Gt,Fe).applyNormalMatrix(V),fe&&(_tri$1.a.multiplyScalar(-1),_tri$1.b.multiplyScalar(-1),_tri$1.c.multiplyScalar(-1)),pushBarycoordInterpolatedValues(_tri$1.a,_tri$1.b,_tri$1.c,e,3,Vt,fe,!0)):(_vec4a.fromBufferAttribute(Gt,Pe),_vec4b.fromBufferAttribute(Gt,ze),_vec4c.fromBufferAttribute(Gt,Fe),pushBarycoordInterpolatedValues(_vec4a,_vec4b,_vec4c,e,Xt,Vt,fe))}}function appendAttributesFromIndices(v,e,r,o,V,le,fe,Le=!1){appendAttributeFromIndex(v,o,V,le,fe,Le),appendAttributeFromIndex(Le?r:e,o,V,le,fe,Le),appendAttributeFromIndex(Le?e:r,o,V,le,fe,Le)}function getOperationAction(v,e,r=!1){switch(v){case ADDITION:if(e===FRONT_SIDE||e===COPLANAR_ALIGNED&&!r)return ADD_TRI;break;case SUBTRACTION:if(r){if(e===BACK_SIDE)return INVERT_TRI}else if(e===FRONT_SIDE||e===COPLANAR_OPPOSITE)return ADD_TRI;break;case REVERSE_SUBTRACTION:if(r){if(e===FRONT_SIDE||e===COPLANAR_OPPOSITE)return ADD_TRI}else if(e===BACK_SIDE)return INVERT_TRI;break;case DIFFERENCE:if(e===BACK_SIDE)return INVERT_TRI;if(e===FRONT_SIDE)return ADD_TRI;break;case INTERSECTION:if(e===BACK_SIDE||e===COPLANAR_ALIGNED&&!r)return ADD_TRI;break;case HOLLOW_SUBTRACTION:if(!r&&(e===FRONT_SIDE||e===COPLANAR_OPPOSITE))return ADD_TRI;break;case HOLLOW_INTERSECTION:if(!r&&(e===BACK_SIDE||e===COPLANAR_ALIGNED))return ADD_TRI;break;default:throw new Error(`Unrecognized CSG operation enum "${v}".`)}return SKIP_TRI}function pushBarycoordInterpolatedValues(v,e,r,o,V,le,fe=!1,Le=!1){const Ce=Re=>{le.push(Re.x),V>1&&le.push(Re.y),V>2&&le.push(Re.z),V>3&&le.push(Re.w)};_vec4_0.set(0,0,0,0).addScaledVector(v,o.a.x).addScaledVector(e,o.a.y).addScaledVector(r,o.a.z),_vec4_1.set(0,0,0,0).addScaledVector(v,o.b.x).addScaledVector(e,o.b.y).addScaledVector(r,o.b.z),_vec4_2.set(0,0,0,0).addScaledVector(v,o.c.x).addScaledVector(e,o.c.y).addScaledVector(r,o.c.z),Le&&(_vec4_0.normalize(),_vec4_1.normalize(),_vec4_2.normalize()),Ce(_vec4_0),fe?(Ce(_vec4_2),Ce(_vec4_1)):(Ce(_vec4_1),Ce(_vec4_2))}function appendAttributeFromIndex(v,e,r,o,V,le=!1){for(const fe in V){const Le=e[fe],Ce=V[fe];if(!(fe in e))throw new Error(`CSG Operations: Attribute ${fe} no available on geometry.`);const Re=Le.itemSize;fe==="position"?(_vec3.fromBufferAttribute(Le,v).applyMatrix4(r),Ce.push(_vec3.x,_vec3.y,_vec3.z)):fe==="normal"?(_vec3.fromBufferAttribute(Le,v).applyNormalMatrix(o),le&&_vec3.multiplyScalar(-1),Ce.push(_vec3.x,_vec3.y,_vec3.z)):(Ce.push(Le.getX(v)),Re>1&&Ce.push(Le.getY(v)),Re>2&&Ce.push(Le.getZ(v)),Re>3&&Ce.push(Le.getW(v)))}}class TriangleIntersectData{constructor(e){this.triangle=new Triangle().copy(e),this.intersects={}}addTriangle(e,r){this.intersects[e]=new Triangle().copy(r)}getIntersectArray(){const e=[],{intersects:r}=this;for(const o in r)e.push(r[o]);return e}}class TriangleIntersectionSets{constructor(){this.data={}}addTriangleIntersection(e,r,o,V){const{data:le}=this;le[e]||(le[e]=new TriangleIntersectData(r)),le[e].addTriangle(o,V)}getTrianglesAsArray(e=null){const{data:r}=this,o=[];if(e!==null)e in r&&o.push(r[e].triangle);else for(const V in r)o.push(r[V].triangle);return o}getTriangleIndices(){return Object.keys(this.data).map(e=>parseInt(e))}getIntersectionIndices(e){const{data:r}=this;return r[e]?Object.keys(r[e].intersects).map(o=>parseInt(o)):[]}getIntersectionsAsArray(e=null,r=null){const{data:o}=this,V=new Set,le=[],fe=Le=>{if(o[Le])if(r!==null)o[Le].intersects[r]&&le.push(o[Le].intersects[r]);else{const Ce=o[Le].intersects;for(const Re in Ce)V.has(Re)||(V.add(Re),le.push(Ce[Re]))}};if(e!==null)fe(e);else for(const Le in o)fe(Le);return le}reset(){this.data={}}}class OperationDebugData{constructor(){this.enabled=!1,this.triangleIntersectsA=new TriangleIntersectionSets,this.triangleIntersectsB=new TriangleIntersectionSets,this.intersectionEdges=[]}addIntersectingTriangles(e,r,o,V){const{triangleIntersectsA:le,triangleIntersectsB:fe}=this;le.addTriangleIntersection(e,r,o,V),fe.addTriangleIntersection(o,V,e,r)}addEdge(e){this.intersectionEdges.push(e.clone())}reset(){this.triangleIntersectsA.reset(),this.triangleIntersectsB.reset(),this.intersectionEdges=[]}init(){this.enabled&&(this.reset(),setDebugContext(this))}complete(){this.enabled&&setDebugContext(null)}}const _matrix=new Matrix4,_normalMatrix=new Matrix3,_triA=new Triangle,_triB=new Triangle,_tri=new Triangle,_barycoordTri=new Triangle,_attr=[],_actions=[];function getFirstIdFromSet(v){for(const e of v)return e}function performOperation(v,e,r,o,V,le={}){const{useGroups:fe=!0}=le,{aIntersections:Le,bIntersections:Ce}=collectIntersectingTriangles(v,e),Re=[];let Pe=null,ze;return ze=fe?0:-1,performSplitTriangleOperations(v,e,Le,r,!1,o,V,ze),performWholeTriangleOperations(v,e,Le,r,!1,V,ze),r.findIndex(ke=>ke!==HOLLOW_INTERSECTION&&ke!==HOLLOW_SUBTRACTION)!==-1&&(ze=fe?v.geometry.groups.length||1:-1,performSplitTriangleOperations(e,v,Ce,r,!0,o,V,ze),performWholeTriangleOperations(e,v,Ce,r,!0,V,ze)),_attr.length=0,_actions.length=0,{groups:Re,materials:Pe}}function performSplitTriangleOperations(v,e,r,o,V,le,fe,Le=0){const Ce=v.matrixWorld.determinant()<0;_matrix.copy(e.matrixWorld).invert().multiply(v.matrixWorld),_normalMatrix.getNormalMatrix(v.matrixWorld).multiplyScalar(Ce?-1:1);const Re=v.geometry.groupIndices,Pe=v.geometry.index,ze=v.geometry.attributes.position,Fe=e.geometry.boundsTree,ke=e.geometry.index,Gt=e.geometry.attributes.position,Vt=r.ids,Xt=r.intersectionSet;for(let xt=0,Zt=Vt.length;xt<Zt;xt++){const wt=Vt[xt],Wt=Le===-1?0:Re[wt]+Le,It=3*wt,Nt=Pe.getX(It+0),Ft=Pe.getX(It+1),Ht=Pe.getX(It+2);_triA.a.fromBufferAttribute(ze,Nt).applyMatrix4(_matrix),_triA.b.fromBufferAttribute(ze,Ft).applyMatrix4(_matrix),_triA.c.fromBufferAttribute(ze,Ht).applyMatrix4(_matrix),le.reset(),le.initialize(_triA);const Kt=Xt[wt];for(let jt=0,n0=Kt.length;jt<n0;jt++){const a0=3*Kt[jt],l0=ke.getX(a0+0),s0=ke.getX(a0+1),$t=ke.getX(a0+2);_triB.a.fromBufferAttribute(Gt,l0),_triB.b.fromBufferAttribute(Gt,s0),_triB.c.fromBufferAttribute(Gt,$t),le.splitByTriangle(_triB)}const Yt=le.triangles;for(let jt=0,n0=Yt.length;jt<n0;jt++){const a0=Yt[jt],l0=le.coplanarTriangleUsed?getHitSideWithCoplanarCheck(a0,Fe):getHitSide(a0,Fe);_attr.length=0,_actions.length=0;for(let s0=0,$t=o.length;s0<$t;s0++){const qt=getOperationAction(o[s0],l0,V);qt!==SKIP_TRI&&(_actions.push(qt),_attr.push(fe[s0].getGroupAttrSet(Wt)))}if(_attr.length!==0){_triA.getBarycoord(a0.a,_barycoordTri.a),_triA.getBarycoord(a0.b,_barycoordTri.b),_triA.getBarycoord(a0.c,_barycoordTri.c);for(let s0=0,$t=_attr.length;s0<$t;s0++){const qt=_attr[s0],o0=_actions[s0]===INVERT_TRI;appendAttributeFromTriangle(wt,_barycoordTri,v.geometry,v.matrixWorld,_normalMatrix,qt,Ce!==o0)}}}}return Vt.length}function performWholeTriangleOperations(v,e,r,o,V,le,fe=0){const Le=v.matrixWorld.determinant()<0;_matrix.copy(e.matrixWorld).invert().multiply(v.matrixWorld),_normalMatrix.getNormalMatrix(v.matrixWorld).multiplyScalar(Le?-1:1);const Ce=e.geometry.boundsTree,Re=v.geometry.groupIndices,Pe=v.geometry.index,ze=v.geometry.attributes,Fe=ze.position,ke=[],Gt=v.geometry.halfEdges,Vt=new Set,Xt=getTriCount(v.geometry);for(let xt=0,Zt=Xt;xt<Zt;xt++)xt in r.intersectionSet||Vt.add(xt);for(;Vt.size>0;){const xt=getFirstIdFromSet(Vt);Vt.delete(xt),ke.push(xt);const Zt=3*xt,wt=Pe.getX(Zt+0),Wt=Pe.getX(Zt+1),It=Pe.getX(Zt+2);_tri.a.fromBufferAttribute(Fe,wt).applyMatrix4(_matrix),_tri.b.fromBufferAttribute(Fe,Wt).applyMatrix4(_matrix),_tri.c.fromBufferAttribute(Fe,It).applyMatrix4(_matrix);const Nt=getHitSide(_tri,Ce);_actions.length=0,_attr.length=0;for(let Ft=0,Ht=o.length;Ft<Ht;Ft++){const Kt=getOperationAction(o[Ft],Nt,V);Kt!==SKIP_TRI&&(_actions.push(Kt),_attr.push(le[Ft]))}for(;ke.length>0;){const Ft=ke.pop();for(let Ht=0;Ht<3;Ht++){const Kt=Gt.getSiblingTriangleIndex(Ft,Ht);Kt!==-1&&Vt.has(Kt)&&(ke.push(Kt),Vt.delete(Kt))}if(_attr.length!==0){const Ht=3*Ft,Kt=Pe.getX(Ht+0),Yt=Pe.getX(Ht+1),jt=Pe.getX(Ht+2),n0=fe===-1?0:Re[Ft]+fe;if(_tri.a.fromBufferAttribute(Fe,Kt),_tri.b.fromBufferAttribute(Fe,Yt),_tri.c.fromBufferAttribute(Fe,jt),!isTriDegenerate(_tri))for(let a0=0,l0=_attr.length;a0<l0;a0++){const s0=_actions[a0],$t=_attr[a0].getGroupAttrSet(n0),qt=s0===INVERT_TRI;appendAttributesFromIndices(Kt,Yt,jt,ze,v.matrixWorld,_normalMatrix,$t,qt!==Le)}}}}}function joinGroups(v){for(let e=0;e<v.length-1;e++){const r=v[e],o=v[e+1];if(r.materialIndex===o.materialIndex){const V=r.start,le=o.start+o.count;o.start=V,o.count=le-V,v.splice(e,1),e--}}}function prepareAttributesData(v,e,r,o){r.clear();const V=v.attributes;for(let le=0,fe=o.length;le<fe;le++){const Le=o[le],Ce=V[Le];r.initializeArray(Le,Ce.array.constructor,Ce.itemSize,Ce.normalized)}for(const le in r.attributes)o.includes(le)||r.delete(le);for(const le in e.attributes)o.includes(le)||(e.deleteAttribute(le),e.dispose())}function assignBufferData(v,e,r){let o=!1,V=-1;const le=v.attributes,fe=e.groupAttributes[0];for(const Ce in fe){const Re=e.getTotalLength(Ce),Pe=e.getType(Ce),ze=e.getItemSize(Ce),Fe=e.getNormalized(Ce);let ke=le[Ce];(!ke||ke.array.length<Re)&&(ke=new BufferAttribute(new Pe(Re),ze,Fe),v.setAttribute(Ce,ke),o=!0);let Gt=0;for(let Vt=0,Xt=Math.min(r.length,e.groupCount);Vt<Xt;Vt++){const xt=r[Vt].index,{array:Zt,type:wt,length:Wt}=e.groupAttributes[xt][Ce],It=new wt(Zt.buffer,0,Wt);ke.array.set(It,Gt),Gt+=It.length}ke.needsUpdate=!0,V=Re/ke.itemSize}if(v.index){const Ce=v.index.array;if(Ce.length<V)v.index=null,o=!0;else for(let Re=0,Pe=Ce.length;Re<Pe;Re++)Ce[Re]=Re}let Le=0;v.clearGroups();for(let Ce=0,Re=Math.min(r.length,e.groupCount);Ce<Re;Ce++){const{index:Pe,materialIndex:ze}=r[Ce],Fe=e.getCount(Pe);Fe!==0&&(v.addGroup(Le,Fe,ze),Le+=Fe)}v.setDrawRange(0,V),v.boundsTree=null,o&&v.dispose()}function getMaterialList(v,e){let r=e;return Array.isArray(e)||(r=[],v.forEach(o=>{r[o.materialIndex]=e})),r}class Evaluator{constructor(){this.triangleSplitter=new TriangleSplitter,this.attributeData=[],this.attributes=["position","uv","normal"],this.useGroups=!0,this.consolidateGroups=!0,this.debug=new OperationDebugData}getGroupRanges(e){return!this.useGroups||e.groups.length===0?[{start:0,count:1/0,materialIndex:0}]:e.groups.map(r=>gi({},r))}evaluate(e,r,o,V=new Brush){let le=!0;if(Array.isArray(o)||(o=[o]),Array.isArray(V)||(V=[V],le=!1),V.length!==o.length)throw new Error("Evaluator: operations and target array passed as different sizes.");e.prepareGeometry(),r.prepareGeometry();const{triangleSplitter:fe,attributeData:Le,attributes:Ce,useGroups:Re,consolidateGroups:Pe,debug:ze}=this;for(;Le.length<V.length;)Le.push(new TypedAttributeData);V.forEach((xt,Zt)=>{prepareAttributesData(e.geometry,xt.geometry,Le[Zt],Ce)}),ze.init(),performOperation(e,r,o,fe,Le,{useGroups:Re}),ze.complete();const Fe=this.getGroupRanges(e.geometry),ke=getMaterialList(Fe,e.material),Gt=this.getGroupRanges(r.geometry),Vt=getMaterialList(Gt,r.material);Gt.forEach(xt=>xt.materialIndex+=ke.length);let Xt=[...Fe,...Gt].map((xt,Zt)=>qi(gi({},xt),{index:Zt}));if(Re){const xt=[...ke,...Vt];Pe&&(Xt=Xt.map(wt=>{const Wt=xt[wt.materialIndex];return wt.materialIndex=xt.indexOf(Wt),wt}).sort((wt,Wt)=>wt.materialIndex-Wt.materialIndex));const Zt=[];for(let wt=0,Wt=xt.length;wt<Wt;wt++){let It=!1;for(let Nt=0,Ft=Xt.length;Nt<Ft;Nt++){const Ht=Xt[Nt];Ht.materialIndex===wt&&(It=!0,Ht.materialIndex=Zt.length)}It&&Zt.push(xt[wt])}V.forEach(wt=>{wt.material=Zt})}else Xt=[{start:0,count:1/0,index:0,materialIndex:0}],V.forEach(xt=>{xt.material=ke[0]});return V.forEach((xt,Zt)=>{const wt=xt.geometry;assignBufferData(wt,Le[Zt],Xt),Pe&&joinGroups(wt.groups)}),le?V:V[0]}evaluateHierarchy(e,r=new Brush){e.updateMatrixWorld(!0);const o=(le,fe)=>{const Le=le.children;for(let Ce=0,Re=Le.length;Ce<Re;Ce++){const Pe=Le[Ce];Pe.isOperationGroup?o(Pe,fe):fe(Pe)}},V=le=>{const fe=le.children;let Le=!1;for(let Re=0,Pe=fe.length;Re<Pe;Re++){const ze=fe[Re];Le=V(ze)||Le}const Ce=le.isDirty();if(Ce&&le.markUpdated(),Le&&!le.isOperationGroup){let Re;return o(le,Pe=>{Re?Re=this.evaluate(Re,Pe,Pe.operation):Re=this.evaluate(le,Pe,Pe.operation)}),le._cachedGeometry=Re.geometry,le._cachedMaterials=Re.material,!0}else return Le||Ce};return V(e),r.geometry=e._cachedGeometry,r.material=e._cachedMaterials,r}reset(){this.triangleSplitter.reset()}}class RectAreaLightTexturesLib{static init(){const e=[1,0,0,2e-5,1,0,0,503905e-9,1,0,0,.00201562,1,0,0,.00453516,1,0,0,.00806253,1,0,0,.0125978,1,0,0,.018141,1,0,0,.0246924,1,0,0,.0322525,1,0,0,.0408213,1,0,0,.0503999,1,0,0,.0609894,1,0,0,.0725906,1,0,0,.0852058,1,0,0,.0988363,1,0,0,.113484,1,0,0,.129153,1,0,0,.145839,1,0,0,.163548,1,0,0,.182266,1,0,0,.201942,1,0,0,.222314,1,0,0,.241906,1,0,0,.262314,1,0,0,.285754,1,0,0,.310159,1,0,0,.335426,1,0,0,.361341,1,0,0,.387445,1,0,0,.412784,1,0,0,.438197,1,0,0,.466966,1,0,0,.49559,1,0,0,.523448,1,0,0,.549938,1,0,0,.57979,1,0,0,.608746,1,0,0,.636185,1,0,0,.664748,1,0,0,.69313,1,0,0,.71966,1,0,0,.747662,1,0,0,.774023,1,0,0,.799775,1,0,0,.825274,1,0,0,.849156,1,0,0,.873248,1,0,0,.89532,1,0,0,.917565,1,0,0,.937863,1,0,0,.958139,1,0,0,.976563,1,0,0,.994658,1,0,0,1.0112,1,0,0,1.02712,1,0,0,1.04189,1,0,0,1.05568,1,0,0,1.06877,1,0,0,1.08058,1,0,0,1.09194,1,0,0,1.10191,1,0,0,1.11161,1,0,0,1.1199,1,0,0,1.12813,.999547,-448815e-12,.0224417,199902e-10,.999495,-113079e-10,.0224406,503651e-9,.999496,-452317e-10,.0224406,.00201461,.999496,-101772e-9,.0224406,.00453287,.999495,-180928e-9,.0224406,.00805845,.999497,-282702e-9,.0224406,.0125914,.999496,-407096e-9,.0224406,.0181319,.999498,-554114e-9,.0224406,.02468,.999499,-723768e-9,.0224406,.0322363,.999495,-916058e-9,.0224405,.0408009,.999499,-.00113101,.0224408,.050375,.999494,-.00136863,.0224405,.0609586,.999489,-.00162896,.0224401,.0725537,.999489,-.00191201,.0224414,.0851619,.999498,-.00221787,.0224413,.0987867,.999492,-.00254642,.0224409,.113426,.999507,-.00289779,.0224417,.129088,.999494,-.0032716,.0224386,.145767,.999546,-.0036673,.0224424,.163472,.999543,-.00408166,.0224387,.182182,.999499,-.00450056,.0224338,.201843,.999503,-.00483661,.0224203,.222198,.999546,-.00452928,.022315,.241714,.999508,-.00587403,.0224329,.262184,.999509,-.00638806,.0224271,.285609,.999501,-.00691028,.0224166,.309998,.999539,-.00741979,.0223989,.335262,.999454,-.00786282,.0223675,.361154,.999529,-.00811928,.0222828,.387224,.999503,-.00799941,.0221063,.41252,.999561,-.00952753,.0223057,.438006,.999557,-.0099134,.0222065,.466735,.999541,-.0100935,.0220402,.495332,.999562,-.00996821,.0218067,.523197,.999556,-.0105031,.0217096,.550223,.999561,-.0114191,.0217215,.579498,.999588,-.0111818,.0213357,.608416,.999633,-.0107725,.0208689,.635965,.999527,-.0121671,.0210149,.664476,.999508,-.0116005,.020431,.692786,.999568,-.0115604,.0199791,.719709,.999671,-.0121117,.0197415,.74737,.999688,-.0110769,.0188846,.773692,.99962,-.0122368,.0188452,.799534,.999823,-.0110325,.0178001,.825046,.999599,-.0114923,.0174221,.849075,.999619,-.0105923,.0164345,.872999,.999613,-.0105988,.0158227,.895371,.99964,-.00979861,.0148131,.917364,.99977,-.00967238,.0140721,.938002,.999726,-.00869175,.0129543,.957917,.99973,-.00866872,.0122329,.976557,.999773,-.00731956,.0108958,.994459,.999811,-.00756027,.0102715,1.01118,.999862,-.00583732,.00878781,1.02701,.999835,-.00631438,.00827529,1.04186,.999871,-.00450785,.00674583,1.05569,.999867,-.00486079,.00621041,1.06861,.999939,-.00322072,.00478301,1.08064,.999918,-.00318199,.00406395,1.09181,1.00003,-.00193348,.00280682,1.10207,.999928,-.00153729,.00198741,1.11152,.999933,-623666e-9,917714e-9,1.12009,1,-102387e-11,907581e-12,1.12813,.997866,-896716e-12,.0448334,199584e-10,.997987,-225945e-10,.0448389,502891e-9,.997987,-903781e-10,.0448388,.00201156,.997985,-203351e-9,.0448388,.00452602,.997986,-361514e-9,.0448388,.00804629,.997987,-56487e-8,.0448389,.0125724,.997988,-813423e-9,.0448389,.0181045,.997984,-.00110718,.0448387,.0246427,.997985,-.00144616,.0448388,.0321875,.997987,-.00183038,.044839,.0407392,.997983,-.00225987,.0448387,.0502986,.997991,-.00273467,.0448389,.0608667,.997984,-.00325481,.0448384,.0724444,.998002,-.00382043,.044839,.0850348,.997997,-.00443145,.0448396,.0986372,.998007,-.00508796,.0448397,.113255,.998008,-.00578985,.04484,.128891,.998003,-.00653683,.0448384,.145548,.997983,-.00732713,.0448358,.163221,.997985,-.00815454,.0448358,.181899,.998005,-.00898985,.0448286,.201533,.998026,-.00964404,.0447934,.221821,.998055,-.00922677,.044611,.241282,.99804,-.0117361,.0448245,.261791,.998048,-.0127628,.0448159,.285181,.998088,-.0138055,.0447996,.30954,.998058,-.0148206,.0447669,.334751,.998099,-.0156998,.044697,.36061,.998116,-.0161976,.0445122,.386603,.998195,-.015945,.0441711,.411844,.998168,-.0183947,.0444255,.43773,.998184,-.0197913,.0443809,.466009,.998251,-.0201426,.0440689,.494574,.998305,-.0198847,.0435632,.522405,.998273,-.0210577,.043414,.549967,.998254,-.0227901,.0433943,.578655,.998349,-.0223108,.0426529,.60758,.99843,-.0223088,.042,.635524,.998373,-.0241141,.0418987,.663621,.998425,-.0231446,.0408118,.691906,.998504,-.0233684,.0400565,.719339,.998443,-.0241652,.0394634,.74643,.99848,-.0228715,.0380002,.773086,.998569,-.023519,.0372322,.798988,.998619,-.0223108,.0356468,.824249,.998594,-.0223105,.034523,.848808,.998622,-.0213426,.0328887,.87227,.998669,-.0207912,.0314374,.895157,.998705,-.0198416,.0296925,.916769,.998786,-.0189168,.0279634,.937773,.998888,-.0178811,.0261597,.957431,.99906,-.0166845,.0242159,.976495,.999038,-.0155464,.0222638,.994169,.999237,-.0141349,.0201967,1.01112,.999378,-.0129324,.0181744,1.02692,.999433,-.0113192,.0159898,1.04174,.999439,-.0101244,.0140385,1.05559,.999614,-.00837456,.0117826,1.06852,.999722,-.00721769,.00983745,1.08069,.999817,-.00554067,.00769002,1.09176,.99983,-.00426961,.005782,1.10211,.999964,-.00273904,.00374503,1.11152,1.00001,-.00136739,.00187176,1.12031,.999946,393227e-10,-28919e-9,1.12804,.995847,-13435e-10,.0671785,19916e-9,.995464,-338387e-10,.0671527,501622e-9,.99547,-135355e-9,.0671531,.00200649,.995471,-30455e-8,.0671532,.00451461,.99547,-541423e-9,.0671531,.008026,.995471,-84598e-8,.0671531,.0125407,.99547,-.00121823,.0671531,.0180589,.99547,-.00165817,.0671531,.0245806,.995463,-.00216583,.0671526,.0321062,.995468,-.00274127,.0671527,.0406366,.995474,-.00338447,.0671534,.0501717,.995473,-.00409554,.0671533,.0607131,.995478,-.00487451,.0671531,.0722618,.995476,-.00572148,.0671532,.0848191,.995477,-.00663658,.0671539,.0983882,.995498,-.00761986,.0671541,.112972,.995509,-.00867094,.0671542,.128568,.995509,-.00978951,.0671531,.145183,.995503,-.0109725,.0671491,.162808,.995501,-.012211,.0671465,.181441,.99553,-.0134565,.0671371,.201015,.99555,-.014391,.0670831,.221206,.99558,-.014351,.0668883,.240813,.995577,-.0173997,.0671055,.261257,.995602,-.0191111,.0671178,.284467,.995623,-.0206705,.0670946,.308765,.995658,-.022184,.0670472,.333905,.995705,-.0234832,.0669417,.359677,.995719,-.0241933,.0666714,.385554,.995786,-.0243539,.066266,.410951,.995887,-.0271866,.0664367,.437163,.995944,-.0296012,.0664931,.464842,.996004,-.0301045,.0660105,.49332,.996128,-.0298311,.0652694,.521131,.996253,-.0316426,.0650739,.549167,.996244,-.0339043,.0649433,.57737,.996309,-.033329,.0638926,.606073,.996417,-.0338935,.0630849,.634527,.996372,-.0353104,.0625083,.66256,.996542,-.0348942,.0611986,.690516,.996568,-.0351614,.060069,.718317,.996711,-.0354317,.0588522,.74528,.996671,-.0349513,.0571902,.772061,.996865,-.0345622,.0555321,.798089,.996802,-.0342566,.0537816,.823178,.996992,-.0330862,.0516095,.847949,.996944,-.0324666,.0495537,.871431,.997146,-.0309544,.0470302,.894357,.997189,-.0299372,.0446043,.916142,.997471,-.0281389,.0418812,.937193,.997515,-.0268702,.0391823,.957,.997812,-.0247166,.0361338,.975936,.998027,-.0233525,.0333945,.99391,.998233,-.0209839,.0301917,1.01075,.998481,-.0194309,.027271,1.02669,.998859,-.0169728,.0240162,1.04173,.99894,-.0152322,.0210517,1.05551,.999132,-.0127497,.0178632,1.06856,.999369,-.0108282,.014787,1.08054,.999549,-.00845886,.0116185,1.09185,.999805,-.0063937,.00867209,1.10207,.99985,-.00414582,.00566823,1.1117,.999912,-.00207443,.00277562,1.12022,1.00001,870226e-10,-53766e-9,1.12832,.991943,-178672e-11,.0893382,198384e-10,.991952,-450183e-10,.089339,499849e-9,.991956,-180074e-9,.0893394,.0019994,.991955,-405167e-9,.0893393,.00449867,.991953,-720298e-9,.0893391,.00799764,.991955,-.00112548,.0893393,.0124964,.991957,-.0016207,.0893395,.0179951,.991958,-.00220601,.0893396,.0244939,.991947,-.00288137,.0893385,.0319929,.991962,-.00364693,.0893399,.0404933,.991965,-.00450264,.0893399,.049995,.99198,-.00544862,.0893411,.0604995,.99197,-.00648491,.0893397,.0720074,.991976,-.00761164,.089341,.0845207,.99198,-.00882891,.0893405,.0980413,.991982,-.0101367,.0893396,.112571,.992008,-.011535,.0893415,.128115,.992026,-.0130228,.0893414,.144672,.992064,-.0145966,.0893418,.162241,.992041,-.0162421,.0893359,.180801,.992086,-.0178888,.0893214,.200302,.992157,-.0190368,.0892401,.220332,.992181,-.0195584,.0890525,.240144,.992175,-.0227257,.0892153,.260728,.99221,-.0254195,.089304,.283473,.99222,-.0274883,.0892703,.307673,.992317,-.0294905,.0892027,.332729,.992374,-.0311861,.0890577,.358387,.992505,-.0320656,.0886994,.384102,.992568,-.0329715,.0883198,.409767,.992675,-.036006,.0883602,.436145,.992746,-.0392897,.0884591,.463217,.992873,-.0399337,.0878287,.491557,.992934,-.040231,.0870108,.519516,.993091,-.0422013,.0865857,.547741,.993259,-.0443503,.0861937,.575792,.993455,-.0446368,.0851187,.604233,.993497,-.0454299,.0840576,.632925,.993694,-.0463296,.0829671,.660985,.993718,-.0470619,.0817185,.688714,.993973,-.0468838,.0800294,.716743,.994207,-.046705,.0781286,.74377,.994168,-.0469698,.0763337,.77042,.9945,-.0456816,.0738184,.796659,.994356,-.0455518,.0715545,.821868,.994747,-.0439488,.0686085,.846572,.994937,-.0430056,.065869,.870435,.995142,-.0413414,.0626446,.893272,.995451,-.0396521,.05929,.915376,.995445,-.0378453,.0558503,.936196,.995967,-.0355219,.0520949,.956376,.996094,-.0335146,.048377,.975327,.996622,-.030682,.0442575,.993471,.996938,-.0285504,.0404693,1.01052,.997383,-.0253399,.0360903,1.02637,.997714,-.0231651,.0322176,1.04139,.998249,-.0198138,.0278433,1.05542,.998596,-.0174337,.0238759,1.06846,.998946,-.0141349,.0195944,1.08056,.99928,-.0115603,.0156279,1.09181,.999507,-.00839065,.0114607,1.10213,.999697,-.005666,.00763325,1.11169,.999869,-.00269902,.00364946,1.12042,1.00001,623836e-10,-319288e-10,1.12832,.987221,-222675e-11,.111332,197456e-10,.98739,-561116e-10,.111351,497563e-9,.987448,-224453e-9,.111357,.00199031,.987441,-505019e-9,.111357,.0044782,.987442,-897816e-9,.111357,.00796129,.987442,-.00140284,.111357,.0124396,.987444,-.00202012,.111357,.0179132,.987442,-.00274964,.111357,.0243824,.987446,-.00359147,.111357,.0318474,.987435,-.00454562,.111356,.0403086,.987461,-.00561225,.111358,.0497678,.987458,-.00679125,.111358,.0602239,.987443,-.0080828,.111356,.0716792,.987476,-.0094872,.111358,.0841364,.98749,-.0110044,.111361,.097597,.987508,-.0126344,.111362,.112062,.987494,-.0143767,.111357,.127533,.987526,-.0162307,.111359,.144015,.987558,-.0181912,.111361,.161502,.987602,-.0202393,.111355,.179979,.987692,-.022273,.111346,.199386,.987702,-.0235306,.111215,.219183,.987789,-.0247628,.111061,.239202,.987776,-.0280668,.111171,.259957,.987856,-.0316751,.111327,.282198,.987912,-.0342468,.111282,.306294,.988,-.0367205,.111198,.331219,.988055,-.0387766,.110994,.356708,.988241,-.0397722,.110547,.382234,.988399,-.0416076,.110198,.408227,.988539,-.0448192,.110137,.434662,.988661,-.0483793,.110143,.461442,.988967,-.0495895,.109453,.489318,.989073,-.0506797,.108628,.517516,.989274,-.0526953,.108003,.545844,.989528,-.054578,.107255,.573823,.989709,-.0561503,.106294,.601944,.989991,-.056866,.104896,.630855,.990392,-.0572914,.103336,.658925,.990374,-.0586224,.10189,.686661,.990747,-.0584764,.099783,.714548,.991041,-.0582662,.0974309,.74186,.991236,-.0584118,.0951678,.768422,.991585,-.0573055,.0921581,.794817,.991984,-.0564241,.0891167,.820336,.9921,-.0553608,.085805,.84493,.992749,-.0533816,.0820354,.868961,.99288,-.0518661,.0782181,.891931,.993511,-.0492492,.0738935,.914186,.993617,-.0471956,.0696402,.93532,.99411,-.044216,.0649659,.95543,.994595,-.0416654,.0603177,.974685,.994976,-.0384314,.0553493,.992807,.995579,-.0353491,.0503942,1.00996,.996069,-.0319787,.0452123,1.02606,.996718,-.028472,.0400112,1.04114,.997173,-.0250789,.0349456,1.05517,.997818,-.0213326,.029653,1.0683,.998318,-.0178509,.024549,1.0805,.998853,-.0141118,.0194197,1.09177,.999218,-.0105914,.0143869,1.1022,.999594,-.00693474,.00943517,1.11175,.99975,-.00340478,.00464051,1.12056,1.00001,109172e-9,-112821e-9,1.12853,.983383,-266524e-11,.133358,196534e-10,.981942,-671009e-10,.133162,494804e-9,.981946,-268405e-9,.133163,.00197923,.981944,-603912e-9,.133163,.00445326,.981941,-.00107362,.133162,.00791693,.981946,-.00167755,.133163,.0123703,.981944,-.00241569,.133162,.0178135,.981945,-.00328807,.133163,.0242466,.981945,-.00429472,.133162,.03167,.981955,-.00543573,.133164,.0400846,.981951,-.00671105,.133163,.0494901,.981968,-.00812092,.133165,.0598886,.981979,-.00966541,.133166,.0712811,.981996,-.0113446,.133168,.083669,.982014,-.0131585,.133169,.0970533,.982011,-.0151073,.133167,.111438,.982062,-.0171906,.133172,.126826,.9821,-.0194067,.133175,.143215,.982149,-.0217502,.133176,.160609,.982163,-.0241945,.133173,.178981,.982247,-.0265907,.133148,.198249,.982291,-.027916,.132974,.217795,.982396,-.0299663,.132868,.238042,.982456,-.0334544,.132934,.258901,.982499,-.0378636,.133137,.280639,.982617,-.0409274,.133085,.304604,.98274,-.0438523,.132985,.329376,.982944,-.0462288,.132728,.354697,.98308,-.0475995,.132228,.380102,.983391,-.0501901,.131924,.406256,.983514,-.0535899,.131737,.432735,.98373,-.0571858,.131567,.459359,.984056,-.0592353,.130932,.486637,.984234,-.0610488,.130092,.51509,.984748,-.0630758,.12923,.543461,.985073,-.0647398,.128174,.571376,.985195,-.0671941,.127133,.599414,.985734,-.0681345,.125576,.628134,.986241,-.0686089,.123639,.656399,.986356,-.0698511,.121834,.684258,.986894,-.0700931,.119454,.711818,.987382,-.0698321,.116718,.739511,.988109,-.0693975,.113699,.766267,.988363,-.0689584,.110454,.792456,.989112,-.0672353,.106602,.81813,.989241,-.0662034,.10267,.842889,.990333,-.0638938,.0981381,.867204,.990591,-.0618534,.0935388,.89038,.991106,-.0593117,.088553,.912576,.991919,-.0562676,.0832187,.934118,.992111,-.0534085,.0778302,.954254,.992997,-.0495459,.0720453,.973722,.993317,-.0463707,.0663458,.991949,.994133,-.0421245,.0601883,1.00936,.994705,-.0384977,.0542501,1.02559,.995495,-.0340956,.0479862,1.04083,.996206,-.030105,.041887,1.05497,.996971,-.0256095,.0355355,1.06824,.997796,-.0213932,.0293655,1.08056,.998272,-.0169612,.0232926,1.09182,.998857,-.0126756,.0172786,1.10219,.99939,-.00832486,.0113156,1.11192,.999752,-.00410826,.00557892,1.12075,1,150957e-9,-119101e-9,1.12885,.975169,-309397e-11,.154669,195073e-10,.975439,-779608e-10,.154712,491534e-9,.975464,-311847e-9,.154716,.00196617,.975464,-701656e-9,.154716,.00442387,.975462,-.0012474,.154715,.0078647,.975461,-.00194906,.154715,.0122886,.975464,-.00280667,.154715,.0176959,.975468,-.00382025,.154716,.0240867,.975471,-.00498985,.154716,.0314612,.975472,-.00631541,.154717,.0398199,.975486,-.00779719,.154718,.0491639,.975489,-.00943505,.154718,.0594932,.975509,-.0112295,.154721,.0708113,.97554,-.0131802,.154724,.0831176,.975557,-.0152876,.154726,.096415,.975585,-.0175512,.154728,.110705,.975605,-.0199713,.154729,.125992,.975645,-.0225447,.154729,.142272,.975711,-.0252649,.154735,.159549,.975788,-.0280986,.154736,.177805,.975872,-.0308232,.154704,.196911,.975968,-.0324841,.154525,.216324,.976063,-.0351281,.154432,.236628,.976157,-.0388618,.15446,.257539,.976204,-.0437704,.154665,.278975,.976358,-.047514,.154652,.302606,.976571,-.0508638,.154535,.327204,.976725,-.0534995,.154221,.352276,.977013,-.0555547,.153737,.377696,.977294,-.0586728,.153403,.403855,.977602,-.0622715,.15312,.430333,.977932,-.0658166,.152755,.456855,.978241,-.0689877,.152233,.483668,.978602,-.0712805,.15132,.512097,.979234,-.0732775,.150235,.540455,.97977,-.075163,.148978,.568486,.979995,-.0778026,.147755,.596524,.98078,-.0791854,.146019,.624825,.981628,-.0799666,.143906,.653403,.982067,-.0808532,.141561,.681445,.98271,-.0816024,.139025,.708918,.983734,-.0812511,.135764,.736594,.98431,-.0806201,.132152,.763576,.985071,-.0801605,.12846,.789797,.98618,-.0784208,.124084,.815804,.986886,-.0766643,.1193,.840869,.987485,-.0747744,.114236,.864952,.988431,-.0716701,.108654,.888431,.988886,-.0691609,.102994,.910963,.990024,-.0654048,.0967278,.932629,.990401,-.0619765,.090384,.95313,.991093,-.0579296,.0837885,.972587,.992018,-.0536576,.0770171,.991184,.992536,-.0493719,.0701486,1.00863,.993421,-.0444813,.062953,1.02494,.993928,-.040008,.0560455,1.04017,.994994,-.0347982,.04856,1.05463,.995866,-.0301017,.0416152,1.06807,.996916,-.0248225,.0342597,1.08039,.997766,-.0199229,.0271668,1.09177,.998479,-.0147422,.0201387,1.10235,.99921,-.00980173,.0131944,1.11206,.999652,-.0047426,.00640712,1.12104,.999998,891673e-10,-10379e-8,1.12906,.967868,-351885e-11,.175947,193569e-10,.968001,-886733e-10,.175972,487782e-9,.96801,-354697e-9,.175973,.00195115,.968012,-798063e-9,.175974,.00439006,.968011,-.00141879,.175973,.00780461,.968011,-.00221686,.175973,.0121948,.968016,-.00319231,.175974,.0175607,.968019,-.00434515,.175974,.0239027,.968018,-.00567538,.175974,.0312208,.968033,-.00718308,.175977,.0395158,.968049,-.00886836,.175979,.0487885,.968047,-.0107312,.175978,.0590394,.968072,-.0127719,.175981,.0702705,.968108,-.0149905,.175986,.0824836,.968112,-.0173866,.175985,.0956783,.968173,-.0199611,.175993,.109862,.96827,-.0227128,.176008,.125033,.968292,-.025639,.17601,.141193,.968339,-.0287299,.176007,.158336,.968389,-.0319399,.176001,.176441,.968501,-.034941,.175962,.195359,.968646,-.0370812,.175793,.214686,.968789,-.0402329,.175708,.234973,.96886,-.0442601,.1757,.255871,.969013,-.049398,.175876,.277238,.969242,-.0539932,.17594,.300326,.969419,-.0577299,.175781,.324702,.969763,-.0605643,.175432,.349527,.970093,-.0634488,.174992,.374976,.970361,-.0670589,.174611,.401097,.970825,-.0708246,.174226,.427496,.971214,-.0742871,.173684,.453858,.971622,-.0782608,.173186,.480637,.972175,-.0813151,.172288,.508655,.972944,-.0832678,.170979,.536973,.973595,-.0855964,.169573,.565138,.974345,-.0882163,.168152,.593222,.975233,-.0901671,.166314,.621201,.976239,-.0912111,.163931,.649919,.977289,-.0916959,.161106,.678011,.978076,-.0927061,.158272,.705717,.979533,-.0925562,.15475,.733228,.980335,-.0918159,.150638,.760454,.981808,-.0908508,.146201,.786918,.983061,-.0896172,.141386,.812953,.984148,-.0871588,.135837,.838281,.985047,-.0850624,.130135,.862594,.986219,-.0818541,.123882,.88633,.987043,-.0784523,.117126,.908952,.988107,-.0749601,.110341,.930744,.988955,-.0703548,.102885,.951728,.989426,-.0662798,.0954167,.971166,.990421,-.0610834,.0876331,.989984,.991032,-.0562936,.0797785,1.00765,.992041,-.0508154,.0718166,1.02434,.992794,-.0454045,.0637125,1.03976,.993691,-.0398194,.0555338,1.05418,.994778,-.0341482,.0473388,1.06772,.995915,-.028428,.0391016,1.08028,.997109,-.022642,.0309953,1.09185,.998095,-.0168738,.0230288,1.10247,.998985,-.0111274,.0150722,1.11229,.999581,-.00543881,.00740605,1.12131,1.00003,162239e-9,-105549e-9,1.12946,.959505,-393734e-11,.196876,191893e-10,.959599,-992157e-10,.196895,483544e-9,.959641,-396868e-9,.196903,.0019342,.959599,-892948e-9,.196895,.00435193,.959603,-.00158747,.196896,.0077368,.959604,-.00248042,.196896,.0120888,.959605,-.00357184,.196896,.0174082,.959605,-.00486169,.196896,.0236949,.959613,-.00635008,.196897,.0309497,.959619,-.00803696,.196898,.0391725,.959636,-.00992255,.196901,.0483649,.959634,-.0120067,.1969,.0585266,.959675,-.0142898,.196906,.0696609,.959712,-.0167717,.196911,.0817678,.959752,-.0194524,.196918,.0948494,.959807,-.0223321,.196925,.10891,.959828,-.0254091,.196924,.123947,.959906,-.0286815,.196934,.139968,.960005,-.0321371,.196944,.156968,.960071,-.0357114,.196936,.17491,.960237,-.0389064,.196882,.193597,.960367,-.041623,.196731,.21285,.960562,-.0452655,.196654,.233075,.960735,-.0496207,.196643,.253941,.960913,-.0549379,.196774,.275278,.961121,-.0603414,.196893,.297733,.96139,-.0644244,.196717,.321877,.961818,-.067556,.196314,.346476,.962175,-.0712709,.195917,.371907,.96255,-.0752848,.1955,.397916,.963164,-.0792073,.195026,.424229,.963782,-.0828225,.194424,.450637,.964306,-.0873119,.193831,.477288,.964923,-.0911051,.192973,.504716,.966048,-.093251,.19151,.533053,.967024,-.0958983,.190013,.561366,.968038,-.09835,.188253,.589464,.969152,-.100754,.186257,.617433,.970557,-.102239,.183775,.645801,.972104,-.102767,.180645,.674278,.973203,-.103492,.177242,.702004,.975123,-.103793,.17345,.729529,.97641,-.102839,.168886,.756712,.978313,-.101687,.163892,.783801,.980036,-.100314,.158439,.809671,.981339,-.097836,.152211,.835402,.982794,-.0950006,.145679,.860081,.984123,-.0920994,.138949,.883757,.984918,-.0878641,.131283,.90685,.985999,-.083939,.123464,.928786,.987151,-.0791234,.115324,.94983,.987827,-.0739332,.106854,.96962,.988806,-.0688088,.0982691,.98861,.989588,-.0628962,.0893456,1.00667,.990438,-.0573146,.0805392,1.02344,.991506,-.0509433,.0713725,1.03933,.992492,-.0448724,.0623732,1.05378,.993663,-.0383497,.0530838,1.06747,.994956,-.0319593,.0439512,1.08007,.99634,-.025401,.0347803,1.09182,.99761,-.0189687,.0257954,1.1025,.99863,-.0124441,.0169893,1.11247,.99947,-.00614003,.00829498,1.12151,1.00008,216624e-9,-146107e-9,1.12993,.950129,-434955e-11,.217413,190081e-10,.950264,-10957e-8,.217444,47884e-8,.9503,-438299e-9,.217451,.00191543,.950246,-986124e-9,.21744,.00430951,.950246,-.00175311,.21744,.00766137,.950245,-.00273923,.21744,.011971,.950253,-.00394453,.217441,.0172385,.950258,-.00536897,.217442,.0234641,.950267,-.00701262,.217444,.030648,.950277,-.00887551,.217446,.038791,.950284,-.0109576,.217446,.0478931,.950312,-.0132591,.217451,.0579568,.950334,-.01578,.217454,.0689821,.950378,-.0185204,.217462,.0809714,.950417,-.0214803,.217467,.0939265,.950488,-.0246594,.217479,.10785,.950534,-.0280565,.217483,.122743,.950633,-.0316685,.217498,.138611,.950698,-.0354787,.217499,.155442,.950844,-.0394003,.217507,.173208,.950999,-.0426812,.217419,.191605,.951221,-.0461302,.217317,.21084,.951412,-.0502131,.217238,.230945,.951623,-.0549183,.21722,.251745,.951867,-.0604493,.217306,.273001,.952069,-.0665189,.217466,.294874,.952459,-.0709179,.217266,.318732,.952996,-.0746112,.216891,.34318,.953425,-.0789252,.216503,.36849,.953885,-.0833293,.216042,.394373,.954617,-.087371,.215469,.420505,.955429,-.0914054,.214802,.446907,.956068,-.0961671,.214146,.473522,.957094,-.10048,.213286,.50052,.958372,-.103248,.211796,.528715,.959654,-.106033,.21016,.557065,.961305,-.108384,.208149,.585286,.962785,-.111122,.206024,.613334,.964848,-.112981,.203442,.641334,.966498,-.113717,.19996,.669955,.968678,-.114121,.196105,.698094,.970489,-.114524,.191906,.725643,.972903,-.113792,.186963,.752856,.974701,-.112406,.181343,.780013,.976718,-.110685,.175185,.806268,.978905,-.108468,.168535,.832073,.980267,-.105061,.161106,.857149,.981967,-.101675,.153387,.881145,.983063,-.0974492,.145199,.904255,.984432,-.0925815,.136527,.926686,.985734,-.0877983,.127584,.947901,.986228,-.081884,.118125,.968111,.98719,-.0761208,.108594,.98719,.988228,-.0698196,.0989996,1.00559,.989046,-.0632739,.0890074,1.02246,.990242,-.056522,.0790832,1.03841,.991252,-.0495272,.0689182,1.05347,.992542,-.0425373,.0588592,1.06724,.994096,-.0353198,.0486833,1.08009,.995593,-.028235,.0385977,1.09177,.99711,-.0209511,.0286457,1.10274,.998263,-.0139289,.0188497,1.11262,.999254,-.0067359,.009208,1.12191,.999967,141846e-9,-657764e-10,1.13024,.935608,-474692e-11,.236466,187817e-10,.93996,-11971e-8,.237568,473646e-9,.939959,-478845e-9,.237567,.0018946,.939954,-.0010774,.237566,.00426284,.939956,-.00191538,.237566,.00757842,.939954,-.00299277,.237566,.0118413,.93996,-.00430961,.237567,.0170518,.939969,-.00586589,.237569,.02321,.939982,-.00766166,.237572,.0303164,.939987,-.00969686,.237572,.0383711,.939997,-.0119715,.237574,.0473751,.940031,-.0144858,.237581,.0573298,.940073,-.0172399,.237589,.0682366,.94012,-.0202335,.237598,.080097,.940162,-.0234663,.237604,.0929116,.940237,-.0269387,.237615,.106686,.940328,-.0306489,.237632,.121421,.940419,-.0345917,.237645,.137115,.940522,-.0387481,.237654,.153766,.940702,-.0429906,.237661,.17133,.940871,-.0465089,.237561,.189502,.941103,-.050531,.23748,.208616,.941369,-.0550657,.237423,.228595,.941641,-.0601337,.237399,.249287,.941903,-.0658804,.237443,.270467,.942224,-.0722674,.237597,.292024,.942633,-.0771788,.237419,.315272,.943172,-.0815623,.237068,.339579,.943691,-.0863973,.236682,.364717,.944382,-.0911536,.236213,.390435,.945392,-.0952967,.235562,.416425,.946185,-.0998948,.234832,.442772,.947212,-.104796,.234114,.469347,.948778,-.10928,.233222,.496162,.950149,-.113081,.231845,.523978,.951989,-.115893,.230005,.552295,.953921,-.11846,.227862,.580569,.955624,-.12115,.225439,.608698,.958234,-.123373,.222635,.636696,.960593,-.124519,.219093,.665208,.963201,-.124736,.214749,.693557,.965642,-.125012,.210059,.721334,.968765,-.124661,.204935,.748613,.971753,-.122996,.198661,.776224,.973751,-.120998,.191823,.802461,.976709,-.118583,.184359,.828399,.977956,-.115102,.176437,.853693,.979672,-.111077,.167681,.877962,.981816,-.10688,.158872,.901564,.98238,-.101469,.149398,.924057,.983964,-.0960013,.139436,.945751,.984933,-.0899626,.12943,.966272,.985694,-.0832973,.11894,.985741,.986822,-.0767082,.108349,1.00407,.987725,-.0693614,.0976026,1.02154,.98877,-.06211,.086652,1.03757,.990129,-.0544143,.0756182,1.05296,.991337,-.046744,.0645753,1.06683,.992978,-.0387931,.0534683,1.0798,.994676,-.030973,.0424137,1.09181,.99645,-.0230311,.0314035,1.10286,.997967,-.0152065,.0206869,1.11291,.99922,-.00744837,.010155,1.12237,1.00002,240209e-9,-752767e-10,1.13089,.922948,-515351e-11,.255626,186069e-10,.928785,-129623e-9,.257244,468009e-9,.928761,-51849e-8,.257237,.00187202,.928751,-.0011666,.257235,.00421204,.928751,-.00207395,.257234,.0074881,.928754,-.00324055,.257235,.0117002,.92876,-.00466639,.257236,.0168486,.928763,-.00635149,.257237,.0229334,.928774,-.00829584,.257239,.029955,.928791,-.0104995,.257243,.0379139,.928804,-.0129623,.257245,.0468108,.928847,-.0156846,.257255,.0566473,.92889,-.0186661,.257263,.0674246,.928924,-.0219067,.257268,.0791433,.928989,-.0254066,.257282,.0918076,.92909,-.0291651,.257301,.105419,.92918,-.0331801,.257316,.119978,.92929,-.0374469,.257332,.135491,.929453,-.041939,.257357,.151948,.929586,-.0464612,.257347,.169275,.929858,-.0503426,.257269,.187257,.930125,-.0548409,.257199,.206204,.930403,-.0598063,.257149,.22601,.930726,-.0652437,.257122,.246561,.931098,-.0712376,.257153,.267618,.931396,-.0777506,.257237,.288993,.931947,-.0832374,.257124,.311527,.932579,-.0883955,.25683,.335697,.933194,-.0937037,.256444,.360634,.934013,-.0987292,.255939,.386126,.935307,-.103215,.255282,.412018,.936374,-.108234,.254538,.438292,.93776,-.113234,.253728,.464805,.939599,-.118013,.25275,.491464,.941036,-.122661,.251404,.518751,.94337,-.125477,.249435,.547133,.945318,-.128374,.247113,.575456,.947995,-.130996,.244441,.60372,.950818,-.133438,.241352,.63174,.954378,-.135004,.237849,.659971,.957151,-.135313,.233188,.688478,.960743,-.13521,.228001,.716767,.964352,-.135007,.222249,.744349,.967273,-.133523,.21542,.771786,.969767,-.131155,.208039,.798639,.973195,-.128492,.200076,.824774,.975557,-.125094,.191451,.850222,.977692,-.120578,.18184,.874761,.98026,-.115882,.172102,.898497,.981394,-.110372,.161859,.921636,.982386,-.10415,.15108,.943467,.983783,-.0978128,.140407,.964045,.98422,-.0906171,.129058,.98398,.985447,-.0832921,.117614,1.00276,.986682,-.0754412,.10585,1.02047,.987326,-.0673885,.0940943,1.03678,.988707,-.0592565,.0822093,1.05218,.990185,-.050717,.070192,1.06652,.991866,-.0423486,.0582081,1.07965,.993897,-.0336118,.0460985,1.09188,.995841,-.0252178,.0342737,1.10307,.997605,-.0164893,.0224829,1.11324,.999037,-.00817112,.0110647,1.12262,1.00003,291686e-9,-168673e-9,1.13139,.915304,-552675e-11,.275999,183285e-10,.91668,-139285e-9,.276414,461914e-9,.916664,-55713e-8,.276409,.00184763,.916653,-.00125354,.276406,.00415715,.916651,-.00222851,.276405,.00739053,.916655,-.00348205,.276406,.0115478,.916653,-.00501414,.276405,.0166291,.916667,-.00682478,.276409,.0226346,.91668,-.00891398,.276412,.0295648,.91669,-.0112817,.276413,.0374199,.916727,-.013928,.276422,.0462016,.916759,-.0168528,.276429,.0559101,.916793,-.0200558,.276436,.0665466,.916849,-.0235373,.276448,.0781139,.916964,-.0272973,.276474,.0906156,.917047,-.0313344,.276491,.104051,.917152,-.0356465,.276511,.118424,.917286,-.0402271,.276533,.133736,.917469,-.0450408,.276564,.149978,.917686,-.0497872,.276563,.167057,.917953,-.0540937,.276493,.184846,.918228,-.0590709,.276437,.203614,.918572,-.0644277,.276398,.223212,.918918,-.0702326,.276362,.243584,.919356,-.076484,.276383,.264465,.919842,-.0830808,.276434,.285701,.920451,-.0892972,.276407,.307559,.921113,-.095016,.276128,.331501,.921881,-.100771,.275754,.356207,.923027,-.106029,.275254,.381477,.924364,-.111029,.274595,.40722,.925818,-.116345,.273841,.433385,.92746,-.121424,.272913,.459848,.929167,-.12657,.271837,.486493,.931426,-.131581,.270575,.513432,.934001,-.135038,.268512,.541502,.936296,-.138039,.266135,.569658,.939985,-.140687,.263271,.598375,.943516,-.143247,.260058,.626563,.94782,-.145135,.256138,.654711,.951023,-.145733,.251154,.683285,.955338,-.145554,.245562,.711831,.959629,-.145008,.239265,.739573,.963123,-.144003,.232064,.767027,.966742,-.141289,.224036,.794359,.969991,-.138247,.215305,.820361,.973403,-.134786,.206051,.846548,.975317,-.129966,.195914,.871541,.977647,-.12471,.185184,.895313,.980137,-.119086,.174161,.918398,.981031,-.112297,.162792,.940679,.982037,-.105372,.150952,.961991,.983164,-.097821,.138921,.981913,.983757,-.0897245,.126611,1.00109,.985036,-.0815974,.114228,1.01902,.986289,-.0727725,.101389,1.03604,.987329,-.0639323,.0886476,1.05149,.989193,-.0548109,.0756837,1.06619,.990716,-.045687,.0627581,1.07948,.992769,-.0364315,.0498337,1.09172,.99524,-.0271761,.0370305,1.1033,.997154,-.0179609,.0243959,1.11353,.998845,-.00878063,.0119567,1.12319,1.00002,259038e-9,-108146e-9,1.13177,.903945,-591681e-11,.295126,181226e-10,.903668,-148672e-9,.295037,455367e-9,.903677,-594683e-9,.29504,.00182145,.903673,-.00133805,.295039,.00409831,.903666,-.00237872,.295036,.00728584,.903668,-.00371676,.295037,.0113842,.903679,-.00535212,.29504,.0163936,.903684,-.00728479,.295041,.0223141,.903698,-.00951473,.295044,.0291462,.903718,-.0120419,.295049,.0368904,.903754,-.0148664,.295058,.0455477,.903801,-.017988,.29507,.0551194,.903851,-.0214064,.295082,.0656058,.903921,-.0251219,.295097,.0770109,.904002,-.0291337,.295116,.0893354,.904111,-.033441,.29514,.102583,.904246,-.0380415,.295169,.116755,.904408,-.0429258,.295202,.131853,.904637,-.0480468,.295245,.147869,.904821,-.0529208,.295214,.164658,.905163,-.0577748,.295185,.182274,.905469,-.0631763,.295143,.200828,.905851,-.068917,.295112,.2202,.906322,-.0750861,.295104,.240372,.906761,-.0815855,.295086,.261082,.90735,-.0882138,.295095,.282123,.908087,-.095082,.295139,.303563,.908826,-.101488,.29492,.327028,.909832,-.107577,.294577,.351464,.911393,-.113033,.294115,.376497,.912804,-.118629,.293446,.402115,.914081,-.124232,.292581,.428111,.91637,-.129399,.29166,.454442,.91814,-.134892,.290422,.481024,.921179,-.140069,.289194,.507924,.924544,-.144431,.287421,.535557,.927995,-.147498,.284867,.563984,.931556,-.150197,.281722,.5923,.935777,-.152711,.278207,.620832,.940869,-.154836,.274148,.649069,.945994,-.155912,.269057,.677746,.949634,-.155641,.262799,.706293,.955032,-.154809,.256097,.734278,.95917,-.153678,.248618,.761751,.962931,-.151253,.239794,.789032,.966045,-.147625,.230281,.815422,.96971,-.143964,.220382,.841787,.972747,-.139464,.209846,.867446,.975545,-.133459,.198189,.892004,.978381,-.127424,.186362,.915458,.979935,-.120506,.173964,.937948,.980948,-.11282,.161429,.959732,.982234,-.104941,.148557,.980118,.982767,-.0962905,.135508,.999463,.983544,-.0873625,.122338,1.01756,.984965,-.0783447,.108669,1.03492,.986233,-.0684798,.0949911,1.05087,.987796,-.0590867,.0811386,1.0656,.989885,-.0489145,.0673099,1.0794,.991821,-.0391,.0535665,1.09174,.99448,-.029087,.0397529,1.10341,.996769,-.019114,.0261463,1.11383,.998641,-.00947007,.0128731,1.1237,.999978,446316e-9,-169093e-9,1.13253,.888362,-627064e-11,.312578,178215e-10,.889988,-157791e-9,.313148,448451e-9,.889825,-631076e-9,.313092,.00179356,.88984,-.00141994,.313097,.00403554,.889828,-.0025243,.313092,.00717429,.889831,-.00394421,.313093,.0112099,.889831,-.00567962,.313093,.0161425,.889844,-.00773051,.313096,.0219724,.889858,-.0100968,.3131,.0286999,.889882,-.0127786,.313106,.0363256,.889918,-.0157757,.313116,.0448509,.889967,-.0190878,.313129,.0542758,.89003,-.022715,.313145,.0646032,.890108,-.0266566,.313165,.0758339,.890218,-.0309131,.313193,.0879729,.890351,-.0354819,.313226,.101019,.89051,-.0403613,.313263,.114979,.890672,-.0455385,.313294,.129848,.890882,-.0509444,.313333,.145616,.891189,-.0559657,.313324,.162122,.891457,-.0613123,.313281,.179524,.891856,-.0671488,.313281,.197855,.892312,-.0732732,.313268,.216991,.892819,-.0797865,.313263,.236924,.893369,-.0865269,.313247,.257433,.894045,-.0931592,.313205,.278215,.894884,-.100532,.313276,.299467,.895832,-.107716,.313205,.322276,.897043,-.114099,.312873,.34642,.898515,-.119941,.312331,.371187,.900191,-.126044,.311731,.396656,.90188,-.131808,.310859,.422488,.904359,-.137289,.309857,.448744,.906923,-.142991,.308714,.475239,.910634,-.148253,.307465,.501983,.914502,-.153332,.305774,.529254,.919046,-.156646,.303156,.557709,.923194,-.159612,.299928,.586267,.928858,-.162027,.296245,.614925,.934464,-.164203,.291832,.643187,.939824,-.165602,.286565,.671601,.944582,-.165383,.280073,.700213,.949257,-.164439,.272891,.728432,.954389,-.162953,.264771,.756082,.958595,-.161007,.255927,.78369,.962138,-.157243,.245769,.810769,.966979,-.152872,.235127,.836999,.969566,-.148209,.22347,.862684,.972372,-.142211,.211147,.887847,.975916,-.135458,.198606,.911843,.978026,-.128398,.185498,.934795,.979686,-.120313,.17171,.956787,.980748,-.11166,.158159,.978046,.981622,-.103035,.144399,.997693,.982356,-.0930328,.13001,1.01642,.983308,-.0834627,.115778,1.03366,.985037,-.0732249,.101327,1.05014,.986493,-.0628145,.086554,1.06507,.988484,-.0526556,.0720413,1.07907,.991051,-.0415744,.0571151,1.09189,.993523,-.0314275,.0426643,1.10369,.99628,-.0203603,.0279325,1.11423,.998344,-.0102446,.0138182,1.12421,.999997,42612e-8,-193628e-9,1.1333,.871555,-660007e-11,.329176,174749e-10,.875255,-166579e-9,.330571,441051e-9,.875644,-666394e-9,.330718,.00176441,.875159,-.00149903,.330536,.00396899,.87516,-.00266493,.330536,.007056,.875158,-.00416393,.330535,.0110251,.87516,-.00599598,.330535,.0158764,.875163,-.00816108,.330536,.0216101,.875174,-.0106591,.330538,.0282266,.875199,-.0134899,.330545,.0357266,.875257,-.0166538,.330563,.0441117,.875304,-.0201501,.330575,.0533821,.875373,-.0239785,.330595,.0635395,.875464,-.0281389,.330619,.0745872,.875565,-.0326301,.330645,.0865255,.875691,-.0374516,.330676,.0993599,.875897,-.0425993,.330733,.113093,.876091,-.0480576,.330776,.127722,.876353,-.0537216,.330826,.143227,.876649,-.0589807,.330809,.159462,.877034,-.0647865,.330819,.176642,.877443,-.0709789,.330817,.194702,.877956,-.0774782,.330832,.213577,.878499,-.0843175,.330822,.233246,.879144,-.0912714,.330804,.253512,.879982,-.0980824,.330766,.274137,.88097,-.105823,.330864,.295209,.882051,-.113671,.330896,.317226,.883397,-.120303,.330545,.341068,.884987,-.12667,.330068,.365613,.886789,-.133118,.329418,.390807,.889311,-.139024,.328683,.416494,.891995,-.144971,.327729,.442618,.895106,-.150747,.326521,.469131,.899527,-.156283,.325229,.495921,.90504,-.161707,.32378,.523162,.909875,-.165661,.32122,.55092,.91561,-.168755,.317942,.579928,.921225,-.171193,.313983,.608539,.927308,-.17319,.309636,.636854,.933077,-.174819,.304262,.66523,.938766,-.175002,.297563,.693609,.943667,-.173946,.289613,.722157,.949033,-.172221,.281227,.750021,.953765,-.169869,.271545,.777466,.95804,-.166578,.261034,.804853,.962302,-.161761,.249434,.831569,.966544,-.156636,.237484,.857779,.969372,-.150784,.224395,.883051,.972486,-.143672,.210786,.907864,.975853,-.135772,.196556,.931223,.977975,-.127942,.182307,.954061,.979122,-.118347,.167607,.97531,.980719,-.109112,.152739,.995666,.981223,-.0991789,.137932,1.01475,.98216,-.0883553,.122692,1.03253,.983379,-.0780825,.107493,1.04917,.985434,-.0665646,.0917791,1.06464,.987332,-.0557714,.0764949,1.07896,.990004,-.0442805,.060721,1.09199,.992975,-.0331676,.0452284,1.10393,.995811,-.0219547,.0297934,1.11476,.9982,-.0107613,.0146415,1.12484,1.00002,248678e-9,-14555e-8,1.13413,.859519,-693595e-11,.347264,171673e-10,.859843,-17503e-8,.347394,433219e-9,.859656,-700076e-9,.347319,.00173277,.859671,-.00157517,.347325,.00389875,.859669,-.00280028,.347324,.00693112,.85967,-.0043754,.347324,.01083,.859665,-.00630049,.347321,.0155954,.859685,-.0085755,.347328,.0212278,.859694,-.0112003,.347329,.0277273,.859718,-.0141747,.347336,.0350946,.85976,-.0174988,.347348,.0433314,.85982,-.0211722,.347366,.0524384,.859892,-.0251941,.347387,.0624168,.860006,-.0295649,.347422,.0732708,.860122,-.0342825,.347453,.0849999,.860282,-.0393462,.347499,.0976102,.860482,-.0447513,.347554,.111104,.860719,-.0504775,.347614,.125479,.860998,-.0563577,.347666,.140703,.861322,-.0619473,.347662,.156681,.861724,-.0681277,.347684,.173597,.862198,-.0746567,.347709,.191371,.862733,-.0815234,.347727,.209976,.863371,-.0886643,.347744,.229351,.86414,-.0957908,.347734,.24934,.865138,-.102912,.34772,.269797,.866182,-.110924,.3478,.290654,.867436,-.119223,.347911,.312074,.869087,-.126197,.347649,.335438,.870859,-.133145,.347222,.359732,.872997,-.139869,.346645,.38467,.875939,-.146089,.345935,.41019,.879012,-.152334,.345012,.436218,.883353,-.15821,.343924,.462641,.888362,-.164097,.342636,.489449,.895026,-.169528,.341351,.516629,.900753,-.174408,.339115,.544109,.906814,-.17751,.335809,.572857,.912855,-.180101,.331597,.601554,.919438,-.182116,.32698,.630198,.925962,-.183494,.321449,.658404,.931734,-.184159,.314595,.686625,.93762,-.18304,.306462,.71531,.943858,-.181323,.297514,.744272,.948662,-.178683,.287447,.771462,.953299,-.175379,.276166,.798593,.957346,-.170395,.263758,.8256,.962565,-.165042,.251019,.852575,.966075,-.158655,.237011,.878316,.969048,-.151707,.222518,.90329,.972423,-.143271,.207848,.927745,.975833,-.134824,.192463,.950859,.977629,-.125444,.1768,.972947,.978995,-.114949,.161033,.993263,.980533,-.104936,.145523,1.01337,.980745,-.0935577,.129799,1.03128,.981814,-.0822956,.113486,1.04825,.983943,-.0710082,.0972925,1.06405,.986141,-.0587931,.0808138,1.0785,.988878,-.0472755,.0644915,1.09204,.992132,-.0349128,.0478128,1.10413,.9953,-.0232407,.031621,1.11527,.998117,-.0112713,.0154935,1.12551,1.00003,339743e-9,-195763e-9,1.13504,.845441,-729126e-11,.364305,169208e-10,.843588,-183164e-9,.363506,425067e-9,.843412,-73253e-8,.36343,.00169999,.843401,-.00164818,.363426,.00382495,.843399,-.00293008,.363425,.00679993,.843401,-.00457822,.363425,.010625,.843394,-.00659249,.363421,.0153002,.843398,-.00897282,.363421,.0208258,.843415,-.0117191,.363426,.0272024,.843438,-.0148312,.363432,.0344305,.843483,-.018309,.363447,.0425116,.84356,-.0221521,.363472,.0514471,.843646,-.0263597,.363499,.061238,.843743,-.0309315,.363527,.0718873,.84388,-.0358658,.363569,.0833969,.844079,-.0411624,.363631,.0957742,.844279,-.0468128,.363688,.109015,.844549,-.0527923,.363761,.123124,.844858,-.0588204,.363817,.138044,.84522,-.0647573,.36383,.153755,.845669,-.0713181,.363879,.170394,.846155,-.0781697,.363908,.187861,.846789,-.0853913,.363969,.206176,.847502,-.0928086,.363999,.225244,.8484,-.10005,.363997,.244926,.849461,-.107615,.364008,.265188,.850562,-.115814,.364055,.28587,.851962,-.124334,.364179,.306926,.854326,-.131995,.364233,.329605,.856295,-.139338,.363856,.35359,.858857,-.146346,.363347,.37831,.862428,-.152994,.362807,.403722,.866203,-.159463,.361963,.429537,.871629,-.165623,.36112,.456,.877365,-.171649,.359917,.482773,.883744,-.177151,.35848,.509705,.890693,-.182381,.356523,.537215,.897278,-.186076,.3533,.565493,.903958,-.188602,.349095,.594293,.910908,-.190755,.344215,.623165,.918117,-.192063,.338606,.651573,.924644,-.192758,.331544,.679869,.931054,-.192238,.323163,.708668,.937303,-.190035,.313529,.737201,.943387,-.187162,.303152,.764977,.948494,-.183876,.29146,.792683,.952546,-.178901,.277917,.819228,.958077,-.173173,.264753,.846559,.962462,-.16645,.25002,.872962,.966569,-.159452,.234873,.898729,.969108,-.15074,.218752,.923126,.973072,-.141523,.202673,.947278,.975452,-.132075,.186326,.969938,.977784,-.121257,.169396,.991325,.97899,-.110182,.153044,1.01123,.979777,-.0989634,.136485,1.0299,.980865,-.0865894,.119343,1.04727,.982432,-.0746115,.102452,1.06341,.984935,-.0621822,.0852423,1.07834,.987776,-.0495694,.0678546,1.092,.99103,-.0372386,.0506917,1.1043,.99474,-.0244353,.0333316,1.11576,.997768,-.0121448,.0164348,1.12617,1.00003,31774e-8,-169504e-9,1.13598,.825551,-756799e-11,.378425,165099e-10,.82664,-190922e-9,.378923,416504e-9,.826323,-763495e-9,.378779,.0016656,.826359,-.00171789,.378795,.00374768,.82636,-.00305402,.378795,.00666259,.826368,-.00477185,.378798,.0104104,.826364,-.00687131,.378795,.0149912,.826368,-.00935232,.378795,.0204054,.826376,-.0122146,.378797,.0266532,.826399,-.0154581,.378803,.0337355,.82646,-.0190825,.378824,.0416537,.826525,-.0230873,.378846,.0504091,.826614,-.0274719,.378876,.0600032,.82674,-.0322355,.378917,.0704393,.826888,-.0373766,.378964,.0817195,.827078,-.0428936,.379024,.0938492,.827318,-.0487778,.379099,.106828,.82764,-.0549935,.379199,.120659,.827926,-.0611058,.379227,.13526,.828325,-.0675054,.379275,.150713,.828801,-.0743455,.379332,.167034,.8294,-.0815523,.379415,.184209,.830094,-.0890779,.379495,.202203,.8309,-.096736,.379555,.220945,.831943,-.104135,.379577,.240306,.833037,-.112106,.379604,.260317,.834278,-.120554,.379668,.2808,.836192,-.129128,.3799,.301654,.838671,-.137541,.380109,.323502,.840939,-.14523,.379809,.347176,.844575,-.15248,.379593,.371706,.848379,-.159607,.37909,.39688,.853616,-.166267,.378617,.422702,.858921,-.172698,.377746,.448919,.865324,-.178823,.376749,.475661,.872207,-.184542,.375363,.502599,.880018,-.189836,.373657,.529914,.88694,-.194294,.370673,.557683,.894779,-.197022,.36662,.586848,.902242,-.199108,.36138,.615831,.909914,-.200398,.355434,.644478,.917088,-.20094,.348173,.672905,.923888,-.200671,.339482,.701327,.930495,-.198773,.32956,.730101,.937247,-.195394,.318363,.758383,.943108,-.191956,.306323,.786539,.948296,-.187227,.292576,.813637,.953472,-.181165,.278234,.840793,.958485,-.174119,.263054,.867712,.962714,-.166564,.246756,.893635,.966185,-.158181,.229945,.919028,.970146,-.148275,.212633,.943413,.973491,-.138157,.195229,.966627,.975741,-.127574,.178048,.988817,.977238,-.11554,.160312,1.00924,.978411,-.10364,.142857,1.02845,.979811,-.0913122,.125317,1.04648,.98116,-.0782558,.107627,1.06284,.983543,-.0655957,.0895862,1.07798,.986789,-.0520411,.0713756,1.092,.990292,-.0389727,.053228,1.10484,.994187,-.025808,.0351945,1.11642,.997499,-.0126071,.0173198,1.12703,.999999,275604e-9,-148602e-9,1.13674,.81075,-78735e-10,.394456,161829e-10,.808692,-198293e-9,.393453,407564e-9,.80846,-792877e-9,.39334,.00162965,.808595,-.00178416,.393407,.00366711,.808597,-.00317182,.393408,.00651934,.808598,-.00495589,.393408,.0101866,.808591,-.00713627,.393403,.0146689,.808592,-.00971285,.393402,.0199667,.80861,-.0126855,.393407,.0260803,.808633,-.0160538,.393413,.0330107,.80868,-.0198175,.393429,.0407589,.808748,-.0239758,.393453,.0493264,.808854,-.0285286,.39349,.0587161,.808992,-.0334748,.39354,.0689304,.809141,-.0388116,.393588,.0799707,.809352,-.0445375,.39366,.0918432,.809608,-.0506427,.393742,.104549,.809915,-.0570708,.393834,.118085,.810253,-.0633526,.393885,.132377,.810687,-.0700966,.393953,.147537,.811233,-.0772274,.394047,.163543,.811865,-.0847629,.394148,.180394,.812648,-.0925663,.394265,.198051,.813583,-.100416,.394363,.216443,.814683,-.108119,.394402,.235502,.815948,-.11644,.394489,.255242,.817278,-.125036,.394542,.275441,.819605,-.133655,.39486,.296094,.822256,-.142682,.395248,.317309,.825349,-.150756,.395241,.340516,.829605,-.158392,.395285,.364819,.83391,-.165801,.394922,.389736,.839808,-.172677,.394691,.415409,.845708,-.179448,.394006,.441546,.853025,-.185746,.393279,.46832,.859666,-.191684,.391655,.495302,.86789,-.197146,.390068,.52262,.875845,-.201904,.38727,.550336,.882634,-.205023,.382688,.578825,.891076,-.207098,.377543,.608103,.900589,-.208474,.371752,.63723,.90791,-.209068,.364016,.665769,.915971,-.208655,.355593,.694428,.923455,-.20729,.345439,.723224,.931514,-.203821,.334099,.751925,.937885,-.19986,.321069,.780249,.943136,-.194993,.306571,.8077,.948818,-.189132,.291556,.83497,.954433,-.181617,.275745,.86188,.959078,-.173595,.258695,.888562,.962705,-.164855,.240825,.914008,.966753,-.155129,.22268,.939145,.970704,-.144241,.204542,.963393,.973367,-.133188,.185927,.985983,.975984,-.121146,.167743,1.00704,.976994,-.108366,.149218,1.02715,.978485,-.0956746,.13131,1.0455,.980074,-.0820733,.112513,1.06221,.98225,-.0684061,.0938323,1.07782,.98553,-.0549503,.0749508,1.09199,.989529,-.0407857,.055848,1.10508,.993536,-.0271978,.0368581,1.11684,.997247,-.0132716,.0181845,1.12789,1,431817e-9,-198809e-9,1.13792,.785886,-812608e-11,.405036,157669e-10,.790388,-205278e-9,.407355,398297e-9,.790145,-820824e-9,.407231,.00159263,.790135,-.00184681,.407226,.00358336,.790119,-.00328316,.407218,.00637039,.790126,-.00512988,.40722,.0099539,.79013,-.00738684,.407221,.0143339,.790135,-.0100538,.407221,.0195107,.790134,-.0131306,.407217,.0254848,.79016,-.0166169,.407224,.0322572,.790197,-.020512,.407236,.0398284,.790273,-.0248157,.407263,.0482014,.790381,-.029527,.407304,.0573777,.790521,-.0346446,.407355,.0673602,.790704,-.0401665,.40742,.0781522,.790925,-.0460896,.407499,.0897582,.791195,-.0524017,.407589,.10218,.791522,-.0590121,.407691,.11541,.791878,-.0654876,.407748,.12939,.792361,-.0725207,.407849,.144237,.792942,-.0799844,.407963,.159924,.79362,-.0877896,.408087,.176425,.794529,-.0958451,.408259,.193733,.795521,-.103827,.408362,.211756,.796778,-.111937,.408482,.230524,.798027,-.120521,.408547,.249967,.799813,-.129242,.408721,.269926,.802387,-.138048,.409148,.290338,.805279,-.147301,.409641,.311193,.809251,-.155895,.410154,.333611,.813733,-.163942,.410297,.357615,.819081,-.171666,.410373,.382339,.825427,-.178905,.410348,.407828,.83172,-.185812,.409486,.434034,.83877,-.192318,.408776,.460493,.845817,-.198249,.407176,.487346,.854664,-.204034,.405719,.514832,.863495,-.208908,.403282,.542401,.871883,-.212765,.399293,.570683,.88065,-.214911,.393803,.599947,.89004,-.216214,.387536,.62932,.898476,-.216745,.379846,.658319,.906738,-.216387,.370625,.687138,.914844,-.215053,.360139,.71601,.923877,-.212007,.348849,.745124,.931925,-.207481,.335639,.773366,.938054,-.202418,.320798,.801636,.943895,-.196507,.304772,.829055,.949468,-.189009,.288033,.856097,.955152,-.180539,.270532,.88301,.959403,-.171437,.251639,.909296,.963309,-.161661,.232563,.934868,.967399,-.150425,.213231,.959662,.972009,-.138659,.194247,.98302,.97433,-.126595,.174718,1.00517,.975823,-.113205,.155518,1.02566,.976371,-.0996096,.136709,1.04418,.978705,-.0860754,.117571,1.06146,.981477,-.0714438,.0980046,1.07777,.984263,-.0572304,.0782181,1.09214,.988423,-.0428875,.0584052,1.10553,.993,-.0282442,.038522,1.11758,.99704,-.0140183,.0190148,1.12864,.999913,369494e-9,-145203e-9,1.13901,.777662,-84153e-10,.423844,154403e-10,.770458,-211714e-9,.419915,38845e-8,.770716,-846888e-9,.420055,.00155386,.770982,-.00190567,.420202,.00349653,.770981,-.00338782,.420201,.00621606,.77098,-.00529338,.4202,.00971274,.770983,-.00762223,.4202,.0139867,.770985,-.0103741,.420198,.0190381,.770996,-.0135489,.4202,.0248677,.771029,-.0171461,.420212,.0314764,.771052,-.0211647,.420215,.0388648,.771131,-.0256048,.420245,.047036,.771235,-.0304647,.420284,.0559911,.771383,-.0357436,.420341,.0657346,.771591,-.0414392,.420423,.0762694,.771819,-.0475462,.420506,.0875984,.772123,-.0540506,.420617,.099727,.772464,-.060797,.42072,.112637,.772855,-.0675393,.420799,.126313,.773317,-.0748323,.420893,.140824,.773981,-.0825681,.421058,.15617,.774746,-.0906307,.421226,.172322,.77566,-.0988982,.421397,.189253,.776837,-.106994,.421569,.206912,.778097,-.115528,.421704,.225359,.779588,-.124317,.421849,.24447,.781574,-.133139,.422097,.264156,.784451,-.142179,.422615,.284318,.787682,-.15165,.423269,.304902,.792433,-.160771,.424396,.3265,.797359,-.169166,.424772,.35014,.803986,-.177149,.425475,.374768,.809504,-.184745,.424996,.399928,.815885,-.19173,.424247,.425796,.823513,-.198525,.423515,.452287,.832549,-.204709,.422787,.479321,.841653,-.210447,.421187,.506718,.850401,-.215501,.418519,.53432,.859854,-.219752,.414715,.56242,.869364,-.222305,.409462,.591558,.878837,-.223744,.402926,.621074,.888636,-.224065,.395043,.650538,.898132,-.223742,.38564,.679538,.907181,-.222308,.375378,.708674,.915621,-.219837,.363212,.737714,.9239,-.215233,.349313,.767014,.931644,-.209592,.334162,.795133,.938887,-.203644,.317943,.823228,.945282,-.196349,.300581,.850822,.950758,-.18742,.282195,.877594,.956146,-.177879,.262481,.904564,.960355,-.167643,.242487,.930741,.965256,-.156671,.222668,.955868,.968029,-.144123,.201907,.979869,.97251,-.131305,.18202,1.00291,.974925,-.118335,.161909,1.02392,.975402,-.103714,.142129,1.0433,.976987,-.089415,.122447,1.06089,.979677,-.0748858,.102248,1.07713,.983184,-.0596086,.0814851,1.09218,.987466,-.0447671,.0609484,1.10585,.992348,-.0295217,.0401835,1.11829,.996674,-.0143917,.0198163,1.12966,1.00003,321364e-9,-149983e-9,1.1402,.757901,-869074e-11,.436176,151011e-10,.751195,-217848e-9,.432317,378533e-9,.751178,-871373e-9,.432307,.0015141,.751195,-.00196061,.432317,.0034068,.751198,-.00348552,.432318,.00605659,.751195,-.00544599,.432315,.00946353,.751207,-.00784203,.43232,.013628,.751213,-.0106732,.43232,.0185499,.751221,-.0139393,.432319,.0242302,.751244,-.0176398,.432325,.0306694,.7513,-.0217743,.432348,.0378698,.751358,-.0263412,.432367,.0458321,.751458,-.0313396,.432404,.0545587,.751608,-.0367682,.432464,.0640543,.7518,-.0426246,.43254,.0743222,.752065,-.0489031,.432645,.0853668,.752376,-.0555828,.432762,.0971911,.752715,-.0623861,.432859,.109768,.753137,-.069415,.432958,.123126,.753676,-.0770039,.433099,.137308,.754345,-.084971,.433272,.15229,.755235,-.0932681,.433504,.168075,.756186,-.10171,.433693,.184625,.757363,-.110019,.433857,.201897,.75884,-.11887,.434102,.220014,.760467,-.127881,.434306,.238778,.762969,-.136766,.434751,.258172,.765823,-.14612,.43529,.278062,.769676,-.15566,.436236,.298437,.774909,-.165177,.437754,.319532,.77994,-.17402,.438343,.342505,.785757,-.182201,.438609,.366693,.792487,-.190104,.438762,.391668,.80038,-.197438,.438795,.417494,.808494,-.204365,.438226,.443933,.817695,-.210714,.437283,.470929,.828111,-.216651,.436087,.498569,.837901,-.221804,.433717,.526165,.847813,-.226318,.430133,.554155,.858314,-.229297,.425213,.582822,.868891,-.230999,.418576,.612847,.878941,-.231155,.410405,.642445,.888809,-.230935,.400544,.672024,.898089,-.229343,.389613,.701366,.908081,-.226886,.377197,.730763,.916819,-.222676,.363397,.759642,.924968,-.216835,.347437,.788775,.932906,-.210245,.32995,.817135,.940025,-.202992,.312262,.844912,.946101,-.19436,.293313,.872164,.952835,-.184125,.273638,.899443,.957347,-.173657,.252385,.926389,.961434,-.162204,.231038,.951947,.965522,-.14979,.209834,.976751,.969412,-.136307,.188821,1.00022,.973902,-.122527,.168013,1.02229,.974045,-.108213,.147634,1.04199,.975775,-.0927397,.12705,1.06019,.978383,-.0778212,.106309,1.07711,.98211,-.0621216,.0849279,1.09245,.986517,-.0463847,.0633519,1.10651,.991696,-.0309353,.0419698,1.11903,.996349,-.0150914,.0206272,1.13073,1.00003,442449e-9,-231396e-9,1.14146,.727498,-885074e-11,.441528,145832e-10,.730897,-223525e-9,.443589,368298e-9,.730796,-893996e-9,.443528,.00147303,.730805,-.00201149,.443533,.00331433,.730814,-.00357596,.443538,.00589222,.730815,-.00558734,.443538,.00920678,.730822,-.00804544,.44354,.0132582,.730836,-.0109501,.443545,.0180468,.730848,-.0143008,.443546,.0235732,.730871,-.0180969,.443552,.0298382,.730915,-.022338,.443567,.0368438,.730982,-.0270225,.443591,.044591,.731076,-.0321491,.443627,.0530831,.731245,-.0377166,.443699,.0623243,.73144,-.0437216,.443777,.0723181,.7317,-.0501576,.443881,.0830691,.732034,-.0569942,.444014,.0945809,.732388,-.0638756,.444113,.106825,.732853,-.071203,.444247,.119859,.733473,-.0790076,.444442,.13369,.734195,-.0871937,.444645,.148304,.735069,-.095696,.444877,.163702,.736169,-.10426,.445133,.179861,.73747,-.112853,.44537,.196778,.738991,-.12199,.445651,.214496,.740865,-.131153,.445958,.232913,.743637,-.140245,.446548,.251977,.746797,-.149722,.447246,.271551,.751517,-.159341,.448656,.291774,.756156,-.169106,.449866,.312455,.761519,-.178436,.450919,.334552,.768295,-.186904,.451776,.358491,.776613,-.195117,.452832,.383446,.783966,-.202695,.45249,.408945,.793542,-.20985,.452587,.435364,.803192,-.216403,.451852,.462336,.813892,-.22251,.450708,.48987,.824968,-.227676,.4486,.517697,.835859,-.232443,.445156,.545975,.846825,-.235775,.440351,.574483,.858085,-.237897,.433641,.604246,.868825,-.238074,.425354,.634101,.879638,-.237661,.415383,.664201,.889966,-.236186,.404136,.693918,.899479,-.233599,.390917,.723481,.908769,-.229737,.376352,.75258,.917966,-.223836,.360372,.781764,.926304,-.217067,.342551,.811139,.934626,-.209309,.324238,.839585,.941841,-.20071,.304484,.867044,.94789,-.190602,.283607,.894579,.954196,-.179253,.262205,.921743,.958383,-.167646,.239847,.948026,.963119,-.155073,.218078,.973296,.966941,-.141426,.195899,.998135,.970836,-.126849,.174121,1.02021,.973301,-.112296,.153052,1.04085,.97448,-.0964965,.131733,1.05946,.977045,-.080489,.10997,1.07693,.980751,-.064844,.0881657,1.09254,.985475,-.0481938,.0657987,1.10697,.991089,-.0319185,.0435215,1.12004,.996122,-.0158088,.0214779,1.13173,1.00001,372455e-9,-200295e-9,1.14291,.708622,-907597e-11,.45304,141962e-10,.711162,-228911e-9,.454662,358052e-9,.709812,-914446e-9,.453797,.00143034,.709865,-.00205819,.453834,.00321935,.709864,-.00365894,.453833,.00572331,.709855,-.00571692,.453826,.00894278,.709862,-.00823201,.453828,.012878,.709875,-.011204,.453832,.0175295,.709896,-.0146323,.453839,.0228978,.709925,-.0185163,.453847,.0289839,.709974,-.0228551,.453866,.0357894,.710045,-.0276473,.453892,.0433161,.710133,-.032891,.453924,.0515665,.710292,-.0385851,.453992,.0605458,.710485,-.0447254,.45407,.0702574,.710769,-.0513051,.454192,.0807077,.711106,-.0582733,.454329,.091896,.711516,-.0652866,.45446,.103814,.712071,-.0728426,.454653,.116508,.712676,-.0808307,.45484,.129968,.713476,-.0892216,.455096,.144206,.714377,-.0979047,.455346,.159212,.715579,-.106531,.455647,.174973,.716977,-.115492,.455961,.191504,.71862,-.124821,.456315,.208835,.72084,-.134079,.4568,.226869,.723786,-.143427,.457521,.245582,.727464,-.153061,.458475,.264957,.732771,-.162768,.460239,.284948,.736515,-.172627,.460899,.30522,.743519,-.182487,.463225,.326717,.750041,-.191295,.464027,.350113,.758589,-.199746,.465227,.374782,.767703,-.207584,.465877,.400226,.777484,-.214973,.465996,.426442,.788792,-.221796,.466019,.453688,.800194,-.228038,.465083,.481246,.811234,-.233346,.462506,.509086,.822859,-.238073,.459257,.537338,.835082,-.241764,.454863,.566108,.846332,-.244241,.448163,.595126,.858355,-.244736,.439709,.625574,.87034,-.244278,.429837,.65617,.881027,-.24255,.418002,.686029,.891007,-.239912,.404325,.716039,.900874,-.236133,.389222,.745518,.911072,-.230672,.373269,.775026,.920359,-.22356,.355083,.804521,.928604,-.215591,.335533,.834045,.937175,-.206503,.315278,.861612,.942825,-.196684,.293653,.889131,.949805,-.185116,.271503,.916853,.955535,-.172703,.248821,.943541,.959843,-.159978,.225591,.970132,.964393,-.146375,.202719,.994709,.968008,-.131269,.179928,1.0186,.971013,-.11569,.158007,1.03928,.973334,-.1003,.13624,1.05887,.975775,-.0833352,.1138,1.07652,.979579,-.0668981,.0913141,1.09297,.984323,-.0500902,.0683051,1.10734,.990351,-.0332377,.0451771,1.12084,.995823,-.0161491,.0221705,1.13296,1.0001,234083e-9,-108712e-9,1.14441,.683895,-924677e-11,.46015,137429e-10,.68833,-233383e-9,.463134,346865e-9,.688368,-933547e-9,.463159,.00138748,.688367,-.00210049,.463159,.00312187,.688369,-.00373415,.463159,.00555004,.688377,-.00583449,.463163,.00867216,.688386,-.00840128,.463166,.0124884,.688398,-.0114343,.463169,.0169993,.688418,-.0149329,.463175,.0222054,.688453,-.0188964,.463188,.028108,.688515,-.0233239,.463214,.0347085,.68857,-.0282136,.463231,.0420091,.688679,-.033564,.463276,.0500132,.688854,-.0393733,.463356,.0587255,.689038,-.0456354,.46343,.0681476,.689321,-.0523433,.463553,.0782897,.689662,-.059412,.463693,.0891501,.690188,-.0665736,.4639,.100735,.690755,-.0743106,.464107,.113074,.691405,-.0824722,.464329,.126161,.692198,-.0910484,.464585,.140007,.693196,-.0998778,.464893,.154612,.69454,-.108651,.465285,.169984,.695921,-.117855,.465596,.186106,.697749,-.12734,.466056,.203034,.700375,-.136714,.466771,.220703,.703395,-.146386,.467579,.239062,.707904,-.156096,.469067,.258188,.711673,-.165904,.469851,.277759,.717489,-.175812,.471815,.297935,.724051,-.185931,.47389,.318916,.731965,-.195238,.47587,.341591,.741151,-.204021,.477523,.366062,.751416,-.212113,.478881,.391396,.761848,-.21979,.479226,.417599,.771886,-.2267,.478495,.444401,.783998,-.232991,.477622,.472084,.796523,-.238645,.475833,.500193,.808851,-.243396,.472568,.52865,.821191,-.247226,.467857,.557362,.834261,-.250102,.461871,.586768,.846762,-.251056,.453543,.617085,.859867,-.250604,.443494,.647659,.871948,-.248783,.431711,.678119,.882967,-.245855,.417911,.708399,.892826,-.242168,.401993,.738256,.90332,-.237062,.385371,.767999,.913633,-.22997,.366837,.798191,.922774,-.221687,.346372,.827756,.931371,-.212345,.325682,.856425,.938929,-.20206,.303665,.884299,.944821,-.190981,.280786,.912023,.951792,-.178065,.2573,.939669,.957712,-.164634,.233448,.96655,.961912,-.150863,.209504,.992366,.966382,-.13577,.18597,1.01633,.969588,-.119593,.162905,1.03843,.971777,-.103203,.14053,1.05841,.97433,-.0865888,.117909,1.07632,.978686,-.0690829,.0944101,1.09326,.983281,-.0516568,.0705671,1.10796,.989562,-.034558,.0468592,1.12182,.995465,-.0167808,.0229846,1.1342,.999991,373016e-9,-235606e-9,1.1459,.662251,-939016e-11,.468575,132714e-10,.666634,-237624e-9,.471675,335842e-9,.666411,-950385e-9,.471516,.00134321,.666399,-.00213833,.471509,.00302221,.666386,-.0038014,.471499,.00537283,.666405,-.00593958,.471511,.00839533,.666406,-.00855253,.471508,.0120898,.666428,-.0116401,.471519,.0164569,.666444,-.0152015,.471522,.0214971,.66649,-.0192362,.471543,.027212,.666537,-.0237428,.471558,.033603,.666617,-.0287198,.471591,.0406728,.666718,-.0341647,.471631,.0484238,.666889,-.0400759,.47171,.0568621,.667104,-.0464479,.471805,.0659915,.667374,-.0532677,.471923,.0758178,.667772,-.0603805,.472098,.0863425,.668371,-.0677392,.472363,.0975917,.668971,-.0756028,.472596,.109567,.669696,-.0839293,.472869,.122272,.670481,-.0926683,.473126,.135718,.6715,-.1016,.473442,.149914,.672911,-.110566,.47389,.164882,.674512,-.119984,.474354,.180602,.67651,-.129574,.474922,.19711,.679292,-.139106,.475764,.214371,.682798,-.148993,.476886,.232405,.686955,-.158737,.478179,.251153,.691406,-.168754,.479432,.270436,.697438,-.178703,.481481,.290374,.704761,-.188955,.484143,.311044,.713599,-.198814,.487007,.333003,.723194,-.207869,.488962,.357144,.732601,-.216189,.489815,.382169,.744193,-.22398,.490888,.408227,.754907,-.231156,.490355,.434928,.767403,-.23747,.489548,.462599,.78107,-.243503,.488274,.490908,.793893,-.248114,.484843,.519421,.807296,-.25222,.4803,.548561,.820529,-.255265,.474097,.577772,.833716,-.256741,.466041,.607782,.848403,-.25637,.456547,.638807,.860755,-.254804,.443946,.670058,.874012,-.251834,.430852,.700749,.885619,-.247867,.414903,.731446,.896069,-.242634,.397276,.761191,.906266,-.236093,.378535,.791053,.916759,-.227543,.358038,.821298,.92523,-.21783,.335705,.850747,.93436,-.207534,.313797,.879258,.941631,-.195983,.289671,.907734,.947564,-.183567,.265319,.935206,.953681,-.169345,.240815,.962739,.960008,-.154909,.216119,.989227,.964145,-.140161,.192096,1.01465,.968171,-.123411,.167855,1.03737,.969859,-.106525,.144817,1.05767,.972666,-.0891023,.12149,1.0761,.977055,-.0718094,.0975306,1.09336,.982527,-.0534213,.0730217,1.10878,.989001,-.0355579,.0483366,1.12285,.99512,-.0176383,.023938,1.13548,1.00007,368831e-9,-211581e-9,1.14744,.651047,-960845e-11,.484101,12922e-9,.644145,-241347e-9,.478968,324578e-9,.64396,-965142e-9,.478831,.00129798,.64396,-.00217154,.47883,.00292046,.643968,-.00386049,.478835,.00519202,.643974,-.00603186,.478838,.0081128,.643977,-.0086854,.478836,.011683,.643982,-.0118207,.478834,.0159031,.644024,-.0154374,.478856,.0207743,.644059,-.0195343,.478868,.0262975,.644122,-.0241103,.478896,.0324747,.644207,-.0291638,.478933,.039309,.64432,-.0346919,.478981,.0468029,.644481,-.0406919,.479053,.0549614,.644722,-.047159,.479169,.0637909,.645013,-.0540748,.479302,.0732974,.645503,-.0612001,.479541,.0834898,.646117,-.0687303,.479829,.0943873,.646707,-.0767846,.480061,.105991,.647431,-.0852465,.480343,.11831,.64831,-.0940719,.48066,.131348,.649486,-.103056,.481083,.14514,.650864,-.112261,.481528,.159676,.652604,-.121852,.482102,.174979,.654825,-.131505,.482813,.191079,.657876,-.141189,.483876,.207927,.661339,-.151239,.48499,.225586,.665463,-.161091,.486279,.243947,.670542,-.171235,.487968,.262957,.677361,-.181347,.49053,.282781,.685672,-.191679,.493862,.303311,.694551,-.201781,.49699,.324607,.703753,-.211164,.498884,.347916,.713703,-.219675,.500086,.372628,.725911,-.227836,.501554,.398694,.73862,-.23533,.502193,.425529,.752118,-.241786,.501811,.453209,.76579,-.247865,.500185,.481381,.779568,-.252696,.497159,.51011,.793991,-.256802,.492765,.539322,.808182,-.259942,.486827,.569078,.821698,-.261703,.478386,.598818,.836009,-.262006,.468772,.629762,.849824,-.260333,.456352,.661366,.863888,-.257398,.442533,.69295,.876585,-.253264,.426573,.723608,.888665,-.248026,.408964,.754378,.899537,-.241487,.389677,.784761,.9094,-.233463,.368516,.814688,.920166,-.223397,.346624,.845009,.928899,-.21255,.322717,.874431,.937156,-.200869,.298698,.902922,.943861,-.188387,.273491,.931356,.949557,-.174341,.247866,.958854,.955862,-.158994,.222496,.986098,.961721,-.143664,.197522,1.01229,.965976,-.127412,.17302,1.03571,.968652,-.109798,.148954,1.05699,.971084,-.0916787,.125044,1.07587,.975584,-.0739634,.100577,1.09372,.98122,-.055322,.0753666,1.10948,.988253,-.0366825,.0498899,1.12394,.99482,-.0180389,.024611,1.13694,1.00001,229839e-9,-188283e-9,1.14919,.613867,-964198e-11,.479449,123452e-10,.621485,-244534e-9,.485399,313091e-9,.621429,-978202e-9,.485353,.00125245,.62112,-.00220004,.485114,.00281687,.621119,-.0039111,.485112,.00500783,.621122,-.00611091,.485112,.00782498,.621133,-.00879922,.485117,.0112687,.621152,-.0119756,.485125,.0153394,.621183,-.0156396,.485139,.0200382,.621227,-.0197898,.485158,.0253663,.621298,-.0244253,.485192,.0313261,.621388,-.0295441,.485233,.0379204,.621507,-.0351432,.485286,.0451523,.621693,-.0412198,.485378,.0530277,.621933,-.0477673,.485495,.0615522,.622232,-.0547574,.485635,.0707316,.622809,-.0619417,.485943,.0805883,.623407,-.069625,.486232,.0911267,.62406,-.077796,.486516,.102354,.624835,-.0863731,.486838,.114279,.625758,-.095251,.487188,.126902,.627043,-.104299,.487695,.140285,.628438,-.113724,.488163,.154397,.630325,-.123417,.488858,.169267,.632801,-.133137,.489754,.184941,.635784,-.143052,.490815,.20136,.639406,-.153132,.492048,.218643,.643872,-.163143,.49363,.236615,.6499,-.17333,.496009,.255449,.657201,-.183622,.498994,.275006,.666221,-.194019,.502888,.295354,.674419,-.204192,.505459,.316244,.683729,-.21406,.507771,.33849,.695584,-.222854,.510245,.363166,.708583,-.231315,.512293,.389071,.721233,-.238911,.512747,.415737,.735134,-.245657,.512482,.443331,.750179,-.251879,.511526,.471891,.765073,-.256911,.508935,.500892,.779794,-.261144,.504341,.530294,.794801,-.264316,.498515,.560144,.810339,-.266276,.491015,.590213,.824818,-.266981,.481126,.620865,.839375,-.265778,.468685,.652687,.853043,-.262748,.453925,.684759,.867335,-.258474,.437912,.716209,.88037,-.253187,.419648,.747508,.891711,-.246476,.39982,.77797,.902896,-.238735,.37879,.808586,.913601,-.22885,.355891,.838843,.923019,-.217656,.331773,.869014,.933432,-.205539,.307356,.898512,.939691,-.192595,.281321,.9269,.946938,-.178945,.255441,.955297,.952372,-.163587,.229013,.983231,.95909,-.147214,.203179,1.00971,.963675,-.13064,.17792,1.03438,.968247,-.113121,.152898,1.05625,.97001,-.0945824,.128712,1.07598,.974458,-.0755648,.103349,1.094,.980168,-.0571998,.0776731,1.1104,.987295,-.0377994,.0514445,1.12491,.994432,-.0186417,.025429,1.13851,.999975,542714e-9,-282356e-9,1.15108,.592656,-980249e-11,.486018,119532e-10,.598467,-247275e-9,.490781,301531e-9,.597934,-988317e-9,.490343,.00120517,.597903,-.00222366,.490319,.0027116,.597913,-.00395315,.490327,.00482077,.597919,-.00617653,.490329,.00753264,.597936,-.00889375,.490339,.0108478,.597956,-.0121043,.490347,.0147668,.597992,-.0158073,.490365,.0192905,.598032,-.0200017,.490382,.0244204,.598109,-.0246865,.49042,.0301593,.598215,-.0298594,.490474,.03651,.59833,-.0355167,.490524,.0434757,.598525,-.0416559,.490624,.0510629,.598778,-.0482692,.490753,.0592781,.599135,-.0553114,.49094,.0681304,.599802,-.062542,.491328,.0776467,.600361,-.0703638,.491598,.0878184,.60101,-.0786256,.491882,.0986573,.601811,-.0872962,.492232,.11018,.602861,-.0962284,.492684,.1224,.604167,-.10538,.493213,.135354,.605693,-.114896,.493799,.149034,.607682,-.124654,.494576,.163469,.610672,-.13456,.4959,.178747,.613313,-.144581,.496713,.194723,.617603,-.154703,.498499,.211617,.622174,-.16489,.500188,.229183,.628855,-.175164,.503072,.247786,.636963,-.185565,.506798,.267116,.644866,-.195911,.509719,.28702,.653741,-.206104,.512776,.307763,.664942,-.216447,.516812,.329631,.67633,-.22552,.519181,.353515,.690012,-.234316,.521681,.379226,.704243,-.242032,.523129,.405901,.719396,-.249172,.523768,.433585,.734471,-.255543,.522541,.462085,.750539,-.260697,.520217,.491233,.766365,-.26501,.516293,.521094,.781677,-.268409,.509708,.551014,.797132,-.270399,.501944,.581463,.812655,-.271247,.492025,.612402,.828592,-.270708,.480424,.643798,.844044,-.268085,.465955,.67682,.857305,-.263459,.448425,.708496,.87114,-.258151,.430243,.74046,.884936,-.251171,.410578,.771583,.895772,-.243305,.38862,.802234,.906961,-.234037,.365214,.833179,.917775,-.222714,.34116,.86353,.927883,-.210175,.31572,.893557,.936617,-.196925,.289159,.922976,.943384,-.182788,.261996,.951606,.949713,-.167965,.235324,.979958,.955818,-.151109,.208408,1.00765,.961344,-.133834,.182591,1.03329,.965469,-.115987,.156958,1.0557,.968693,-.09746,.132239,1.07583,.973165,-.0778514,.106195,1.09451,.979387,-.0585067,.0797669,1.11137,.98671,-.0390409,.0530263,1.12643,.994093,-.019408,.0263163,1.14016,1.00002,540029e-9,-194487e-9,1.15299,.574483,-989066e-11,.494533,114896e-10,.574478,-249127e-9,.494528,289403e-9,.574607,-996811e-9,.494637,.00115797,.574396,-.00224241,.494458,.00260498,.574377,-.00398632,.49444,.00463102,.574386,-.00622836,.494445,.00723623,.574401,-.0089683,.494453,.010421,.574419,-.0122056,.49446,.0141859,.574459,-.0159396,.494481,.0185322,.574525,-.0201692,.49452,.0234617,.574587,-.0248924,.494547,.0289762,.574697,-.0301074,.494604,.0350797,.574853,-.0358114,.494688,.0417767,.575027,-.041999,.494772,.0490718,.575294,-.0486618,.494915,.0569728,.575733,-.0557148,.495173,.0654955,.576356,-.0630489,.495537,.0746612,.576944,-.0709285,.495836,.0844615,.57765,-.0792723,.496177,.0949142,.578491,-.0880167,.496563,.10603,.579639,-.0969462,.497096,.117841,.580989,-.10622,.497684,.130367,.582587,-.115861,.498337,.143609,.584951,-.125605,.499414,.157625,.587602,-.135608,.500518,.172413,.59076,-.145742,.501767,.187999,.594992,-.155934,.503542,.20445,.600656,-.166303,.506135,.221764,.607816,-.176681,.509542,.24002,.61522,-.187071,.51263,.258992,.623702,-.197465,.516021,.278773,.634192,-.207816,.520422,.299377,.644936,-.218183,.524073,.320802,.657888,-.2278,.528049,.34384,.670666,-.236747,.52986,.36916,.685626,-.24484,.531892,.395867,.701304,-.252071,.532727,.423488,.717727,-.258714,.532146,.452201,.733914,-.264211,.529883,.481579,.750529,-.26859,.5259,.511558,.76747,-.272046,.51999,.542042,.785189,-.274225,.513083,.572799,.800954,-.275189,.502936,.603816,.816962,-.274946,.490921,.635461,.83336,-.272695,.47684,.6676,.848143,-.268223,.459405,.70051,.861818,-.262768,.440319,.732902,.876828,-.255872,.420123,.765084,.889312,-.247703,.398379,.796391,.900412,-.238381,.374496,.827333,.912251,-.227783,.349874,.858385,.921792,-.214832,.323181,.888652,.931273,-.200949,.296624,.917763,.940295,-.186537,.269211,.947878,.946812,-.171538,.241447,.977016,.953588,-.155254,.213829,1.00501,.958841,-.137156,.186807,1.03179,.963746,-.118699,.160706,1.05502,.966468,-.0998358,.135504,1.07568,.971178,-.0805186,.109131,1.09479,.97831,-.0599348,.0818293,1.1123,.985886,-.0399661,.0545872,1.12771,.994021,-.0198682,.0269405,1.14186,1.00009,271022e-9,-12989e-8,1.15514,.538716,-990918e-11,.486732,109675e-10,.550656,-250642e-9,.497518,277412e-9,.55057,-.00100265,.497441,.00110974,.550903,-.00225672,.497733,.00249779,.550568,-.00401046,.497438,.00443906,.550574,-.00626613,.49744,.00693637,.550591,-.0090226,.497449,.00998921,.550623,-.0122795,.497469,.0135984,.550667,-.0160361,.497495,.0177654,.550724,-.0202908,.497526,.0224915,.550792,-.0250421,.497557,.0277795,.550918,-.0302878,.49763,.0336334,.551058,-.0360241,.497701,.0400573,.551276,-.0422473,.497824,.0470585,.551551,-.0489441,.497977,.0546433,.552074,-.0559596,.498312,.0628367,.552681,-.0633978,.498679,.071646,.553324,-.0713176,.499031,.0810746,.554011,-.0797268,.499365,.091129,.55488,-.0885238,.499779,.101837,.556171,-.0974417,.500444,.113239,.557498,-.106841,.501025,.125316,.559299,-.116533,.501864,.138128,.561647,-.126298,.502967,.151695,.564347,-.136388,.504129,.16604,.567863,-.146576,.505713,.181207,.572569,-.156832,.507953,.197259,.578919,-.167323,.511186,.214258,.585387,-.177712,.514042,.232038,.593134,-.188184,.517484,.250733,.603295,-.198717,.522345,.270454,.613854,-.209177,.526751,.290807,.626092,-.219644,.531595,.312202,.637868,-.229494,.534721,.334435,.652458,-.238718,.538304,.359184,.666985,-.247061,.539875,.385637,.683301,-.254652,.541042,.41328,.69998,-.261376,.540735,.441903,.717824,-.267085,.539139,.471609,.734617,-.271465,.534958,.501446,.753663,-.27528,.53032,.532571,.770512,-.277617,.522134,.563641,.787356,-.278525,.51206,.595067,.806252,-.278512,.50119,.627226,.822061,-.277023,.486791,.659402,.838959,-.273175,.470467,.692874,.85379,-.267238,.450688,.725702,.868268,-.260327,.429741,.75832,.881994,-.251946,.407223,.790189,.893885,-.242432,.383214,.821625,.905118,-.231904,.357297,.853011,.916045,-.219545,.330733,.883773,.927614,-.205378,.303916,.914435,.936005,-.190388,.275941,.944502,.944533,-.1749,.247493,.974439,.950758,-.158588,.218996,1.00286,.957078,-.141027,.191559,1.0304,.962448,-.121507,.164457,1.05466,.964993,-.102068,.138636,1.0761,.970017,-.0822598,.111861,1.09541,.97661,-.062033,.0843438,1.11317,.985073,-.0409832,.0558496,1.12911,.993515,-.020146,.0275331,1.1438,1.00006,27329e-8,-107883e-9,1.15736,.525324,-999341e-11,.498153,105385e-10,.526513,-251605e-9,.499277,265329e-9,.526517,-.00100641,.499282,.0010613,.526588,-.00226466,.499337,.00238823,.526539,-.0040255,.499302,.00424535,.526547,-.00628954,.499306,.00663364,.526561,-.00905628,.499313,.00955337,.526593,-.0123253,.499334,.0130054,.526642,-.0160957,.499365,.0169911,.5267,-.0203661,.499396,.0215122,.526792,-.0251347,.499451,.0265718,.526904,-.0303985,.499511,.0321732,.527079,-.0361554,.499617,.0383231,.527285,-.0423982,.499731,.045026,.527602,-.0491121,.499924,.0522936,.528166,-.0561127,.500306,.0601528,.52879,-.0635988,.5007,.0686059,.529421,-.071581,.501048,.0776518,.530144,-.0799854,.501421,.0873148,.531062,-.0888032,.501884,.0976084,.532374,-.0977643,.50259,.108588,.533828,-.107197,.50329,.120234,.53581,-.116887,.504312,.132602,.538063,-.126755,.505365,.145721,.5409,-.136819,.506668,.159617,.544882,-.147117,.508731,.174369,.550238,-.157446,.511601,.190028,.556038,-.167988,.514431,.206587,.563031,-.178364,.517808,.224046,.571543,-.189007,.521937,.242503,.582255,-.199546,.527415,.261977,.59272,-.210084,.531682,.282162,.605648,-.220448,.537123,.303426,.61785,-.230593,.540664,.325323,.632223,-.240238,.544467,.348993,.648819,-.24887,.547594,.375462,.665825,-.256657,.54912,.403024,.683389,-.263711,.549294,.431773,.701495,-.269666,.547649,.461494,.719197,-.274169,.543786,.491623,.737906,-.278124,.538644,.522994,.756652,-.280632,.531057,.554775,.775279,-.281741,.521972,.586441,.792688,-.281652,.509613,.618596,.811894,-.280345,.496497,.651462,.827938,-.277128,.47968,.684023,.844837,-.271646,.460688,.718024,.859239,-.264397,.438872,.751207,.874088,-.256144,.41577,.784232,.887693,-.246311,.391369,.816191,.899402,-.235497,.365872,.847828,.910973,-.223631,.338618,.87934,.92204,-.209874,.310803,.910325,.930987,-.194265,.281802,.940695,.94,-.178125,.252836,.970958,.948018,-.161479,.224239,1.00078,.955141,-.144038,.195857,1.0288,.960513,-.124915,.168487,1.05371,.963964,-.104284,.141495,1.07596,.968713,-.0838732,.114437,1.09628,.975524,-.0635579,.0863105,1.11448,.98431,-.042291,.0574774,1.13069,.992916,-.0209131,.0284343,1.14568,.999926,743097e-9,-379265e-9,1.15955,.501042,-998428e-11,.498726,100306e-10,.502992,-252112e-9,.500665,253283e-9,.502417,-.00100791,.500092,.00101259,.502965,-.00226919,.500621,.00227978,.502318,-.00403109,.499994,.00405011,.502333,-.00629832,.500005,.00632868,.502362,-.00906907,.500027,.00911446,.502369,-.0123423,.500023,.0124078,.50243,-.0161178,.500066,.016211,.502493,-.0203937,.500103,.0205256,.502592,-.0251684,.500166,.0253548,.502707,-.0304389,.50023,.0307029,.502881,-.0362015,.500335,.0365753,.503124,-.0424507,.500488,.0429798,.503443,-.0491582,.500686,.0499268,.504083,-.0561476,.501155,.0574541,.504668,-.0636846,.501524,.0655408,.505319,-.0716834,.501904,.0742072,.50609,-.0800925,.502321,.0834699,.507122,-.0888425,.502896,.0933603,.508414,-.097855,.503603,.10391,.509955,-.107304,.504416,.115113,.512061,-.116921,.505565,.127054,.514419,-.12689,.506732,.139709,.517529,-.136934,.508338,.153173,.522085,-.147327,.510987,.167528,.526986,-.157612,.513527,.182708,.533122,-.168213,.516717,.198881,.540807,-.178688,.520832,.215986,.550687,-.189511,.52632,.234335,.560567,-.199998,.531009,.253375,.571698,-.210652,.535839,.273499,.584364,-.220917,.541091,.294355,.599066,-.23137,.546875,.316525,.614148,-.241206,.551306,.339671,.631157,-.250379,.555187,.36531,.647919,-.258397,.556595,.392767,.666112,-.265528,.556949,.421397,.686158,-.271827,.556617,.451433,.704838,-.27674,.552975,.482131,.723957,-.280733,.547814,.513458,.74262,-.283359,.53997,.545446,.762009,-.284541,.530422,.57775,.781314,-.284507,.518546,.610434,.799116,-.283309,.504178,.643178,.817604,-.280378,.48843,.676248,.83459,-.275619,.469457,.709698,.850974,-.26856,.447698,.744245,.866747,-.260094,.424791,.777695,.881412,-.249929,.399913,.810392,.8936,-.239137,.37308,.842872,.905943,-.226818,.345705,.874677,.916408,-.213699,.31706,.906257,.927215,-.198428,.288444,.936881,.935625,-.181643,.258329,.96795,.944076,-.164386,.228488,.998216,.951229,-.146339,.199763,1.02689,.958793,-.127709,.172153,1.0535,.963219,-.107244,.144989,1.07646,.967562,-.0857764,.11685,1.09675,.974866,-.0645377,.0880571,1.11576,.983353,-.0431732,.0587352,1.13227,.992503,-.0218356,.0294181,1.1478,1.00003,605203e-9,-231013e-9,1.16207,.482935,-101177e-10,.504695,968142e-11,.477554,-251521e-9,.499071,240676e-9,.477904,-.00100683,.499436,96342e-8,.478368,-.00226636,.499899,.0021687,.477977,-.00402719,.499513,.00385384,.477993,-.00629226,.499525,.0060221,.478011,-.00906011,.499536,.00867289,.478051,-.0123305,.499566,.0118074,.478089,-.016102,.499587,.0154269,.478171,-.0203736,.499645,.0195341,.478254,-.025143,.499692,.0241318,.47839,-.0304071,.499779,.0292247,.478588,-.0361631,.499911,.0348196,.478812,-.0424023,.500046,.0409231,.479208,-.0490724,.500326,.047552,.479841,-.0560722,.500805,.0547377,.480392,-.0636125,.501152,.0624607,.481068,-.0716134,.501561,.0707473,.481898,-.0800062,.502054,.0796118,.483022,-.0886568,.502728,.0890974,.484332,-.0977553,.503479,.0992099,.486126,-.107173,.504546,.10999,.488066,-.11677,.50557,.121476,.490521,-.126725,.506849,.133672,.494232,-.136793,.50911,.146731,.498302,-.147116,.511345,.160577,.503565,-.157446,.514344,.175335,.510902,-.168121,.518824,.191207,.519263,-.178799,.523666,.208058,.528204,-.189407,.528296,.225875,.538854,-.200145,.533724,.244782,.551278,-.210701,.539833,.264753,.565222,-.221303,.546131,.285745,.579403,-.231688,.551496,.307592,.595469,-.241718,.556809,.330582,.610929,-.250992,.559641,.354995,.629433,-.259602,.562379,.382471,.648504,-.267038,.563676,.411126,.66756,-.273388,.562092,.440924,.689143,-.278788,.560807,.472118,.709056,-.282783,.555701,.503774,.729855,-.285836,.548698,.536364,.748954,-.287078,.538544,.56895,.768373,-.287133,.526711,.601991,.78827,-.285839,.512511,.635403,.807465,-.283238,.496323,.668797,.825194,-.27906,.477638,.702584,.842203,-.272286,.456253,.736393,.857749,-.263854,.432412,.77096,.874799,-.253943,.407806,.80489,.887497,-.24237,.38033,.83771,.89966,-.230278,.352446,.870376,.911753,-.21646,.323268,.902256,.923011,-.202071,.294314,.933306,.932375,-.185519,.264104,.965177,.940537,-.167604,.234035,.996303,.948904,-.149068,.20412,1.0261,.955263,-.129539,.175431,1.05304,.960303,-.109932,.148116,1.07617,.965512,-.0880572,.119693,1.09742,.973466,-.0660548,.0901619,1.11721,.98284,-.0439228,.0599875,1.13436,.992216,-.0219588,.0298975,1.15006,.999946,119402e-9,-208547e-10,1.16471,.447827,-100414e-10,.491543,914833e-11,.454778,-251257e-9,.499172,22891e-8,.453519,-.00100342,.497787,914184e-9,.45357,-.00225776,.497847,.00205701,.453578,-.00401371,.497855,.00365705,.45357,-.00627107,.497841,.00571453,.453598,-.00902968,.497864,.00823019,.453627,-.0122888,.497882,.0112049,.453684,-.0160475,.497923,.0146405,.453764,-.0203044,.49798,.0185394,.453866,-.0250576,.498049,.0229054,.453996,-.0303028,.49813,.0277424,.454196,-.0360379,.498267,.0330587,.454457,-.0422521,.498445,.0388613,.454926,-.0488393,.498812,.0451767,.455525,-.0558653,.499272,.0520153,.456074,-.0633772,.499625,.0593754,.456752,-.0713606,.500049,.0672751,.457648,-.07971,.500615,.0757447,.458849,-.0883032,.501399,.0848231,.46029,-.0974095,.502293,.0945135,.462,-.106729,.503301,.104848,.464121,-.116354,.504533,.115884,.466889,-.126214,.506172,.127652,.470744,-.136324,.508667,.14024,.47488,-.146595,.510995,.153673,.480845,-.157027,.514832,.168053,.488262,-.167658,.519506,.183508,.496547,-.178343,.524347,.199948,.506254,-.188916,.52983,.217503,.517961,-.199975,.536357,.236272,.531484,-.210624,.543641,.256096,.545496,-.221227,.550048,.277085,.559497,-.231568,.555076,.298615,.575752,-.241698,.560541,.321547,.591999,-.251172,.564156,.345602,.610654,-.260178,.567607,.371851,.630484,-.268094,.56923,.40076,.651807,-.274661,.569779,.430801,.67239,-.280331,.566791,.461939,.693024,-.284501,.562007,.493854,.715473,-.287852,.555791,.526992,.736323,-.28929,.546345,.560102,.755771,-.289405,.534,.593543,.775424,-.2881,.519114,.627256,.795447,-.285562,.502543,.661464,.815319,-.281416,.484773,.695206,.831769,-.275523,.463445,.729044,.849464,-.267516,.440269,.764069,.866775,-.257584,.415049,.799089,.881252,-.245817,.388049,.831948,.894209,-.233127,.35889,.865526,.906922,-.219579,.329915,.89818,.919686,-.204491,.300441,.930013,.929044,-.188962,.269445,.962061,.938393,-.171079,.238402,.994214,.94661,-.15199,.208204,1.02533,.953095,-.131953,.178653,1.0529,.958644,-.111233,.150684,1.0771,.963925,-.0903098,.122359,1.09855,.971995,-.0680505,.0923342,1.11874,.981658,-.0448512,.0614195,1.13635,.991649,-.0221931,.0303582,1.15238,.999985,393403e-9,-111086e-9,1.16772,.396806,-971563e-11,.457671,842355e-11,.429186,-249421e-9,.495017,21625e-8,.429324,-998052e-9,.495173,865322e-9,.429175,-.00224487,.494999,.00194637,.429129,-.00399041,.494952,.00346004,.429153,-.00623476,.494974,.00540684,.429168,-.0089773,.494983,.00778714,.429207,-.0122175,.495012,.0106022,.429257,-.0159542,.495047,.0138535,.429338,-.0201864,.495106,.0175443,.429431,-.0249104,.495165,.0216774,.429587,-.0301252,.495279,.0262594,.429796,-.0358249,.495432,.0312968,.430065,-.0419972,.495621,.0367985,.430588,-.0485144,.496061,.042798,.43113,-.0555028,.496472,.0492914,.431743,-.0629852,.496904,.0562907,.432448,-.0709256,.497369,.0638056,.433414,-.0791942,.498032,.071885,.434638,-.0877346,.498854,.0805517,.43611,-.0968056,.499812,.0898047,.437859,-.106002,.500891,.0997142,.440017,-.115648,.502198,.110289,.443236,-.125427,.504389,.121644,.44697,-.135492,.506809,.133769,.451689,-.145746,.509858,.146787,.45811,-.156219,.514247,.160793,.465305,-.166834,.518816,.175791,.474085,-.177546,.524331,.191906,.484808,-.188262,.53104,.209199,.49732,-.199346,.538511,.227825,.509693,-.209951,.544554,.247269,.524367,-.220533,.551616,.267978,.539228,-.231082,.557368,.289672,.55644,-.241342,.563782,.31268,.574204,-.250964,.568851,.33651,.593388,-.260306,.57312,.362219,.613358,-.268667,.574916,.390322,.634512,-.275591,.575053,.420478,.65563,-.281328,.572404,.451614,.678265,-.285948,.568893,.484112,.70011,-.289408,.561878,.517348,.723005,-.291328,.55359,.551355,.743744,-.291418,.541099,.585109,.763949,-.290252,.526489,.619487,.784186,-.287648,.509496,.65404,.804304,-.283782,.491484,.688649,.823629,-.278067,.470517,.723133,.84094,-.270588,.44705,.757163,.857852,-.261188,.421252,.792816,.874934,-.249313,.394191,.827248,.888709,-.236492,.365359,.861074,.902589,-.222185,.336016,.894417,.914201,-.207314,.30527,.926825,.925978,-.191146,.274532,.9595,.93512,-.174135,.243393,.991583,.943656,-.155231,.212414,1.02356,.951719,-.134403,.182005,1.05239,.957164,-.113023,.153043,1.07754,.962656,-.0914493,.124186,1.09984,.970695,-.0694179,.0941654,1.12,.980749,-.0466199,.0629671,1.13849,.991205,-.0227032,.0311146,1.15494,.999884,632388e-9,-254483e-9,1.1706,.379821,-957289e-11,.460637,789337e-11,.405188,-247483e-9,.491396,204064e-9,.404796,-989434e-9,.490914,815853e-9,.40483,-.00222607,.490949,.00183559,.40473,-.00395723,.49084,.00326332,.404731,-.00618287,.490836,.00509945,.404768,-.00890258,.490871,.00734463,.404791,-.0121156,.490883,.00999992,.404857,-.0158214,.490938,.0130676,.404943,-.0200178,.491004,.0165503,.405059,-.0247027,.491093,.0204521,.405213,-.0298729,.491205,.0247788,.405399,-.0355226,.491333,.0295373,.405731,-.0416352,.491604,.034741,.406303,-.0480807,.492116,.0404255,.406814,-.0550458,.492506,.0465732,.407404,-.0624652,.492926,.0532058,.408149,-.0702958,.493442,.0603442,.409128,-.0784623,.494136,.0680297,.410408,-.087007,.495054,.0762786,.411813,-.0959639,.495962,.0851046,.413735,-.105075,.497257,.0945878,.416137,-.114646,.498882,.104725,.41934,-.124394,.501132,.11563,.423326,-.134328,.503883,.127325,.428419,-.14458,.50747,.139911,.43484,-.154979,.511964,.153481,.442641,-.165628,.517328,.168114,.452511,-.176365,.524258,.183995,.463473,-.187298,.531248,.200953,.475564,-.198244,.538367,.219176,.488664,-.208938,.545175,.238514,.504073,-.219599,.553227,.259129,.520832,-.230378,.560653,.280997,.538455,-.240703,.567523,.303821,.55709,-.250548,.573287,.327948,.576646,-.259964,.577795,.353362,.596705,-.268721,.580077,.380336,.618053,-.276054,.58018,.4101,.640303,-.282176,.578747,.44161,.662365,-.286931,.574294,.474106,.684542,-.290521,.567035,.507549,.707984,-.292672,.558687,.541853,.730913,-.293189,.547606,.576581,.752948,-.292199,.533471,.61172,.773452,-.289508,.516395,.646339,.794715,-.285716,.497873,.682131,.814251,-.280051,.476845,.716396,.833057,-.272873,.453449,.751503,.84959,-.263982,.427857,.786085,.867022,-.252745,.400335,.821355,.882277,-.239655,.371304,.85646,.895375,-.225386,.340397,.890828,.909347,-.209587,.310005,.923532,.921885,-.193433,.2796,.956419,.932127,-.176135,.247276,.989445,.941869,-.157872,.216186,1.02221,.949735,-.137577,.185602,1.05195,.956617,-.115285,.155767,1.07822,.961974,-.0928418,.126103,1.10149,.96972,-.0700592,.0956758,1.12207,.98012,-.0474671,.0643269,1.1408,.990825,-.0238113,.0320863,1.1577,.999876,381574e-9,-812203e-10,1.17403,.367636,-961342e-11,.469176,753287e-11,.380377,-244772e-9,.485434,191797e-9,.380416,-978857e-9,.485475,767015e-9,.380376,-.00220165,.485435,.00172522,.380419,-.00391408,.485487,.00306734,.380438,-.00611549,.485505,.00479332,.380462,-.00880558,.485525,.00690391,.380496,-.0119837,.485551,.00940039,.38056,-.0156487,.485605,.0122848,.38064,-.0197988,.485666,.0155601,.380767,-.0244324,.48577,.0192313,.380909,-.0295444,.485871,.0233032,.381142,-.0351321,.48606,.0277861,.381472,-.0411535,.486336,.0326939,.382015,-.0475408,.486833,.0380565,.382523,-.0544395,.487231,.0438615,.383129,-.061784,.487683,.0501332,.383952,-.0695085,.488313,.0568996,.38498,-.0775819,.489077,.0641952,.386331,-.0860443,.490113,.0720324,.387788,-.0948406,.491099,.0804379,.389808,-.103899,.492566,.0894899,.39252,-.113313,.494601,.0992098,.395493,-.123007,.496619,.109641,.399826,-.132859,.499912,.120919,.405341,-.143077,.504061,.133107,.411932,-.153465,.508905,.146263,.420591,-.164108,.515482,.160544,.43101,-.174893,.523191,.176123,.441881,-.185839,.53026,.192757,.453919,-.196633,.537295,.210535,.468715,-.207611,.546156,.229886,.485182,-.218517,.555173,.250543,.501926,-.229249,.562728,.27221,.51785,-.239481,.567494,.294892,.536947,-.249395,.573889,.318987,.557115,-.259,.578831,.344348,.577966,-.268075,.582055,.371223,.599489,-.276115,.583307,.399834,.62479,-.282523,.583902,.431415,.647504,-.287663,.57953,.464301,.670601,-.291538,.573103,.498123,.693539,-.293842,.563731,.532662,.717385,-.294681,.553169,.567925,.741533,-.293717,.539908,.603502,.762142,-.291156,.521902,.639074,.783014,-.28719,.502815,.674439,.805158,-.281773,.482598,.710497,.823646,-.274682,.458949,.7456,.841879,-.266184,.433129,.781085,.859515,-.255682,.406064,.816,.875335,-.242849,.376509,.851074,.890147,-.228329,.345502,.886473,.903144,-.212491,.31428,.920751,.916618,-.195695,.282994,.954606,.927953,-.178267,.251091,.988402,.937414,-.159549,.219107,1.02141,.946823,-.140022,.18896,1.05167,.954651,-.118154,.158667,1.07819,.959955,-.0946636,.128808,1.1025,.96858,-.0711792,.0973787,1.12391,.97938,-.0475046,.0650965,1.14322,.990498,-.024059,.0326267,1.16077,.999844,-512408e-10,112444e-9,1.17727,.316912,-934977e-11,.425996,695559e-11,.356423,-241372e-9,.479108,179562e-9,.356272,-965292e-9,.478897,71811e-8,.356262,-.00217182,.478894,.00161574,.356265,-.00386092,.478895,.00287261,.356278,-.0060324,.478905,.00448907,.356293,-.00868565,.478914,.00646572,.356346,-.0118207,.478965,.00880438,.356395,-.0154355,.479001,.0115066,.356484,-.019529,.479075,.0145762,.356609,-.0240991,.47918,.018018,.356766,-.0291413,.479305,.0218379,.357009,-.0346498,.479512,.0260454,.357424,-.0405462,.479909,.0306657,.357899,-.0468825,.480337,.0357054,.358424,-.0536887,.480771,.0411728,.359041,-.0609416,.481242,.0470841,.359903,-.0685239,.481943,.0534831,.360932,-.0764883,.482741,.0603795,.362196,-.0848364,.483688,.0678028,.363847,-.0935002,.484947,.0758086,.365972,-.102471,.486588,.0844173,.368741,-.111751,.488787,.0937199,.372146,-.121334,.491405,.103732,.377114,-.131147,.495604,.114608,.38226,-.141213,.499436,.126345,.389609,-.151632,.505334,.139116,.397925,-.162073,.51168,.152995,.407824,-.172819,.518876,.168071,.420014,-.183929,.527639,.184495,.434266,-.195032,.537588,.20232,.447352,-.205792,.544379,.221189,.463726,-.216704,.553422,.241616,.481406,-.227531,.562074,.263298,.498707,-.238017,.568227,.286116,.518039,-.247936,.574473,.3101,.538277,-.257437,.579191,.335401,.561166,-.266829,.584807,.362246,.583189,-.275329,.586476,.390609,.606024,-.28234,.585578,.420998,.632419,-.287924,.584496,.454357,.656128,-.291972,.577766,.488233,.679953,-.29456,.56875,.523248,.704654,-.295816,.558388,.559168,.729016,-.295157,.544826,.595326,.752062,-.292779,.528273,.631864,.773138,-.288681,.508482,.667793,.794869,-.283358,.487341,.704035,.815101,-.27608,.46354,.739925,.834212,-.26767,.438672,.775539,.852368,-.257397,.411239,.810895,.870207,-.245689,.3829,.846472,.884063,-.231452,.351496,.881788,.898284,-.215561,.31895,.917438,.912964,-.198208,.287367,.952422,.924666,-.180426,.254487,.987551,.934429,-.161525,.222226,1.02142,.943485,-.141197,.191143,1.05218,.9521,-.120085,.161112,1.07937,.957876,-.0975881,.130982,1.10403,.966943,-.0726842,.0990553,1.12616,.978313,-.0483705,.0662818,1.14619,.990048,-.0239072,.0329243,1.16413,.999984,461885e-9,-772859e-10,1.18099,.321287,-935049e-11,.455413,659662e-11,.332595,-237513e-9,.471437,167562e-9,.332729,-949964e-9,.471618,670192e-9,.332305,-.00213618,.471028,.00150712,.332326,-.00379765,.471055,.00267959,.332344,-.00593353,.471072,.00418751,.332356,-.00854349,.471077,.00603172,.332403,-.0116268,.471121,.00821362,.332461,-.0151824,.47117,.0107357,.332552,-.0192088,.471251,.0136014,.332657,-.0237024,.47133,.0168152,.332835,-.0286615,.471487,.0203853,.333083,-.0340765,.471708,.0243212,.333547,-.0398563,.47219,.0286518,.333989,-.0460916,.472587,.0333763,.334532,-.0527897,.473054,.0385084,.335167,-.0599284,.473568,.0440638,.33608,-.0673514,.474362,.0500962,.337146,-.0752237,.475231,.0566022,.338462,-.083418,.476282,.0636272,.34014,-.0919382,.477615,.0712153,.342341,-.100741,.479404,.079417,.345088,-.109905,.481618,.0882631,.349049,-.119369,.485081,.0978851,.353939,-.129033,.489317,.108336,.359893,-.139038,.494309,.119698,.366945,-.149411,.499983,.132024,.375814,-.159843,.507185,.145558,.387112,-.170664,.516392,.160433,.40023,-.181897,.526519,.176648,.412555,-.192785,.53423,.193922,.427023,-.203663,.542741,.212662,.443685,-.214695,.552066,.232944,.461499,-.225561,.560762,.254495,.480975,-.236257,.569421,.277531,.501,-.24639,.576101,.301724,.521691,-.256101,.581493,.327112,.543478,-.265289,.585221,.353917,.566094,-.273938,.587614,.381941,.589578,-.281679,.587991,.41172,.614583,-.287655,.585928,.444148,.641813,-.292228,.582092,.478617,.666189,-.295172,.57398,.51397,.690475,-.29648,.561676,.550118,.715543,-.296203,.548758,.586933,.740405,-.293999,.532792,.62384,.762183,-.28998,.512735,.660723,.786069,-.28478,.492402,.69807,.806812,-.277568,.469058,.734422,.826987,-.268951,.443017,.770946,.844588,-.259049,.415501,.80699,.863725,-.2471,.387328,.842107,.879137,-.234157,.356108,.878078,.894634,-.218719,.324315,.914058,.909162,-.201293,.291813,.949922,.92072,-.18267,.258474,.985337,.93158,-.163212,.225593,1.0205,.941238,-.142771,.193986,1.05273,.949293,-.120956,.163392,1.08075,.956226,-.0985743,.132934,1.10559,.96546,-.075118,.101255,1.12823,.977403,-.0497921,.0675441,1.149,.989648,-.0241574,.0334681,1.16765,1.00001,5762e-7,-184807e-9,1.18519,.303474,-916603e-11,.4542,61243e-10,.308894,-232869e-9,.462306,155592e-9,.309426,-931661e-9,.463093,622499e-9,.308643,-.0020949,.461933,.00139979,.308651,-.0037242,.461941,.00248874,.308662,-.00581873,.46195,.00388933,.308687,-.00837818,.461974,.00560247,.308728,-.0114016,.462011,.00762948,.308789,-.0148884,.462067,.00997326,.308882,-.0188369,.462151,.0126375,.309007,-.0232436,.462263,.0156271,.30918,-.0281054,.462417,.0189498,.309442,-.0334065,.462667,.0226167,.309901,-.0390589,.463162,.0266614,.310331,-.0452042,.463555,.0310715,.310858,-.0517735,.464019,.0358698,.311576,-.0587359,.464669,.0410848,.312436,-.0660383,.465406,.0467453,.313526,-.0737266,.466339,.0528718,.314903,-.0817574,.467504,.0595039,.316814,-.090167,.469226,.0666888,.318965,-.0987555,.470981,.0744658,.322077,-.107792,.473814,.082912,.325947,-.117098,.477241,.0920846,.331008,-.126602,.48184,.102137,.337893,-.136619,.488334,.113135,.345106,-.146838,.494415,.12511,.355111,-.157357,.503275,.138356,.365095,-.167955,.510966,.152686,.378344,-.179157,.521508,.16856,.391599,-.190143,.530455,.18561,.407786,-.20123,.541275,.204308,.425294,-.212456,.551784,.224623,.444021,-.223568,.561493,.246172,.463418,-.234154,.569886,.268979,.484077,-.244546,.577116,.293411,.505513,-.254301,.582914,.318936,.527672,-.263564,.587208,.345856,.550565,-.272332,.589277,.374054,.573656,-.280011,.588426,.403276,.59827,-.286924,.587504,.43474,.624731,-.291994,.583401,.468767,.652396,-.295159,.576997,.504411,.67732,-.296954,.565863,.54114,.703147,-.296877,.552316,.57816,.728715,-.295147,.536773,.616124,.752448,-.291275,.51771,.653885,.775169,-.285905,.496087,.691537,.799307,-.279064,.474232,.729251,.819482,-.270294,.447676,.766267,.837659,-.260032,.419656,.802616,.856903,-.248497,.391328,.838583,.873325,-.235252,.360285,.874711,.889788,-.221126,.329215,.91077,.904486,-.204304,.296392,.94653,.917711,-.185562,.262159,.983828,.928969,-.165635,.229142,1.01955,.939707,-.14442,.19673,1.05317,.948167,-.122147,.165095,1.0823,.955222,-.099098,.13451,1.10791,.964401,-.0755332,.102476,1.1312,.976605,-.0513817,.0689667,1.15218,.989085,-.0258499,.034506,1.17129,.999908,617773e-9,-271268e-9,1.18961,.285803,-905752e-11,.452348,572272e-11,.284689,-22732e-8,.450581,143626e-9,.285263,-910214e-9,.451482,575099e-9,.285302,-.00204784,.451553,.00129395,.285318,-.00364057,.451574,.0023006,.28533,-.00568813,.451585,.00359547,.285361,-.00819001,.451618,.00517934,.285397,-.0111458,.45165,.007054,.285447,-.0145536,.451688,.00922167,.285527,-.0184127,.451758,.0116869,.285688,-.0227207,.451929,.0144555,.28584,-.0274712,.452055,.0175341,.286136,-.0326278,.452369,.0209406,.286574,-.0381792,.452853,.0246965,.287012,-.0441879,.453272,.0287996,.287542,-.0506096,.453752,.033268,.288299,-.0573634,.454488,.0381504,.289186,-.0645458,.455294,.0434447,.290302,-.0720405,.456301,.0491973,.291776,-.0799046,.457648,.0554453,.29372,-.088117,.459483,.0622311,.296052,-.0965328,.461571,.0695992,.299563,-.105409,.465085,.077658,.30335,-.114553,.468506,.0864176,.309167,-.123917,.474423,.0961078,.31529,-.13381,.47995,.106643,.324163,-.144021,.488592,.118322,.333272,-.154382,.496461,.131133,.344224,-.165015,.50562,.145208,.357733,-.176168,.516719,.16073,.373046,-.187468,.528513,.177807,.38788,-.198488,.537713,.196072,.405133,-.209545,.547999,.21605,.423845,-.220724,.55759,.237484,.443777,-.231518,.566246,.26039,.464824,-.242035,.574326,.284835,.486635,-.251898,.58037,.310518,.51012,-.261304,.58568,.337678,.535301,-.270384,.590197,.366242,.559193,-.27841,.590569,.395873,.583544,-.285325,.588161,.426857,.608834,-.291113,.584249,.459477,.635753,-.294882,.57763,.494734,.664367,-.297088,.569479,.532023,.689688,-.297364,.555064,.569629,.715732,-.295949,.539522,.608124,.741307,-.292259,.521613,.646231,.764949,-.287063,.49969,.684938,.788599,-.28012,.476747,.723548,.81048,-.27153,.45116,.761135,.831372,-.261289,.424101,.798916,.850092,-.249559,.39443,.835952,.867777,-.236348,.363849,.871606,.884632,-.221569,.332477,.907843,.90047,-.20618,.300667,.944187,.914524,-.188771,.266552,.981371,.926892,-.168362,.232349,1.01841,.937951,-.146761,.199359,1.05308,.947236,-.123813,.1675,1.0839,.954367,-.099984,.136166,1.11047,.963907,-.0759278,.103808,1.13414,.976218,-.0511367,.0697061,1.15575,.988772,-.0267415,.0352529,1.17531,.999888,-520778e-9,289926e-9,1.19389,.263546,-883274e-11,.441896,526783e-11,.262352,-221849e-9,.439889,132311e-9,.262325,-886683e-9,.439848,528824e-9,.26228,-.00199476,.439765,.00118975,.262372,-.00354671,.439922,.00211568,.26239,-.00554141,.439941,.00330652,.262412,-.00797888,.439961,.00476346,.262453,-.0108584,.440002,.00648818,.262528,-.0141788,.440085,.0084835,.262615,-.017938,.440166,.0107533,.262744,-.0221346,.440291,.0133044,.262939,-.026762,.440493,.0161445,.263277,-.0317573,.440889,.0192974,.26368,-.0371832,.441338,.0227699,.264106,-.0430371,.441753,.0265698,.264624,-.0493035,.442227,.0307178,.265378,-.0558669,.442985,.0352616,.266253,-.0628718,.443795,.0401968,.267478,-.0701569,.445008,.04559,.269062,-.077845,.446599,.0514539,.270926,-.0857941,.448349,.0578382,.273693,-.0940773,.451221,.0648363,.276746,-.102704,.454097,.0724389,.281693,-.111735,.459517,.0808744,.287335,-.121004,.46531,.0901551,.29448,-.130734,.472605,.100371,.30257,-.140777,.480251,.111644,.312465,-.15111,.489444,.124111,.324856,-.16189,.500919,.137979,.33774,-.172946,.511317,.153163,.35255,-.184152,.522684,.169817,.367786,-.19522,.53248,.187886,.385474,-.20632,.543326,.207634,.404976,-.217744,.554109,.229165,.425203,-.228691,.563395,.252068,.446704,-.239299,.571565,.276471,.468951,-.249348,.577935,.302323,.493487,-.258933,.584309,.329882,.517861,-.268009,.58773,.358525,.543309,-.276238,.589612,.388585,.569704,-.28356,.589294,.419787,.594871,-.289497,.585137,.452114,.622555,-.294452,.580356,.486466,.651167,-.296918,.57185,.523079,.677332,-.297647,.558428,.5611,.703718,-.296321,.542232,.599592,.730262,-.293339,.524541,.639138,.754304,-.288036,.502691,.677978,.778051,-.281018,.479212,.716537,.801557,-.272414,.454071,.75586,.822559,-.262419,.425952,.794477,.843051,-.250702,.397313,.832664,.86232,-.237264,.366534,.869876,.879044,-.222716,.334816,.906973,.896362,-.206827,.303143,.943558,.910342,-.189659,.269699,.979759,.924119,-.171108,.236411,1.01718,.935374,-.149579,.202224,1.05289,.944295,-.126295,.16989,1.08496,.952227,-.101511,.138089,1.11256,.962041,-.0766392,.105053,1.1375,.97528,-.0511967,.070329,1.15983,.988476,-.025463,.0351268,1.17987,.999962,286808e-10,145564e-10,1.19901,.227089,-841413e-11,.404216,472707e-11,.239725,-215083e-9,.426708,120833e-9,.239904,-860718e-9,.427028,483555e-9,.239911,-.00193661,.427039,.00108806,.239914,-.00344276,.42704,.00193457,.239933,-.00537907,.427064,.00302363,.239944,-.00774482,.427065,.00435604,.239993,-.01054,.427122,.00593398,.240052,-.0137626,.427179,.00775987,.240148,-.0174115,.427279,.00983854,.240278,-.021484,.42741,.0121763,.240472,-.0259729,.427618,.0147827,.240839,-.0308131,.428086,.0176837,.241201,-.0360893,.428482,.0208775,.241626,-.0417723,.428907,.0243821,.242207,-.0478337,.42952,.0282228,.24298,-.0542199,.430332,.0324333,.243881,-.0610015,.431222,.0370252,.245123,-.0680874,.432512,.0420535,.24667,-.0755482,.434088,.0475414,.248779,-.0832873,.436323,.0535542,.251665,-.0913546,.439509,.0601716,.255305,-.0998489,.443478,.0674282,.260049,-.108576,.448713,.0754673,.266192,-.117754,.455524,.084339,.273158,-.127294,.4627,.0941683,.282131,-.137311,.472068,.10515,.293332,-.147736,.483565,.117402,.304667,-.158357,.493702,.130824,.317785,-.169274,.504708,.145724,.333245,-.180595,.517107,.16215,.349843,-.191892,.528849,.180149,.367944,-.203168,.540301,.199746,.387579,-.214443,.551514,.221047,.408247,-.225624,.560906,.243981,.43014,-.236422,.56959,.268513,.452669,-.24654,.576098,.294409,.476196,-.256157,.580925,.322002,.501157,-.265289,.584839,.351052,.527632,-.273671,.587614,.3812,.555754,-.281254,.589119,.412994,.581682,-.287448,.585204,.445498,.608196,-.292614,.579006,.479505,.635661,-.296068,.571297,.514643,.664999,-.297395,.560855,.552213,.691039,-.296645,.544525,.591365,.7179,-.293785,.526535,.630883,.744059,-.289089,.50545,.670932,.76863,-.282239,.482514,.710904,.793273,-.273688,.457246,.750259,.814731,-.26328,.428872,.78948,.835603,-.251526,.399384,.828597,.85489,-.238339,.368811,.866892,.872828,-.223607,.336617,.90563,.889462,-.207538,.303997,.943538,.904929,-.190297,.270812,.980591,.919101,-.172034,.237453,1.01935,.930536,-.152058,.204431,1.05498,.941223,-.129515,.172495,1.08717,.94982,-.104263,.140175,1.11551,.960592,-.0781944,.106465,1.14098,.974629,-.051688,.0711592,1.16418,.98811,-.0253929,.0354432,1.18465,1.00004,804378e-9,-330876e-9,1.20462,.214668,-821282e-11,.406619,433582e-11,.218053,-208144e-9,.413025,109887e-9,.217987,-832212e-9,.412901,439362e-9,.217971,-.00187246,.412876,988623e-9,.217968,-.00332855,.41286,.00175772,.217985,-.00520055,.412882,.00274729,.218014,-.00748814,.412916,.00395842,.218054,-.0101901,.412957,.00539274,.218106,-.0133057,.413005,.00705348,.218217,-.0168342,.413139,.00894581,.218338,-.0207707,.413258,.0110754,.21855,-.0251001,.413509,.0134551,.218913,-.0297861,.413992,.0161081,.219265,-.0348956,.414383,.0190307,.219696,-.0403909,.414839,.0222458,.220329,-.0462003,.415567,.025792,.220989,-.0524208,.41621,.0296637,.222027,-.058948,.417385,.0339323,.223301,-.0658208,.418779,.0386055,.224988,-.0730347,.420665,.0437355,.227211,-.0805274,.423198,.0493844,.230131,-.088395,.426566,.0556135,.233908,-.0966208,.43091,.0624829,.239092,-.105223,.437148,.0701636,.245315,-.11424,.444302,.0786949,.253166,-.12368,.453262,.0882382,.262374,-.133569,.463211,.0988682,.273145,-.143836,.474271,.110727,.285512,-.154577,.4863,.123945,.299512,-.165501,.498817,.138581,.314287,-.176698,.510341,.154676,.331083,-.188066,.522583,.172459,.349615,-.199597,.534879,.191979,.369318,-.210843,.546083,.21309,.390377,-.222068,.5562,.235998,.412411,-.233059,.564704,.260518,.435715,-.24357,.572314,.286795,.461196,-.253356,.579395,.314559,.485587,-.262362,.581985,.343581,.511908,-.270895,.584347,.374367,.539798,-.278452,.58505,.406015,.567974,-.284877,.583344,.439168,.594303,-.290124,.577348,.473005,.622951,-.294183,.570751,.508534,.652404,-.296389,.561541,.544764,.679291,-.296605,.546426,.582927,.706437,-.294095,.528599,.622681,.734485,-.28978,.508676,.663567,.758841,-.283363,.484768,.704092,.78537,-.275015,.460434,.745101,.807315,-.264689,.432166,.784712,.8271,-.252597,.401807,.824241,.849191,-.239154,.371458,.863803,.867046,-.224451,.338873,.903063,.8852,-.208342,.306175,.942763,.901771,-.190684,.272759,.981559,.915958,-.172105,.239306,1.02048,.928046,-.152214,.206071,1.05765,.939961,-.130247,.17367,1.08999,.948711,-.10672,.142201,1.11829,.959305,-.0808688,.108454,1.14467,.973009,-.0539145,.0728109,1.16839,.987631,-.0262947,.0360625,1.19004,.999978,.00132758,-559424e-9,1.21058,.193925,-793421e-11,.391974,392537e-11,.196746,-200315e-9,.397675,991033e-10,.19667,-801099e-9,.397521,396342e-9,.196633,-.00180246,.397445,891829e-9,.196654,-.00320443,.397482,.00158582,.196659,-.00500647,.39748,.00247867,.196683,-.0072086,.397506,.00357167,.196728,-.00981001,.397562,.00486675,.196792,-.0128096,.397633,.00636707,.19689,-.0162055,.397746,.00807752,.197017,-.0199943,.397884,.0100052,.19729,-.024139,.39827,.0121691,.197583,-.0286671,.398639,.0145755,.197927,-.0335858,.399034,.0172355,.198383,-.0388806,.399554,.0201718,.199002,-.0444736,.400289,.0234194,.199739,-.0504583,.401111,.026984,.200784,-.056729,.402349,.0309217,.202075,-.0633643,.403841,.0352496,.203898,-.0703247,.406076,.0400313,.206199,-.0775565,.408841,.0453282,.209252,-.085184,.41259,.0511794,.213638,-.0931994,.418288,.0577459,.21881,-.101617,.424681,.0650508,.225642,-.11052,.433429,.0732759,.233717,-.119772,.442897,.0824683,.242823,-.129505,.452888,.0927484,.254772,-.139906,.466407,.104417,.266603,-.150402,.477413,.117211,.28073,-.161395,.490519,.131598,.295399,-.172465,.50201,.147407,.312705,-.183982,.515311,.165031,.331335,-.195532,.52786,.184336,.351037,-.206971,.5392,.205361,.372175,-.218117,.54941,.228043,.394548,-.229327,.558642,.25267,.419598,-.240052,.567861,.279071,.443922,-.249937,.573332,.306882,.471495,-.259407,.58013,.33661,.496769,-.267749,.580564,.367328,.524951,-.275524,.581696,.399753,.55318,-.282148,.579885,.433134,.581577,-.287533,.575471,.467534,.609231,-.291612,.567445,.502943,.637478,-.293911,.557657,.53871,.667795,-.295096,.546535,.576568,.694272,-.294073,.529561,.614929,.722937,-.290386,.510561,.655909,.749682,-.284481,.487846,.697663,.774754,-.276188,.462487,.738515,.799301,-.266215,.43481,.779802,.820762,-.254116,.404879,.820045,.843231,-.240393,.374559,.860294,.861857,-.225503,.341582,.900965,.880815,-.209382,.308778,.941727,.89766,-.19155,.275232,.980916,.912926,-.172346,.240938,1.02162,.926391,-.151799,.207223,1.0597,.938429,-.129968,.17484,1.09291,.947834,-.10651,.142984,1.12248,.958432,-.0824098,.109902,1.149,.972402,-.0565242,.0744454,1.1733,.987191,-.028427,.0373794,1.19538,.999975,385685e-10,-4203e-8,1.21676,.178114,-766075e-11,.385418,354027e-11,.176074,-191966e-9,.381002,887135e-10,.17601,-767549e-9,.380861,354715e-9,.17598,-.00172696,.380798,798168e-9,.175994,-.00307012,.380824,.00141928,.176017,-.00479684,.380858,.00221859,.176019,-.00690648,.380839,.00319714,.176072,-.00939888,.380913,.0043572,.176131,-.0122726,.380979,.005702,.176239,-.0155264,.38112,.00723689,.176371,-.0191551,.381272,.00896907,.176638,-.023117,.381669,.0109194,.176912,-.0274633,.382015,.0130903,.177279,-.032173,.382476,.0154949,.17774,-.0372219,.383041,.0181669,.178344,-.0426132,.38378,.0211209,.179153,-.0483309,.384773,.0243899,.180197,-.0543447,.386076,.0280062,.181581,-.0607122,.387809,.032004,.18344,-.0673855,.390205,.036453,.186139,-.0743989,.393944,.0414162,.189432,-.0817731,.39832,.0469394,.193795,-.0895464,.404188,.0531442,.199641,-.0978264,.4121,.0601374,.206679,-.106499,.421425,.0680078,.214865,-.115654,.431504,.076919,.224406,-.125268,.442526,.0868835,.235876,-.135475,.455465,.0981875,.248335,-.146023,.4681,.110759,.262868,-.157016,.482069,.124885,.278962,-.168245,.496182,.140645,.295082,-.17958,.507401,.157838,.313738,-.191227,.520252,.17695,.333573,-.202718,.531708,.197817,.356433,-.214424,.544509,.220785,.378853,-.225492,.55373,.245306,.402717,-.236236,.561348,.271593,.428375,-.246568,.568538,.299776,.454724,-.255941,.573462,.329433,.482291,-.264511,.576356,.360598,.509706,-.272129,.576446,.393204,.538805,-.278979,.575298,.427227,.568919,-.284528,.572154,.462157,.596804,-.288801,.564691,.497997,.625987,-.291334,.555134,.534467,.656414,-.292722,.545051,.571736,.683916,-.292185,.528813,.610158,.711809,-.290043,.51106,.649061,.739547,-.285246,.490103,.690081,.766914,-.277647,.465523,.732554,.791375,-.267603,.437718,.773982,.814772,-.256109,.40882,.81609,.836691,-.242281,.377823,.856849,.856984,-.227155,.34496,.898363,.876332,-.210395,.311335,.939471,.894988,-.192612,.277703,.980799,.911113,-.173236,.243019,1.02215,.924092,-.152258,.209037,1.06139,.936828,-.129575,.175909,1.09635,.946869,-.10594,.143852,1.12707,.958284,-.081318,.110289,1.15419,.972325,-.0556133,.0747232,1.17909,.986878,-.0297899,.0383149,1.20163,.999936,-.00197169,912402e-9,1.22338,.151174,-720365e-11,.351531,309789e-11,.155594,-18279e-8,.361806,78608e-9,.156099,-731569e-9,.362982,314615e-9,.156053,-.00164578,.362869,707845e-9,.156093,-.0029261,.362961,.00125884,.156099,-.00457155,.362959,.00196783,.15612,-.00658224,.362982,.00283622,.156168,-.00895774,.363048,.00386625,.156221,-.0116962,.363101,.00506109,.156324,-.0147973,.363241,.00642675,.156476,-.0182503,.363448,.00797175,.156731,-.0220266,.36384,.00971484,.156994,-.026176,.364179,.0116575,.157341,-.0306701,.36462,.0138207,.157867,-.0354591,.365364,.0162356,.15846,-.0406141,.366111,.0189092,.159308,-.0460519,.367248,.021885,.160426,-.0518096,.368767,.0252004,.161877,-.0578906,.370745,.0288825,.163995,-.0642812,.373831,.0330139,.16655,-.0710067,.377366,.0376283,.170237,-.0781522,.382799,.0428493,.175096,-.0857172,.389915,.0487324,.181069,-.0938025,.398487,.0554214,.188487,-.102363,.408799,.0630189,.197029,-.111343,.419991,.071634,.206684,-.120812,.431455,.0812797,.218698,-.131033,.445746,.0923651,.230726,-.141373,.457471,.104545,.245516,-.152387,.472388,.118449,.261551,-.163628,.486671,.133923,.277437,-.174814,.49762,.150849,.296662,-.186713,.51162,.169924,.31795,-.198513,.525435,.190848,.339422,-.210119,.536267,.213504,.362143,-.221354,.545982,.237947,.387198,-.23224,.555364,.264427,.412349,-.24257,.561489,.292519,.439274,-.252284,.566903,.322561,.466779,-.261023,.569614,.353952,.496011,-.26899,.571589,.387278,.524964,-.275498,.570325,.421356,.556518,-.281449,.568792,.457314,.584363,-.285526,.560268,.493199,.614214,-.28844,.55205,.530276,.645684,-.289777,.541906,.56855,.673446,-.289722,.526464,.606927,.701924,-.287792,.509872,.645945,.73037,-.284315,.490649,.685564,.757405,-.278804,.467964,.726511,.784025,-.269543,.441468,.768601,.808255,-.258117,.41216,.811321,.830739,-.244728,.380606,.853496,.851914,-.229428,.348111,.895374,.872586,-.212508,.314732,.937674,.891581,-.194025,.280338,.979869,.907641,-.174711,.245203,1.02253,.922233,-.153509,.21077,1.06371,.935878,-.130418,.177399,1.09972,.946338,-.105558,.144507,1.13124,.957265,-.080059,.110508,1.15973,.971668,-.0539766,.0742311,1.18515,.9866,-.0277101,.0375224,1.20858,1.00021,-515531e-9,135226e-9,1.23135,.137468,-686011e-11,.345041,273315e-11,.13703,-173378e-9,.343936,690761e-10,.136986,-693048e-9,.34383,276126e-9,.136964,-.00155931,.343761,621337e-9,.137003,-.00277211,.343863,.00110494,.137012,-.00433103,.343868,.00172744,.137043,-.00623606,.343916,.00249022,.13709,-.0084868,.343986,.00339559,.137145,-.0110814,.344045,.00444687,.137242,-.0140187,.344177,.00565007,.137431,-.0172713,.344491,.00701868,.137644,-.0208605,.344805,.00856042,.13791,-.024792,.345172,.0102863,.138295,-.0290461,.345734,.0122185,.138764,-.0335957,.346371,.0143771,.139415,-.038467,.347298,.0167894,.140272,-.0436176,.348527,.0194895,.141457,-.0491016,.350276,.0225043,.14303,-.0548764,.352646,.0258962,.145289,-.0610096,.356206,.0297168,.148502,-.0674777,.361488,.0340562,.152188,-.074345,.367103,.0389534,.157359,-.0817442,.375247,.0445541,.16379,-.0896334,.385064,.0509535,.171376,-.098005,.396082,.0582611,.179901,-.106817,.407418,.06654,.189892,-.116239,.420031,.075994,.201838,-.12627,.434321,.0867239,.214311,-.136701,.447631,.0987517,.228902,-.147616,.462046,.112353,.245107,-.158871,.476942,.127605,.262292,-.170261,.490285,.144469,.281215,-.182017,.503783,.163282,.301058,-.193729,.515505,.183873,.322752,-.205512,.52682,.206466,.347547,-.217214,.539473,.231194,.370969,-.227966,.546625,.257288,.397533,-.238555,.55472,.285789,.42398,-.248278,.559468,.315746,.452928,-.257422,.564095,.347724,.482121,-.265306,.565426,.380922,.510438,-.272043,.563205,.415639,.541188,-.277614,.561087,.451702,.571667,-.281927,.554922,.48845,.602432,-.285015,.546838,.526442,.634126,-.286512,.537415,.564896,.662816,-.286388,.522906,.604037,.692411,-.284734,.507003,.643795,.720946,-.281297,.488398,.68298,.748293,-.276262,.466353,.723466,.776931,-.269978,.443573,.764565,.801065,-.260305,.415279,.805838,.825843,-.247426,.384773,.849985,.84807,-.232437,.352555,.893174,.869122,-.215806,.318642,.936564,.888963,-.197307,.28381,.980253,.905547,-.177203,.247888,1.02463,.918554,-.155542,.212904,1.06714,.931395,-.131948,.1787,1.10451,.941749,-.106723,.145902,1.13694,.954551,-.0804939,.111193,1.1666,.970279,-.0534239,.0744697,1.19249,.986117,-.0257452,.0368788,1.21665,.999938,.00190634,-.0010291,1.23981,.118493,-647439e-11,.32272,23772e-10,.118765,-163023e-9,.323456,598573e-10,.118772,-65212e-8,.323477,239447e-9,.118843,-.00146741,.323657,538881e-9,.118804,-.00260846,.323553,95826e-8,.118826,-.00407576,.323595,.00149845,.118846,-.00586826,.323617,.00216047,.118886,-.00798578,.32367,.00294679,.118947,-.0104273,.323753,.00386124,.119055,-.0131909,.323922,.00490999,.119241,-.0162444,.324251,.00610804,.11944,-.0196339,.324544,.00745805,.119739,-.0233378,.325026,.00897805,.12011,-.0273179,.325586,.0106895,.120571,-.0316143,.326231,.0126073,.12124,-.0361939,.327264,.0147654,.122162,-.0410511,.328733,.0172001,.123378,-.0462233,.330659,.0199375,.125183,-.0517109,.333754,.0230498,.127832,-.0575652,.338507,.026597,.130909,-.0637441,.343666,.0306345,.135221,-.0704302,.351063,.035273,.14082,-.0776364,.360604,.0406137,.146781,-.0852293,.369638,.0466788,.155121,-.0935351,.3827,.0537628,.16398,-.102234,.39522,.0617985,.173926,-.111465,.40793,.07097,.185137,-.121296,.42105,.0813426,.19826,-.13169,.435735,.0931596,.212938,-.142614,.450932,.106547,.229046,-.153884,.465726,.121575,.246246,-.165382,.479461,.138286,.264637,-.176806,.492106,.15666,.284959,-.188793,.504774,.17728,.308157,-.200763,.518805,.19988,.330951,-.21239,.528231,.224293,.3549,-.223521,.536376,.250541,.381502,-.234169,.544846,.278902,.409529,-.244077,.551717,.309227,.437523,-.253363,.55517,.341426,.467624,-.261659,.557772,.37518,.497268,-.268498,.556442,.41007,.528294,-.274018,.553915,.446445,.559053,-.278169,.549153,.483779,.589329,-.281229,.539878,.522249,.622503,-.282902,.53162,.561754,.652382,-.282815,.518119,.601544,.681847,-.281247,.502187,.641574,.712285,-.277986,.484824,.682633,.740094,-.273017,.463483,.723426,.768478,-.266692,.441299,.763747,.794556,-.258358,.415238,.805565,.819408,-.248807,.386912,.847254,.843411,-.236214,.356165,.891091,.862397,-.219794,.320562,.936174,.883113,-.201768,.285322,.982562,.90023,-.181672,.249713,1.02862,.915192,-.159279,.214546,1.07163,.928458,-.134725,.180285,1.10995,.94069,-.10913,.147119,1.14354,.953409,-.0821315,.112492,1.17372,.969537,-.0542677,.0752014,1.20043,.985612,-.0259096,.0370361,1.22528,.999835,.00298198,-.00151801,1.24959,.10097,-602574e-11,.300277,202619e-11,.101577,-152164e-9,.302077,511662e-10,.101572,-608889e-9,.302066,204751e-9,.101566,-.00136997,.302047,460753e-9,.101592,-.00243557,.302114,819497e-9,.101608,-.0038053,.30214,.00128154,.101627,-.00547906,.30216,.0018483,.101669,-.00745647,.302224,.00252223,.101732,-.00973615,.302318,.00330716,.101844,-.0123097,.302513,.00421061,.102025,-.0151681,.30285,.00524481,.102224,-.0183334,.303166,.0064154,.102515,-.0217819,.303654,.00774063,.102886,-.0255067,.304243,.0092398,.103395,-.029514,.305089,.0109339,.104109,-.0337912,.306301,.0128561,.105074,-.0383565,.30798,.0150338,.10654,-.0432132,.310726,.0175228,.108478,-.0484244,.314351,.0203648,.111015,-.0539339,.319032,.0236325,.114682,-.0598885,.32605,.0274188,.11911,-.0663375,.334109,.0317905,.124736,-.0733011,.344013,.0368502,.131479,-.0807744,.355358,.0427104,.139283,-.0888204,.367614,.0494788,.148054,-.0973394,.380072,.0572367,.159037,-.10665,.395678,.0662704,.169794,-.116221,.40795,.0763192,.18314,-.126632,.423546,.087956,.197515,-.137383,.438213,.101042,.213514,-.148641,.453248,.115827,.23065,-.160117,.46688,.132283,.249148,-.171807,.479962,.150644,.270219,-.183695,.494618,.171073,.292338,-.195574,.506937,.193378,.314999,-.207205,.516463,.217585,.340991,-.218955,.528123,.24428,.367982,-.229917,.537025,.272784,.39432,-.239737,.541627,.302742,.423364,-.249048,.546466,.335112,.453751,-.257329,.549466,.369032,.48416,-.264623,.549503,.404577,.515262,-.270411,.547008,.441337,.547036,-.274581,.542249,.479162,.576614,-.277266,.533015,.517904,.611143,-.279144,.525512,.558508,.640989,-.279001,.51154,.598995,.671182,-.277324,.495641,.639935,.700848,-.273908,.477526,.681017,.729862,-.269063,.457955,.722764,.758273,-.262282,.434846,.764349,.784121,-.254281,.409203,.806206,.809798,-.24505,.382694,.848617,.834953,-.233861,.354034,.892445,.856817,-.221308,.321764,.936263,.877609,-.205996,.288118,.982401,.897489,-.186702,.253277,1.02975,.913792,-.164618,.217963,1.07488,.92785,-.140023,.183221,1.11487,.940378,-.11328,.149385,1.14947,.95273,-.0853958,.114152,1.1807,.969059,-.0568698,.0769845,1.20912,.985574,-.0276502,.0381186,1.23498,.999943,.00239052,-.00126861,1.25987,.0852715,-560067e-11,.279021,171162e-11,.0854143,-140871e-9,.279483,430516e-10,.0854191,-563385e-9,.2795,172184e-9,.0854188,-.00126753,.279493,387464e-9,.0854229,-.00225337,.279501,68918e-8,.0854443,-.00352086,.279549,.00107803,.0854697,-.00506962,.279591,.00155536,.0855093,-.00689873,.279652,.00212354,.0855724,-.00900821,.279752,.00278703,.0856991,-.0113799,.280011,.0035551,.085855,-.0140314,.280297,.00443449,.0860682,-.016963,.280682,.00543636,.086344,-.0201438,.281159,.0065788,.0867426,-.0235999,.281886,.00787977,.087239,-.0273069,.282745,.0093606,.0879815,-.031269,.284139,.011056,.0891258,-.035531,.28647,.0130065,.0906909,-.0400947,.289708,.0152495,.0927624,-.0449638,.293904,.0178454,.0958376,-.0502427,.300471,.0208915,.0995827,-.0559514,.30806,.0244247,.104526,-.0622152,.317874,.0285721,.110532,-.0690046,.329332,.0334227,.117385,-.0763068,.341217,.0390466,.12522,-.084184,.353968,.0455786,.134037,-.0925248,.366797,.0530773,.144014,-.101487,.380209,.0617424,.156013,-.111273,.395956,.071777,.168872,-.121431,.41053,.0830905,.183089,-.132105,.425073,.0959341,.198763,-.143286,.439833,.110448,.216159,-.154841,.454507,.126769,.234859,-.166588,.468368,.14495,.255879,-.178626,.482846,.165233,.27677,-.190218,.493489,.187217,.301184,-.202227,.506549,.211659,.325852,-.213764,.5158,.237922,.352824,-.22487,.525442,.26632,.380882,-.235246,.532487,.296691,.410137,-.244847,.537703,.329179,.439787,-.253122,.540361,.363135,.472291,-.260517,.542734,.399222,.501856,-.266519,.538826,.436352,.534816,-.270905,.535152,.474505,.565069,-.273826,.525979,.513988,.597154,-.275333,.516394,.554852,.630473,-.275314,.506206,.596592,.660574,-.273323,.489769,.638117,.692015,-.270008,.472578,.680457,.720647,-.265001,.452134,.723008,.750528,-.258311,.430344,.765954,.777568,-.250046,.405624,.809012,.80387,-.240114,.378339,.852425,.828439,-.228737,.349877,.895346,.851472,-.216632,.318968,.940695,.873906,-.202782,.287489,.987235,.89467,-.187059,.254394,1.03348,.912281,-.168818,.221294,1.07812,.927358,-.146494,.18675,1.11928,.940385,-.120009,.152322,1.15609,.952672,-.0917183,.117514,1.18875,.968496,-.0620321,.0797405,1.21821,.985236,-.0314945,.0402383,1.24523,.99998,-575153e-9,110644e-9,1.27133,.0702429,-512222e-11,.255273,140947e-11,.0702981,-128826e-9,.255469,354488e-10,.0703691,-515562e-9,.255727,141874e-9,.0703805,-.00116,.255754,31929e-8,.0703961,-.00206224,.255813,567999e-9,.0704102,-.00322223,.255839,88871e-8,.0704298,-.00463928,.255863,.00128272,.0704759,-.00631375,.255953,.00175283,.0705434,-.00824317,.256079,.00230342,.0706693,-.010412,.25636,.0029443,.0708189,-.0128439,.256647,.00368031,.0710364,-.0155177,.257084,.00452614,.0713223,-.0184374,.257637,.00549706,.0717182,-.0216002,.258416,.00661246,.072321,-.0249966,.259699,.00790147,.0731446,-.0286566,.261475,.0093884,.0743352,-.0325888,.264132,.0111186,.0760676,-.036843,.26815,.013145,.078454,-.0414292,.273636,.0155251,.0818618,-.0464634,.281653,.0183525,.0857382,-.0519478,.289992,.0216642,.0908131,-.0579836,.30066,.0255956,.0967512,-.0645124,.312204,.0301954,.103717,-.0716505,.325001,.0356017,.111596,-.0793232,.338129,.041896,.120933,-.087645,.352853,.0492447,.130787,-.096492,.366192,.0576749,.142311,-.105973,.380864,.0673969,.155344,-.116182,.396575,.0785899,.169535,-.126815,.411443,.0912377,.185173,-.138015,.426256,.105607,.201755,-.149325,.439607,.121551,.221334,-.161207,.455467,.139608,.241461,-.173162,.469096,.159591,.26294,-.18504,.481014,.18156,.286776,-.196881,.493291,.205781,.311596,-.208311,.503556,.231819,.338667,-.219671,.513268,.260274,.366021,-.230451,.519414,.290862,.395875,-.240131,.526766,.323196,.425564,-.248566,.52905,.357071,.457094,-.256195,.530796,.393262,.488286,-.262331,.528703,.430797,.522291,-.267141,.52727,.470231,.554172,-.270411,.519848,.510477,.586427,-.271986,.510307,.551594,.619638,-.27192,.499158,.593849,.650656,-.269817,.483852,.636314,.68284,-.266267,.467515,.679679,.714356,-.26113,.44931,.723884,.742717,-.254067,.425789,.767245,.770894,-.245652,.401144,.811819,.797358,-.235554,.374224,.856315,.823377,-.223896,.346167,.901077,.847456,-.210865,.316056,.946502,.870697,-.196574,.284503,.993711,.891068,-.180814,.251628,1.04134,.909267,-.163314,.219065,1.08609,.925653,-.143304,.186446,1.12702,.940017,-.121322,.153416,1.16371,.952398,-.0973872,.120334,1.19712,.967568,-.0698785,.08352,1.22791,.984772,-.0390031,.0439209,1.25672,1.00026,-.0070087,.00315668,1.28428,.0556653,-459654e-11,.227325,112556e-11,.0565238,-116382e-9,.230826,284985e-10,.0565717,-465666e-9,.231026,114036e-9,.0565859,-.00104773,.231079,256656e-9,.0565761,-.00186255,.231025,45663e-8,.0565913,-.00291002,.231058,714664e-9,.0566108,-.00418998,.231085,.00103224,.0566532,-.00570206,.231169,.00141202,.0567473,-.00743666,.231417,.00186018,.0568567,-.00940298,.231661,.00238264,.0569859,-.0115991,.231895,.00298699,.0572221,-.0140096,.232456,.00368957,.057519,-.0166508,.233096,.00450303,.0579534,-.01951,.234094,.00544945,.0585922,-.0225991,.235629,.00655564,.0595647,-.0259416,.238106,.00785724,.0609109,-.0295661,.241557,.00939127,.0628751,-.0335126,.246652,.0112198,.0656908,-.0378604,.254091,.0134168,.0691347,-.0426543,.262666,.0160374,.0732165,-.0478967,.272029,.0191514,.0782863,-.0536716,.283007,.0228597,.0843973,-.0600683,.295732,.0272829,.0913598,-.0670095,.308779,.032484,.0994407,-.0745516,.322886,.0385886,.108189,-.082712,.336408,.0457133,.118574,-.0914927,.351692,.0539832,.129989,-.100854,.366502,.0635162,.142722,-.110837,.381675,.0744386,.156654,-.121353,.3963,.0868483,.172151,-.132414,.411477,.100963,.188712,-.143809,.42508,.116795,.208093,-.155765,.441328,.134715,.227936,-.167608,.454328,.154396,.249495,-.179579,.467235,.176179,.27362,-.191488,.480248,.200193,.296371,-.202618,.487886,.225775,.324234,-.214133,.499632,.25441,.353049,-.225212,.509532,.285077,.381785,-.234875,.514265,.317047,.414038,-.244205,.521282,.351874,.445251,-.252145,.522931,.388279,.476819,-.258433,.520947,.425825,.509209,-.263411,.517669,.465104,.542759,-.266732,.512841,.505741,.574822,-.268263,.503317,.547611,.609324,-.268489,.493035,.590953,.641772,-.266941,.478816,.63488,.674049,-.263297,.462863,.679072,.705071,-.257618,.442931,.723487,.734709,-.250625,.421299,.768708,.763704,-.24179,.397085,.814375,.791818,-.231115,.370577,.859907,.817439,-.21922,.34232,.906715,.843202,-.205658,.312627,.953943,.866639,-.190563,.280933,1.00185,.888129,-.173978,.248393,1.05105,.907239,-.155485,.216007,1.09704,.923893,-.134782,.183233,1.13857,.938882,-.11249,.150376,1.17539,.952464,-.0890706,.117177,1.20924,.968529,-.0646523,.0813095,1.24055,.984763,-.038606,.0439378,1.27018,1.00053,-.01238,.00598668,1.29873,.0437928,-409594e-11,.204012,879224e-12,.0440166,-103395e-9,.205049,221946e-10,.0440529,-413633e-9,.205225,887981e-10,.0440493,-930594e-9,.2052,199858e-9,.0439884,-.00165352,.204901,355495e-9,.0440716,-.0025849,.205255,556983e-9,.0440968,-.00372222,.205311,805326e-9,.0441359,-.00506478,.205391,.00110333,.0442231,-.00660384,.205638,.00145768,.0443254,-.00835246,.205877,.00187275,.0444832,-.0102992,.20627,.00235938,.0447001,-.0124449,.206796,.0029299,.0450168,-.0147935,.207593,.0036005,.0454816,-.017336,.208819,.00439246,.0462446,-.0201156,.211036,.00533864,.0473694,-.0231568,.214388,.00646984,.0490191,-.0264941,.219357,.00783856,.0512776,-.030184,.226061,.00950182,.0541279,-.0342661,.234094,.0115156,.0578989,-.0388539,.244297,.0139687,.0620835,-.0438735,.254457,.0169015,.0673497,-.04951,.266706,.0204554,.0731759,-.0556263,.278753,.0246606,.0803937,-.0624585,.29309,.0297126,.0879287,-.0697556,.305856,.0355868,.0970669,-.0778795,.321059,.0425768,.106508,-.0863541,.333873,.05056,.11776,-.0955935,.349008,.0598972,.130081,-.105438,.363776,.0706314,.144454,-.115899,.380112,.0828822,.1596,-.126827,.394843,.0967611,.176097,-.138161,.409033,.112381,.194726,-.149904,.424257,.129952,.213944,-.161675,.436945,.149333,.235516,-.173659,.450176,.170892,.260564,-.185963,.466305,.194984,.285183,-.197582,.477328,.220805,.311095,-.208697,.486566,.248694,.338924,-.219519,.494811,.279015,.369757,-.229766,.504065,.311725,.3996,-.238879,.507909,.345844,.430484,-.246802,.509805,.381749,.46413,-.253924,.511436,.420251,.497077,-.259319,.508787,.459957,.530434,-.263297,.50394,.501356,.565725,-.265619,.49804,.544252,.599254,-.265842,.487346,.587856,.631251,-.263978,.472975,.631969,.663972,-.26043,.457135,.677471,.697724,-.255358,.439844,.723744,.727725,-.248308,.417872,.770653,.756417,-.239181,.39273,.817357,.785419,-.22814,.367839,.864221,.81266,-.215681,.339449,.912701,.839391,-.201623,.309279,.962419,.86366,-.185624,.278029,1.0122,.885028,-.16797,.245294,1.06186,.904639,-.148336,.212689,1.10934,.922048,-.12637,.179616,1.15063,.936952,-.102928,.146749,1.18885,.951895,-.0785268,.112733,1.22352,.967198,-.0530153,.0760056,1.25681,.984405,-.02649,.0383183,1.28762,1.00021,70019e-8,-20039e-8,1.31656,.0325964,-355447e-11,.176706,655682e-12,.0329333,-899174e-10,.178527,165869e-10,.0329181,-359637e-9,.178453,663498e-10,.0329085,-808991e-9,.178383,149332e-9,.0329181,-.00143826,.178394,265873e-9,.0329425,-.00224678,.178517,416597e-9,.0329511,-.00323575,.17849,603299e-9,.033011,-.00439875,.178695,829422e-9,.0330733,-.00574059,.178843,.00109908,.0331857,-.00725896,.179176,.00141933,.0333445,-.00895289,.179618,.0017999,.0335674,-.0108219,.180238,.00225316,.033939,-.0128687,.181417,.00279765,.0345239,-.015114,.183395,.0034564,.0354458,-.017596,.186616,.00425864,.0368313,-.0203524,.191547,.00524936,.0386115,-.0234105,.197508,.00647033,.0410303,-.0268509,.205395,.00798121,.0442245,-.0307481,.215365,.0098557,.0478659,-.0350863,.225595,.0121417,.0522416,-.0399506,.236946,.0149385,.0574513,-.045357,.249442,.0183189,.0631208,-.0512863,.261222,.0223644,.0701124,-.0579273,.275418,.0272418,.0777331,-.0650652,.288989,.0329458,.0862709,-.0728813,.302546,.0396819,.096103,-.081363,.317164,.04757,.106976,-.0904463,.331733,.0567012,.119175,-.100105,.34661,.067202,.132919,-.110375,.362249,.0792588,.147727,-.121115,.376978,.0928672,.163618,-.132299,.390681,.108228,.182234,-.143887,.406571,.125502,.201809,-.155827,.42042,.144836,.225041,-.168357,.438411,.166706,.247621,-.18004,.450368,.189909,.27097,-.191536,.460083,.215251,.296658,-.203024,.469765,.243164,.325892,-.214056,.481837,.273388,.35406,-.224104,.487474,.305344,.384372,-.233489,.492773,.339741,.41749,-.241874,.498451,.376287,.45013,-.248834,.499632,.414195,.481285,-.254658,.495233,.454077,.519183,-.259367,.496401,.496352,.551544,-.261818,.487686,.538798,.587349,-.262964,.479453,.583626,.621679,-.262128,.467709,.629451,.654991,-.258998,.452123,.67566,.686873,-.254119,.433495,.723248,.719801,-.246946,.413657,.771156,.750355,-.237709,.390366,.81989,.780033,-.226549,.364947,.868601,.809254,-.214186,.337256,.920034,.836576,-.199639,.307395,.971706,.861774,-.183169,.275431,1.02479,.885707,-.165111,.243431,1.07837,.904742,-.144363,.210921,1.12783,.915604,-.121305,.17647,1.17254,.930959,-.0962119,.143106,1.21012,.948404,-.069969,.108112,1.24474,.967012,-.0427586,.0708478,1.27718,.984183,-.0147043,.032335,1.3083,.999577,.0142165,-.00726867,1.3382,.0229227,-299799e-11,.148623,462391e-12,.0232194,-758796e-10,.15054,117033e-10,.0232315,-303636e-9,.15063,468397e-10,.0232354,-683189e-9,.150624,105472e-9,.0232092,-.0012136,.150445,187744e-9,.0232523,-.00189765,.150679,294847e-9,.0232828,-.00273247,.150789,428013e-9,.0233371,-.00371287,.150995,591134e-9,.0234015,-.00484794,.15118,787642e-9,.023514,-.00612877,.151562,.00102547,.023679,-.00756125,.152116,.00131351,.0239559,-.00914651,.153162,.00166594,.0244334,-.010904,.155133,.00210182,.025139,-.0128615,.158035,.00264406,.0262598,-.0150628,.162751,.00332923,.0277875,-.0175532,.168944,.00419773,.0298472,-.0203981,.176835,.00530034,.0325444,-.023655,.186686,.00669777,.0355581,-.0272982,.196248,.00842661,.0392841,-.0314457,.207352,.0105854,.0436815,-.0361157,.219279,.0132458,.0485272,-.0412932,.230728,.0164736,.0541574,-.0470337,.242994,.0203715,.0609479,-.0535002,.257042,.0250953,.0685228,-.0605409,.27102,.0306856,.0768042,-.0680553,.28406,.037193,.0864844,-.0765011,.299186,.0449795,.0969415,-.0852674,.3132,.0538316,.108478,-.0947333,.327138,.0641149,.121705,-.10481,.342345,.0759185,.136743,-.115474,.358472,.0894116,.152986,-.126536,.374067,.104562,.170397,-.138061,.388267,.121632,.191392,-.150203,.406467,.140996,.211566,-.161751,.418641,.161696,.233567,-.173407,.430418,.184557,.257769,-.185397,.44277,.210092,.28531,-.197048,.457191,.237827,.311726,-.20784,.464712,.267253,.340537,-.218345,.472539,.299332,.372921,-.228306,.482331,.333988,.402924,-.236665,.484378,.369722,.434475,-.244097,.484717,.407836,.469736,-.250547,.487093,.448465,.505045,-.25511,.485575,.490263,.540262,-.258444,.481225,.534495,.576347,-.259903,.473481,.579451,.608656,-.259572,.4603,.625604,.646679,-.257908,.450341,.674511,.679902,-.253663,.431561,.723269,.714159,-.247419,.412684,.773263,.745345,-.239122,.389388,.824182,.778248,-.228837,.365361,.876634,.807208,-.216197,.337667,.92945,.835019,-.201772,.307197,.985261,.860261,-.185291,.274205,1.04299,.877601,-.165809,.240178,1.09816,.898211,-.143897,.207571,1.14694,.915789,-.119513,.174904,1.19008,.931831,-.0932919,.141423,1.2297,.949244,-.0656528,.105603,1.26553,.967527,-.0370262,.0679551,1.29986,.984139,-.00730117,.0283133,1.33252,.999713,.0234648,-.0121785,1.36397,.0152135,-245447e-11,.122795,304092e-12,.0151652,-615778e-10,.122399,76292e-10,.0151181,-245948e-9,.122023,304802e-10,.0151203,-553394e-9,.12203,686634e-10,.015125,-983841e-9,.122037,122463e-9,.0151427,-.00153774,.12214,192706e-9,.0151708,-.0022103,.122237,281219e-9,.0152115,-.00300741,.12238,390804e-9,.0152877,-.00392494,.1227,526317e-9,.015412,-.00496597,.123244,69443e-8,.0156201,-.00613314,.124228,90547e-8,.0159658,-.00744113,.125945,.0011732,.0165674,-.00892546,.129098,.00151888,.017487,-.010627,.133865,.00197007,.018839,-.0126043,.140682,.0025637,.020554,-.0148814,.148534,.00333637,.0226727,-.0175123,.157381,.00433738,.0251879,-.0205266,.166685,.00561664,.0283635,-.0240319,.177796,.00725563,.0318694,-.0279432,.188251,.00928811,.0361044,-.0324313,.200038,.011835,.0406656,-.0373527,.210685,.0149146,.0463846,-.0430132,.224182,.0187254,.0525696,-.0491013,.23634,.0232283,.0598083,-.0559175,.250013,.0286521,.0679437,-.0633657,.263981,.0350634,.0771181,-.0714602,.278072,.0425882,.0881273,-.0803502,.29511,.0514487,.0996628,-.0896903,.309976,.0615766,.112702,-.099644,.325611,.0732139,.126488,-.109829,.339321,.0862324,.142625,-.120859,.35574,.101275,.15953,-.131956,.369845,.117892,.176991,-.143145,.38146,.136205,.199715,-.155292,.40052,.157252,.220787,-.167066,.412055,.179966,.243697,-.178396,.423133,.204418,.272106,-.190433,.439524,.232141,.297637,-.201265,.447041,.261109,.325273,-.211834,.454488,.292627,.357219,-.221889,.465004,.326669,.387362,-.230729,.468527,.362426,.423131,-.23924,.475836,.401533,.45543,-.246067,.475017,.441902,.493393,-.251557,.478017,.484239,.526253,-.255571,.4709,.528586,.560554,-.257752,.463167,.574346,.599306,-.258076,.456452,.621655,.634541,-.256471,.443725,.670492,.668907,-.253283,.428719,.721943,.705619,-.247562,.411348,.772477,.739034,-.240626,.388939,.8264,.771408,-.231493,.36425,.881702,.803312,-.220125,.337321,.9385,.828457,-.206645,.305364,.997437,.854819,-.190664,.273715,1.05693,.878666,-.171429,.242218,1.11251,.898404,-.149235,.209556,1.16398,.917416,-.12435,.176863,1.21014,.933133,-.0972703,.142775,1.25178,.95066,-.0683607,.106735,1.29028,.968589,-.0378724,.0681609,1.32703,.984776,-.00605712,.0273966,1.36158,.99994,.0263276,-.0138124,1.3943,.00867437,-186005e-11,.0928979,173682e-12,.00864003,-466389e-10,.0925237,435505e-11,.00864593,-186594e-9,.0925806,174322e-10,.00864095,-419639e-9,.0924903,392862e-10,.00863851,-746272e-9,.0924589,702598e-10,.00868531,-.00116456,.0929,111188e-9,.00869667,-.00167711,.0928529,163867e-9,.00874332,-.00228051,.0930914,23104e-8,.00882709,-.00297864,.0935679,31741e-8,.00898874,-.00377557,.0946165,430186e-9,.00929346,-.00469247,.0967406,580383e-9,.00978271,-.00575491,.100084,783529e-9,.0105746,-.00701514,.105447,.00106304,.0116949,-.00851797,.112494,.00144685,.0130419,-.0102757,.119876,.00196439,.0148375,-.012381,.129034,.00266433,.0168725,-.01482,.137812,.00358364,.0193689,-.0176563,.147696,.00478132,.0222691,-.0209211,.157795,.00631721,.0256891,-.0246655,.168431,.00826346,.0294686,-.0288597,.178587,.0106714,.0340412,-.0336441,.190251,.0136629,.0393918,-.039033,.202999,.0173272,.0453947,-.0450087,.215655,.0217448,.0521936,-.0515461,.228686,.0269941,.0600279,-.058817,.242838,.033272,.0692398,-.0667228,.258145,.0406457,.0793832,-.0752401,.273565,.0492239,.0902297,-.0841851,.287735,.0590105,.102014,-.0936479,.301161,.0702021,.116054,-.103967,.317438,.0832001,.13191,-.114622,.334166,.0977951,.148239,-.125452,.348192,.113985,.165809,-.136453,.361094,.131928,.184616,-.147648,.373534,.151811,.207491,-.159607,.39101,.174476,.230106,-.171119,.402504,.198798,.257036,-.182906,.418032,.225796,.281172,-.193605,.425468,.254027,.312034,-.204771,.440379,.285713,.340402,-.214988,.445406,.319196,.370231,-.224711,.44968,.35537,.407105,-.233516,.460747,.393838,.439037,-.240801,.460624,.433747,.47781,-.24762,.465957,.477234,.510655,-.251823,.460054,.52044,.550584,-.255552,.459172,.567853,.585872,-.257036,.450311,.615943,.620466,-.257535,.437763,.667693,.660496,-.255248,.426639,.718988,.695578,-.251141,.409185,.772503,.732176,-.244718,.39015,.827023,.760782,-.236782,.362594,.885651,.79422,-.225923,.33711,.943756,.824521,-.213855,.308272,1.00874,.854964,-.197723,.278529,1.06764,.878065,-.179209,.246208,1.12836,.899834,-.157569,.21329,1.18318,.918815,-.133206,.181038,1.23161,.934934,-.106545,.146993,1.27644,.952115,-.0780574,.111175,1.31842,.96906,-.0478279,.0728553,1.35839,.985178,-.0160014,.032579,1.39697,1.00039,.0173126,-.0095256,1.43312,.00384146,-124311e-11,.0613583,778271e-13,.00390023,-314043e-10,.0622919,196626e-11,.00389971,-125622e-9,.0622632,787379e-11,.00389491,-282352e-9,.0620659,1778e-8,.00391618,-502512e-9,.0624687,320918e-10,.00392662,-784458e-9,.0625113,515573e-10,.00396053,-.00112907,.0628175,778668e-10,.00401911,-.00153821,.0633286,113811e-9,.00414994,-.0020208,.0646443,16445e-8,.00441223,-.00260007,.0673886,237734e-9,.00484427,-.0033097,.0716528,345929e-9,.00549109,-.00418966,.0774998,505987e-9,.00636293,-.00527331,.0844758,739208e-9,.00746566,-.00660428,.0921325,.00107347,.00876625,-.00818826,.0997067,.00153691,.0103125,-.0100811,.107433,.00217153,.0123309,-.0123643,.117088,.00303427,.0146274,-.0150007,.126438,.00416018,.0172295,-.0180531,.135672,.00561513,.0204248,-.0215962,.146244,.007478,.0241597,-.0256234,.157481,.00981046,.0284693,-.0302209,.169125,.0127148,.033445,-.0353333,.181659,.0162453,.0391251,-.0410845,.1944,.0205417,.0454721,-.0473451,.207082,.0256333,.0530983,-.0542858,.221656,.0317036,.0615356,-.0618384,.236036,.0388319,.0703363,-.0697631,.248398,.046974,.0810391,-.0784757,.263611,.0565246,.0920144,-.0873488,.275857,.0671724,.105584,-.0973652,.292555,.0798105,.119506,-.107271,.306333,.0935945,.134434,-.117608,.318888,.109106,.153399,-.128938,.337552,.127074,.171258,-.139944,.349955,.14643,.191059,-.151288,.361545,.168,.215069,-.163018,.378421,.192082,.237838,-.174226,.38879,.217838,.266965,-.186063,.405857,.246931,.292827,-.196909,.414146,.277505,.324352,-.207473,.426955,.310711,.354427,-.217713,.433429,.346794,.389854,-.227183,.443966,.385237,.420749,-.235131,.44471,.424955,.459597,-.242786,.451729,.468446,.495316,-.248767,.45072,.513422,.534903,-.253351,.450924,.560618,.572369,-.256277,.445266,.609677,.612383,-.2576,.438798,.660995,.644037,-.256931,.421693,.713807,.686749,-.254036,.4109,.767616,.719814,-.249785,.390151,.82533,.754719,-.244283,.367847,.888311,.792022,-.235076,.345013,.948177,.822404,-.225061,.316193,1.01661,.853084,-.211113,.287013,1.08075,.879871,-.19449,.255424,1.14501,.901655,-.174023,.222879,1.20203,.919957,-.1509,.18989,1.25698,.938412,-.124923,.15606,1.30588,.953471,-.0968139,.120512,1.3529,.970451,-.066734,.0828515,1.3986,.985522,-.034734,.0424458,1.44148,1.00099,-.00102222,678929e-9,1.48398,965494e-9,-627338e-12,.0306409,197672e-13,99168e-8,-158573e-10,.0314638,499803e-12,991068e-9,-634012e-10,.031363,200682e-11,974567e-9,-14144e-8,.03036,457312e-11,998079e-9,-252812e-9,.031496,860131e-11,.00102243,-396506e-9,.0319955,148288e-10,.00107877,-577593e-9,.0331376,249141e-10,.00121622,-816816e-9,.0359396,423011e-10,.0014455,-.00113761,.0399652,724613e-10,.00178791,-.00156959,.0450556,123929e-9,.00225668,-.00214064,.0508025,208531e-9,.00285627,-.00287655,.0568443,341969e-9,.0035991,-.00380271,.0630892,544158e-9,.00455524,-.00496264,.0702204,842423e-9,.00569143,-.0063793,.0773426,.00126704,.00716928,-.00813531,.0860839,.00186642,.00885307,-.0101946,.0944079,.00267014,.0109316,-.0126386,.103951,.00374033,.0133704,-.0154876,.113786,.0051304,.0161525,-.0187317,.123477,.00688858,.0194267,-.0224652,.133986,.00910557,.0230967,-.0265976,.143979,.0118074,.0273627,-.0312848,.154645,.0151266,.0323898,-.0365949,.166765,.0191791,.0379225,-.0422914,.177932,.0239236,.0447501,-.0487469,.19167,.0296568,.0519391,-.0556398,.203224,.0362924,.0599464,-.0631646,.215652,.0440585,.0702427,-.0714308,.232089,.0531619,.0806902,-.0800605,.245258,.0634564,.0923194,-.0892815,.258609,.0752481,.106938,-.09931,.276654,.0888914,.121238,-.109575,.289847,.104055,.138817,-.120461,.307566,.121266,.15595,-.131209,.320117,.139944,.178418,-.143049,.339677,.161591,.197875,-.154074,.349886,.184303,.224368,-.166307,.369352,.210669,.252213,-.178051,.386242,.238895,.277321,-.189335,.395294,.269182,.310332,-.200683,.412148,.302508,.338809,-.210856,.418266,.337264,.372678,-.220655,.428723,.374881,.405632,-.230053,.433887,.415656,.442293,-.237993,.439911,.457982,.477256,-.244897,.440175,.502831,.515592,-.250657,.441079,.550277,.550969,-.255459,.435219,.601102,.592883,-.257696,.432882,.651785,.629092,-.259894,.421054,.708961,.672033,-.258592,.41177,.763806,.709147,-.256525,.395267,.824249,.745367,-.254677,.375013,.8951,.784715,-.247892,.353906,.959317,.818107,-.240162,.327801,1.03153,.847895,-.229741,.298821,1.10601,.879603,-.213084,.269115,1.164,.902605,-.195242,.236606,1.22854,.922788,-.174505,.203442,1.29017,.944831,-.150169,.169594,1.34157,.959656,-.124099,.135909,1.3956,.972399,-.0960626,.0990563,1.45128,.986549,-.0657097,.0602348,1.50312,1.00013,-.0333558,.0186694,1.55364,619747e-11,-1e-7,.00778326,796756e-16,237499e-13,-999999e-13,282592e-10,114596e-15,100292e-11,-166369e-11,250354e-9,677492e-14,350752e-11,-637769e-11,357289e-9,631655e-13,826445e-11,-174689e-10,516179e-9,31851e-11,242481e-10,-450868e-10,.0010223,130577e-11,455631e-10,-89044e-9,.00144302,374587e-11,971222e-10,-178311e-9,.00241912,102584e-10,171403e-9,-313976e-9,.00354938,236481e-10,292747e-9,-520026e-9,.00513765,496014e-10,789827e-9,-.00118187,.0238621,139056e-9,.00114093,-.00171827,.0286691,244093e-9,.00176119,-.00249667,.0368565,420623e-9,.0022233,-.00333742,.0400469,65673e-8,.00343382,-.00481976,.0535751,.00109323,.00427602,-.00600755,.057099,.00155268,.00461435,-.00737637,.0551084,.00215031,.00695698,-.00971401,.0715767,.00316529,.00867619,-.0120943,.0793314,.00436995,.0106694,-.0148202,.0869391,.0058959,.0140351,-.0183501,.101572,.00798757,.0168939,-.022006,.11018,.0104233,.020197,-.0261568,.119041,.0134167,.0254702,-.0312778,.135404,.0173009,.0298384,-.0362469,.1437,.0215428,.035159,-.042237,.15512,.0268882,.0427685,-.0488711,.17128,.033235,.0494848,-.0557997,.181813,.0404443,.0592394,-.0635578,.198745,.0490043,.0681463,-.071838,.210497,.0588239,.0804753,-.0809297,.228864,.0702835,.0942205,-.0906488,.247008,.0834012,.106777,-.100216,.258812,.0975952,.124471,-.110827,.278617,.114162,.138389,-.121193,.287049,.131983,.159543,-.13253,.307151,.152541,.176432,-.143611,.31564,.174673,.201723,-.15548,.33538,.199842,.229721,-.167166,.355256,.227097,.250206,-.178238,.360047,.256014,.282118,-.189905,.378761,.28855,.312821,-.201033,.39181,.323348,.341482,-.211584,.397716,.360564,.377368,-.221314,.410141,.400004,.418229,-.230474,.423485,.442371,.444881,-.239443,.418874,.488796,.488899,-.245987,.427545,.535012,.520317,-.253948,.422147,.589678,.568566,-.256616,.42719,.637683,.599607,-.26376,.415114,.703363,.64222,-.268687,.408715,.771363,.685698,-.2694,.399722,.83574,.732327,-.266642,.388651,.897764,.769873,-.267712,.369198,.983312,.806733,-.263479,.346802,1.06222,.843466,-.254575,.321368,1.13477,.873008,-.242749,.29211,1.20712,.908438,-.22725,.262143,1.27465,.936321,-.207621,.228876,1.33203,.950353,-.187932,.19484,1.40439,.96442,-.165154,.163178,1.4732,.979856,-.139302,.127531,1.53574,.982561,-.11134,.0903457,1.59982,.996389,-.0808124,.0489007,1.6577],r=[1,0,0,0,1,791421e-36,0,0,1,104392e-29,0,0,1,349405e-26,0,0,1,109923e-23,0,0,1,947414e-22,0,0,1,359627e-20,0,0,1,772053e-19,0,0,1,108799e-17,0,0,1,110655e-16,0,0,1,865818e-16,0,0,.999998,545037e-15,0,0,.999994,285095e-14,0,0,.999989,126931e-13,0,0,.999973,489938e-13,0,0,.999947,166347e-12,0,0,.999894,502694e-12,0,0,.999798,136532e-11,0,0,.999617,335898e-11,0,0,.999234,752126e-11,0,0,.998258,152586e-10,0,0,.99504,266207e-10,0,0,.980816,236802e-10,0,0,.967553,207684e-11,0,0,.966877,403733e-11,0,0,.965752,741174e-11,0,0,.96382,127746e-10,0,0,.960306,202792e-10,0,0,.953619,280232e-10,0,0,.941103,278816e-10,0,0,.926619,160221e-10,0,0,.920983,235164e-10,0,0,.912293,311924e-10,0,.0158731,.899277,348118e-10,0,.0476191,.880884,26041e-9,0,.0793651,.870399,338726e-10,0,.111111,.856138,392906e-10,0,.142857,.837436,372874e-10,0,.174603,.820973,392558e-10,0,.206349,.803583,434658e-10,0,.238095,.782168,40256e-9,0,.269841,.764107,448159e-10,0,.301587,.743092,457627e-10,0,.333333,.721626,455314e-10,0,.365079,.700375,477335e-10,0,.396825,.677334,461072e-10,0,.428571,.655702,484393e-10,0,.460317,.632059,464583e-10,0,.492064,.610125,483923e-10,0,.52381,.58653,464342e-10,0,.555556,.564508,477033e-10,0,.587302,.541405,459263e-10,0,.619048,.519556,46412e-9,0,.650794,.497292,448913e-10,0,.68254,.475898,445789e-10,0,.714286,.454722,433496e-10,0,.746032,.434042,423054e-10,0,.777778,.414126,413737e-10,0,.809524,.394387,397265e-10,0,.84127,.375841,390709e-10,0,.873016,.357219,369938e-10,0,.904762,.340084,365618e-10,0,.936508,.322714,342533e-10,0,.968254,.306974,339596e-10,0,1,1,101524e-23,0,0,1,10292e-22,0,0,1,130908e-23,0,0,1,473331e-23,0,0,1,625319e-22,0,0,1,107932e-20,0,0,1,163779e-19,0,0,1,203198e-18,0,0,1,204717e-17,0,0,.999999,168995e-16,0,0,.999998,115855e-15,0,0,.999996,66947e-14,0,0,.999991,330863e-14,0,0,.999983,141737e-13,0,0,.999968,532626e-13,0,0,.99994,177431e-12,0,0,.999891,528835e-12,0,0,.999797,142169e-11,0,0,.999617,347057e-11,0,0,.999227,77231e-10,0,0,.998239,155753e-10,0,0,.994937,268495e-10,0,0,.980225,213742e-10,0,0,.967549,21631e-10,0,0,.966865,417989e-11,0,0,.965739,763341e-11,0,0,.963794,130892e-10,0,0,.960244,206456e-10,0,0,.953495,282016e-10,0,148105e-9,.940876,271581e-10,0,.002454,.926569,164159e-10,0,.00867491,.920905,239521e-10,0,.01956,.912169,315127e-10,0,.035433,.899095,346626e-10,0,.056294,.882209,290223e-10,0,.0818191,.870272,342992e-10,0,.111259,.855977,394164e-10,0,.142857,.837431,372343e-10,0,.174603,.820826,396691e-10,0,.206349,.803408,435395e-10,0,.238095,.782838,419579e-10,0,.269841,.763941,450953e-10,0,.301587,.742904,455847e-10,0,.333333,.721463,458833e-10,0,.365079,.700197,477159e-10,0,.396825,.677501,470641e-10,0,.428571,.655527,484732e-10,0,.460317,.6324,476834e-10,0,.492064,.609964,484213e-10,0,.52381,.586839,475541e-10,0,.555556,.564353,476951e-10,0,.587302,.541589,467611e-10,0,.619048,.519413,463493e-10,0,.650794,.497337,453994e-10,0,.68254,.475797,445308e-10,0,.714286,.454659,435787e-10,0,.746032,.434065,424839e-10,0,.777778,.414018,41436e-9,0,.809524,.39455,401902e-10,0,.84127,.375742,390813e-10,0,.873016,.357501,377116e-10,0,.904762,.339996,36535e-9,0,.936508,.323069,351265e-10,0,.968254,.306897,339112e-10,0,1,1,10396e-19,0,0,1,104326e-20,0,0,1,110153e-20,0,0,1,144668e-20,0,0,1,34528e-19,0,0,1,175958e-19,0,0,1,12627e-17,0,0,1,936074e-18,0,0,1,645742e-17,0,0,.999998,401228e-16,0,0,.999997,222338e-15,0,0,.999995,10967e-13,0,0,.999991,482132e-14,0,0,.999981,189434e-13,0,0,.999967,667716e-13,0,0,.999938,212066e-12,0,0,.999886,60977e-11,0,0,.999792,159504e-11,0,0,.999608,381191e-11,0,0,.999209,833727e-11,0,0,.998179,165288e-10,0,0,.994605,274387e-10,0,0,.979468,167316e-10,0,0,.967529,242877e-11,0,0,.966836,461696e-11,0,0,.96569,830977e-11,0,0,.963706,140427e-10,0,244659e-11,.960063,217353e-10,0,760774e-9,.953113,286606e-10,0,.00367261,.940192,247691e-10,0,.00940263,.927731,195814e-10,0,.018333,.920669,252531e-10,0,.0306825,.911799,324277e-10,0,.0465556,.89857,340982e-10,0,.0659521,.883283,319622e-10,0,.0887677,.86989,35548e-9,0,.114784,.855483,397143e-10,0,.143618,.837987,391665e-10,0,.174606,.820546,411306e-10,0,.206349,.802878,436753e-10,0,.238095,.783402,444e-7,0,.269841,.763439,458726e-10,0,.301587,.742925,467097e-10,0,.333333,.721633,478887e-10,0,.365079,.69985,481251e-10,0,.396825,.67783,491811e-10,0,.428571,.655126,488199e-10,0,.460318,.632697,496025e-10,0,.492064,.609613,48829e-9,0,.52381,.587098,492754e-10,0,.555556,.564119,482625e-10,0,.587302,.541813,482807e-10,0,.619048,.519342,471552e-10,0,.650794,.497514,466765e-10,0,.68254,.475879,455582e-10,0,.714286,.454789,446007e-10,0,.746032,.434217,435382e-10,0,.777778,.414086,421753e-10,0,.809524,.394744,412093e-10,0,.84127,.375782,396634e-10,0,.873016,.357707,386419e-10,0,.904762,.340038,370345e-10,0,.936508,.323284,359725e-10,0,.968254,.306954,3436e-8,0,1,1,599567e-19,0,0,1,600497e-19,0,0,1,614839e-19,0,0,1,686641e-19,0,0,1,972658e-19,0,0,1,221271e-18,0,0,1,833195e-18,0,0,1,403601e-17,0,0,.999999,206001e-16,0,0,.999998,101739e-15,0,0,.999997,470132e-15,0,0,.999993,200436e-14,0,0,.999988,783682e-14,0,0,.999979,280338e-13,0,0,.999962,917033e-13,0,0,.999933,274514e-12,0,0,.999881,753201e-12,0,0,.999783,189826e-11,0,0,.999594,440279e-11,0,0,.999178,93898e-10,0,0,.998073,181265e-10,0,0,.993993,280487e-10,0,0,.979982,149422e-10,0,0,.968145,378481e-11,0,0,.966786,53771e-10,0,0,.965611,947508e-11,0,388934e-10,.963557,156616e-10,0,9693e-7,.959752,235144e-10,0,.00370329,.952461,291568e-10,0,.00868428,.940193,240102e-10,0,.0161889,.929042,231235e-10,0,.0263948,.920266,273968e-10,0,.0394088,.911178,337915e-10,0,.0552818,.897873,333629e-10,0,.0740138,.884053,351405e-10,0,.0955539,.869455,378034e-10,0,.119795,.854655,399378e-10,0,.14656,.838347,419108e-10,0,.175573,.820693,440831e-10,0,.206388,.802277,445599e-10,0,.238095,.783634,472691e-10,0,.269841,.763159,476984e-10,0,.301587,.742914,491487e-10,0,.333333,.721662,502312e-10,0,.365079,.699668,502817e-10,0,.396825,.677839,51406e-9,0,.428571,.655091,511095e-10,0,.460317,.632665,516067e-10,0,.492064,.609734,512255e-10,0,.52381,.587043,510263e-10,0,.555556,.564298,50565e-9,0,.587302,.541769,497951e-10,0,.619048,.519529,492698e-10,0,.650794,.497574,482066e-10,0,.68254,.476028,473689e-10,0,.714286,.454961,461941e-10,0,.746032,.434341,450618e-10,0,.777778,.414364,438355e-10,0,.809524,.394832,424196e-10,0,.84127,.376109,412563e-10,0,.873016,.35779,396226e-10,0,.904762,.340379,384886e-10,0,.936508,.323385,368214e-10,0,.968254,.307295,356636e-10,0,1,1,106465e-17,0,0,1,106555e-17,0,0,1,107966e-17,0,0,1,114601e-17,0,0,1,137123e-17,0,0,1,21243e-16,0,0,.999999,489653e-17,0,0,.999999,160283e-16,0,0,.999998,62269e-15,0,0,.999997,251859e-15,0,0,.999996,996192e-15,0,0,.999992,374531e-14,0,0,.999986,132022e-13,0,0,.999975,433315e-13,0,0,.999959,131956e-12,0,0,.999927,372249e-12,0,0,.999871,972461e-12,0,0,.999771,235343e-11,0,0,.999572,52768e-10,0,0,.999133,109237e-10,0,0,.997912,203675e-10,0,0,.993008,279396e-10,0,0,.980645,139604e-10,0,0,.970057,646596e-11,0,0,.966717,65089e-10,0,474145e-10,.965497,111863e-10,0,89544e-8,.96334,179857e-10,0,.0032647,.959294,259045e-10,0,.0075144,.951519,292327e-10,0,.0138734,.940517,249769e-10,0,.0224952,.93014,26803e-9,0,.0334828,.91972,303656e-10,0,.0468973,.910294,353323e-10,0,.0627703,.897701,351002e-10,0,.0811019,.884522,388104e-10,0,.10186,.869489,412932e-10,0,.124985,.853983,415781e-10,0,.150372,.838425,454066e-10,0,.177868,.820656,471624e-10,0,.207245,.801875,475243e-10,0,.238143,.783521,505621e-10,0,.269841,.763131,50721e-9,0,.301587,.74261,523293e-10,0,.333333,.72148,528699e-10,0,.365079,.699696,538677e-10,0,.396825,.677592,539255e-10,0,.428571,.65525,546367e-10,0,.460317,.632452,541348e-10,0,.492064,.609903,544976e-10,0,.52381,.586928,536201e-10,0,.555556,.564464,535185e-10,0,.587302,.541801,524949e-10,0,.619048,.519681,51812e-9,0,.650794,.497685,507687e-10,0,.68254,.47622,496243e-10,0,.714286,.455135,485714e-10,0,.746032,.4346,471847e-10,0,.777778,.414564,459294e-10,0,.809524,.395165,444705e-10,0,.84127,.376333,430772e-10,0,.873016,.358197,416229e-10,0,.904762,.34064,401019e-10,0,.936508,.323816,386623e-10,0,.968254,.307581,370933e-10,0,1,1,991541e-17,0,0,1,992077e-17,0,0,1,100041e-16,0,0,1,10385e-15,0,0,1,115777e-16,0,0,1,150215e-16,0,0,.999999,254738e-16,0,0,.999999,598822e-16,0,0,.999998,179597e-15,0,0,.999997,602367e-15,0,0,.999994,206835e-14,0,0,.99999,694952e-14,0,0,.999984,223363e-13,0,0,.999972,678578e-13,0,0,.999952,193571e-12,0,0,.999919,516594e-12,0,0,.99986,128739e-11,0,0,.999753,299298e-11,0,0,.999546,648258e-11,0,0,.999074,129985e-10,0,0,.997671,232176e-10,0,0,.991504,256701e-10,0,0,.981148,131141e-10,0,0,.971965,869048e-11,0,280182e-10,.966624,808301e-11,0,695475e-9,.965344,135235e-10,0,.00265522,.963048,210592e-10,0,.00622975,.958673,287473e-10,0,.0116234,.950262,281379e-10,0,.018976,.940836,271089e-10,0,.0283844,.930996,30926e-9,0,.0399151,.919848,348359e-10,0,.0536063,.909136,366092e-10,0,.0694793,.897554,384162e-10,0,.0875342,.884691,430971e-10,0,.107749,.869414,447803e-10,0,.130087,.853462,452858e-10,0,.154481,.838187,495769e-10,0,.180833,.820381,502709e-10,0,.209005,.801844,522713e-10,0,.238791,.783061,541505e-10,0,.269869,.763205,553712e-10,0,.301587,.742362,564909e-10,0,.333333,.721393,572646e-10,0,.365079,.699676,581012e-10,0,.396825,.677395,58096e-9,0,.428571,.655208,585766e-10,0,.460317,.632451,583602e-10,0,.492064,.609839,580234e-10,0,.52381,.587093,577161e-10,0,.555556,.564467,568447e-10,0,.587302,.542043,563166e-10,0,.619048,.519826,55156e-9,0,.650794,.497952,541682e-10,0,.68254,.476477,528971e-10,0,.714286,.455412,514952e-10,0,.746032,.434926,502222e-10,0,.777778,.4149,485779e-10,0,.809524,.395552,472242e-10,0,.84127,.376712,454891e-10,0,.873016,.358622,440924e-10,0,.904762,.341048,422984e-10,0,.936508,.324262,408582e-10,0,.968254,.308013,390839e-10,0,1,1,613913e-16,0,0,1,614145e-16,0,0,1,617708e-16,0,0,1,633717e-16,0,0,1,681648e-16,0,0,1,808291e-16,0,0,1,114608e-15,0,0,.999998,210507e-15,0,0,.999997,499595e-15,0,0,.999995,139897e-14,0,0,.999994,419818e-14,0,0,.999988,127042e-13,0,0,.999979,375153e-13,0,0,.999965,106206e-12,0,0,.999945,285381e-12,0,0,.999908,723611e-12,0,0,.999846,17255e-10,0,0,.999733,386104e-11,0,0,.999511,808493e-11,0,0,.998993,156884e-10,0,0,.997326,265538e-10,0,0,.989706,206466e-10,0,0,.981713,130756e-10,0,70005e-10,.973636,106473e-10,0,464797e-9,.966509,10194e-9,0,.00201743,.965149,165881e-10,0,.00497549,.962669,249147e-10,0,.00953262,.95786,317449e-10,0,.0158211,.949334,281045e-10,0,.0239343,.941041,303263e-10,0,.0339372,.931575,356754e-10,0,.0458738,.920102,397075e-10,0,.059772,.908002,384886e-10,0,.075645,.897269,43027e-9,0,.0934929,.884559,479925e-10,0,.113302,.869161,48246e-9,0,.135045,.853342,509505e-10,0,.158678,.837633,542846e-10,0,.184136,.820252,554139e-10,0,.211325,.801872,581412e-10,0,.240113,.782418,585535e-10,0,.270306,.7631,610923e-10,0,.301594,.742183,613678e-10,0,.333333,.721098,627275e-10,0,.365079,.699512,629413e-10,0,.396825,.677372,636351e-10,0,.428571,.655059,633555e-10,0,.460317,.632567,636513e-10,0,.492064,.609784,628965e-10,0,.52381,.587237,625546e-10,0,.555556,.564525,615825e-10,0,.587302,.542181,605048e-10,0,.619048,.520017,596329e-10,0,.650794,.498204,581516e-10,0,.68254,.476742,569186e-10,0,.714286,.455803,553833e-10,0,.746032,.435251,537807e-10,0,.777778,.415374,522025e-10,0,.809524,.395921,503421e-10,0,.84127,.377253,488211e-10,0,.873016,.359021,468234e-10,0,.904762,.341637,453269e-10,0,.936508,.3247,433014e-10,0,.968254,.308625,418007e-10,0,1,1,286798e-15,0,0,1,286877e-15,0,0,1,288094e-15,0,0,1,293506e-15,0,0,1,309262e-15,0,0,.999999,348593e-15,0,0,.999999,444582e-15,0,0,.999998,688591e-15,0,0,.999996,134391e-14,0,0,.999993,317438e-14,0,0,.999989,835609e-14,0,0,.999983,228677e-13,0,0,.999974,623361e-13,0,0,.999959,165225e-12,0,0,.999936,419983e-12,0,0,.999896,101546e-11,0,0,.99983,232376e-11,0,0,.999709,50156e-10,0,0,.999469,10167e-9,0,0,.998886,190775e-10,0,0,.996819,300511e-10,0,0,.988837,185092e-10,0,168222e-12,.982178,134622e-10,0,259622e-9,.975017,125961e-10,0,.00142595,.967101,13507e-9,0,.00382273,.964905,205003e-10,0,.00764164,.96218,29546e-9,0,.0130121,.956821,343738e-10,0,.0200253,.948829,305063e-10,0,.0287452,.941092,346487e-10,0,.039218,.931883,412061e-10,0,.0514748,.920211,444651e-10,0,.0655351,.907307,431252e-10,0,.0814082,.89684,490382e-10,0,.0990939,.884119,53334e-9,0,.118583,.869148,54114e-9,0,.139856,.853377,578536e-10,0,.162882,.836753,592285e-10,0,.187615,.820063,622787e-10,0,.213991,.801694,645492e-10,0,.241918,.782116,65353e-9,0,.271267,.762673,674344e-10,0,.301847,.742133,682788e-10,0,.333333,.720779,691959e-10,0,.365079,.699386,696817e-10,0,.396826,.67732,699583e-10,0,.428572,.654888,698447e-10,0,.460318,.632499,694063e-10,0,.492064,.609825,691612e-10,0,.52381,.587287,681576e-10,0,.555556,.564743,674138e-10,0,.587302,.542409,661617e-10,0,.619048,.520282,647785e-10,0,.650794,.498506,633836e-10,0,.68254,.477102,615905e-10,0,.714286,.456167,601013e-10,0,.746032,.435728,581457e-10,0,.777778,.415809,564215e-10,0,.809524,.396517,544997e-10,0,.84127,.377737,525061e-10,0,.873016,.359698,506831e-10,0,.904762,.342164,48568e-9,0,.936508,.325417,467826e-10,0,.968254,.309186,446736e-10,0,1,1,109018e-14,0,0,1,10904e-13,0,0,1,109393e-14,0,0,1,11095e-13,0,0,1,1154e-12,0,0,1,126089e-14,0,0,.999999,15059e-13,0,0,.999997,207899e-14,0,0,.999994,348164e-14,0,0,.999993,705728e-14,0,0,.999987,163692e-13,0,0,.999981,406033e-13,0,0,.999969,10245e-11,0,0,.999953,255023e-12,0,0,.999925,61511e-11,0,0,.999881,142218e-11,0,0,.99981,313086e-11,0,0,.99968,653119e-11,0,0,.999418,12832e-9,0,0,.998748,232497e-10,0,0,.996066,329522e-10,0,0,.988379,179613e-10,0,108799e-9,.982567,143715e-10,0,921302e-9,.976097,148096e-10,0,.00280738,.968475,178905e-10,0,.00596622,.964606,253921e-10,0,.0105284,.961564,348623e-10,0,.0165848,.955517,357612e-10,0,.0242,.948381,343493e-10,0,.03342,.941095,405849e-10,0,.0442777,.931923,475394e-10,0,.0567958,.91996,484328e-10,0,.0709879,.907419,502146e-10,0,.086861,.89618,561654e-10,0,.104415,.88337,587612e-10,0,.123643,.869046,618057e-10,0,.144531,.853278,657392e-10,0,.167057,.836091,66303e-9,0,.191188,.819644,704445e-10,0,.216878,.801246,714071e-10,0,.244062,.782031,740093e-10,0,.272649,.762066,74685e-9,0,.302509,.741964,766647e-10,0,.333442,.720554,766328e-10,0,.365079,.699098,777857e-10,0,.396826,.677189,774633e-10,0,.428572,.65484,776235e-10,0,.460318,.632496,770316e-10,0,.492064,.609908,762669e-10,0,.52381,.587312,753972e-10,0,.555556,.564938,739994e-10,0,.587302,.542577,728382e-10,0,.619048,.52062,71112e-9,0,.650794,.498819,694004e-10,0,.68254,.477555,675575e-10,0,.714286,.456568,653449e-10,0,.746032,.436278,636068e-10,0,.777778,.41637,613466e-10,0,.809524,.397144,594177e-10,0,.84127,.378412,570987e-10,0,.873016,.360376,550419e-10,0,.904762,.342906,527422e-10,0,.936508,.326136,506544e-10,0,.968254,.30997,484307e-10,0,1,1,354014e-14,0,0,1,354073e-14,0,0,1,354972e-14,0,0,1,358929e-14,0,0,1,370093e-14,0,0,.999999,396194e-14,0,0,.999998,453352e-14,0,0,.999997,578828e-14,0,0,.999994,863812e-14,0,0,.999991,153622e-13,0,0,.999985,316356e-13,0,0,.999977,712781e-13,0,0,.999964,166725e-12,0,0,.999945,390501e-12,0,0,.999912,895622e-12,0,0,.999866,198428e-11,0,0,.999786,421038e-11,0,0,.999647,850239e-11,0,0,.999356,162059e-10,0,0,.998563,282652e-10,0,0,.994928,336309e-10,0,244244e-10,.987999,178458e-10,0,523891e-9,.982893,159162e-10,0,.00194729,.977044,178056e-10,0,.00451099,.969972,230624e-10,0,.00835132,.964237,313922e-10,0,.013561,.960791,406145e-10,0,.0202056,.954292,372796e-10,0,.0283321,.948052,403199e-10,0,.0379739,.940938,479537e-10,0,.0491551,.931689,545292e-10,0,.0618918,.91987,54038e-9,0,.0761941,.907665,589909e-10,0,.0920672,.895281,642651e-10,0,.109511,.882621,659707e-10,0,.12852,.86873,709973e-10,0,.149085,.853008,742221e-10,0,.171189,.835944,761754e-10,0,.194809,.818949,797052e-10,0,.21991,.800951,812434e-10,0,.246447,.781847,838075e-10,0,.274352,.761649,84501e-9,0,.303535,.74152,860258e-10,0,.333857,.720495,866233e-10,0,.365104,.698742,868326e-10,0,.396826,.677096,87133e-9,0,.428572,.654782,863497e-10,0,.460318,.632335,860206e-10,0,.492064,.610031,849337e-10,0,.52381,.587457,838279e-10,0,.555556,.56513,82309e-9,0,.587302,.542877,803542e-10,0,.619048,.5209,786928e-10,0,.650794,.499291,765171e-10,0,.68254,.477971,744753e-10,0,.714286,.457221,72209e-9,0,.746032,.436803,697448e-10,0,.777778,.417083,675333e-10,0,.809524,.397749,648058e-10,0,.84127,.379177,625759e-10,0,.873016,.361061,598584e-10,0,.904762,.343713,575797e-10,0,.936508,.326894,549999e-10,0,.968254,.310816,527482e-10,0,1,1,10153e-12,0,0,1,101544e-13,0,0,1,101751e-13,0,0,1,102662e-13,0,0,1,10521e-12,0,0,.999999,111049e-13,0,0,.999999,123408e-13,0,0,.999996,14924e-12,0,0,.999992,204471e-13,0,0,.999989,326539e-13,0,0,.99998,603559e-13,0,0,.999971,123936e-12,0,0,.999955,269058e-12,0,0,.999933,593604e-12,0,0,.999901,129633e-11,0,0,.999847,275621e-11,0,0,.999761,564494e-11,0,0,.999607,110485e-10,0,0,.999282,204388e-10,0,0,.99831,341084e-10,0,22038e-11,.993288,294949e-10,0,242388e-9,.987855,192736e-10,0,.0012503,.983167,182383e-10,0,.0032745,.977908,218633e-10,0,.00646321,.971194,290662e-10,0,.0109133,.963867,386401e-10,0,.0166927,.95982,462827e-10,0,.0238494,.953497,420705e-10,0,.0324178,.947621,477743e-10,0,.0424225,.940611,568258e-10,0,.0538808,.931174,618061e-10,0,.0668047,.919919,627098e-10,0,.0812014,.907856,694714e-10,0,.0970745,.894509,735008e-10,0,.114424,.881954,763369e-10,0,.133246,.868309,821896e-10,0,.153534,.852511,83769e-9,0,.175275,.835821,881615e-10,0,.198453,.817981,896368e-10,0,.223042,.800504,930906e-10,0,.249009,.78141,945056e-10,0,.276304,.761427,963605e-10,0,.304862,.74094,968088e-10,0,.334584,.720233,981481e-10,0,.365322,.698592,979122e-10,0,.396826,.676763,981057e-10,0,.428571,.654808,973956e-10,0,.460318,.632326,962619e-10,0,.492064,.610049,952996e-10,0,.52381,.58763,933334e-10,0,.555556,.565261,917573e-10,0,.587302,.543244,896636e-10,0,.619048,.521273,873304e-10,0,.650794,.499818,852648e-10,0,.68254,.478536,823961e-10,0,.714286,.457826,79939e-9,0,.746032,.437549,77126e-9,0,.777778,.41776,743043e-10,0,.809524,.39863,716426e-10,0,.84127,.379954,686456e-10,0,.873016,.362025,660514e-10,0,.904762,.344581,630755e-10,0,.936508,.327909,605439e-10,0,.968254,.311736,576345e-10,0,1,1,263344e-13,0,0,1,263373e-13,0,0,1,263815e-13,0,0,1,265753e-13,0,0,1,271132e-13,0,0,.999999,283279e-13,0,0,.999997,30833e-12,0,0,.999995,358711e-13,0,0,.999992,461266e-13,0,0,.999985,67574e-12,0,0,.999977,11358e-11,0,0,.999966,213657e-12,0,0,.999948,431151e-12,0,0,.999923,896656e-12,0,0,.999884,186603e-11,0,0,.999826,381115e-11,0,0,.999732,754184e-11,0,0,.999561,143192e-10,0,0,.999191,257061e-10,0,0,.997955,405724e-10,0,744132e-10,.992228,276537e-10,0,716477e-9,.987638,208885e-10,0,.0022524,.983395,215226e-10,0,.00484816,.978614,270795e-10,0,.00860962,.972389,365282e-10,0,.0136083,.964392,474747e-10,0,.0198941,.95861,509141e-10,0,.0275023,.952806,48963e-9,0,.0364584,.94712,571119e-10,0,.04678,.940104,671704e-10,0,.0584799,.930398,687586e-10,0,.0715665,.919866,738161e-10,0,.086045,.907853,813235e-10,0,.101918,.894078,834582e-10,0,.119186,.881177,892093e-10,0,.137845,.867575,944548e-10,0,.157891,.852107,969607e-10,0,.179316,.835502,101456e-9,0,.202106,.81756,103256e-9,0,.226243,.79984,106954e-9,0,.251704,.780998,108066e-9,0,.278451,.761132,110111e-9,0,.306436,.740429,110459e-9,0,.335586,.719836,111219e-9,0,.365796,.698467,11145e-8,0,.3969,.676446,110393e-9,0,.428571,.654635,110035e-9,0,.460318,.632411,108548e-9,0,.492064,.609986,106963e-9,0,.52381,.587872,105238e-9,0,.555556,.565528,102665e-9,0,.587302,.543563,100543e-9,0,.619048,.52176,976182e-10,0,.650794,.500188,947099e-10,0,.68254,.479204,919929e-10,0,.714286,.458413,886139e-10,0,.746032,.438314,857839e-10,0,.777778,.418573,82411e-9,0,.809524,.39947,792211e-10,0,.84127,.380892,759546e-10,0,.873016,.362953,727571e-10,0,.904762,.345601,695738e-10,0,.936508,.328895,664907e-10,0,.968254,.312808,634277e-10,0,1,1,628647e-13,0,0,1,628705e-13,0,0,1,629587e-13,0,0,1,633441e-13,0,0,.999999,644087e-13,0,0,.999998,667856e-13,0,0,.999997,715889e-13,0,0,.999995,809577e-13,0,0,.999989,992764e-13,0,0,.999983,135834e-12,0,0,.999974,210482e-12,0,0,.999959,365215e-12,0,0,.999939,686693e-12,0,0,.999911,13472e-10,0,0,.999868,26731e-10,0,0,.999804,524756e-11,0,0,.9997,100403e-10,0,0,.99951,185019e-10,0,0,.999078,322036e-10,0,620676e-11,.997428,470002e-10,0,341552e-9,.99162,287123e-10,0,.00143727,.987479,234706e-10,0,.00349201,.983582,260083e-10,0,.0066242,.979186,337927e-10,0,.0109113,.97325,454689e-10,0,.0164064,.965221,573759e-10,0,.0231463,.957262,544114e-10,0,.0311571,.952211,587006e-10,0,.0404572,.946631,692256e-10,0,.0510592,.939391,787819e-10,0,.0629723,.929795,792368e-10,0,.0762025,.91965,875075e-10,0,.090753,.907737,950903e-10,0,.106626,.893899,972963e-10,0,.123822,.880239,10459e-8,0,.142337,.866562,107689e-9,0,.16217,.85164,113081e-9,0,.183314,.835021,116636e-9,0,.20576,.817311,120074e-9,0,.229496,.798845,121921e-9,0,.254502,.780479,12475e-8,0,.280753,.760694,125255e-9,0,.308212,.740142,126719e-9,0,.336825,.719248,12636e-8,0,.366517,.698209,126712e-9,0,.397167,.676398,125769e-9,0,.428578,.654378,124432e-9,0,.460318,.632484,123272e-9,0,.492064,.610113,12085e-8,0,.52381,.587931,118411e-9,0,.555556,.565872,11569e-8,0,.587302,.543814,112521e-9,0,.619048,.522265,109737e-9,0,.650794,.500835,106228e-9,0,.68254,.479818,102591e-9,0,.714286,.459258,991288e-10,0,.746032,.439061,952325e-10,0,.777778,.419552,91895e-9,0,.809524,.400399,879051e-10,0,.84127,.381976,844775e-10,0,.873016,.364009,806316e-10,0,.904762,.346761,771848e-10,0,.936508,.330049,735429e-10,0,.968254,.314018,702103e-10,0,1,1,139968e-12,0,0,1,139979e-12,0,0,1,140145e-12,0,0,1,14087e-11,0,0,.999999,142865e-12,0,0,.999998,147279e-12,0,0,.999997,156057e-12,0,0,.999992,17276e-11,0,0,.999989,204352e-12,0,0,.99998,26494e-11,0,0,.999969,383435e-12,0,0,.999953,618641e-12,0,0,.999929,108755e-11,0,0,.999898,201497e-11,0,0,.999849,381346e-11,0,0,.999778,719815e-11,0,0,.999661,133215e-10,0,0,.999451,238313e-10,0,0,.998936,401343e-10,0,113724e-9,.99662,517346e-10,0,820171e-9,.991094,304323e-10,0,.00238143,.987487,281757e-10,0,.00493527,.983731,320048e-10,0,.00856859,.979647,423905e-10,0,.0133393,.973837,562935e-10,0,.0192863,.96584,677442e-10,0,.0264369,.956309,623073e-10,0,.03481,.951523,704131e-10,0,.0444184,.946003,836594e-10,0,.0552713,.938454,911736e-10,0,.0673749,.929279,938264e-10,0,.0807329,.919239,103754e-9,0,.0953479,.907293,109928e-9,0,.111221,.893936,115257e-9,0,.128352,.879674,122265e-9,0,.14674,.865668,125733e-9,0,.166382,.850998,132305e-9,0,.187276,.834498,134844e-9,0,.209413,.816903,139276e-9,0,.232786,.798235,140984e-9,0,.257382,.779724,14378e-8,0,.283181,.760251,144623e-9,0,.310156,.739808,145228e-9,0,.338269,.718762,14539e-8,0,.367461,.697815,144432e-9,0,.397646,.67631,143893e-9,0,.428685,.654278,141846e-9,0,.460318,.632347,13935e-8,0,.492064,.610296,137138e-9,0,.52381,.588039,133806e-9,0,.555556,.566218,130755e-9,0,.587302,.544346,127128e-9,0,.619048,.522701,123002e-9,0,.650794,.501542,119443e-9,0,.68254,.480508,115055e-9,0,.714286,.460092,111032e-9,0,.746032,.440021,106635e-9,0,.777778,.420446,102162e-9,0,.809524,.401512,98184e-9,0,.84127,.38299,936497e-10,0,.873016,.365232,89813e-9,0,.904762,.347865,853073e-10,0,.936508,.331342,817068e-10,0,.968254,.315202,773818e-10,0,1,1,29368e-11,0,0,1,2937e-10,0,0,1,293998e-12,0,0,1,295298e-12,0,0,.999999,298865e-12,0,0,.999998,3067e-10,0,0,.999995,322082e-12,0,0,.999992,350767e-12,0,0,.999986,403538e-12,0,0,.999976,501372e-12,0,0,.999964,68562e-11,0,0,.999945,10374e-10,0,0,.999919,171269e-11,0,0,.999882,300175e-11,0,0,.999829,542144e-11,0,0,.999749,984182e-11,0,0,.99962,176213e-10,0,0,.999382,305995e-10,0,138418e-10,.998751,496686e-10,0,389844e-9,.995344,510733e-10,0,.00150343,.990768,345829e-10,0,.00352451,.987464,342841e-10,0,.00655379,.983846,399072e-10,0,.0106554,.980007,533219e-10,0,.0158723,.974494,696992e-10,0,.0222333,.96622,776754e-10,0,.029758,.956273,747718e-10,0,.0384596,.950952,864611e-10,0,.0483473,.945215,100464e-9,0,.0594266,.937287,103729e-9,0,.0717019,.928649,111665e-9,0,.0851752,.918791,12353e-8,0,.0998479,.906685,127115e-9,0,.115721,.893706,13628e-8,0,.132794,.879248,142427e-9,0,.151067,.864685,148091e-9,0,.170538,.850032,153517e-9,0,.191204,.833853,157322e-9,0,.213063,.816353,161086e-9,0,.236107,.797834,164111e-9,0,.260329,.778831,165446e-9,0,.285714,.759756,167492e-9,0,.312243,.739419,166928e-9,0,.339887,.718491,167e-6,0,.368604,.697392,165674e-9,0,.398329,.676102,163815e-9,0,.428961,.654243,162003e-9,0,.460331,.632176,158831e-9,0,.492064,.610407,155463e-9,0,.52381,.588394,152062e-9,0,.555556,.56645,147665e-9,0,.587302,.5449,14375e-8,0,.619048,.523276,138905e-9,0,.650794,.502179,134189e-9,0,.68254,.481359,129392e-9,0,.714286,.46092,124556e-9,0,.746032,.441084,11957e-8,0,.777778,.421517,114652e-9,0,.809524,.402721,109688e-9,0,.84127,.384222,104667e-9,0,.873016,.366534,999633e-10,0,.904762,.349205,950177e-10,0,.936508,.332702,907301e-10,0,.968254,.316599,859769e-10,0,1,1,585473e-12,0,0,1,585507e-12,0,0,1,58602e-11,0,0,.999999,588259e-12,0,0,.999999,594381e-12,0,0,.999998,607754e-12,0,0,.999995,633729e-12,0,0,.99999,68137e-11,0,0,.999984,767003e-12,0,0,.999973,921212e-12,0,0,.999959,120218e-11,0,0,.999936,172024e-11,0,0,.999907,268088e-11,0,0,.999866,445512e-11,0,0,.999806,768481e-11,0,0,.999716,1342e-8,0,0,.999576,232473e-10,0,0,.9993,391694e-10,0,129917e-9,.998498,608429e-10,0,845035e-9,.994132,489743e-10,0,.00237616,.99031,384644e-10,0,.00484456,.987409,421768e-10,0,.00832472,.983981,504854e-10,0,.0128643,.980268,671028e-10,0,.0184947,.974875,852749e-10,0,.025237,.966063,85531e-9,0,.0331046,.956779,900588e-10,0,.0421067,.950259,10577e-8,0,.0522487,.944239,119458e-9,0,.0635343,.936341,122164e-9,0,.0759654,.928047,134929e-9,0,.0895434,.918065,145544e-9,0,.104269,.906267,150531e-9,0,.120142,.893419,161652e-9,0,.137163,.878758,16593e-8,0,.15533,.863699,174014e-9,0,.174645,.848876,177877e-9,0,.195106,.833032,184049e-9,0,.21671,.815557,186088e-9,0,.239454,.797323,19054e-8,0,.263332,.778124,191765e-9,0,.288336,.758929,192535e-9,0,.314451,.738979,192688e-9,0,.341658,.718213,191522e-9,0,.369924,.696947,190491e-9,0,.399202,.675807,187913e-9,0,.429416,.654147,184451e-9,0,.460447,.63229,181442e-9,0,.492064,.610499,177139e-9,0,.523809,.588747,172596e-9,0,.555555,.566783,167457e-9,0,.587301,.545359,162518e-9,0,.619048,.523984,156818e-9,0,.650794,.502917,151884e-9,0,.68254,.482294,145514e-9,0,.714286,.461945,140199e-9,0,.746032,.442133,134101e-9,0,.777778,.422705,128374e-9,0,.809524,.403916,122996e-9,0,.84127,.38554,116808e-9,0,.873016,.367909,111973e-9,0,.904762,.350651,105938e-9,0,.936508,.334208,101355e-9,0,.968254,.318123,957629e-10,0,1,1,111633e-11,0,0,1,111639e-11,0,0,1,111725e-11,0,0,1,112096e-11,0,0,.999999,11311e-10,0,0,.999997,115315e-11,0,0,.999995,11956e-10,0,0,.999989,127239e-11,0,0,.999981,140772e-11,0,0,.999969,164541e-11,0,0,.999952,206607e-11,0,0,.999928,281783e-11,0,0,.999895,416835e-11,0,0,.999848,658728e-11,0,0,.999781,108648e-10,0,0,.999682,182579e-10,0,0,.999523,306003e-10,0,159122e-10,.999205,499862e-10,0,391184e-9,.998131,73306e-9,0,.00147534,.993334,513229e-10,0,.0034227,.99016,467783e-10,0,.00632232,.987321,523413e-10,0,.0102295,.984099,64267e-9,0,.0151794,.980432,843042e-10,0,.0211947,.974976,102819e-9,0,.0282899,.966429,996234e-10,0,.0364739,.957633,111074e-9,0,.0457522,.949422,128644e-9,0,.0561278,.943045,140076e-9,0,.0676023,.935448,146349e-9,0,.0801762,.927225,161854e-9,0,.0938499,.917033,169135e-9,0,.108623,.905762,179987e-9,0,.124496,.892879,189832e-9,0,.141469,.878435,195881e-9,0,.159541,.863114,20466e-8,0,.178713,.84776,209473e-9,0,.198985,.832084,214861e-9,0,.220355,.814915,217695e-9,0,.242823,.796711,220313e-9,0,.266385,.777603,22313e-8,0,.291036,.757991,222471e-9,0,.316767,.738371,222869e-9,0,.343563,.717872,221243e-9,0,.371402,.696619,218089e-9,0,.400248,.675379,21562e-8,0,.430047,.65411,21169e-8,0,.460709,.63241,206947e-9,0,.492079,.61046,201709e-9,0,.52381,.58903,196753e-9,0,.555556,.567267,189637e-9,0,.587302,.545886,184735e-9,0,.619048,.524714,177257e-9,0,.650794,.503789,171424e-9,0,.68254,.483204,164688e-9,0,.714286,.462976,157172e-9,0,.746032,.443294,151341e-9,0,.777778,.423988,143737e-9,0,.809524,.405325,138098e-9,0,.84127,.386981,130698e-9,0,.873016,.369436,125276e-9,0,.904762,.35219,118349e-9,0,.936508,.335804,11312e-8,0,.968254,.319749,106687e-9,0,1,1,204685e-11,0,0,1,204694e-11,0,0,1,204831e-11,0,0,.999999,205428e-11,0,0,.999999,207056e-11,0,0,.999997,210581e-11,0,0,.999993,21732e-10,0,0,.999987,229365e-11,0,0,.999979,250243e-11,0,0,.999965,286127e-11,0,0,.999947,348028e-11,0,0,.999918,455588e-11,0,0,.999881,643303e-11,0,0,.999828,970064e-11,0,0,.999753,153233e-10,0,0,.999642,24793e-9,0,0,.999464,402032e-10,0,122947e-9,.999089,635852e-10,0,807414e-9,.997567,857026e-10,0,.00227206,.992903,594912e-10,0,.00462812,.990011,578515e-10,0,.00794162,.987192,65399e-9,0,.0122534,.98418,819675e-10,0,.0175888,.980491,105514e-9,0,.0239635,.974779,121532e-9,0,.031387,.96675,119144e-9,0,.0398644,.958248,136125e-9,0,.0493982,.948884,155408e-9,0,.0599896,.941673,162281e-9,0,.0716382,.934521,176754e-9,0,.0843437,.926205,192873e-9,0,.0981056,.916089,200038e-9,0,.112923,.904963,213624e-9,0,.128796,.892089,221834e-9,0,.145725,.878028,232619e-9,0,.163709,.86249,238632e-9,0,.182749,.846587,247002e-9,0,.202847,.830988,250702e-9,0,.224001,.814165,255562e-9,0,.246214,.796135,257505e-9,0,.269482,.777052,258625e-9,0,.293805,.757201,258398e-9,0,.319176,.737655,256714e-9,0,.345587,.717477,255187e-9,0,.373021,.696433,251792e-9,0,.401454,.675084,247223e-9,0,.430844,.653907,242213e-9,0,.461125,.632561,237397e-9,0,.492187,.610658,229313e-9,0,.52381,.589322,224402e-9,0,.555556,.567857,216116e-9,0,.587302,.54652,209124e-9,0,.619048,.525433,201601e-9,0,.650794,.504679,192957e-9,0,.68254,.484203,186052e-9,0,.714286,.464203,177672e-9,0,.746032,.444549,170005e-9,0,.777778,.425346,162401e-9,0,.809524,.406706,1544e-7,0,.84127,.388576,147437e-9,0,.873016,.37094,139493e-9,0,.904762,.353996,133219e-9,0,.936508,.337391,125573e-9,0,.968254,.321648,119867e-9,0,1,1,362511e-11,0,0,1,362525e-11,0,0,1,362739e-11,0,0,.999999,363673e-11,0,0,.999998,366214e-11,0,0,.999996,371698e-11,0,0,.999992,382116e-11,0,0,.999986,400554e-11,0,0,.999976,432058e-11,0,0,.999961,485194e-11,0,0,.999938,574808e-11,0,0,.999908,726643e-11,0,0,.999865,984707e-11,0,0,.999807,142217e-10,0,0,.999723,215581e-10,0,0,.999602,336114e-10,0,119113e-10,.999398,527353e-10,0,355813e-9,.998946,805809e-10,0,.00137768,.996647,942908e-10,0,.00322469,.992298,668733e-10,0,.00597897,.989802,716564e-10,0,.00968903,.987019,821355e-10,0,.0143845,.984219,104555e-9,0,.0200831,.980425,131245e-9,0,.0267948,.974241,139613e-9,0,.034525,.967006,145931e-9,0,.0432757,.95893,167153e-9,0,.0530471,.949157,188146e-9,0,.0638386,.94062,194625e-9,0,.0756487,.933509,213721e-9,0,.0884762,.925088,229616e-9,0,.10232,.915178,239638e-9,0,.117178,.904093,254814e-9,0,.133051,.891337,263685e-9,0,.149939,.877326,274789e-9,0,.167841,.861794,280534e-9,0,.18676,.845758,289534e-9,0,.206696,.829792,294446e-9,0,.22765,.813037,296877e-9,0,.249625,.795285,300217e-9,0,.27262,.776323,299826e-9,0,.296636,.756673,299787e-9,0,.321671,.736856,297867e-9,0,.347718,.716883,294052e-9,0,.374768,.696089,289462e-9,0,.402804,.67505,285212e-9,0,.431796,.653509,27653e-8,0,.461695,.63258,271759e-9,0,.49242,.61104,262811e-9,0,.523822,.589567,255151e-9,0,.555556,.568322,246434e-9,0,.587302,.547235,237061e-9,0,.619048,.52616,228343e-9,0,.650794,.505716,219236e-9,0,.68254,.485274,209595e-9,0,.714286,.465411,201011e-9,0,.746032,.445854,19109e-8,0,.777778,.426911,182897e-9,0,.809524,.408222,173569e-9,0,.84127,.390307,165496e-9,0,.873016,.372624,156799e-9,0,.904762,.355804,14917e-8,0,.936508,.33924,140907e-9,0,.968254,.323534,134062e-9,0,1,1,622487e-11,0,0,1,62251e-10,0,0,1,622837e-11,0,0,.999999,624259e-11,0,0,.999998,628127e-11,0,0,.999996,636451e-11,0,0,.999991,65218e-10,0,0,.999984,679782e-11,0,0,.999973,726361e-11,0,0,.999955,803644e-11,0,0,.999931,931397e-11,0,0,.999896,114299e-10,0,0,.999847,149402e-10,0,0,.999784,207461e-10,0,0,.999692,302493e-10,0,0,.999554,454957e-10,0,997275e-10,.999326,690762e-10,0,724813e-9,.998757,101605e-9,0,.0020972,.995367,958745e-10,0,.00432324,.99209,832808e-10,0,.00746347,.989517,887601e-10,0,.0115534,.987008,10564e-8,0,.0166134,.98421,133179e-9,0,.0226552,.98021,161746e-9,0,.0296838,.973676,161821e-9,0,.0377016,.967052,178635e-9,0,.0467079,.959385,206765e-9,0,.0567013,.949461,22476e-8,0,.0676796,.939578,23574e-8,0,.0796403,.932416,25893e-8,0,.0925812,.923759,271228e-9,0,.106501,.914223,289165e-9,0,.121397,.902942,301156e-9,0,.13727,.890419,313852e-9,0,.15412,.876639,324408e-9,0,.171946,.861316,33249e-8,0,.190751,.84496,338497e-9,0,.210537,.828427,345861e-9,0,.231305,.811871,347863e-9,0,.253057,.794397,350225e-9,0,.275797,.775726,349915e-9,0,.299525,.75617,347297e-9,0,.324242,.736091,344232e-9,0,.349947,.716213,340835e-9,0,.376633,.695736,332369e-9,0,.404289,.674961,327943e-9,0,.432895,.653518,318533e-9,0,.462415,.632574,310391e-9,0,.492788,.61134,300755e-9,0,.523909,.590017,290506e-9,0,.555556,.568752,280446e-9,0,.587302,.548061,269902e-9,0,.619048,.52711,258815e-9,0,.650794,.506682,248481e-9,0,.68254,.486524,237141e-9,0,.714286,.466812,226872e-9,0,.746032,.44732,216037e-9,0,.777778,.428473,205629e-9,0,.809524,.409921,195691e-9,0,.84127,.392028,185457e-9,0,.873016,.374606,176436e-9,0,.904762,.357601,166508e-9,0,.936508,.341348,158385e-9,0,.968254,.32542,149203e-9,0,1,1,103967e-10,0,0,1,10397e-9,0,0,1,104019e-10,0,0,.999999,104231e-10,0,0,.999998,104806e-10,0,0,.999995,106042e-10,0,0,.999991,108366e-10,0,0,.999982,112415e-10,0,0,.999968,119174e-10,0,0,.99995,130227e-10,0,0,.999922,148176e-10,0,0,.999884,177303e-10,0,0,.99983,224564e-10,0,0,.999758,300966e-10,0,0,.999654,423193e-10,0,549083e-11,.999503,614848e-10,0,296087e-9,.999237,903576e-10,0,.00123144,.998491,1271e-7,0,.00295954,.994594,107754e-9,0,.00555829,.99178,103025e-9,0,.00907209,.989265,11154e-8,0,.0135257,.986998,136296e-9,0,.0189327,.984137,169154e-9,0,.0252993,.979798,196671e-9,0,.0326272,.97337,196678e-9,0,.0409157,.967239,223121e-9,0,.0501623,.959543,253809e-9,0,.0603638,.949466,265972e-9,0,.0715171,.939074,288372e-9,0,.0836187,.931118,310983e-9,0,.0966657,.922525,325561e-9,0,.110656,.912983,345725e-9,0,.125588,.901617,3556e-7,0,.141461,.889487,374012e-9,0,.158275,.875787,383445e-9,0,.176031,.860654,393972e-9,0,.19473,.844417,400311e-9,0,.214374,.82741,405004e-9,0,.234967,.810545,407378e-9,0,.256512,.793312,407351e-9,0,.279011,.774847,406563e-9,0,.302468,.755621,404903e-9,0,.326887,.735511,397486e-9,0,.352266,.715435,39357e-8,0,.378605,.695403,384739e-9,0,.405897,.674681,376108e-9,0,.43413,.65359,365997e-9,0,.463277,.632471,354957e-9,0,.493295,.61151,343593e-9,0,.524106,.59064,331841e-9,0,.555561,.569386,318891e-9,0,.587302,.548785,3072e-7,0,.619048,.528146,29361e-8,0,.650794,.507872,281709e-9,0,.68254,.487805,268627e-9,0,.714286,.468196,255887e-9,0,.746032,.448922,243997e-9,0,.777778,.430093,231662e-9,0,.809524,.411845,220339e-9,0,.84127,.393808,208694e-9,0,.873016,.376615,198045e-9,0,.904762,.359655,187375e-9,0,.936508,.343452,177371e-9,0,.968254,.32765,167525e-9,0,1,1,169351e-10,0,0,1,169356e-10,0,0,1,169427e-10,0,0,.999999,169736e-10,0,0,.999998,170575e-10,0,0,.999995,172372e-10,0,0,.99999,175739e-10,0,0,.999979,181568e-10,0,0,.999966,191206e-10,0,0,.999944,20677e-9,0,0,.999912,231644e-10,0,0,.999869,271268e-10,0,0,.999811,334272e-10,0,0,.99973,433979e-10,0,0,.999617,590083e-10,0,680315e-10,.999445,829497e-10,0,612796e-9,.999138,118019e-9,0,.00187408,.998095,156712e-9,0,.00395791,.993919,125054e-9,0,.00692144,.991333,126091e-9,0,.0107962,.989226,144912e-9,0,.0155986,.986954,175737e-9,0,.0213364,.983982,213883e-9,0,.0280114,.979128,234526e-9,0,.0356226,.973327,243725e-9,0,.0441668,.967416,2773e-7,0,.0536399,.959729,308799e-9,0,.0640376,.949758,322447e-9,0,.0753554,.939173,350021e-9,0,.0875893,.9296,370089e-9,0,.100736,.921181,391365e-9,0,.114793,.91164,413636e-9,0,.129759,.900435,427068e-9,0,.145632,.888183,441046e-9,0,.162412,.874772,454968e-9,0,.180101,.859566,461882e-9,0,.1987,.843579,471556e-9,0,.218213,.826453,474335e-9,0,.238641,.809164,477078e-9,0,.259989,.792179,47755e-8,0,.282262,.773866,472573e-9,0,.305464,.754944,469765e-9,0,.329599,.735133,462371e-9,0,.35467,.714858,453674e-9,0,.380678,.694829,443888e-9,0,.407622,.674453,432052e-9,0,.435493,.653685,420315e-9,0,.464275,.632666,406829e-9,0,.493938,.611676,392234e-9,0,.524422,.591193,379208e-9,0,.555624,.570145,36319e-8,0,.587302,.549566,349111e-9,0,.619048,.529278,334166e-9,0,.650794,.509026,318456e-9,0,.68254,.489186,30449e-8,0,.714286,.469662,289051e-9,0,.746032,.450691,275494e-9,0,.777778,.431841,261437e-9,0,.809524,.413752,247846e-9,0,.84127,.395951,235085e-9,0,.873016,.378633,222245e-9,0,.904762,.36194,210533e-9,0,.936508,.345599,198494e-9,0,.968254,.329999,188133e-9,0,1,1,269663e-10,0,0,1,26967e-9,0,0,1,269772e-10,0,0,.999999,270214e-10,0,0,.999998,271415e-10,0,0,.999994,27398e-9,0,0,.999988,278771e-10,0,0,.999977,287019e-10,0,0,.999961,300544e-10,0,0,.999937,322138e-10,0,0,.999904,356163e-10,0,0,.999854,409465e-10,0,0,.99979,492651e-10,0,0,.999699,621722e-10,0,88288e-11,.999572,819715e-10,0,223369e-9,.999381,111689e-9,0,.00105414,.999016,153862e-9,0,.0026493,.997437,187667e-9,0,.00508608,.993545,155672e-9,0,.00840554,.991135,161455e-9,0,.012629,.989157,188241e-9,0,.0177661,.986874,226229e-9,0,.0238198,.983714,268668e-9,0,.0307887,.978301,277109e-9,0,.0386688,.973227,303446e-9,0,.0474554,.967317,341851e-9,0,.0571428,.959477,370885e-9,0,.0677256,.950012,392753e-9,0,.0791988,.939484,42781e-8,0,.0915576,.928135,443866e-9,0,.104798,.919819,472959e-9,0,.118918,.910049,491551e-9,0,.133915,.899181,512616e-9,0,.149788,.886881,523563e-9,0,.166537,.87359,540183e-9,0,.184164,.858613,547386e-9,0,.202669,.842809,554809e-9,0,.222056,.825727,558316e-9,0,.242329,.808086,557824e-9,0,.263492,.790728,556346e-9,0,.285551,.772987,552672e-9,0,.30851,.7541,543738e-9,0,.332376,.734669,536107e-9,0,.357153,.714411,523342e-9,0,.382845,.694196,512238e-9,0,.409454,.674252,497465e-9,0,.436977,.65357,481096e-9,0,.465404,.632999,467054e-9,0,.494713,.611994,448771e-9,0,.524864,.591604,431889e-9,0,.555779,.571134,415238e-9,0,.587302,.550528,396369e-9,0,.619048,.530292,379477e-9,0,.650794,.510364,361488e-9,0,.68254,.490749,343787e-9,0,.714286,.471266,327822e-9,0,.746032,.452462,310626e-9,0,.777778,.433907,295352e-9,0,.809524,.415659,279179e-9,0,.84127,.398138,264685e-9,0,.873016,.380833,249905e-9,0,.904762,.364247,236282e-9,0,.936508,.348041,222905e-9,0,.968254,.332389,210522e-9,0,1,1,420604e-10,0,0,1,420614e-10,0,0,1,420757e-10,0,0,.999999,42138e-9,0,0,.999997,423067e-10,0,0,.999993,426668e-10,0,0,.999986,433372e-10,0,0,.999974,444857e-10,0,0,.999956,463554e-10,0,0,.99993,493105e-10,0,0,.999892,539077e-10,0,0,.999838,610005e-10,0,0,.999767,718822e-10,0,0,.999666,884581e-10,0,365471e-10,.999525,113398e-9,0,485623e-9,.999311,150043e-9,0,.00162096,.998865,200063e-9,0,.00355319,.996278,211014e-9,0,.00633818,.992956,189672e-9,0,.0100043,.991017,210262e-9,0,.0145648,.989055,244292e-9,0,.0200237,.986741,290481e-9,0,.0263798,.983288,334303e-9,0,.033629,.977784,340307e-9,0,.0417652,.973037,377864e-9,0,.0507821,.967181,4239e-7,0,.060673,.958971,443854e-9,0,.0714314,.950093,483039e-9,0,.0830518,.939552,517934e-9,0,.0955288,.927678,539449e-9,0,.108859,.918278,568604e-9,0,.123038,.908449,588505e-9,0,.138065,.897713,612473e-9,0,.153938,.885533,625575e-9,0,.170657,.872131,63854e-8,0,.188224,.857517,647034e-9,0,.20664,.841796,65209e-8,0,.225909,.824726,6544e-7,0,.246035,.807297,655744e-9,0,.267022,.789058,646716e-9,0,.288878,.77189,643898e-9,0,.311607,.753082,629973e-9,0,.335216,.7341,621564e-9,0,.359713,.714094,605171e-9,0,.385103,.693839,588752e-9,0,.41139,.673891,573294e-9,0,.438576,.653565,552682e-9,0,.466656,.633326,533446e-9,0,.495617,.612582,514635e-9,0,.525431,.59205,49303e-8,0,.556041,.571918,471842e-9,0,.587338,.551572,451713e-9,0,.619048,.531553,430049e-9,0,.650794,.51175,410445e-9,0,.68254,.49238,390098e-9,0,.714286,.473143,370033e-9,0,.746032,.45423,351205e-9,0,.777778,.435963,332049e-9,0,.809524,.41787,315021e-9,0,.84127,.400387,297315e-9,0,.873016,.383332,281385e-9,0,.904762,.366665,265397e-9,0,.936508,.350633,250601e-9,0,.968254,.334964,23589e-8,0,1,1,643736e-10,0,0,1,64375e-9,0,0,1,643947e-10,0,0,.999999,64481e-9,0,0,.999997,647143e-10,0,0,.999994,652119e-10,0,0,.999985,661359e-10,0,0,.999972,677116e-10,0,0,.999952,702599e-10,0,0,.999922,742517e-10,0,0,.99988,803906e-10,0,0,.99982,897315e-10,0,0,.999741,103838e-9,0,0,.999629,12496e-8,0,149024e-9,.999474,156161e-9,0,861027e-9,.999229,201034e-9,0,.00231198,.998662,259069e-9,0,.00458147,.995299,245439e-9,0,.00770895,.992732,24498e-8,0,.0117126,.990847,273211e-9,0,.0165989,.988911,316492e-9,0,.0223674,.98654,37161e-8,0,.0290135,.982636,410352e-9,0,.0365309,.977346,421756e-9,0,.0449117,.972909,475578e-9,0,.0541481,.966821,522482e-9,0,.0642326,.958686,545008e-9,0,.075158,.949754,589286e-9,0,.0869181,.939184,619995e-9,0,.0995074,.927505,654266e-9,0,.112922,.916606,682362e-9,0,.127157,.906707,704286e-9,0,.142212,.895937,725909e-9,0,.158085,.883913,743939e-9,0,.174776,.870642,755157e-9,0,.192287,.856241,764387e-9,0,.210619,.84069,771032e-9,0,.229775,.823728,765906e-9,0,.249761,.806481,767604e-9,0,.270582,.787924,754385e-9,0,.292243,.770588,749668e-9,0,.314753,.751991,731613e-9,0,.338118,.733407,717655e-9,0,.362347,.713688,700604e-9,0,.387447,.693595,678765e-9,0,.413424,.673426,657042e-9,0,.440284,.65359,635892e-9,0,.468027,.633576,611569e-9,0,.496645,.613144,586011e-9,0,.526122,.592711,563111e-9,0,.556417,.572722,537699e-9,0,.587451,.552762,512556e-9,0,.619048,.532985,489757e-9,0,.650794,.513219,464139e-9,0,.68254,.493992,442193e-9,0,.714286,.47509,418629e-9,0,.746032,.456287,397045e-9,0,.777778,.438152,375504e-9,0,.809524,.420294,35492e-8,0,.84127,.402749,335327e-9,0,.873016,.385879,316422e-9,0,.904762,.369352,298333e-9,0,.936508,.353301,281417e-9,0,.968254,.337781,265203e-9,0,1,1,968267e-10,0,0,1,968284e-10,0,0,1,968556e-10,0,0,.999999,969733e-10,0,0,.999997,972913e-10,0,0,.999993,979688e-10,0,0,.999984,992239e-10,0,0,.999969,101356e-9,0,0,.999946,104784e-9,0,0,.999913,110111e-9,0,0,.999868,118217e-9,0,0,.999801,130396e-9,0,0,.999712,148523e-9,0,124907e-10,.999589,175233e-9,0,355405e-9,.999416,213999e-9,0,.0013528,.999136,268529e-9,0,.00312557,.998367,333088e-9,0,.00573045,.994701,304757e-9,0,.00919397,.992497,318031e-9,0,.0135261,.990608,353863e-9,0,.0187278,.988715,409044e-9,0,.0247947,.986241,472967e-9,0,.0317196,.981696,495104e-9,0,.039494,.977097,532873e-9,0,.0481087,.972583,594447e-9,0,.0575549,.966142,636867e-9,0,.0678242,.95823,669899e-9,0,.0789089,.949677,719499e-9,0,.0908023,.939226,750584e-9,0,.103499,.927501,793183e-9,0,.116993,.915199,81995e-8,0,.131282,.90498,847654e-9,0,.146364,.894243,868929e-9,0,.162237,.882154,884278e-9,0,.178902,.869161,898108e-9,0,.196358,.854751,901254e-9,0,.21461,.839368,90679e-8,0,.23366,.822874,901541e-9,0,.253512,.805514,897297e-9,0,.274174,.78716,881856e-9,0,.29565,.769061,870032e-9,0,.31795,.751,851719e-9,0,.341081,.732614,830671e-9,0,.365053,.713171,806569e-9,0,.389874,.693472,78338e-8,0,.415553,.673528,756404e-9,0,.442098,.653397,726872e-9,0,.469512,.633781,700494e-9,0,.497794,.613877,67105e-8,0,.526935,.593506,640361e-9,0,.556908,.573667,613502e-9,0,.587657,.553932,583177e-9,0,.61906,.534345,554375e-9,0,.650794,.515042,527811e-9,0,.68254,.495674,499367e-9,0,.714286,.477132,47429e-8,0,.746032,.458609,447726e-9,0,.777778,.440354,424205e-9,0,.809524,.422765,399549e-9,0,.84127,.405472,378315e-9,0,.873016,.388482,355327e-9,0,.904762,.372191,336122e-9,0,.936508,.356099,315247e-9,0,.968254,.340737,29794e-8,0,1,1,143327e-9,0,0,1,14333e-8,0,0,1,143366e-9,0,0,.999999,143524e-9,0,0,.999996,143952e-9,0,0,.999991,144862e-9,0,0,.999981,146544e-9,0,0,.999966,149391e-9,0,0,.999941,153946e-9,0,0,.999905,160971e-9,0,0,.999852,171562e-9,0,0,.99978,18729e-8,0,0,.999681,210386e-9,0,826239e-10,.999546,243906e-9,0,664807e-9,.999352,291739e-9,0,.00196192,.999027,357419e-9,0,.00405941,.997886,422349e-9,0,.00699664,.99419,385008e-9,0,.0107896,.99214,409775e-9,0,.0154415,.990274,456418e-9,0,.0209488,.988455,527008e-9,0,.0273037,.985804,597685e-9,0,.0344969,.98103,613124e-9,0,.0425183,.976674,668321e-9,0,.0513575,.972021,736985e-9,0,.0610046,.965274,773789e-9,0,.0714508,.958046,830852e-9,0,.0826877,.949333,875766e-9,0,.0947085,.939135,917088e-9,0,.107507,.927119,952244e-9,0,.121078,.91469,990626e-9,0,.135419,.903006,.00101304,0,.150526,.892368,.00103834,0,.166399,.880231,.00105002,0,.183038,.867432,.00106331,0,.200443,.853208,.00106783,0,.218618,.837956,.00106458,0,.237566,.821772,.00105945,0,.257291,.804328,.00104685,0,.2778,.786465,.00103178,0,.2991,.768004,.00101077,0,.321199,.74972,985504e-9,0,.344106,.731682,962893e-9,0,.36783,.712813,932146e-9,0,.392383,.693139,89871e-8,0,.417774,.673566,869678e-9,0,.444013,.653483,835525e-9,0,.471107,.633891,799853e-9,0,.49906,.614433,766838e-9,0,.527869,.594586,732227e-9,0,.557517,.574769,696442e-9,0,.587966,.555149,663935e-9,0,.61913,.535898,629826e-9,0,.650794,.516753,596486e-9,0,.68254,.497816,567078e-9,0,.714286,.479034,534399e-9,0,.746032,.460975,507013e-9,0,.777778,.442935,477421e-9,0,.809524,.425263,451101e-9,0,.84127,.408248,424964e-9,0,.873016,.391339,39993e-8,0,.904762,.37513,377619e-9,0,.936508,.359172,354418e-9,0,.968254,.343876,334823e-9,0,1,1,209042e-9,0,0,1,209045e-9,0,0,1,209093e-9,0,0,.999999,209304e-9,0,0,.999996,209871e-9,0,0,.999991,211078e-9,0,0,.999979,213304e-9,0,0,.999963,217061e-9,0,0,.999933,223042e-9,0,0,.999894,232206e-9,0,0,.999837,245901e-9,0,0,.999756,266023e-9,0,102927e-11,.999648,295204e-9,0,233468e-9,.999499,336958e-9,0,.00108237,.999283,395563e-9,0,.00268832,.998896,473785e-9,0,.00511138,.997006,520008e-9,0,.00837705,.993819,497261e-9,0,.0124928,.991632,523722e-9,0,.0174561,.989875,587258e-9,0,.0232596,.988109,676329e-9,0,.0298932,.985155,747701e-9,0,.0373453,.980479,768803e-9,0,.0456045,.976271,841054e-9,0,.0546593,.971347,911469e-9,0,.0644994,.964528,953057e-9,0,.0751152,.957632,.00102221,0,.0864981,.948681,.00106122,0,.0986407,.938716,.00111857,0,.111537,.926629,.00114762,0,.125182,.914025,.00118995,0,.139571,.901026,.00121228,0,.154703,.890358,.00123946,0,.170576,.878283,.0012527,0,.18719,.865459,.00125536,0,.204547,.851407,.00126134,0,.222648,.836276,.00124759,0,.241498,.820436,.00124443,0,.261101,.803253,.00122071,0,.281465,.785562,.00120107,0,.302595,.76718,.00117762,0,.324501,.748551,.00114289,0,.347192,.730564,.00110872,0,.370679,.712253,.00107636,0,.394973,.692867,.00103646,0,.420085,.673695,996793e-9,0,.446027,.653912,95675e-8,0,.47281,.634129,916739e-9,0,.500441,.615004,874401e-9,0,.528921,.595587,833411e-9,0,.558244,.575965,794556e-9,0,.588384,.5566,75196e-8,0,.619281,.537428,716381e-9,0,.650795,.518623,676558e-9,0,.68254,.499964,64074e-8,0,.714286,.481356,605984e-9,0,.746032,.463279,570256e-9,0,.777778,.445673,540138e-9,0,.809524,.428032,507299e-9,0,.84127,.411112,479553e-9,0,.873016,.394444,450737e-9,0,.904762,.378247,424269e-9,0,.936508,.362415,399111e-9,0,.968254,.347103,375274e-9,0,1,1,300729e-9,0,0,1,300733e-9,0,0,1,300797e-9,0,0,.999998,301072e-9,0,0,.999996,301817e-9,0,0,.999989,303398e-9,0,0,.999977,306309e-9,0,0,.999958,311209e-9,0,0,.999927,318975e-9,0,0,.999884,330804e-9,0,0,.99982,34834e-8,0,0,.999733,373854e-9,0,326995e-10,.999613,410424e-9,0,477174e-9,.999447,462047e-9,0,.00161099,.999204,533322e-9,0,.00353153,.998725,624964e-9,0,.00627965,.995871,631786e-9,0,.0098693,.993194,632017e-9,0,.0143011,.991541,68923e-8,0,.019568,.989773,766892e-9,0,.0256593,.987647,863668e-9,0,.0325625,.984193,922089e-9,0,.0402647,.980016,970749e-9,0,.0487532,.975859,.00106027,0,.058016,.970514,.00112239,0,.0680419,.963625,.00117212,0,.0788208,.956959,.00125211,0,.0903439,.947956,.00129411,0,.102604,.93809,.00135879,0,.115594,.92659,.00139309,0,.129309,.913829,.00143253,0,.143745,.90005,.00145809,0,.158901,.888129,.0014748,0,.174774,.87607,.00148756,0,.191365,.863461,.00148714,0,.208674,.849594,.00148892,0,.226705,.834531,.00146496,0,.245461,.81903,.0014579,0,.264947,.802122,.00143039,0,.28517,.78445,.00139717,0,.306137,.766434,.00136312,0,.327857,.747816,.00132597,0,.350341,.729519,.00128323,0,.373598,.711454,.00123803,0,.397642,.692699,.00119097,0,.422485,.673723,.00114565,0,.448139,.654386,.00109552,0,.474619,.634673,.00104553,0,.501933,.615554,99985e-8,0,.530089,.596462,948207e-9,0,.559087,.577385,902299e-9,0,.588913,.558257,856448e-9,0,.619525,.5392,810395e-9,0,.650826,.520543,768558e-9,0,.68254,.502206,7239e-7,0,.714286,.48402,685794e-9,0,.746032,.465779,64471e-8,0,.777778,.448455,609583e-9,0,.809524,.431091,57227e-8,0,.84127,.414147,54042e-8,0,.873016,.39765,506545e-9,0,.904762,.381576,477635e-9,0,.936508,.365881,448446e-9,0,.968254,.350582,421424e-9,0,1,1,427144e-9,0,0,1,427151e-9,0,0,1,427232e-9,0,0,.999998,42759e-8,0,0,.999995,428555e-9,0,0,.999988,430603e-9,0,0,.999976,434368e-9,0,0,.999952,440688e-9,0,0,.999919,450667e-9,0,0,.999871,46578e-8,0,0,.999801,488024e-9,0,0,.999704,520092e-9,0,129791e-9,.999572,565553e-9,0,821056e-9,.999389,628906e-9,0,.00225241,.999114,714911e-9,0,.00449109,.998488,819218e-9,0,.00756249,.995234,80415e-8,0,.0114716,.993021,830181e-9,0,.0162131,.991407,902645e-9,0,.021776,.989625,996934e-9,0,.0281471,.987064,.00109707,0,.0353118,.983265,.00114353,0,.0432562,.979535,.0012272,0,.0519665,.975224,.00132642,0,.0614298,.969574,.00138092,0,.0716348,.963021,.00145896,0,.0825709,.956046,.00152834,0,.094229,.947136,.00158217,0,.106602,.937313,.0016347,0,.119682,.926073,.00168383,0,.133465,.913121,.00171627,0,.147947,.899165,.00174229,0,.163125,.885891,.00176137,0,.178998,.873783,.00176406,0,.195566,.861331,.00176156,0,.21283,.847569,.00175346,0,.230793,.832785,.00172753,0,.249459,.817442,.00170204,0,.268832,.800613,.00166576,0,.28892,.783597,.00162909,0,.30973,.76571,.0015826,0,.331271,.747021,.00153106,0,.353554,.728593,.00148036,0,.37659,.710661,.00142808,0,.400391,.692426,.00136906,0,.424973,.673623,.00131066,0,.450347,.65494,.00125569,0,.476531,.635448,.00119517,0,.503535,.616221,.00113828,0,.531372,.597531,.0010816,0,.560047,.578795,.00102673,0,.589554,.559892,970985e-9,0,.619869,.541307,919773e-9,0,.650923,.522608,868479e-9,0,.68254,.504484,82137e-8,0,.714286,.486603,772916e-9,0,.746032,.468802,730353e-9,0,.777778,.451172,684955e-9,0,.809524,.434348,647565e-9,0,.84127,.417445,605863e-9,0,.873016,.401077,571885e-9,0,.904762,.385039,536034e-9,0,.936508,.369483,504227e-9,0,.968254,.354272,473165e-9,0,1,1,599525e-9,0,0,1,599533e-9,0,0,1,599639e-9,0,0,.999998,600097e-9,0,0,.999994,601336e-9,0,0,.999987,603958e-9,0,0,.999972,608775e-9,0,0,.999949,616842e-9,0,0,.999912,629534e-9,0,0,.999857,648658e-9,0,0,.999781,676615e-9,0,538873e-11,.999674,716574e-9,0,308602e-9,.999528,772641e-9,0,.00127003,.999326,849806e-9,0,.00300783,.999009,952682e-9,0,.00556637,.998112,.00106394,0,.00895889,.994496,.00102228,0,.0131827,.992806,.00108586,0,.0182277,.991211,.0011759,0,.0240795,.989415,.00128955,0,.030723,.986499,.00139038,0,.0381418,.982679,.00144539,0,.046321,.978839,.00153954,0,.0552459,.974295,.00164417,0,.0649034,.968784,.00171517,0,.0752814,.962324,.00180282,0,.0863693,.954956,.00186387,0,.0981578,.94624,.00193817,0,.110639,.936517,.00198156,0,.123806,.925186,.00203042,0,.137655,.91252,.0020664,0,.15218,.898441,.00207822,0,.16738,.884394,.0020992,0,.183253,.871273,.00208748,0,.199799,.859057,.00208686,0,.21702,.845243,.00205519,0,.234918,.830723,.00202868,0,.253496,.815801,.00199501,0,.272761,.79914,.00194193,0,.292719,.782372,.00188824,0,.313377,.76482,.00183695,0,.334745,.746586,.00177418,0,.356833,.7281,.00170628,0,.379654,.709842,.00164063,0,.403221,.692019,.00157355,0,.427548,.67364,.00150262,0,.452651,.655277,.00143473,0,.478545,.636438,.00136371,0,.505246,.617364,.00129911,0,.532768,.598603,.00123014,0,.561122,.580195,.00116587,0,.590309,.561786,.00110398,0,.620318,.543377,.00104148,0,.651102,.525093,983984e-9,0,.682545,.506791,92667e-8,0,.714286,.489291,874326e-9,0,.746032,.471811,821734e-9,0,.777778,.454435,774698e-9,0,.809524,.437493,727302e-9,0,.84127,.420977,684039e-9,0,.873016,.404729,64373e-8,0,.904762,.388756,60285e-8,0,.936508,.373344,56765e-8,0,.968254,.358191,531929e-9,0,1,1,832169e-9,0,0,1,832178e-9,0,0,1,83231e-8,0,0,.999998,832893e-9,0,0,.999995,834465e-9,0,0,.999985,837791e-9,0,0,.999969,843893e-9,0,0,.999944,854086e-9,0,0,.999903,870071e-9,0,0,.999843,894042e-9,0,0,.999759,928865e-9,0,531805e-10,.999643,978242e-9,0,579365e-9,.99948,.00104684,0,.00182774,.999255,.00114012,0,.00387804,.998885,.00126188,0,.00675709,.997405,.00135888,0,.010468,.99424,.00133626,0,.0150018,.992458,.00140905,0,.0203443,.990929,.00152305,0,.0264786,.989116,.00165882,0,.0333875,.985624,.00174128,0,.0410536,.982003,.00182108,0,.0494609,.978336,.00194498,0,.0585941,.973184,.00202708,0,.0684396,.9678,.00212166,0,.0789851,.961348,.00221366,0,.0902199,.953841,.00228219,0,.102134,.94534,.00235662,0,.114721,.935552,.00240572,0,.127972,.924064,.00244405,0,.141884,.911827,.00247557,0,.156451,.897731,.00248374,0,.171672,.883409,.00249863,0,.187545,.868625,.00246688,0,.20407,.856529,.00246523,0,.221249,.842999,.00242368,0,.239083,.828505,.00237354,0,.257578,.813825,.00232588,0,.276738,.797813,.00226731,0,.296569,.781097,.00219704,0,.31708,.764038,.00212394,0,.338281,.746067,.00204786,0,.360181,.727687,.00196728,0,.382794,.709571,.00188779,0,.406133,.691503,.00180532,0,.430213,.673673,.00171849,0,.45505,.655732,.00164147,0,.480662,.637399,.00155858,0,.507065,.618616,.00147641,0,.534278,.60005,.00140125,0,.562313,.581713,.00132441,0,.59118,.563546,.00125014,0,.620875,.545605,.00118249,0,.651373,.527559,.0011116,0,.682593,.509764,.00104979,0,.714286,.49193,985977e-9,0,.746032,.475011,928592e-9,0,.777778,.457878,873466e-9,0,.809524,.440979,819585e-9,0,.84127,.424613,772365e-9,0,.873016,.408549,722195e-9,0,.904762,.392771,680014e-9,0,.936508,.377317,636797e-9,0,.968254,.362352,598318e-9,0,1,1,.00114313,0,0,1,.00114314,0,0,.999999,.00114331,0,0,.999998,.00114404,0,0,.999994,.00114601,0,0,.999984,.00115019,0,0,.999967,.00115784,0,0,.999937,.0011706,0,0,.999894,.00119054,0,0,.999828,.00122031,0,0,.999735,.00126331,0,169263e-9,.999606,.00132382,0,949167e-9,.999426,.0014071,0,.00249668,.999173,.00151895,0,.00486392,.99873,.00166102,0,.00806323,.996243,.0017023,0,.0120895,.993779,.00172782,0,.0169288,.9919,.0018108,0,.0225633,.990524,.00196028,0,.028974,.98868,.00212014,0,.036142,.984663,.00217598,0,.044049,.981457,.00230563,0,.0526781,.977608,.00243966,0,.0620137,.972215,.00251336,0,.0720418,.966798,.0026285,0,.0827499,.960241,.00271409,0,.0941271,.952489,.00278381,0,.106164,.944127,.00285399,0,.118852,.934282,.00290994,0,.132185,.923271,.00294558,0,.146157,.910803,.00296269,0,.160766,.896705,.00296803,0,.176007,.88238,.00296637,0,.19188,.867116,.00293163,0,.208385,.853636,.00289418,0,.225523,.840469,.00284663,0,.243296,.82639,.00278594,0,.261709,.811759,.00271618,0,.280767,.796113,.00263187,0,.300476,.779518,.00254589,0,.320845,.763142,.00246003,0,.341883,.745464,.00236529,0,.363601,.727491,.00226536,0,.386011,.709414,.00216375,0,.409128,.691396,.00207127,0,.432967,.67368,.00197106,0,.457545,.656049,.00187022,0,.482881,.638188,.00177605,0,.508992,.620177,.00168482,0,.535899,.601506,.00158909,0,.563619,.58362,.00150583,0,.592165,.565496,.00141791,0,.621544,.54789,.00133693,0,.651743,.530323,.00126038,0,.682709,.512795,.00118556,0,.714286,.495199,.00111527,0,.746032,.478101,.0010489,0,.777778,.461511,984264e-9,0,.809524,.444879,92591e-8,0,.84127,.428424,866582e-9,0,.873016,.412495,814463e-9,0,.904762,.396975,764498e-9,0,.936508,.381614,715967e-9,0,.968254,.366732,672483e-9,0,1,1,.00155501,0,0,1,.00155503,0,0,1,.00155524,0,0,.999998,.00155615,0,0,.999994,.0015586,0,0,.999983,.00156379,0,0,.999963,.0015733,0,0,.999932,.00158911,0,0,.999882,.00161376,0,0,.99981,.00165041,0,100875e-10,.999708,.00170304,0,367658e-9,.999565,.00177658,0,.0014234,.999368,.00187688,0,.00327939,.999081,.00200989,0,.00596629,.99852,.00217177,0,.0094852,.99549,.0021745,0,.013824,.993252,.00222357,0,.0189642,.991727,.00235022,0,.0248856,.989951,.00250561,0,.0315669,.988029,.00268829,0,.0389882,.984029,.0027496,0,.0471302,.980683,.00289793,0,.0559754,.976554,.00303315,0,.0655081,.97139,.00313257,0,.0757138,.965544,.00323656,0,.08658,.95912,.00333432,0,.0980954,.951183,.0034039,0,.110251,.942974,.00347515,0,.123038,.932642,.00350381,0,.13645,.922158,.00354519,0,.150482,.909404,.00353851,0,.165129,.896071,.0035435,0,.18039,.881206,.00349936,0,.196263,.866077,.00347256,0,.212748,.85093,.003415,0,.229847,.837703,.00333367,0,.247561,.823878,.003249,0,.265895,.809449,.00316347,0,.284854,.794379,.00306351,0,.304445,.778138,.0029499,0,.324675,.761997,.00284099,0,.345555,.744938,.00272104,0,.367095,.727212,.00260715,0,.389309,.709549,.00248855,0,.41221,.691704,.00236783,0,.435814,.673689,.00225178,0,.460138,.656453,.00213765,0,.485203,.639128,.00202178,0,.511028,.621512,.00191443,0,.537634,.603598,.00180977,0,.565041,.58559,.00170456,0,.593268,.567852,.00160927,0,.622327,.5503,.00151395,0,.652217,.533033,.00142499,0,.682907,.515942,.00133955,0,.714296,.498814,.0012602,0,.746032,.481595,.00118188,0,.777778,.465117,.00111171,0,.809524,.448865,.00104091,0,.84127,.432711,976618e-9,0,.873016,.416822,91859e-8,0,.904762,.401272,857704e-9,0,.936508,.386226,807172e-9,0,.968254,.371321,75464e-8,0,1,1,.00209596,0,0,1,.00209598,0,0,1,.00209624,0,0,.999997,.00209736,0,0,.999991,.00210039,0,0,.999979,.00210678,0,0,.999959,.00211847,0,0,.999925,.0021379,0,0,.99987,.00216809,0,0,.999791,.00221281,0,681487e-10,.999677,.00227669,0,658161e-9,.999521,.00236533,0,.00200635,.999301,.00248514,0,.0041779,.998977,.00264185,0,.00718648,.998191,.00281695,0,.0110239,.994801,.00278518,0,.015672,.993091,.00288774,0,.0211091,.991571,.00303931,0,.0273123,.9897,.00321643,0,.034259,.987023,.00337332,0,.0419282,.983289,.00346146,0,.0502998,.979892,.00363704,0,.0593562,.975111,.00373601,0,.069081,.970351,.0038842,0,.0794598,.964131,.00397053,0,.0904798,.957747,.00408078,0,.10213,.949536,.00413533,0,.1144,.941372,.00420305,0,.127284,.931049,.00422815,0,.140772,.920647,.00425048,0,.154862,.908033,.0042281,0,.169548,.895028,.00422026,0,.184828,.879968,.00415042,0,.200701,.864875,.00408821,0,.217167,.84918,.00400909,0,.234227,.834934,.00391178,0,.251884,.821397,.00380066,0,.270141,.807135,.00367974,0,.289004,.792363,.00355172,0,.308479,.776661,.003411,0,.328575,.760705,.00328123,0,.349301,.744408,.00314003,0,.370668,.726994,.0029906,0,.392689,.709598,.00285034,0,.415379,.692112,.00271179,0,.438754,.674435,.00257185,0,.46283,.65676,.00243425,0,.48763,.639982,.00230351,0,.513173,.622983,.0021777,0,.539482,.605471,.00204991,0,.566579,.58796,.00193759,0,.594488,.570463,.00181976,0,.623226,.553058,.00171497,0,.6528,.535894,.00161109,0,.683198,.519089,.00151394,0,.714354,.502454,.00142122,0,.746032,.485681,.00133488,0,.777778,.468935,.00124975,0,.809524,.452951,.00117309,0,.84127,.437139,.00110155,0,.873016,.421446,.00103124,0,.904762,.405951,966387e-9,0,.936508,.391003,908119e-9,0,.968254,.376198,848057e-9,0,1,1,.00280076,0,0,1,.00280078,0,0,.999999,.00280109,0,0,.999997,.00280246,0,0,.999992,.00280616,0,0,.999979,.00281396,0,0,.999956,.00282822,0,0,.999916,.00285186,0,0,.999857,.0028885,0,0,.999768,.00294259,0,196026e-9,.999645,.00301946,0,.00104842,.99947,.00312541,0,.00270199,.999229,.00326733,0,.00519449,.998852,.00344992,0,.00852602,.997558,.00361052,0,.0126804,.994417,.0035898,0,.017635,.992824,.00372393,0,.023365,.991344,.00390695,0,.0298456,.989337,.00410392,0,.0370529,.985811,.00420987,0,.0449651,.982772,.00437488,0,.0535615,.979001,.00455069,0,.0628243,.974102,.00464462,0,.0727368,.969197,.00480577,0,.0832844,.962759,.00487818,0,.0944545,.956207,.00498176,0,.106236,.947909,.00503392,0,.118619,.939596,.00507474,0,.131595,.929642,.00509798,0,.145159,.918807,.00508476,0,.159305,.906921,.00505634,0,.174028,.893312,.00498845,0,.189327,.878933,.0049133,0,.2052,.863986,.0048259,0,.221647,.847936,.00470848,0,.23867,.832253,.00456889,0,.25627,.818619,.00442726,0,.274453,.804788,.00427677,0,.293222,.790241,.00411906,0,.312585,.775162,.00394833,0,.33255,.759463,.00377366,0,.353126,.743598,.00361026,0,.374324,.72697,.00343627,0,.396158,.709646,.00326422,0,.418641,.69277,.00309717,0,.44179,.675371,.0029356,0,.465624,.657863,.00277712,0,.490163,.640772,.00261738,0,.515429,.624441,.0024737,0,.541445,.607497,.00233125,0,.568236,.590438,.00218994,0,.595828,.573224,.0020664,0,.624242,.556168,.00193526,0,.653496,.539232,.00182463,0,.683588,.522352,.00170735,0,.714482,.506172,.00160555,0,.746032,.489842,.00150451,0,.777778,.473463,.00140938,0,.809524,.457266,.00132568,0,.84127,.441609,.0012376,0,.873016,.426348,.00116265,0,.904762,.411002,.00108935,0,.936508,.396045,.00101946,0,.968254,.381448,955665e-9,0,1,1,.0037121,0,0,1,.00371213,0,0,1,.00371251,0,0,.999997,.00371417,0,0,.99999,.00371863,0,0,.999977,.00372807,0,0,.99995,.00374529,0,0,.999908,.0037738,0,0,.999843,.00381789,0,123596e-10,.999745,.00388273,0,407442e-9,.999608,.00397443,0,.0015447,.999415,.00409998,0,.00351385,.999143,.00426662,0,.0063316,.9987,.00447625,0,.00998679,.996363,.00455323,0,.0144569,.994021,.00461052,0,.0197151,.992372,.00476359,0,.0257344,.991007,.00499101,0,.0324882,.988767,.0051972,0,.0399517,.984872,.00528407,0,.0481022,.982004,.00548926,0,.0569191,.977714,.00564385,0,.0663839,.973076,.0057693,0,.0764801,.967565,.0058924,0,.0871928,.961384,.00599629,0,.0985095,.954435,.00605998,0,.110419,.946303,.0061133,0,.122912,.937662,.00612028,0,.13598,.927867,.00612209,0,.149617,.916475,.00604813,0,.163817,.90541,.00603088,0,.178577,.891591,.00592218,0,.193894,.877573,.00578854,0,.209767,.862511,.00566648,0,.226196,.846861,.00551481,0,.243182,.83068,.00533754,0,.260728,.815725,.00515487,0,.278837,.802321,.0049655,0,.297515,.787826,.00475421,0,.316768,.773454,.00456002,0,.336605,.758224,.00434727,0,.357034,.74265,.00414444,0,.378067,.726729,.00393738,0,.399717,.710155,.00373575,0,.421998,.693312,.00353736,0,.444928,.67653,.00334368,0,.468523,.659444,.00315981,0,.492806,.642051,.00297809,0,.517798,.625758,.00280592,0,.543525,.609615,.00264254,0,.570012,.592919,.00248459,0,.597288,.576298,.00233327,0,.625379,.559489,.00219519,0,.654307,.542891,.00205441,0,.684084,.526255,.00193385,0,.714693,.509853,.00180745,0,.746044,.494131,.00169817,0,.777778,.478114,.0015913,0,.809524,.462274,.00148981,0,.84127,.446412,.00139537,0,.873016,.431274,.00130984,0,.904762,.41635,.00122403,0,.936508,.401476,.00114809,0,.968254,.386993,.00107563,0,1,1,.00488216,0,0,1,.0048822,0,0,1,.00488265,0,0,.999997,.00488463,0,0,.999988,.00488999,0,0,.999974,.00490129,0,0,.999946,.00492191,0,0,.999897,.00495598,0,0,.999825,.00500855,0,744791e-10,.999718,.00508559,0,712744e-9,.999565,.005194,0,.00215249,.999352,.00534147,0,.00444576,.999046,.00553523,0,.00759218,.998492,.00577016,0,.0115714,.995564,.00578487,0,.0163557,.993339,.00586414,0,.021915,.991834,.00606002,0,.0282201,.990496,.00633312,0,.0352433,.987826,.00651941,0,.042959,.98383,.00660842,0,.0513439,.98109,.00685523,0,.0603772,.976131,.00695778,0,.0700402,.971922,.00714236,0,.0803163,.965901,.00721437,0,.0911908,.959606,.00732017,0,.102651,.952504,.00735788,0,.114686,.944365,.00738493,0,.127286,.935652,.00737969,0,.140443,.925813,.00733612,0,.154151,.914397,.00723094,0,.168405,.903257,.00714002,0,.183201,.890015,.00700149,0,.198536,.876014,.00682813,0,.214409,.861436,.00665567,0,.23082,.845752,.00644526,0,.24777,.829169,.00621635,0,.265263,.813435,.00597789,0,.283301,.799701,.00575694,0,.301889,.785726,.00549866,0,.321035,.77152,.0052503,0,.340746,.75683,.00499619,0,.361032,.741951,.0047543,0,.381904,.726367,.0045084,0,.403374,.710537,.00426784,0,.425457,.693965,.00403487,0,.448169,.677724,.0038075,0,.47153,.66117,.00359431,0,.495561,.644274,.00338354,0,.520284,.627449,.00318163,0,.545725,.611645,.00299672,0,.571911,.595614,.00281016,0,.598873,.579426,.00264252,0,.62664,.563016,.00247509,0,.655239,.546728,.00232647,0,.684692,.530539,.00217803,0,.714999,.514164,.00204216,0,.746106,.498344,.00191403,0,.777778,.482957,.00179203,0,.809524,.467336,.00167695,0,.84127,.451994,.00157567,0,.873016,.436514,.00147113,0,.904762,.42178,.00138034,0,.936508,.407271,.00129219,0,.968254,.392822,.0012098,0,1,1,.00637427,0,0,1,.00637431,0,0,.999999,.00637485,0,0,.999996,.00637721,0,0,.999987,.00638357,0,0,.999971,.006397,0,0,.999939,.00642142,0,0,.999888,.00646177,0,0,.999807,.00652387,0,207916e-9,.999689,.00661454,0,.00112051,.99952,.00674155,0,.00287719,.999283,.00691313,0,.00550145,.998936,.00713598,0,.00897928,.998165,.00738501,0,.0132829,.994847,.00734388,0,.01838,.993182,.00749991,0,.0242381,.991665,.0077246,0,.030826,.989708,.00797579,0,.0381152,.986663,.00813011,0,.0460794,.983288,.00830365,0,.0546951,.980104,.00853496,0,.0639411,.974855,.00861045,0,.0737988,.97045,.00879133,0,.0842516,.964509,.00886377,0,.0952848,.957594,.00890346,0,.106886,.950546,.00893289,0,.119044,.942225,.00890074,0,.131749,.933365,.00886826,0,.144994,.923202,.0087316,0,.158772,.912605,.00863082,0,.173078,.901099,.00847403,0,.187908,.888177,.00825838,0,.203261,.873955,.00801834,0,.219134,.860091,.00779026,0,.235527,.84434,.00752478,0,.252443,.828517,.00724074,0,.269883,.81239,.00693769,0,.287851,.79721,.00664817,0,.306352,.783489,.00634763,0,.325393,.769514,.00604221,0,.344981,.755419,.00573568,0,.365126,.741083,.00544359,0,.385839,.726059,.00515515,0,.407132,.710809,.00487139,0,.42902,.695052,.00459846,0,.45152,.678886,.00433412,0,.474651,.663042,.00407981,0,.498433,.646634,.00384264,0,.52289,.630117,.00360897,0,.548048,.613804,.00338863,0,.573936,.598338,.00318486,0,.600584,.582687,.00298377,0,.628027,.566809,.00280082,0,.656295,.550817,.00262255,0,.685417,.534937,.00245835,0,.715406,.519151,.00230574,0,.74624,.503118,.0021549,0,.777778,.487723,.00202008,0,.809524,.472725,.00189355,0,.84127,.457599,.00177108,0,.873016,.442558,.00165843,0,.904762,.427624,.00155494,0,.936508,.413171,.00145273,0,.968254,.399122,.00136454,0,1,1,.00826496,0,0,1,.00826499,0,0,1,.00826564,0,0,.999996,.00826842,0,0,.999987,.00827589,0,0,.999967,.00829167,0,0,.999933,.00832037,0,0,.999876,.00836768,0,109338e-10,.999786,.00844031,0,427145e-9,.999655,.00854603,0,.0016384,.999468,.00869337,0,.00372392,.999203,.008891,0,.00668513,.998803,.00914387,0,.0104968,.99748,.00935838,0,.015125,.994446,.00933309,0,.0205338,.99292,.00953084,0,.0266884,.991414,.0097893,0,.0335565,.989049,.0100228,0,.0411086,.98582,.0101664,0,.0493181,.982441,.0103582,0,.0581613,.978595,.0105292,0,.0676169,.973495,.0106274,0,.0776661,.968405,.0107261,0,.0882926,.962717,.0108234,0,.0994817,.955478,.0108102,0,.111221,.948275,.0107914,0,.123499,.940006,.0107161,0,.136308,.930831,.0106309,0,.149639,.920648,.0104083,0,.163485,.910205,.0102312,0,.177843,.898445,.0100051,0,.192707,.885986,.00971928,0,.208077,.872204,.00940747,0,.22395,.858436,.0091085,0,.240326,.843454,.00876595,0,.257208,.827437,.00839794,0,.274596,.811488,.00803692,0,.292496,.796039,.00767352,0,.310911,.781083,.0073097,0,.329849,.767642,.00694032,0,.349316,.753901,.00657476,0,.369323,.740131,.00622699,0,.38988,.725845,.0058838,0,.410999,.710991,.00555586,0,.432696,.696002,.00523089,0,.454987,.680461,.00492494,0,.47789,.664875,.00463464,0,.501426,.649273,.00435422,0,.52562,.63302,.0040875,0,.550498,.61705,.00384075,0,.576089,.601154,.00359557,0,.602427,.586008,.00337636,0,.629544,.570699,.00316019,0,.657479,.555166,.00296033,0,.686264,.539645,.00277552,0,.715924,.524159,.00259499,0,.746459,.508682,.00243257,0,.777789,.493163,.00227851,0,.809524,.478004,.00213083,0,.84127,.46347,.00199502,0,.873016,.448778,.00186967,0,.904762,.434105,.00174732,0,.936508,.419576,.00163861,0,.968254,.405541,.00153341,0,1,1,.0106462,0,0,1,.0106462,0,0,.999999,.010647,0,0,.999995,.0106502,0,0,.999985,.0106589,0,0,.999964,.0106773,0,0,.999925,.0107106,0,0,.999861,.0107655,0,712986e-10,.999763,.0108497,0,743959e-9,.999616,.0109716,0,.00227361,.999408,.0111408,0,.0046983,.999112,.0113659,0,.00800158,.998637,.0116475,0,.0121493,.996223,.0117231,0,.0171023,.994006,.0118064,0,.0228218,.992444,.0120254,0,.0292711,.991028,.0123314,0,.036417,.98803,.0124954,0,.0442295,.984816,.0126538,0,.0526815,.981399,.0128537,0,.0617492,.977085,.0129694,0,.0714114,.972154,.013091,0,.0816495,.966617,.0131166,0,.0924472,.960628,.0131583,0,.10379,.953295,.0131094,0,.115665,.94575,.0129966,0,.128062,.937654,.0128796,0,.140972,.927716,.0126477,0,.154387,.917932,.0123889,0,.168301,.907719,.012131,0,.182709,.89584,.0118013,0,.197608,.883526,.0114145,0,.212994,.870301,.0110075,0,.228867,.856272,.0106019,0,.245227,.842251,.0101938,0,.262074,.826466,.00973254,0,.279412,.810859,.0092846,0,.297244,.795051,.00883304,0,.315575,.780053,.00840272,0,.334412,.76575,.00796438,0,.35376,.752298,.00752526,0,.373631,.739153,.00711486,0,.394034,.725514,.00670361,0,.414983,.711473,.00632656,0,.436491,.696936,.00595206,0,.458575,.682126,.00559191,0,.481253,.667027,.00525362,0,.504547,.651875,.00493805,0,.528481,.636463,.00462848,0,.553081,.620641,.00433936,0,.578377,.604931,.00407,0,.604404,.589549,.00380864,0,.631197,.574712,.00357049,0,.658795,.559775,.00334466,0,.687238,.544514,.00312505,0,.716559,.529555,.00293199,0,.746776,.514402,.00274204,0,.777849,.499302,.00256647,0,.809524,.484114,.00239901,0,.84127,.469308,.00225148,0,.873016,.455133,.00210178,0,.904762,.440939,.0019727,0,.936508,.426627,.00184382,0,.968254,.412509,.00172548,0,1,1,.013628,0,0,1,.0136281,0,0,.999999,.0136289,0,0,.999995,.0136327,0,0,.999983,.0136427,0,0,.99996,.0136638,0,0,.999917,.0137022,0,0,.999846,.0137652,0,204597e-9,.999736,.0138615,0,.00116837,.999573,.0140007,0,.00303325,.99934,.0141927,0,.00580613,.999004,.0144457,0,.00945626,.998407,.0147489,0,.0139421,.995464,.014731,0,.0192202,.993328,.0148283,0,.0252495,.991799,.0150797,0,.0319921,.990397,.0154316,0,.0394138,.986835,.0155005,0,.0474843,.983938,.0157308,0,.0561763,.980154,.0158753,0,.0654661,.975659,.0159581,0,.0753326,.970171,.0159832,0,.0857571,.964803,.0160084,0,.0967236,.958366,.0159484,0,.108218,.950613,.0158001,0,.120227,.942874,.0155845,0,.132741,.935005,.0154292,0,.145751,.924991,.0150742,0,.159249,.914814,.0146757,0,.17323,.904743,.0143097,0,.187687,.893216,.0138695,0,.202619,.880769,.0133706,0,.218021,.868136,.0128606,0,.233894,.85469,.0123403,0,.250238,.840593,.0118091,0,.267052,.825808,.011253,0,.284341,.81009,.0107099,0,.302106,.79504,.0101636,0,.320354,.779757,.00964041,0,.33909,.764697,.00911896,0,.358322,.750913,.00859533,0,.378059,.738175,.00811592,0,.398311,.725242,.00764504,0,.41909,.711864,.00718885,0,.440412,.698009,.00675843,0,.462292,.683841,.00634984,0,.484748,.669391,.00595502,0,.507802,.654731,.00558671,0,.531477,.639805,.00523578,0,.555802,.624789,.00490834,0,.580805,.609325,.00459448,0,.606522,.593975,.00430342,0,.63299,.578983,.00403019,0,.66025,.564442,.0037707,0,.688346,.549835,.0035316,0,.717319,.535039,.00330255,0,.7472,.520403,.00308932,0,.777982,.505687,.00289335,0,.809524,.490939,.00270818,0,.84127,.476233,.0025343,0,.873016,.461624,.00237097,0,.904762,.447833,.00222065,0,.936508,.433992,.00207561,0,.968254,.420147,.00194955,0,1,1,.0173415,0,0,1,.0173416,0,0,.999999,.0173426,0,0,.999995,.0173468,0,0,.999983,.0173582,0,0,.999954,.0173822,0,0,.999908,.0174258,0,669501e-11,.999828,.0174973,0,427399e-9,.999705,.0176063,0,.00171019,.999524,.0177631,0,.0039248,.999263,.0179781,0,.00705382,.998878,.018258,0,.0110552,.998012,.0185551,0,.0158812,.994614,.0184264,0,.0214852,.993132,.0186385,0,.0278239,.991563,.0189067,0,.0348585,.989298,.0191577,0,.0425544,.986036,.0192522,0,.050881,.982558,.0194063,0,.059811,.978531,.019486,0,.0693209,.974198,.0195847,0,.0793895,.968148,.0194749,0,.0899984,.962565,.0194277,0,.101132,.956041,.0192991,0,.112775,.947749,.0189893,0,.124917,.94018,.018704,0,.137547,.93165,.0183458,0,.150655,.921798,.0178775,0,.164236,.911573,.0173618,0,.178281,.901569,.0168482,0,.192788,.890341,.016265,0,.207752,.877835,.0156199,0,.223171,.865472,.0149516,0,.239044,.852905,.0143274,0,.255371,.838906,.0136643,0,.272153,.824888,.0129903,0,.289393,.809977,.0123218,0,.307093,.794697,.0116572,0,.325259,.780028,.0110307,0,.343896,.765124,.0104236,0,.363012,.750411,.0098219,0,.382617,.737264,.00924397,0,.402719,.724799,.00868719,0,.423332,.712253,.00816476,0,.444469,.699267,.00767262,0,.466146,.685618,.00719746,0,.488383,.671736,.00673916,0,.511199,.657777,.00631937,0,.534618,.643497,.00592411,0,.558668,.62889,.00553928,0,.58338,.614299,.0051934,0,.608787,.599197,.00485985,0,.634929,.584175,.00454357,0,.661849,.569541,.00425787,0,.689594,.555193,.00397905,0,.718211,.540947,.00372364,0,.747742,.526593,.00348599,0,.778205,.512335,.00326103,0,.80953,.498017,.00305137,0,.84127,.483609,.00285485,0,.873016,.469368,.00267472,0,.904762,.455037,.00249945,0,.936508,.441493,.00234792,0,.968254,.428147,.00219936,0,1,1,.0219422,0,0,1,.0219423,0,0,.999998,.0219434,0,0,.999993,.0219481,0,0,.999981,.021961,0,0,.999949,.0219879,0,0,.999896,.0220367,0,593194e-10,.999808,.0221167,0,75364e-8,.99967,.0222383,0,.00237884,.999466,.0224125,0,.00495612,.999174,.0226495,0,.00844887,.998725,.0229525,0,.0128058,.996979,.0231123,0,.0179742,.994317,.0230742,0,.0239047,.992781,.0232895,0,.0305526,.991191,.0235734,0,.0378786,.987787,.0236152,0,.0458475,.985092,.0237994,0,.0544287,.981121,.0238553,0,.0635952,.976924,.0238706,0,.0733233,.97218,.0238704,0,.0835922,.965956,.0236598,0,.0943839,.959998,.0234735,0,.105682,.953245,.0232277,0,.117474,.944445,.0226973,0,.129747,.937087,.0223527,0,.142491,.928341,.0218144,0,.155697,.9184,.0211516,0,.169358,.907959,.0204553,0,.183469,.89808,.0197673,0,.198024,.887047,.0189915,0,.21302,.875221,.0182082,0,.228455,.86269,.0173584,0,.244329,.850735,.0165718,0,.260639,.837545,.0157524,0,.277389,.823639,.0149482,0,.29458,.809699,.0141431,0,.312216,.794797,.0133527,0,.3303,.780578,.0126193,0,.34884,.766019,.0118914,0,.367842,.751447,.0111839,0,.387315,.737275,.010514,0,.40727,.724545,.00987277,0,.427717,.712644,.00926569,0,.448671,.700432,.00869029,0,.470149,.687664,.00814691,0,.492167,.674288,.00763012,0,.514746,.660966,.00714437,0,.537911,.647264,.00668457,0,.561688,.633431,.00626581,0,.586108,.619133,.00585593,0,.611206,.604935,.00548188,0,.637022,.590236,.00513288,0,.663599,.575473,.0047906,0,.690989,.561228,.00448895,0,.719242,.547054,.00420233,0,.748411,.533175,.00392869,0,.778531,.519163,.00367445,0,.809583,.505328,.00344097,0,.84127,.491446,.00322003,0,.873016,.477356,.00301283,0,.904762,.46356,.00282592,0,.936508,.449623,.00264956,0,.968254,.436068,.00246956,0,1,1,.0276135,0,0,1,.0276136,0,0,.999998,.0276148,0,0,.999993,.0276201,0,0,.999976,.0276342,0,0,.999945,.027664,0,0,.999884,.0277179,0,18679e-8,.999784,.027806,0,.00119607,.99963,.0279394,0,.00318407,.999401,.0281295,0,.00613601,.999066,.0283858,0,.00999963,.998524,.0287027,0,.0147164,.995702,.0286256,0,.0202295,.993593,.0286733,0,.0264876,.992067,.0288989,0,.0334452,.990548,.0292135,0,.0410621,.986775,.0291296,0,.0493032,.984054,.0293099,0,.0581381,.979481,.0291881,0,.0675397,.975297,.0291598,0,.0774848,.96981,.028954,0,.0879528,.963524,.028628,0,.0989258,.957398,.0283135,0,.110388,.950088,.0278469,0,.122327,.941538,.0271798,0,.134729,.933332,.0265388,0,.147587,.924392,.0257776,0,.160889,.914581,.024916,0,.174631,.904347,.0240242,0,.188806,.894324,.0231229,0,.203409,.883724,.022153,0,.218437,.872207,.0211355,0,.233888,.859927,.0201048,0,.249761,.848373,.0191263,0,.266056,.836023,.0181306,0,.282774,.82289,.0171718,0,.299917,.809324,.0162196,0,.317488,.795361,.0152622,0,.335493,.781253,.01439,0,.353936,.767338,.013533,0,.372825,.753156,.0127244,0,.392168,.739122,.0119454,0,.411976,.725358,.0112054,0,.432259,.712949,.010487,0,.453032,.701621,.00984032,0,.47431,.689703,.00921495,0,.496111,.677216,.00862492,0,.518456,.664217,.00806882,0,.541367,.65137,.00755922,0,.564872,.638,.00705705,0,.589001,.62453,.00661266,0,.613789,.610601,.00618432,0,.639277,.59676,.00578033,0,.66551,.582433,.00540927,0,.692539,.568026,.00506104,0,.720422,.55414,.0047353,0,.749216,.540178,.00442889,0,.778974,.526513,.00414363,0,.809711,.512954,.00388237,0,.84127,.499403,.00362875,0,.873016,.486026,.00340827,0,.904762,.472345,.00318598,0,.936508,.458828,.00297635,0,.968254,.445379,.00279447,0,1,1,.0345716,0,0,1,.0345717,0,0,.999999,.034573,0,0,.999991,.0345787,0,0,.999974,.0345941,0,0,.999937,.0346263,0,188589e-11,.999869,.0346847,0,409238e-9,.999757,.0347798,0,.0017674,.999582,.0349233,0,.00413658,.999322,.0351265,0,.00747408,.998939,.0353967,0,.0117157,.998219,.0357018,0,.0167966,.994974,.0354726,0,.0226572,.993201,.0355621,0,.0292445,.991573,.0357641,0,.0365123,.989301,.0359252,0,.0444203,.985712,.0358017,0,.0529334,.982411,.0358353,0,.0620214,.977827,.035617,0,.0716574,.973278,.0354398,0,.0818186,.967397,.0350483,0,.0924846,.960696,.0344795,0,.103638,.954349,.0339861,0,.115263,.946066,.0331323,0,.127348,.938012,.032359,0,.13988,.929413,.0314413,0,.152849,.920355,.0304103,0,.166248,.910586,.0292785,0,.18007,.900609,.0281391,0,.194308,.890093,.0269103,0,.208958,.880013,.0257269,0,.224018,.869001,.0244671,0,.239485,.85751,.0232252,0,.255359,.84582,.0220117,0,.271638,.834383,.0208274,0,.288324,.822158,.0196628,0,.305419,.809056,.0185306,0,.322927,.795832,.0174174,0,.340851,.782547,.0163758,0,.359199,.7689,.015391,0,.377975,.755526,.0144488,0,.397189,.741681,.0135372,0,.416851,.728178,.0126957,0,.436971,.714642,.0118812,0,.457564,.702756,.0111165,0,.478644,.69175,.0104145,0,.500229,.680159,.00974439,0,.522339,.668073,.00911926,0,.544997,.655405,.00851393,0,.56823,.642921,.00797637,0,.592068,.629993,.00745119,0,.616546,.616828,.00696972,0,.641705,.603305,.00652425,0,.66759,.589833,.00610188,0,.694255,.575945,.00570834,0,.72176,.561745,.00533384,0,.750168,.548277,.00500001,0,.779545,.534467,.00467582,0,.809933,.521032,.00438092,0,.841272,.507877,.00410348,0,.873016,.494654,.00383618,0,.904762,.481592,.00358699,0,.936508,.468509,.00337281,0,.968254,.455293,.00316196,0,1,1,.0430698,0,0,1,.0430699,0,0,.999998,.0430713,0,0,.999991,.0430773,0,0,.99997,.0430936,0,0,.999928,.0431277,0,406396e-10,.999852,.0431893,0,744376e-9,.999724,.0432895,0,.0024806,.999527,.0434397,0,.00524779,.99923,.0436507,0,.00898164,.998783,.0439255,0,.0136083,.997507,.0441104,0,.0190582,.994418,.0438225,0,.0252694,.992864,.0439396,0,.0321879,.991127,.0440962,0,.039767,.987331,.0438408,0,.0479667,.984819,.0438991,0,.056752,.980384,.0435906,0,.0660929,.975846,.0432543,0,.075963,.970748,.0428293,0,.0863398,.964303,.042153,0,.0972035,.95772,.0414111,0,.108537,.950747,.0405893,0,.120325,.942533,.0394887,0,.132554,.934045,.0383544,0,.145215,.924942,.037057,0,.158296,.915811,.0356993,0,.17179,.90612,.0342401,0,.185691,.896434,.0328078,0,.199993,.886021,.031288,0,.214691,.876081,.0297776,0,.229782,.865608,.0282334,0,.245265,.854924,.026749,0,.261138,.843607,.02526,0,.277401,.832456,.0238214,0,.294056,.821342,.0224682,0,.311104,.809303,.0211297,0,.328548,.796468,.0198387,0,.346394,.784046,.0186227,0,.364645,.771262,.0174561,0,.38331,.758118,.0163806,0,.402396,.745075,.0153287,0,.421912,.731926,.0143647,0,.44187,.71863,.0134363,0,.462283,.705414,.0125603,0,.483165,.693792,.0117508,0,.504535,.683108,.0110016,0,.52641,.67183,.0102757,0,.548816,.66015,.00962044,0,.571776,.647907,.00898031,0,.595323,.635734,.00840811,0,.619489,.623208,.00786211,0,.644317,.610438,.00734953,0,.669852,.597345,.00687688,0,.696148,.584138,.00643469,0,.723267,.5707,.00602236,0,.75128,.556966,.0056324,0,.780258,.543607,.00528277,0,.810268,.530213,.00493999,0,.841311,.516912,.00462265,0,.873016,.503916,.0043307,0,.904762,.491146,.00406858,0,.936508,.478439,.00381436,0,.968254,.465834,.00358003,0,1,1,.0534039,0,0,1,.053404,0,0,.999998,.0534055,0,0,.999989,.0534116,0,0,.999968,.0534283,0,0,.999918,.0534633,0,155895e-9,.99983,.0535262,0,.00120914,.999685,.0536281,0,.00334944,.999461,.0537799,0,.00653077,.999119,.0539902,0,.0106718,.998582,.0542524,0,.0156907,.995919,.0540318,0,.0215147,.993735,.0538914,0,.0280801,.992126,.0539557,0,.0353323,.990266,.0540401,0,.0432247,.986317,.0536064,0,.0517172,.983213,.0534425,0,.0607754,.978303,.0528622,0,.0703698,.973665,.0523363,0,.0804742,.968091,.0516165,0,.0910667,.961026,.0505434,0,.102128,.954333,.049523,0,.113641,.946372,.0481698,0,.125591,.938254,.0467674,0,.137965,.929516,.0452341,0,.150754,.920106,.0435083,0,.163947,.910899,.0417399,0,.177537,.901532,.0399389,0,.191516,.891919,.0380901,0,.205881,.882006,.0362341,0,.220626,.871965,.0343444,0,.235749,.862145,.0324832,0,.251248,.852058,.0306681,0,.267121,.84161,.0289097,0,.283368,.830806,.0272079,0,.299992,.820476,.0256089,0,.316992,.809514,.0240394,0,.334374,.797865,.0225379,0,.35214,.785621,.0211235,0,.370296,.773765,.0197908,0,.388849,.761629,.0185235,0,.407807,.748891,.0173358,0,.427178,.736437,.0162305,0,.446974,.723707,.0151778,0,.467207,.710606,.0141791,0,.487892,.698019,.0132592,0,.509046,.686203,.0123887,0,.530687,.675692,.0115976,0,.552839,.664826,.0108325,0,.575527,.65349,.0101348,0,.59878,.641774,.00947756,0,.622634,.629794,.00886058,0,.647128,.617647,.00828526,0,.672308,.60534,.00775312,0,.698231,.592718,.00726033,0,.724958,.579746,.00679731,0,.752563,.566763,.00636111,0,.781127,.553515,.00595228,0,.810733,.540118,.00556876,0,.841426,.527325,.00523051,0,.873016,.514265,.00490712,0,.904762,.501406,.00460297,0,.936508,.488922,.00431247,0,.968254,.476541,.0040472,0,1,1,.0659184,0,0,1,.0659185,0,0,.999998,.06592,0,0,.999988,.0659259,0,0,.999963,.0659423,0,0,.999907,.0659764,0,374198e-9,.999806,.0660376,0,.00182071,.999639,.0661361,0,.0043894,.999378,.0662814,0,.00800055,.998985,.0664779,0,.0125594,.998285,.0666914,0,.0179786,.995071,.0661989,0,.0241822,.993172,.0660454,0,.031106,.991438,.0660105,0,.0386952,.988428,.0656875,0,.0469032,.985218,.0652913,0,.0556905,.981128,.0647107,0,.065023,.976015,.0638491,0,.0748717,.97097,.062993,0,.0852112,.964582,.0617927,0,.0960199,.957383,.0603626,0,.107279,.949969,.0588128,0,.118971,.941843,.0570274,0,.131084,.933624,.0551885,0,.143604,.924543,.053122,0,.156521,.914919,.0508897,0,.169825,.905773,.0486418,0,.18351,.896434,.0463364,0,.197569,.887195,.0440623,0,.211997,.877706,.0417799,0,.226789,.867719,.03945,0,.241944,.858587,.037243,0,.257458,.849317,.0350956,0,.273331,.839585,.0329852,0,.289563,.829856,.0310028,0,.306154,.819589,.0290953,0,.323108,.809714,.0272738,0,.340426,.79934,.0255631,0,.358113,.788224,.0239175,0,.376175,.776619,.0223831,0,.394616,.76521,.0209298,0,.413445,.753716,.0195786,0,.432671,.741564,.0183001,0,.452305,.729413,.0171259,0,.472358,.717146,.0159933,0,.492845,.70436,.0149495,0,.513783,.69219,.0139681,0,.535189,.680289,.0130577,0,.557087,.669611,.0122198,0,.5795,.659113,.0114174,0,.602459,.648148,.0106729,0,.625997,.636905,.00998997,0,.650154,.625154,.00934313,0,.674976,.613481,.00874839,0,.700518,.60154,.00818265,0,.726845,.58943,.00766889,0,.754032,.576828,.00717153,0,.782167,.564194,.00672696,0,.811344,.551501,.00630863,0,.841644,.538635,.00592177,0,.873016,.525724,.00554888,0,.904762,.513209,.00520225,0,.936508,.500457,.00488231,0,.968254,.48799,.00457153,0,1,1,.0810131,0,0,1,.0810133,0,0,.999997,.0810145,0,0,.999985,.08102,0,0,.999956,.0810347,0,195026e-10,.999893,.0810656,0,719316e-9,.999777,.0811205,0,.00259774,.999583,.081208,0,.00561807,.999281,.0813343,0,.00967472,.998813,.0814969,0,.0146627,.997597,.0815217,0,.0204902,.994379,.0808502,0,.0270802,.992744,.0806792,0,.0343674,.990745,.0804589,0,.0422974,.986646,.0796107,0,.0508242,.983611,.0790913,0,.0599087,.978869,.0780746,0,.0695175,.973475,.0768218,0,.0796223,.967845,.0754926,0,.0901983,.960778,.0737063,0,.101224,.953333,.0718052,0,.112682,.945274,.0695946,0,.124555,.936955,.0672492,0,.136831,.928319,.0647732,0,.149496,.919075,.0620947,0,.162542,.909114,.0591816,0,.175958,.900137,.0563917,0,.189739,.891069,.0535392,0,.203877,.882262,.0507642,0,.218368,.873232,.0479793,0,.233208,.864042,.045226,0,.248393,.855002,.0425413,0,.263923,.846569,.0400126,0,.279796,.837714,.0375269,0,.296012,.828918,.0352027,0,.312573,.819783,.0330011,0,.329479,.810129,.0308908,0,.346734,.800866,.0289112,0,.364342,.79093,.0270255,0,.382307,.780593,.0252758,0,.400637,.769511,.0236178,0,.419337,.758558,.0220652,0,.438418,.747632,.0206289,0,.457889,.736146,.0192873,0,.477761,.724093,.0180333,0,.49805,.71234,.0168264,0,.51877,.700201,.015746,0,.53994,.687949,.0147027,0,.561581,.676163,.0137512,0,.583718,.665001,.0128655,0,.60638,.65472,.0120366,0,.629599,.644213,.0112604,0,.653415,.633382,.0105413,0,.677874,.62212,.00986498,0,.70303,.610631,.00923308,0,.728948,.599078,.00864206,0,.755706,.587519,.00811784,0,.783396,.575505,.00761237,0,.812121,.563148,.00713949,0,.841989,.550828,.00668379,0,.873035,.538458,.00627715,0,.904762,.525905,.00588336,0,.936508,.513517,.00552687,0,.968254,.501395,.00519681,0,1,1,.0991506,0,0,1,.0991504,0,0,.999996,.0991515,0,0,.999984,.0991558,0,0,.999947,.0991672,0,114389e-9,.999874,.0991912,0,.00121503,.999739,.0992331,0,.00356108,.999514,.0992983,0,.00705578,.999159,.0993877,0,.011574,.998586,.0994837,0,.017003,.995731,.0988425,0,.0232484,.993384,.098276,0,.0302318,.991615,.0979269,0,.0378884,.989029,.0973432,0,.0461641,.985373,.0963539,0,.0550136,.981278,.0952306,0,.0643988,.975777,.0936233,0,.0742868,.970526,.0920219,0,.0846501,.963755,.0898912,0,.0954644,.956676,.0876064,0,.106709,.948099,.0847751,0,.118367,.939718,.0818638,0,.130423,.931305,.078857,0,.142862,.922342,.0756127,0,.155674,.912842,.0721473,0,.168849,.903304,.0686195,0,.182378,.89411,.0650589,0,.196255,.885512,.0616022,0,.210473,.877193,.0582434,0,.225027,.86877,.0548979,0,.239915,.860267,.0516095,0,.255132,.851915,.048468,0,.270678,.843912,.0454447,0,.286551,.83604,.0425612,0,.302751,.828245,.0398752,0,.31928,.820159,.0373198,0,.336138,.81167,.034916,0,.35333,.802659,.0326402,0,.370858,.793921,.0304901,0,.388728,.784713,.0284857,0,.406944,.774946,.0266186,0,.425515,.76448,.0248593,0,.444449,.753793,.0232114,0,.463756,.743506,.0217039,0,.483447,.732555,.0202841,0,.503535,.720965,.0189648,0,.524036,.709422,.0177189,0,.544968,.697756,.0165626,0,.56635,.685565,.015483,0,.588208,.673987,.0144892,0,.610569,.66244,.0135607,0,.633466,.651675,.0126956,0,.656936,.641598,.0118788,0,.681025,.63121,.0111261,0,.705788,.620514,.010437,0,.731289,.609366,.00978747,0,.757606,.598137,.00917257,0,.784834,.586966,.00859778,0,.813085,.575549,.00806803,0,.842485,.563797,.00757294,0,.87313,.551758,.00710592,0,.904762,.539894,.0066841,0,.936508,.527901,.00627901,0,.968254,.515819,.00590506,0,1,1,.120864,0,0,1,.120864,0,0,.999996,.120864,0,0,.99998,.120867,0,0,.99994,.120872,0,323781e-9,.999852,.120884,0,.00188693,.999693,.120903,0,.00473489,.999426,.120929,0,.00872704,.999002,.120955,0,.0137237,.998235,.120918,0,.0196068,.994608,.119764,0,.0262803,.992997,.119265,0,.0336657,.990968,.11863,0,.0416987,.987002,.117261,0,.0503261,.983524,.116009,0,.0595035,.97875,.114252,0,.0691935,.972652,.11193,0,.0793645,.966613,.109555,0,.0899894,.959275,.106612,0,.101045,.951272,.103375,0,.112512,.942323,.0996594,0,.124372,.933679,.0958841,0,.136611,.924822,.0919265,0,.149216,.915742,.0878061,0,.162176,.906348,.0834894,0,.175482,.896883,.079085,0,.189125,.88774,.0746745,0,.203098,.87986,.0705773,0,.217396,.871998,.0665005,0,.232015,.864325,.0625413,0,.24695,.856685,.0586781,0,.2622,.84925,.0550063,0,.277761,.841719,.0514727,0,.293634,.834755,.0481398,0,.309819,.827853,.0450172,0,.326315,.820888,.0420969,0,.343126,.813616,.0393702,0,.360254,.805767,.0367771,0,.377701,.797338,.0343274,0,.395474,.789122,.0320529,0,.413577,.780601,.0299485,0,.432018,.771424,.0279812,0,.450804,.761502,.0261054,0,.469944,.751166,.0243942,0,.489451,.741276,.0228087,0,.509337,.730898,.0213265,0,.529617,.719878,.0199307,0,.550307,.708379,.0186574,0,.571428,.697165,.0174446,0,.593003,.685554,.0163144,0,.615059,.673631,.015276,0,.637628,.662385,.0143003,0,.660746,.651059,.0134112,0,.68446,.640451,.0125794,0,.70882,.630536,.011793,0,.733893,.620316,.0110547,0,.759756,.609722,.0103668,0,.786505,.598804,.00973009,0,.814259,.587871,.00912812,0,.843157,.577121,.00858916,0,.87334,.566019,.00807333,0,.904762,.554664,.00759687,0,.936508,.543101,.00714759,0,.968254,.531558,.00673418,0,1,1,.146767,0,0,1,.146767,0,0,.999997,.146767,0,0,.999977,.146765,0,320658e-11,.999929,.146762,0,682576e-9,.999823,.146753,0,.00276402,.999633,.146735,0,.00614771,.999314,.146699,0,.0106613,.998796,.14662,0,.0161546,.997124,.146107,0,.0225063,.994062,.144857,0,.0296198,.992154,.144011,0,.037417,.989186,.142712,0,.0458348,.985279,.140926,0,.0548211,.980826,.13885,0,.0643326,.975056,.136168,0,.074333,.969005,.133217,0,.0847917,.961554,.12959,0,.0956828,.954206,.125886,0,.106984,.945046,.121335,0,.118675,.935678,.116492,0,.130741,.926748,.111635,0,.143166,.917764,.106625,0,.155939,.908358,.101325,0,.169049,.899219,.0960249,0,.182487,.890089,.0906527,0,.196245,.881488,.0853905,0,.210317,.874031,.0804177,0,.224697,.866932,.0756005,0,.23938,.859976,.0709019,0,.254364,.853375,.0664391,0,.269646,.846971,.0622012,0,.285223,.840483,.058129,0,.301096,.833969,.0542762,0,.317265,.82806,.0507042,0,.333729,.822128,.047368,0,.350491,.815989,.044272,0,.367554,.809336,.0413444,0,.38492,.802177,.038601,0,.402594,.79441,.0360227,0,.420582,.786573,.0336383,0,.438891,.778619,.0314321,0,.457527,.77,.029362,0,.476499,.760698,.0274102,0,.49582,.750932,.0256146,0,.5155,.740993,.023974,0,.535555,.731159,.0224182,0,.556,.720836,.0209889,0,.576855,.709913,.0196411,0,.598143,.698415,.0183824,0,.619888,.68745,.0172222,0,.642123,.676154,.0161509,0,.664883,.664383,.0151397,0,.688211,.6533,.0141873,0,.71216,.642072,.0133105,0,.736792,.631412,.0124932,0,.762186,.621622,.0117408,0,.788439,.611681,.0110358,0,.815672,.60142,.0103775,0,.844034,.59083,.00975623,0,.873699,.580254,.00918084,0,.904765,.569841,.00864721,0,.936508,.559224,.00815731,0,.968254,.548315,.00767924,0,1,1,.177563,0,0,1,.177563,0,0,.999994,.177562,0,0,.999972,.177555,0,664171e-10,.999914,.177536,0,.0012276,.999787,.177496,0,.00388025,.999556,.17742,0,.00783463,.999165,.177285,0,.0128953,.9985,.177037,0,.0189053,.995388,.175634,0,.025742,.993102,.174375,0,.033309,.990992,.173121,0,.0415298,.986932,.170896,0,.0503425,.982786,.16847,0,.0596964,.977592,.165455,0,.0695498,.971075,.161676,0,.0798676,.963967,.157458,0,.0906201,.956397,.152836,0,.101783,.947489,.147467,0,.113333,.937564,.14145,0,.125254,.928182,.135383,0,.137529,.919027,.129212,0,.150144,.909618,.12276,0,.163088,.900492,.116273,0,.176351,.891671,.1098,0,.189924,.883146,.103362,0,.203799,.875151,.0970799,0,.21797,.868338,.0911732,0,.232433,.862033,.0854966,0,.247182,.856107,.0800691,0,.262216,.850644,.0749618,0,.27753,.845261,.070079,0,.293124,.839885,.0654321,0,.308997,.834609,.0610975,0,.325149,.829083,.0569741,0,.341581,.82404,.0531736,0,.358294,.818968,.049665,0,.37529,.813496,.0463856,0,.392573,.807533,.0433217,0,.410148,.80099,.0404402,0,.428019,.793891,.0377578,0,.446192,.786281,.0352616,0,.464676,.778773,.0329577,0,.483478,.770737,.030808,0,.502608,.762094,.0287964,0,.522079,.752898,.0269254,0,.541905,.743306,.0251926,0,.5621,.733416,.023595,0,.582684,.723742,.0221155,0,.603677,.713542,.0207435,0,.625106,.702755,.019434,0,.646998,.691484,.0182046,0,.66939,.680531,.0170771,0,.692324,.66953,.0160339,0,.715849,.658126,.0150677,0,.740028,.646933,.0141551,0,.764937,.636107,.0133179,0,.790673,.625271,.0125284,0,.817358,.615225,.0117937,0,.84515,.605678,.0111181,0,.874244,.59583,.0104759,0,.904828,.585704,.00986672,0,.936508,.575413,.00929712,0,.968254,.565373,.00876713,0,1,1,.214058,0,0,.999999,.214058,0,0,.999994,.214055,0,0,.999966,.214039,0,259642e-9,.999893,.213998,0,.00200075,.999737,.21391,0,.00527775,.999449,.213745,0,.00983959,.99896,.213458,0,.0154755,.9979,.212855,0,.0220249,.994278,.210779,0,.0293654,.992254,.20926,0,.0374021,.98881,.206908,0,.0460604,.984715,.204009,0,.0552802,.979738,.200471,0,.0650127,.972884,.195813,0,.0752175,.965996,.190856,0,.0858612,.957974,.185077,0,.0969155,.949155,.17868,0,.108356,.939288,.171513,0,.120163,.928996,.163838,0,.132319,.919563,.156246,0,.144808,.910004,.148359,0,.157618,.900791,.140417,0,.170737,.892135,.132569,0,.184155,.883803,.124741,0,.197866,.876034,.117091,0,.211861,.869219,.109835,0,.226134,.863062,.102859,0,.240682,.857795,.0962928,0,.255499,.853009,.0900725,0,.270583,.848603,.0842101,0,.285931,.844335,.0786527,0,.301542,.840208,.0734397,0,.317415,.836035,.0685334,0,.33355,.83172,.0639275,0,.349948,.827135,.0595909,0,.36661,.822797,.0556204,0,.383539,.818387,.0519394,0,.400738,.813565,.0485317,0,.41821,.808142,.0453138,0,.435961,.802212,.0423354,0,.453997,.79573,.0395553,0,.472324,.788741,.036988,0,.490951,.781093,.0345688,0,.509887,.773597,.0323297,0,.529144,.765622,.0302719,0,.548735,.757083,.0283477,0,.568674,.747992,.0265562,0,.588979,.738591,.0248844,0,.609671,.728719,.0233342,0,.630773,.719146,.0219081,0,.652314,.709165,.0205711,0,.674328,.69875,.0193248,0,.696854,.687884,.0181582,0,.719942,.676818,.0170746,0,.743651,.666247,.0160718,0,.768057,.655284,.0151262,0,.793253,.64401,.0142561,0,.819363,.633353,.0134327,0,.846547,.622674,.012653,0,.875017,.612265,.0119354,0,.905021,.602455,.0112533,0,.936508,.593147,.0106234,0,.968254,.583592,.0100213,0,1,1,.25717,0,0,1,.25717,0,0,.999992,.257164,0,0,.999958,.257135,0,641715e-9,.999864,.25706,0,.00305314,.999666,.256897,0,.00700975,.999302,.256596,0,.0122194,.998663,.25607,0,.0184622,.995607,.254123,0,.0255773,.993094,.252081,0,.0334439,.9907,.249867,0,.0419696,.98594,.246118,0,.0510823,.981214,.242049,0,.0607242,.974966,.236869,0,.0708486,.967589,.230724,0,.081417,.95915,.223635,0,.0923974,.950257,.21596,0,.103763,.940165,.207296,0,.115491,.929396,.197901,0,.127562,.919288,.188437,0,.13996,.909428,.178762,0,.15267,.900105,.169072,0,.165679,.891418,.159478,0,.178979,.883347,.15002,0,.192558,.875992,.140813,0,.20641,.869466,.13196,0,.220529,.863699,.123501,0,.234907,.858553,.115436,0,.249542,.854379,.107901,0,.264428,.850894,.10088,0,.279564,.847632,.0942296,0,.294947,.844571,.0879861,0,.310575,.84163,.0821534,0,.326448,.838542,.0766409,0,.342566,.835412,.0715322,0,.358929,.831899,.0666883,0,.37554,.828177,.0622175,0,.392399,.82416,.0580452,0,.409511,.820393,.054267,0,.426878,.816068,.0507172,0,.444506,.811201,.0474041,0,.4624,.805785,.0443174,0,.480566,.799878,.0414562,0,.499013,.793469,.0388147,0,.517749,.786473,.0363453,0,.536785,.778874,.0340225,0,.556134,.771277,.0318599,0,.575809,.763426,.0298859,0,.595827,.755044,.0280357,0,.616207,.746161,.0262979,0,.636973,.737124,.0247295,0,.65815,.72761,.0232514,0,.679772,.717822,.0218755,0,.701876,.708279,.0205942,0,.724509,.698333,.0193947,0,.74773,.68802,.0182717,0,.771609,.677321,.0172044,0,.79624,.666504,.0162122,0,.821743,.656184,.0152924,0,.84828,.64556,.0144326,0,.876069,.634636,.0136157,0,.905404,.624124,.0128612,0,.936508,.613914,.0121435,0,.968254,.603589,.0114887,0,1,1,.307946,0,0,.999999,.307945,0,0,.999988,.307934,0,204479e-10,.999944,.307886,0,.00127833,.999824,.307756,0,.00445047,.999565,.30748,0,.00914673,.999085,.306966,0,.0150498,.998103,.306004,0,.0219367,.994249,.303028,0,.0296485,.991807,.300435,0,.038068,.987773,.296554,0,.0471062,.982673,.2916,0,.0566942,.976623,.285641,0,.0667768,.968757,.27815,0,.0773099,.959849,.269529,0,.088257,.950663,.260248,0,.0995879,.940129,.249704,0,.111277,.92895,.238291,0,.123304,.917996,.226501,0,.13565,.907813,.214669,0,.148299,.898305,.202835,0,.161237,.889626,.191158,0,.174455,.88175,.179695,0,.187941,.874715,.168548,0,.201687,.868746,.15792,0,.215687,.863703,.147807,0,.229933,.859315,.138149,0,.24442,.855538,.128993,0,.259145,.852428,.120414,0,.274103,.850168,.112498,0,.289293,.848132,.105054,0,.304711,.846291,.0981087,0,.320357,.844431,.0915942,0,.33623,.842493,.0855056,0,.35233,.840368,.0798204,0,.368658,.83798,.0745097,0,.385214,.83523,.0695424,0,.402002,.832091,.0649092,0,.419023,.828667,.0606291,0,.436282,.824805,.0566523,0,.453782,.820988,.0530229,0,.471529,.816635,.0496364,0,.489528,.811725,.0464658,0,.507788,.806316,.0435082,0,.526317,.800469,.0407873,0,.545124,.794107,.038255,0,.564221,.787218,.0358825,0,.583621,.779872,.0336785,0,.603341,.772097,.0316379,0,.623397,.764484,.0297379,0,.643812,.756428,.0279581,0,.664611,.748022,.0263153,0,.685824,.739268,.0247799,0,.707488,.73024,.0233385,0,.729646,.720893,.0220035,0,.752354,.71119,.0207555,0,.77568,.701791,.0195843,0,.799715,.692184,.0184891,0,.824574,.682258,.0174541,0,.850417,.67206,.0164873,0,.877466,.661717,.0155959,0,.90604,.651462,.0147519,0,.936528,.641467,.0139727,0,.968254,.631229,.0132363,0,1,1,.367573,0,0,.999999,.367571,0,0,.999984,.367553,0,183382e-9,.999925,.367473,0,.00225254,.999759,.367259,0,.00628165,.99941,.366801,0,.0117858,.998739,.365946,0,.0184359,.995529,.363191,0,.0260114,.992875,.360171,0,.0343581,.989135,.355981,0,.0433637,.984166,.350401,0,.0529438,.977871,.343348,0,.0630334,.96951,.334341,0,.0735805,.959964,.323862,0,.0845437,.950162,.312521,0,.095889,.938882,.299577,0,.107588,.926992,.285573,0,.119617,.915589,.271212,0,.131957,.904791,.256611,0,.144591,.895177,.242224,0,.157503,.886403,.227952,0,.170682,.878957,.214192,0,.184117,.872418,.200795,0,.197799,.867029,.188015,0,.21172,.862835,.175975,0,.225873,.859411,.164526,0,.240253,.856655,.153693,0,.254854,.854519,.14352,0,.269673,.852828,.13397,0,.284707,.851412,.124984,0,.299953,.850609,.116748,0,.315408,.849855,.10905,0,.331073,.849017,.101839,0,.346946,.848079,.0951359,0,.363028,.846911,.0888774,0,.379318,.845445,.0830375,0,.395818,.84362,.0775844,0,.41253,.841411,.0725054,0,.429457,.838768,.0677691,0,.446602,.835801,.0634016,0,.463968,.832341,.0593095,0,.481561,.828424,.0555121,0,.499386,.824312,.052024,0,.51745,.819918,.0487865,0,.535761,.815072,.0457801,0,.554328,.809863,.0430184,0,.573162,.804164,.0404245,0,.592275,.798034,.0380146,0,.611681,.791436,.0357436,0,.631398,.784498,.0336475,0,.651445,.777125,.0316666,0,.671845,.769365,.0298122,0,.692628,.761579,.0281001,0,.713827,.753746,.0265049,0,.735484,.745573,.0250067,0,.75765,.737083,.0236026,0,.78039,.728545,.0223302,0,.803789,.719691,.0211243,0,.82796,.710569,.0199983,0,.853056,.701216,.0189569,0,.879298,.692094,.0179702,0,.907014,.682909,.0170418,0,.936691,.673509,.0161732,0,.968254,.663863,.0153406,0,1,1,.437395,0,0,.999998,.437394,0,0,.99998,.437363,0,616704e-9,.999891,.437232,0,.00367925,.999656,.436877,0,.00867446,.999148,.436121,0,.0150679,.997959,.434564,0,.022531,.993464,.430134,0,.0308507,.990606,.426077,0,.0398805,.985027,.419397,0,.0495148,.978491,.41118,0,.0596749,.969643,.40048,0,.0703001,.959189,.38769,0,.0813427,.948223,.373575,0,.0927641,.935955,.357622,0,.104533,.923237,.34043,0,.116624,.911074,.322735,0,.129015,.899724,.30479,0,.141687,.890189,.287392,0,.154626,.881796,.270248,0,.167818,.874781,.253659,0,.181252,.869166,.237786,0,.194918,.864725,.222618,0,.208807,.861565,.208356,0,.222913,.859284,.194867,0,.237229,.857677,.18212,0,.25175,.856714,.17018,0,.266473,.856155,.158969,0,.281392,.8558,.148413,0,.296505,.855672,.138578,0,.311811,.855538,.129345,0,.327306,.855689,.120861,0,.342991,.855767,.112969,0,.358864,.855618,.105593,0,.374925,.85525,.0987451,0,.391176,.854583,.0923727,0,.407616,.853534,.0864143,0,.424249,.852061,.0808338,0,.441076,.850253,.0756771,0,.4581,.848004,.0708612,0,.475324,.845333,.0663784,0,.492754,.842376,.0622631,0,.510394,.838956,.0584112,0,.528251,.835121,.0548328,0,.546331,.830842,.0514838,0,.564644,.826212,.048355,0,.583198,.821522,.0454714,0,.602005,.816551,.0428263,0,.621078,.811211,.0403612,0,.640434,.805479,.038039,0,.660089,.799409,.0358739,0,.680066,.79306,.0338727,0,.70039,.786395,.0319985,0,.721094,.779416,.030241,0,.742215,.77214,.0285951,0,.7638,.764636,.0270747,0,.785912,.756836,.0256354,0,.808628,.749315,.0243027,0,.832055,.741561,.0230497,0,.856338,.733589,.0218801,0,.88169,.725479,.020784,0,.908441,.717255,.0197702,0,.937125,.708829,.0188168,0,.968254,.700191,.0179113,0,1,1,.518937,0,0,.999998,.518933,0,0,.999967,.518883,0,.00147741,.999832,.51866,0,.00573221,.999466,.518057,0,.011826,.998644,.516752,0,.0192116,.994458,.512347,0,.027573,.991223,.507675,0,.0367099,.985515,.500188,0,.046487,.978308,.490408,0,.0568071,.968359,.477357,0,.0675984,.95682,.461752,0,.0788059,.943929,.443796,0,.090386,.930224,.423893,0,.102304,.916514,.402682,0,.114532,.903653,.380914,0,.127047,.892315,.359212,0,.139828,.882942,.338102,0,.152861,.875438,.31773,0,.16613,.869642,.298186,0,.179624,.865304,.279491,0,.193332,.862382,.261804,0,.207247,.860666,.245146,0,.22136,.859788,.229406,0,.235666,.859608,.214605,0,.250158,.859912,.200691,0,.264832,.86053,.187623,0,.279684,.861368,.17539,0,.294711,.862237,.163901,0,.309911,.863127,.153175,0,.32528,.863923,.143147,0,.340819,.864567,.133781,0,.356524,.865013,.125042,0,.372397,.86539,.116952,0,.388438,.865591,.109476,0,.404645,.865517,.102542,0,.421022,.865084,.0960688,0,.437569,.864309,.0900499,0,.454287,.863151,.0844328,0,.471181,.861649,.0792218,0,.488253,.859742,.0743482,0,.505507,.857446,.0697963,0,.522947,.854757,.0655364,0,.54058,.851783,.061608,0,.558412,.848516,.0579701,0,.576449,.844897,.0545742,0,.594701,.840956,.0514167,0,.613178,.836676,.0484598,0,.631892,.832075,.0456934,0,.650856,.827191,.0431178,0,.670088,.822295,.0407718,0,.689606,.817294,.0386032,0,.709434,.812013,.0365675,0,.7296,.806465,.0346547,0,.750138,.800691,.0328717,0,.771093,.794709,.031211,0,.792519,.788493,.0296504,0,.814488,.782049,.0281782,0,.837097,.775403,.0267965,0,.860481,.76857,.0255002,0,.884842,.761536,.0242759,0,.910494,.754303,.0231142,0,.937985,.74692,.0220305,0,.968254,.739745,.0210192,0,1,1,.613914,0,0,.999996,.613907,0,963597e-10,.999942,.613814,0,.00301247,.999704,.613407,0,.00870385,.999046,.612302,0,.0160714,.995516,.608266,0,.0245899,.991726,.602863,0,.0339681,.985157,.593956,0,.0440254,.97642,.581748,0,.0546409,.964404,.565183,0,.0657284,.950601,.545273,0,.0772246,.935158,.522129,0,.0890812,.919364,.496782,0,.10126,.904754,.470571,0,.113731,.89176,.444037,0,.126469,.881492,.418322,0,.139454,.873656,.393522,0,.15267,.868053,.369795,0,.166101,.864336,.347171,0,.179736,.862259,.325737,0,.193565,.861556,.305532,0,.207578,.861776,.286416,0,.221769,.862661,.268355,0,.23613,.864015,.251334,0,.250656,.865711,.235352,0,.265343,.867519,.220302,0,.280187,.869351,.206161,0,.295183,.871144,.192908,0,.31033,.872839,.180505,0,.325624,.874307,.168848,0,.341065,.875667,.158021,0,.35665,.876758,.147877,0,.37238,.87764,.138441,0,.388253,.878237,.129627,0,.404269,.878563,.121415,0,.42043,.878572,.113741,0,.436735,.87842,.106652,0,.453187,.878057,.100097,0,.469786,.877413,.0940128,0,.486536,.87646,.0883462,0,.503439,.875233,.0830924,0,.520498,.8737,.0781975,0,.537717,.871873,.07364,0,.555102,.86978,.0694103,0,.572657,.867405,.0654696,0,.59039,.864751,.0617914,0,.608307,.861818,.0583491,0,.626419,.858645,.0551443,0,.644733,.855307,.0521894,0,.663264,.851736,.0494334,0,.682025,.847927,.0468504,0,.701032,.843888,.0444261,0,.720308,.839629,.0421497,0,.739875,.835158,.0400082,0,.759764,.830509,.0380076,0,.780014,.825714,.0361488,0,.800673,.820729,.0343956,0,.821803,.815751,.0327781,0,.843492,.810752,.031275,0,.86586,.805587,.0298542,0,.889087,.800317,.0285397,0,.913466,.79489,.0272948,0,.93952,.789314,.0261139,0,.96835,.783593,.0249938,0,1,1,.724258,0,0,.999992,.724243,0,726889e-9,.99987,.724044,0,.00569574,.999336,.72317,0,.0131702,.996271,.719432,0,.0220738,.991159,.712576,0,.0319405,.982465,.700927,0,.0425202,.97049,.684297,0,.0536599,.953973,.661244,0,.065258,.935546,.633804,0,.0772427,.916596,.603071,0,.0895616,.899353,.57105,0,.102175,.885216,.539206,0,.11505,.875076,.508714,0,.128164,.868334,.479571,0,.141495,.864414,.451796,0,.155026,.862678,.425328,0,.168745,.862835,.400352,0,.182639,.864067,.376532,0,.196699,.866086,.35391,0,.210915,.868557,.332424,0,.225282,.871271,.312053,0,.239792,.874058,.292764,0,.25444,.8768,.27453,0,.269223,.87939,.257297,0,.284135,.8819,.24114,0,.299174,.884187,.225934,0,.314337,.886262,.211669,0,.329622,.888119,.198311,0,.345026,.889709,.185783,0,.360549,.891054,.174063,0,.376189,.892196,.163143,0,.391946,.893101,.152952,0,.407819,.893803,.143475,0,.423808,.894277,.134647,0,.439914,.894532,.126434,0,.456137,.894576,.1188,0,.472479,.894393,.111694,0,.48894,.893976,.105069,0,.505523,.893346,.0989077,0,.52223,.892502,.0931724,0,.539064,.891441,.0878276,0,.556028,.890276,.082903,0,.573125,.888972,.0783505,0,.590361,.887469,.0741083,0,.607741,.885785,.0701633,0,.62527,.883914,.0664835,0,.642957,.881872,.0630567,0,.660809,.879651,.0598527,0,.678836,.877267,.0568615,0,.69705,.874717,.05406,0,.715465,.872012,.0514378,0,.734098,.869157,.0489805,0,.752968,.866155,.0466727,0,.772101,.863014,.0445056,0,.791529,.859748,.0424733,0,.81129,.856416,.0405957,0,.831438,.852958,.0388273,0,.852044,.849382,.0371619,0,.87321,.845694,.0355959,0,.89509,.841893,.0341155,0,.917932,.837981,.0327141,0,.942204,.833963,.0313856,0,.968981,.829847,.0301275,0,1,1,.85214,0,0,.999969,.852095,0,.00279627,.999483,.851408,0,.0107635,.994545,.84579,0,.0206454,.986188,.835231,0,.0315756,.969847,.814687,0,.0432021,.945951,.783735,0,.0553396,.91917,.746074,0,.0678766,.895488,.706938,0,.0807395,.878232,.669534,0,.0938767,.868252,.635168,0,.10725,.863873,.603069,0,.120832,.863369,.572514,0,.134598,.86545,.543169,0,.148533,.868803,.514578,0,.16262,.872794,.486762,0,.176849,.87702,.459811,0,.19121,.881054,.433654,0,.205694,.884974,.408574,0,.220294,.888587,.384525,0,.235005,.891877,.36156,0,.24982,.894793,.339661,0,.264737,.89743,.318913,0,.279751,.899796,.299302,0,.294859,.901943,.280843,0,.310058,.903858,.263481,0,.325346,.905574,.247197,0,.340721,.907069,.231915,0,.356181,.908379,.217614,0,.371725,.90952,.20425,0,.387353,.910483,.191758,0,.403063,.91128,.180092,0,.418854,.911936,.169222,0,.434727,.912454,.159098,0,.450682,.912835,.149668,0,.466718,.913078,.140884,0,.482837,.913192,.132709,0,.499038,.913175,.125095,0,.515324,.91304,.118012,0,.531695,.912781,.111417,0,.548153,.91241,.105281,0,.5647,.911924,.0995691,0,.581338,.911331,.0942531,0,.59807,.910637,.0893076,0,.6149,.90984,.0846998,0,.63183,.908941,.0804044,0,.648865,.907944,.0763984,0,.666011,.906857,.0726638,0,.683273,.90568,.0691783,0,.700659,.904416,.0659222,0,.718176,.903067,.0628782,0,.735834,.901637,.0600307,0,.753646,.900128,.0573647,0,.771625,.898544,.0548668,0,.78979,.89689,.052527,0,.808162,.895165,.0503306,0,.826771,.893371,.0482668,0,.845654,.891572,.0463605,0,.864863,.889763,.0445998,0,.884472,.887894,.0429451,0,.904592,.885967,.0413884,0,.925407,.883984,.0399225,0,.947271,.881945,.0385405,0,.97105,.879854,.0372362,0,1,.999804,.995833,0,0,.938155,.933611,0,.0158731,.864755,.854311,0,.0317461,.888594,.865264,0,.0476191,.905575,.863922,0,.0634921,.915125,.850558,0,.0793651,.920665,.829254,0,.0952381,.924073,.802578,0,.111111,.926304,.772211,0,.126984,.927829,.739366,0,.142857,.928924,.705033,0,.15873,.92973,.670019,0,.174603,.930339,.634993,0,.190476,.930811,.600485,0,.206349,.931191,.566897,0,.222222,.93149,.534485,0,.238095,.931737,.503429,0,.253968,.931939,.473811,0,.269841,.932108,.445668,0,.285714,.93225,.418993,0,.301587,.932371,.393762,0,.31746,.932474,.369939,0,.333333,.932562,.347479,0,.349206,.932638,.326336,0,.365079,.932703,.306462,0,.380952,.93276,.287805,0,.396825,.932809,.270313,0,.412698,.932851,.253933,0,.428571,.932887,.23861,0,.444444,.932917,.224289,0,.460317,.932943,.210917,0,.47619,.932965,.19844,0,.492063,.932982,.186807,0,.507937,.932995,.175966,0,.52381,.933005,.165869,0,.539683,.933011,.156468,0,.555556,.933013,.147719,0,.571429,.933013,.139579,0,.587302,.93301,.132007,0,.603175,.933004,.124965,0,.619048,.932994,.118416,0,.634921,.932982,.112326,0,.650794,.932968,.106663,0,.666667,.93295,.101397,0,.68254,.932931,.0964993,0,.698413,.932908,.0919438,0,.714286,.932883,.0877057,0,.730159,.932856,.0837623,0,.746032,.932827,.0800921,0,.761905,.932796,.0766754,0,.777778,.932762,.0734936,0,.793651,.932727,.0705296,0,.809524,.932689,.0677676,0,.825397,.93265,.0651929,0,.84127,.932609,.0627917,0,.857143,.932565,.0605515,0,.873016,.932521,.0584606,0,.888889,.932474,.0565082,0,.904762,.932427,.0546841,0,.920635,.932377,.0529793,0,.936508,.932326,.0513851,0,.952381,.932274,.0498936,0,.968254,.93222,.0484975,0,.984127,.932164,.0471899,0,1],o=new Float32Array(e),V=new Float32Array(r),le=new DataTexture(o,64,64,RGBAFormat,FloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1),fe=new DataTexture(V,64,64,RGBAFormat,FloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1);le.needsUpdate=!0,fe.needsUpdate=!0;const Le=new Uint16Array(e.length);e.forEach(function(ze,Fe){Le[Fe]=DataUtils.toHalfFloat(ze)});const Ce=new Uint16Array(r.length);r.forEach(function(ze,Fe){Ce[Fe]=DataUtils.toHalfFloat(ze)});const Re=new DataTexture(Le,64,64,RGBAFormat,HalfFloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1),Pe=new DataTexture(Ce,64,64,RGBAFormat,HalfFloatType,UVMapping,ClampToEdgeWrapping,ClampToEdgeWrapping,LinearFilter,NearestFilter,1);return Re.needsUpdate=!0,Pe.needsUpdate=!0,this.LTC_HALF_1=Re,this.LTC_HALF_2=Pe,this.LTC_FLOAT_1=le,this.LTC_FLOAT_2=fe,this}}RectAreaLightTexturesLib.LTC_HALF_1=null;RectAreaLightTexturesLib.LTC_HALF_2=null;RectAreaLightTexturesLib.LTC_FLOAT_1=null;RectAreaLightTexturesLib.LTC_FLOAT_2=null;class RectAreaLightUniformsLib{static init(){RectAreaLightTexturesLib.init();const{LTC_FLOAT_1:e,LTC_FLOAT_2:r,LTC_HALF_1:o,LTC_HALF_2:V}=RectAreaLightTexturesLib;UniformsLib.LTC_FLOAT_1=e,UniformsLib.LTC_FLOAT_2=r,UniformsLib.LTC_HALF_1=o,UniformsLib.LTC_HALF_2=V}}const _viewport=new Vector4,_start=new Vector3,_end=new Vector3,_start4=new Vector4,_end4=new Vector4,_ssOrigin=new Vector4,_ssOrigin3=new Vector3,_mvMatrix=new Matrix4,_line=new Line3,_closestPoint=new Vector3,_box=new Box3,_sphere$1=new Sphere$1,_clipToWorldVector=new Vector4;let _ray$1,_lineWidth;function getWorldSpaceHalfWidth(v,e,r){return _clipToWorldVector.set(0,0,-e,1).applyMatrix4(v.projectionMatrix),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),_clipToWorldVector.x=_lineWidth/r.width,_clipToWorldVector.y=_lineWidth/r.height,_clipToWorldVector.applyMatrix4(v.projectionMatrixInverse),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),Math.abs(Math.max(_clipToWorldVector.x,_clipToWorldVector.y))}function raycastWorldUnits(v,e){const r=v.matrixWorld,o=v.geometry,V=o.attributes.instanceStart,le=o.attributes.instanceEnd,fe=Math.min(o.instanceCount,V.count);for(let Le=0,Ce=fe;Le<Ce;Le++){_line.start.fromBufferAttribute(V,Le),_line.end.fromBufferAttribute(le,Le),_line.applyMatrix4(r);const Re=new Vector3,Pe=new Vector3;_ray$1.distanceSqToSegment(_line.start,_line.end,Pe,Re),Pe.distanceTo(Re)<_lineWidth*.5&&e.push({point:Pe,pointOnLine:Re,distance:_ray$1.origin.distanceTo(Pe),object:v,face:null,faceIndex:Le,uv:null,uv1:null})}}function raycastScreenSpace(v,e,r){const o=e.projectionMatrix,le=v.material.resolution,fe=v.matrixWorld,Le=v.geometry,Ce=Le.attributes.instanceStart,Re=Le.attributes.instanceEnd,Pe=Math.min(Le.instanceCount,Ce.count),ze=-e.near;_ray$1.at(1,_ssOrigin),_ssOrigin.w=1,_ssOrigin.applyMatrix4(e.matrixWorldInverse),_ssOrigin.applyMatrix4(o),_ssOrigin.multiplyScalar(1/_ssOrigin.w),_ssOrigin.x*=le.x/2,_ssOrigin.y*=le.y/2,_ssOrigin.z=0,_ssOrigin3.copy(_ssOrigin),_mvMatrix.multiplyMatrices(e.matrixWorldInverse,fe);for(let Fe=0,ke=Pe;Fe<ke;Fe++){if(_start4.fromBufferAttribute(Ce,Fe),_end4.fromBufferAttribute(Re,Fe),_start4.w=1,_end4.w=1,_start4.applyMatrix4(_mvMatrix),_end4.applyMatrix4(_mvMatrix),_start4.z>ze&&_end4.z>ze)continue;if(_start4.z>ze){const wt=_start4.z-_end4.z,Wt=(_start4.z-ze)/wt;_start4.lerp(_end4,Wt)}else if(_end4.z>ze){const wt=_end4.z-_start4.z,Wt=(_end4.z-ze)/wt;_end4.lerp(_start4,Wt)}_start4.applyMatrix4(o),_end4.applyMatrix4(o),_start4.multiplyScalar(1/_start4.w),_end4.multiplyScalar(1/_end4.w),_start4.x*=le.x/2,_start4.y*=le.y/2,_end4.x*=le.x/2,_end4.y*=le.y/2,_line.start.copy(_start4),_line.start.z=0,_line.end.copy(_end4),_line.end.z=0;const Vt=_line.closestPointToPointParameter(_ssOrigin3,!0);_line.at(Vt,_closestPoint);const Xt=MathUtils.lerp(_start4.z,_end4.z,Vt),xt=Xt>=-1&&Xt<=1,Zt=_ssOrigin3.distanceTo(_closestPoint)<_lineWidth*.5;if(xt&&Zt){_line.start.fromBufferAttribute(Ce,Fe),_line.end.fromBufferAttribute(Re,Fe),_line.start.applyMatrix4(fe),_line.end.applyMatrix4(fe);const wt=new Vector3,Wt=new Vector3;_ray$1.distanceSqToSegment(_line.start,_line.end,Wt,wt),r.push({point:Wt,pointOnLine:wt,distance:_ray$1.origin.distanceTo(Wt),object:v,face:null,faceIndex:Fe,uv:null,uv1:null})}}}class LineSegments2 extends Mesh{constructor(e=new LineSegmentsGeometry,r=new LineMaterial({color:Math.random()*16777215})){super(e,r),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,r=e.attributes.instanceStart,o=e.attributes.instanceEnd,V=new Float32Array(2*r.count);for(let fe=0,Le=0,Ce=r.count;fe<Ce;fe++,Le+=2)_start.fromBufferAttribute(r,fe),_end.fromBufferAttribute(o,fe),V[Le]=Le===0?0:V[Le-1],V[Le+1]=V[Le]+_start.distanceTo(_end);const le=new InstancedInterleavedBuffer(V,2,1);return e.setAttribute("instanceDistanceStart",new InterleavedBufferAttribute(le,1,0)),e.setAttribute("instanceDistanceEnd",new InterleavedBufferAttribute(le,1,1)),this}raycast(e,r){const o=this.material.worldUnits,V=e.camera;V===null&&!o&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const le=e.params.Line2!==void 0&&e.params.Line2.threshold||0;_ray$1=e.ray;const fe=this.matrixWorld,Le=this.geometry,Ce=this.material;_lineWidth=Ce.linewidth+le,Le.boundingSphere===null&&Le.computeBoundingSphere(),_sphere$1.copy(Le.boundingSphere).applyMatrix4(fe);let Re;if(o)Re=_lineWidth*.5;else{const ze=Math.max(V.near,_sphere$1.distanceToPoint(_ray$1.origin));Re=getWorldSpaceHalfWidth(V,ze,Ce.resolution)}if(_sphere$1.radius+=Re,_ray$1.intersectsSphere(_sphere$1)===!1)return;Le.boundingBox===null&&Le.computeBoundingBox(),_box.copy(Le.boundingBox).applyMatrix4(fe);let Pe;if(o)Pe=_lineWidth*.5;else{const ze=Math.max(V.near,_box.distanceToPoint(_ray$1.origin));Pe=getWorldSpaceHalfWidth(V,ze,Ce.resolution)}_box.expandByScalar(Pe),_ray$1.intersectsBox(_box)!==!1&&(o?raycastWorldUnits(this,r):raycastScreenSpace(this,V,r))}onBeforeRender(e){const r=this.material.uniforms;r&&r.resolution&&(e.getViewport(_viewport),this.material.uniforms.resolution.value.set(_viewport.z,_viewport.w))}}var Je$1=Object.defineProperty,Qe$1=Object.defineProperties,Ke$1=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Be$1=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Ie$1=(v,e,r)=>e in v?Je$1(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,U$1=(v,e)=>{for(var r in e||(e={}))Be$1.call(e,r)&&Ie$1(v,r,e[r]);if(he)for(var r of he(e))Ue.call(e,r)&&Ie$1(v,r,e[r]);return v},ue$1=(v,e)=>Qe$1(v,Ke$1(e)),ye$1=(v,e)=>{var r={};for(var o in v)Be$1.call(v,o)&&e.indexOf(o)<0&&(r[o]=v[o]);if(v!=null&&he)for(var o of he(v))e.indexOf(o)<0&&Ue.call(v,o)&&(r[o]=v[o]);return r},ie$1=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())});function H$1(v,e=0){const r=v[0].index!==null,o=new Set(Object.keys(v[0].attributes)),V=new Set(Object.keys(v[0].morphAttributes)),le={},fe={},Le=v[0].morphTargetsRelative,Ce=new BufferGeometry;let Re=0;for(let Pe=0;Pe<v.length;++Pe){const ze=v[Pe];let Fe=0;if(r!==(ze.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const ke in ze.attributes){if(!o.has(ke))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+'. All geometries must have compatible attributes; make sure "'+ke+'" attribute exists among all geometries, or in none of them.'),null;le[ke]===void 0&&(le[ke]=[]),le[ke].push(ze.attributes[ke]),Fe++}if(Fe!==o.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". Make sure all geometries have the same number of attributes."),null;if(Le!==ze.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const ke in ze.morphAttributes){if(!V.has(ke))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". .morphAttributes must be consistent throughout all geometries."),null;fe[ke]===void 0&&(fe[ke]=[]),fe[ke].push(ze.morphAttributes[ke])}if(e){let ke;if(r)ke=ze.index.count;else if(ze.attributes.position!==void 0)ke=ze.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+Pe+". The geometry must have either an index or a position attribute"),null;if(e===1)Ce.addGroup(Re,ke,Pe);else if(e===2&&ze.groups.length>0)for(let Gt of ze.groups){let Vt=Gt.materialIndex;Ce.addGroup(Re+Gt.start,Math.min(Gt.count,ke),Vt)}Re+=ke}}if(r){let Pe=0;const ze=[];for(let Fe=0;Fe<v.length;++Fe){const ke=v[Fe].index;for(let Gt=0;Gt<ke.count;++Gt)ze.push(ke.getX(Gt)+Pe);Pe+=v[Fe].attributes.position.count}Ce.setIndex(ze)}for(const Pe in le){const ze=mergeAttributes(le[Pe]);if(!ze)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+Pe+" attribute."),null;Ce.setAttribute(Pe,ze)}for(const Pe in fe){const ze=fe[Pe][0].length;if(ze===0)break;Ce.morphAttributes=Ce.morphAttributes||{},Ce.morphAttributes[Pe]=[];for(let Fe=0;Fe<ze;++Fe){const ke=[];for(let Vt=0;Vt<fe[Pe].length;++Vt)ke.push(fe[Pe][Vt][Fe]);const Gt=mergeAttributes(ke);if(!Gt)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+Pe+" morphAttribute."),null;Ce.morphAttributes[Pe].push(Gt)}}return e===2?mergeGroups(Ce):Ce}const De=v=>{const e=v,{coordinate:r,startHeight:o,height:V}=e,le=ye$1(e,["coordinate","startHeight","height"]);let fe=o||0;return typeof o!="undefined"&&typeof V!="undefined"&&(fe=o+V),new kt([r],ue$1(U$1({},le),{startHeight:o,endHeight:fe}))};class Jt extends Z$1{constructor(e){super(),this.options=U$1({},e)}create(){const e=this.options,{geometry:r,coordinateArr:o,coordinate:V,material:le,useGroups:fe}=e,Le=ye$1(e,["geometry","coordinateArr","coordinate","material","useGroups"]);let Ce=r;if(!Ce&&V)Ce=De(U$1({coordinate:V},Le));else if(!Ce&&o){const Re=o.map(Pe=>De(U$1({coordinate:Pe},Le)));Ce=H$1(Re,fe!=null?fe:0)}this.createMesh(Ce,le)}}const Bt={ArcCurve,CatmullRomCurve3,CubicBezierCurve,CubicBezierCurve3,EllipseCurve,LineCurve,LineCurve3,QuadraticBezierCurve,QuadraticBezierCurve3,SplineCurve};let Q$1=class On extends BufferGeometry{constructor(e=new Shape([new Vector2(.5,.5),new Vector2(-.5,.5),new Vector2(-.5,-.5),new Vector2(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:r},e=Array.isArray(e)?e:[e];const o=this,V=[],le=[];for(let Le=0,Ce=e.length;Le<Ce;Le++){const Re=e[Le];fe(Re)}this.setAttribute("position",new Float32BufferAttribute(V,3)),this.setAttribute("uv",new Float32BufferAttribute(le,2)),this.computeVertexNormals();function fe(Le){var Ce,Re,Pe;const ze=[],Fe=r.curveSegments!==void 0?r.curveSegments:12,ke=r.steps!==void 0?r.steps:1,Gt=r.depth!==void 0?r.depth:1;let Vt=r.bevelEnabled!==void 0?r.bevelEnabled:!0,Xt=r.bevelThickness!==void 0?r.bevelThickness:.2,xt=r.bevelSize!==void 0?r.bevelSize:Xt-.1,Zt=r.bevelOffset!==void 0?r.bevelOffset:0,wt=r.bevelSegments!==void 0?r.bevelSegments:3;const Wt=r.extrudePath,It=r.UVGenerator!==void 0?r.UVGenerator:Ut,Nt=(Ce=r.hasTop)!=null?Ce:!0,Ft=(Re=r.hasBottom)!=null?Re:!0,Ht=(Pe=r.hasSide)!=null?Pe:!0;let Kt,Yt=!1,jt,n0,a0,l0;Wt&&(Kt=Wt.getSpacedPoints(ke),Yt=!0,Vt=!1,jt=Wt.computeFrenetFrames(ke,!1),n0=new Vector3,a0=new Vector3,l0=new Vector3),Vt||(wt=0,Xt=0,xt=0,Zt=0);const s0=Le.extractPoints(Fe);let $t=s0.shape;const qt=s0.holes;if(!ShapeUtils.isClockWise($t)){$t=$t.reverse();for(let K0=0,E0=qt.length;K0<E0;K0++){const B0=qt[K0];ShapeUtils.isClockWise(B0)&&(qt[K0]=B0.reverse())}}function e0(K0){const E0=10000000000000001e-36;let B0=K0[0];for(let I0=1;I0<=K0.length;I0++){const c0=I0%K0.length,r0=K0[c0],M0=r0.x-B0.x,T0=r0.y-B0.y,k0=M0*M0+T0*T0,w0=Math.max(Math.abs(r0.x),Math.abs(r0.y),Math.abs(B0.x),Math.abs(B0.y)),Pi=E0*w0*w0;if(k0<=Pi){K0.splice(c0,1),I0--;continue}B0=r0}}e0($t),qt.forEach(e0);const o0=qt.length,b0=$t;for(let K0=0;K0<o0;K0++){const E0=qt[K0];$t=$t.concat(E0)}function m0(K0,E0,B0){return E0||error("ExtrudeGeometry: vec does not exist"),K0.clone().addScaledVector(E0,B0)}const P0=$t.length;function Q0(K0,E0,B0){let I0,c0,r0;const M0=K0.x-E0.x,T0=K0.y-E0.y,k0=B0.x-K0.x,w0=B0.y-K0.y,Pi=M0*M0+T0*T0,Ci=M0*w0-T0*k0;if(Math.abs(Ci)>Number.EPSILON){const Wi=Math.sqrt(Pi),Oi=Math.sqrt(k0*k0+w0*w0),Gi=E0.x-T0/Wi,Zi=E0.y+M0/Wi,zi=B0.x-w0/Oi,Ui=B0.y+k0/Oi,Ti=((zi-Gi)*w0-(Ui-Zi)*k0)/(M0*w0-T0*k0);I0=Gi+M0*Ti-K0.x,c0=Zi+T0*Ti-K0.y;const Bi=I0*I0+c0*c0;if(Bi<=2)return new Vector2(I0,c0);r0=Math.sqrt(Bi/2)}else{let Wi=!1;M0>Number.EPSILON?k0>Number.EPSILON&&(Wi=!0):M0<-Number.EPSILON?k0<-Number.EPSILON&&(Wi=!0):Math.sign(T0)===Math.sign(w0)&&(Wi=!0),Wi?(I0=-T0,c0=M0,r0=Math.sqrt(Pi)):(I0=M0,c0=T0,r0=Math.sqrt(Pi/2))}return new Vector2(I0/r0,c0/r0)}const Si=[];for(let K0=0,E0=b0.length,B0=E0-1,I0=K0+1;K0<E0;K0++,B0++,I0++)B0===E0&&(B0=0),I0===E0&&(I0=0),Si[K0]=Q0(b0[K0],b0[B0],b0[I0]);const Ni=[];let G0,R0=Si.concat();for(let K0=0,E0=o0;K0<E0;K0++){const B0=qt[K0];G0=[];for(let I0=0,c0=B0.length,r0=c0-1,M0=I0+1;I0<c0;I0++,r0++,M0++)r0===c0&&(r0=0),M0===c0&&(M0=0),G0[I0]=Q0(B0[I0],B0[r0],B0[M0]);Ni.push(G0),R0=R0.concat(G0)}let O0;if(wt===0)O0=ShapeUtils.triangulateShape(b0,qt);else{const K0=[],E0=[];for(let B0=0;B0<wt;B0++){const I0=B0/wt,c0=Xt*Math.cos(I0*Math.PI/2),r0=xt*Math.sin(I0*Math.PI/2)+Zt;for(let M0=0,T0=b0.length;M0<T0;M0++){const k0=m0(b0[M0],Si[M0],r0);A0(k0.x,k0.y,-c0),I0===0&&K0.push(k0)}for(let M0=0,T0=o0;M0<T0;M0++){const k0=qt[M0];G0=Ni[M0];const w0=[];for(let Pi=0,Ci=k0.length;Pi<Ci;Pi++){const Wi=m0(k0[Pi],G0[Pi],r0);A0(Wi.x,Wi.y,-c0),I0===0&&w0.push(Wi)}I0===0&&E0.push(w0)}}O0=ShapeUtils.triangulateShape(K0,E0)}const Vi=O0.length,vi=xt+Zt;for(let K0=0;K0<P0;K0++){const E0=Vt?m0($t[K0],R0[K0],vi):$t[K0];Yt?(a0.copy(jt.normals[0]).multiplyScalar(E0.x),n0.copy(jt.binormals[0]).multiplyScalar(E0.y),l0.copy(Kt[0]).add(a0).add(n0),A0(l0.x,l0.y,l0.z)):A0(E0.x,E0.y,0)}for(let K0=1;K0<=ke;K0++)for(let E0=0;E0<P0;E0++){const B0=Vt?m0($t[E0],R0[E0],vi):$t[E0];Yt?(a0.copy(jt.normals[K0]).multiplyScalar(B0.x),n0.copy(jt.binormals[K0]).multiplyScalar(B0.y),l0.copy(Kt[K0]).add(a0).add(n0),A0(l0.x,l0.y,l0.z)):A0(B0.x,B0.y,Gt/ke*K0)}for(let K0=wt-1;K0>=0;K0--){const E0=K0/wt,B0=Xt*Math.cos(E0*Math.PI/2),I0=xt*Math.sin(E0*Math.PI/2)+Zt;for(let c0=0,r0=b0.length;c0<r0;c0++){const M0=m0(b0[c0],Si[c0],I0);A0(M0.x,M0.y,Gt+B0)}for(let c0=0,r0=qt.length;c0<r0;c0++){const M0=qt[c0];G0=Ni[c0];for(let T0=0,k0=M0.length;T0<k0;T0++){const w0=m0(M0[T0],G0[T0],I0);Yt?A0(w0.x,w0.y+Kt[ke-1].y,Kt[ke-1].x+B0):A0(w0.x,w0.y,Gt+B0)}}}Hi(),Ht&&Yi();function Hi(){const K0=V.length/3;if(Vt){let E0=0,B0=P0*E0;if(Ft)for(let I0=0;I0<Vi;I0++){const c0=O0[I0];bi(c0[2]+B0,c0[1]+B0,c0[0]+B0)}if(E0=ke+wt*2,B0=P0*E0,Nt)for(let I0=0;I0<Vi;I0++){const c0=O0[I0];bi(c0[0]+B0,c0[1]+B0,c0[2]+B0)}}else{if(Ft)for(let E0=0;E0<Vi;E0++){const B0=O0[E0];bi(B0[2],B0[1],B0[0])}if(Nt)for(let E0=0;E0<Vi;E0++){const B0=O0[E0];bi(B0[0]+P0*ke,B0[1]+P0*ke,B0[2]+P0*ke)}}o.addGroup(K0,V.length/3-K0,0)}function Yi(){const K0=V.length/3;let E0=0;j0(b0,E0),E0+=b0.length;for(let B0=0,I0=qt.length;B0<I0;B0++){const c0=qt[B0];j0(c0,E0),E0+=c0.length}o.addGroup(K0,V.length/3-K0,1)}function j0(K0,E0){let B0=K0.length;for(;--B0>=0;){const I0=B0;let c0=B0-1;c0<0&&(c0=K0.length-1);for(let r0=0,M0=ke+wt*2;r0<M0;r0++){const T0=P0*r0,k0=P0*(r0+1),w0=E0+I0+T0,Pi=E0+c0+T0,Ci=E0+c0+k0,Wi=E0+I0+k0;$0(w0,Pi,Ci,Wi)}}}function A0(K0,E0,B0){ze.push(K0),ze.push(E0),ze.push(B0)}function bi(K0,E0,B0){Li(K0),Li(E0),Li(B0);const I0=V.length/3,c0=It.generateTopUV(o,V,I0-3,I0-2,I0-1);d0(c0[0]),d0(c0[1]),d0(c0[2])}function $0(K0,E0,B0,I0){Li(K0),Li(E0),Li(I0),Li(E0),Li(B0),Li(I0);const c0=V.length/3,r0=It.generateSideWallUV(o,V,c0-6,c0-3,c0-2,c0-1);d0(r0[0]),d0(r0[1]),d0(r0[3]),d0(r0[1]),d0(r0[2]),d0(r0[3])}function Li(K0){V.push(ze[K0*3+0]),V.push(ze[K0*3+1]),V.push(ze[K0*3+2])}function d0(K0){le.push(K0.x),le.push(K0.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),r=this.parameters.shapes,o=this.parameters.options;return Ot$1(r,o,e)}static fromJSON(e,r){const o=[];for(let le=0,fe=e.shapes.length;le<fe;le++){const Le=r[e.shapes[le]];o.push(Le)}const V=e.options.extrudePath;return V!==void 0&&(e.options.extrudePath=new Bt[V.type]().fromJSON(V)),new On(o,e.options)}};const Ut={generateTopUV:function(v,e,r,o,V){const le=e[r*3],fe=e[r*3+1],Le=e[o*3],Ce=e[o*3+1],Re=e[V*3],Pe=e[V*3+1];return[new Vector2(le,fe),new Vector2(Le,Ce),new Vector2(Re,Pe)]},generateSideWallUV:function(v,e,r,o,V,le){const fe=e[r*3],Le=e[r*3+1],Ce=e[r*3+2],Re=e[o*3],Pe=e[o*3+1],ze=e[o*3+2],Fe=e[V*3],ke=e[V*3+1],Gt=e[V*3+2],Vt=e[le*3],Xt=e[le*3+1],xt=e[le*3+2];return Math.abs(Le-Pe)<Math.abs(fe-Re)?[new Vector2(fe,1-Ce),new Vector2(Re,1-ze),new Vector2(Fe,1-Gt),new Vector2(Vt,1-xt)]:[new Vector2(Le,1-Ce),new Vector2(Pe,1-ze),new Vector2(ke,1-Gt),new Vector2(Xt,1-xt)]}};function Ot$1(v,e,r){if(r.shapes=[],Array.isArray(v))for(let o=0,V=v.length;o<V;o++){const le=v[o];r.shapes.push(le.uuid)}else r.shapes.push(v.uuid);return r.options=Object.assign({},e),e.extrudePath!==void 0&&(r.options.extrudePath=e.extrudePath.toJSON()),r}let Rt$1=class extends Q$1{constructor(e,r){super(e,r);const o=new Brush(new Q$1(e,ue$1(U$1({},r),{hasTop:!0,hasSide:!0,hasBottom:!1})));o.updateMatrixWorld();const V=new Box3().setFromObject(o),le=new Vector3;V.getSize(le);const fe=new Vector3(V.min.x+le.x/2,V.min.y+le.y/2,0);let Le=r.topSegments,Ce=r.box3;if(Ce){Ce=Ce.union(V);const Xt=new Vector3;Ce.getSize(Xt);const xt=Math.max(le.x/Xt.x,le.y/Xt.y);Le=Math.ceil(r.topSegments*xt)}if(Le<4)return this;const Re=new PlaneGeometry(le.x,le.y,Le,Le),Pe=new Brush(Re);Pe.position.set(fe.x,fe.y,fe.z),Pe.updateMatrixWorld();const ze=new Evaluator().evaluate(Pe,o,INTERSECTION),Fe=ze.geometry.getAttribute("position"),ke=new Float32BufferAttribute(Fe.count*2,2);for(let Xt=0;Xt<Fe.count;Xt++){const xt=Fe.getZ(Xt);Fe.setZ(Xt,r.depth+xt)}if(Ce){const Xt=Ce.min,xt=Ce.max,Zt=new Vector3().subVectors(xt,Xt);for(let wt=0;wt<Fe.count;wt++){const Wt=Fe.getX(wt),It=Fe.getY(wt),Nt=(Wt-Xt.x)/Zt.x,Ft=(It-Xt.y)/Zt.y;ke.setXY(wt,Nt,Ft)}ze.geometry.setAttribute("uv",ke)}Fe.needsUpdate=!0;const Gt=new Q$1(e,ue$1(U$1({},r),{hasTop:!1})),Vt=H$1([ze.geometry,Gt],2);this.copy(Vt.toNonIndexed())}};const He$1=v=>{const{split:e,depth:r,points:o,box3:V,hasTop:le,hasBottom:fe,hasSide:Le,sideRepeat:Ce,topSegments:Re}=v,Pe=Re?Rt$1:Q$1,ze=new Pe(new Shape(o),{depth:r,bevelEnabled:!1,box3:V,UVGenerator:R$2({split:e,box3:V,sideRepeat:Ce}),hasTop:le,hasBottom:fe,hasSide:Le,topSegments:Re});return P$1(),ze};class Qt extends Z$1{constructor(e){super(),this.options=U$1({depth:1},e)}create(){return ie$1(this,null,function*(){const{points:e,pointsArr:r,useGroups:o,depth:V,geometry:le,geometryArr:fe,material:Le,box3:Ce,split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe}=this.options,ke=Array.isArray(V)?V:[V],Gt=Array.isArray(Ce)?Ce:[Ce],Vt=Le;let Xt=le;Vt||console.log("material is null"),!Xt&&e?Xt=He$1({points:e,depth:ke[0],box3:Gt[0],split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe}):!Xt&&r?Xt=H$1(r.map((xt,Zt)=>{var wt,Wt;return He$1({points:xt,depth:(wt=ke[Zt])!=null?wt:ke[0],box3:(Wt=Gt[Zt])!=null?Wt:Gt[0],split:Re,hasTop:Pe,hasBottom:ze,hasSide:Fe})}),o!=null?o:0):!Xt&&fe&&fe.length>1?Xt=H$1(fe,o!=null?o:0):!Xt&&fe&&fe.length===1&&([Xt]=fe),this.createMesh(Xt,Vt)})}addGeometries(e){const r=this.object3d,o=H$1([r.geometry,...e]);r.geometry=o}setTextureAnisotropic(e,r){e.anisotropy=r||this.pencil.renderer.capabilities.getMaxAnisotropy()}}class en extends Z$1{create(){this.createGroup()}}class tn extends Z$1{constructor(e){super(),this.rectAreaLightUniformsLibInit=!1,this.options=e}create(){var e,r,o,V,le,fe,Le,Ce,Re,Pe,ze,Fe,ke,Gt,Vt,Xt,xt;const Zt=this.options;if(Zt.type==="AmbientLight"){const wt=new AmbientLight(Zt.color);wt.name="环境光",this.object3d=wt}else if(Zt.type==="DirectionalLight"){const wt=new DirectionalLight(Zt.color,Zt.intensity);wt.name="平行光",wt.target.position.set(0,0,0),this.object3d=wt,wt.target.name="平行光目标",wt.shadow.camera.name="平行光阴影相机",wt.shadow.camera.userData.directionalLightShadow=!0,this.directionalLight=wt}else if(Zt.type==="PointLight"){const wt=new PointLight((e=Zt.color)!=null?e:16777215,(r=Zt.intensity)!=null?r:1,(o=Zt.distance)!=null?o:0,(V=Zt.decay)!=null?V:2);wt.name="点光源",this.object3d=wt,this.pointLight=wt}else if(Zt.type==="SpotLight"){const wt=new SpotLight((le=Zt.color)!=null?le:16777215,(fe=Zt.intensity)!=null?fe:1,(Le=Zt.distance)!=null?Le:0,(Ce=Zt.angle)!=null?Ce:Math.PI/3,(Re=Zt.penumbra)!=null?Re:1,(Pe=Zt.decay)!=null?Pe:2);wt.name="聚光灯",this.object3d=wt,this.spotLight=wt,wt.target.name="聚光灯目标"}else if(Zt.type==="HemisphereLight"){const wt=new HemisphereLight((ze=Zt.color)!=null?ze:16777215,(Fe=Zt.groundColor)!=null?Fe:16777215,(ke=Zt.intensity)!=null?ke:1);wt.name="半球光",this.object3d=wt,this.hemisphereLight=wt}else if(Zt.type==="RectAreaLight"){this.rectAreaLightUniformsLibInit||(RectAreaLightUniformsLib.init(),this.rectAreaLightUniformsLibInit=!0);const wt=new RectAreaLight((Gt=Zt.color)!=null?Gt:16777215,(Vt=Zt.intensity)!=null?Vt:1,(Xt=Zt.width)!=null?Xt:10,(xt=Zt.height)!=null?xt:10);wt.name="矩形区域光",this.object3d=wt,this.rectAreaLight=wt}}render(){const e=this.object3d;e.target&&this.pencil.scene.add(e.target);const r=this.pencil.cameraTarget;if(this.spotLight||this.directionalLight){const o=this.spotLight||this.directionalLight;o.position.copy(r),o.target.position.copy(r)}else this.pointLight&&this.pointLight.position.copy(r)}dispose(){const e=this.object3d;e.target&&this.pencil.scene.remove(e.target),super.dispose()}}let Dt$1=class extends BufferGeometry{constructor(e=[],r="none",o){super(),this.type="MeshLineGeometry",this.pointCount=0,this._points=[],this.shape="none",this.shapeFunction=V=>1,this.matrixWorld=new Matrix4,this.shape=r,o&&(this.shapeFunction=o),e.length>0&&this.setPoints(e)}convertToVector3Array(e){if(typeof e[0]=="number"){const r=[],o=e;for(let V=0;V<o.length;V+=3)r.push(new Vector3(o[V],o[V+1],o[V+2]));return r}else return e.map(r=>{if(r instanceof Vector2)return new Vector3(r.x,r.y,0);if(r instanceof Vector3)return r;if(Array.isArray(r)&&r.length===2)return new Vector3(r[0],r[1],0);if(Array.isArray(r)&&r.length===3)return new Vector3(r[0],r[1],r[2])}).filter(Boolean)}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,r){!e||e.length===0||(this._points=this.convertToVector3Array(e),this.pointCount=this._points.length,r&&(this.shapeFunction=r,this.shape="custom"),this.initializeGeometry(),this.updateGeometry())}initializeGeometry(){const e=new BufferAttribute(new Float32Array(this.pointCount*6),3),r=new BufferAttribute(new Float32Array(this.pointCount*6),3),o=new BufferAttribute(new Float32Array(this.pointCount*6),3),V=new BufferAttribute(new Float32Array(this.pointCount*2),1),le=new BufferAttribute(new Float32Array(this.pointCount*2),1),fe=new BufferAttribute(new Float32Array(this.pointCount*2),1),Le=new BufferAttribute(new Float32Array(this.pointCount*4),2),Ce=new BufferAttribute(new Uint16Array((this.pointCount-1)*6),1);this.shape==="taper"&&(this.shapeFunction=Re=>1*Math.pow(4*Re*(1-Re),1));for(let Re=0,Pe=0,ze=0;Re<this.pointCount;Re+=1,Pe+=2,ze+=6){V.setX(Pe,Re/this.pointCount),V.setX(Pe+1,Re/this.pointCount),le.setX(Pe,1),le.setX(Pe+1,-1);const Fe=this.shape==="none"?1:this.shapeFunction(Re/(this.pointCount-1));fe.setX(Pe,Fe),fe.setX(Pe+1,Fe);const ke=Re/(this.pointCount-1);if(Le.setXY(Pe,ke,0),Le.setXY(Pe+1,ke,1),Re<this.pointCount-1){const Gt=Re*2;Ce.setX(ze+0,Gt+0),Ce.setX(ze+1,Gt+1),Ce.setX(ze+2,Gt+2),Ce.setX(ze+3,Gt+2),Ce.setX(ze+4,Gt+1),Ce.setX(ze+5,Gt+3)}}this.setAttribute("position",e),this.setAttribute("previous",r),this.setAttribute("next",o),this.setAttribute("counters",V),this.setAttribute("side",le),this.setAttribute("width",fe),this.setAttribute("uv",Le),this.setIndex(Ce)}updateGeometry(){if(!this._points[0])return;const e=this.getAttribute("position"),r=this.getAttribute("previous"),o=this.getAttribute("next");let V=0,le=0,fe=0;const Le=this._points[0];r.setXYZ(le,Le.x,Le.y,Le.z),le+=1,r.setXYZ(le,Le.x,Le.y,Le.z),le+=1;for(let Re=0;Re<this.pointCount;Re++){const Pe=this._points[Re];e.setXYZ(V,Pe.x,Pe.y,Pe.z),V+=1,e.setXYZ(V,Pe.x,Pe.y,Pe.z),V+=1,Re<this.pointCount-1&&(r.setXYZ(le,Pe.x,Pe.y,Pe.z),le+=1,r.setXYZ(le,Pe.x,Pe.y,Pe.z),le+=1),Re>0&&Re+1<=this.pointCount&&(o.setXYZ(fe,Pe.x,Pe.y,Pe.z),fe+=1,o.setXYZ(fe,Pe.x,Pe.y,Pe.z),fe+=1)}const Ce=this._points[this.pointCount-1];o.setXYZ(fe,Ce.x,Ce.y,Ce.z),fe+=1,o.setXYZ(fe,Ce.x,Ce.y,Ce.z),fe+=1,e.needsUpdate=!0,r.needsUpdate=!0,o.needsUpdate=!0,this.computeBoundingSphere(),this.computeBoundingBox()}get points(){return this._points}set points(e){this.setPoints(e)}updatePoints(e,r){const o=this.convertToVector3Array(e);if(o.length!==this.pointCount){console.warn("MeshLineGeometry: Cannot update points with different length. Use setPoints() instead.");return}this._points=o,r&&(this.shapeFunction=r,this.shape="custom",this.initializeGeometry()),this.updateGeometry()}setShape(e,r){this.shape=e,r&&(this.shapeFunction=r),this._points.length>0&&(this.initializeGeometry(),this.updateGeometry())}};const be$1=v=>{const{setPointWidth:e,nodes:r}=v,o=new Dt$1;return o.setPoints(r,e),o},Xe$1=new WeakMap,me$1=new Map;let sn=class extends Z$1{constructor(v={}){super(),this.options=U$1({},v)}get material(){var v;return(v=this.object3d)==null?void 0:v.material}create(){return ie$1(this,null,function*(){const{nodes:v,nodesArr:e,geometry:r,geometryArr:o,material:V,useGroups:le,setPointWidth:fe,lineWidthArr:Le,materialParameters:Ce}=this.options;let Re=V,Pe=r;!Re&&Ce&&(Re=this.getMaterial(Ce)),!Pe&&v?Pe=be$1({nodes:v,setPointWidth:fe}):!Pe&&e?Pe=H$1(e.map((ze,Fe)=>{let ke=fe;return!ke&&Le&&(ke=()=>{var Gt;return(Gt=Le[Fe])!=null?Gt:Le[0]}),be$1({nodes:ze,setPointWidth:ke})}),le!=null?le:0):!Pe&&o&&o.length>1?Pe=H$1(o,le!=null?le:0):!Pe&&o&&o.length===1&&([Pe]=o),this.createMesh(Pe,Re)})}setGeometry(v,e){const r=be$1({nodes:v,setPointWidth:e}),o=this.object3d,V=o.geometry;o.geometry=r,V.dispose()}getMaterial(v){const{width:e,height:r}=this.pencil.getSize(),o=new zt(U$1({color:new Color$1("#ffffff")},v));return o.uniforms.resolution.value.set(e,r),o}addGeometries(v){const e=this.object3d,r=H$1([e.geometry,...v]);e.geometry=r}resize(v,e){var r,o;(o=(r=this.material)==null?void 0:r.uniforms)==null||o.resolution.value.set(v,e)}handleMaterialChange(v){if(v){const{width:e,height:r}=this.pencil.getSize();this.resize(e,r)}}animate({duration:v=1e3,delay:e=0,repeat:r=0,lineLoop:o,onRepeat:V,onUpdate:le,onComplete:fe,startShow:Le}={}){const{offset:Ce,offsetLoop:Re}=this.material.uniforms,Pe=this.pencil.userData.debugLine?me$1:Xe$1;if(Pe.get(this.material)&&this.stopAnimation(),v===0)return;const ze=o!=null?o:!0;Ce.value.x=1,Re.value=ze&&Le?1:0;let Fe=0;const ke=new Tween(Ce.value).to({x:-1},v).delay(e).repeat(r).onUpdate(({x:Gt})=>{ze&&Gt<=0&&Re.value===0&&(Re.value=1),le==null||le(Gt)}).onRepeat(()=>{Fe+=1,V==null||V(Fe)}).onComplete(()=>{fe==null||fe()}).start();Pe.set(this.material,ke),this.material.addEventListener("dispose",()=>{this.stopAnimation()}),this.pencil.userData.debugLine&&console.log("animate",me$1.size)}stopAnimation(){const v=this.pencil.userData.debugLine?me$1:Xe$1,e=v.get(this.material);e&&(e.stop(),remove(e),v.delete(this.material),this.material.uniforms.offset.value.x=0,this.material.uniforms.offsetLoop.value=1),this.pencil.userData.debugLine&&console.log("stopAnimation",me$1.size)}render(){const{width:v,height:e}=this.pencil.getSize();this.resize(v,e)}};const Ve$1=v=>{const{points:e}=v,r=e.reduce((o,V,le)=>(le<e.length-1&&o.push(V,e[le+1]),o),[]);return new BufferGeometry().setFromPoints(r)};class rn extends Z$1{constructor(e={}){super(),this.options=U$1({},e)}get material(){var e;return(e=this.object3d)==null?void 0:e.material}create(){return ie$1(this,null,function*(){const{points:e,pointsArr:r,geometry:o,geometryArr:V,material:le,useGroups:fe,setPointWidth:Le,lineWidthArr:Ce,materialParameters:Re,instanceCount:Pe}=this.options;let ze=le,Fe=o;!ze&&Re&&(ze=this.getMaterial(Re)),!Fe&&e?Fe=Ve$1({points:e}):!Fe&&r?Fe=H$1(r.map(Gt=>Ve$1({points:Gt})),fe!=null?fe:0):!Fe&&V&&V.length>1?Fe=H$1(V,fe!=null?fe:0):!Fe&&V&&V.length===1&&([Fe]=V);const ke=new LineSegmentsGeometry().fromLineSegments(new LineSegments(Fe));if(this.pencil.options.WebGPUTHREE){Pe&&(ke.instanceCount=Pe);const Gt=new Lt(ke,ze);Gt.computeLineDistances(),this.object3d=Gt}else{const Gt=new LineSegments2(ke,ze);Gt.computeLineDistances(),this.object3d=Gt}})}getMaterial(e){return new LineMaterial(U$1({color:new Color$1("#ffffff")},e))}}class Light extends tn{constructor(e){super(e),this.keyType=e.type}update(e,r){var V;super.update(e,r);const o=this.object3d;(V=o.shadow)!=null&&V.camera&&(o.shadow.camera.near!==this.pencil.camera.near&&(o.shadow.camera.near=this.pencil.camera.near),o.shadow.camera.far!==this.pencil.camera.far&&(o.shadow.camera.far=this.pencil.camera.far))}render(){super.render();const e=this.object3d;e.userData=new Proxy({},{set:(le,fe,Le)=>(fe==="keepCamera"&&(Le?(this.pencil.render(),this.pencil.camera.attach(e),e.target&&this.pencil.camera.attach(e.target),this.userData.disabledTC=!0):Le||(this.pencil.render(),this.lead.group.object3d.attach(e),e.target&&this.lead.scene.object3d.attach(e.target),this.userData.disabledTC=!1)),Reflect.set(le,fe,Le))}),e.target&&(e.target.userData.light=e);const r=this.object3d;r.isDirectionalLight&&(r.shadow.mapSize.width=1024,r.shadow.mapSize.height=1024);const o=this.object3d;o.isSpotLight&&o.shadow.mapSize.set(1024,1024);const V=this.object3d;V.isPointLight&&(V.shadow.mapSize.width=1024,V.shadow.mapSize.height=1024)}}function getDefaultExportFromCjs(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(v){return!!v&&typeof v=="object"}function isSpecial(v){var e=Object.prototype.toString.call(v);return e==="[object RegExp]"||e==="[object Date]"||isReactElement(v)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(v){return v.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(v){return Array.isArray(v)?[]:{}}function cloneUnlessOtherwiseSpecified(v,e){return e.clone!==!1&&e.isMergeableObject(v)?deepmerge(emptyTarget(v),v,e):v}function defaultArrayMerge(v,e,r){return v.concat(e).map(function(o){return cloneUnlessOtherwiseSpecified(o,r)})}function getMergeFunction(v,e){if(!e.customMerge)return deepmerge;var r=e.customMerge(v);return typeof r=="function"?r:deepmerge}function getEnumerableOwnPropertySymbols(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(e){return Object.propertyIsEnumerable.call(v,e)}):[]}function getKeys(v){return Object.keys(v).concat(getEnumerableOwnPropertySymbols(v))}function propertyIsOnObject(v,e){try{return e in v}catch(r){return!1}}function propertyIsUnsafe(v,e){return propertyIsOnObject(v,e)&&!(Object.hasOwnProperty.call(v,e)&&Object.propertyIsEnumerable.call(v,e))}function mergeObject(v,e,r){var o={};return r.isMergeableObject(v)&&getKeys(v).forEach(function(V){o[V]=cloneUnlessOtherwiseSpecified(v[V],r)}),getKeys(e).forEach(function(V){propertyIsUnsafe(v,V)||(propertyIsOnObject(v,V)&&r.isMergeableObject(e[V])?o[V]=getMergeFunction(V,r)(v[V],e[V],r):o[V]=cloneUnlessOtherwiseSpecified(e[V],r))}),o}function deepmerge(v,e,r){r=r||{},r.arrayMerge=r.arrayMerge||defaultArrayMerge,r.isMergeableObject=r.isMergeableObject||isMergeableObject,r.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var o=Array.isArray(e),V=Array.isArray(v),le=o===V;return le?o?r.arrayMerge(v,e,r):mergeObject(v,e,r):cloneUnlessOtherwiseSpecified(e,r)}deepmerge.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,V){return deepmerge(o,V,r)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;const Rt=getDefaultExportFromCjs(cjs);class Panel{constructor(e,r,o){this.id=0,this.name=e,this.fg=r,this.bg=o,this.gradient=null,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width="90px",this.canvas.style.height="48px",this.canvas.style.position="absolute",this.canvas.style.cssText="width:90px;height:48px;background-color: transparent !important;",this.context=this.canvas.getContext("2d"),this.initializeCanvas()}createGradient(){if(!this.context)throw new Error("No context");const e=this.context.createLinearGradient(0,this.GRAPH_Y,0,this.GRAPH_Y+this.GRAPH_HEIGHT);let r;const o=this.fg;switch(this.fg.toLowerCase()){case"#0ff":r="#006666";break;case"#0f0":r="#006600";break;case"#ff0":r="#666600";break;case"#e1e1e1":r="#666666";break;default:r=this.bg;break}return e.addColorStop(0,r),e.addColorStop(1,o),e}initializeCanvas(){this.context&&(this.context.imageSmoothingEnabled=!1,this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.gradient=this.createGradient(),this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,r,o=0){if(!this.context||!this.gradient)return;const V=Math.min(1/0,e),le=Math.max(r,e);this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(`${e.toFixed(o)} ${this.name} (${V.toFixed(o)}-${parseFloat(le.toFixed(o))})`,this.TEXT_X,this.TEXT_Y)}updateGraph(e,r){if(!this.context||!this.gradient)return;e===0&&r===0&&(r=1),r=Math.max(r,e,.1),e=Math.max(e,0);const o=Math.round(this.GRAPH_X),V=Math.round(this.GRAPH_Y),le=Math.round(this.GRAPH_WIDTH),fe=Math.round(this.GRAPH_HEIGHT),Le=Math.round(this.PR);this.context.drawImage(this.canvas,o+Le,V,le-Le,fe,o,V,le-Le,fe),this.context.fillStyle=this.bg,this.context.fillRect(o+le-Le,V,Le,fe);const Ce=Math.min(fe,Math.round(e/r*fe));Ce>0&&(this.context.globalAlpha=.9,this.context.fillStyle=this.gradient,this.context.fillRect(o+le-Le,V+(fe-Ce),Le,Ce)),this.context.globalAlpha=1}}class PanelVSync extends Panel{constructor(e,r,o){super(e,r,o),this.vsyncValue=0,this.SMALL_HEIGHT=9*this.PR,this.HEIGHT=this.SMALL_HEIGHT,this.WIDTH=35*this.PR,this.TEXT_Y=0*this.PR,this.canvas.height=this.HEIGHT,this.canvas.width=this.WIDTH,this.canvas.style.height="9px",this.canvas.style.width="35px",this.canvas.style.cssText=`
|
|
4529
4529
|
width: 35px;
|
|
4530
4530
|
height: 9px;
|
|
4531
4531
|
position: absolute;
|
|
@@ -5094,7 +5094,7 @@ version 0.8.2
|
|
|
5094
5094
|
float gradient = (vWorldPosition.z-worldPositionZ) / maxGradientHeight;
|
|
5095
5095
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, gradientColor,1.0-gradient);
|
|
5096
5096
|
}
|
|
5097
|
-
`)},le[1].needsUpdate=!0}})}update(){const r=new Vector3;this.object3d.getWorldPosition(r),this.worldPositionZ.value!==r.z&&(this.worldPositionZ.value=r.z)}}class Road extends Z$1{constructor(r){super();C0(this,"options");C0(this,"linePrimary",[]);C0(this,"lineSecondary",[]);this.options=gi({},r)}create(){return U0(this,null,function*(){const{grey:r}=this.options;this.createGroup();const o=this.pencil.getPlugin("worker"),V=this.pencil.lead,le=this.pencil.mList,fe=r?"-grey":"",{jsonUrl:Le,projection:Ce,cacheKey:Re,meters:Pe}=this.options;let ze=Re?yield o.getCachedGeometry({cacheKey:Re}):[];if(ze.length)console.log("road:use cache",Re);else{const Fe={},ke=yield this.pencil.loader.load(Le);(ke.features||ke).forEach(Gt=>{const Vt=Gt.properties.w||1,Xt="all";Fe[Xt]||(Fe[Xt]=[]),Gt.geometry.coordinates.forEach(Zt=>{Fe[Xt].push({c:Zt,m:[Vt*(Pe||1)]})})}),ze=yield Promise.all(Object.keys(Fe).map(Gt=>{const Vt=Fe[Gt].map(xt=>xt.c),Xt=Fe[Gt].map(xt=>xt.m);return o.geoGeometry("line",{coordinatesArr:Vt,metaArray:Xt,cacheKey:Re,mesaage:{projection:Ce}})}))}yield Promise.all(ze.map(Fe=>U0(this,null,function*(){const ke=yield V.draw("Line",{key:"$p:",geometry:Fe,material:le.getMultiple("road"+fe).primary},this);this.linePrimary.push(ke)}))),this.object3d.name="道路"})}dispose(){super.dispose(),this.linePrimary=[],this.lineSecondary=[]}}class Area extends Z$1{constructor(r){super();C0(this,"options");C0(this,"area",[]);this.options=gi({},r)}create(){return U0(this,null,function*(){this.createGroup();const{
|
|
5097
|
+
`)},le[1].needsUpdate=!0}})}update(){const r=new Vector3;this.object3d.getWorldPosition(r),this.worldPositionZ.value!==r.z&&(this.worldPositionZ.value=r.z)}}class Road extends Z$1{constructor(r){super();C0(this,"options");C0(this,"linePrimary",[]);C0(this,"lineSecondary",[]);this.options=gi({},r)}create(){return U0(this,null,function*(){const{grey:r}=this.options;this.createGroup();const o=this.pencil.getPlugin("worker"),V=this.pencil.lead,le=this.pencil.mList,fe=r?"-grey":"",{jsonUrl:Le,projection:Ce,cacheKey:Re,meters:Pe}=this.options;let ze=Re?yield o.getCachedGeometry({cacheKey:Re}):[];if(ze.length)console.log("road:use cache",Re);else{const Fe={},ke=yield this.pencil.loader.load(Le);(ke.features||ke).forEach(Gt=>{const Vt=Gt.properties.w||1,Xt="all";Fe[Xt]||(Fe[Xt]=[]),Gt.geometry.coordinates.forEach(Zt=>{Fe[Xt].push({c:Zt,m:[Vt*(Pe||1)]})})}),ze=yield Promise.all(Object.keys(Fe).map(Gt=>{const Vt=Fe[Gt].map(xt=>xt.c),Xt=Fe[Gt].map(xt=>xt.m);return o.geoGeometry("line",{coordinatesArr:Vt,metaArray:Xt,cacheKey:Re,mesaage:{projection:Ce}})}))}yield Promise.all(ze.map(Fe=>U0(this,null,function*(){const ke=yield V.draw("Line",{key:"$p:",geometry:Fe,material:le.getMultiple("road"+fe).primary},this);this.linePrimary.push(ke)}))),this.object3d.name="道路"})}dispose(){super.dispose(),this.linePrimary=[],this.lineSecondary=[]}}class Area extends Z$1{constructor(r){super();C0(this,"options");C0(this,"area",[]);this.options=gi({},r)}create(){return U0(this,null,function*(){this.createGroup();const{jsonUrl:r,projection:o,type:V,cacheKey:le,material:fe,oArr:Le}=this.options,Ce=this.pencil.getPlugin("worker"),Re=this.pencil.lead;let Pe=le?yield Ce.getCachedGeometry({cacheKey:le}):[];if(!Pe.length){const ze={},Fe=yield this.pencil.loader.load(r);(Fe.features||Fe).forEach(ke=>{const Gt=ke.properties.o||0,Vt="all";ze[Vt]||(ze[Vt]=[]);let Xt=[];ke.geometry.type==="Polygon"?Xt=ke.geometry.coordinates:ke.geometry.type==="MultiPolygon"&&(Xt=ke.geometry.coordinates.flat()),Xt.forEach(xt=>{const Zt=Le!=null&&Le.length?Le.findIndex(wt=>wt===+Gt)*.001:0;ze[Vt].push({c:xt,m:[0,Zt]})})}),Pe=yield Promise.all(Object.keys(ze).map(ke=>{const Gt=ze[ke].map(Xt=>Xt.c),Vt=ze[ke].map(Xt=>Xt.m);return Ce.geoGeometry("extrudePolygon",{coordinatesArr:Gt,metaArray:Vt,cacheKey:le,mesaage:{projection:o,hasBottom:!1,hasSide:!1}})}))}yield Promise.all(Pe.map(ze=>U0(this,null,function*(){const Fe=yield Re.draw("ExtrudePolygon",{key:"$p:",geometry:ze,material:fe},this);this.area.push(Fe)})))})}}class Reflector extends Mesh{constructor(e,r={}){super(e),this.isReflector=!0,this.type="Reflector",this.forceUpdate=!1,this.camera=new PerspectiveCamera;const o=this,V=r.color!==void 0?new Color$1(r.color):new Color$1(8355711),le=r.textureWidth||512,fe=r.textureHeight||512,Le=r.clipBias||0,Ce=r.shader||Reflector.ReflectorShader,Re=r.multisample!==void 0?r.multisample:4,Pe=new Plane$1,ze=new Vector3,Fe=new Vector3,ke=new Vector3,Gt=new Matrix4,Vt=new Vector3(0,0,-1),Xt=new Vector4,xt=new Vector3,Zt=new Vector3,wt=new Vector4,Wt=new Matrix4,It=this.camera,Nt=new WebGLRenderTarget(le,fe,{samples:Re,type:HalfFloatType}),Ft=new ShaderMaterial({name:Ce.name!==void 0?Ce.name:"unspecified",uniforms:UniformsUtils.clone(Ce.uniforms),fragmentShader:Ce.fragmentShader,vertexShader:Ce.vertexShader});Ft.uniforms.tDiffuse.value=Nt.texture,Ft.uniforms.color.value=V,Ft.uniforms.textureMatrix.value=Wt,this.material=Ft,this.onBeforeRender=function(Ht,Kt,Yt){if(Fe.setFromMatrixPosition(o.matrixWorld),ke.setFromMatrixPosition(Yt.matrixWorld),Gt.extractRotation(o.matrixWorld),ze.set(0,0,1),ze.applyMatrix4(Gt),xt.subVectors(Fe,ke),xt.dot(ze)>0===!0&&this.forceUpdate===!1)return;xt.reflect(ze).negate(),xt.add(Fe),Gt.extractRotation(Yt.matrixWorld),Vt.set(0,0,-1),Vt.applyMatrix4(Gt),Vt.add(ke),Zt.subVectors(Fe,Vt),Zt.reflect(ze).negate(),Zt.add(Fe),It.position.copy(xt),It.up.set(0,1,0),It.up.applyMatrix4(Gt),It.up.reflect(ze),It.lookAt(Zt),It.far=Yt.far,It.updateMatrixWorld(),It.projectionMatrix.copy(Yt.projectionMatrix),Wt.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),Wt.multiply(It.projectionMatrix),Wt.multiply(It.matrixWorldInverse),Wt.multiply(o.matrixWorld),Pe.setFromNormalAndCoplanarPoint(ze,Fe),Pe.applyMatrix4(It.matrixWorldInverse),Xt.set(Pe.normal.x,Pe.normal.y,Pe.normal.z,Pe.constant);const n0=It.projectionMatrix;wt.x=(Math.sign(Xt.x)+n0.elements[8])/n0.elements[0],wt.y=(Math.sign(Xt.y)+n0.elements[9])/n0.elements[5],wt.z=-1,wt.w=(1+n0.elements[10])/n0.elements[14],Xt.multiplyScalar(2/Xt.dot(wt)),n0.elements[2]=Xt.x,n0.elements[6]=Xt.y,n0.elements[10]=Xt.z+1-Le,n0.elements[14]=Xt.w,o.visible=!1;const a0=Ht.getRenderTarget(),l0=Ht.xr.enabled,s0=Ht.shadowMap.autoUpdate;Ht.xr.enabled=!1,Ht.shadowMap.autoUpdate=!1,Ht.setRenderTarget(Nt),Ht.state.buffers.depth.setMask(!0),Ht.autoClear===!1&&Ht.clear(),Ht.render(Kt,It),Ht.xr.enabled=l0,Ht.shadowMap.autoUpdate=s0,Ht.setRenderTarget(a0);const $t=Yt.viewport;$t!==void 0&&Ht.state.viewport($t),o.visible=!0,this.forceUpdate=!1},this.getRenderTarget=function(){return Nt},this.dispose=function(){Nt.dispose(),o.material.dispose()}}}Reflector.ReflectorShader={name:"ReflectorShader",uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:`
|
|
5098
5098
|
uniform mat4 textureMatrix;
|
|
5099
5099
|
varying vec4 vUv;
|
|
5100
5100
|
|
|
@@ -5359,8 +5359,8 @@ version 0.8.2
|
|
|
5359
5359
|
#include <tonemapping_fragment>
|
|
5360
5360
|
#include <colorspace_fragment>
|
|
5361
5361
|
#include <fog_fragment>
|
|
5362
|
-
}`},Kt=new ShaderMaterial({name:Ht.name,uniforms:UniformsUtils.clone(Ht.uniforms),vertexShader:Ht.vertexShader,fragmentShader:Ht.fragmentShader,lights:!0,side:Re,fog:Pe});Kt.uniforms.mirrorSampler.value=Ft.texture,Kt.uniforms.textureMatrix.value=It,Kt.uniforms.alpha.value=V,Kt.uniforms.normalSampler.value=le,Kt.uniforms.waterColor.value=fe,Kt.uniforms.distortionScale.value=Ce,Kt.uniforms.eye.value=Le;const Yt=v.material;v.material=Kt,v.onBeforeRender=function(jt,n0,a0){Yt.color!==Kt.uniforms.waterColor.value&&(Kt.uniforms.waterColor.value=Yt.color),ke.setFromMatrixPosition(v.matrixWorld),Gt.setFromMatrixPosition(a0.matrixWorld),Vt.extractRotation(v.matrixWorld),Fe.set(0,0,1),Fe.applyMatrix4(Vt),Zt.subVectors(ke,Gt),a0.updateMatrix(),a0.updateMatrixWorld(),v.updateMatrix(),v.updateMatrixWorld();const l0=new Frustum,s0=new Matrix4;if(s0.multiplyMatrices(a0.projectionMatrix,a0.matrixWorldInverse),l0.setFromProjectionMatrix(s0),!l0.intersectsObject(v)||Zt.dot(Fe)>0)return;Zt.reflect(Fe).negate(),Zt.add(ke),Vt.extractRotation(a0.matrixWorld),Xt.set(0,0,-1),Xt.applyMatrix4(Vt),Xt.add(Gt),wt.subVectors(ke,Xt),wt.reflect(Fe).negate(),wt.add(ke),Nt.position.copy(Zt),Nt.up.set(0,1,0),Nt.up.applyMatrix4(Vt),Nt.up.reflect(Fe),Nt.lookAt(wt),Nt.far=a0.far,Nt.updateMatrixWorld(),Nt.projectionMatrix.copy(a0.projectionMatrix),It.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),It.multiply(Nt.projectionMatrix),It.multiply(Nt.matrixWorldInverse),ze.setFromNormalAndCoplanarPoint(Fe,ke),ze.applyMatrix4(Nt.matrixWorldInverse),xt.set(ze.normal.x,ze.normal.y,ze.normal.z,ze.constant);const $t=Nt.projectionMatrix;Wt.x=(Math.sign(xt.x)+$t.elements[8])/$t.elements[0],Wt.y=(Math.sign(xt.y)+$t.elements[9])/$t.elements[5],Wt.z=-1,Wt.w=(1+$t.elements[10])/$t.elements[14],xt.multiplyScalar(2/xt.dot(Wt)),$t.elements[2]=xt.x,$t.elements[6]=xt.y,$t.elements[10]=xt.z+1,$t.elements[14]=xt.w,Le.setFromMatrixPosition(a0.matrixWorld);const qt=jt.getRenderTarget(),e0=jt.xr.enabled,o0=jt.shadowMap.autoUpdate;v.visible=!1,jt.xr.enabled=!1,jt.shadowMap.autoUpdate=!1,jt.setRenderTarget(Ft),jt.state.buffers.depth.setMask(!0),jt.autoClear===!1&&jt.clear(),jt.render(n0,Nt),v.visible=!0,jt.xr.enabled=e0,jt.shadowMap.autoUpdate=o0,jt.setRenderTarget(qt);const b0=a0.viewport;b0!==void 0&&jt.state.viewport(b0)}};class City$1 extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs$2);C0(this,"adcode",0);C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4);C0(this,"projection");C0(this,"group");C0(this,"building");C0(this,"road");C0(this,"multiplyScalar",1)}setOptions(r){super.setOptions(gi({fitTo:!0,plane:!0,grey:!1,showBuilding:!0,showRoad:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,ssao:!0,buildingHasSide:!0},r))}loaderAdd(){this.loader.add(["/image/city/20-1.jpg","/image/city/60-1.jpg","/image/city/max-1.jpg","/image/city/cylinder.webp","/image/city/20.webp","/image/city/60.webp","/image/city/max.webp"])}loaderAddJson(r){this.loader.add([this.options.showRiver&&`/cityGzip/River${r}.json.gzip`,this.options.showGrassland&&`/cityGzip/Grassland${r}.json.gzip`].filter(Boolean),{})}initMaterial(){return U0(this,null,function*(){if(this.mList.get("city-plane-mat")){console.log("city-plane-mat exist");return}if(this.options.showBuilding){const r=["20","60","max"].reduce((V,le)=>{const fe=this.loader.getAsset(`/image/city/${le}-1.jpg`),Le=this.loader.getAsset(`/image/city/${le}.webp`);return V[le]=[new MeshBasicMaterial({name:"建筑顶面-板块内"+le+"高",color:"#00a3bc"}),new MeshStandardMaterial({name:"建筑侧面-板块内"+le+"高",map:fe,normalMap:Le,envMap:this.getRoomEnvMap()})],[fe,Le].forEach(Ce=>{Ce.wrapS=RepeatWrapping,Ce.wrapT=RepeatWrapping,Ce.repeat.set(1,1)}),V},{});this.mList.addMultiple("building",{"20Top":r[20][0],"20Side":r[20][1],"60Top":r[60][0],"60Side":r[60][1],maxTop:r.max[0],maxSide:r.max[1]});const o=["20","60","max"].reduce((V,le)=>{const fe=this.loader.getAsset(`/image/city/${le}-1.jpg`),Le=this.loader.getAsset(`/image/city/${le}.webp`);return V[le]=[new MeshBasicMaterial({name:"建筑顶面-板块外"+le+"高",color:"#133144"}),new MeshStandardMaterial({name:"建筑侧面-块外"+le+"高",map:fe,normalMap:Le,envMap:this.getRoomEnvMap()})],[fe,Le].forEach(Ce=>{Ce.wrapS=RepeatWrapping,Ce.wrapT=RepeatWrapping,Ce.repeat.set(1,1)}),V},{});this.mList.addMultiple("building-grey",{"20Top":o[20][0],"20Side":o[20][1],"60Top":o[60][0],"60Side":o[60][1],maxTop:o.max[0],maxSide:o.max[1]})}if(this.options.showRoad){const r=new zt({name:"道路-板块内",color:"#ffc457",sizeAttenuation:!1,lineWidth:12}),o=new zt({name:"道路-板块外",color:"#4a3f15",sizeAttenuation:!1,lineWidth:12});this.mList.addMultiple("road",{primary:r}),this.mList.addMultiple("road-grey",{primary:o})}(this.options.showRiver||this.options.showGrassland)&&(this.mList.addMultiple("geography",{river:new MeshBasicMaterial({name:"河流-板块内",color:"#115d8a"}),grassland:new MeshBasicMaterial({name:"绿地-板块内",color:"#043141"})}),this.mList.addMultiple("geography-grey",{river:new MeshBasicMaterial({name:"河流-板块外",color:"#19354f"}),grassland:new MeshBasicMaterial({name:"绿地-板块外",color:"#133341"})})),this.mList.add("city-plane-mat",new MeshBasicMaterial({color:"#0b2234"}))})}disableSSAO(){const r=this.pencil.composerController.ssaoPass;r&&r.enabled&&(r.enabled=!1,console.log("disableSSAO"))}enabledSSAO(){const r=this.pencil.composerController.ssaoPass;r&&!r.enabled&&(r.enabled=!0,console.log("enabledSSAO"))}init(){return U0(this,null,function*(){const{jsonName:r,adcode:o}=this.options;yield this.initPencil(),this.loaderAdd(),this.loaderAddJson(r),console.time(`vis-core:time.${this.visName}${o}-loader`),yield this.loader.loadAll(),console.timeEnd(`vis-core:time.${this.visName}${o}-loader`),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.pencil.camera.userData.up="0,0,1",this.adcode=this.options.adcode,this.options.center&&(this.pcenter=this.options.center),this.projection=f({center:this.pcenter,scale:this.pscale}),this.group=yield this.lead.draw("Group",{key:`city${o}`});const V=findAdcodeInfo(o);this.group.object3d.name=`城市-${V?V.name:o}`,this.group.scale.multiplyScalar(this.multiplyScalar),yield this.initMaterial(),yield this.initVis(),yield Promise.all(this.lead.objectsPromise)})}getInvert(r){var o,V;return(V=(o=this.projection).invert)==null?void 0:V.call(o,[r.x,-r.z])}fitTo(r,o=!0){return U0(this,null,function*(){this.pencil.controls.fitToBox(r.object3d,o),this.pencil.controls.rotatePolarTo(this.pencil.camera.up.z===1?Math.PI/180*70:Math.PI/180*160,o)})}initVis(){return U0(this,null,function*(){const{fitTo:r,jsonName:o}=this.options;this.adcode;const V=this.loader,le=this.options.showRiver&&V.getAsset(`/cityGzip/River${o}.json.gzip`),fe=this.options.showGrassland&&V.getAsset(`/cityGzip/Grassland${o}.json.gzip`),Le={};[...(le==null?void 0:le.features)||[],...(fe==null?void 0:fe.features)||[]].forEach(Pe=>{Pe.properties.o&&(Le[Pe.properties.o]=!0)});const Ce=Object.keys(Le).map(Pe=>+Pe).sort((Pe,ze)=>Pe-ze),Re=-f({center:this.pcenter,scale:this.pscale})([this.pcenter[0],899e-8+this.pcenter[1]])[1];yield Promise.all([this.options.showBuilding&&this.drawBuilding({jsonUrl:`/cityGzip/Building${o}.json.gzip`,meters:Re,grey:this.options.grey,sideGradient:this.options.buildingSideGradient,hasSide:this.options.buildingHasSide}),this.options.showRoad&&this.drawRoad({jsonUrl:`/cityGzip/Road${o}.json.gzip`,meters:Re,z:Ce.length,grey:this.options.grey}),le&&this.drawArea({json:le,type:"river",oArr:Ce,grey:this.options.grey}),fe&&this.drawArea({json:fe,type:"grassland",oArr:Ce,grey:this.options.grey})].filter(Boolean)),this.pencil.getPlugin("worker").saveCache(),!this.tier0&&this.options.showBuilding&&this.options.ssao&&this.pencil.controls.addEventListener("update",()=>{this.pencil.controls.distance<.1?this.enabledSSAO():this.disableSSAO()})})}drawCityPlane(r,o){return U0(this,null,function*(){const V=this.mList.get("city-plane-mat"),le=findAdcodeInfo(r).b,fe=this.projection([le[0],le[1]]),Le=this.projection([le[2],le[3]]),Ce=Math.abs(Le[0]-fe[0]),Re=Math.abs(Le[1]-fe[1]),Pe=Ce,ze=Re,Fe=yield this.lead.draw("CityPlane",{width:Pe*10,height:ze*10,material:V},o!=null?o:this.group);Fe.object3d.name="底面",this.lead.updateBaseObjectKey(Fe,{type:"city-plane"})})}drawBuilding(){return U0(this,arguments,function*(r={}){if(!r.jsonUrl){console.warn(" json:Building");return}const o=this.options.cacheKey?`building-${this.options.cacheKey}${r.hasSide?"":"-no-side"}`:void 0,V=yield this.lead.draw("Building",{key:"$p:-building",projection:{center:this.pcenter,scale:this.pscale},jsonUrl:r.jsonUrl,cacheKey:o,meters:r.meters,sideGradient:r.sideGradient,grey:r.grey,hasSide:r.hasSide},this.group);return this.building=V,V})}drawArea(){return U0(this,arguments,function*(r={}){if(!r.json){console.warn(" json:drawGeography");return}if(!r.type)return;const{grey:o}=r,V=o?"-grey":"",le=this.options.cacheKey?`${r.type}-${this.options.cacheKey}`:void 0,fe=yield this.lead.draw("Area",{key:`$p:-${r.type}`,projection:{center:this.pcenter,scale:this.pscale},json:r.json,material:this.mList.getMultiple("geography"+V)[r.type],type:r.type,cacheKey:le,oArr:r.oArr},this.group);return fe.object3d.name=r.type==="river"?"河流":"绿地",r.type==="river"&&!o&&this.options.setWaterMaterial&&fe.area.forEach(Le=>{setWaterMaterial(Le.object3d)}),fe})}drawRoad(){return U0(this,arguments,function*(r={}){if(!r.jsonUrl){console.warn(" json:Road");return}const o=this.options.cacheKey?`road-${this.options.cacheKey}`:void 0,V=yield this.lead.draw("Road",{key:"$p:-road",projection:{center:this.pcenter,scale:this.pscale},jsonUrl:r.jsonUrl,cacheKey:o,grey:r.grey,meters:r.meters},this.group),le=r.z||0;return V.position.z=(le+1)*.001,r.grey||(this.lead.updateBaseObjectKey(V,{type:"road",key:"group"}),this.initBaseObjectUserData(V)),r.grey||(this.road=V),V})}getWorldPosition(r,o){if(this.options.coordtransformFunc){const fe=this.options.coordtransformFunc(r,o);r=fe.longitude,o=fe.latitude}const[V,le]=this.projection([r,o]);return{x:V,y:-le}}}C0(City$1,"VisName","city");const hideMaterial=new MeshBasicMaterial({colorWrite:!1,transparent:!0});let PlaneMap$1=class extends Z$1{constructor(r){var o;super();C0(this,"options");C0(this,"isActive",!0);C0(this,"groupArr",[]);C0(this,"areaArr",[]);C0(this,"lineArr");C0(this,"mergeSideArea",null);C0(this,"extrudelineArr");C0(this,"splitPolygons",0);this.options=gi({areaGroup:!0,hasSide:!0,hasTop:!0,lineOffset:0,start:0,hasLine:!0,topSegments:0,depth:2,bloom:!1,conic:!1,mergeSide:!1,onTop:0,projection:{}},r),((o=this.options.projection.rotate)==null?void 0:o[0])===-160&&(this.options.projection.projectionType==="winkel3"?this.splitPolygons=100:this.splitPolygons=300)}create(){return U0(this,null,function*(){const{geojson:r,extrudeLineGeojson:o,bbox:V,areaGroup:le,materialOptions:fe,hasSide:Le,hasTop:Ce,hasLine:Re,mergeSide:Pe}=this.options;this.createGroup();const ze=this.pencil.lead;if(le){const Ht=yield Promise.all(r.features.map(Kt=>U0(this,null,function*(){const{properties:Yt}=Kt,jt=`${this.getPropertiesKey(Yt)}`,n0=yield ze.draw("Group",{target:this,key:jt});return n0.object3d.name=(Yt==null?void 0:Yt.adcode)==="100000_JD"?"十段线":Yt==null?void 0:Yt.name,n0.userData=gi({},Yt),n0})));this.groupArr=Ht}const{lineMat:Fe,extrudeLineMat:ke,topMat:Gt,sideMat:Vt,bgTopMat:Xt,bgSideMat:xt,bgLineMat:Zt,bgExtrudeLineMat:wt}=fe,[Wt,It,Nt,Ft]=yield Promise.all([(Ce||Ce)&&this.addArea(r,{material:Le?[Gt,Pe?hideMaterial:Vt]:Gt,bbox:V,areaGroup:le,hasSide:Le,hasTop:!0,castShadow:!Pe,onTop:this.options.onTop}),Re&&this.addLine(r,{material:Fe,onTop:this.options.onTop+2,areaGroup:le}),o&&this.addLine(o,{material:ke,onTop:this.options.onTop+3}),Pe&&o&&this.addArea(o,{material:Vt,bbox:V,castShadow:!0,areaGroup:!1,hasSide:!0,hasTop:!1,onTop:this.options.onTop})]);Ft&&(this.mergeSideArea=Ft[0],this.mergeSideArea.object3d.name="板块合并侧面"),Wt&&(this.areaArr=Wt),It&&(this.options.conic||It.forEach(Ht=>{Ht.position.z=this.options.depth+this.options.lineOffset}),this.lineArr=It),Nt&&(Nt.forEach(Ht=>{this.options.conic||(Ht.position.z=this.options.depth+this.options.lineOffset),this.lead.updateBaseObjectKey(Ht,{key:this.getPropertiesKey({name:"extrudeLine"})})}),this.extrudelineArr=Nt),Xt&&xt&&this.setAreaMaterial("bg",[Xt,xt]),Zt&&this.setLineMaterial("bg",Zt),wt&&this.setExtrudeLineMaterial("bg",wt)})}addArea(r,o){return U0(this,null,function*(){const{bbox:V,material:le,onTop:fe}=o,Le=this.geojson2Meta(r),Ce=this.pencil.getPlugin("worker"),Re=this.pencil.lead;if(this.pencil.mList,o.areaGroup)return yield Promise.all(Le.map(Pe=>U0(this,null,function*(){const{coords:ze,properties:Fe}=Pe,ke=this.findGroup(this.getPropertiesKey(Fe)),Gt=this.options.conic?yield Ce.geoGeometry("conicPolygon",{coordinatesArr:ze,metaArray:ze.map(()=>[this.options.depth,this.options.start]),mesaage:{topFirst:!0,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:o.hasSide&&o.hasTop?2:0}}):yield Ce.geoGeometry("extrudePolygon",{coordinatesArr:ze,metaArray:ze.map(()=>[this.options.depth]),mesaage:{projection:this.options.projection,topSegments:this.options.topSegments,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:o.hasSide&&o.hasTop?2:0,splitPolygons:this.splitPolygons}}),Vt=`${this.getPropertiesKey(Fe)}`,Xt=yield Re.draw("ExtrudePolygon",{key:Vt,geometry:Gt,material:le,onTop:fe},ke);return Xt.object3d.name="板块",o!=null&&o.castShadow&&(Xt.object3d.castShadow=!0),Xt.userData=gi({},Fe),Xt})));{const Pe=Le.flatMap(({coords:ke})=>ke),ze=this.options.conic?yield Ce.geoGeometry("conicPolygon",{coordinatesArr:Pe,metaArray:Pe.map(()=>[this.options.depth,this.options.start]),mesaage:{topFirst:!0,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:2}}):yield Ce.geoGeometry("extrudePolygon",{coordinatesArr:Pe,metaArray:Pe.map(()=>[this.options.depth]),mesaage:{projection:gi({},this.options.projection),topSegments:this.options.topSegments,bbox:V,hasSide:o.hasSide,hasTop:o.hasTop,hasBottom:!1,useGroups:2,splitPolygons:this.splitPolygons}}),Fe=yield Re.draw("ExtrudePolygon",{key:this.getPropertiesKey({name:"all"}),geometry:ze,material:le},this);return o!=null&&o.castShadow&&(Fe.object3d.castShadow=!0),Fe.object3d.name="板块",Fe.userData={},[Fe]}})}addLine(r,o){return U0(this,null,function*(){const{material:V,onTop:le}=o,fe=this.geojson2Meta(r),Le=this.pencil.getPlugin("worker"),Ce=this.pencil.lead;if(o.areaGroup)return yield Promise.all(fe.map(Re=>U0(this,null,function*(){const{coords:Pe,properties:ze}=Re,Fe=this.findGroup(this.getPropertiesKey(ze)),ke=this.options.conic?yield Le.geoGeometry("conicLine",{coordinatesArr:Pe,metaArray:Pe.map(()=>[1,this.options.start+this.options.depth+this.options.lineOffset]),mesaage:{}}):yield Le.geoGeometry("line",{coordinatesArr:Pe,metaArray:Pe.map(()=>[1]),mesaage:{projection:this.options.projection,splitPolygons:this.splitPolygons}}),Gt=`${this.getPropertiesKey(ze)}`,Vt=yield Ce.draw("Line",{key:Gt,geometry:ke,material:V,onTop:le},Fe);return Vt.userData=gi({},ze),Vt.object3d.name="线",Vt})));{const Re=fe.flatMap(({coords:Fe})=>Fe),Pe=this.options.conic?yield Le.geoGeometry("conicLine",{coordinatesArr:Re,metaArray:Re.map(()=>[1,this.options.start+this.options.depth+this.options.lineOffset]),mesaage:{}}):yield Le.geoGeometry("line",{coordinatesArr:Re,metaArray:Re.map(()=>[1]),mesaage:{projection:this.options.projection,splitPolygons:this.splitPolygons}}),ze=yield Ce.draw("Line",{key:this.getPropertiesKey({name:"all"}),geometry:Pe,material:V,onTop:le},this);return ze.object3d.name="线",[ze]}})}getPropertiesKey(r){return`${this.key.split("#")[1]}-${r.adcode||r.iso_a2||r.name}`}geojson2Meta(r){return r.features.filter(o=>o.geometry).map(o=>{const{type:V,coordinates:le}=o.geometry;let fe=[];return V==="Polygon"?fe=le:V==="MultiPolygon"&&(fe=le.flat()),{coords:fe,properties:o.properties}})}update(r,o){const{lineMat:V,extrudeLineMat:le}=this.options.materialOptions;this.isActive&&[V,le].forEach(fe=>{var Le;!fe||!((Le=fe.uniforms.lineLightAnimation)!=null&&Le.value)||(fe.uniforms.time.value=o)})}findGroup(r,o=!1){return this.pencil.lead.getObject("Group",{key:`${o?this.getPropertiesKey({adcode:r}):r}`})}setAreaMaterial(r,o){this.areaArr.forEach(V=>{V.setMaterialList(r,this.mergeSideArea&&Array.isArray(o)?[o[0],hideMaterial]:o)}),this.mergeSideArea&&Array.isArray(o)&&this.mergeSideArea.setMaterialList(r,o[1])}useAreaMaterial(r){this.areaArr.forEach(o=>{o.useMaterial(r)}),this.mergeSideArea&&this.mergeSideArea.useMaterial(r)}setLineMaterial(r,o){this.lineArr.forEach(V=>{V.setMaterialList(r,o)})}useLineMaterial(r){this.lineArr.forEach(o=>{o.useMaterial(r)})}setExtrudeLineMaterial(r,o){var V;(V=this.extrudelineArr)==null||V.forEach(le=>{le.setMaterialList(r,o)})}useExtrudeLineMaterial(r){var o;(o=this.extrudelineArr)==null||o.forEach(V=>{V.useMaterial(r)})}changeLineAnimateParams({speed:r=.5,extrude:o=!1}){const{lineMat:V,extrudeLineMat:le}=this.options.materialOptions,fe=o?le:V;if(!fe)return;fe.uniforms.time.value=0,fe.uniforms.speed.value=r,fe.uniforms.lineLightAnimation.value=1;const{size:Le,min:Ce,max:Re}=this.getSize();fe.uniforms.size.value=Math.max(Le.x,Le.y)/2,fe.uniforms.uCenter.value=new Vector2((Ce.x+Re.x)/2,(Ce.y+Re.y)/2)}deactive(){this.isActive&&(this.options,this.isActive=!1,this.options.bloom&&this.toggleExtrudelineBloom(!1),this.useAreaMaterial("bg"),this.useLineMaterial("bg"),this.useExtrudeLineMaterial("bg"))}render(){this.options.bloom&&this.toggleExtrudelineBloom(!0)}toggleExtrudelineBloom(r){var o;(o=this.extrudelineArr)==null||o.forEach(V=>{r?V.enableBloom():V.disableBloom()})}active(){this.isActive||(this.isActive=!0,this.useAreaMaterial("origin"),this.useLineMaterial("origin"),this.useExtrudeLineMaterial("origin"),this.options.bloom&&this.toggleExtrudelineBloom(!0))}dispose(){super.dispose(),this.areaArr.length=0,this.lineArr&&(this.lineArr.length=0),this.extrudelineArr&&(this.extrudelineArr.length=0)}};class Earth extends Sphere{constructor(r){super();C0(this,"options");this.options=gi({radius:30,rotationY:0},r)}create(){const o=this.pencil.mList.get("earthMaterial");this.material=o,super.create(),this.rotation.y=this.options.rotationY,this.object3d.name="地球"}}class SphereShadow extends Z$1{constructor(r){super();C0(this,"options");this.options=gi({radius:30},r)}create(){return U0(this,null,function*(){const r=new SphereGeometry(this.options.radius,128,90),o=new MeshBasicMaterial;this.createMesh(r,o),this.scale.multiplyScalar(1.001),this.rotation.y=Math.PI/180*-90,this.object3d.name="阴影面",this.hide()})}}const objs$1=qi(gi({},objs$3),{Earth,SphereShadow,Countries:PlaneMap$1}),base$2=v=>{v.loaderAdd=function(){const{loader:e}=this;e.add(["/image/earth2/basic.jpg","/image/earth2/NormalMap.jpg"])},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=e.getAsset("/image/earth2/basic.jpg"),o=e.getAsset("/image/earth2/NormalMap.jpg"),V=new MeshStandardMaterial({name:"地球材质",map:r,metalness:.1,roughness:.8,normalMap:o,normalScale:new Vector2(.5,.5)});this.mList.add("earthMaterial",V)})},v.initVis=function(){return U0(this,null,function*(){v.pencil.camera.near=1,v.pencil.camera.far=3e3,v.pencil.camera.fov=12,v.pencil.camera.updateProjectionMatrix();const[e,r]=yield Promise.all([this.lead.draw("Light",{type:"PointLight",intensity:4,color:16777215,distance:0,decay:0}),this.lead.draw("Earth",{radius:100,rotationY:Math.PI/180*90})]);yield this.pencil.controls.fitToBox(r.object3d,!1),e.position.copy(this.pencil.cameraPositon)})}},chinaPlate=v=>{v.extendsOptions=qi(gi({},v.extendsOptions),{otherMapDepth:()=>v.options.otherMapDepth,copyChinaPlane:v.options.copyChinaPlane,mergeSide:()=>v.options.mergeSide}),v.loaderAdd=function(){const{loader:e}=this;e.add(["/image/earth/basic.webp","/image/earth/chinaBorder.png","/image/earth/flyline.png","/image/earth/chinaNormal.webp"])},v.initVis=function(){return U0(this,null,function*(){yield this.initLight();const[,e,r]=yield Promise.all([this.lead.draw("Earth",{radius:this.options.radius,rotationY:Math.PI/180*-90}),this.lead.draw("Countries",{key:"countries",conic:!0,geojson:{type:"FeatureCollection",features:worldJson.features.filter(o=>{var V;return((V=o.properties)==null?void 0:V.name)!=="中国"})},depth:this.options.otherMapDepth,start:this.options.radius,lineOffset:.01,materialOptions:this.mList.getMultiple("world"),hasSide:!!this.options.otherMapDepth,hasTop:!!this.options.otherMapDepth,areaGroup:!1,bbox:[-180,-90,180,90]}),this.lead.draw("Countries",{key:"china",conic:!0,geojson:chinaJson,extrudeLineGeojson:chinaLiteJson,depth:this.options.mapDepth,start:this.options.radius,lineOffset:.01,materialOptions:this.mList.getMultiple("plane"),bbox:chinaBbox,mergeSide:this.options.mergeSide})]);if(e.object3d.name="世界",r.object3d.name="中国",r.extrudelineArr&&v.initBaseObjectUserData(r.extrudelineArr[0]),this.map=r,this.options.copyChinaPlane){this.options.copyChinaPlane;const o=yield this.lead.draw("Countries",{key:"chinaCopy",conic:!0,geojson:chinaJson,depth:this.options.mapDepth,start:this.options.radius,materialOptions:{topMat:new MeshBasicMaterial({color:"#ffffff"})},bbox:chinaBbox,hasSide:!1,hasTop:!0,hasLine:!1,areaGroup:!1});o.object3d.name="复制中国顶面",this.lead.updateBaseObjectKey(o.children[0],{type:"chinaPlaneCopy"})}yield this.pencil.controls.rotateTo(1.833542196136704,.9809685394021701,!1),yield this.pencil.controls.dollyTo(99.11560932366835,!1)})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=new MeshStandardMaterial({side:DoubleSide,name:"顶面",color:new Color$1("#0d8a8c"),metalness:.75,roughness:.61,normalMap:e.getAsset("/image/earth/chinaNormal.webp")}),o=new MeshStandardMaterial({side:DoubleSide,name:"侧面",color:new Color$1("#999999"),map:e.getAsset("/image/earth/chinaBorder.png")}),V=new zt({name:"中国边界",lineWidth:.6,sizeAttenuation:!1,color:new Color$1("#59C8FF")}),le=new zt({name:"世界边界",lineWidth:.6,sizeAttenuation:!1,color:new Color$1("#80abaf")}),fe=new MeshBasicMaterial({name:"世界顶面"}),Le=new MeshBasicMaterial({name:"世界侧面"}),Ce=e.getAsset("/image/earth/basic.webp"),Re=new MeshStandardMaterial({name:"地球材质",map:Ce,color:new Color$1(2397309),metalness:.84,roughness:.51}),Pe=e.getAsset("/image/earth/flyline.png");Pe.wrapS=RepeatWrapping,Pe.wrapT=RepeatWrapping,Pe.repeat.set(.5,.5);const ze=new zt({name:"省份边界",map:Pe,lineWidth:.6,sizeAttenuation:!1,transparent:!0,color:new Color$1("#3a898b")});this.mList.addMultiple("plane",{topMat:r,sideMat:o,lineMat:ze,extrudeLineMat:V}),this.mList.addMultiple("world",{topMat:fe,sideMat:Le,lineMat:le}),this.mList.add("earthMaterial",Re)})}},countryPlate=v=>{v.initVis=function(){return U0(this,null,function*(){yield this.initLight();const[,e]=yield Promise.all([this.lead.draw("Earth",{radius:this.options.radius,rotationY:Math.PI/180*-90}),this.lead.draw("Countries",{key:"countries",conic:!0,geojson:worldJson,depth:this.options.mapDepth,start:this.options.radius,projection:{},materialOptions:this.mList.getMultiple("plane"),bbox:[-180,-90,180,90],lineOffset:.14}),this.lead.draw("SphereShadow",{radius:this.options.radius})]);this.map=e,yield this.pencil.controls.rotateTo(1.8041576242193995,1.2232045720480524,!1),yield this.pencil.controls.dollyTo(99.11560932366835,!1),this.playing&&(this.pencil.controls.minPolarAngle=this.pencil.controls.polarAngle,this.pencil.controls.maxPolarAngle=this.pencil.controls.polarAngle)})},v.initMaterial=function(){return U0(this,null,function*(){const e=new MeshStandardMaterial({side:DoubleSide,name:"侧面",color:new Color$1("#999999")}),r=new MeshStandardMaterial({name:"顶面",color:new Color$1("#ffffff"),emissive:new Color$1("#523333")}),o=new zt({name:"边框线",lineWidth:1,sizeAttenuation:!1,color:new Color$1("#006aa3")}),V=new MeshBasicMaterial({name:"地球材质",color:new Color$1("#012b47")});this.mList.addMultiple("plane",{topMat:r,sideMat:e,lineMat:o}),this.mList.add("earthMaterial",V)})},v.getLocationPosition=function(e,r=0){const[o,V]=e,le=this.options.mapDepth+this.options.radius+r;return p$2(o,V,le)}},styles=Object.freeze(Object.defineProperty({__proto__:null,base:base$2,chinaPlate,countryPlate},Symbol.toStringTag,{value:"Module"})),An=class An extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs$1);C0(this,"leftTruck",!1);C0(this,"extendsOptions",{mapDepth:()=>this.options.mapDepth});C0(this,"map")}get mapArea(){return this.map.areaArr}setOptions(r){super.setOptions(gi({mapDepth:1.4,otherMapDepth:0,radius:30,style:"chinaPlate",copyChinaPlane:!1,mergeSide:!1},r)),this.initSettingsObj={autoRotateSpeed:0},styles[this.options.style](this)}handleSetting(r,o){return U0(this,null,function*(){return yield Zn(An.prototype,this,"handleSetting").call(this,r,o),r==="autoRotateSpeed"?this.pencil.autoRotate(o):r==="autoRotate"&&(o?this.settings.autoRotateSpeed=-20:this.settings.autoRotateSpeed=0),o})}show(){super.show(),this.animationIn()}animationIn(){const r=this.pencil.controls;r.addEventListener("controlstart",()=>{this.pencil.autoRotate(0)}),r.addEventListener("controlend",()=>{this.pencil.autoRotate(this.settings.autoRotateSpeed)})}initLight(){return U0(this,null,function*(){const[r,o]=yield Promise.all([this.lead.draw("Light",{type:"RectAreaLight",uId:"1",color:"#E0FFFD",width:200,height:200}),this.lead.draw("Light",{type:"RectAreaLight",uId:"2",intensity:3,width:200,height:170})]);r.position.set(0,50,-100),o.position.set(0,0,150),r.object3d.lookAt(0,0,0),o.object3d.lookAt(0,0,0)})}getLocationPosition(r,o=0){const[V,le]=r,fe=this.getRadius()+o;return p$2(V,le,fe)}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#outLine");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return U0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe)return this.lead.draw("Countries",{geojson:{type:"FeatureCollection",features:[fe]},depth:this.options.mapDepth+.3,start:this.options.radius,materialOptions:{topMat:new MeshBasicMaterial(V.area),lineMat:new zt(V.line)}})})}getRadius(){const r=this.baseObjectByUuid("earth");return r?r.object3d.geometry.parameters.radius:0}checkBehindEarth(r,o){const V=new Vector3(0,0,0),le=new Vector3(0,0,0),fe=this.getRadius(),Le=()=>{const Ce=r();if(!Ce.length)return;this.pencil.controls.getPosition(le,!1);const Re=V.clone().sub(le),Pe=Math.sqrt(Ln(Re.length(),2)-Ln(fe,2)),ze=Ce.map(Fe=>Fe.position.clone().sub(le).length()>Pe);o(Ce,ze)};Le(),this.pencil.controls.addEventListener("update",()=>{Le()})}setObjectOnSphere(r,o,V=0,le=[0,1,0]){if(r.objectType==="Plane"){const fe=this.getLocationPosition(o,V);r.position.set(...fe);const Le=r.object3d.material;Le&&(Le.side=DoubleSide),r.object3d.lookAt(0,0,0)}else{const fe=r.rotation.clone(),Le=this.getLocationPosition(o,V);r.position.set(...Le);const Ce=new Vector3(...Le).normalize(),Re=new Vector3(...le);Re.applyEuler(fe);const Pe=new Quaternion().setFromUnitVectors(Re,Ce);r.object3d.applyQuaternion(Pe)}}};C0(An,"VisName","earth");let index=An;const timeOut=v=>U0(exports,null,function*(){const e=esusLite.makePromiseCreator();return setTimeout(()=>{e.resolve()},v),e.promise}),getTween=v=>({onUpdate:e=V=>{},onComplete:r=()=>{},backwards:o=!0}={})=>{o&&e(0);const V=new Tween({v:0});return{start:({duration:le=1e3,repeat:fe=0,repeatResolve:Le=1,repeatDelay:Ce=0}={})=>{const Re=esusLite.makePromiseCreator();let Pe=0;return V.to({v:1},le).onUpdate(({v:ze})=>{e(ze)}).onComplete(()=>{e(1),r(),Re.resolve()}).onRepeat(()=>{Pe++,Pe>=Le&&Re.resolve()}).repeat(fe).repeatDelay(Ce).easing(v).start(),Re.promise},stop:()=>{V.stop()}}},sinusoidalInOut=getTween(Easing.Sinusoidal.InOut),baseObjectFadeIn=v=>{const e=new Set,r=new Set;v.object3d.traverse(V=>{const le=V;le.material&&(Array.isArray(le.material)?le.material:[le.material]).forEach(Le=>{e.add(Le)})});const o=new Map;return e.forEach(V=>{o.set(V,V.opacity),V.transparent||(r.add(V),V.transparent=!0,V.needsUpdate=!0)}),sinusoidalInOut({onUpdate:V=>{e.forEach(le=>{le.opacity=V*o.get(le)})},onComplete:()=>{r.forEach(V=>{V.transparent=!1,V.needsUpdate=!0}),e.clear(),r.clear(),o.clear()}})},baseObjectFadeOut=v=>{const e=new Set,r=new Set;v.object3d.traverse(V=>{const le=V;le.material&&(Array.isArray(le.material)?le.material:[le.material]).forEach(Le=>{e.add(Le)})});const o=new Map;return e.forEach(V=>{o.set(V,V.opacity),V.transparent||(r.add(V),V.transparent=!0,V.needsUpdate=!0)}),sinusoidalInOut({onUpdate:V=>{e.forEach(le=>{le.opacity=(1-V)*o.get(le)})},onComplete:()=>{e.clear(),r.clear(),o.clear()}})},baseObjectBounceIn=(v,e="z")=>{const r=e.trim().split(""),o=r.reduce((V,le)=>(V[le]=v.scale[le],V),{});return sinusoidalInOut({onUpdate:V=>{r.forEach(le=>{v.scale[le]=o[le]*V})}})},baseObjectBounce=(v,e="z",r)=>{const o=e.trim().split(""),V=o.reduce((le,fe)=>(le[fe]=v.scale[fe],le),{});return sinusoidalInOut({onUpdate:le=>{o.forEach(fe=>{v.scale[fe]=V[fe]+(r-V[fe])*le})}})},animation=Object.freeze(Object.defineProperty({__proto__:null,baseObjectBounce,baseObjectBounceIn,baseObjectFadeIn,baseObjectFadeOut,sinusoidalInOut,timeOut},Symbol.toStringTag,{value:"Module"}));class ContinentsBg extends Z$1{constructor(r){super();C0(this,"options");C0(this,"mapArr",[]);this.options=r}create(){return U0(this,null,function*(){const{depth:r}=this.options,o=this.pencil.mList,V=this.pencil.lead,le=o.getMultiple("continents");this.createGroup(),this.object3d.name="大洲",yield Promise.all(Object.values(continentsLiteJson).map(fe=>U0(this,null,function*(){const Le=fe.features[0],Ce=Le.properties.adcode;if(Ce===10)return;const Re=turf.centroid(Le).geometry.coordinates;let Pe=0,ze=0,Fe=this.options.scale;const ke=30,Gt=25;Ce===5?(Pe=-ke,ze=Gt,Fe=Fe*.2):Ce===21?(Pe=0,ze=Gt,Fe=Fe*.18):Ce===9?(Pe=ke,ze=Gt,Fe=Fe*.3):Ce===142?(Pe=-ke,ze=-Gt,Fe=Fe*.15):Ce===150?(Pe=0,ze=-Gt,Fe=Fe*.3):Ce===2&&(Pe=ke,ze=-Gt,Fe=Fe*.2);const Vt=yield V.draw("PlaneMap",{key:`${this.key}-${Ce}`,geojson:fe,projection:{center:Re,scale:Fe,rotate:[0,0],projectionType:"equirectangular"},areaGroup:!1,depth:r,materialOptions:gi({},le)},this);Vt.userData.projection=f({center:Re,scale:Fe,rotate:[0,0],projectionType:"equirectangular"}),Vt.object3d.name=Le.properties.name,Vt.userData.name=Le.properties.name,Vt.position.set(Pe,ze,0),this.mapArr.push(Vt)})))})}getPointInContinentInfo(r){var o;return(o=Object.values(continentsLiteJson).map(V=>V.features).find(V=>V[0].geometry.coordinates.some(le=>le.length?turf.booleanPointInPolygon(turf.point(r),turf.polygon(le)):!1)))==null?void 0:o[0]}getPointInContinent(r){return!!this.getPointInContinentInfo(r)}getLocationPosition(r,o){var le;const V=o||((le=this.getPointInContinentInfo(r))==null?void 0:le.properties.name);if(V){const fe=this.mapArr.find(Le=>Le.userData.name===V);if(fe){const{projection:Le}=fe.userData,[Ce,Re]=r,[Pe,ze]=Le([Ce,Re]),Fe=new Vector3(Pe,-ze,this.options.depth);return Fe.applyMatrix4(fe.object3d.matrixWorld),[Fe.x,Fe.y,Fe.z]}}}render(){this.lead.updateBaseObjectKey(this,{type:"continents-group"}),this.mapArr.forEach(r=>{this.lead.updateBaseObjectKey(r,{type:"continents-"+r.userData.name})})}dispose(){this.mapArr.forEach(r=>{r.dispose()}),this.mapArr.length=0}}class PlaneMap extends Z$1{constructor(r){super();C0(this,"options");C0(this,"extrudePolygon");this.options=gi({depth:2},r)}geojson2Meta(r){return r.features.filter(o=>o.geometry).map(o=>{const{type:V,coordinates:le}=o.geometry;let fe=[];return V==="Polygon"?fe=le:V==="MultiPolygon"&&(fe=le.flat()),{coords:fe,properties:o.properties}})}create(){return U0(this,null,function*(){const{geojson:r,bbox:o}=this.options,V=this.geojson2Meta(r),le=this.pencil.getPlugin("worker"),fe=this.pencil.lead,Ce=yield this.pencil.loader.load("/1.png"),Re=V.flatMap(({coords:wt})=>wt),Pe=yield le.geoGeometry("extrudePolygon",{coordinatesArr:Re,metaArray:Re.map(()=>[this.options.depth]),mesaage:{projection:gi({},this.options.projection),topSegments:100,bbox:o,hasBottom:!1,hasSide:!1}}),ze=Pe.attributes.position.count;Pe.setAttribute("color",new BufferAttribute(new Float32Array(ze*3),3));const Fe=this.options.depth;this.setNoise(Pe,Ce.image,Fe);const ke=new Color$1,Gt=Pe.attributes.color,Vt=Pe.attributes.position,Xt=new Color$1("red"),xt=new Color$1("green");for(let wt=0;wt<ze;wt++){const Wt=Vt.getZ(wt)/Fe;ke.lerpColors(Xt,xt,Wt),Gt.setXYZ(wt,ke.r,ke.g,ke.b)}const Zt=yield fe.draw("ExtrudePolygon",{geometry:Pe,material:new MeshStandardMaterial({flatShading:!0,vertexColors:!0})},null);Zt.position.z+=.001,this.extrudePolygon=Zt,this.object3d=Zt.object3d})}setNoise(r,o,V=1){const le=document.createElement("canvas"),fe=[];le.width=o.width,le.height=o.height;const Le=le.getContext("2d");Le.drawImage(o,0,0);const Re=Le.getImageData(0,0,o.width,o.height).data;for(let ke=0;ke<o.height;ke++){fe[ke]=[];for(let Gt=0;Gt<o.width;Gt++){const Vt=(ke*o.width+Gt)*4,Xt=Re[Vt];fe[ke][Gt]=Xt/255}}const Pe=r.attributes.position,ze=r.attributes.uv,Fe=new Vector2;for(let ke=0;ke<Pe.count;ke++){Fe.fromBufferAttribute(ze,ke);let Gt=Math.round(Fe.x*o.width)-1,Vt=Math.round(Fe.y*o.height)-1;Gt<0&&(Gt=0),Vt<0&&(Vt=0);const Xt=fe[Vt][Gt];Pe.setZ(ke,Xt*V)}}render(){this.mList.rmBaseObjectMap(this.extrudePolygon)}dispose(){this.extrudePolygon.dispose(),super.dispose()}}const objs=qi(gi({},objs$3),{PlaneMap:PlaneMap$1,CityPlane,ContinentsBg,Mountain:PlaneMap}),png2webp=(v,e=2048)=>new Promise((r,o)=>{const V=document.createElement("img");V.crossOrigin="anonymous";const le=()=>{V.removeEventListener("load",le,!1),V.removeEventListener("error",fe,!1);const Le=document.createElement("canvas");if(Le.width=V.naturalWidth,Le.height=V.naturalHeight,Le.width>e||Le.height>e){const Pe=Math.min(e/Le.width,e/Le.height);Le.width*=Pe,Le.height*=Pe}Le.getContext("2d").drawImage(V,0,0,Le.width,Le.height);const Ce=Le.toDataURL("image/webp"),Re=new Image;Re.onload=()=>{r(Re)},Re.src=Ce},fe=()=>{V.removeEventListener("load",le,!1),V.removeEventListener("error",fe,!1),o(new Error("Image load error"))};V.addEventListener("load",le,!1),V.addEventListener("error",fe,!1),V.src=v}),ec=(v,e)=>{const r=stringToUtf8ByteArray(v),o=stringToUtf8ByteArray(e).map(function(V,le){return V^r[Math.floor(le%r.length)]}).join(",");return btoa(o)};function stringToUtf8ByteArray(v){const e=[];let r=0;for(let o=0;o<v.length;o++){let V=v.charCodeAt(o);V<128?e[r++]=V:V<2048?(e[r++]=V>>6|192,e[r++]=V&63|128):(V&64512)==55296&&o+1<v.length&&(v.charCodeAt(o+1)&64512)==56320?(V=65536+((V&1023)<<10)+(v.charCodeAt(++o)&1023),e[r++]=V>>18|240,e[r++]=V>>12&63|128,e[r++]=V>>6&63|128,e[r++]=V&63|128):(e[r++]=V>>12|224,e[r++]=V>>6&63|128,e[r++]=V&63|128)}return e}const TEMPLATE_CONFIGS={"7s93q0lma4n9887":{id:"7s93q0lma4n9887",mapIndex:4,mapId:"398-0",emissiveMapIndex:5,emmisiveMapId:"419-0"},l7ojr7nqc06u24f:{id:"l7ojr7nqc06u24f",mapIndex:7,mapId:"245-0",emissiveMapIndex:6,emmisiveMapId:"177-0",cityOnly:!0},"2xli7429f48857f":{id:"2xli7429f48857f",emissiveMapIndex:14,emmisiveMapId:"1140-0"}},getBaseUrl=()=>{const v="/";return v==="/"?"":v},getAdcodeInfo=v=>{const e=findAdcodeInfo(v);if(!e)throw new Error(`Adcode ${v} not found`);return e},fetchGeojsonData=(v,e,r,o)=>U0(exports,null,function*(){const V=o||e,{res:le}=yield jsonFetch(`${v}/geojson/${V}/${r}.json`);return le}),processTemplateImages=(v,e,r,o,V)=>U0(exports,null,function*(){const le=TEMPLATE_CONFIGS[v];if(!(!le||le.cityOnly&&!V))try{if(le.mapIndex!==void 0||le.mapId!==void 0){const fe=yield png2webp(`${r}/template/${v}/${e}.jpg`);Array.isArray(o)?(o[le.mapIndex]=fe.src,console.log(`已替换模板 ${v} 的 map 资源, ${le.mapIndex}`)):(o[le.mapId]=fe.src,console.log(`已替换模板 ${v} 的 map 资源, ${le.mapId}`))}if(le.emissiveMapIndex!==void 0||le.emmisiveMapId!==void 0){const fe=yield png2webp(`${r}/template/${v}/${e}-自发光.jpg`);Array.isArray(o)?(o[le.emissiveMapIndex]=fe.src,console.log(`已替换模板 ${v} 的 emissiveMap 资源, ${le.emissiveMapIndex}`)):(o[le.emmisiveMapId]=fe.src,console.log(`已替换模板 ${v} 的 emissiveMap 资源, ${le.emmisiveMapId}`))}}catch(fe){console.warn(`模板 ${v} 图像资源加载失败:`,fe)}}),getMapConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){if((r==null?void 0:r.style)==="map2CityOnMap")return getMapWithCityConfig(v,e,r,o);if(v===0)return{mapDepth:5,adcode:0,extrudeLine:!1,worldPacificCentre:!0,center:[0,0]};{const fe=getAdcodeInfo(v);return extendMapConfig({center:[fe.lng,fe.lat],adcode:fe.adcode},e,r,o)}}),getMapWithCityConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){const fe=getAdcodeInfo(v),Le=fe?findAdcodeInfo(fe.parent):null,Ce=(fe==null?void 0:fe.level)==="district"&&(Le==null?void 0:Le.level)==="city";return extendMapConfig({center:[fe.lng,fe.lat],adcode:fe.adcode,style:"map2CityOnMap",mapDepth:.004,mergeSide:!0,nearbyCities:Ce},e,r,o)}),extendMapConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){var Vt,Xt;if(v.adcode===0||v.adcode===1e5)return gi({},v);const fe=v.adcode,Le=getAdcodeInfo(fe),Ce=Le.level==="province",Re=Le.level==="city"||Le.level==="district"&&getAdcodeInfo(Le.parent).level==="province",Pe=(Vt=v.fixGeojson)==null?void 0:Vt[fe],ze=(Xt=v.fixGeojson)==null?void 0:Xt[fe+"-lite"],Fe=yield fetchGeojsonData(e,"json",fe,Pe),ke=yield fetchGeojsonData(e,"json-lite",fe,ze),Gt=qi(gi({},v),{geojsonMap:{[fe]:Fe},extrudeLineGeojsonMap:{[fe]:ke},cityBboxMap:{},depthReference:void 0,showBuilding:!Ce,__template:r==null?void 0:r.__template});if(r!=null&&r.__template&&o&&(yield processTemplateImages(r.__template,fe,e,o,Re)),v.parentBg){const xt=Le.parent;if(xt!==1e5){const Zt=yield fetchGeojsonData(e,"json",xt),wt=yield fetchGeojsonData(e,"json-lite",xt);Gt.geojsonMap[xt]=Zt,Gt.extrudeLineGeojsonMap[xt]=wt}}return r&&(Gt.depthReference=r.depthReference||getAdcodeInfo(r.adcode).b),Gt}),getCityConfig=v=>{const e=getAdcodeInfo(v),{name:r}=e;return{center:[e.lng,e.lat],adcode:e.adcode,jsonName:ec(r,`${v}`)}},removeCameraHistory=v=>v.filter(e=>!(e.objectUuid==="camera"&&["SetPosition","SetTarget"].includes(e.type)));class City extends City$1{constructor(){super(...arguments);C0(this,"multiplyScalar",1/1e3)}fixNearFar(r=.01,o){this.pencil.camera.near=r*this.multiplyScalar,o&&(this.pencil.camera.far=o*this.multiplyScalar),this.pencil.camera.updateProjectionMatrix()}}const getLabelElement=v=>{const e=document.createElement("div");return v.replace(/省|市|特别行政区|自治区|维吾尔自治区|回族自治区|壮族自治区/,""),e.classList.add("vis-map-label","absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"),e.innerHTML=`
|
|
5362
|
+
}`},Kt=new ShaderMaterial({name:Ht.name,uniforms:UniformsUtils.clone(Ht.uniforms),vertexShader:Ht.vertexShader,fragmentShader:Ht.fragmentShader,lights:!0,side:Re,fog:Pe});Kt.uniforms.mirrorSampler.value=Ft.texture,Kt.uniforms.textureMatrix.value=It,Kt.uniforms.alpha.value=V,Kt.uniforms.normalSampler.value=le,Kt.uniforms.waterColor.value=fe,Kt.uniforms.distortionScale.value=Ce,Kt.uniforms.eye.value=Le;const Yt=v.material;v.material=Kt,v.onBeforeRender=function(jt,n0,a0){Yt.color!==Kt.uniforms.waterColor.value&&(Kt.uniforms.waterColor.value=Yt.color),ke.setFromMatrixPosition(v.matrixWorld),Gt.setFromMatrixPosition(a0.matrixWorld),Vt.extractRotation(v.matrixWorld),Fe.set(0,0,1),Fe.applyMatrix4(Vt),Zt.subVectors(ke,Gt),a0.updateMatrix(),a0.updateMatrixWorld(),v.updateMatrix(),v.updateMatrixWorld();const l0=new Frustum,s0=new Matrix4;if(s0.multiplyMatrices(a0.projectionMatrix,a0.matrixWorldInverse),l0.setFromProjectionMatrix(s0),!l0.intersectsObject(v)||Zt.dot(Fe)>0)return;Zt.reflect(Fe).negate(),Zt.add(ke),Vt.extractRotation(a0.matrixWorld),Xt.set(0,0,-1),Xt.applyMatrix4(Vt),Xt.add(Gt),wt.subVectors(ke,Xt),wt.reflect(Fe).negate(),wt.add(ke),Nt.position.copy(Zt),Nt.up.set(0,1,0),Nt.up.applyMatrix4(Vt),Nt.up.reflect(Fe),Nt.lookAt(wt),Nt.far=a0.far,Nt.updateMatrixWorld(),Nt.projectionMatrix.copy(a0.projectionMatrix),It.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),It.multiply(Nt.projectionMatrix),It.multiply(Nt.matrixWorldInverse),ze.setFromNormalAndCoplanarPoint(Fe,ke),ze.applyMatrix4(Nt.matrixWorldInverse),xt.set(ze.normal.x,ze.normal.y,ze.normal.z,ze.constant);const $t=Nt.projectionMatrix;Wt.x=(Math.sign(xt.x)+$t.elements[8])/$t.elements[0],Wt.y=(Math.sign(xt.y)+$t.elements[9])/$t.elements[5],Wt.z=-1,Wt.w=(1+$t.elements[10])/$t.elements[14],xt.multiplyScalar(2/xt.dot(Wt)),$t.elements[2]=xt.x,$t.elements[6]=xt.y,$t.elements[10]=xt.z+1,$t.elements[14]=xt.w,Le.setFromMatrixPosition(a0.matrixWorld);const qt=jt.getRenderTarget(),e0=jt.xr.enabled,o0=jt.shadowMap.autoUpdate;v.visible=!1,jt.xr.enabled=!1,jt.shadowMap.autoUpdate=!1,jt.setRenderTarget(Ft),jt.state.buffers.depth.setMask(!0),jt.autoClear===!1&&jt.clear(),jt.render(n0,Nt),v.visible=!0,jt.xr.enabled=e0,jt.shadowMap.autoUpdate=o0,jt.setRenderTarget(qt);const b0=a0.viewport;b0!==void 0&&jt.state.viewport(b0)}};class City$1 extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs$2);C0(this,"adcode",0);C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4);C0(this,"projection");C0(this,"group");C0(this,"building");C0(this,"road");C0(this,"multiplyScalar",1)}setOptions(r){super.setOptions(gi({fitTo:!0,plane:!0,grey:!1,showBuilding:!0,showRoad:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,ssao:!0,buildingHasSide:!0},r))}loaderAdd(){this.loader.add(["/image/city/20-1.jpg","/image/city/60-1.jpg","/image/city/max-1.jpg","/image/city/cylinder.webp","/image/city/20.webp","/image/city/60.webp","/image/city/max.webp"])}initMaterial(){return U0(this,null,function*(){if(this.mList.get("city-plane-mat")){console.log("city-plane-mat exist");return}if(this.options.showBuilding){const r=["20","60","max"].reduce((V,le)=>{const fe=this.loader.getAsset(`/image/city/${le}-1.jpg`),Le=this.loader.getAsset(`/image/city/${le}.webp`);return V[le]=[new MeshBasicMaterial({name:"建筑顶面-板块内"+le+"高",color:"#00a3bc"}),new MeshStandardMaterial({name:"建筑侧面-板块内"+le+"高",map:fe,normalMap:Le,envMap:this.getRoomEnvMap()})],[fe,Le].forEach(Ce=>{Ce.wrapS=RepeatWrapping,Ce.wrapT=RepeatWrapping,Ce.repeat.set(1,1)}),V},{});this.mList.addMultiple("building",{"20Top":r[20][0],"20Side":r[20][1],"60Top":r[60][0],"60Side":r[60][1],maxTop:r.max[0],maxSide:r.max[1]});const o=["20","60","max"].reduce((V,le)=>{const fe=this.loader.getAsset(`/image/city/${le}-1.jpg`),Le=this.loader.getAsset(`/image/city/${le}.webp`);return V[le]=[new MeshBasicMaterial({name:"建筑顶面-板块外"+le+"高",color:"#133144"}),new MeshStandardMaterial({name:"建筑侧面-块外"+le+"高",map:fe,normalMap:Le,envMap:this.getRoomEnvMap()})],[fe,Le].forEach(Ce=>{Ce.wrapS=RepeatWrapping,Ce.wrapT=RepeatWrapping,Ce.repeat.set(1,1)}),V},{});this.mList.addMultiple("building-grey",{"20Top":o[20][0],"20Side":o[20][1],"60Top":o[60][0],"60Side":o[60][1],maxTop:o.max[0],maxSide:o.max[1]})}if(this.options.showRoad){const r=new zt({name:"道路-板块内",color:"#ffc457",sizeAttenuation:!1,lineWidth:12}),o=new zt({name:"道路-板块外",color:"#4a3f15",sizeAttenuation:!1,lineWidth:12});this.mList.addMultiple("road",{primary:r}),this.mList.addMultiple("road-grey",{primary:o})}(this.options.showRiver||this.options.showGrassland)&&(this.mList.addMultiple("geography",{river:new MeshBasicMaterial({name:"河流-板块内",color:"#115d8a"}),grassland:new MeshBasicMaterial({name:"绿地-板块内",color:"#043141"})}),this.mList.addMultiple("geography-grey",{river:new MeshBasicMaterial({name:"河流-板块外",color:"#19354f"}),grassland:new MeshBasicMaterial({name:"绿地-板块外",color:"#133341"})})),this.mList.add("city-plane-mat",new MeshBasicMaterial({color:"#0b2234"}))})}disableSSAO(){const r=this.pencil.composerController.ssaoPass;r&&r.enabled&&(r.enabled=!1,console.log("disableSSAO"))}enabledSSAO(){const r=this.pencil.composerController.ssaoPass;r&&!r.enabled&&(r.enabled=!0,console.log("enabledSSAO"))}init(){return U0(this,null,function*(){const{adcode:r}=this.options;yield this.initPencil(),this.loaderAdd(),console.time(`vis-core:time.${this.visName}${r}-loader`),yield this.loader.loadAll(),console.timeEnd(`vis-core:time.${this.visName}${r}-loader`),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.pencil.camera.userData.up="0,0,1",this.adcode=this.options.adcode,this.options.center&&(this.pcenter=this.options.center),this.projection=f({center:this.pcenter,scale:this.pscale}),this.group=yield this.lead.draw("Group",{key:`city${r}`});const o=findAdcodeInfo(r);this.group.object3d.name=`城市-${o?o.name:r}`,this.group.scale.multiplyScalar(this.multiplyScalar),yield this.initMaterial(),yield this.initVis(),yield Promise.all(this.lead.objectsPromise)})}getInvert(r){var o,V;return(V=(o=this.projection).invert)==null?void 0:V.call(o,[r.x,-r.z])}fitTo(r,o=!0){return U0(this,null,function*(){this.pencil.controls.fitToBox(r.object3d,o),this.pencil.controls.rotatePolarTo(this.pencil.camera.up.z===1?Math.PI/180*70:Math.PI/180*160,o)})}initVis(){return U0(this,null,function*(){const{jsonName:r}=this.options,o=this.adcode,V=this.loader;let le=[];if(le=JSON.parse(localStorage.getItem("city-oArr"+o)||"[]"),!le.length){const Le=this.options.showRiver&&(yield V.load(`/cityGzip/River${r}.json.gzip`)),Ce=this.options.showGrassland&&(yield V.load(`/cityGzip/Grassland${r}.json.gzip`)),Re={};[...(Le==null?void 0:Le.features)||[],...(Ce==null?void 0:Ce.features)||[]].forEach(Pe=>{Pe.properties.o&&(Re[Pe.properties.o]=!0)}),le=Object.keys(Re).map(Pe=>+Pe).sort((Pe,ze)=>Pe-ze),localStorage.setItem("city-oArr"+o,JSON.stringify(le))}const fe=-f({center:this.pcenter,scale:this.pscale})([this.pcenter[0],899e-8+this.pcenter[1]])[1];yield Promise.all([this.options.showBuilding&&this.drawBuilding({jsonUrl:`/cityGzip/Building${r}.json.gzip`,meters:fe,grey:this.options.grey,sideGradient:this.options.buildingSideGradient,hasSide:this.options.buildingHasSide}),this.options.showRoad&&this.drawRoad({jsonUrl:`/cityGzip/Road${r}.json.gzip`,meters:fe,z:le.length,grey:this.options.grey}),this.options.showRiver&&this.drawArea({jsonUrl:`/cityGzip/River${r}.json.gzip`,type:"river",oArr:le,grey:this.options.grey}),this.options.showGrassland&&this.drawArea({jsonUrl:`/cityGzip/Grassland${r}.json.gzip`,type:"grassland",oArr:le,grey:this.options.grey})].filter(Boolean)),this.pencil.getPlugin("worker").saveCache(),!this.tier0&&this.options.showBuilding&&this.options.ssao&&this.pencil.controls.addEventListener("update",()=>{this.pencil.controls.distance<.1?this.enabledSSAO():this.disableSSAO()})})}drawCityPlane(r,o){return U0(this,null,function*(){const V=this.mList.get("city-plane-mat"),le=findAdcodeInfo(r).b,fe=this.projection([le[0],le[1]]),Le=this.projection([le[2],le[3]]),Ce=Math.abs(Le[0]-fe[0]),Re=Math.abs(Le[1]-fe[1]),Pe=Ce,ze=Re,Fe=yield this.lead.draw("CityPlane",{width:Pe*10,height:ze*10,material:V},o!=null?o:this.group);Fe.object3d.name="底面",this.lead.updateBaseObjectKey(Fe,{type:"city-plane"})})}drawBuilding(){return U0(this,arguments,function*(r={}){if(!r.jsonUrl){console.warn(" json:Building");return}const o=this.options.cacheKey?`building-${this.options.cacheKey}${r.hasSide?"":"-no-side"}`:void 0,V=yield this.lead.draw("Building",{key:"$p:-building",projection:{center:this.pcenter,scale:this.pscale},jsonUrl:r.jsonUrl,cacheKey:o,meters:r.meters,sideGradient:r.sideGradient,grey:r.grey,hasSide:r.hasSide},this.group);return this.building=V,V})}drawArea(){return U0(this,arguments,function*(r={}){if(!r.jsonUrl){console.warn(" json:drawGeography");return}if(!r.type)return;const{grey:o}=r,V=o?"-grey":"",le=this.options.cacheKey?`${r.type}-${this.options.cacheKey}`:void 0,fe=yield this.lead.draw("Area",{key:`$p:-${r.type}`,projection:{center:this.pcenter,scale:this.pscale},jsonUrl:r.jsonUrl,material:this.mList.getMultiple("geography"+V)[r.type],type:r.type,cacheKey:le,oArr:r.oArr},this.group);return fe.object3d.name=r.type==="river"?"河流":"绿地",r.type==="river"&&!o&&this.options.setWaterMaterial&&fe.area.forEach(Le=>{setWaterMaterial(Le.object3d)}),fe})}drawRoad(){return U0(this,arguments,function*(r={}){if(!r.jsonUrl){console.warn(" json:Road");return}const o=this.options.cacheKey?`road-${this.options.cacheKey}`:void 0,V=yield this.lead.draw("Road",{key:"$p:-road",projection:{center:this.pcenter,scale:this.pscale},jsonUrl:r.jsonUrl,cacheKey:o,grey:r.grey,meters:r.meters},this.group),le=r.z||0;return V.position.z=(le+1)*.001,r.grey||(this.lead.updateBaseObjectKey(V,{type:"road",key:"group"}),this.initBaseObjectUserData(V)),r.grey||(this.road=V),V})}getWorldPosition(r,o){if(this.options.coordtransformFunc){const fe=this.options.coordtransformFunc(r,o);r=fe.longitude,o=fe.latitude}const[V,le]=this.projection([r,o]);return{x:V,y:-le}}}C0(City$1,"VisName","city");const hideMaterial=new MeshBasicMaterial({colorWrite:!1,transparent:!0});let PlaneMap$1=class extends Z$1{constructor(r){var o;super();C0(this,"options");C0(this,"isActive",!0);C0(this,"groupArr",[]);C0(this,"areaArr",[]);C0(this,"lineArr");C0(this,"mergeSideArea",null);C0(this,"extrudelineArr");C0(this,"splitPolygons",0);this.options=gi({areaGroup:!0,hasSide:!0,hasTop:!0,lineOffset:0,start:0,hasLine:!0,topSegments:0,depth:2,bloom:!1,conic:!1,mergeSide:!1,onTop:0,projection:{}},r),((o=this.options.projection.rotate)==null?void 0:o[0])===-160&&(this.options.projection.projectionType==="winkel3"?this.splitPolygons=100:this.splitPolygons=300)}create(){return U0(this,null,function*(){const{geojson:r,extrudeLineGeojson:o,bbox:V,areaGroup:le,materialOptions:fe,hasSide:Le,hasTop:Ce,hasLine:Re,mergeSide:Pe}=this.options;this.createGroup();const ze=this.pencil.lead;if(le){const Ht=yield Promise.all(r.features.map(Kt=>U0(this,null,function*(){const{properties:Yt}=Kt,jt=`${this.getPropertiesKey(Yt)}`,n0=yield ze.draw("Group",{target:this,key:jt});return n0.object3d.name=(Yt==null?void 0:Yt.adcode)==="100000_JD"?"十段线":Yt==null?void 0:Yt.name,n0.userData=gi({},Yt),n0})));this.groupArr=Ht}const{lineMat:Fe,extrudeLineMat:ke,topMat:Gt,sideMat:Vt,bgTopMat:Xt,bgSideMat:xt,bgLineMat:Zt,bgExtrudeLineMat:wt}=fe,[Wt,It,Nt,Ft]=yield Promise.all([(Ce||Ce)&&this.addArea(r,{material:Le?[Gt,Pe?hideMaterial:Vt]:Gt,bbox:V,areaGroup:le,hasSide:Le,hasTop:!0,castShadow:!Pe,onTop:this.options.onTop}),Re&&this.addLine(r,{material:Fe,onTop:this.options.onTop+2,areaGroup:le}),o&&this.addLine(o,{material:ke,onTop:this.options.onTop+3}),Pe&&o&&this.addArea(o,{material:Vt,bbox:V,castShadow:!0,areaGroup:!1,hasSide:!0,hasTop:!1,onTop:this.options.onTop})]);Ft&&(this.mergeSideArea=Ft[0],this.mergeSideArea.object3d.name="板块合并侧面"),Wt&&(this.areaArr=Wt),It&&(this.options.conic||It.forEach(Ht=>{Ht.position.z=this.options.depth+this.options.lineOffset}),this.lineArr=It),Nt&&(Nt.forEach(Ht=>{this.options.conic||(Ht.position.z=this.options.depth+this.options.lineOffset),this.lead.updateBaseObjectKey(Ht,{key:this.getPropertiesKey({name:"extrudeLine"})})}),this.extrudelineArr=Nt),Xt&&xt&&this.setAreaMaterial("bg",[Xt,xt]),Zt&&this.setLineMaterial("bg",Zt),wt&&this.setExtrudeLineMaterial("bg",wt)})}addArea(r,o){return U0(this,null,function*(){const{bbox:V,material:le,onTop:fe}=o,Le=this.geojson2Meta(r),Ce=this.pencil.getPlugin("worker"),Re=this.pencil.lead;if(this.pencil.mList,o.areaGroup)return yield Promise.all(Le.map(Pe=>U0(this,null,function*(){const{coords:ze,properties:Fe}=Pe,ke=this.findGroup(this.getPropertiesKey(Fe)),Gt=this.options.conic?yield Ce.geoGeometry("conicPolygon",{coordinatesArr:ze,metaArray:ze.map(()=>[this.options.depth,this.options.start]),mesaage:{topFirst:!0,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:o.hasSide&&o.hasTop?2:0}}):yield Ce.geoGeometry("extrudePolygon",{coordinatesArr:ze,metaArray:ze.map(()=>[this.options.depth]),mesaage:{projection:this.options.projection,topSegments:this.options.topSegments,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:o.hasSide&&o.hasTop?2:0,splitPolygons:this.splitPolygons}}),Vt=`${this.getPropertiesKey(Fe)}`,Xt=yield Re.draw("ExtrudePolygon",{key:Vt,geometry:Gt,material:le,onTop:fe},ke);return Xt.object3d.name="板块",o!=null&&o.castShadow&&(Xt.object3d.castShadow=!0),Xt.userData=gi({},Fe),Xt})));{const Pe=Le.flatMap(({coords:ke})=>ke),ze=this.options.conic?yield Ce.geoGeometry("conicPolygon",{coordinatesArr:Pe,metaArray:Pe.map(()=>[this.options.depth,this.options.start]),mesaage:{topFirst:!0,bbox:V,hasBottom:!1,hasSide:o.hasSide,hasTop:o.hasTop,useGroups:2}}):yield Ce.geoGeometry("extrudePolygon",{coordinatesArr:Pe,metaArray:Pe.map(()=>[this.options.depth]),mesaage:{projection:gi({},this.options.projection),topSegments:this.options.topSegments,bbox:V,hasSide:o.hasSide,hasTop:o.hasTop,hasBottom:!1,useGroups:2,splitPolygons:this.splitPolygons}}),Fe=yield Re.draw("ExtrudePolygon",{key:this.getPropertiesKey({name:"all"}),geometry:ze,material:le},this);return o!=null&&o.castShadow&&(Fe.object3d.castShadow=!0),Fe.object3d.name="板块",Fe.userData={},[Fe]}})}addLine(r,o){return U0(this,null,function*(){const{material:V,onTop:le}=o,fe=this.geojson2Meta(r),Le=this.pencil.getPlugin("worker"),Ce=this.pencil.lead;if(o.areaGroup)return yield Promise.all(fe.map(Re=>U0(this,null,function*(){const{coords:Pe,properties:ze}=Re,Fe=this.findGroup(this.getPropertiesKey(ze)),ke=this.options.conic?yield Le.geoGeometry("conicLine",{coordinatesArr:Pe,metaArray:Pe.map(()=>[1,this.options.start+this.options.depth+this.options.lineOffset]),mesaage:{}}):yield Le.geoGeometry("line",{coordinatesArr:Pe,metaArray:Pe.map(()=>[1]),mesaage:{projection:this.options.projection,splitPolygons:this.splitPolygons}}),Gt=`${this.getPropertiesKey(ze)}`,Vt=yield Ce.draw("Line",{key:Gt,geometry:ke,material:V,onTop:le},Fe);return Vt.userData=gi({},ze),Vt.object3d.name="线",Vt})));{const Re=fe.flatMap(({coords:Fe})=>Fe),Pe=this.options.conic?yield Le.geoGeometry("conicLine",{coordinatesArr:Re,metaArray:Re.map(()=>[1,this.options.start+this.options.depth+this.options.lineOffset]),mesaage:{}}):yield Le.geoGeometry("line",{coordinatesArr:Re,metaArray:Re.map(()=>[1]),mesaage:{projection:this.options.projection,splitPolygons:this.splitPolygons}}),ze=yield Ce.draw("Line",{key:this.getPropertiesKey({name:"all"}),geometry:Pe,material:V,onTop:le},this);return ze.object3d.name="线",[ze]}})}getPropertiesKey(r){return`${this.key.split("#")[1]}-${r.adcode||r.iso_a2||r.name}`}geojson2Meta(r){return r.features.filter(o=>o.geometry).map(o=>{const{type:V,coordinates:le}=o.geometry;let fe=[];return V==="Polygon"?fe=le:V==="MultiPolygon"&&(fe=le.flat()),{coords:fe,properties:o.properties}})}update(r,o){const{lineMat:V,extrudeLineMat:le}=this.options.materialOptions;this.isActive&&[V,le].forEach(fe=>{var Le;!fe||!((Le=fe.uniforms.lineLightAnimation)!=null&&Le.value)||(fe.uniforms.time.value=o)})}findGroup(r,o=!1){return this.pencil.lead.getObject("Group",{key:`${o?this.getPropertiesKey({adcode:r}):r}`})}setAreaMaterial(r,o){this.areaArr.forEach(V=>{V.setMaterialList(r,this.mergeSideArea&&Array.isArray(o)?[o[0],hideMaterial]:o)}),this.mergeSideArea&&Array.isArray(o)&&this.mergeSideArea.setMaterialList(r,o[1])}useAreaMaterial(r){this.areaArr.forEach(o=>{o.useMaterial(r)}),this.mergeSideArea&&this.mergeSideArea.useMaterial(r)}setLineMaterial(r,o){this.lineArr.forEach(V=>{V.setMaterialList(r,o)})}useLineMaterial(r){this.lineArr.forEach(o=>{o.useMaterial(r)})}setExtrudeLineMaterial(r,o){var V;(V=this.extrudelineArr)==null||V.forEach(le=>{le.setMaterialList(r,o)})}useExtrudeLineMaterial(r){var o;(o=this.extrudelineArr)==null||o.forEach(V=>{V.useMaterial(r)})}changeLineAnimateParams({speed:r=.5,extrude:o=!1}){const{lineMat:V,extrudeLineMat:le}=this.options.materialOptions,fe=o?le:V;if(!fe)return;fe.uniforms.time.value=0,fe.uniforms.speed.value=r,fe.uniforms.lineLightAnimation.value=1;const{size:Le,min:Ce,max:Re}=this.getSize();fe.uniforms.size.value=Math.max(Le.x,Le.y)/2,fe.uniforms.uCenter.value=new Vector2((Ce.x+Re.x)/2,(Ce.y+Re.y)/2)}deactive(){this.isActive&&(this.options,this.isActive=!1,this.options.bloom&&this.toggleExtrudelineBloom(!1),this.useAreaMaterial("bg"),this.useLineMaterial("bg"),this.useExtrudeLineMaterial("bg"))}render(){this.options.bloom&&this.toggleExtrudelineBloom(!0)}toggleExtrudelineBloom(r){var o;(o=this.extrudelineArr)==null||o.forEach(V=>{r?V.enableBloom():V.disableBloom()})}active(){this.isActive||(this.isActive=!0,this.useAreaMaterial("origin"),this.useLineMaterial("origin"),this.useExtrudeLineMaterial("origin"),this.options.bloom&&this.toggleExtrudelineBloom(!0))}dispose(){super.dispose(),this.areaArr.length=0,this.lineArr&&(this.lineArr.length=0),this.extrudelineArr&&(this.extrudelineArr.length=0)}};class Earth extends Sphere{constructor(r){super();C0(this,"options");this.options=gi({radius:30,rotationY:0},r)}create(){const o=this.pencil.mList.get("earthMaterial");this.material=o,super.create(),this.rotation.y=this.options.rotationY,this.object3d.name="地球"}}class SphereShadow extends Z$1{constructor(r){super();C0(this,"options");this.options=gi({radius:30},r)}create(){return U0(this,null,function*(){const r=new SphereGeometry(this.options.radius,128,90),o=new MeshBasicMaterial;this.createMesh(r,o),this.scale.multiplyScalar(1.001),this.rotation.y=Math.PI/180*-90,this.object3d.name="阴影面",this.hide()})}}const objs$1=qi(gi({},objs$3),{Earth,SphereShadow,Countries:PlaneMap$1}),base$2=v=>{v.loaderAdd=function(){const{loader:e}=this;e.add(["/image/earth2/basic.jpg","/image/earth2/NormalMap.jpg"])},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=e.getAsset("/image/earth2/basic.jpg"),o=e.getAsset("/image/earth2/NormalMap.jpg"),V=new MeshStandardMaterial({name:"地球材质",map:r,metalness:.1,roughness:.8,normalMap:o,normalScale:new Vector2(.5,.5)});this.mList.add("earthMaterial",V)})},v.initVis=function(){return U0(this,null,function*(){v.pencil.camera.near=1,v.pencil.camera.far=3e3,v.pencil.camera.fov=12,v.pencil.camera.updateProjectionMatrix();const[e,r]=yield Promise.all([this.lead.draw("Light",{type:"PointLight",intensity:4,color:16777215,distance:0,decay:0}),this.lead.draw("Earth",{radius:100,rotationY:Math.PI/180*90})]);yield this.pencil.controls.fitToBox(r.object3d,!1),e.position.copy(this.pencil.cameraPositon)})}},chinaPlate=v=>{v.extendsOptions=qi(gi({},v.extendsOptions),{otherMapDepth:()=>v.options.otherMapDepth,copyChinaPlane:v.options.copyChinaPlane,mergeSide:()=>v.options.mergeSide}),v.loaderAdd=function(){const{loader:e}=this;e.add(["/image/earth/basic.webp","/image/earth/chinaBorder.png","/image/earth/flyline.png","/image/earth/chinaNormal.webp"])},v.initVis=function(){return U0(this,null,function*(){yield this.initLight();const[,e,r]=yield Promise.all([this.lead.draw("Earth",{radius:this.options.radius,rotationY:Math.PI/180*-90}),this.lead.draw("Countries",{key:"countries",conic:!0,geojson:{type:"FeatureCollection",features:worldJson.features.filter(o=>{var V;return((V=o.properties)==null?void 0:V.name)!=="中国"})},depth:this.options.otherMapDepth,start:this.options.radius,lineOffset:.01,materialOptions:this.mList.getMultiple("world"),hasSide:!!this.options.otherMapDepth,hasTop:!!this.options.otherMapDepth,areaGroup:!1,bbox:[-180,-90,180,90]}),this.lead.draw("Countries",{key:"china",conic:!0,geojson:chinaJson,extrudeLineGeojson:chinaLiteJson,depth:this.options.mapDepth,start:this.options.radius,lineOffset:.01,materialOptions:this.mList.getMultiple("plane"),bbox:chinaBbox,mergeSide:this.options.mergeSide})]);if(e.object3d.name="世界",r.object3d.name="中国",r.extrudelineArr&&v.initBaseObjectUserData(r.extrudelineArr[0]),this.map=r,this.options.copyChinaPlane){this.options.copyChinaPlane;const o=yield this.lead.draw("Countries",{key:"chinaCopy",conic:!0,geojson:chinaJson,depth:this.options.mapDepth,start:this.options.radius,materialOptions:{topMat:new MeshBasicMaterial({color:"#ffffff"})},bbox:chinaBbox,hasSide:!1,hasTop:!0,hasLine:!1,areaGroup:!1});o.object3d.name="复制中国顶面",this.lead.updateBaseObjectKey(o.children[0],{type:"chinaPlaneCopy"})}yield this.pencil.controls.rotateTo(1.833542196136704,.9809685394021701,!1),yield this.pencil.controls.dollyTo(99.11560932366835,!1)})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=new MeshStandardMaterial({side:DoubleSide,name:"顶面",color:new Color$1("#0d8a8c"),metalness:.75,roughness:.61,normalMap:e.getAsset("/image/earth/chinaNormal.webp")}),o=new MeshStandardMaterial({side:DoubleSide,name:"侧面",color:new Color$1("#999999"),map:e.getAsset("/image/earth/chinaBorder.png")}),V=new zt({name:"中国边界",lineWidth:.6,sizeAttenuation:!1,color:new Color$1("#59C8FF")}),le=new zt({name:"世界边界",lineWidth:.6,sizeAttenuation:!1,color:new Color$1("#80abaf")}),fe=new MeshBasicMaterial({name:"世界顶面"}),Le=new MeshBasicMaterial({name:"世界侧面"}),Ce=e.getAsset("/image/earth/basic.webp"),Re=new MeshStandardMaterial({name:"地球材质",map:Ce,color:new Color$1(2397309),metalness:.84,roughness:.51}),Pe=e.getAsset("/image/earth/flyline.png");Pe.wrapS=RepeatWrapping,Pe.wrapT=RepeatWrapping,Pe.repeat.set(.5,.5);const ze=new zt({name:"省份边界",map:Pe,lineWidth:.6,sizeAttenuation:!1,transparent:!0,color:new Color$1("#3a898b")});this.mList.addMultiple("plane",{topMat:r,sideMat:o,lineMat:ze,extrudeLineMat:V}),this.mList.addMultiple("world",{topMat:fe,sideMat:Le,lineMat:le}),this.mList.add("earthMaterial",Re)})}},countryPlate=v=>{v.initVis=function(){return U0(this,null,function*(){yield this.initLight();const[,e]=yield Promise.all([this.lead.draw("Earth",{radius:this.options.radius,rotationY:Math.PI/180*-90}),this.lead.draw("Countries",{key:"countries",conic:!0,geojson:worldJson,depth:this.options.mapDepth,start:this.options.radius,projection:{},materialOptions:this.mList.getMultiple("plane"),bbox:[-180,-90,180,90],lineOffset:.14}),this.lead.draw("SphereShadow",{radius:this.options.radius})]);this.map=e,yield this.pencil.controls.rotateTo(1.8041576242193995,1.2232045720480524,!1),yield this.pencil.controls.dollyTo(99.11560932366835,!1),this.playing&&(this.pencil.controls.minPolarAngle=this.pencil.controls.polarAngle,this.pencil.controls.maxPolarAngle=this.pencil.controls.polarAngle)})},v.initMaterial=function(){return U0(this,null,function*(){const e=new MeshStandardMaterial({side:DoubleSide,name:"侧面",color:new Color$1("#999999")}),r=new MeshStandardMaterial({name:"顶面",color:new Color$1("#ffffff"),emissive:new Color$1("#523333")}),o=new zt({name:"边框线",lineWidth:1,sizeAttenuation:!1,color:new Color$1("#006aa3")}),V=new MeshBasicMaterial({name:"地球材质",color:new Color$1("#012b47")});this.mList.addMultiple("plane",{topMat:r,sideMat:e,lineMat:o}),this.mList.add("earthMaterial",V)})},v.getLocationPosition=function(e,r=0){const[o,V]=e,le=this.options.mapDepth+this.options.radius+r;return p$2(o,V,le)}},styles=Object.freeze(Object.defineProperty({__proto__:null,base:base$2,chinaPlate,countryPlate},Symbol.toStringTag,{value:"Module"})),An=class An extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs$1);C0(this,"leftTruck",!1);C0(this,"extendsOptions",{mapDepth:()=>this.options.mapDepth});C0(this,"map")}get mapArea(){return this.map.areaArr}setOptions(r){super.setOptions(gi({mapDepth:1.4,otherMapDepth:0,radius:30,style:"chinaPlate",copyChinaPlane:!1,mergeSide:!1},r)),this.initSettingsObj={autoRotateSpeed:0},styles[this.options.style](this)}handleSetting(r,o){return U0(this,null,function*(){return yield Zn(An.prototype,this,"handleSetting").call(this,r,o),r==="autoRotateSpeed"?this.pencil.autoRotate(o):r==="autoRotate"&&(o?this.settings.autoRotateSpeed=-20:this.settings.autoRotateSpeed=0),o})}show(){super.show(),this.animationIn()}animationIn(){const r=this.pencil.controls;r.addEventListener("controlstart",()=>{this.pencil.autoRotate(0)}),r.addEventListener("controlend",()=>{this.pencil.autoRotate(this.settings.autoRotateSpeed)})}initLight(){return U0(this,null,function*(){const[r,o]=yield Promise.all([this.lead.draw("Light",{type:"RectAreaLight",uId:"1",color:"#E0FFFD",width:200,height:200}),this.lead.draw("Light",{type:"RectAreaLight",uId:"2",intensity:3,width:200,height:170})]);r.position.set(0,50,-100),o.position.set(0,0,150),r.object3d.lookAt(0,0,0),o.object3d.lookAt(0,0,0)})}getLocationPosition(r,o=0){const[V,le]=r,fe=this.getRadius()+o;return p$2(V,le,fe)}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#outLine");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return U0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe)return this.lead.draw("Countries",{geojson:{type:"FeatureCollection",features:[fe]},depth:this.options.mapDepth+.3,start:this.options.radius,materialOptions:{topMat:new MeshBasicMaterial(V.area),lineMat:new zt(V.line)}})})}getRadius(){const r=this.baseObjectByUuid("earth");return r?r.object3d.geometry.parameters.radius:0}checkBehindEarth(r,o){const V=new Vector3(0,0,0),le=new Vector3(0,0,0),fe=this.getRadius(),Le=()=>{const Ce=r();if(!Ce.length)return;this.pencil.controls.getPosition(le,!1);const Re=V.clone().sub(le),Pe=Math.sqrt(Ln(Re.length(),2)-Ln(fe,2)),ze=Ce.map(Fe=>Fe.position.clone().sub(le).length()>Pe);o(Ce,ze)};Le(),this.pencil.controls.addEventListener("update",()=>{Le()})}setObjectOnSphere(r,o,V=0,le=[0,1,0]){if(r.objectType==="Plane"){const fe=this.getLocationPosition(o,V);r.position.set(...fe);const Le=r.object3d.material;Le&&(Le.side=DoubleSide),r.object3d.lookAt(0,0,0)}else{const fe=r.rotation.clone(),Le=this.getLocationPosition(o,V);r.position.set(...Le);const Ce=new Vector3(...Le).normalize(),Re=new Vector3(...le);Re.applyEuler(fe);const Pe=new Quaternion().setFromUnitVectors(Re,Ce);r.object3d.applyQuaternion(Pe)}}};C0(An,"VisName","earth");let index=An;const timeOut=v=>U0(exports,null,function*(){const e=esusLite.makePromiseCreator();return setTimeout(()=>{e.resolve()},v),e.promise}),getTween=v=>({onUpdate:e=V=>{},onComplete:r=()=>{},backwards:o=!0}={})=>{o&&e(0);const V=new Tween({v:0});return{start:({duration:le=1e3,repeat:fe=0,repeatResolve:Le=1,repeatDelay:Ce=0}={})=>{const Re=esusLite.makePromiseCreator();let Pe=0;return V.to({v:1},le).onUpdate(({v:ze})=>{e(ze)}).onComplete(()=>{e(1),r(),Re.resolve()}).onRepeat(()=>{Pe++,Pe>=Le&&Re.resolve()}).repeat(fe).repeatDelay(Ce).easing(v).start(),Re.promise},stop:()=>{V.stop()}}},sinusoidalInOut=getTween(Easing.Sinusoidal.InOut),baseObjectFadeIn=v=>{const e=new Set,r=new Set;v.object3d.traverse(V=>{const le=V;le.material&&(Array.isArray(le.material)?le.material:[le.material]).forEach(Le=>{e.add(Le)})});const o=new Map;return e.forEach(V=>{o.set(V,V.opacity),V.transparent||(r.add(V),V.transparent=!0,V.needsUpdate=!0)}),sinusoidalInOut({onUpdate:V=>{e.forEach(le=>{le.opacity=V*o.get(le)})},onComplete:()=>{r.forEach(V=>{V.transparent=!1,V.needsUpdate=!0}),e.clear(),r.clear(),o.clear()}})},baseObjectFadeOut=v=>{const e=new Set,r=new Set;v.object3d.traverse(V=>{const le=V;le.material&&(Array.isArray(le.material)?le.material:[le.material]).forEach(Le=>{e.add(Le)})});const o=new Map;return e.forEach(V=>{o.set(V,V.opacity),V.transparent||(r.add(V),V.transparent=!0,V.needsUpdate=!0)}),sinusoidalInOut({onUpdate:V=>{e.forEach(le=>{le.opacity=(1-V)*o.get(le)})},onComplete:()=>{e.clear(),r.clear(),o.clear()}})},baseObjectBounceIn=(v,e="z")=>{const r=e.trim().split(""),o=r.reduce((V,le)=>(V[le]=v.scale[le],V),{});return sinusoidalInOut({onUpdate:V=>{r.forEach(le=>{v.scale[le]=o[le]*V})}})},baseObjectBounce=(v,e="z",r)=>{const o=e.trim().split(""),V=o.reduce((le,fe)=>(le[fe]=v.scale[fe],le),{});return sinusoidalInOut({onUpdate:le=>{o.forEach(fe=>{v.scale[fe]=V[fe]+(r-V[fe])*le})}})},animation=Object.freeze(Object.defineProperty({__proto__:null,baseObjectBounce,baseObjectBounceIn,baseObjectFadeIn,baseObjectFadeOut,sinusoidalInOut,timeOut},Symbol.toStringTag,{value:"Module"}));class ContinentsBg extends Z$1{constructor(r){super();C0(this,"options");C0(this,"mapArr",[]);this.options=r}create(){return U0(this,null,function*(){const{depth:r}=this.options,o=this.pencil.mList,V=this.pencil.lead,le=o.getMultiple("continents");this.createGroup(),this.object3d.name="大洲",yield Promise.all(Object.values(continentsLiteJson).map(fe=>U0(this,null,function*(){const Le=fe.features[0],Ce=Le.properties.adcode;if(Ce===10)return;const Re=turf.centroid(Le).geometry.coordinates;let Pe=0,ze=0,Fe=this.options.scale;const ke=30,Gt=25;Ce===5?(Pe=-ke,ze=Gt,Fe=Fe*.2):Ce===21?(Pe=0,ze=Gt,Fe=Fe*.18):Ce===9?(Pe=ke,ze=Gt,Fe=Fe*.3):Ce===142?(Pe=-ke,ze=-Gt,Fe=Fe*.15):Ce===150?(Pe=0,ze=-Gt,Fe=Fe*.3):Ce===2&&(Pe=ke,ze=-Gt,Fe=Fe*.2);const Vt=yield V.draw("PlaneMap",{key:`${this.key}-${Ce}`,geojson:fe,projection:{center:Re,scale:Fe,rotate:[0,0],projectionType:"equirectangular"},areaGroup:!1,depth:r,materialOptions:gi({},le)},this);Vt.userData.projection=f({center:Re,scale:Fe,rotate:[0,0],projectionType:"equirectangular"}),Vt.object3d.name=Le.properties.name,Vt.userData.name=Le.properties.name,Vt.position.set(Pe,ze,0),this.mapArr.push(Vt)})))})}getPointInContinentInfo(r){var o;return(o=Object.values(continentsLiteJson).map(V=>V.features).find(V=>V[0].geometry.coordinates.some(le=>le.length?turf.booleanPointInPolygon(turf.point(r),turf.polygon(le)):!1)))==null?void 0:o[0]}getPointInContinent(r){return!!this.getPointInContinentInfo(r)}getLocationPosition(r,o){var le;const V=o||((le=this.getPointInContinentInfo(r))==null?void 0:le.properties.name);if(V){const fe=this.mapArr.find(Le=>Le.userData.name===V);if(fe){const{projection:Le}=fe.userData,[Ce,Re]=r,[Pe,ze]=Le([Ce,Re]),Fe=new Vector3(Pe,-ze,this.options.depth);return Fe.applyMatrix4(fe.object3d.matrixWorld),[Fe.x,Fe.y,Fe.z]}}}render(){this.lead.updateBaseObjectKey(this,{type:"continents-group"}),this.mapArr.forEach(r=>{this.lead.updateBaseObjectKey(r,{type:"continents-"+r.userData.name})})}dispose(){this.mapArr.forEach(r=>{r.dispose()}),this.mapArr.length=0}}class PlaneMap extends Z$1{constructor(r){super();C0(this,"options");C0(this,"extrudePolygon");this.options=gi({depth:2},r)}geojson2Meta(r){return r.features.filter(o=>o.geometry).map(o=>{const{type:V,coordinates:le}=o.geometry;let fe=[];return V==="Polygon"?fe=le:V==="MultiPolygon"&&(fe=le.flat()),{coords:fe,properties:o.properties}})}create(){return U0(this,null,function*(){const{geojson:r,bbox:o}=this.options,V=this.geojson2Meta(r),le=this.pencil.getPlugin("worker"),fe=this.pencil.lead,Ce=yield this.pencil.loader.load("/1.png"),Re=V.flatMap(({coords:wt})=>wt),Pe=yield le.geoGeometry("extrudePolygon",{coordinatesArr:Re,metaArray:Re.map(()=>[this.options.depth]),mesaage:{projection:gi({},this.options.projection),topSegments:100,bbox:o,hasBottom:!1,hasSide:!1}}),ze=Pe.attributes.position.count;Pe.setAttribute("color",new BufferAttribute(new Float32Array(ze*3),3));const Fe=this.options.depth;this.setNoise(Pe,Ce.image,Fe);const ke=new Color$1,Gt=Pe.attributes.color,Vt=Pe.attributes.position,Xt=new Color$1("red"),xt=new Color$1("green");for(let wt=0;wt<ze;wt++){const Wt=Vt.getZ(wt)/Fe;ke.lerpColors(Xt,xt,Wt),Gt.setXYZ(wt,ke.r,ke.g,ke.b)}const Zt=yield fe.draw("ExtrudePolygon",{geometry:Pe,material:new MeshStandardMaterial({flatShading:!0,vertexColors:!0})},null);Zt.position.z+=.001,this.extrudePolygon=Zt,this.object3d=Zt.object3d})}setNoise(r,o,V=1){const le=document.createElement("canvas"),fe=[];le.width=o.width,le.height=o.height;const Le=le.getContext("2d");Le.drawImage(o,0,0);const Re=Le.getImageData(0,0,o.width,o.height).data;for(let ke=0;ke<o.height;ke++){fe[ke]=[];for(let Gt=0;Gt<o.width;Gt++){const Vt=(ke*o.width+Gt)*4,Xt=Re[Vt];fe[ke][Gt]=Xt/255}}const Pe=r.attributes.position,ze=r.attributes.uv,Fe=new Vector2;for(let ke=0;ke<Pe.count;ke++){Fe.fromBufferAttribute(ze,ke);let Gt=Math.round(Fe.x*o.width)-1,Vt=Math.round(Fe.y*o.height)-1;Gt<0&&(Gt=0),Vt<0&&(Vt=0);const Xt=fe[Vt][Gt];Pe.setZ(ke,Xt*V)}}render(){this.mList.rmBaseObjectMap(this.extrudePolygon)}dispose(){this.extrudePolygon.dispose(),super.dispose()}}const objs=qi(gi({},objs$3),{PlaneMap:PlaneMap$1,CityPlane,ContinentsBg,Mountain:PlaneMap}),png2webp=(v,e=2048)=>new Promise((r,o)=>{const V=document.createElement("img");V.crossOrigin="anonymous";const le=()=>{V.removeEventListener("load",le,!1),V.removeEventListener("error",fe,!1);const Le=document.createElement("canvas");if(Le.width=V.naturalWidth,Le.height=V.naturalHeight,Le.width>e||Le.height>e){const Pe=Math.min(e/Le.width,e/Le.height);Le.width*=Pe,Le.height*=Pe}Le.getContext("2d").drawImage(V,0,0,Le.width,Le.height);const Ce=Le.toDataURL("image/webp"),Re=new Image;Re.onload=()=>{r(Re)},Re.src=Ce},fe=()=>{V.removeEventListener("load",le,!1),V.removeEventListener("error",fe,!1),o(new Error("Image load error"))};V.addEventListener("load",le,!1),V.addEventListener("error",fe,!1),V.src=v}),ec=(v,e)=>{const r=stringToUtf8ByteArray(v),o=stringToUtf8ByteArray(e).map(function(V,le){return V^r[Math.floor(le%r.length)]}).join(",");return btoa(o)};function stringToUtf8ByteArray(v){const e=[];let r=0;for(let o=0;o<v.length;o++){let V=v.charCodeAt(o);V<128?e[r++]=V:V<2048?(e[r++]=V>>6|192,e[r++]=V&63|128):(V&64512)==55296&&o+1<v.length&&(v.charCodeAt(o+1)&64512)==56320?(V=65536+((V&1023)<<10)+(v.charCodeAt(++o)&1023),e[r++]=V>>18|240,e[r++]=V>>12&63|128,e[r++]=V>>6&63|128,e[r++]=V&63|128):(e[r++]=V>>12|224,e[r++]=V>>6&63|128,e[r++]=V&63|128)}return e}const TEMPLATE_CONFIGS={"7s93q0lma4n9887":{id:"7s93q0lma4n9887",mapIndex:4,mapId:"398-0",emissiveMapIndex:5,emmisiveMapId:"419-0"},l7ojr7nqc06u24f:{id:"l7ojr7nqc06u24f",mapIndex:7,mapId:"245-0",emissiveMapIndex:6,emmisiveMapId:"177-0",cityOnly:!0},"2xli7429f48857f":{id:"2xli7429f48857f",emissiveMapIndex:14,emmisiveMapId:"1140-0"}},getBaseUrl=()=>{const v="/";return v==="/"?"":v},getAdcodeInfo=v=>{const e=findAdcodeInfo(v);if(!e)throw new Error(`Adcode ${v} not found`);return e},fetchGeojsonData=(v,e,r,o)=>U0(exports,null,function*(){const V=o||e,{res:le}=yield jsonFetch(`${v}/geojson/${V}/${r}.json`);return le}),processTemplateImages=(v,e,r,o,V)=>U0(exports,null,function*(){const le=TEMPLATE_CONFIGS[v];if(!(!le||le.cityOnly&&!V))try{if(le.mapIndex!==void 0||le.mapId!==void 0){const fe=yield png2webp(`${r}/template/${v}/${e}.jpg`);Array.isArray(o)?(o[le.mapIndex]=fe.src,console.log(`已替换模板 ${v} 的 map 资源, ${le.mapIndex}`)):(o[le.mapId]=fe.src,console.log(`已替换模板 ${v} 的 map 资源, ${le.mapId}`))}if(le.emissiveMapIndex!==void 0||le.emmisiveMapId!==void 0){const fe=yield png2webp(`${r}/template/${v}/${e}-自发光.jpg`);Array.isArray(o)?(o[le.emissiveMapIndex]=fe.src,console.log(`已替换模板 ${v} 的 emissiveMap 资源, ${le.emissiveMapIndex}`)):(o[le.emmisiveMapId]=fe.src,console.log(`已替换模板 ${v} 的 emissiveMap 资源, ${le.emmisiveMapId}`))}}catch(fe){console.warn(`模板 ${v} 图像资源加载失败:`,fe)}}),getMapConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){if((r==null?void 0:r.style)==="map2CityOnMap")return getMapWithCityConfig(v,e,r,o);if(v===0)return{mapDepth:5,adcode:0,extrudeLine:!1,worldPacificCentre:!0,center:[0,0]};{const fe=getAdcodeInfo(v);return extendMapConfig({center:[fe.lng,fe.lat],adcode:fe.adcode},e,r,o)}}),getMapWithCityConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){const fe=getAdcodeInfo(v),Le=fe?findAdcodeInfo(fe.parent):null,Ce=(fe==null?void 0:fe.level)==="district"&&(Le==null?void 0:Le.level)==="city";return extendMapConfig({center:[fe.lng,fe.lat],adcode:fe.adcode,style:"map2CityOnMap",mapDepth:.004,mergeSide:!0,nearbyCities:Ce},e,r,o)}),extendMapConfig=(V,...le)=>U0(exports,[V,...le],function*(v,e=getBaseUrl(),r,o){var Vt,Xt;if(v.adcode===0||v.adcode===1e5)return gi({},v);const fe=v.adcode,Le=getAdcodeInfo(fe),Ce=Le.level==="province",Re=Le.level==="city"||Le.level==="district"&&getAdcodeInfo(Le.parent).level==="province",Pe=(Vt=v.fixGeojson)==null?void 0:Vt[fe],ze=(Xt=v.fixGeojson)==null?void 0:Xt[fe+"-lite"],Fe=yield fetchGeojsonData(e,"json",fe,Pe),ke=yield fetchGeojsonData(e,"json-lite",fe,ze),Gt=qi(gi({},v),{geojsonMap:{[fe]:Fe},extrudeLineGeojsonMap:{[fe]:ke},cityBboxMap:{},depthReference:void 0,showBuilding:!Ce,__template:r==null?void 0:r.__template});if(r!=null&&r.__template&&o&&(yield processTemplateImages(r.__template,fe,e,o,Re)),v.parentBg){const xt=Le.parent;if(xt!==1e5){const Zt=yield fetchGeojsonData(e,"json",xt),wt=yield fetchGeojsonData(e,"json-lite",xt);Gt.geojsonMap[xt]=Zt,Gt.extrudeLineGeojsonMap[xt]=wt}}return r&&(Gt.depthReference=r.depthReference||getAdcodeInfo(r.adcode).b),Gt}),getCityConfig=v=>{const e=getAdcodeInfo(v),{name:r}=e;return{center:[e.lng,e.lat],adcode:e.adcode,jsonName:ec(r,`${v}`)}},removeCameraHistory=v=>v.filter(e=>!(e.objectUuid==="camera"&&["SetPosition","SetTarget"].includes(e.type)));class City extends City$1{constructor(){super(...arguments);C0(this,"multiplyScalar",1/1e3)}fixNearFar(r=.01,o){this.pencil.camera.near=r*this.multiplyScalar,o&&(this.pencil.camera.far=o*this.multiplyScalar),this.pencil.camera.updateProjectionMatrix()}}const getLabelElement=v=>{const e=document.createElement("div");return v.replace(/省|市|特别行政区|自治区|维吾尔自治区|回族自治区|壮族自治区/,""),e.classList.add("vis-map-label","absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"),e.innerHTML=`
|
|
5363
5363
|
<div class="text-white text-opacity-80 text-center leading-[1] text-sm whitespace-nowrap">
|
|
5364
5364
|
${v}
|
|
5365
5365
|
</div>
|
|
5366
|
-
`,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const le=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),fe=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),Le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),Ce=new zt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:le,sideMat:fe,lineMat:Le,extrudeLineMat:v.options.extrudeLine?Ce:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return U0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return U0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return U0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return U0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),le=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),fe=new zt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),Le=new zt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:le,lineMat:Le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return U0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return U0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),le=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),fe=new zt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:le,lineMat:fe}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),le=new zt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new zt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return U0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new zt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),le=new zt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:le}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Cn=class Cn extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs);C0(this,"mapHistory",[]);C0(this,"activePlaneMap",null);C0(this,"isAnimating",!1);C0(this,"parentBg",[]);C0(this,"continentsBg");C0(this,"group");C0(this,"projection");C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4/1e3);C0(this,"meters");C0(this,"cityVis",[]);C0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});C0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});C0(this,"caId");C0(this,"shadowMapLight");C0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=gi(gi({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=gi({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(le=>{le!=="100000"&&/^\d{6}$/.test(le)&&o[+le].features.forEach(Le=>{const Ce=Le.properties.adcode;V[Ce]={type:"FeatureCollection",features:[Le]}})}),V=gi(gi({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(qi(gi({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return U0(this,null,function*(){return yield Zn(Cn.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return U0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return U0(this,null,function*(){var Le;if((Le=this.options.fixCity)!=null&&Le[r]&&(r=this.options.fixCity[r]),r===71e4)return this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.pencil.camera.userData.up="0,0,1",null;const V=new City({container:this.container,editor:!1}),le=getCityConfig(r);V.setOptions({container:this.container,center:le.center,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${r}`:void 0,jsonName:le.jsonName,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield V.init();const fe=this.projection(le.center);return fe&&V.group.position.set(fe[0],-fe[1],0),this.cityVis.push(V),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),V})}initCityOnMap(r){return U0(this,null,function*(){const o=this.getAdcodeShowLevel(r);if(o==="province"){const V=yield this.initCityVis(r);yield V==null?void 0:V.drawCityPlane(r,this.lead.group)}else if(o==="city"){const V=findAdcodeInfo(r).c;let le=null;if(V.length>0)for(const fe of V)le=yield this.initCityVis(fe);else le=yield this.initCityVis(r);yield le==null?void 0:le.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix()}else if(o==="district"){const V=yield this.initCityVis(r);if(yield V==null?void 0:V.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities){const le=findAdcodeInfo(r).parent,fe=findAdcodeInfo(le).c;for(const Le of fe)(this.options.nearbyCities==="full"||Le!==r)&&(yield this.initCityVis(Le,!0))}}this.cityVis.forEach(V=>{if(!V.options.grey){const le=this.mapObj.depth+1e-5;V.group.position.z=this.mapObj.z+le}})})}initVisBg(){return U0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const le={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},fe=this.options.adcode!==1e5;if(fe){const ke=this.mList.getMultiple("parentPlane"),Gt=findAdcodeInfo(this.options.adcode).parent,Vt=findAdcodeInfo(Gt),Xt=Vt.b,{res:xt}=yield this.getGeojson(Gt),Zt=yield this.lead.draw("PlaneMap",gi({key:"bg-100000",geojson:xt,bbox:Xt,materialOptions:gi({},ke)},le),this.group);Zt.object3d.name=Vt.name,Zt.lineArr.forEach(wt=>{wt.object3d.name="线",this.lead.updateBaseObjectKey(wt,{type:"100000line"}),this.initBaseObjectUserData(wt)}),Zt.areaArr.forEach(wt=>{wt.object3d.name="板块",this.lead.updateBaseObjectKey(wt,{type:"100000area"})}),Zt.position.z=-this.options.parentBgDepth,this.parentBg.push(Zt)}const Le=this.mList.getMultiple("worldPlane"),Ce=this.options.geojsonMap[0],Re=findAdcodeInfo(0).b,Pe=yield this.lead.draw("PlaneMap",qi(gi({key:"bg-0",geojson:qi(gi({},Ce),{features:[...Ce.features.filter(ke=>fe?ke.properties.iso_a3!=="CHN":!0)]}),bbox:Re,materialOptions:gi({},Le)},le),{projection:qi(gi({},le.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Pe.object3d.name="世界",Pe.lineArr.forEach(ke=>{ke.object3d.name="线",this.lead.updateBaseObjectKey(ke,{type:"worldline"}),this.initBaseObjectUserData(ke)}),Pe.areaArr.forEach(ke=>{ke.object3d.name="板块",this.lead.updateBaseObjectKey(ke,{type:"worldarea"})}),Pe.position.z=-this.options.parentBgDepth,this.parentBg.push(Pe);const{center:ze,size:Fe}=Pe.getSize();r=Fe.x,o=Fe.y,V.set(ze.x,ze.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const le=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...le)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const le=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);le.object3d.name="地图底面",this.lead.updateBaseObjectKey(le,{type:"map-plane"}),this.options.bottomPlaneWater&&le.addWater(),le.position.copy(V),le.position.z-=.1}})}initVis(r){return U0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),le=this.pencil.cameraPositon,fe=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(le),V==null||V.spotLight.target.position.copy(fe)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return U0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),le=new zt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new zt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var le,fe;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(fe=(le=this.projection).invert)==null?void 0:fe.call(le,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#lineMat");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return U0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe){let Le=V.material,Ce=V.sideMaterial;if(y(V.sideMaterial)&&(Ce=new MeshBasicMaterial(gi({},V.sideMaterial))),y(V.material)&&(Le=new MeshBasicMaterial(gi({},V.material))),V.area){const ze=this.objectByUuid(V.area);ze&&([Le,Ce]=ze.material)}let Re=V.lineMaterial;if(y(V.lineMaterial)&&(Re=new zt(gi({},V.lineMaterial))),V.line){const ze=this.objectByUuid(V.line);ze&&(Re=ze.material)}const Pe=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[fe]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:Le,lineMat:Re,sideMat:Ce},areaGroup:!1},this.group);if(Pe.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Pe.lineArr.forEach(ze=>{ze.enableBloom()}),V.area){Pe.position.z=0;const ze=this.baseObjectByUuid(V.area);Pe.areaArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.scale.z=ze.scale.z,Fe.position.z=ze.position.z})}if(V.line){const ze=this.baseObjectByUuid(V.line);Pe.lineArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.position.z=ze.position.z})}return Pe}})}showAction(){return U0(this,null,function*(){Zn(Cn.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:le=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-le)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return U0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{Zn(Cn.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return U0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let le;return o==="country"?le=V[0]:o==="province"?le=V[1]:le=V[2],le}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const le=this.options.depthReference,fe=findAdcodeInfo(r).b;V=V*this.getReferenceScale(le,fe)}else if(this.mapHistory.length){const le=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,fe=this.getReferenceScale(le,o);V=V*fe}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),le=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,le)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var le;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(le=findAdcodeInfo(V))==null?void 0:le.parent;return o}showMap(le){return U0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const fe=o||this.getAdcodes(r);(yield this.beforeShowMap(fe))!==!1&&(this.emit("beforeDrillDown",[...fe]),yield this.setAdcode({adcodes:fe,duration:V}),this.emit("afterDrillDown",[...fe]))})}drawLabels(){return U0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(le=>U0(this,null,function*(){let{name:fe,adcode:Le,centroid:Ce}=le.userData;const{DistrictID:Re,DistName:Pe,iso_a2:ze,center:Fe}=le.userData;if(Le=Le||ze||Re,Ce=Ce||Fe,fe=fe||Pe,!Ce)return;const ke=this.getLocationPosition(Ce);if(this.lead.getObject("Node",{key:`mapLabel-${Le}`})||!ke)return;const[Gt,Vt,Xt]=ke;let xt=fe;r==="lite"&&xt&&(xt=fe.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const Zt=xt&&getLabelElement(xt),wt=xt!=null&&xt.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Gt,Vt+wt,Xt),children:Zt,key:`$p:-${this.options.adcode===0?fe:Le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(le=>le.userData.adcode===r);if(o){const{centroid:le,center:fe}=o.userData;return this.getLocationPosition(le||fe)}}getLocationPosition(r){const[o,V]=r,[le,fe]=this.projection([o,V]);return[le,-fe,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const le=this.getLocationPosition(o);r.position.set(le[0],le[1],le[2]+V)}setObjectOnMapAreaByProperty(r,o,V,le=0){var Le;const fe=(Le=this.mapArea)==null?void 0:Le.find(Ce=>Ce.userData[o]===V);if(fe){const{centroid:Ce,center:Re}=fe.userData,Pe=this.getLocationPosition(Ce||Re);r.position.set(Pe[0],Pe[1],Pe[2]+le)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,le,fe]=o,Le=new Vector3(V,le,fe);Le.project(this.pencil.camera);const{width:Ce,height:Re}=this.pencil.getSize(),Pe=(Le.x*.5+.5)*Ce,ze=(Le.y*-.5+.5)*Re;return{x:Pe,y:ze}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var Le,Ce;const V=o!=null?o:(Le=this.mapInfo)==null?void 0:Le.adcode;if(!V)return!1;const le=findAdcodeInfo(V);if(le!=null&&le.b){const[Re,Pe,ze,Fe]=le.b,[ke,Gt]=r;if(ke<Re||ke>ze||Gt<Pe||Gt>Fe)return!1}const fe=(Ce=this.options.extrudeLineGeojsonMap)==null?void 0:Ce[V];return fe?fe.features.some(Re=>{const Pe=Re.geometry.coordinates;return Re.geometry.type==="Polygon"?Pe.some(ze=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([ze]))):Re.geometry.type==="MultiPolygon"?Pe.some(ze=>ze.some(Fe=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Fe])))):!1}):!1}getGeojson(r,o=!1){return U0(this,null,function*(){var V,le,fe,Le;return o?this.options.extrudeLine?(fe=this.options.extrudeLineGeojsonMap)!=null&&fe[r]?{res:(Le=this.options.extrudeLineGeojsonMap)==null?void 0:Le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(le=this.options.geojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(Le){return U0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:le,extrudelineBloom:fe}){var Ce,Re,Pe,ze,Fe;if(typeof r!="undefined"&&!this.isAnimating){const ke=(Ce=this.map)==null?void 0:Ce.findGroup(r,!0),Gt=findAdcodeInfo(+r);if(this.isAnimating||!Gt)return;this.isAnimating=!0;const{name:Vt}=Gt;let{res:Xt}=yield this.getGeojson(r),{res:xt}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(Xt=xt,xt=void 0),[Xt,xt].filter(Boolean).forEach(wt=>{if(!wt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Wt=findAdcodeInfo(r);wt.features[0].properties=qi(gi(gi({},wt.features[0].properties),Wt),{center:[Wt.lng,Wt.lat]})}}),Xt){const wt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Re=this.options.fixGeojson)!=null&&Re[r]){const e0=(Pe=this.options.fixGeojson)==null?void 0:Pe[r];if(e0.startsWith("-")){const o0=+e0.slice(1);Xt.features=Xt.features.filter(b0=>b0.properties.adcode!==o0)}}let Wt=findAdcodeInfo(r).b;const It=[...Wt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:Wt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(e0=>{e0.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),le&&this.saveCamvasState("userControls",-1));const Nt=this.mapHistory.length,Ft=Nt-1,Ht=this.getDepth(r,It),Kt=(ze=this.mapHistory[Ft])==null?void 0:ze.depth,Yt=Nt===0||this.options.showOneLevel?0:this.mapHistory[Ft].z+Kt,jt=Nt===0||this.options.showOneLevel?0:Yt-Ht,n0=turf.center(Xt).geometry.coordinates,[a0,l0]=this.projection(n0),s0=yield this.drawPlaneMap({geojson:Xt,extrudeLineGeojson:xt,depth:Ht,bbox:Wt,adcode:r,extrudelineBloom:fe});ke==null||ke.hide(),s0.position.setZ(jt);const $t=s0.position.z,qt=()=>U0(this,null,function*(){yield sinusoidalInOut({onUpdate:e0=>{Yt!==$t&&(s0.position.z=$t+(Yt-$t)*e0)}}).start({duration:o})});if(wt)if(this.fixNear(r),s0.position.z=Yt,V){const e0=(Fe=this.mapHistory.at(-1))==null?void 0:Fe.controls;yield this.fitTo(s0,{z:Yt+Ht,adcode:r,enableTransition:o!==0,polarAngle:e0==null?void 0:e0.polarAngle,azimuthAngle:e0==null?void 0:e0.azimuthAngle,handleStart:()=>U0(this,null,function*(){s0.position.z=$t,yield qt()})})}else this.options.showOneLevel&&s0.hide();else yield qt();this.mapHistory.push({map:s0,mapInfo:Gt,z:Yt,depth:Ht,cX:a0,cY:-l0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Vt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Re){return U0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:le,handleStart:fe,adcode:Le,enableTransition:Ce=!0}={}){if(!(r!=null&&r.object3d))return;if(Le&&(yield this.useSaveCamera(`map-${Le}`,Ce))){fe&&(yield fe());return}const Pe=this.options.mapPadding,{height:ze,width:Fe}=this.pencil.getSize();ze<Pe[0]+Pe[2]+50&&(Pe[0]=0,Pe[2]=0),Fe<Pe[1]+Pe[3]+50&&(Pe[1]=0,Pe[3]=0);const ke=o!=null?o:this.options.polarAngle,Gt=V!=null?V:this.options.azimuthAngle,Vt=this.pencil.cameraPositon.toArray(),Xt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Pe[0],Pe[1],Pe[2],Pe[3],!1);let xt;le&&(xt=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(xt[0],xt[1],le,!1)),yield this.pencil.controls.rotateTo(Gt,ke,!1),xt=this.pencil.cameraTarget.toArray();const Zt=this.pencil.cameraPositon.toArray();yield this.lookAt(...Vt,...Xt),yield Promise.all([this.lookAt(...Zt,...xt,Ce),fe==null?void 0:fe()].filter(Boolean))})}drawPlaneMap(Ce){return U0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:le,extrudelineBloom:fe,adcode:Le}){var Vt;const Re=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Pe=this.mapHistory.length,ze=null;for(;ze===null;)ze=Re[Pe],Pe--;const Fe=this.mList.getMultiple("bgPlane"),ke=gi(gi({},ze),Fe?{bgTopMat:Fe.topMat,bgSideMat:Fe.sideMat,bgLineMat:Fe.lineMat,bgExtrudeLineMat:Fe.extrudeLineMat}:{}),Gt=yield this.lead.draw("PlaneMap",{key:`${Le}`,geojson:r,extrudeLineGeojson:o,depth:le,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:ke,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Gt.object3d.name=((Vt=findAdcodeInfo(Le))==null?void 0:Vt.name)||`${Le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(ze.lineMat.colorWrite=!1,Gt.lineArr.forEach(Xt=>{Xt.userData.selectHide=!0})),Gt.extrudelineArr&&Gt.extrudelineArr.forEach(Xt=>{Xt.object3d.name="板块边线",this.lead.updateBaseObjectKey(Xt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(Xt),fe&&(Xt.object3d.userData.bloom=!0)}),Gt.lineArr&&Gt.lineArr.forEach(Xt=>{this.initBaseObjectUserData(Xt)}),Gt})}handleBack(){return U0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const le=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const fe=le.map.position.z,Le=this.mapObj?this.mapObj.z+(this.mapObj.depth-le.depth):0;yield sinusoidalInOut({onUpdate:Ce=>{le.map.position.z=fe+(Le-fe)*Ce}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(le.map),this.eraseLabels(),this.mapObj){const{map:fe}=this.mapObj,Le=fe==null?void 0:fe.findGroup(le.mapInfo.adcode,!0);Le&&Le.show(),fe&&o&&(this.options.showOneLevel?fe.show():fe.active(),this.options.drillDownHideParent&&this.parentBg.forEach(Ce=>{Ce.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return U0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(Ce=>Ce),le=o.filter(Ce=>Ce),fe=[];let Le=0;for(let Ce=0;Ce<Math.min(V.length,le.length)&&V[Ce]===le[Ce];Ce++)Le++;for(let Ce=Le;Ce<V.length;Ce++)fe.push(-1);for(let Ce=Le;Ce<le.length;Ce++)fe.push(le[Ce]);return fe}setAdcode(V){return U0(this,arguments,function*({adcodes:r,duration:o}){var fe,Le,Ce;const{adcodes:le}=this;if(!(JSON.stringify(r)===JSON.stringify(le)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(ke){console.error(ke)}else{const{continent:ke,country:Gt,province:Vt,city:Xt,district:xt}=r.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),{continent:Zt,country:wt,province:Wt,city:It,district:Nt}=le.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),Ft=ke||Zt,Ht=(Ce=(Le=(fe=this.map)==null?void 0:fe.extrudelineArr)==null?void 0:Le[0])==null?void 0:Ce.object3d.userData.bloom,Kt=this.compareLocations([Zt,wt,Wt,It,Nt],[ke,Gt,Vt,Xt,xt]);try{for(var Re=Dn(Kt.entries()),Pe,ze,Fe;Pe=!(ze=yield Re.next()).done;Pe=!1){const[Yt,jt]=ze.value;const n0=Yt===Kt.length-1?o:0,a0=Yt===Kt.length-1;jt===-1?yield this.handleBack({duration:n0,handleLookBack:a0,keepOne:!Ft}):yield this.handleDrillDown({adcode:jt,duration:n0,handleLook:a0,saveBackCamvasState:Kt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:Ht})}}catch(ze){Fe=[ze]}finally{try{Pe&&(ze=Re.return)&&(yield ze.call(Re))}finally{if(Fe)throw Fe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.editor)==null||r.events.removeAllListeners(),this.cityVis.forEach(le=>{le.dispose()}),this.cityVis.length=0,(o=this.map)==null||o.dispose(),this.parentBg.forEach(le=>{le.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};C0(Cn,"VisName","map"),C0(Cn,"getAdcodeShowLevel",getAdcodeShowLevel),C0(Cn,"findAdcodeInfo",findAdcodeInfo),C0(Cn,"findNameInfo",findNameInfo);let Map$1=Cn;class MapManager{constructor(e){C0(this,"container");C0(this,"controlsContainer");C0(this,"assetsPrefix");C0(this,"fixConfig");C0(this,"MAX_ZOOM_FACTOR",.3);C0(this,"MIN_ZOOM_FACTOR",4);C0(this,"mapInstances",{});C0(this,"mapDistances",{});C0(this,"mapConfigs",{});C0(this,"currentMap",null);C0(this,"currentZoom",1);C0(this,"groups",{});C0(this,"eventHandlers",{});C0(this,"areaCloseTimer",null);C0(this,"unitCloseTimer",null);this.container=e.container,this.controlsContainer=e.controlsContainer||e.container,this.assetsPrefix=e.assetsPrefix,this.fixConfig=e.fixConfig}setEventHandlers(e){this.eventHandlers=gi(gi({},this.eventHandlers),e)}getCurrentMap(){return this.currentMap}getCurrentZoom(){return this.currentZoom}initMap(e,r=!1){return U0(this,null,function*(){const o=e.at(-1)||e.at(-2);return o?this.createMapInstance(o,r):null})}createMapInstance(e,r=!1){return U0(this,null,function*(){var Pe,ze,Fe,ke,Gt,Vt;const o=Object.values(this.mapInstances)[0],V=(Pe=Map$1.getAdcodeShowLevel(e))!=null?Pe:"country",le=Map$1.findAdcodeInfo(e),fe=o==null?void 0:o.pencil,Le=this.mapInstances[V];if(Le)if(Le.pencil.controls.maxDistance=1/0,Le.pencil.controls.minDistance=0,Le.options.adcode===e&&!r&&!Le.options.fixedAdcode){Le.setSceneActive(),this.currentMap=Le,Le.pencil.controls.maxDistance=this.mapDistances[V]/this.MAX_ZOOM_FACTOR,Le.pencil.controls.minDistance=this.mapDistances[V]/this.MIN_ZOOM_FACTOR;const Xt=Le.pencil.controls.distance,xt=Math.round(this.mapDistances[V]/Xt*10)/10;return this.currentZoom!==xt&&(this.currentZoom=xt,(Fe=(ze=this.eventHandlers).onZoomChange)==null||Fe.call(ze,xt)),Le}else Le.options.pencil=fe,Le.dispose(),delete this.mapInstances[V];const Ce=new Map$1({container:this.container,controlsContainer:this.controlsContainer,assetsPrefix:this.assetsPrefix,pencil:fe});let Re=0;return yield Ce.fromJSON((ke=this.mapConfigs[V])!=null?ke:`/${V}.gz`,{preprocessor:Xt=>U0(this,null,function*(){if(Re=Xt.h.u[0].visOptions.adcode,V==="province"||V==="city"||V==="district"){const xt=yield getMapConfig(e,this.assetsPrefix,Xt.h.u[0].visOptions,Xt.h.i);Xt.h.u[0].visOptions=xt,le!=null&&le.c.length&&(Xt.h.u[0].visOptions.showBuilding=!1)}return Xt}),useCache:!0}),Ce.pencil.camera.near=.01,Ce.pencil.camera.updateProjectionMatrix(),Ce.pencil.controls.addEventListener("update",()=>{var Zt,wt;const Xt=Ce.pencil.controls.distance,xt=Math.round(this.mapDistances[V]/Xt*10)/10;this.currentZoom!==xt&&(this.currentZoom=xt,(wt=(Zt=this.eventHandlers).onZoomChange)==null||wt.call(Zt,xt))}),V!=="country"&&(Ce.options.mapPadding=[220,300,70,0],Ce.options.polarAngle=-Math.PI,yield Ce.fitTo(Ce.map,{enableTransition:!1}),yield Ce.fitTo(Ce.map,{enableTransition:!1})),this.applyFixConfig(Ce,V,Re,e),le!=null&&le.c.length&&!r&&this.bindAreaEvents(Ce),this.mapInstances[V]=Ce,Ce.setSceneActive(),this.currentMap=Ce,this.currentZoom=1,(Vt=(Gt=this.eventHandlers).onZoomChange)==null||Vt.call(Gt,1),this.mapDistances[V]=Ce.pencil.controls.distance,Ce.pencil.controls.maxDistance=Ce.pencil.controls.distance/this.MAX_ZOOM_FACTOR,Ce.pencil.controls.minDistance=Ce.pencil.controls.distance/this.MIN_ZOOM_FACTOR,Ce.options.fixedAdcode=r,Ce})}applyFixConfig(e,r,o,V){if(!this.fixConfig)return;const le=this.fixConfig[`level:${r}`];if(!le)return;const fe=e.findAdcodeInfo(o),Le=e.findAdcodeInfo(V),Ce=e.getReferenceScale(fe.b,Le.b);[...le.s].forEach(Re=>{const Pe=e.baseObjectByUuid(Re);if(Pe){Pe.scale.multiplyScalar(Ce);const{center:ze}=e.map.getSize();Pe.position.x=ze.x,Pe.position.y=ze.y}}),[...le.z].forEach(Re=>{const Pe=e.baseObjectByUuid(Re);Pe&&(Pe.position.z*=Ce)})}bindAreaEvents(e){e.mapArea.forEach(r=>{r.onPointerEnter(()=>{var fe,Le;this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null),r.useMListByName("顶面高亮",0);const o=r.userData.centroid||r.userData.center;if(!o)return;const V=e.getLocationPosition([...o]),le=e.getScreenPosition(...V);(Le=(fe=this.eventHandlers).onAreaHover)==null||Le.call(fe,r.userData.name,{x:le.x,y:le.y})}),r.onPointerLeave(()=>{r.useMListByName("顶面",0),this.areaCloseTimer=setTimeout(()=>{var o,V;(V=(o=this.eventHandlers).onAreaLeave)==null||V.call(o)},200)}),r.onClick(()=>{var o,V;r.useMListByName("顶面",0),(V=(o=this.eventHandlers).onAreaClick)==null||V.call(o,r.userData.name,r.userData.adcode)})})}setZoom(e){var le;if(!this.currentMap||this.currentZoom===e)return;const r=(le=Map$1.getAdcodeShowLevel(this.currentMap.options.adcode))!=null?le:"country",o=this.mapDistances[r];if(!o)return;const V=o/e;this.currentZoom=e,this.currentMap.pencil.controls.distance=V}createGroup(e){return U0(this,null,function*(){if(!this.currentMap)return null;e in this.groups&&this.clearGroup(e);const r=yield this.currentMap.addGroup();return this.groups[e]=r,r})}getGroup(e){return this.groups[e]}clearGroup(e){const r=this.groups[e];r&&(r.erase(),delete this.groups[e])}clearAllGroups(){Object.values(this.groups).forEach(e=>{e.erase()}),this.groups={}}triggerUnitHover(e,r){var o,V;this.unitCloseTimer&&(clearTimeout(this.unitCloseTimer),this.unitCloseTimer=null),(V=(o=this.eventHandlers).onUnitHover)==null||V.call(o,e,r)}triggerUnitLeave(){this.unitCloseTimer=setTimeout(()=>{var e,r;(r=(e=this.eventHandlers).onUnitLeave)==null||r.call(e)},200)}clearAreaCloseTimer(){this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null)}clearUnitCloseTimer(){this.unitCloseTimer&&(clearTimeout(this.unitCloseTimer),this.unitCloseTimer=null)}dispose(){this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null),this.unitCloseTimer&&(clearTimeout(this.unitCloseTimer),this.unitCloseTimer=null),this.clearAllGroups(),Object.values(this.mapInstances).forEach(e=>{e.dispose()}),this.mapInstances={},this.currentMap=null,Editor.clearUrlCache()}}C0(MapManager,"findNameInfo",Map$1.findNameInfo),C0(MapManager,"getAdcodeShowLevel",Map$1.getAdcodeShowLevel),C0(MapManager,"findAdcodeInfo",Map$1.findAdcodeInfo);const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index;exports.Map=Map$1;exports.MapManager=MapManager;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.removeCameraHistory=removeCameraHistory;
|
|
5366
|
+
`,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const le=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),fe=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),Le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),Ce=new zt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:le,sideMat:fe,lineMat:Le,extrudeLineMat:v.options.extrudeLine?Ce:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return U0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return U0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return U0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new zt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new zt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return U0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),le=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),fe=new zt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),Le=new zt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:le,lineMat:Le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return U0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return U0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),le=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),fe=new zt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:le,lineMat:fe}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),le=new zt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new zt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return U0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return U0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new zt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),le=new zt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:le}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Cn=class Cn extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs);C0(this,"mapHistory",[]);C0(this,"activePlaneMap",null);C0(this,"isAnimating",!1);C0(this,"parentBg",[]);C0(this,"continentsBg");C0(this,"group");C0(this,"projection");C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4/1e3);C0(this,"meters");C0(this,"cityVis",[]);C0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});C0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});C0(this,"caId");C0(this,"shadowMapLight");C0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=gi(gi({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=gi({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(le=>{le!=="100000"&&/^\d{6}$/.test(le)&&o[+le].features.forEach(Le=>{const Ce=Le.properties.adcode;V[Ce]={type:"FeatureCollection",features:[Le]}})}),V=gi(gi({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(qi(gi({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return U0(this,null,function*(){return yield Zn(Cn.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return U0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return U0(this,null,function*(){var Le;if((Le=this.options.fixCity)!=null&&Le[r]&&(r=this.options.fixCity[r]),r===71e4)return this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.pencil.camera.userData.up="0,0,1",null;const V=new City({container:this.container,editor:!1}),le=getCityConfig(r);V.setOptions({container:this.container,center:le.center,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${r}`:void 0,jsonName:le.jsonName,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield V.init();const fe=this.projection(le.center);return fe&&V.group.position.set(fe[0],-fe[1],0),this.cityVis.push(V),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),V})}initCityOnMap(r){return U0(this,null,function*(){const o=this.getAdcodeShowLevel(r);if(o==="province"){const V=yield this.initCityVis(r);yield V==null?void 0:V.drawCityPlane(r,this.lead.group)}else if(o==="city"){const V=findAdcodeInfo(r).c;let le=null;if(V.length>0)for(const fe of V)le=yield this.initCityVis(fe);else le=yield this.initCityVis(r);yield le==null?void 0:le.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix()}else if(o==="district"){const V=yield this.initCityVis(r);if(yield V==null?void 0:V.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities){const le=findAdcodeInfo(r).parent,fe=findAdcodeInfo(le).c;for(const Le of fe)(this.options.nearbyCities==="full"||Le!==r)&&(yield this.initCityVis(Le,!0))}}this.cityVis.forEach(V=>{if(!V.options.grey){const le=this.mapObj.depth+1e-5;V.group.position.z=this.mapObj.z+le}})})}initVisBg(){return U0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const le={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},fe=this.options.adcode!==1e5;if(fe){const ke=this.mList.getMultiple("parentPlane"),Gt=findAdcodeInfo(this.options.adcode).parent,Vt=findAdcodeInfo(Gt),Xt=Vt.b,{res:xt}=yield this.getGeojson(Gt),Zt=yield this.lead.draw("PlaneMap",gi({key:"bg-100000",geojson:xt,bbox:Xt,materialOptions:gi({},ke)},le),this.group);Zt.object3d.name=Vt.name,Zt.lineArr.forEach(wt=>{wt.object3d.name="线",this.lead.updateBaseObjectKey(wt,{type:"100000line"}),this.initBaseObjectUserData(wt)}),Zt.areaArr.forEach(wt=>{wt.object3d.name="板块",this.lead.updateBaseObjectKey(wt,{type:"100000area"})}),Zt.position.z=-this.options.parentBgDepth,this.parentBg.push(Zt)}const Le=this.mList.getMultiple("worldPlane"),Ce=this.options.geojsonMap[0],Re=findAdcodeInfo(0).b,Pe=yield this.lead.draw("PlaneMap",qi(gi({key:"bg-0",geojson:qi(gi({},Ce),{features:[...Ce.features.filter(ke=>fe?ke.properties.iso_a3!=="CHN":!0)]}),bbox:Re,materialOptions:gi({},Le)},le),{projection:qi(gi({},le.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Pe.object3d.name="世界",Pe.lineArr.forEach(ke=>{ke.object3d.name="线",this.lead.updateBaseObjectKey(ke,{type:"worldline"}),this.initBaseObjectUserData(ke)}),Pe.areaArr.forEach(ke=>{ke.object3d.name="板块",this.lead.updateBaseObjectKey(ke,{type:"worldarea"})}),Pe.position.z=-this.options.parentBgDepth,this.parentBg.push(Pe);const{center:ze,size:Fe}=Pe.getSize();r=Fe.x,o=Fe.y,V.set(ze.x,ze.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const le=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...le)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const le=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);le.object3d.name="地图底面",this.lead.updateBaseObjectKey(le,{type:"map-plane"}),this.options.bottomPlaneWater&&le.addWater(),le.position.copy(V),le.position.z-=.1}})}initVis(r){return U0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),le=this.pencil.cameraPositon,fe=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(le),V==null||V.spotLight.target.position.copy(fe)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return U0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),le=new zt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new zt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var le,fe;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(fe=(le=this.projection).invert)==null?void 0:fe.call(le,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#lineMat");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return U0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe){let Le=V.material,Ce=V.sideMaterial;if(y(V.sideMaterial)&&(Ce=new MeshBasicMaterial(gi({},V.sideMaterial))),y(V.material)&&(Le=new MeshBasicMaterial(gi({},V.material))),V.area){const ze=this.objectByUuid(V.area);ze&&([Le,Ce]=ze.material)}let Re=V.lineMaterial;if(y(V.lineMaterial)&&(Re=new zt(gi({},V.lineMaterial))),V.line){const ze=this.objectByUuid(V.line);ze&&(Re=ze.material)}const Pe=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[fe]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:Le,lineMat:Re,sideMat:Ce},areaGroup:!1},this.group);if(Pe.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Pe.lineArr.forEach(ze=>{ze.enableBloom()}),V.area){Pe.position.z=0;const ze=this.baseObjectByUuid(V.area);Pe.areaArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.scale.z=ze.scale.z,Fe.position.z=ze.position.z})}if(V.line){const ze=this.baseObjectByUuid(V.line);Pe.lineArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.position.z=ze.position.z})}return Pe}})}showAction(){return U0(this,null,function*(){Zn(Cn.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:le=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-le)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return U0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{Zn(Cn.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return U0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let le;return o==="country"?le=V[0]:o==="province"?le=V[1]:le=V[2],le}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const le=this.options.depthReference,fe=findAdcodeInfo(r).b;V=V*this.getReferenceScale(le,fe)}else if(this.mapHistory.length){const le=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,fe=this.getReferenceScale(le,o);V=V*fe}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),le=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,le)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var le;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(le=findAdcodeInfo(V))==null?void 0:le.parent;return o}showMap(le){return U0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const fe=o||this.getAdcodes(r);(yield this.beforeShowMap(fe))!==!1&&(this.emit("beforeDrillDown",[...fe]),yield this.setAdcode({adcodes:fe,duration:V}),this.emit("afterDrillDown",[...fe]))})}drawLabels(){return U0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(le=>U0(this,null,function*(){let{name:fe,adcode:Le,centroid:Ce}=le.userData;const{DistrictID:Re,DistName:Pe,iso_a2:ze,center:Fe}=le.userData;if(Le=Le||ze||Re,Ce=Ce||Fe,fe=fe||Pe,!Ce)return;const ke=this.getLocationPosition(Ce);if(this.lead.getObject("Node",{key:`mapLabel-${Le}`})||!ke)return;const[Gt,Vt,Xt]=ke;let xt=fe;r==="lite"&&xt&&(xt=fe.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const Zt=xt&&getLabelElement(xt),wt=xt!=null&&xt.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Gt,Vt+wt,Xt),children:Zt,key:`$p:-${this.options.adcode===0?fe:Le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(le=>le.userData.adcode===r);if(o){const{centroid:le,center:fe}=o.userData;return this.getLocationPosition(le||fe)}}getLocationPosition(r){const[o,V]=r,[le,fe]=this.projection([o,V]);return[le,-fe,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const le=this.getLocationPosition(o);r.position.set(le[0],le[1],le[2]+V)}setObjectOnMapAreaByProperty(r,o,V,le=0){var Le;const fe=(Le=this.mapArea)==null?void 0:Le.find(Ce=>Ce.userData[o]===V);if(fe){const{centroid:Ce,center:Re}=fe.userData,Pe=this.getLocationPosition(Ce||Re);r.position.set(Pe[0],Pe[1],Pe[2]+le)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,le,fe]=o,Le=new Vector3(V,le,fe);Le.project(this.pencil.camera);const{width:Ce,height:Re}=this.pencil.getSize(),Pe=(Le.x*.5+.5)*Ce,ze=(Le.y*-.5+.5)*Re;return{x:Pe,y:ze}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var Le,Ce;const V=o!=null?o:(Le=this.mapInfo)==null?void 0:Le.adcode;if(!V)return!1;const le=findAdcodeInfo(V);if(le!=null&&le.b){const[Re,Pe,ze,Fe]=le.b,[ke,Gt]=r;if(ke<Re||ke>ze||Gt<Pe||Gt>Fe)return!1}const fe=(Ce=this.options.extrudeLineGeojsonMap)==null?void 0:Ce[V];return fe?fe.features.some(Re=>{const Pe=Re.geometry.coordinates;return Re.geometry.type==="Polygon"?Pe.some(ze=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([ze]))):Re.geometry.type==="MultiPolygon"?Pe.some(ze=>ze.some(Fe=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Fe])))):!1}):!1}getGeojson(r,o=!1){return U0(this,null,function*(){var V,le,fe,Le;return o?this.options.extrudeLine?(fe=this.options.extrudeLineGeojsonMap)!=null&&fe[r]?{res:(Le=this.options.extrudeLineGeojsonMap)==null?void 0:Le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(le=this.options.geojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(Le){return U0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:le,extrudelineBloom:fe}){var Ce,Re,Pe,ze,Fe;if(typeof r!="undefined"&&!this.isAnimating){const ke=(Ce=this.map)==null?void 0:Ce.findGroup(r,!0),Gt=findAdcodeInfo(+r);if(this.isAnimating||!Gt)return;this.isAnimating=!0;const{name:Vt}=Gt;let{res:Xt}=yield this.getGeojson(r),{res:xt}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(Xt=xt,xt=void 0),[Xt,xt].filter(Boolean).forEach(wt=>{if(!wt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Wt=findAdcodeInfo(r);wt.features[0].properties=qi(gi(gi({},wt.features[0].properties),Wt),{center:[Wt.lng,Wt.lat]})}}),Xt){const wt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Re=this.options.fixGeojson)!=null&&Re[r]){const e0=(Pe=this.options.fixGeojson)==null?void 0:Pe[r];if(e0.startsWith("-")){const o0=+e0.slice(1);Xt.features=Xt.features.filter(b0=>b0.properties.adcode!==o0)}}let Wt=findAdcodeInfo(r).b;const It=[...Wt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:Wt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(e0=>{e0.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),le&&this.saveCamvasState("userControls",-1));const Nt=this.mapHistory.length,Ft=Nt-1,Ht=this.getDepth(r,It),Kt=(ze=this.mapHistory[Ft])==null?void 0:ze.depth,Yt=Nt===0||this.options.showOneLevel?0:this.mapHistory[Ft].z+Kt,jt=Nt===0||this.options.showOneLevel?0:Yt-Ht,n0=turf.center(Xt).geometry.coordinates,[a0,l0]=this.projection(n0),s0=yield this.drawPlaneMap({geojson:Xt,extrudeLineGeojson:xt,depth:Ht,bbox:Wt,adcode:r,extrudelineBloom:fe});ke==null||ke.hide(),s0.position.setZ(jt);const $t=s0.position.z,qt=()=>U0(this,null,function*(){yield sinusoidalInOut({onUpdate:e0=>{Yt!==$t&&(s0.position.z=$t+(Yt-$t)*e0)}}).start({duration:o})});if(wt)if(this.fixNear(r),s0.position.z=Yt,V){const e0=(Fe=this.mapHistory.at(-1))==null?void 0:Fe.controls;yield this.fitTo(s0,{z:Yt+Ht,adcode:r,enableTransition:o!==0,polarAngle:e0==null?void 0:e0.polarAngle,azimuthAngle:e0==null?void 0:e0.azimuthAngle,handleStart:()=>U0(this,null,function*(){s0.position.z=$t,yield qt()})})}else this.options.showOneLevel&&s0.hide();else yield qt();this.mapHistory.push({map:s0,mapInfo:Gt,z:Yt,depth:Ht,cX:a0,cY:-l0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Vt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Re){return U0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:le,handleStart:fe,adcode:Le,enableTransition:Ce=!0}={}){if(!(r!=null&&r.object3d))return;if(Le&&(yield this.useSaveCamera(`map-${Le}`,Ce))){fe&&(yield fe());return}const Pe=this.options.mapPadding,{height:ze,width:Fe}=this.pencil.getSize();ze<Pe[0]+Pe[2]+50&&(Pe[0]=0,Pe[2]=0),Fe<Pe[1]+Pe[3]+50&&(Pe[1]=0,Pe[3]=0);const ke=o!=null?o:this.options.polarAngle,Gt=V!=null?V:this.options.azimuthAngle,Vt=this.pencil.cameraPositon.toArray(),Xt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Pe[0],Pe[1],Pe[2],Pe[3],!1);let xt;le&&(xt=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(xt[0],xt[1],le,!1)),yield this.pencil.controls.rotateTo(Gt,ke,!1),xt=this.pencil.cameraTarget.toArray();const Zt=this.pencil.cameraPositon.toArray();yield this.lookAt(...Vt,...Xt),yield Promise.all([this.lookAt(...Zt,...xt,Ce),fe==null?void 0:fe()].filter(Boolean))})}drawPlaneMap(Ce){return U0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:le,extrudelineBloom:fe,adcode:Le}){var Vt;const Re=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Pe=this.mapHistory.length,ze=null;for(;ze===null;)ze=Re[Pe],Pe--;const Fe=this.mList.getMultiple("bgPlane"),ke=gi(gi({},ze),Fe?{bgTopMat:Fe.topMat,bgSideMat:Fe.sideMat,bgLineMat:Fe.lineMat,bgExtrudeLineMat:Fe.extrudeLineMat}:{}),Gt=yield this.lead.draw("PlaneMap",{key:`${Le}`,geojson:r,extrudeLineGeojson:o,depth:le,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:ke,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Gt.object3d.name=((Vt=findAdcodeInfo(Le))==null?void 0:Vt.name)||`${Le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(ze.lineMat.colorWrite=!1,Gt.lineArr.forEach(Xt=>{Xt.userData.selectHide=!0})),Gt.extrudelineArr&&Gt.extrudelineArr.forEach(Xt=>{Xt.object3d.name="板块边线",this.lead.updateBaseObjectKey(Xt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(Xt),fe&&(Xt.object3d.userData.bloom=!0)}),Gt.lineArr&&Gt.lineArr.forEach(Xt=>{this.initBaseObjectUserData(Xt)}),Gt})}handleBack(){return U0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const le=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const fe=le.map.position.z,Le=this.mapObj?this.mapObj.z+(this.mapObj.depth-le.depth):0;yield sinusoidalInOut({onUpdate:Ce=>{le.map.position.z=fe+(Le-fe)*Ce}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(le.map),this.eraseLabels(),this.mapObj){const{map:fe}=this.mapObj,Le=fe==null?void 0:fe.findGroup(le.mapInfo.adcode,!0);Le&&Le.show(),fe&&o&&(this.options.showOneLevel?fe.show():fe.active(),this.options.drillDownHideParent&&this.parentBg.forEach(Ce=>{Ce.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return U0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(Ce=>Ce),le=o.filter(Ce=>Ce),fe=[];let Le=0;for(let Ce=0;Ce<Math.min(V.length,le.length)&&V[Ce]===le[Ce];Ce++)Le++;for(let Ce=Le;Ce<V.length;Ce++)fe.push(-1);for(let Ce=Le;Ce<le.length;Ce++)fe.push(le[Ce]);return fe}setAdcode(V){return U0(this,arguments,function*({adcodes:r,duration:o}){var fe,Le,Ce;const{adcodes:le}=this;if(!(JSON.stringify(r)===JSON.stringify(le)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(ke){console.error(ke)}else{const{continent:ke,country:Gt,province:Vt,city:Xt,district:xt}=r.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),{continent:Zt,country:wt,province:Wt,city:It,district:Nt}=le.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),Ft=ke||Zt,Ht=(Ce=(Le=(fe=this.map)==null?void 0:fe.extrudelineArr)==null?void 0:Le[0])==null?void 0:Ce.object3d.userData.bloom,Kt=this.compareLocations([Zt,wt,Wt,It,Nt],[ke,Gt,Vt,Xt,xt]);try{for(var Re=Dn(Kt.entries()),Pe,ze,Fe;Pe=!(ze=yield Re.next()).done;Pe=!1){const[Yt,jt]=ze.value;const n0=Yt===Kt.length-1?o:0,a0=Yt===Kt.length-1;jt===-1?yield this.handleBack({duration:n0,handleLookBack:a0,keepOne:!Ft}):yield this.handleDrillDown({adcode:jt,duration:n0,handleLook:a0,saveBackCamvasState:Kt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:Ht})}}catch(ze){Fe=[ze]}finally{try{Pe&&(ze=Re.return)&&(yield ze.call(Re))}finally{if(Fe)throw Fe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.editor)==null||r.events.removeAllListeners(),this.cityVis.forEach(le=>{le.dispose()}),this.cityVis.length=0,(o=this.map)==null||o.dispose(),this.parentBg.forEach(le=>{le.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};C0(Cn,"VisName","map"),C0(Cn,"getAdcodeShowLevel",getAdcodeShowLevel),C0(Cn,"findAdcodeInfo",findAdcodeInfo),C0(Cn,"findNameInfo",findNameInfo);let Map$1=Cn;class MapManager{constructor(e){C0(this,"container");C0(this,"controlsContainer");C0(this,"assetsPrefix");C0(this,"fixConfig");C0(this,"raycasterPointsThreshold");C0(this,"MAX_ZOOM_FACTOR",.3);C0(this,"MIN_ZOOM_FACTOR",4);C0(this,"mapInstances",{});C0(this,"mapDistances",{});C0(this,"mapConfigs",{});C0(this,"currentMap",null);C0(this,"currentZoom",1);C0(this,"groups",{});C0(this,"eventHandlers",{});C0(this,"areaCloseTimer",null);this.container=e.container,this.controlsContainer=e.controlsContainer||e.container,this.assetsPrefix=e.assetsPrefix,this.fixConfig=e.fixConfig,this.raycasterPointsThreshold=e.raycasterPointsThreshold||.005}setEventHandlers(e){this.eventHandlers=gi(gi({},this.eventHandlers),e)}emit(e,...r){const o=this.eventHandlers[e];o&&typeof o=="function"&&o(...r)}getCurrentMap(){return this.currentMap}getCurrentZoom(){return this.currentZoom}initMap(e,r=!1){return U0(this,null,function*(){const o=e.at(-1)||e.at(-2);return o?this.createMapInstance(o,r):null})}createMapInstance(e,r=!1){return U0(this,null,function*(){var Pe,ze;const o=Object.values(this.mapInstances)[0],V=(Pe=Map$1.getAdcodeShowLevel(e))!=null?Pe:"country",le=Map$1.findAdcodeInfo(e),fe=o==null?void 0:o.pencil,Le=this.mapInstances[V];if(Le)if(Le.pencil.controls.maxDistance=1/0,Le.pencil.controls.minDistance=0,Le.options.adcode===e&&!r&&!Le.options.fixedAdcode){Le.setSceneActive(),this.currentMap=Le,Le.pencil.controls.maxDistance=this.mapDistances[V]/this.MAX_ZOOM_FACTOR,Le.pencil.controls.minDistance=this.mapDistances[V]/this.MIN_ZOOM_FACTOR;const Fe=Le.pencil.controls.distance,ke=Math.round(this.mapDistances[V]/Fe*10)/10;return this.currentZoom!==ke&&(this.currentZoom=ke,this.emit("zoomChange",ke)),Le}else Le.options.pencil=fe,Le.dispose(),delete this.mapInstances[V];const Ce=new Map$1({container:this.container,controlsContainer:this.controlsContainer,assetsPrefix:this.assetsPrefix,pencil:fe});let Re=0;return yield Ce.fromJSON((ze=this.mapConfigs[V])!=null?ze:`/${V}.gz`,{preprocessor:Fe=>U0(this,null,function*(){if(Re=Fe.h.u[0].visOptions.adcode,V==="province"||V==="city"||V==="district"){const ke=yield getMapConfig(e,this.assetsPrefix,Fe.h.u[0].visOptions,Fe.h.i);Fe.h.u[0].visOptions=ke,le!=null&&le.c.length&&(Fe.h.u[0].visOptions.showBuilding=!1)}return Fe}),useCache:!0}),Ce.pencil.camera.near=.01,Ce.pencil.camera.updateProjectionMatrix(),Ce.pencil.raycaster.params.Points.threshold=this.raycasterPointsThreshold,Ce.pencil.controls.addEventListener("update",()=>{const Fe=Ce.pencil.controls.distance,ke=Math.round(this.mapDistances[V]/Fe*10)/10;this.currentZoom!==ke&&(this.currentZoom=ke,this.emit("zoomChange",ke))}),V!=="country"&&(Ce.options.mapPadding=[220,300,70,0],Ce.options.polarAngle=-Math.PI,yield Ce.fitTo(Ce.map,{enableTransition:!1}),yield Ce.fitTo(Ce.map,{enableTransition:!1})),this.applyFixConfig(Ce,V,Re,e),le!=null&&le.c.length&&!r&&this.bindAreaEvents(Ce),this.mapInstances[V]=Ce,Ce.setSceneActive(),this.currentMap=Ce,this.currentZoom=1,this.emit("zoomChange",1),this.mapDistances[V]=Ce.pencil.controls.distance,Ce.pencil.controls.maxDistance=Ce.pencil.controls.distance/this.MAX_ZOOM_FACTOR,Ce.pencil.controls.minDistance=Ce.pencil.controls.distance/this.MIN_ZOOM_FACTOR,Ce.options.fixedAdcode=r,Ce})}applyFixConfig(e,r,o,V){if(!this.fixConfig)return;const le=this.fixConfig[`level:${r}`];if(!le)return;const fe=e.findAdcodeInfo(o),Le=e.findAdcodeInfo(V),Ce=e.getReferenceScale(fe.b,Le.b);[...le.s].forEach(Re=>{const Pe=e.baseObjectByUuid(Re);if(Pe){Pe.scale.multiplyScalar(Ce);const{center:ze}=e.map.getSize();Pe.position.x=ze.x,Pe.position.y=ze.y}}),[...le.z].forEach(Re=>{const Pe=e.baseObjectByUuid(Re);Pe&&(Pe.position.z*=Ce)})}bindAreaEvents(e){const r={};e.mapArea.forEach(o=>{var fe;const V=o.userData.adcode,le=e.cityVis.length===1?e.cityVis[0]:e.cityVis.find(Le=>Le.options.adcode===V);if(le){const Le=(fe=r[le.options.adcode])!=null?fe:le.group.getSize().max.z;r[le.options.adcode]=Le}o.onPointerEnter(()=>{this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null),o.useMListByName("顶面高亮",0),le&&(o.position.z=r[le.options.adcode]-e.mapObj.depth);const Le=o.userData.centroid||o.userData.center;if(!Le)return;const Ce=e.getLocationPosition([...Le]),Re=e.getScreenPosition(...Ce);this.emit("areaHover",o.userData.name,{x:Re.x,y:Re.y})}),o.onPointerLeave(()=>{o.useMListByName("顶面",0),le&&(o.position.z=0),this.areaCloseTimer=setTimeout(()=>{this.emit("areaLeave")},200)}),o.onClick(()=>{o.useMListByName("顶面",0),le&&(o.position.z=0),this.emit("areaClick",o.userData.name,o.userData.adcode)})})}setZoom(e){var le;if(!this.currentMap||this.currentZoom===e)return;const r=(le=Map$1.getAdcodeShowLevel(this.currentMap.options.adcode))!=null?le:"country",o=this.mapDistances[r];if(!o)return;const V=o/e;this.currentZoom=e,this.currentMap.pencil.controls.distance=V}createGroup(e){return U0(this,null,function*(){if(!this.currentMap)return null;e in this.groups&&this.clearGroup(e);const r=yield this.currentMap.addGroup();return this.groups[e]=r,r})}getGroup(e){return this.groups[e]}clearGroup(e){const r=this.groups[e];r&&(r.erase(),delete this.groups[e])}clearAllGroups(){Object.values(this.groups).forEach(e=>{e.erase()}),this.groups={}}clearAreaCloseTimer(){this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null)}dispose(){this.areaCloseTimer&&(clearTimeout(this.areaCloseTimer),this.areaCloseTimer=null),this.clearAllGroups(),Object.values(this.mapInstances).forEach(e=>{e.dispose()}),this.mapInstances={},this.currentMap=null,Editor.clearUrlCache()}}C0(MapManager,"findNameInfo",Map$1.findNameInfo),C0(MapManager,"getAdcodeShowLevel",Map$1.getAdcodeShowLevel),C0(MapManager,"findAdcodeInfo",Map$1.findAdcodeInfo);const _inverseMatrix=new Matrix4,_ray=new Ray,_sphere=new Sphere$1,_position$2=new Vector3;function proposedRaycast(v,e){const r=this.geometry,o=this.matrixWorld,V=v.params.Points.threshold,le=r.drawRange;r.boundingSphere===null&&r.computeBoundingSphere(),_sphere.copy(r.boundingSphere),_sphere.applyMatrix4(o),_sphere.radius+=V,_inverseMatrix.copy(o).invert(),_ray.copy(v.ray).applyMatrix4(_inverseMatrix);const fe=V/((this.scale.x+this.scale.y+this.scale.z)/3),Le=r.index,Re=r.attributes.position;if(Le!==null){const Pe=Math.max(0,le.start),ze=Math.min(Le.count,le.start+le.count);for(let Fe=Pe,ke=ze;Fe<ke;Fe++){const Gt=Le.getX(Fe);_position$2.fromBufferAttribute(Re,Gt),testPoint(_position$2,Gt,fe,o,v,e,this)}}else{const Pe=Math.max(0,le.start),ze=Math.min(Re.count,le.start+le.count);for(let Fe=Pe,ke=ze;Fe<ke;Fe++)_position$2.fromBufferAttribute(Re,Fe),testPoint(_position$2,Fe,fe,o,v,e,this)}}function testPoint(v,e,r,o,V,le,fe){const Le=new Vector3;_ray.closestPointToPoint(v,Le),Le.applyMatrix4(o);const Ce=V.ray.origin.distanceTo(v),Re=Le.distanceTo(v),Pe=Math.asin(Re/Ce);if(Pe<r){if(Ce<V.near||Ce>V.far)return;le.push({distance:Ce,distanceToRay:Re,angleToRay:Pe,point:Le,index:e,face:null,object:fe})}}const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index;exports.Map=Map$1;exports.MapManager=MapManager;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.proposedRaycast=proposedRaycast;exports.removeCameraHistory=removeCameraHistory;
|