soonspacejs 2.6.2 → 2.6.4

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.esm.js CHANGED
@@ -1,16 +1,16 @@
1
- import*as e from"three";import{Vector3 as t,Euler as n,Box3 as i,Quaternion as r,CubeTextureLoader as s,RGBAFormat as o,Color as a,Texture as l,Source as c,LinearEncoding as u,MathUtils as h,DoubleSide as d,BufferAttribute as f,PropertyBinding as p,InterpolateDiscrete as g,Matrix4 as m,Scene as v,InterpolateLinear as y,NearestFilter as w,NearestMipmapNearestFilter as b,NearestMipmapLinearFilter as x,LinearFilter as A,LinearMipmapNearestFilter as T,LinearMipmapLinearFilter as S,ClampToEdgeWrapping as E,RepeatWrapping as D,MirroredRepeatWrapping as C,sRGBEncoding as I,Vector2 as M,Plane as B,Line3 as R,Triangle as P,Sphere as O,BackSide as _,FrontSide as L,Mesh as k,Ray as N,BoxGeometry as U,MeshStandardMaterial as F,PointLight as j,MeshBasicMaterial as z,DataTextureLoader as H,HalfFloatType as G,FloatType as V,DataUtils as Y,ShaderMaterial as W,UniformsUtils as X,Fog as Q,EdgesGeometry as K,LineSegments as Z,LineBasicMaterial as q,Object3D as J,PerspectiveCamera as $,OrthographicCamera as ee,WebGLRenderer as te,PCFSoftShadowMap as ne,Camera as ie,UnsignedByteType as re,MeshNormalMaterial as se,WebGLRenderTarget as oe,DepthTexture as ae,DepthStencilFormat as le,UnsignedInt248Type as ce,UnsignedIntType as ue,Uniform as he,LoadingManager as de,NoBlending as fe,RGBADepthPacking as pe,REVISION as ge,EventDispatcher as me,MeshDepthMaterial as ve,BasicDepthPacking as ye,DataTexture as we,Vector4 as be,BufferGeometry as xe,Material as Ae,LuminanceFormat as Te,RedFormat as Se,RGFormat as Ee,ShaderChunk as De,WebGLCubeRenderTarget as Ce,CubeCamera as Ie,PMREMGenerator as Me,WebGLMultipleRenderTargets as Be,FramebufferTexture as Re,Matrix3 as Pe,TangentSpaceNormalMap as Oe,GLSL3 as _e,VideoTexture as Le,Frustum as ke,MOUSE as Ne,TOUCH as Ue,Spherical as Fe,CanvasTexture as je,PlaneGeometry as ze,Raycaster as He,Clock as Ge,AnimationMixer as Ve,ACESFilmicToneMapping as Ye,AnimationClip as We,NoToneMapping as Xe,LinearToneMapping as Qe,ReinhardToneMapping as Ke,CineonToneMapping as Ze,EquirectangularReflectionMapping as qe,TextureLoader as Je,Sprite as $e,SpriteMaterial as et,SphereGeometry as tt,CircleGeometry as nt,Float32BufferAttribute as it,ShapeGeometry as rt,Shape as st,UniformsLib as ot,UVMapping as at,AmbientLight as lt,DirectionalLight as ct,HemisphereLight as ut,SpotLight as ht,RectAreaLight as dt,Curve as ft,Loader as pt,LoaderUtils as gt,FileLoader as mt,MeshPhongMaterial as vt,MeshLambertMaterial as yt,Group as wt,Bone as bt,SkinnedMesh as xt,Line as At,Skeleton as Tt,Uint16BufferAttribute as St,VectorKeyframeTrack as Et,QuaternionKeyframeTrack as Dt,NumberKeyframeTrack as Ct,TrianglesDrawMode as It,TriangleFanDrawMode as Mt,TriangleStripDrawMode as Bt,MeshPhysicalMaterial as Rt,InstancedMesh as Pt,ImageBitmapLoader as Ot,InterleavedBuffer as _t,InterleavedBufferAttribute as Lt,PointsMaterial as kt,LineLoop as Nt,Points as Ut,Interpolant as Ft,LinearMipMapLinearFilter as jt,ImageLoader as zt,GridHelper as Ht,AxesHelper as Gt,Box3Helper as Vt,DirectionalLightHelper as Yt,HemisphereLightHelper as Wt,SpotLightHelper as Xt,PointLightHelper as Qt,Box2 as Kt}from"three";export*from"three";var Zt,qt="soonspacejs",Jt="2.6.2",$t={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-$t.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*$t.Bounce.In(2*e):.5*$t.Bounce.Out(2*e-1)+.5}}},en="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},tn=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=en()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var r=this._tweens[n[i]],s=!t;r&&!1===r.update(e,s)&&!t&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),nn={Linear:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),s=nn.Utils.Linear;return t<0?s(e[0],e[1],i):t>1?s(e[n],e[n-1],n-i):s(e[r],e[r+1>n?n:r+1],i-r)},Bezier:function(e,t){for(var n=0,i=e.length-1,r=Math.pow,s=nn.Utils.Bernstein,o=0;o<=i;o++)n+=r(1-t,i-o)*r(t,o)*e[o]*s(i,o);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),s=nn.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(r=Math.floor(i=n*(1+t))),s(e[(r-1+n)%n],e[r],e[(r+1)%n],e[(r+2)%n],i-r)):t<0?e[0]-(s(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(s(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):s(e[r?r-1:0],e[r],e[n<r+1?n:r+1],e[n<r+2?n:r+2],i-r)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=nn.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(Zt=[1],function(e){var t=1;if(Zt[e])return Zt[e];for(var n=e;n>1;n--)t*=n;return Zt[e]=t,t}),CatmullRom:function(e,t,n,i,r){var s=.5*(n-e),o=.5*(i-t),a=r*r;return(2*t-2*n+s+o)*(r*a)+(-3*t+3*n-2*s-o)*a+s*r+t}}},rn=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),sn=new tn,on=function(){function e(e,t){void 0===t&&(t=sn),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=$t.Linear.None,this._interpolationFunction=nn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=rn.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?en()+parseFloat(e):e:en(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,i){for(var r in n){var s=e[r],o=Array.isArray(s),a=o?"array":typeof s,l=!o&&Array.isArray(n[r]);if("undefined"!==a&&"function"!==a){if(l){var c=n[r];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,s)),n[r]=[s].concat(c)}if("object"!==a&&!o||!s||l)void 0===t[r]&&(t[r]=s),o||(t[r]*=1),i[r]=l?n[r].slice().reverse():t[r]||0;else{for(var u in t[r]=o?[]:{},s)t[r][u]=s[u];i[r]=o?[]:{},this._setupProperties(s,t[r],n[r],i[r])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=en()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=en()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=en()),void 0===t&&(t=!0),this._isPaused)return!0;var n,i,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>r)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var s=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,a=this._chainedTweens.length;o<a;o++)this._chainedTweens[o].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,i){for(var r in n)if(void 0!==t[r]){var s=t[r]||0,o=n[r],a=Array.isArray(e[r]),l=Array.isArray(o);!a&&l?e[r]=this._interpolationFunction(o,i):"object"==typeof o&&o?this._updateProperties(e[r],s,o,i):"number"==typeof(o=this._handleRelativeValue(s,o))&&(e[r]=s+(o-s)*i)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),an=rn.nextId,ln=sn,cn=ln.getAll.bind(ln),un=ln.removeAll.bind(ln),hn=ln.add.bind(ln),dn=ln.remove.bind(ln),fn=ln.update.bind(ln),pn={Easing:$t,Group:tn,Interpolation:nn,now:en,Sequence:rn,nextId:an,Tween:on,VERSION:"18.6.4",getAll:cn,removeAll:un,add:hn,remove:dn,update:fn};const gn="[soonspacejs]: ",mn="In soonspacejs: ",vn=(e,t)=>{let n="";for(const e in t)n+=`${e}: ${t[e]};`;console.log(`%c${e}`,n)},yn=e=>{console.warn(mn+e)};function wn(e){return e instanceof t?e:new t(e.x,e.y,e.z)}function bn(e){return e instanceof n?e:new n(e.x,e.y,e.z)}function xn(e){return new i(new t(0,0,0),new t(500,500,500)).setFromObject(e)}function An(e,t,n){const i=n.clone();return Math.abs(t[e]-n[e])>Math.PI&&(t[e]>n[e]?i[e]+=2*Math.PI:i[e]-=2*Math.PI),i}function Tn(e,t){const i=An("x",e,t),r=An("y",e,t),s=An("z",e,t);return new n(i.x,r.y,s.z,t.order)}function Sn(e){return Math.PI/180*e}function En(e){return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?{position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)}:{position:e.position.clone(),rotation:e.rotation.clone(),scale:e.scale.clone()}}function Dn(e,t){const n=En(t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);e.position.copy(n.position),e.rotation.copy(n.rotation),e.scale.copy(n.scale)}function Cn(e){return!!e.visible&&(!e.parent||Cn(e.parent))}class In{constructor(){this.min=null,this.roots=[],this.nodes=new Map}shift(){const e=this.min;if(null===e||this.roots.length<1)return this.min=null,e;this.remove(e),this.roots.length>50&&this.consolidate();let t=1/0;const n=this.roots.length;for(let e=0;e<n;e++){const n=this.roots[e],i=this.getDistance(n);i<t&&(t=i,this.min=n)}return e}consolidate(){const e=[[],[],[],[],[],[],[]],t=e.length-1,n=this.roots.length;for(let i=0;i<n;i++){const n=this.roots[i],r=this.nodes.get(n);r&&r.depth<t&&e[r.depth].push(n)}for(let n=0;n<=t;n++)for(;e[n].length>1;){const i=e[n].shift(),r=e[n].shift(),s=n+1;let o=-1;if(void 0!==i&&void 0!==r){const n=this.nodes.get(i),a=this.nodes.get(r);n&&a&&(n.distance<a.distance?(n.depth=s,n.children.push(r),a.parent=i,s<=t&&e[s].push(i),o=this.roots.indexOf(r)):(a.depth=s,a.children.push(i),n.parent=r,s<=t&&e[s].push(r),o=this.roots.indexOf(i)))}o>-1&&this.roots.splice(o,1)}}add(e,t){if(this.nodes.set(e,{nodeIndex:e,distance:t,depth:0,parent:null,children:[]}),null===this.min)this.min=e;else{const n=this.nodes.get(this.min);n&&t<n.distance&&(this.min=e)}this.roots.push(e)}update(e,t){this.remove(e),this.add(e,t)}remove(e){var t,n;if(!this.nodes.has(e))return;const i=null===(t=this.nodes.get(e))||void 0===t?void 0:t.children;if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=i[t],r=this.nodes.get(n),s=this.nodes.get(e);r&&s&&(r.parent=s.parent),r&&null===r.parent&&this.roots.push(n)}let r=null===(n=this.nodes.get(e))||void 0===n?void 0:n.parent;if(null===r){const t=this.roots.indexOf(e);t>-1&&this.roots.splice(t,1)}else for(;r;){const e=this.nodes.get(r);e&&(e.depth--,r=e.parent)}}getDistance(e){const t=this.nodes.get(e);return t?t.distance:1/0}}function Mn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"];return new Promise((n=>{(new s).setPath(e).load(t,(e=>{e.format=o,n(e)}))}))}function Bn(e){if(!e)return null;const{colors:t,stops:n,size:i=1024}=e,r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return null;r.width=16,r.height=i;const o=s.createLinearGradient(0,0,0,i),c=new a,u=t.map((e=>c.set(e).getStyle()));for(let e=0,t=u.length-1;e<=t;e++)o.addColorStop(n?n[e]:e/t,u[e]);s.fillStyle=o,s.fillRect(0,0,16,i);const h=new l(r);return h.needsUpdate=!0,h}const Rn=e=>{const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)};function Pn(e){return ji(e)?function(e){return e.map((e=>Pn(e)))}(e):zi(e)?function(e){if(zi(e)){const t={};for(const n in e)t[n]=Pn(e[n]);return t}return e}(e):e}const On=(e,t)=>ji(e)?e.map(t):t(e),_n=e=>On(e,(e=>e.clone())),Ln=e=>On(e,(e=>e.dispose()));var kn=function(e,t){return kn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},kn(e,t)};var Nn=function(){return Nn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Nn.apply(this,arguments)};function Un(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function Fn(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}var jn=Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]};function zn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function Gn(e){return this instanceof Gn?(this.v=e,this):new Gn(e)}var Vn=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Yn(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Wn(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}var Xn=Object.freeze({__proto__:null,get __assign(){return Nn},__asyncDelegator:function(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,r){t[i]=e[i]?function(t){return(n=!n)?{value:Gn(e[i](t)),done:!1}:r?r(t):t}:r}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){s.push([e,t,n,i])>1||a(e,t)}))})}function a(e,t){try{(n=r[e](t)).value instanceof Gn?Promise.resolve(n.value.v).then(l,c):u(s[0][2],n)}catch(e){u(s[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=zn(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,r){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,r,(t=e[n](t)).done,t.value)}))}}},__await:Gn,__awaiter:Fn,__classPrivateFieldGet:Yn,__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:Wn,__createBinding:jn,__decorate:function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},__esDecorate:function(e,t,n,i,r,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?i.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d=!1,f=n.length-1;f>=0;f--){var p={};for(var g in i)p[g]="access"===g?{}:i[g];for(var g in i.access)p.access[g]=i.access[g];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var m=(0,n[f])("accessor"===l?{get:h.get,set:h.set}:h[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=o(m.get))&&(h.get=a),(a=o(m.set))&&(h.set=a),(a=o(m.init))&&r.push(a)}else(a=o(m))&&("field"===l?r.push(a):h[c]=a)}u&&Object.defineProperty(u,i.name,h),d=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||jn(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}kn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&jn(t,e,n);return Vn(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,i){t(n,i,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:Hn,__rest:Un,__runInitializers:function(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Hn(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},__values:zn});const Qn=e=>Fn(void 0,void 0,void 0,(function*(){const t=yield fetch(e);if(200===t.status)return t;throw new Error(`Failed to fetch file: ${e}`)})),Kn=e=>{"function"==typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e)};var Zn=function(){function e(){}return e.prototype.toJson=function(e,t){var n=this.xmlStringToXmlDom(e),i=this.xmlToJson(n);return t?(t.removeLineBreaks&&this.removeLineBreaks(i),t.removeComments&&this.removeCommentProperties(i),t.transformTextOnly&&this.transformTextOnly(i),i):i},e.prototype.xmlStringToXmlDom=function(e){return(new DOMParser).parseFromString(e,"text/xml")},e.prototype.removeLineBreaks=function(e){var t=this;Object.keys(e).forEach((function(n,i){"#text"===n&&Array.isArray(e[n])&&delete e[n],"object"==typeof e[n]&&t.removeLineBreaks(e[n])}))},e.prototype.removeCommentProperties=function(e){var t=this;Object.keys(e).forEach((function(n,i){"#comment"===n&&delete e[n],"object"==typeof e[n]&&t.removeCommentProperties(e[n])}))},e.prototype.transformTextOnly=function(e){var t=this;Object.keys(e).forEach((function(n,i){var r=Object.keys(e[n]).length>1,s=Object.keys(e[n])[0];r||"object"==typeof e[n][s]?t.transformTextOnly(e[n]):"object"==typeof e[n]&&e[n]["#text"]&&(e[n]=e[n]["#text"])}))},e.prototype.xmlToJson=function(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t._attributes={};for(var n=0;n<e.attributes.length;n++){var i=e.attributes.item(n);t._attributes[i.nodeName]=i.nodeValue}}}else 3==e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes.item(r),o=s.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(s);else{if(void 0===t[o].push){var a=t[o];t[o]=[],t[o].push(a)}t[o].push(this.xmlToJson(s))}}return t},e}();function qn(e){return Qn(e).then((e=>e.text())).then((e=>Promise.resolve(function(e){return(new Zn).toJson(e,{transformTextOnly:!0,removeComments:!0,removeLineBreaks:!0})}(e))))}class Jn{constructor(){this.pluginCallbacks=[],this.register((function(e){return new Ii(e)})),this.register((function(e){return new Mi(e)})),this.register((function(e){return new Pi(e)})),this.register((function(e){return new Oi(e)})),this.register((function(e){return new _i(e)})),this.register((function(e){return new Li(e)})),this.register((function(e){return new Bi(e)})),this.register((function(e){return new Ri(e)}))}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){const r=new Ci,s=[];for(let e=0,t=this.pluginCallbacks.length;e<t;e++)s.push(this.pluginCallbacks[e](r));r.setPlugins(s),r.write(e,t,i).catch(n)}parseAsync(e,t){const n=this;return new Promise((function(i,r){n.parse(e,i,r,t)}))}}const $n=0,ei=1,ti=2,ni=3,ii=4,ri=5121,si=5123,oi=5126,ai=5125,li=34962,ci=34963,ui=9728,hi=9729,di=9984,fi=9985,pi=9986,gi=9987,mi=33071,vi=33648,yi=10497,wi={};wi[w]=ui,wi[b]=di,wi[x]=pi,wi[A]=hi,wi[T]=fi,wi[S]=gi,wi[E]=mi,wi[D]=yi,wi[C]=vi;const bi={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},xi=new a;function Ai(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}function Ti(e){return 4*Math.ceil(e/4)}function Si(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Ti(e.byteLength);if(n!==e.byteLength){const i=new Uint8Array(n);if(i.set(new Uint8Array(e)),0!==t)for(let r=e.byteLength;r<n;r++)i[r]=t;return i.buffer}return e}function Ei(){return"undefined"==typeof document&&"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas")}function Di(e,t){if(void 0!==e.toBlob)return new Promise((n=>e.toBlob(n,t)));let n;return"image/jpeg"===t?n=.92:"image/webp"===t&&(n=.8),e.convertToBlob({type:t,quality:n})}class Ci{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,r=i.buffers,s=i.json;n=i.options;const o=i.extensionsUsed,a=new Blob(r,{type:"application/octet-stream"}),l=Object.keys(o);if(l.length>0&&(s.extensionsUsed=l),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=a.size),!0===n.binary){const e=new FileReader;e.readAsArrayBuffer(a),e.onloadend=function(){const n=Si(e.result),i=new DataView(new ArrayBuffer(8));i.setUint32(0,n.byteLength,!0),i.setUint32(4,5130562,!0);const r=Si((o=JSON.stringify(s),(new TextEncoder).encode(o).buffer),32);var o;const a=new DataView(new ArrayBuffer(8));a.setUint32(0,r.byteLength,!0),a.setUint32(4,1313821514,!0);const l=new ArrayBuffer(12),c=new DataView(l);c.setUint32(0,1179937895,!0),c.setUint32(4,2,!0);const u=12+a.byteLength+r.byteLength+i.byteLength+n.byteLength;c.setUint32(8,u,!0);const h=new Blob([l,a,r,i,n],{type:"application/octet-stream"}),d=new FileReader;d.readAsArrayBuffer(h),d.onloadend=function(){t(d.result)}}}else if(s.buffers&&s.buffers.length>0){const e=new FileReader;e.readAsDataURL(a),e.onloadend=function(){const n=e.result;s.buffers[0].uri=n,t(s)}}else t(s)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;const n=this.options,i=this.extensionsUsed;try{const r=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&r.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(const e in r.gltfExtensions)t.extensions[e]=r.gltfExtensions[e],i[e]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(t.extras=r)}catch(t){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+t.message)}}getUID(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!1===this.uids.has(e)){const t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new t;for(let t=0,i=e.count;t<i;t++)if(Math.abs(n.fromBufferAttribute(e,t).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const i=e.clone(),r=new t;for(let e=0,t=i.count;e<t;e++)r.fromBufferAttribute(i,e),0===r.x&&0===r.y&&0===r.z?r.setX(1):r.normalize(),i.setXYZ(e,r.x,r.y,r.z);return n.attributesNormalized.set(e,i),i}applyTextureTransform(e,t){let n=!1;const i={};0===t.offset.x&&0===t.offset.y||(i.offset=t.offset.toArray(),n=!0),0!==t.rotation&&(i.rotation=t.rotation,n=!0),1===t.repeat.x&&1===t.repeat.y||(i.scale=t.repeat.toArray(),n=!0),n&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=i,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,t){if(e===t)return e;function n(e){return e.encoding===I?function(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}:function(e){return e}}console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.");const i=e?e.image:null,r=t?t.image:null,s=Math.max(i?i.width:0,r?r.width:0),o=Math.max(i?i.height:0,r?r.height:0),a=Ei();a.width=s,a.height=o;const l=a.getContext("2d");l.fillStyle="#00ffff",l.fillRect(0,0,s,o);const h=l.getImageData(0,0,s,o);if(i){l.drawImage(i,0,0,s,o);const t=n(e),r=l.getImageData(0,0,s,o).data;for(let e=2;e<r.length;e+=4)h.data[e]=256*t(r[e]/256)}if(r){l.drawImage(r,0,0,s,o);const e=n(t),i=l.getImageData(0,0,s,o).data;for(let t=1;t<i.length;t+=4)h.data[t]=256*e(i[t]/256)}l.putImageData(h,0,0);const d=(e||t).clone();return d.source=new c(a),d.encoding=u,d}processBuffer(e){const t=this.json,n=this.buffers;return t.buffers||(t.buffers=[{byteLength:0}]),n.push(e),0}processBufferView(e,t,n,i,r){const s=this.json;let o;s.bufferViews||(s.bufferViews=[]),o=t===ri?1:t===si?2:4;const a=Ti(i*e.itemSize*o),l=new DataView(new ArrayBuffer(a));let c=0;for(let r=n;r<n+i;r++)for(let n=0;n<e.itemSize;n++){let i;e.itemSize>4?i=e.array[r*e.itemSize+n]:(0===n?i=e.getX(r):1===n?i=e.getY(r):2===n?i=e.getZ(r):3===n&&(i=e.getW(r)),!0===e.normalized&&(i=h.normalize(i,e.array))),t===oi?l.setFloat32(c,i,!0):t===ai?l.setUint32(c,i,!0):t===si?l.setUint16(c,i,!0):t===ri&&l.setUint8(c,i),c+=o}const u={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:a};void 0!==r&&(u.target=r),r===li&&(u.byteStride=e.itemSize*o),this.byteOffset+=a,s.bufferViews.push(u);return{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const t=this,n=t.json;return n.bufferViews||(n.bufferViews=[]),new Promise((function(i){const r=new FileReader;r.readAsArrayBuffer(e),r.onloadend=function(){const e=Si(r.result),s={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,i(n.bufferViews.push(s)-1)}}))}processAccessor(e,t,n,i){const r=this.json;let s;if(e.array.constructor===Float32Array)s=oi;else if(e.array.constructor===Uint32Array)s=ai;else if(e.array.constructor===Uint16Array)s=si;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");s=ri}if(void 0===n&&(n=0),void 0===i&&(i=e.count),0===i)return null;const o=function(e,t,n){const i={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let r=t;r<t+n;r++)for(let t=0;t<e.itemSize;t++){let n;e.itemSize>4?n=e.array[r*e.itemSize+t]:(0===t?n=e.getX(r):1===t?n=e.getY(r):2===t?n=e.getZ(r):3===t&&(n=e.getW(r)),!0===e.normalized&&(n=h.normalize(n,e.array))),i.min[t]=Math.min(i.min[t],n),i.max[t]=Math.max(i.max[t],n)}return i}(e,n,i);let a;void 0!==t&&(a=e===t.index?ci:li);const l=this.processBufferView(e,s,n,i,a),c={bufferView:l.id,byteOffset:l.byteOffset,componentType:s,count:i,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(c.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(c)-1}processImage(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"image/png";if(null!==e){const r=this,s=r.cache,a=r.json,l=r.options,c=r.pending;s.images.has(e)||s.images.set(e,{});const u=s.images.get(e),h=i+":flipY/"+n.toString();if(void 0!==u[h])return u[h];a.images||(a.images=[]);const d={mimeType:i},f=Ei();f.width=Math.min(e.width,l.maxTextureSize),f.height=Math.min(e.height,l.maxTextureSize);const p=f.getContext("2d");if(!0===n&&(p.translate(0,f.height),p.scale(1,-1)),void 0!==e.data){t!==o&&console.error("GLTFExporter: Only RGBAFormat is supported."),(e.width>l.maxTextureSize||e.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const n=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;t<n.length;t+=4)n[t+0]=e.data[t+0],n[t+1]=e.data[t+1],n[t+2]=e.data[t+2],n[t+3]=e.data[t+3];p.putImageData(new ImageData(n,e.width,e.height),0,0)}else p.drawImage(e,0,0,f.width,f.height);!0===l.binary?c.push(Di(f,i).then((e=>r.processBufferViewImage(e))).then((e=>{d.bufferView=e}))):void 0!==f.toDataURL?d.uri=f.toDataURL(i):c.push(Di(f,i).then((e=>(new FileReader).readAsDataURL(e))).then((e=>{d.uri=e})));const g=a.images.push(d)-1;return u[h]=g,g}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const t=this.json;t.samplers||(t.samplers=[]);const n={magFilter:wi[e.magFilter],minFilter:wi[e.minFilter],wrapS:wi[e.wrapS],wrapT:wi[e.wrapT]};return t.samplers.push(n)-1}processTexture(e){const t=this.cache,n=this.json;if(t.textures.has(e))return t.textures.get(e);n.textures||(n.textures=[]);let i=e.userData.mimeType;"image/webp"===i&&(i="image/png");const r={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,i)};e.name&&(r.name=e.name),this._invokeAll((function(t){t.writeTexture&&t.writeTexture(e,r)}));const s=n.textures.push(r)-1;return t.textures.set(e,s),s}processMaterial(e){const t=this.cache,n=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;n.materials||(n.materials=[]);const i={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const r=e.color.toArray().concat([e.opacity]);if(Ai(r,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=r),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),n={index:this.processTexture(t)};this.applyTextureTransform(n,t),i.pbrMetallicRoughness.metallicRoughnessTexture=n}if(e.map){const t={index:this.processTexture(e.map)};this.applyTextureTransform(t,e.map),i.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){const t=e.emissive.clone().multiplyScalar(e.emissiveIntensity),n=Math.max(t.r,t.g,t.b);if(n>1&&(t.multiplyScalar(1/n),console.warn("THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited")),n>0&&(i.emissiveFactor=t.toArray()),e.emissiveMap){const t={index:this.processTexture(e.emissiveMap)};this.applyTextureTransform(t,e.emissiveMap),i.emissiveTexture=t}}if(e.normalMap){const t={index:this.processTexture(e.normalMap)};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),i.normalTexture=t}if(e.aoMap){const t={index:this.processTexture(e.aoMap),texCoord:1};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),i.occlusionTexture=t}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===d&&(i.doubleSided=!0),""!==e.name&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll((function(t){t.writeMaterial&&t.writeMaterial(e,i)}));const s=n.materials.push(i)-1;return t.materials.set(e,s),s}processMesh(e){const t=this.cache,n=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,n=e.material.length;t<n;t++)i.push(e.material[t].uuid);else i.push(e.material.uuid);const r=i.join(":");if(t.meshes.has(r))return t.meshes.get(r);const s=e.geometry;let o;o=e.isLineSegments?ei:e.isLineLoop?ti:e.isLine?ni:e.isPoints?$n:e.material.wireframe?ei:ii;const a={},l={},c=[],u=[],h={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=s.getAttribute("normal");void 0===d||this.isNormalizedNormalAttribute(d)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),s.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let p=null;for(let e in s.attributes){if("morph"===e.slice(0,5))continue;const n=s.attributes[e];e=h[e]||e.toUpperCase();if(/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||(e="_"+e),t.attributes.has(this.getUID(n))){l[e]=t.attributes.get(this.getUID(n));continue}p=null;const i=n.array;"JOINTS_0"!==e||i instanceof Uint16Array||i instanceof Uint8Array||(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),p=new f(new Uint16Array(i),n.itemSize,n.normalized));const r=this.processAccessor(p||n,s);null!==r&&(l[e]=r,t.attributes.set(this.getUID(n),r))}if(void 0!==d&&s.setAttribute("normal",d),0===Object.keys(l).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){const n=[],i=[],r={};if(void 0!==e.morphTargetDictionary)for(const t in e.morphTargetDictionary)r[e.morphTargetDictionary[t]]=t;for(let o=0;o<e.morphTargetInfluences.length;++o){const a={};let l=!1;for(const e in s.morphAttributes){if("position"!==e&&"normal"!==e){l||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),l=!0);continue}const n=s.morphAttributes[e][o],i=e.toUpperCase(),r=s.attributes[e];if(t.attributes.has(this.getUID(n,!0))){a[i]=t.attributes.get(this.getUID(n,!0));continue}const c=n.clone();if(!s.morphTargetsRelative)for(let e=0,t=n.count;e<t;e++)for(let t=0;t<n.itemSize;t++)0===t&&c.setX(e,n.getX(e)-r.getX(e)),1===t&&c.setY(e,n.getY(e)-r.getY(e)),2===t&&c.setZ(e,n.getZ(e)-r.getZ(e)),3===t&&c.setW(e,n.getW(e)-r.getW(e));a[i]=this.processAccessor(c,s),t.attributes.set(this.getUID(r,!0),a[i])}u.push(a),n.push(e.morphTargetInfluences[o]),void 0!==e.morphTargetDictionary&&i.push(r[o])}a.weights=n,i.length>0&&(a.extras={},a.extras.targetNames=i)}const g=Array.isArray(e.material);if(g&&0===s.groups.length)return null;const m=g?e.material:[e.material],v=g?s.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,n=v.length;e<n;e++){const n={mode:o,attributes:l};if(this.serializeUserData(s,n),u.length>0&&(n.targets=u),null!==s.index){let i=this.getUID(s.index);void 0===v[e].start&&void 0===v[e].count||(i+=":"+v[e].start+":"+v[e].count),t.attributes.has(i)?n.indices=t.attributes.get(i):(n.indices=this.processAccessor(s.index,s,v[e].start,v[e].count),t.attributes.set(i,n.indices)),null===n.indices&&delete n.indices}const i=this.processMaterial(m[v[e].materialIndex]);null!==i&&(n.material=i),c.push(n)}a.primitives=c,n.meshes||(n.meshes=[]),this._invokeAll((function(t){t.writeMesh&&t.writeMesh(e,a)}));const y=n.meshes.push(a)-1;return t.meshes.set(r,y),y}processCamera(e){const t=this.json;t.cameras||(t.cameras=[]);const n=e.isOrthographicCamera,i={type:n?"orthographic":"perspective"};return n?i.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:h.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(i.name=e.type),t.cameras.push(i)-1}processAnimation(e,t){const n=this.json,i=this.nodeMap;n.animations||(n.animations=[]);const r=(e=Jn.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,s=[],o=[];for(let e=0;e<r.length;++e){const n=r[e],a=p.parseTrackName(n.name);let l=p.findNode(t,a.nodeName);const c=bi[a.propertyName];if("bones"===a.objectName&&(l=!0===l.isSkinnedMesh?l.skeleton.getBoneByName(a.objectIndex):void 0),!l||!c)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',n.name),null;const u=1;let h,d=n.values.length/n.times.length;c===bi.morphTargetInfluences&&(d/=l.morphTargetInfluences.length),!0===n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(h="CUBICSPLINE",d/=3):h=n.getInterpolation()===g?"STEP":"LINEAR",o.push({input:this.processAccessor(new f(n.times,u)),output:this.processAccessor(new f(n.values,d)),interpolation:h}),s.push({sampler:o.length-1,target:{node:i.get(l),path:c}})}return n.animations.push({name:e.name||"clip_"+n.animations.length,samplers:o,channels:s}),n.animations.length-1}processSkin(e){const t=this.json,n=this.nodeMap,i=t.nodes[n.get(e)],r=e.skeleton;if(void 0===r)return null;const s=e.skeleton.bones[0];if(void 0===s)return null;const o=[],a=new Float32Array(16*r.bones.length),l=new m;for(let t=0;t<r.bones.length;++t)o.push(n.get(r.bones[t])),l.copy(r.boneInverses[t]),l.multiply(e.bindMatrix).toArray(a,16*t);void 0===t.skins&&(t.skins=[]),t.skins.push({inverseBindMatrices:this.processAccessor(new f(a,16)),joints:o,skeleton:n.get(s)});return i.skin=t.skins.length-1}processNode(e){const t=this.json,n=this.options,i=this.nodeMap;t.nodes||(t.nodes=[]);const r={};if(n.trs){const t=e.quaternion.toArray(),n=e.position.toArray(),i=e.scale.toArray();Ai(t,[0,0,0,1])||(r.rotation=t),Ai(n,[0,0,0])||(r.translation=n),Ai(i,[1,1,1])||(r.scale=i)}else e.matrixAutoUpdate&&e.updateMatrix(),!1===Ai(e.matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])&&(r.matrix=e.matrix.elements);if(""!==e.name&&(r.name=String(e.name)),this.serializeUserData(e,r),e.isMesh||e.isLine||e.isPoints){const t=this.processMesh(e);null!==t&&(r.mesh=t)}else e.isCamera&&(r.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){const t=[];for(let i=0,r=e.children.length;i<r;i++){const r=e.children[i];if(r.visible||!1===n.onlyVisible){const e=this.processNode(r);null!==e&&t.push(e)}}t.length>0&&(r.children=t)}this._invokeAll((function(t){t.writeNode&&t.writeNode(e,r)}));const s=t.nodes.push(r)-1;return i.set(e,s),s}processScene(e){const t=this.json,n=this.options;t.scenes||(t.scenes=[],t.scene=0);const i={};""!==e.name&&(i.name=e.name),t.scenes.push(i);const r=[];for(let t=0,i=e.children.length;t<i;t++){const i=e.children[t];if(i.visible||!1===n.onlyVisible){const e=this.processNode(i);null!==e&&r.push(e)}}r.length>0&&(i.nodes=r),this.serializeUserData(e,i)}processObjects(e){const t=new v;t.name="AuxScene";for(let n=0;n<e.length;n++)t.children.push(e[n]);this.processScene(t)}processInput(e){const t=this.options;e=e instanceof Array?e:[e],this._invokeAll((function(t){t.beforeParse&&t.beforeParse(e)}));const n=[];for(let t=0;t<e.length;t++)e[t]instanceof v?this.processScene(e[t]):n.push(e[t]);n.length>0&&this.processObjects(n);for(let e=0;e<this.skins.length;++e)this.processSkin(this.skins[e]);for(let n=0;n<t.animations.length;++n)this.processAnimation(t.animations[n],e[0]);this._invokeAll((function(t){t.afterParse&&t.afterParse(e)}))}_invokeAll(e){for(let t=0,n=this.plugins.length;t<n;t++)e(this.plugins[t])}}class Ii{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,t){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight)return void console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);const n=this.writer,i=n.json,r=n.extensionsUsed,s={};e.name&&(s.name=e.name),s.color=e.color.toArray(),s.intensity=e.intensity,e.isDirectionalLight?s.type="directional":e.isPointLight?(s.type="point",e.distance>0&&(s.range=e.distance)):e.isSpotLight&&(s.type="spot",e.distance>0&&(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,s.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),!e.target||e.target.parent===e&&0===e.target.position.x&&0===e.target.position.y&&-1===e.target.position.z||console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),r[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},r[this.name]=!0);const o=i.extensions[this.name].lights;o.push(s),t.extensions=t.extensions||{},t.extensions[this.name]={light:o.length-1}}}let Mi=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},Bi=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;const n=this.writer,i=n.extensionsUsed,r={};if(r.clearcoatFactor=e.clearcoat,e.clearcoatMap){const t={index:n.processTexture(e.clearcoatMap)};n.applyTextureTransform(t,e.clearcoatMap),r.clearcoatTexture=t}if(r.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const t={index:n.processTexture(e.clearcoatRoughnessMap)};n.applyTextureTransform(t,e.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){const t={index:n.processTexture(e.clearcoatNormalMap)};n.applyTextureTransform(t,e.clearcoatNormalMap),r.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}},Ri=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;const n=this.writer,i=n.extensionsUsed,r={};if(r.iridescenceFactor=e.iridescence,e.iridescenceMap){const t={index:n.processTexture(e.iridescenceMap)};n.applyTextureTransform(t,e.iridescenceMap),r.iridescenceTexture=t}if(r.iridescenceIor=e.iridescenceIOR,r.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const t={index:n.processTexture(e.iridescenceThicknessMap)};n.applyTextureTransform(t,e.iridescenceThicknessMap),r.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}},Pi=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const n=this.writer,i=n.extensionsUsed,r={};if(r.transmissionFactor=e.transmission,e.transmissionMap){const t={index:n.processTexture(e.transmissionMap)};n.applyTextureTransform(t,e.transmissionMap),r.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}},Oi=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const n=this.writer,i=n.extensionsUsed,r={};if(r.thicknessFactor=e.thickness,e.thicknessMap){const t={index:n.processTexture(e.thicknessMap)};n.applyTextureTransform(t,e.thicknessMap),r.thicknessTexture=t}r.attenuationDistance=e.attenuationDistance,r.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}},_i=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;const n=this.writer.extensionsUsed,i={};i.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=i,n[this.name]=!0}},Li=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(xi)&&!e.specularIntensityMap&&!e.specularColorTexture)return;const n=this.writer,i=n.extensionsUsed,r={};if(e.specularIntensityMap){const t={index:n.processTexture(e.specularIntensityMap)};n.applyTextureTransform(t,e.specularIntensityMap),r.specularTexture=t}if(e.specularColorMap){const t={index:n.processTexture(e.specularColorMap)};n.applyTextureTransform(t,e.specularColorMap),r.specularColorTexture=t}r.specularFactor=e.specularIntensity,r.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}};Jn.Utils={insertKeyframe:function(e,t){const n=.001,i=e.getValueSize(),r=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+i),o=e.createInterpolant(new e.ValueBufferType(i));let a;if(0===e.times.length){r[0]=t;for(let e=0;e<i;e++)s[e]=0;a=0}else if(t<e.times[0]){if(Math.abs(e.times[0]-t)<n)return 0;r[0]=t,r.set(e.times,1),s.set(o.evaluate(t),0),s.set(e.values,i),a=0}else if(t>e.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<n)return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),s.set(e.values,0),s.set(o.evaluate(t),e.values.length),a=r.length-1}else for(let l=0;l<e.times.length;l++){if(Math.abs(e.times[l]-t)<n)return l;if(e.times[l]<t&&e.times[l+1]>t){r.set(e.times.slice(0,l+1),0),r[l+1]=t,r.set(e.times.slice(l+1),l+2),s.set(e.values.slice(0,(l+1)*i),0),s.set(o.evaluate(t),(l+1)*i),s.set(e.values.slice((l+1)*i),(l+2)*i),a=l+1;break}}return e.times=r,e.values=s,a},mergeMorphTargetTracks:function(e,t){const n=[],i={},r=e.tracks;for(let e=0;e<r.length;++e){let s=r[e];const o=p.parseTrackName(s.name),a=p.findNode(t,o.nodeName);if("morphTargetInfluences"!==o.propertyName||void 0===o.propertyIndex){n.push(s);continue}if(s.createInterpolant!==s.InterpolantFactoryMethodDiscrete&&s.createInterpolant!==s.InterpolantFactoryMethodLinear){if(s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),s=s.clone(),s.setInterpolation(y)}const l=a.morphTargetInfluences.length,c=a.morphTargetDictionary[o.propertyIndex];if(void 0===c)throw new Error("THREE.GLTFExporter: Morph target name not found: "+o.propertyIndex);let u;if(void 0===i[a.uuid]){u=s.clone();const e=new u.ValueBufferType(l*u.times.length);for(let t=0;t<u.times.length;t++)e[t*l+c]=u.values[t];u.name=(o.nodeName||"")+".morphTargetInfluences",u.values=e,i[a.uuid]=u,n.push(u);continue}const h=s.createInterpolant(new s.ValueBufferType(1));u=i[a.uuid];for(let e=0;e<u.times.length;e++)u.values[e*l+c]=h.evaluate(u.times[e]);for(let e=0;e<s.times.length;e++){const t=this.insertKeyframe(u,s.times[e]);u.values[t*l+c]=s.values[e]}}return e.tracks=n,e}};const ki=Object.prototype.hasOwnProperty,Ni=e=>"String"===Gi(e),Ui=e=>"Boolean"===Gi(e),Fi=e=>"Number"===Gi(e),ji=Array.isArray,zi=e=>"Object"===Gi(e),Hi=e=>"Function"===Gi(e),Gi=e=>Object.prototype.toString.call(e).slice(8,-1),Vi=(e,t,n)=>String.fromCodePoint(...new Uint8Array(e,t,n)),Yi=()=>gn+Math.random().toString(36).substring(7).split("").join("_"),Wi=e=>{var t;const{pathname:n}=new URL(e,location.origin);return null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase()};var Xi=Object.freeze({__proto__:null,IVector3ToEuler:bn,IVector3ToVector3:wn,MinHeap:In,cloneDeep:Pn,cloneMaterials:_n,deg2Euler:Sn,disposeMaterials:Ln,error:e=>{console.error(mn+e)},euler2Deg:function(e){return e/(Math.PI/180)},exportGltf:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((n,i)=>{(new Jn).parse(e,(e=>n(e)),(e=>i(e)),t)}))},fetchFile:Qn,getAsciiString:Vi,getBoundingBox:xn,getCubeTexture:Mn,getExtension:Wi,getSpaceAttributeFromObject:En,getValueType:Gi,gradientTexture:Bn,hasOwn:(e,t)=>ki.call(e,t),idleTask:Kn,isArray:ji,isBoolean:Ui,isDate:e=>"Date"===Gi(e),isFunction:Hi,isNull:e=>"Null"===Gi(e),isNumber:Fi,isObject:zi,isObjectVisible:Cn,isPromise:e=>"Promise"===Gi(e),isString:Ni,isSymbol:e=>"Symbol"===Gi(e),isUndefined:e=>"Undefined"===Gi(e),log:vn,materialHandle:On,parseFilePath:Rn,randomString:Yi,rotationAFix:Tn,rotationAxisFix:An,sleep:e=>new Promise((t=>setTimeout((()=>t()),e))),syncSpaceAttributeToObject:Dn,warn:yn,xmlToJson:qn});const Qi={"Linear.None":$t.Linear.None,"Quadratic.In":$t.Quadratic.In,"Quadratic.Out":$t.Quadratic.Out,"Quadratic.InOut":$t.Quadratic.InOut,"Cubic.In":$t.Cubic.In,"Cubic.Out":$t.Cubic.Out,"Cubic.InOut":$t.Cubic.InOut,"Quartic.In":$t.Quartic.In,"Quartic.Out":$t.Quartic.Out,"Quartic.InOut":$t.Quartic.InOut,"Quintic.In":$t.Quintic.In,"Quintic.Out":$t.Quintic.Out,"Quintic.InOut":$t.Quintic.InOut,"Sinusoidal.In":$t.Sinusoidal.In,"Sinusoidal.Out":$t.Sinusoidal.Out,"Sinusoidal.InOut":$t.Sinusoidal.InOut,"Exponential.In":$t.Exponential.In,"Exponential.Out":$t.Exponential.Out,"Exponential.InOut":$t.Exponential.InOut,"Circular.In":$t.Circular.In,"Circular.Out":$t.Circular.Out,"Circular.InOut":$t.Circular.InOut,"Elastic.In":$t.Elastic.In,"Elastic.Out":$t.Elastic.Out,"Elastic.InOut":$t.Elastic.InOut,"Back.In":$t.Back.In,"Back.Out":$t.Back.Out,"Back.InOut":$t.Back.InOut,"Bounce.In":$t.Bounce.In,"Bounce.Out":$t.Bounce.Out,"Bounce.InOut":$t.Bounce.InOut};function Ki(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;return new Promise(((o,a)=>{const{duration:l=1e3,delay:c=0,repeat:u=!1,mode:h="Linear.None",yoyo:d=!1}=i,f=Qi[h],p=new on(e).to(t,l).easing(f).delay(c).onUpdate((i=>{e instanceof n&&t instanceof n&&i instanceof n&&(i.order=t.order),null==r||r(i,p)})).onComplete((()=>{o()})).onStop((()=>{a("animation stop")})).onStart((()=>{null==s||s(p)}));Fi(u)?p.repeat(u):Ui(u)&&u&&p.repeat(1/0),p.yoyo(d),p.start()}))}class Zi{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.target=e,this.points=t,this.speed=1,this.reverse=!1,this.needsRotate=!0,this.index=1,this._tween=null,Object.assign(this,n)}get isPlaying(){var e;return!!(null===(e=this._tween)||void 0===e?void 0:e.isPlaying())}play(){return Fn(this,void 0,void 0,(function*(){if(this.isPlaying)return!1;this.index=1;let e=this.points.slice();return this.reverse&&(e=e.reverse()),this._play(e)}))}_play(e){var t,n;return Fn(this,void 0,void 0,(function*(){const{target:i}=this,r=null!==(t=this.speed)&&void 0!==t?t:1,s=this.index;let o=e[s-1];if(!o)return!0;o.isVector3||(o=wn(o)),o=o.clone();let a=e[s];if(!a)return!0;a.isVector3||(a=wn(a).clone()),a=a.clone();const l=o.distanceTo(a)/r;this.needsRotate&&(1===s&&i.parent&&i.position.copy(i.parent.worldToLocal(o.clone())),i.lookAt(a)),yield Ki(o,a,{duration:l},((e,t)=>{var n;if(i.parent){const t=i.parent.worldToLocal(e.clone());i.position.copy(t)}null===(n=this.onUpdate)||void 0===n||n.call(this,e,t)}),(e=>{var t,n;1===s&&(null===(t=this.onStart)||void 0===t||t.call(this,e)),null===(n=this.onEveryStart)||void 0===n||n.call(this,e),this._tween=e})),null===(n=this.onPoint)||void 0===n||n.call(this,s,a),this.index++,yield this._play(e)}))}pause(){var e;null===(e=this._tween)||void 0===e||e.pause()}resume(){var e;null===(e=this._tween)||void 0===e||e.resume()}stop(){var e;null===(e=this._tween)||void 0===e||e.stop(),this._tween=null}}const qi=0,Ji=1,$i=2,er=2,tr=1.25,nr=1,ir=32,rr=65535,sr=Math.pow(2,-24);class or{constructor(){}}function ar(e,t,n){return n.min.x=t[e],n.min.y=t[e+1],n.min.z=t[e+2],n.max.x=t[e+3],n.max.y=t[e+4],n.max.z=t[e+5],n}function lr(e){let t=-1,n=-1/0;for(let i=0;i<3;i++){const r=e[i+3]-e[i];r>n&&(n=r,t=i)}return t}function cr(e,t){t.set(e)}function ur(e,t,n){let i,r;for(let s=0;s<3;s++){const o=s+3;i=e[s],r=t[s],n[s]=i<r?i:r,i=e[o],r=t[o],n[o]=i>r?i:r}}function hr(e,t,n){for(let i=0;i<3;i++){const r=t[e+2*i],s=t[e+2*i+1],o=r-s,a=r+s;o<n[i]&&(n[i]=o),a>n[i+3]&&(n[i+3]=a)}}function dr(e){const t=e[3]-e[0],n=e[4]-e[1],i=e[5]-e[2];return 2*(t*n+n*i+i*t)}function fr(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=1/0,o=1/0,a=1/0,l=-1/0,c=-1/0,u=-1/0,h=1/0,d=1/0,f=1/0,p=-1/0,g=-1/0,m=-1/0;const v=null!==r;for(let i=6*t,r=6*(t+n);i<r;i+=6){const t=e[i+0],n=e[i+1],r=t-n,y=t+n;r<s&&(s=r),y>l&&(l=y),v&&t<h&&(h=t),v&&t>p&&(p=t);const w=e[i+2],b=e[i+3],x=w-b,A=w+b;x<o&&(o=x),A>c&&(c=A),v&&w<d&&(d=w),v&&w>g&&(g=w);const T=e[i+4],S=e[i+5],E=T-S,D=T+S;E<a&&(a=E),D>u&&(u=D),v&&T<f&&(f=T),v&&T>m&&(m=T)}i[0]=s,i[1]=o,i[2]=a,i[3]=l,i[4]=c,i[5]=u,v&&(r[0]=h,r[1]=d,r[2]=f,r[3]=p,r[4]=g,r[5]=m)}const pr=32,gr=(e,t)=>e.candidate-t.candidate,mr=new Array(pr).fill().map((()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}))),vr=new Float32Array(6);function yr(e,t){function n(e){d&&d(e/p)}function i(t,r,d){let f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!g&&p>=l&&(g=!0,c&&(console.warn(`MeshBVH: Max depth of ${l} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),d<=u||p>=l)return n(r+d),t.offset=r,t.count=d,t;const m=function(e,t,n,i,r,s){let o=-1,a=0;if(s===qi)o=lr(t),-1!==o&&(a=(t[o]+t[o+3])/2);else if(s===Ji)o=lr(e),-1!==o&&(a=function(e,t,n,i){let r=0;for(let s=t,o=t+n;s<o;s++)r+=e[6*s+2*i];return r/n}(n,i,r,o));else if(s===$i){const s=dr(e);let l=tr*r;const c=6*i,u=6*(i+r);for(let e=0;e<3;e++){const i=t[e],h=(t[e+3]-i)/pr;if(r<pr/4){const t=[...mr];t.length=r;let i=0;for(let r=c;r<u;r+=6,i++){const s=t[i];s.candidate=n[r+2*e],s.count=0;const{bounds:o,leftCacheBounds:a,rightCacheBounds:l}=s;for(let e=0;e<3;e++)l[e]=1/0,l[e+3]=-1/0,a[e]=1/0,a[e+3]=-1/0,o[e]=1/0,o[e+3]=-1/0;hr(r,n,o)}t.sort(gr);let h=r;for(let e=0;e<h;e++){const n=t[e];for(;e+1<h&&t[e+1].candidate===n.candidate;)t.splice(e+1,1),h--}for(let i=c;i<u;i+=6){const r=n[i+2*e];for(let e=0;e<h;e++){const s=t[e];r>=s.candidate?hr(i,n,s.rightCacheBounds):(hr(i,n,s.leftCacheBounds),s.count++)}}for(let n=0;n<h;n++){const i=t[n],c=i.count,u=r-i.count,h=i.leftCacheBounds,d=i.rightCacheBounds;let f=0;0!==c&&(f=dr(h)/s);let p=0;0!==u&&(p=dr(d)/s);const g=nr+tr*(f*c+p*u);g<l&&(o=e,l=g,a=i.candidate)}}else{for(let e=0;e<pr;e++){const t=mr[e];t.count=0,t.candidate=i+h+e*h;const n=t.bounds;for(let e=0;e<3;e++)n[e]=1/0,n[e+3]=-1/0}for(let t=c;t<u;t+=6){let r=~~((n[t+2*e]-i)/h);r>=pr&&(r=pr-1);const s=mr[r];s.count++,hr(t,n,s.bounds)}const t=mr[pr-1];cr(t.bounds,t.rightCacheBounds);for(let e=pr-2;e>=0;e--){const t=mr[e],n=mr[e+1];ur(t.bounds,n.rightCacheBounds,t.rightCacheBounds)}let d=0;for(let t=0;t<pr-1;t++){const n=mr[t],i=n.count,c=n.bounds,u=mr[t+1].rightCacheBounds;0!==i&&(0===d?cr(c,vr):ur(c,vr,vr)),d+=i;let h=0,f=0;0!==d&&(h=dr(vr)/s);const p=r-d;0!==p&&(f=dr(u)/s);const g=nr+tr*(h*d+f*p);g<l&&(o=e,l=g,a=n.candidate)}}}}else console.warn(`MeshBVH: Invalid build strategy value ${s} used.`);return{axis:o,pos:a}}(t.boundingData,f,o,r,d,h);if(-1===m.axis)return n(r+d),t.offset=r,t.count=d,t;const v=function(e,t,n,i,r){let s=n,o=n+i-1;const a=r.pos,l=2*r.axis;for(;;){for(;s<=o&&t[6*s+l]<a;)s++;for(;s<=o&&t[6*o+l]>=a;)o--;if(!(s<o))return s;for(let n=0;n<3;n++){let i=e[3*s+n];e[3*s+n]=e[3*o+n],e[3*o+n]=i;let r=t[6*s+2*n+0];t[6*s+2*n+0]=t[6*o+2*n+0],t[6*o+2*n+0]=r;let a=t[6*s+2*n+1];t[6*s+2*n+1]=t[6*o+2*n+1],t[6*o+2*n+1]=a}s++,o--}}(a,o,r,d,m);if(v===r||v===r+d)n(r+d),t.offset=r,t.count=d;else{t.splitAxis=m.axis;const e=new or,n=r,a=v-r;t.left=e,e.boundingData=new Float32Array(6),fr(o,n,a,e.boundingData,s),i(e,n,a,s,p+1);const l=new or,c=v,u=d-a;t.right=l,l.boundingData=new Float32Array(6),fr(o,c,u,l.boundingData,s),i(l,c,u,s,p+1)}return t}!function(e,t){if(!e.index){const n=e.attributes.position.count,i=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;let r;r=n>65535?new Uint32Array(new i(4*n)):new Uint16Array(new i(2*n)),e.setIndex(new f(r,1));for(let e=0;e<n;e++)r[e]=e}}(e,t);const r=new Float32Array(6),s=new Float32Array(6),o=function(e,t){const n=e.attributes.position,i=e.index.array,r=i.length/3,s=new Float32Array(6*r),o=n.normalized,a=n.array,l=n.offset||0;let c=3;n.isInterleavedBufferAttribute&&(c=n.data.stride);const u=["getX","getY","getZ"];for(let e=0;e<r;e++){const r=3*e,h=6*e;let d,f,p;o?(d=i[r+0],f=i[r+1],p=i[r+2]):(d=i[r+0]*c+l,f=i[r+1]*c+l,p=i[r+2]*c+l);for(let e=0;e<3;e++){let i,r,l;o?(i=n[u[e]](d),r=n[u[e]](f),l=n[u[e]](p)):(i=a[d+e],r=a[f+e],l=a[p+e]);let c=i;r<c&&(c=r),l<c&&(c=l);let g=i;r>g&&(g=r),l>g&&(g=l);const m=(g-c)/2,v=2*e;s[h+v+0]=c+m,s[h+v+1]=m+(Math.abs(c)+m)*sr,c<t[e]&&(t[e]=c),g>t[e+3]&&(t[e+3]=g)}}return s}(e,r),a=e.index.array,l=t.maxDepth,c=t.verbose,u=t.maxLeafTris,h=t.strategy,d=t.onProgress,p=e.index.count/3;let g=!1;const m=[],v=function(e){if(!e.groups||!e.groups.length)return[{offset:0,count:e.index.count/3}];const t=[],n=new Set;for(const t of e.groups)n.add(t.start),n.add(t.start+t.count);const i=Array.from(n.values()).sort(((e,t)=>e-t));for(let e=0;e<i.length-1;e++){const n=i[e],r=i[e+1];t.push({offset:n/3,count:(r-n)/3})}return t}(e);if(1===v.length){const e=v[0],t=new or;t.boundingData=r,function(e,t,n,i){let r=1/0,s=1/0,o=1/0,a=-1/0,l=-1/0,c=-1/0;for(let i=6*t,u=6*(t+n);i<u;i+=6){const t=e[i+0];t<r&&(r=t),t>a&&(a=t);const n=e[i+2];n<s&&(s=n),n>l&&(l=n);const u=e[i+4];u<o&&(o=u),u>c&&(c=u)}i[0]=r,i[1]=s,i[2]=o,i[3]=a,i[4]=l,i[5]=c}(o,e.offset,e.count,s),i(t,e.offset,e.count,s),m.push(t)}else for(let e of v){const t=new or;t.boundingData=new Float32Array(6),fr(o,e.offset,e.count,t.boundingData,s),i(t,e.offset,e.count,s),m.push(t)}return m}class wr{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let n=1/0,i=-1/0;for(let r=0,s=e.length;r<s;r++){const s=e[r][t];n=s<n?s:n,i=s>i?s:i}this.min=n,this.max=i}setFromPoints(e,t){let n=1/0,i=-1/0;for(let r=0,s=t.length;r<s;r++){const s=t[r],o=e.dot(s);n=o<n?o:n,i=o>i?o:i}this.min=n,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}wr.prototype.setFromBox=function(){const e=new t;return function(t,n){const i=n.min,r=n.max;let s=1/0,o=-1/0;for(let n=0;n<=1;n++)for(let a=0;a<=1;a++)for(let l=0;l<=1;l++){e.x=i.x*n+r.x*(1-n),e.y=i.y*a+r.y*(1-a),e.z=i.z*l+r.z*(1-l);const c=t.dot(e);s=Math.min(c,s),o=Math.max(c,o)}this.min=s,this.max=o}}(),function(){const e=new wr}();const br=function(){const e=new t,n=new t,i=new t;return function(t,r,s){const o=t.start,a=e,l=r.start,c=n;i.subVectors(o,l),e.subVectors(t.end,t.start),n.subVectors(r.end,r.start);const u=i.dot(c),h=c.dot(a),d=c.dot(c),f=i.dot(a),p=a.dot(a)*d-h*h;let g,m;g=0!==p?(u*h-f*d)/p:0,m=(u+g*h)/d,s.x=g,s.y=m}}(),xr=function(){const e=new M,n=new t,i=new t;return function(t,r,s,o){br(t,r,e);let a=e.x,l=e.y;if(a>=0&&a<=1&&l>=0&&l<=1)return t.at(a,s),void r.at(l,o);if(a>=0&&a<=1)return l<0?r.at(0,o):r.at(1,o),void t.closestPointToPoint(o,!0,s);if(l>=0&&l<=1)return a<0?t.at(0,s):t.at(1,s),void r.closestPointToPoint(s,!0,o);{let e,c;e=a<0?t.start:t.end,c=l<0?r.start:r.end;const u=n,h=i;return t.closestPointToPoint(c,!0,n),r.closestPointToPoint(e,!0,i),u.distanceToSquared(c)<=h.distanceToSquared(e)?(s.copy(u),void o.copy(c)):(s.copy(e),void o.copy(h))}}}(),Ar=function(){const e=new t,n=new t,i=new B,r=new R;return function(t,s){const{radius:o,center:a}=t,{a:l,b:c,c:u}=s;r.start=l,r.end=c;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;r.start=l,r.end=u;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;r.start=c,r.end=u;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;const h=s.getPlane(i);if(Math.abs(h.distanceToPoint(a))<=o){const e=h.projectPoint(a,n);if(s.containsPoint(e))return!0}return!1}}(),Tr=1e-15;function Sr(e){return Math.abs(e)<Tr}class Er extends P{constructor(){super(...arguments),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map((()=>new t)),this.satBounds=new Array(4).fill().map((()=>new wr)),this.points=[this.a,this.b,this.c],this.sphere=new O,this.plane=new B,this.needsUpdate=!0}intersectsSphere(e){return Ar(e,this)}update(){const e=this.a,t=this.b,n=this.c,i=this.points,r=this.satAxes,s=this.satBounds,o=r[0],a=s[0];this.getNormal(o),a.setFromPoints(o,i);const l=r[1],c=s[1];l.subVectors(e,t),c.setFromPoints(l,i);const u=r[2],h=s[2];u.subVectors(t,n),h.setFromPoints(u,i);const d=r[3],f=s[3];d.subVectors(n,e),f.setFromPoints(d,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}Er.prototype.closestPointToSegment=function(){const e=new t,n=new t,i=new R;return function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{start:o,end:a}=t,l=this.points;let c,u=1/0;for(let o=0;o<3;o++){const a=(o+1)%3;i.start.copy(l[o]),i.end.copy(l[a]),xr(i,t,e,n),c=e.distanceToSquared(n),c<u&&(u=c,r&&r.copy(e),s&&s.copy(n))}return this.closestPointToPoint(o,e),c=o.distanceToSquared(e),c<u&&(u=c,r&&r.copy(e),s&&s.copy(o)),this.closestPointToPoint(a,e),c=a.distanceToSquared(e),c<u&&(u=c,r&&r.copy(e),s&&s.copy(a)),Math.sqrt(u)}}(),Er.prototype.intersectsTriangle=function(){const e=new Er,n=new Array(3),i=new Array(3),r=new wr,s=new wr,o=new t,a=new t,l=new t,c=new t,u=new R,h=new R,d=new R;return function(t){let f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.needsUpdate&&this.update(),t.isExtendedTriangle?t.needsUpdate&&t.update():(e.copy(t),e.update(),t=e);const g=this.plane,m=t.plane;if(Math.abs(g.normal.dot(m.normal))>1-1e-10){const e=this.satBounds,a=this.satAxes;i[0]=t.a,i[1]=t.b,i[2]=t.c;for(let t=0;t<4;t++){const n=e[t],s=a[t];if(r.setFromPoints(s,i),n.isSeparated(r))return!1}const l=t.satBounds,c=t.satAxes;n[0]=this.a,n[1]=this.b,n[2]=this.c;for(let e=0;e<4;e++){const t=l[e],i=c[e];if(r.setFromPoints(i,n),t.isSeparated(r))return!1}for(let e=0;e<4;e++){const t=a[e];for(let e=0;e<4;e++){const a=c[e];if(o.crossVectors(t,a),r.setFromPoints(o,n),s.setFromPoints(o,i),r.isSeparated(s))return!1}}return f&&(p||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),f.start.set(0,0,0),f.end.set(0,0,0)),!0}{const e=this.points;let n=!1,i=0;for(let t=0;t<3;t++){const r=e[t],s=e[(t+1)%3];u.start.copy(r),u.end.copy(s),u.delta(a);const o=n?h.start:h.end,l=Sr(m.distanceToPoint(r));if(Sr(m.normal.dot(a))&&l){h.copy(u),i=2;break}if((m.intersectLine(u,o)||l)&&!Sr(o.distanceTo(s))){if(i++,n)break;n=!0}}if(1===i&&t.containsPoint(h.end))return f&&(f.start.copy(h.end),f.end.copy(h.end)),!0;if(2!==i)return!1;const r=t.points;let s=!1,o=0;for(let e=0;e<3;e++){const t=r[e],n=r[(e+1)%3];u.start.copy(t),u.end.copy(n),u.delta(l);const i=s?d.start:d.end,a=Sr(g.distanceToPoint(t));if(Sr(g.normal.dot(l))&&a){d.copy(u),o=2;break}if((g.intersectLine(u,i)||a)&&!Sr(i.distanceTo(n))){if(o++,s)break;s=!0}}if(1===o&&this.containsPoint(d.end))return f&&(f.start.copy(d.end),f.end.copy(d.end)),!0;if(2!==o)return!1;if(h.delta(a),d.delta(l),a.dot(l)<0){let e=d.start;d.start=d.end,d.end=e}const p=h.start.dot(a),v=h.end.dot(a),y=d.start.dot(a),w=d.end.dot(a);return(p===w||y===v||v<y!==p<w)&&(f&&(c.subVectors(h.start,d.start),c.dot(a)>0?f.start.copy(h.start):f.start.copy(d.start),c.subVectors(h.end,d.end),c.dot(a)<0?f.end.copy(h.end):f.end.copy(d.end)),!0)}}}(),Er.prototype.distanceToPoint=function(){const e=new t;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),Er.prototype.distanceToTriangle=function(){const e=new t,n=new t,i=["a","b","c"],r=new R,s=new R;return function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const l=o||a?r:null;if(this.intersectsTriangle(t,l))return(o||a)&&(o&&l.getCenter(o),a&&l.getCenter(a)),0;let c=1/0;for(let n=0;n<3;n++){let r;const s=i[n],l=t[s];this.closestPointToPoint(l,e),r=l.distanceToSquared(e),r<c&&(c=r,o&&o.copy(e),a&&a.copy(l));const u=this[s];t.closestPointToPoint(u,e),r=u.distanceToSquared(e),r<c&&(c=r,o&&o.copy(u),a&&a.copy(e))}for(let l=0;l<3;l++){const u=i[l],h=i[(l+1)%3];r.set(this[u],this[h]);for(let l=0;l<3;l++){const u=i[l],h=i[(l+1)%3];s.set(t[u],t[h]),xr(r,s,e,n);const d=e.distanceToSquared(n);d<c&&(c=d,o&&o.copy(e),a&&a.copy(n))}}return Math.sqrt(c)}}();class Dr{constructor(e,n,i){this.isOrientedBox=!0,this.min=new t,this.max=new t,this.matrix=new m,this.invMatrix=new m,this.points=new Array(8).fill().map((()=>new t)),this.satAxes=new Array(3).fill().map((()=>new t)),this.satBounds=new Array(3).fill().map((()=>new wr)),this.alignedSatBounds=new Array(3).fill().map((()=>new wr)),this.needsUpdate=!1,e&&this.min.copy(e),n&&this.max.copy(n),i&&this.matrix.copy(i)}set(e,t,n){this.min.copy(e),this.max.copy(t),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Dr.prototype.update=function(){const e=this.matrix,t=this.min,n=this.max,i=this.points;for(let r=0;r<=1;r++)for(let s=0;s<=1;s++)for(let o=0;o<=1;o++){const a=i[1*r|2*s|4*o];a.x=r?n.x:t.x,a.y=s?n.y:t.y,a.z=o?n.z:t.z,a.applyMatrix4(e)}const r=this.satBounds,s=this.satAxes,o=i[0];for(let e=0;e<3;e++){const t=s[e],n=r[e],a=i[1<<e];t.subVectors(o,a),n.setFromPoints(t,i)}const a=this.alignedSatBounds;a[0].setFromPointsField(i,"x"),a[1].setFromPointsField(i,"y"),a[2].setFromPointsField(i,"z"),this.invMatrix.copy(this.matrix).invert(),this.needsUpdate=!1},Dr.prototype.intersectsBox=function(){const e=new wr;return function(t){this.needsUpdate&&this.update();const n=t.min,i=t.max,r=this.satBounds,s=this.satAxes,o=this.alignedSatBounds;if(e.min=n.x,e.max=i.x,o[0].isSeparated(e))return!1;if(e.min=n.y,e.max=i.y,o[1].isSeparated(e))return!1;if(e.min=n.z,e.max=i.z,o[2].isSeparated(e))return!1;for(let n=0;n<3;n++){const i=s[n],o=r[n];if(e.setFromBox(i,t),o.isSeparated(e))return!1}return!0}}(),Dr.prototype.intersectsTriangle=function(){const e=new Er,n=new Array(3),i=new wr,r=new wr,s=new t;return function(t){this.needsUpdate&&this.update(),t.isExtendedTriangle?t.needsUpdate&&t.update():(e.copy(t),e.update(),t=e);const o=this.satBounds,a=this.satAxes;n[0]=t.a,n[1]=t.b,n[2]=t.c;for(let e=0;e<3;e++){const t=o[e],r=a[e];if(i.setFromPoints(r,n),t.isSeparated(i))return!1}const l=t.satBounds,c=t.satAxes,u=this.points;for(let e=0;e<3;e++){const t=l[e],n=c[e];if(i.setFromPoints(n,u),t.isSeparated(i))return!1}for(let e=0;e<3;e++){const t=a[e];for(let e=0;e<4;e++){const o=c[e];if(s.crossVectors(t,o),i.setFromPoints(s,n),r.setFromPoints(s,u),i.isSeparated(r))return!1}}return!0}}(),Dr.prototype.closestPointToPoint=function(e,t){return this.needsUpdate&&this.update(),t.copy(e).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix),t},Dr.prototype.distanceToPoint=function(){const e=new t;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),Dr.prototype.distanceToBox=function(){const e=["x","y","z"],n=new Array(12).fill().map((()=>new R)),i=new Array(12).fill().map((()=>new R)),r=new t,s=new t;return function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.needsUpdate&&this.update(),this.intersectsBox(t))return(a||l)&&(t.getCenter(s),this.closestPointToPoint(s,r),t.closestPointToPoint(r,s),a&&a.copy(r),l&&l.copy(s)),0;const c=o*o,u=t.min,h=t.max,d=this.points;let f=1/0;for(let e=0;e<8;e++){const t=d[e];s.copy(t).clamp(u,h);const n=t.distanceToSquared(s);if(n<f&&(f=n,a&&a.copy(t),l&&l.copy(s),n<c))return Math.sqrt(n)}let p=0;for(let t=0;t<3;t++)for(let r=0;r<=1;r++)for(let s=0;s<=1;s++){const o=(t+1)%3,a=(t+2)%3,l=1<<t|r<<o|s<<a,c=d[r<<o|s<<a],f=d[l];n[p].set(c,f);const g=e[t],m=e[o],v=e[a],y=i[p],w=y.start,b=y.end;w[g]=u[g],w[m]=r?u[m]:h[m],w[v]=s?u[v]:h[m],b[g]=h[g],b[m]=r?u[m]:h[m],b[v]=s?u[v]:h[m],p++}for(let e=0;e<=1;e++)for(let t=0;t<=1;t++)for(let n=0;n<=1;n++){s.x=e?h.x:u.x,s.y=t?h.y:u.y,s.z=n?h.z:u.z,this.closestPointToPoint(s,r);const i=s.distanceToSquared(r);if(i<f&&(f=i,a&&a.copy(r),l&&l.copy(s),i<c))return Math.sqrt(i)}for(let e=0;e<12;e++){const t=n[e];for(let e=0;e<12;e++){const n=i[e];xr(t,n,r,s);const o=r.distanceToSquared(s);if(o<f&&(f=o,a&&a.copy(r),l&&l.copy(s),o<c))return Math.sqrt(o)}}return Math.sqrt(f)}}();const Cr=new t,Ir=new t,Mr=new t,Br=new M,Rr=new M,Pr=new M,Or=new t;function _r(e,n,i,r,s,o,a){Cr.fromBufferAttribute(n,r),Ir.fromBufferAttribute(n,s),Mr.fromBufferAttribute(n,o);const l=function(e,t,n,i,r,s){let o;return o=s===_?e.intersectTriangle(i,n,t,!0,r):e.intersectTriangle(t,n,i,s!==d,r),null===o?null:{distance:e.origin.distanceTo(r),point:r.clone()}}(e,Cr,Ir,Mr,Or,a);if(l){i&&(Br.fromBufferAttribute(i,r),Rr.fromBufferAttribute(i,s),Pr.fromBufferAttribute(i,o),l.uv=P.getUV(Or,Cr,Ir,Mr,Br,Rr,Pr,new M));const e={a:r,b:s,c:o,normal:new t,materialIndex:0};P.getNormal(Cr,Ir,Mr,e.normal),l.face=e,l.faceIndex=r}return l}function Lr(e,t,n,i,r){const s=3*i,o=e.index.getX(s),a=e.index.getX(s+1),l=e.index.getX(s+2),c=_r(n,e.attributes.position,e.attributes.uv,o,a,l,t);return c?(c.faceIndex=i,r&&r.push(c),c):null}function kr(e,t,n){return null===e?null:(e.point.applyMatrix4(t.matrixWorld),e.distance=e.point.distanceTo(n.ray.origin),e.object=t,e.distance<n.near||e.distance>n.far?null:e)}function Nr(e,t,n,i){const r=e.a,s=e.b,o=e.c;let a=t,l=t+1,c=t+2;n&&(a=n.getX(t),l=n.getX(t+1),c=n.getX(t+2)),r.x=i.getX(a),r.y=i.getY(a),r.z=i.getZ(a),s.x=i.getX(l),s.y=i.getY(l),s.z=i.getZ(l),o.x=i.getX(c),o.y=i.getY(c),o.z=i.getZ(c)}function Ur(e,t,n,i,r,s,o){const a=n.index,l=n.attributes.position;for(let n=e,c=t+e;n<c;n++)if(Nr(o,3*n,a,l),o.needsUpdate=!0,i(o,n,r,s))return!0;return!1}class Fr{constructor(e){this._getNewPrimitive=e,this._primitives=[]}getPrimitive(){const e=this._primitives;return 0===e.length?this._getNewPrimitive():e.pop()}releasePrimitive(e){this._primitives.push(e)}}function jr(e,t){return 65535===t[e+15]}function zr(e,t){return t[e+6]}function Hr(e,t){return t[e+14]}function Gr(e){return e+8}function Vr(e,t){return t[e+6]}const Yr=new i,Wr=new t,Xr=["x","y","z"];function Qr(e,t,n,i,r){let s=2*e,o=ts,a=ns,l=is;if(jr(s,a)){!function(e,t,n,i,r,s){for(let o=i,a=i+r;o<a;o++)Lr(e,t,n,o,s)}(t,n,i,zr(e,l),Hr(s,a),r)}else{const s=Gr(e);Jr(s,o,i,Wr)&&Qr(s,t,n,i,r);const a=Vr(e,l);Jr(a,o,i,Wr)&&Qr(a,t,n,i,r)}}function Kr(e,t,n,i){let r=2*e,s=ts,o=ns,a=is;if(jr(r,o)){return function(e,t,n,i,r){let s=1/0,o=null;for(let a=i,l=i+r;a<l;a++){const i=Lr(e,t,n,a);i&&i.distance<s&&(o=i,s=i.distance)}return o}(t,n,i,zr(e,a),Hr(r,o))}{const r=function(e,t){return t[e+7]}(e,a),o=Xr[r],l=i.direction[o]>=0;let c,u;l?(c=Gr(e),u=Vr(e,a)):(c=Vr(e,a),u=Gr(e));const h=Jr(c,s,i,Wr)?Kr(c,t,n,i):null;if(h){const e=h.point[o];if(l?e<=s[u+r]:e>=s[u+r+3])return h}const d=Jr(u,s,i,Wr)?Kr(u,t,n,i):null;return h&&d?h.distance<=d.distance?h:d:h||d||null}}const Zr=function(){let e,t;const n=[],r=new Fr((()=>new i));return function(){e=r.getPrimitive(),t=r.getPrimitive(),n.push(e,t);const i=s(...arguments);r.releasePrimitive(e),r.releasePrimitive(t),n.pop(),n.pop();const o=n.length;return o>0&&(t=n[o-1],e=n[o-2]),i};function s(n,i,r,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;function u(e){let t=2*e,n=ns,i=is;for(;!jr(t,n);)t=2*(e=Gr(e));return zr(e,i)}function h(e){let t=2*e,n=ns,i=is;for(;!jr(t,n);)t=2*(e=Vr(e,i));return zr(e,i)+Hr(t,n)}let d=2*n,f=ts,p=ns,g=is;if(jr(d,p)){const t=zr(n,g),i=Hr(d,p);return ar(n,f,e),o(t,i,!1,c,l+n,e)}{const d=Gr(n),m=Vr(n,g);let v,y,w,b,x=d,A=m;if(a&&(w=e,b=t,ar(x,f,w),ar(A,f,b),v=a(w),y=a(b),y<v)){x=m,A=d;const e=v;v=y,y=e,w=b}w||(w=e,ar(x,f,w));const T=r(w,jr(2*x,p),v,c+1,l+x);let S;if(T===er){const e=u(x);S=o(e,h(x)-e,!0,c+1,l+x,w)}else S=T&&s(x,i,r,o,a,l,c+1);if(S)return!0;b=t,ar(A,f,b);const E=r(b,jr(2*A,p),y,c+1,l+A);let D;if(E===er){const e=u(A);D=o(e,h(A)-e,!0,c+1,l+A,b)}else D=E&&s(A,i,r,o,a,l,c+1);return!!D}}}(),qr=function(){const e=new Er,t=new Er,n=new m,i=new Dr,r=new Dr;return function s(o,a,l,c){let u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,h=2*o,d=ts,f=ns,p=is;null===u&&(l.boundingBox||l.computeBoundingBox(),i.set(l.boundingBox.min,l.boundingBox.max,c),u=i);if(!jr(h,f)){const e=o+8,t=p[o+6];ar(e,d,Yr);if(u.intersectsBox(Yr)&&s(e,a,l,c,u))return!0;ar(t,d,Yr);return!!(u.intersectsBox(Yr)&&s(t,a,l,c,u))}{const i=a,s=i.index,u=i.attributes.position,g=l.index,m=l.attributes.position,v=zr(o,p),y=Hr(h,f);if(n.copy(c).invert(),l.boundsTree){ar(o,d,r),r.matrix.copy(n),r.needsUpdate=!0;const e=l.boundsTree.shapecast({intersectsBounds:e=>r.intersectsBox(e),intersectsTriangle:e=>{e.a.applyMatrix4(c),e.b.applyMatrix4(c),e.c.applyMatrix4(c),e.needsUpdate=!0;for(let n=3*v,i=3*(y+v);n<i;n+=3)if(Nr(t,n,s,u),t.needsUpdate=!0,e.intersectsTriangle(t))return!0;return!1}});return e}for(let i=3*v,r=y+3*v;i<r;i+=3){Nr(e,i,s,u),e.a.applyMatrix4(n),e.b.applyMatrix4(n),e.c.applyMatrix4(n),e.needsUpdate=!0;for(let n=0,i=g.count;n<i;n+=3)if(Nr(t,n,g,m),t.needsUpdate=!0,e.intersectsTriangle(t))return!0}}}}();function Jr(e,t,n,i){return ar(e,t,Yr),n.intersectBox(Yr,i)}const $r=[];let es,ts,ns,is;function rs(e){es&&$r.push(es),es=e,ts=new Float32Array(e),ns=new Uint16Array(e),is=new Uint32Array(e)}function ss(){es=null,ts=null,ns=null,is=null,$r.length&&rs($r.pop())}const os=Symbol("skip tree generation"),as=new i,ls=new i,cs=new m,us=new Dr,hs=new Dr,ds=new t,fs=new t,ps=new t,gs=new t,ms=new t,vs=new i,ys=new Fr((()=>new Er));class ws{static serialize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),ws.serialize(arguments[0],{cloneBuffers:void 0===arguments[2]||arguments[2]});t={cloneBuffers:!0,...t};const n=e.geometry,i=e._roots,r=n.getIndex();let s;return s=t.cloneBuffers?{roots:i.map((e=>e.slice())),index:r.array.slice()}:{roots:i,index:r.array},s}static deserialize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("boolean"==typeof n)return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),ws.deserialize(arguments[0],arguments[1],{setIndex:void 0===arguments[2]||arguments[2]});n={setIndex:!0,...n};const{index:i,roots:r}=e,s=new ws(t,{...n,[os]:!0});if(s._roots=r,n.setIndex){const n=t.getIndex();if(null===n){const n=new f(e.index,1,!1);t.setIndex(n)}else n.array!==i&&(n.array.set(i),n.needsUpdate=!0)}return s}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.isBufferGeometry)throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");if(t=Object.assign({strategy:qi,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[os]:!1},t),t.useSharedArrayBuffer&&"undefined"==typeof SharedArrayBuffer)throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,t[os]||(this._roots=function(e,t){const n=yr(e,t);let i,r,s;const o=[],a=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let e=0;e<n.length;e++){const t=n[e];let u=l(t);const h=new a(ir*u);i=new Float32Array(h),r=new Uint32Array(h),s=new Uint16Array(h),c(0,t),o.push(h)}return o;function l(e){return e.count?1:1+l(e.left)+l(e.right)}function c(e,t){const n=e/4,o=e/2,a=!!t.count,l=t.boundingData;for(let e=0;e<6;e++)i[n+e]=l[e];if(a){const i=t.offset,a=t.count;return r[n+6]=i,s[o+14]=a,s[o+15]=rr,e+ir}{const i=t.left,s=t.right,o=t.splitAxis;let a;if(a=c(e+ir,i),a/4>Math.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return r[n+6]=a/4,a=c(a,s),r[n+7]=o,a}}}(e,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new i))),this.geometry=e}refit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&Array.isArray(e)&&(e=new Set(e));const t=this.geometry,n=t.index.array,i=t.attributes.position;let r,s,o,a,l=0;const c=this._roots;for(let e=0,t=c.length;e<t;e++)r=c[e],s=new Uint32Array(r),o=new Uint16Array(r),a=new Float32Array(r),u(0,l),l+=r.byteLength;function u(t,r){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const c=2*t;if(o[c+15]===rr){const e=s[t+6];let r=1/0,l=1/0,u=1/0,h=-1/0,d=-1/0,f=-1/0;for(let t=3*e,s=3*(e+o[c+14]);t<s;t++){const e=n[t],s=i.getX(e),o=i.getY(e),a=i.getZ(e);s<r&&(r=s),s>h&&(h=s),o<l&&(l=o),o>d&&(d=o),a<u&&(u=a),a>f&&(f=a)}return(a[t+0]!==r||a[t+1]!==l||a[t+2]!==u||a[t+3]!==h||a[t+4]!==d||a[t+5]!==f)&&(a[t+0]=r,a[t+1]=l,a[t+2]=u,a[t+3]=h,a[t+4]=d,a[t+5]=f,!0)}{const n=t+8,i=s[t+6],o=n+r,c=i+r;let h=l,d=!1,f=!1;e?h||(d=e.has(o),f=e.has(c),h=!d&&!f):(d=!0,f=!0);const p=h||f;let g=!1;(h||d)&&(g=u(n,r,h));let m=!1;p&&(m=u(i,r,h));const v=g||m;if(v)for(let e=0;e<3;e++){const r=n+e,s=i+e,o=a[r],l=a[r+3],c=a[s],u=a[s+3];a[t+e]=o<c?o:c,a[t+e+3]=l>u?l:u}return v}}}traverse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this._roots[t],i=new Uint32Array(n),r=new Uint16Array(n);!function t(s){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const a=2*s,l=r[a+15]===rr;if(l){const t=i[s+6],c=r[a+14];e(o,l,new Float32Array(n,4*s,6),t,c)}else{const r=s+ir/4,a=i[s+6],c=i[s+7];e(o,l,new Float32Array(n,4*s,6),c)||(t(r,o+1),t(a,o+1))}}(0)}raycast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;const n=this._roots,i=this.geometry,r=[],s=t.isMaterial,o=Array.isArray(t),a=i.groups,l=s?t.side:t;for(let s=0,c=n.length;s<c;s++){const c=o?t[a[s].materialIndex].side:l,u=r.length;if(rs(n[s]),Qr(0,i,c,e,r),ss(),o){const e=a[s].materialIndex;for(let t=u,n=r.length;t<n;t++)r[t].face.materialIndex=e}}return r}raycastFirst(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;const n=this._roots,i=this.geometry,r=t.isMaterial,s=Array.isArray(t);let o=null;const a=i.groups,l=r?t.side:t;for(let r=0,c=n.length;r<c;r++){const c=s?t[a[r].materialIndex].side:l;rs(n[r]);const u=Kr(0,i,c,e);ss(),null!=u&&(null==o||u.distance<o.distance)&&(o=u,s&&(u.face.materialIndex=a[r].materialIndex))}return o}intersectsGeometry(e,t){const n=this.geometry;let i=!1;for(const r of this._roots)if(rs(r),i=qr(0,n,e,t),ss(),i)break;return i}shapecast(e,t,n){const i=this.geometry;if(e instanceof Function){if(t){const e=t;t=(t,n,i,r)=>{const s=3*n;return e(t,s,s+1,s+2,i,r)}}e={boundsTraverseOrder:n,intersectsBounds:e,intersectsTriangle:t,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}const r=ys.getPrimitive();let{boundsTraverseOrder:s,intersectsBounds:o,intersectsRange:a,intersectsTriangle:l}=e;if(a&&l){const e=a;a=(t,n,s,o,a)=>!!e(t,n,s,o,a)||Ur(t,n,i,l,s,o,r)}else a||(a=l?(e,t,n,s)=>Ur(e,t,i,l,n,s,r):(e,t,n)=>n);let c=!1,u=0;for(const e of this._roots){if(rs(e),c=Zr(0,i,o,a,s,u),ss(),c)break;u+=e.byteLength}return ys.releasePrimitive(r),c}bvhcast(e,t,n){let{intersectsRanges:i,intersectsTriangles:r}=n;const s=this.geometry.index,o=this.geometry.attributes.position,a=e.geometry.index,l=e.geometry.attributes.position;cs.copy(t).invert();const c=ys.getPrimitive(),u=ys.getPrimitive();if(r){function d(e,n,i,h,d,f,p,g){for(let m=i,v=i+h;m<v;m++){Nr(u,3*m,a,l),u.a.applyMatrix4(t),u.b.applyMatrix4(t),u.c.applyMatrix4(t),u.needsUpdate=!0;for(let t=e,i=e+n;t<i;t++)if(Nr(c,3*t,s,o),c.needsUpdate=!0,r(c,u,t,m,d,f,p,g))return!0}return!1}if(i){const f=i;i=function(e,t,n,i,r,s,o,a){return!!f(e,t,n,i,r,s,o,a)||d(e,t,n,i,r,s,o,a)}}else i=d}e.getBoundingBox(ls),ls.applyMatrix4(t);const h=this.shapecast({intersectsBounds:e=>ls.intersectsBox(e),intersectsRange:(t,n,r,s,o,a)=>(as.copy(a),as.applyMatrix4(cs),e.shapecast({intersectsBounds:e=>as.intersectsBox(e),intersectsRange:(e,r,a,l,c)=>i(t,n,e,r,s,o,l,c)}))});return ys.releasePrimitive(c),ys.releasePrimitive(u),h}intersectsBox(e,t){return us.set(e.min,e.max,t),us.needsUpdate=!0,this.shapecast({intersectsBounds:e=>us.intersectsBox(e),intersectsTriangle:e=>us.intersectsTriangle(e)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1/0;e.boundingBox||e.computeBoundingBox(),us.set(e.boundingBox.min,e.boundingBox.max,t),us.needsUpdate=!0;const o=this.geometry,a=o.attributes.position,l=o.index,c=e.attributes.position,u=e.index,h=ys.getPrimitive(),d=ys.getPrimitive();let f=fs,p=ps,g=null,m=null;i&&(g=gs,m=ms);let v=1/0,y=null,w=null;return cs.copy(t).invert(),hs.matrix.copy(cs),this.shapecast({boundsTraverseOrder:e=>us.distanceToBox(e),intersectsBounds:(e,t,n)=>n<v&&n<s&&(t&&(hs.min.copy(e.min),hs.max.copy(e.max),hs.needsUpdate=!0),!0),intersectsRange:(n,i)=>{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:e=>hs.distanceToBox(e),intersectsBounds:(e,t,n)=>n<v&&n<s,intersectsRange:(e,s)=>{for(let o=3*e,b=3*(e+s);o<b;o+=3){Nr(d,o,u,c),d.a.applyMatrix4(t),d.b.applyMatrix4(t),d.c.applyMatrix4(t),d.needsUpdate=!0;for(let e=3*n,t=3*(n+i);e<t;e+=3){Nr(h,e,l,a),h.needsUpdate=!0;const t=h.distanceToTriangle(d,f,g);if(t<v&&(p.copy(f),m&&m.copy(g),v=t,y=e/3,w=o/3),t<r)return!0}}}});for(let e=0,s=u?u.count:c.count;e<s;e+=3){Nr(d,e,u,c),d.a.applyMatrix4(t),d.b.applyMatrix4(t),d.c.applyMatrix4(t),d.needsUpdate=!0;for(let t=3*n,s=3*(n+i);t<s;t+=3){Nr(h,t,l,a),h.needsUpdate=!0;const n=h.distanceToTriangle(d,f,g);if(n<v&&(p.copy(f),m&&m.copy(g),v=n,y=t/3,w=e/3),n<r)return!0}}}}),ys.releasePrimitive(h),ys.releasePrimitive(d),v===1/0?null:(n.point?n.point.copy(p):n.point=p.clone(),n.distance=v,n.faceIndex=y,i&&(i.point?i.point.copy(m):i.point=m.clone(),i.point.applyMatrix4(cs),p.applyMatrix4(cs),i.distance=p.sub(i.point).length(),i.faceIndex=w),n)}closestPointToPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;const r=n*n,s=i*i;let o=1/0,a=null;if(this.shapecast({boundsTraverseOrder:t=>(ds.copy(e).clamp(t.min,t.max),ds.distanceToSquared(e)),intersectsBounds:(e,t,n)=>n<o&&n<s,intersectsTriangle:(t,n)=>{t.closestPointToPoint(e,ds);const i=e.distanceToSquared(ds);return i<o&&(fs.copy(ds),o=i,a=n),i<r}}),o===1/0)return null;const l=Math.sqrt(o);return t.point?t.point.copy(fs):t.point=fs.clone(),t.distance=l,t.faceIndex=a,t}getBoundingBox(e){e.makeEmpty();return this._roots.forEach((t=>{ar(0,new Float32Array(t),vs),e.union(vs)})),e}}const bs=new N,xs=new m,As=k.prototype.raycast;class Ts extends v{constructor(){super();const e=new U;e.deleteAttribute("uv");const t=new F({side:_}),n=new F,i=new j(16777215,5,28,2);i.position.set(.418,16.199,.3),this.add(i);const r=new k(e,t);r.position.set(-.757,13.219,.717),r.scale.set(31.713,28.305,28.591),this.add(r);const s=new k(e,n);s.position.set(-10.906,2.009,1.846),s.rotation.set(0,-.195,0),s.scale.set(2.328,7.905,4.651),this.add(s);const o=new k(e,n);o.position.set(-5.607,-.754,-.758),o.rotation.set(0,.994,0),o.scale.set(1.97,1.534,3.955),this.add(o);const a=new k(e,n);a.position.set(6.167,.857,7.803),a.rotation.set(0,.561,0),a.scale.set(3.927,6.285,3.687),this.add(a);const l=new k(e,n);l.position.set(-2.017,.018,6.124),l.rotation.set(0,.333,0),l.scale.set(2.002,4.566,2.064),this.add(l);const c=new k(e,n);c.position.set(2.291,-.756,-2.621),c.rotation.set(0,-.286,0),c.scale.set(1.546,1.552,1.496),this.add(c);const u=new k(e,n);u.position.set(-2.193,-.369,-5.547),u.rotation.set(0,.516,0),u.scale.set(3.875,3.487,2.986),this.add(u);const h=new k(e,Ss(50));h.position.set(-16.116,14.37,8.208),h.scale.set(.1,2.428,2.739),this.add(h);const d=new k(e,Ss(50));d.position.set(-16.109,18.021,-8.207),d.scale.set(.1,2.425,2.751),this.add(d);const f=new k(e,Ss(17));f.position.set(14.904,12.198,-1.832),f.scale.set(.15,4.265,6.331),this.add(f);const p=new k(e,Ss(43));p.position.set(-.462,8.89,14.52),p.scale.set(4.38,5.441,.088),this.add(p);const g=new k(e,Ss(20));g.position.set(3.235,11.486,-12.541),g.scale.set(2.5,2,.1),this.add(g);const m=new k(e,Ss(100));m.position.set(0,20,0),m.scale.set(1,.1,1),this.add(m)}dispose(){const e=new Set;this.traverse((t=>{t.isMesh&&(e.add(t.geometry),e.add(t.material))}));for(const t of e)t.dispose()}}function Ss(e){const t=new z;return t.color.setScalar(e),t}class Es extends H{constructor(e){super(e),this.type=G}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;let i=e.pos,r=-1,s=0,o="",a=String.fromCharCode.apply(null,new Uint16Array(e.subarray(i,i+128)));for(;0>(r=a.indexOf("\n"))&&s<t&&i<e.byteLength;)o+=a,s+=a.length,i+=128,a+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(i,i+128)));return-1<r&&(!1!==n&&(e.pos+=s+r+1),o+a.slice(0,r))},i=function(e,t,n,i){const r=e[t+3],s=Math.pow(2,r-128)/255;n[i+0]=e[t+0]*s,n[i+1]=e[t+1]*s,n[i+2]=e[t+2]*s,n[i+3]=1},r=function(e,t,n,i){const r=e[t+3],s=Math.pow(2,r-128)/255;n[i+0]=Y.toHalfFloat(Math.min(e[t+0]*s,65504)),n[i+1]=Y.toHalfFloat(Math.min(e[t+1]*s,65504)),n[i+2]=Y.toHalfFloat(Math.min(e[t+2]*s,65504)),n[i+3]=Y.toHalfFloat(1)},s=new Uint8Array(e);s.pos=0;const o=function(e){const i=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,s=/^\s*FORMAT=(\S+)\s*$/,o=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,a={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,c;if(e.pos>=e.byteLength||!(l=n(e)))return t(1,"no header found");if(!(c=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(a.valid|=1,a.programtype=c[1],a.string+=l+"\n";l=n(e),!1!==l;)if(a.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(i))&&(a.gamma=parseFloat(c[1])),(c=l.match(r))&&(a.exposure=parseFloat(c[1])),(c=l.match(s))&&(a.valid|=2,a.format=c[1]),(c=l.match(o))&&(a.valid|=4,a.height=parseInt(c[1],10),a.width=parseInt(c[2],10)),2&a.valid&&4&a.valid)break}else a.comments+=l+"\n";return 2&a.valid?4&a.valid?a:t(3,"missing image size specifier"):t(3,"missing format specifier")}(s);if(-1!==o){const e=o.width,n=o.height,a=function(e,n,i){const r=n;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const s=new Uint8Array(4*n*i);if(!s.length)return t(4,"unable to allocate buffer space");let o=0,a=0;const l=4*r,c=new Uint8Array(4),u=new Uint8Array(l);let h=i;for(;h>0&&a<e.byteLength;){if(a+4>e.byteLength)return t(1);if(c[0]=e[a++],c[1]=e[a++],c[2]=e[a++],c[3]=e[a++],2!=c[0]||2!=c[1]||(c[2]<<8|c[3])!=r)return t(3,"bad rgbe scanline format");let n,i=0;for(;i<l&&a<e.byteLength;){n=e[a++];const r=n>128;if(r&&(n-=128),0===n||i+n>l)return t(3,"bad scanline data");if(r){const t=e[a++];for(let e=0;e<n;e++)u[i++]=t}else u.set(e.subarray(a,a+n),i),i+=n,a+=n}const d=r;for(let e=0;e<d;e++){let t=0;s[o]=u[e+t],t+=r,s[o+1]=u[e+t],t+=r,s[o+2]=u[e+t],t+=r,s[o+3]=u[e+t],o+=4}h--}return s}(s.subarray(s.pos),e,n);if(-1!==a){let t,s,l;switch(this.type){case V:l=a.length/4;const e=new Float32Array(4*l);for(let t=0;t<l;t++)i(a,4*t,e,4*t);t=e,s=V;break;case G:l=a.length/4;const n=new Uint16Array(4*l);for(let e=0;e<l;e++)r(a,4*e,n,4*e);t=n,s=G;break;default:console.error("THREE.RGBELoader: unsupported type: ",this.type)}return{width:e,height:n,data:t,header:o.string,gamma:o.gamma,exposure:o.exposure,type:s}}}return null}setDataType(e){return this.type=e,this}load(e,t,n,i){return super.load(e,(function(e,n){switch(e.type){case V:case G:e.encoding=u,e.minFilter=A,e.magFilter=A,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,n)}),n,i)}}var Ds=function(){var e=0,t=document.createElement("div");function n(e){return t.appendChild(e.dom),e}function i(n){for(var i=0;i<t.children.length;i++)t.children[i].style.display=i===n?"block":"none";e=n}t.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",(function(n){n.preventDefault(),i(++e%t.children.length)}),!1);var r=(performance||Date).now(),s=r,o=0,a=n(new Ds.Panel("FPS","#0ff","#002")),l=n(new Ds.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=n(new Ds.Panel("MB","#f08","#201"));return i(0),{REVISION:16,dom:t,addPanel:n,showPanel:i,begin:function(){r=(performance||Date).now()},end:function(){o++;var e=(performance||Date).now();if(l.update(e-r,200),e>=s+1e3&&(a.update(1e3*o/(e-s),100),s=e,o=0,c)){var t=performance.memory;c.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){r=this.end()},domElement:t,setMode:i}};Ds.Panel=function(e,t,n){var i=1/0,r=0,s=Math.round,o=s(window.devicePixelRatio||1),a=80*o,l=48*o,c=3*o,u=2*o,h=3*o,d=15*o,f=74*o,p=30*o,g=document.createElement("canvas");g.width=a,g.height=l,g.style.cssText="width:80px;height:48px";var m=g.getContext("2d");return m.font="bold "+9*o+"px Helvetica,Arial,sans-serif",m.textBaseline="top",m.fillStyle=n,m.fillRect(0,0,a,l),m.fillStyle=t,m.fillText(e,c,u),m.fillRect(h,d,f,p),m.fillStyle=n,m.globalAlpha=.9,m.fillRect(h,d,f,p),{dom:g,update:function(l,v){i=Math.min(i,l),r=Math.max(r,l),m.fillStyle=n,m.globalAlpha=1,m.fillRect(0,0,a,d),m.fillStyle=t,m.fillText(s(l)+" "+e+" ("+s(i)+"-"+s(r)+")",c,u),m.drawImage(g,h+o,d,f-o,p,h,d,f-o,p),m.fillRect(h+f-o,d,o,p),m.fillStyle=n,m.globalAlpha=.9,m.fillRect(h+f-o,d,o,s((1-l/v)*p))}}};var Cs=Ds;class Is extends k{constructor(){const e=Is.SkyShader,t=new W({name:"SkyShader",fragmentShader:e.fragmentShader,vertexShader:e.vertexShader,uniforms:X.clone(e.uniforms),side:_,depthWrite:!1});super(new U(1,1,1),t),this.isSky=!0}}Is.SkyShader={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new t},up:{value:new t(0,1,0)}},vertexShader:"\n\t\tuniform vec3 sunPosition;\n\t\tuniform float rayleigh;\n\t\tuniform float turbidity;\n\t\tuniform float mieCoefficient;\n\t\tuniform vec3 up;\n\n\t\tvarying vec3 vWorldPosition;\n\t\tvarying vec3 vSunDirection;\n\t\tvarying float vSunfade;\n\t\tvarying vec3 vBetaR;\n\t\tvarying vec3 vBetaM;\n\t\tvarying float vSunE;\n\n\t\t// constants for atmospheric scattering\n\t\tconst float e = 2.71828182845904523536028747135266249775724709369995957;\n\t\tconst float pi = 3.141592653589793238462643383279502884197169;\n\n\t\t// wavelength of used primaries, according to preetham\n\t\tconst vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );\n\t\t// this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:\n\t\t// (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))\n\t\tconst vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );\n\n\t\t// mie stuff\n\t\t// K coefficient for the primaries\n\t\tconst float v = 4.0;\n\t\tconst vec3 K = vec3( 0.686, 0.678, 0.666 );\n\t\t// MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K\n\t\tconst vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );\n\n\t\t// earth shadow hack\n\t\t// cutoffAngle = pi / 1.95;\n\t\tconst float cutoffAngle = 1.6110731556870734;\n\t\tconst float steepness = 1.5;\n\t\tconst float EE = 1000.0;\n\n\t\tfloat sunIntensity( float zenithAngleCos ) {\n\t\t\tzenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );\n\t\t\treturn EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );\n\t\t}\n\n\t\tvec3 totalMie( float T ) {\n\t\t\tfloat c = ( 0.2 * T ) * 10E-18;\n\t\t\treturn 0.434 * c * MieConst;\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n\t\t\tvWorldPosition = worldPosition.xyz;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n\t\t\tvSunDirection = normalize( sunPosition );\n\n\t\t\tvSunE = sunIntensity( dot( vSunDirection, up ) );\n\n\t\t\tvSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );\n\n\t\t\tfloat rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );\n\n\t\t\t// extinction (absorbtion + out scattering)\n\t\t\t// rayleigh coefficients\n\t\t\tvBetaR = totalRayleigh * rayleighCoefficient;\n\n\t\t\t// mie coefficients\n\t\t\tvBetaM = totalMie( turbidity ) * mieCoefficient;\n\n\t\t}",fragmentShader:"\n\t\tvarying vec3 vWorldPosition;\n\t\tvarying vec3 vSunDirection;\n\t\tvarying float vSunfade;\n\t\tvarying vec3 vBetaR;\n\t\tvarying vec3 vBetaM;\n\t\tvarying float vSunE;\n\n\t\tuniform float mieDirectionalG;\n\t\tuniform vec3 up;\n\n\t\tconst vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );\n\n\t\t// constants for atmospheric scattering\n\t\tconst float pi = 3.141592653589793238462643383279502884197169;\n\n\t\tconst float n = 1.0003; // refractive index of air\n\t\tconst float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)\n\n\t\t// optical length at zenith for molecules\n\t\tconst float rayleighZenithLength = 8.4E3;\n\t\tconst float mieZenithLength = 1.25E3;\n\t\t// 66 arc seconds -> degrees, and the cosine of that\n\t\tconst float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;\n\n\t\t// 3.0 / ( 16.0 * pi )\n\t\tconst float THREE_OVER_SIXTEENPI = 0.05968310365946075;\n\t\t// 1.0 / ( 4.0 * pi )\n\t\tconst float ONE_OVER_FOURPI = 0.07957747154594767;\n\n\t\tfloat rayleighPhase( float cosTheta ) {\n\t\t\treturn THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );\n\t\t}\n\n\t\tfloat hgPhase( float cosTheta, float g ) {\n\t\t\tfloat g2 = pow( g, 2.0 );\n\t\t\tfloat inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );\n\t\t\treturn ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvec3 direction = normalize( vWorldPosition - cameraPos );\n\n\t\t\t// optical length\n\t\t\t// cutoff angle at 90 to avoid singularity in next formula.\n\t\t\tfloat zenithAngle = acos( max( 0.0, dot( up, direction ) ) );\n\t\t\tfloat inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );\n\t\t\tfloat sR = rayleighZenithLength * inverse;\n\t\t\tfloat sM = mieZenithLength * inverse;\n\n\t\t\t// combined extinction factor\n\t\t\tvec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );\n\n\t\t\t// in scattering\n\t\t\tfloat cosTheta = dot( direction, vSunDirection );\n\n\t\t\tfloat rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );\n\t\t\tvec3 betaRTheta = vBetaR * rPhase;\n\n\t\t\tfloat mPhase = hgPhase( cosTheta, mieDirectionalG );\n\t\t\tvec3 betaMTheta = vBetaM * mPhase;\n\n\t\t\tvec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );\n\t\t\tLin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );\n\n\t\t\t// nightsky\n\t\t\tfloat theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]\n\t\t\tfloat phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]\n\t\t\tvec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );\n\t\t\tvec3 L0 = vec3( 0.1 ) * Fex;\n\n\t\t\t// composition + solar disc\n\t\t\tfloat sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );\n\t\t\tL0 += ( vSunE * 19000.0 * Fex ) * sundisk;\n\n\t\t\tvec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );\n\n\t\t\tvec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );\n\n\t\t\tgl_FragColor = vec4( retColor, 1.0 );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\n\t\t}"};var Ms="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Bs(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var Rs={},Ps={},Os=Bs(Xn),_s={},Ls={},ks={},Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});var Us=function(){function e(t,n){if(void 0===n&&(n=null),this.nonEmpty=!1,t||n){if(!t)throw new Error("Parameter head cannot be null.");this.head=t,this.tail=n||e.NIL,this.nonEmpty=!0}else{if(e.NIL)throw new Error("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}}return Object.defineProperty(e.prototype,"length",{get:function(){if(!this.nonEmpty)return 0;if(this.tail===e.NIL)return 1;for(var t=0,n=this;n.nonEmpty;)++t,n=n.tail;return t},enumerable:!0,configurable:!0}),e.prototype.prepend=function(t){return new e(t,this)},e.prototype.append=function(t){if(!t)return this;if(!this.nonEmpty)return new e(t);if(this.tail===e.NIL)return new e(t).prepend(this.head);for(var n=new e(this.head),i=n,r=this.tail;r.nonEmpty;)i=i.tail=new e(r.head),r=r.tail;return i.tail=new e(t),n},e.prototype.insertWithPriority=function(t){if(!this.nonEmpty)return new e(t);var n=t.priority;if(n>this.head.priority)return this.prepend(t);for(var i=new e(this.head),r=i,s=this.tail;s.nonEmpty;){if(n>s.head.priority)return r.tail=s.prepend(t),i;r=r.tail=new e(s.head),s=s.tail}return r.tail=new e(t),i},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),i=n,r=this.tail;r.nonEmpty;){if(r.head.listener===t)return i.tail=r.tail,n;i=i.tail=new e(r.head),r=r.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();Ns.SlotList=Us;var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0});var js=function(){function e(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=i,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();Fs.Slot=js,Object.defineProperty(ks,"__esModule",{value:!0});var zs=Ns,Hs=Fs,Gs=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.slots=zs.SlotList.NIL,this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if(!(this._valueClasses[t]instanceof Object))throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+">."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=zs.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var s=this.slots;if(s.nonEmpty)for(;s.nonEmpty;)s.head.execute(e),s=s.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new Hs.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();ks.OnceSignal=Gs,Object.defineProperty(Ls,"__esModule",{value:!0});var Vs=Os,Ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vs.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(ks.OnceSignal);Ls.Signal=Ys,Object.defineProperty(_s,"__esModule",{value:!0});var Ws=Os,Xs=Fs,Qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ws.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var i=new Xs.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(i),i}return this.slots.find(e)},t}(Ls.Signal);_s.PrioritySignal=Qs,Object.defineProperty(Ps,"__esModule",{value:!0});var Ks=Os,Zs=function(e){function t(t){void 0===t&&(t=null);for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this;return n=1===n.length&&n[0]instanceof Array?n[0]:n,(r=e.call(this,n)||this)._target=t,r}return Ks.__extends(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){e!==this._target&&(this.removeAll(),this._target=e)},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(null!==e[r]&&e[r].constructor!==this._valueClasses[r])throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var s=e[0];s&&(s.target&&(s=s.clone(),e[0]=s),s.target=this.target,s.currentTarget=this.target,s.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(s&&s.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(s.currentTarget=a,a.onEventBubbled(s))););},t}(_s.PrioritySignal);Ps.DeluxeSignal=Zs;var qs={};Object.defineProperty(qs,"__esModule",{value:!0});var Js=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();qs.GenericEvent=Js;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.IOnceSignal=Symbol("IOnceSignal");var eo={};Object.defineProperty(eo,"__esModule",{value:!0}),eo.IPrioritySignal=Symbol("IPrioritySignal");var to={};Object.defineProperty(to,"__esModule",{value:!0}),to.ISignal=Symbol("ISignal");var no={};Object.defineProperty(no,"__esModule",{value:!0}),no.ISlot=Symbol("ISlot");var io={};Object.defineProperty(io,"__esModule",{value:!0});var ro=Fs,so=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if("function"!=typeof this._valueClasses[t])throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+"'>."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new ro.Slot(e,this,t)},e}();io.MonoSignal=so;var oo={};Object.defineProperty(oo,"__esModule",{value:!0});var ao=Os,lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ao.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDispatched)throw new Error("You cannot dispatch() a Promise more than once");this.isDispatched=!0,this.valueObjects=t,e.prototype.dispatch.apply(this,t)},t}(ks.OnceSignal);oo.Promise=lo,Object.defineProperty(Rs,"__esModule",{value:!0});var co=Ps;Rs.DeluxeSignal=co.DeluxeSignal;var uo=qs;Rs.GenericEvent=uo.GenericEvent;var ho=$s;Rs.IOnceSignal=ho.IOnceSignal;var fo=eo;Rs.IPrioritySignal=fo.IPrioritySignal;var po=to;Rs.ISignal=po.ISignal;var go=no;Rs.ISlot=go.ISlot;var mo=io;Rs.MonoSignal=mo.MonoSignal;var vo=ks;Rs.OnceSignal=vo.OnceSignal;var yo=_s;Rs.PrioritySignal=yo.PrioritySignal;var wo=oo;Rs.Promise=wo.Promise;var bo=Ls,xo=Rs.Signal=bo.Signal,Ao=Fs;Rs.Slot=Ao.Slot;var To=Ns;Rs.SlotList=To.SlotList;const So=new v;So.name="Scene";class Eo{constructor(e,t){this.signals=e,this.viewportState=t,this.scene=So.clone(),this.scene.castShadow=!0,this.scene.receiveShadow=!0,this.selectedObjects={edge:[],stroke:[],opacity:[],highlight:[],emissive:[]},this.intersectsList={meshOfModelList:[],poiIconList:[],otherObjList:[],getAll:function(){return[...this.meshOfModelList,...this.poiIconList,...this.otherObjList]}}}addObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void yn("Scene is disposed");t?t.add(e):this.scene.add(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}removeObject(e){function t(e){var t;e.map&&((t=e.map)&&t.isTexture&&t.dispose()),e.dispose()}e.traverse((e=>{if("Mesh"===e.type){const n=e;n.geometry.dispose(),On(n.material,t)}e instanceof Fu&&e.element.remove();const{meshOfModelList:n,poiIconList:i,otherObjList:r}=this.intersectsList,s=n.findIndex((t=>t.uuid===e.uuid)),o=i.findIndex((t=>t.uuid===e.uuid)),a=r.findIndex((t=>t.uuid===e.uuid));s>-1&&this.intersectsList.meshOfModelList.splice(s,1),o>-1&&this.intersectsList.poiIconList.splice(o,1),a>-1&&this.intersectsList.otherObjList.splice(a,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:t=13426943,near:n=500,far:i=5e4}=e;this.scene.fog=new Q(t,n,i),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],i=e=>{-1===this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid))&&n.push(e)};return ji(e)?e.forEach((e=>i(e))):zi(e)&&i(e),this.selectedObjects.edge=[...this.selectedObjects.edge,...n],this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>{const t=this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.edge.splice(t,1),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge})),Promise.resolve()};return ji(e)?Promise.all(e.map((e=>t(e)))):zi(e)?t(e):Promise.resolve()}strokeShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isOpacityShow:n=!0,color:i=4647927,opacity:r=.2,edgeColor:s=61183,edgeOpacity:o=1}=t,a=e=>{if(-1!==this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid)))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const t=new Nu({id:e.uuid});return e.traverse((n=>{if(n instanceof k){const i=new K(n.geometry,89),r=new Z(i,new q({color:s,transparent:!0,opacity:o}));Dn(r,n),e.attach(r),t.add(r)}})),e.userData.strokeGroup=t,this.addObject(t,e),this.selectedObjects.stroke.push(e),Promise.resolve()};return n&&this.opacityShow(e,{color:i,opacity:r}),ji(e)?Promise.all(e.map((e=>a(e)))):zi(e)?a(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup");const t=this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.stroke.splice(t,1),this.signals.geometryChanged.dispatch(),this.unOpacityShow(e)),Promise.resolve()};return ji(e)?Promise.all(e.map((e=>t(e)))):zi(e)?t(e):Promise.resolve()}opacityShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="#fff",opacity:i=.8}=t;function r(e){return Reflect.construct(e.constructor,[{transparent:!0,depthWrite:!1,side:e.side,color:n,opacity:i}])}const s=e=>(-1!==this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof k){if(e.userData.material)return;e.userData.material=e.material,e.material=On(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.push(e)),Promise.resolve());return ji(e)?Promise.all(e.map((e=>s(e)))):zi(e)?s(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{const n=this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.opacity.splice(n,1),e.traverse((e=>{if(e instanceof k){if(!e.userData.material)return;Ln(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ji(e)?Promise.all(e.map((e=>t(e)))):zi(e)?t(e):Promise.resolve()}highlightShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="red",opacity:i=1}=t;function r(e){e instanceof F&&(e.color=new a(n),e.opacity=i,e.transparent=i<1)}const s=e=>(-1!==this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof k){if(e.userData.material)return;e.userData.material=e.material,e.material=_n(e.material),On(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.push(e)),Promise.resolve());return ji(e)?Promise.all(e.map((e=>s(e)))):zi(e)?s(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{const n=this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.highlight.splice(n,1),e.traverse((e=>{if(e instanceof k){if(!e.userData.material)return;Ln(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ji(e)?Promise.all(e.map((e=>t(e)))):zi(e)?t(e):Promise.resolve()}emissiveShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="red",opacity:i=.3,maxOpacity:r=1,minOpacity:s=0,duration:o=1e3}=t;function a(e){e instanceof F&&(e.emissive.set(n),e.emissiveIntensity=i,0!==o&&Ki({emissiveIntensity:r},{emissiveIntensity:s},{duration:o,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const l=e=>(-1!==this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof k){if(e.userData.material)return;e.userData.material=e.material,e.material=_n(e.material),On(e.material,a)}})),this.selectedObjects.emissive.push(e),this.signals.materialChanged.dispatch()),Promise.resolve());return ji(e)?Promise.all(e.map((e=>l(e)))):zi(e)?l(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&pn.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{const i=this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid));-1===i&&n(),this.selectedObjects.emissive.splice(i,1),e.traverse((e=>{if(e instanceof k){if(!e.userData.material)return;On(e.material,t),Ln(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return ji(e)?Promise.all(e.map((e=>n(e)))):zi(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof ku)if("Model"===e.stype)e.traverse((e=>{if(e instanceof k){const t=this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid));-1===t&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype){const t=this.intersectsList.poiIconList.findIndex((t=>t.uuid===e.icon.uuid));-1===t&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof k){const t=this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid));-1===t&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof k){const t=this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid));-1===t&&this.intersectsList.otherObjList.push(e)}}))}}class Do extends J{constructor(e){super(),this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Do&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}}let Co,Io;const Mo=new t,Bo=new m,Ro=new m,Po={objects:new WeakMap};function Oo(){const e=new t,n=new t;return function(t,i){return e.setFromMatrixPosition(t.matrixWorld),n.setFromMatrixPosition(i.matrixWorld),e.distanceToSquared(n)}}function _o(e){const t=function(e){const t=[];return e.traverse((function(e){e instanceof Do&&t.push(e)})),t}(e).sort((function(e,t){return Po.objects.get(e).distanceToCameraSquared-Po.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,i=t.length;e<i;e++)t[e].element.style.zIndex=""+(n-e)}class Lo{constructor(e){e||(e=document.createElement("div")),e.style.overflow="hidden",this.domElement=e}setSize(e,t){Co=e/2,Io=t/2,this.domElement.style.width=e+"px",this.domElement.style.height=t+"px"}renderObject(e,t,n){if(e instanceof Do){Mo.setFromMatrixPosition(e.matrixWorld),Mo.applyMatrix4(Ro);const t=e.element,i="translate(-50%,-100%) translate("+(Mo.x*Co+Co)+"px,"+(-Mo.y*Io+Io)+"px)";t.style.transform=i,t.style.display=Cn(e)&&Mo.z>=-1&&Mo.z<=1?"block":"none";const r={distanceToCameraSquared:Oo()(n,e)};Po.objects.set(e,r),t.parentNode!==this.domElement&&this.domElement.appendChild(t)}for(let i=0,r=e.children.length;i<r;i++)this.renderObject(e.children[i],t,n)}render(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),Bo.copy(t.matrixWorldInverse),Ro.multiplyMatrices(t.projectionMatrix,Bo),this.renderObject(e,e,t),_o(e)}}class ko extends J{constructor(e){super(),this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof ko&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}}let No,Uo,Fo,jo;function zo(e){return Math.abs(e)<1e-10?0:e}function Ho(e){const t=e.elements;return"matrix3d("+zo(t[0])+","+zo(-t[1])+","+zo(t[2])+","+zo(t[3])+","+zo(t[4])+","+zo(-t[5])+","+zo(t[6])+","+zo(t[7])+","+zo(t[8])+","+zo(-t[9])+","+zo(t[10])+","+zo(t[11])+","+zo(t[12])+","+zo(-t[13])+","+zo(t[14])+","+zo(t[15])+")"}class Go{constructor(e,t){this.cache={camera:{fov:0,style:""},objects:new WeakMap},e||(e=document.createElement("div")),e.style.overflow="hidden",e.style.pointerEvents="auto",this.domElement=e,t||(t=document.createElement("div")),t.style.transformStyle="preserve-3d",t.style.pointerEvents="auto",t.style.position="absolute",t.style.top="0",e.appendChild(t),this.cameraElement=t}setSize(e,t){No=e/2,Uo=t/2,this.domElement.style.width=e+"px",this.domElement.style.height=t+"px",this.cameraElement.style.width=e+"px",this.cameraElement.style.height=t+"px"}renderObject(e,t,n,i){if(e instanceof ko){const t=function(e,t){const n=e.elements;return"translateX(-50%)matrix3d("+zo(n[0])+","+zo(n[1])+","+zo(n[2])+","+zo(n[3])+","+zo(-n[4])+","+zo(-n[5])+","+zo(-n[6])+","+zo(-n[7])+","+zo(n[8])+","+zo(n[9])+","+zo(n[10])+","+zo(n[11])+","+zo(n[12])+","+zo(n[13])+","+zo(n[14])+","+zo(n[15])+")"}(e.matrixWorld),n=e.element;n.style.transform=t,n.style.display=Cn(e)?"block":"none";const i={style:t,distanceToCameraSquared:0};this.cache.objects.set(e,i),n.parentNode!==this.cameraElement&&this.cameraElement.appendChild(n)}for(let r=0,s=e.children.length;r<s;r++)this.renderObject(e.children[r],t,n,i)}render(e,t){const n=t.projectionMatrix.elements[5]*Uo;this.cache.camera.fov!==n&&(this.domElement.style.perspective=t instanceof $?n+"px":"",this.cache.camera.fov=n),!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld();let i="";if(t instanceof ee){i+="scale("+n+")translateX("+zo(-(t.right+t.left)/2)+"px)"+Ho(t.matrixWorldInverse)}else i+="translateZ("+n+"px)"+Ho(t.matrixWorldInverse);const r=i+"translate("+No+"px,"+Uo+"px)";this.cameraElement.style.transform=r,this.cache.camera.style=r,this.renderObject(e,e,t,i)}}class Vo extends J{constructor(e){super(),this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Vo&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}}function Yo(e){return Math.abs(e)<1e-10?0:e}function Wo(e){const t=e.elements;return"matrix3d("+Yo(t[0])+","+Yo(-t[1])+","+Yo(t[2])+","+Yo(t[3])+","+Yo(t[4])+","+Yo(-t[5])+","+Yo(t[6])+","+Yo(t[7])+","+Yo(t[8])+","+Yo(-t[9])+","+Yo(t[10])+","+Yo(t[11])+","+Yo(t[12])+","+Yo(-t[13])+","+Yo(t[14])+","+Yo(t[15])+")"}class Xo{constructor(e,t){this.cache={camera:{fov:0,style:""},objects:new WeakMap},e||(e=document.createElement("div")),e.style.overflow="hidden",e.style.pointerEvents="auto",this.domElement=e,t||(t=document.createElement("div")),t.style.transformStyle="preserve-3d",t.style.pointerEvents="auto",t.style.position="absolute",t.style.top="0",e.appendChild(t),this.cameraElement=t}setSize(e,t){Fo=e/2,jo=t/2,this.domElement.style.width=e+"px",this.domElement.style.height=t+"px",this.cameraElement.style.width=e+"px",this.cameraElement.style.height=t+"px"}renderObject(e,n,i,r){if(e instanceof Vo){const n=i.quaternion.clone();n.x=-i.quaternion.x,n.z=-i.quaternion.z;const r=function(e,t){const n=e.elements;return"translateX(-50%)matrix3d("+Yo(n[0])+","+Yo(-n[1])+","+Yo(n[2])+","+Yo(n[3])+","+Yo(n[4])+","+Yo(-n[5])+","+Yo(n[6])+","+Yo(n[7])+","+Yo(n[8])+","+Yo(-n[9])+","+Yo(n[10])+","+Yo(n[11])+","+Yo(n[12])+","+Yo(n[13])+","+Yo(n[14])+","+Yo(n[15])+")"}((new m).compose(e.parent.getWorldPosition(new t(0,0,0)),n,e.parent.scale)),s=e.element;s.style.transform=r,s.style.display=Cn(e)?"block":"none";const o={style:r,distanceToCameraSquared:0};this.cache.objects.set(e,o),s.parentNode!==this.cameraElement&&this.cameraElement.appendChild(s)}for(let t=0,s=e.children.length;t<s;t++)this.renderObject(e.children[t],n,i,r)}render(e,t){const n=t.projectionMatrix.elements[5]*jo;this.cache.camera.fov!==n&&(this.domElement.style.perspective=t instanceof $?n+"px":"",this.cache.camera.fov=n),!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld();let i="";if(t instanceof ee){i+="scale("+n+")translateX("+Yo(-(t.right+t.left)/2)+"px)"+Wo(t.matrixWorldInverse)}else i+="translateZ("+n+"px)"+Wo(t.matrixWorldInverse);const r=i+"translate("+Fo+"px,"+jo+"px)";this.cameraElement.style.transform=r,this.cache.camera.style=r,this.renderObject(e,e,t,i)}}class Qo{constructor(e){this.options=e,this.internalOptions={enableRenderCss2D:!1,enableRenderCss2DHalf:!1,enableRenderCss3D:!1},this.container=this._initContainer(),this.renderer=this._initRenderer(),this.rendererCSS2D=this._initRenderCSS2D(),this.rendererCSS3D=this._initRenderCSS3D(),this.rendererCSS2DHalf=this._initRenderCSS2DHalf(),this.interactiveContainer=this._initInteractiveContainer()}setInternalState(e,t){this.internalOptions[e]=t}getWidth(){return this.renderer.domElement.width}getHeight(){return this.renderer.domElement.height}getMouseRelativeConRatio(e){const t=this.container.getBoundingClientRect();return[(e.offsetX-t.left)/t.width,(e.offsetY-t.top)/t.height]}getMousePoint(e){const t=new M(0,0);return t.fromArray(this.getMouseRelativeConRatio(e)),t}_initContainer(){const e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",e}_initRenderer(){const{background:e={},logarithmicDepthBuffer:t}=this.options,{color:n,alpha:i}=e,r=new te({alpha:i,logarithmicDepthBuffer:t,preserveDrawingBuffer:!0,antialias:!1,stencil:!1,depth:!1,powerPreference:"high-performance"}),s=i?0:1,{offsetWidth:o,offsetHeight:a}=this.container;return r.setSize(o,a),r.setClearColor(n||0,s),r.setPixelRatio(self.devicePixelRatio),r.localClippingEnabled=!0,r.sortObjects=!0,r.shadowMap.enabled=!0,r.shadowMap.type=ne,this.container.appendChild(r.domElement),r}_initRenderCSS2D(){const e=new Lo;return e.domElement.id="ssp_view_2DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initRenderCSS3D(){const e=new Go;return e.domElement.id="ssp_view_3DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initRenderCSS2DHalf(){const e=new Xo(this.rendererCSS3D.domElement,this.rendererCSS3D.cameraElement);return e.setSize(this.container.offsetWidth,this.container.offsetHeight),e}_initInteractiveContainer(){return this.rendererCSS3D.domElement}}const Ko=new m,Zo=(e,t)=>{const i=Ko.clone(),r=Ko.clone(),s=Ko.clone();i.makeRotationY(e),r.makeRotationX(t);const o=new n;return s.multiplyMatrices(i,r),o.setFromRotationMatrix(s),o},qo=Zo(-Math.PI/2,-Math.PI/4),Jo=Zo(Math.PI/2,-Math.PI/4),$o=Zo(-Math.PI/4,-Math.PI/4),ea=Zo(Math.PI/4,-Math.PI/4),ta=Zo(1.25*Math.PI,-Math.PI/4),na=Zo(.75*Math.PI,-Math.PI/4),ia={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(qo.x,qo.y,qo.z),RIGHTTOP:new n(Jo.x,Jo.y,Jo.z),LEFTFRONTTOP:new n($o.x,$o.y,$o.z),RIGHTFRONTTOP:new n(ea.x,ea.y,ea.z),LEFTBACKTOP:new n(ta.x,ta.y,ta.z),RIGHTBACKTOP:new n(na.x,na.y,na.z)},ra=e=>Fi(e)?e:e.includes("%")?.01*Number(e.split("%")[0]):isNaN(+e)?0:Number(e),sa=new t,oa=new n,aa=new $(50,1,.1,5e5);aa.position.set(500,1e3,500),aa.lookAt(sa.set(0,0,0)),aa.name="Camera";class la{constructor(e){this.viewport=e,this.mainCamera=aa.clone(),this.mainCamera.name="freeCamera",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=aa.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}getMainCamera(){return this.mainCamera}getCameraViewpoint(){if("free"===this.viewport.controls.options.type)return{position:this.currentCamera.position.clone(),rotation:{x:this.currentCamera.rotation.x,y:this.currentCamera.rotation.y,z:this.currentCamera.rotation.z}};{const e=this.viewport.controls.currentControls;return{position:this.currentCamera.position.clone(),target:e.target.clone()}}}setCameraViewpoint(e){if("free"===this.viewport.controls.options.type&&zi(e)){const{position:t,rotation:n}=e;this.currentCamera.position.set(t.x,t.y,t.z),this.currentCamera.rotation.set(n.x,n.y,n.z)}else if(zi(e)){const{position:t,target:n}=e,i=this.viewport.controls.currentControls;this.currentCamera.position.set(t.x,t.y,t.z),i.target.set(n.x,n.y,n.z)}this.viewport.signals.cameraChange.dispatch(this.currentCamera.position.clone())}moveTo(e,t){return Ki(this.currentCamera.position,e,t,(e=>this.viewport.signals.cameraChange.dispatch(e)))}rotateTo(e,t){const n=this.currentCamera.quaternion.clone(),i=(new r).setFromEuler(e);return Ki({t:0},{t:1},t,(e=>{let{t:t}=e;this.currentCamera.quaternion.slerpQuaternions(n,i,t)}))}flyTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2?arguments[2]:void 0;return Fn(this,void 0,void 0,(function*(){if(Ni(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?oa.copy(this.currentCamera.rotation):ia[e]&&oa.copy(ia[e])}else t instanceof n?oa.copy(t):zi(t)&&oa.set(t.x,t.y,t.z);oa.copy(Tn(this.currentCamera.rotation,oa.clone())),yield Promise.all([this.moveTo(e,i),this.rotateTo(oa,i)])}))}flyToBoundingBox(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2?arguments[2]:void 0;return Fn(this,void 0,void 0,(function*(){if(e.isEmpty())return void yn("target box is empty");const r=this.viewport.controls.options.type,s=new t;if(Ni(n)){if("CURRENT"===n.toLocaleUpperCase())s.copy(this.getMovePosByBBox(e));else{const t=ia[n.toLocaleUpperCase()],i=this.getObjectLabelPos(e,t);s.copy(i)}}else{"orbit"===r&&yn("orbit 控制器不支持 Rotation 类型 的 rotation 参数");const t=bn(n),i=this.getObjectLabelPos(e,t);s.copy(i)}if("orbit"===r){const t=e.getCenter(sa),i=this.viewport.controls.currentControls;i.target.copy(t);const r=new m;r.lookAt(s,t,i.object.up),n=oa.setFromRotationMatrix(r)}yield this.flyTo(s,n,i)}))}flyToObj(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Gu||e instanceof Fu){const{padding:t=50}=i,r=ra(t);return this.flyToBoundingBox(e.getBoundingBox(r),n,i)}{const{padding:r="30%"}=i,s=xn(e),o=s.getSize(sa);let a=0;if(Ni(r)){const e=Math.max(o.x,o.y,o.z);a=ra(r)*e}else a=r;let l=a,c=a;if(a<0){const e=Math.min(o.x,o.z),t=o.y-1;l=Math.abs(a)>e?-e:a,c=Math.abs(l)>t?-t:l}return 0!==r&&(s.max.add(sa.set(l/2,c/2,l/2)),s.min.sub(sa.set(l/2,c/2,l/2))),s.isEmpty()&&(sa.setFromMatrixPosition(e.matrixWorld),s.setFromCenterAndSize(sa,new t(0,0,0))),this.flyToBoundingBox(s,n,i)}}surroundOnTarget(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{speed:n=1,angle:i=360,onStart:r}=t,s=wn(e),o=s.clone().setY(this.currentCamera.position.y).distanceTo(this.currentCamera.position),a=Math.abs(i);return Ki({angle:0},{angle:Math.PI/180*a},{duration:a/360*5e3/n},(e=>{const t=i>0?e.angle:2*Math.PI-e.angle;if(this.currentCamera.position.x=Math.sin(t)*o+s.x,this.currentCamera.position.z=Math.cos(t)*o+s.z,"orbit"===this.viewport.controls.options.type){const e=this.viewport.controls.currentControls;e.target.copy(s),e.update()}else this.currentCamera.lookAt(s)}),r)}surroundOnObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(new i).setFromObject(e).getCenter(sa);return this.surroundOnTarget(n,t)}getMovePosByBBox(e){const n=this.currentCamera.position,i=e.getCenter(sa);(new t).subVectors(i,n).normalize();let r=new O;r=e.getBoundingSphere(r);const s=this.currentCamera.fov/2*Math.PI/180,o=Math.sin(s),a=r.radius/o,l=new t;this.currentCamera.getWorldDirection(l);const c=l.clone();return c.multiplyScalar(-a),i.clone().add(c)}getObjectLabelPos(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof ku&&(e=(new i).setFromObject(e)),e.isEmpty())return yn("target box is empty"),new t;const{extendScale:s=1.6,mode:o="scene"}=r;if("scene"===o){const t=e.getCenter(sa),i=e.max.clone().sub(e.min),r=Math.max(i.x,i.y,i.z),o=t.clone(),a=e=>{const t=(s-.5)*Math.abs(r),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Ni(n)?ia[n.toLocaleUpperCase()]:bn(n),a(sa.set(0,0,1).applyEuler(l)),o}return"screen"===o?e.getCenter(sa).clone():new t}}
1
+ import*as e from"three";import{Vector3 as t,Euler as n,Box3 as i,Quaternion as r,CubeTextureLoader as s,RGBAFormat as o,Color as a,Texture as l,BufferAttribute as c,Vector2 as h,Plane as u,Line3 as d,Triangle as f,Sphere as p,Matrix4 as g,BackSide as m,DoubleSide as v,FrontSide as y,Mesh as w,Ray as b,Scene as x,Fog as A,EdgesGeometry as S,LineSegments as T,LineBasicMaterial as E,MeshStandardMaterial as D,Object3D as C,PerspectiveCamera as B,OrthographicCamera as M,WebGLRenderer as I,PCFSoftShadowMap as P,Camera as O,sRGBEncoding as _,UnsignedByteType as R,MeshNormalMaterial as L,WebGLRenderTarget as N,NearestFilter as k,DepthTexture as U,DepthStencilFormat as j,UnsignedInt248Type as F,UnsignedIntType as z,LinearEncoding as H,Uniform as G,RepeatWrapping as V,LoadingManager as Y,LinearFilter as Q,ShaderMaterial as W,NoBlending as X,RGBADepthPacking as Z,REVISION as K,EventDispatcher as q,MeshDepthMaterial as J,FloatType as $,BasicDepthPacking as ee,DataTexture as te,Vector4 as ne,BufferGeometry as ie,Material as re,LuminanceFormat as se,RedFormat as oe,RGFormat as ae,ShaderChunk as le,WebGLCubeRenderTarget as ce,CubeCamera as he,PMREMGenerator as ue,HalfFloatType as de,WebGLMultipleRenderTargets as fe,FramebufferTexture as pe,Matrix3 as ge,TangentSpaceNormalMap as me,GLSL3 as ve,VideoTexture as ye,Frustum as we,MOUSE as be,TOUCH as xe,Spherical as Ae,CanvasTexture as Se,MeshBasicMaterial as Te,PlaneGeometry as Ee,Raycaster as De,Clock as Ce,AnimationMixer as Be,EquirectangularReflectionMapping as Me,TextureLoader as Ie,ACESFilmicToneMapping as Pe,AnimationClip as Oe,NoToneMapping as _e,LinearToneMapping as Re,ReinhardToneMapping as Le,CineonToneMapping as Ne,Sprite as ke,SpriteMaterial as Ue,SphereGeometry as je,CircleGeometry as Fe,Float32BufferAttribute as ze,ShapeGeometry as He,Shape as Ge,AmbientLight as Ve,DirectionalLight as Ye,HemisphereLight as Qe,SpotLight as We,PointLight as Xe,RectAreaLight as Ze,Loader as Ke,Group as qe,LinearMipMapLinearFilter as Je,ImageLoader as $e,SkinnedMesh as et,GridHelper as tt,AxesHelper as nt,Box3Helper as it,DirectionalLightHelper as rt,HemisphereLightHelper as st,SpotLightHelper as ot,PointLightHelper as at,Box2 as lt,MeshPhongMaterial as ct}from"three";export*from"three";import{GLTFExporter as ht}from"three/examples/jsm/exporters/GLTFExporter.js";import{RoomEnvironment as ut}from"three/examples/jsm/environments/RoomEnvironment.js";import{RGBELoader as dt}from"three/examples/jsm/loaders/RGBELoader.js";import ft from"three/examples/jsm/libs/stats.module.js";import{Sky as pt}from"three/examples/jsm/objects/Sky.js";import{RectAreaLightUniformsLib as gt}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{FBXLoader as mt}from"three/examples/jsm/loaders/FBXLoader.js";import{TGALoader as vt}from"three/examples/jsm/loaders/TGALoader.js";import{GLTFLoader as yt}from"three/examples/jsm/loaders/GLTFLoader.js";import{DRACOLoader as wt}from"three/examples/jsm/loaders/DRACOLoader.js";import{WorkerPool as bt}from"three/examples/jsm/utils/WorkerPool.js";import{RectAreaLightHelper as xt}from"three/examples/jsm/helpers/RectAreaLightHelper.js";var At,St="soonspacejs",Tt="2.6.4",Et={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-Et.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*Et.Bounce.In(2*e):.5*Et.Bounce.Out(2*e-1)+.5}}},Dt="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},Ct=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=Dt()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var r=this._tweens[n[i]],s=!t;r&&!1===r.update(e,s)&&!t&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),Bt={Linear:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),s=Bt.Utils.Linear;return t<0?s(e[0],e[1],i):t>1?s(e[n],e[n-1],n-i):s(e[r],e[r+1>n?n:r+1],i-r)},Bezier:function(e,t){for(var n=0,i=e.length-1,r=Math.pow,s=Bt.Utils.Bernstein,o=0;o<=i;o++)n+=r(1-t,i-o)*r(t,o)*e[o]*s(i,o);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),s=Bt.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(r=Math.floor(i=n*(1+t))),s(e[(r-1+n)%n],e[r],e[(r+1)%n],e[(r+2)%n],i-r)):t<0?e[0]-(s(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(s(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):s(e[r?r-1:0],e[r],e[n<r+1?n:r+1],e[n<r+2?n:r+2],i-r)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=Bt.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(At=[1],function(e){var t=1;if(At[e])return At[e];for(var n=e;n>1;n--)t*=n;return At[e]=t,t}),CatmullRom:function(e,t,n,i,r){var s=.5*(n-e),o=.5*(i-t),a=r*r;return(2*t-2*n+s+o)*(r*a)+(-3*t+3*n-2*s-o)*a+s*r+t}}},Mt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),It=new Ct,Pt=function(){function e(e,t){void 0===t&&(t=It),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Et.Linear.None,this._interpolationFunction=Bt.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=Mt.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?Dt()+parseFloat(e):e:Dt(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,i){for(var r in n){var s=e[r],o=Array.isArray(s),a=o?"array":typeof s,l=!o&&Array.isArray(n[r]);if("undefined"!==a&&"function"!==a){if(l){var c=n[r];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,s)),n[r]=[s].concat(c)}if("object"!==a&&!o||!s||l)void 0===t[r]&&(t[r]=s),o||(t[r]*=1),i[r]=l?n[r].slice().reverse():t[r]||0;else{for(var h in t[r]=o?[]:{},s)t[r][h]=s[h];i[r]=o?[]:{},this._setupProperties(s,t[r],n[r],i[r])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=Dt()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=Dt()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=Dt()),void 0===t&&(t=!0),this._isPaused)return!0;var n,i,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>r)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var s=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,a=this._chainedTweens.length;o<a;o++)this._chainedTweens[o].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,i){for(var r in n)if(void 0!==t[r]){var s=t[r]||0,o=n[r],a=Array.isArray(e[r]),l=Array.isArray(o);!a&&l?e[r]=this._interpolationFunction(o,i):"object"==typeof o&&o?this._updateProperties(e[r],s,o,i):"number"==typeof(o=this._handleRelativeValue(s,o))&&(e[r]=s+(o-s)*i)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),Ot=Mt.nextId,_t=It,Rt=_t.getAll.bind(_t),Lt=_t.removeAll.bind(_t),Nt=_t.add.bind(_t),kt=_t.remove.bind(_t),Ut=_t.update.bind(_t),jt={Easing:Et,Group:Ct,Interpolation:Bt,now:Dt,Sequence:Mt,nextId:Ot,Tween:Pt,VERSION:"18.6.4",getAll:Rt,removeAll:Lt,add:Nt,remove:kt,update:Ut};const Ft="[soonspacejs]: ",zt="Group",Ht="Light",Gt="Model",Vt="Poi",Yt="PoiNode",Qt="Canvas3D",Wt="Topology",Xt="Helper",Zt="PluginObject",Kt="In soonspacejs: ",qt=(e,t)=>{let n="";for(const e in t)n+=`${e}: ${t[e]};`;console.log(`%c${e}`,n)},Jt=e=>{console.warn(Kt+e)};function $t(e){return e instanceof t?e:new t(e.x,e.y,e.z)}function en(e){return e instanceof n?e:new n(e.x,e.y,e.z)}function tn(e){return new i(new t(0,0,0),new t(500,500,500)).setFromObject(e)}function nn(e,t,n){const i=n.clone();return Math.abs(t[e]-n[e])>Math.PI&&(t[e]>n[e]?i[e]+=2*Math.PI:i[e]-=2*Math.PI),i}function rn(e,t){const i=nn("x",e,t),r=nn("y",e,t),s=nn("z",e,t);return new n(i.x,r.y,s.z,t.order)}function sn(e){return Math.PI/180*e}function on(e){return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?{position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)}:{position:e.position.clone(),rotation:e.rotation.clone(),scale:e.scale.clone()}}function an(e,t){const n=on(t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);e.position.copy(n.position),e.rotation.copy(n.rotation),e.scale.copy(n.scale)}function ln(e){return!!e.visible&&(!e.parent||ln(e.parent))}class cn{constructor(){this.min=null,this.roots=[],this.nodes=new Map}shift(){const e=this.min;if(null===e||this.roots.length<1)return this.min=null,e;this.remove(e),this.roots.length>50&&this.consolidate();let t=1/0;const n=this.roots.length;for(let e=0;e<n;e++){const n=this.roots[e],i=this.getDistance(n);i<t&&(t=i,this.min=n)}return e}consolidate(){const e=[[],[],[],[],[],[],[]],t=e.length-1,n=this.roots.length;for(let i=0;i<n;i++){const n=this.roots[i],r=this.nodes.get(n);r&&r.depth<t&&e[r.depth].push(n)}for(let n=0;n<=t;n++)for(;e[n].length>1;){const i=e[n].shift(),r=e[n].shift(),s=n+1;let o=-1;if(void 0!==i&&void 0!==r){const n=this.nodes.get(i),a=this.nodes.get(r);n&&a&&(n.distance<a.distance?(n.depth=s,n.children.push(r),a.parent=i,s<=t&&e[s].push(i),o=this.roots.indexOf(r)):(a.depth=s,a.children.push(i),n.parent=r,s<=t&&e[s].push(r),o=this.roots.indexOf(i)))}o>-1&&this.roots.splice(o,1)}}add(e,t){if(this.nodes.set(e,{nodeIndex:e,distance:t,depth:0,parent:null,children:[]}),null===this.min)this.min=e;else{const n=this.nodes.get(this.min);n&&t<n.distance&&(this.min=e)}this.roots.push(e)}update(e,t){this.remove(e),this.add(e,t)}remove(e){var t,n;if(!this.nodes.has(e))return;const i=null===(t=this.nodes.get(e))||void 0===t?void 0:t.children;if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=i[t],r=this.nodes.get(n),s=this.nodes.get(e);r&&s&&(r.parent=s.parent),r&&null===r.parent&&this.roots.push(n)}let r=null===(n=this.nodes.get(e))||void 0===n?void 0:n.parent;if(null===r){const t=this.roots.indexOf(e);t>-1&&this.roots.splice(t,1)}else for(;r;){const e=this.nodes.get(r);e&&(e.depth--,r=e.parent)}}getDistance(e){const t=this.nodes.get(e);return t?t.distance:1/0}}function hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"];return new Promise((n=>{(new s).setPath(e).load(t,(e=>{e.format=o,n(e)}))}))}function un(e){if(!e)return null;const{colors:t,stops:n,size:i=1024}=e,r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return null;r.width=16,r.height=i;const o=s.createLinearGradient(0,0,0,i),c=new a,h=t.map((e=>c.set(e).getStyle()));for(let e=0,t=h.length-1;e<=t;e++)o.addColorStop(n?n[e]:e/t,h[e]);s.fillStyle=o,s.fillRect(0,0,16,i);const u=new l(r);return u.needsUpdate=!0,u}const dn=e=>{const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)};function fn(e){return In(e)?function(e){return e.map((e=>fn(e)))}(e):Pn(e)?function(e){if(Pn(e)){const t={};for(const n in e)t[n]=fn(e[n]);return t}return e}(e):e}const pn=(e,t)=>In(e)?e.map(t):t(e),gn=e=>pn(e,(e=>e.clone())),mn=e=>pn(e,(e=>e.dispose())),vn=async e=>{const t=await fetch(e);if(200===t.status)return t;throw new Error(`Failed to fetch file: ${e}`)},yn=new t,wn=new t,bn=new t;function xn(e,t){const n=yn.setFromMatrixPosition(e.matrixWorld),i=wn.setFromMatrixPosition(t.matrixWorld),r=n.sub(i),s=t.getWorldDirection(bn);return r.angleTo(s)>Math.PI/2}function An(e,t,n,i){const r=yn.setFromMatrixPosition(e.matrixWorld),s=r.clone();s.project(t),n.setFromCamera(s,t);const o=n.intersectObjects(i,!0);if(o.length){const e=o[0].distance;return r.distanceTo(n.ray.origin)<e}return!0}const Sn=e=>{"function"==typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e)};var Tn=function(){function e(){}return e.prototype.toJson=function(e,t){var n=this.xmlStringToXmlDom(e),i=this.xmlToJson(n);return t?(t.removeLineBreaks&&this.removeLineBreaks(i),t.removeComments&&this.removeCommentProperties(i),t.transformTextOnly&&this.transformTextOnly(i),i):i},e.prototype.xmlStringToXmlDom=function(e){return(new DOMParser).parseFromString(e,"text/xml")},e.prototype.removeLineBreaks=function(e){var t=this;Object.keys(e).forEach((function(n,i){"#text"===n&&Array.isArray(e[n])&&delete e[n],"object"==typeof e[n]&&t.removeLineBreaks(e[n])}))},e.prototype.removeCommentProperties=function(e){var t=this;Object.keys(e).forEach((function(n,i){"#comment"===n&&delete e[n],"object"==typeof e[n]&&t.removeCommentProperties(e[n])}))},e.prototype.transformTextOnly=function(e){var t=this;Object.keys(e).forEach((function(n,i){var r=Object.keys(e[n]).length>1,s=Object.keys(e[n])[0];r||"object"==typeof e[n][s]?t.transformTextOnly(e[n]):"object"==typeof e[n]&&e[n]["#text"]&&(e[n]=e[n]["#text"])}))},e.prototype.xmlToJson=function(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t._attributes={};for(var n=0;n<e.attributes.length;n++){var i=e.attributes.item(n);t._attributes[i.nodeName]=i.nodeValue}}}else 3==e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes.item(r),o=s.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(s);else{if(void 0===t[o].push){var a=t[o];t[o]=[],t[o].push(a)}t[o].push(this.xmlToJson(s))}}return t},e}();function En(e){return vn(e).then((e=>e.text())).then((e=>Promise.resolve(function(e){return(new Tn).toJson(e,{transformTextOnly:!0,removeComments:!0,removeLineBreaks:!0})}(e))))}const Dn=Object.prototype.hasOwnProperty,Cn=e=>"String"===_n(e),Bn=e=>"Boolean"===_n(e),Mn=e=>"Number"===_n(e),In=Array.isArray,Pn=e=>"Object"===_n(e),On=e=>"Function"===_n(e),_n=e=>Object.prototype.toString.call(e).slice(8,-1),Rn=(e,t,n)=>String.fromCodePoint(...new Uint8Array(e,t,n)),Ln=()=>Ft+Math.random().toString(36).substring(7).split("").join("_"),Nn=e=>{var t;const{pathname:n}=new URL(e,location.origin);return null===(t=n.split(".").pop())||void 0===t?void 0:t.toLowerCase()};var kn=Object.freeze({__proto__:null,IVector3ToEuler:en,IVector3ToVector3:$t,MinHeap:cn,cloneDeep:fn,cloneMaterials:gn,deg2Euler:sn,disposeMaterials:mn,error:e=>{console.error(Kt+e)},euler2Deg:function(e){return e/(Math.PI/180)},exportGltf:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((n,i)=>{(new ht).parse(e,(e=>n(e)),(e=>i(e)),t)}))},fetchFile:vn,getAsciiString:Rn,getBoundingBox:tn,getCubeTexture:hn,getExtension:Nn,getSpaceAttributeFromObject:on,getValueType:_n,gradientTexture:un,hasOwn:(e,t)=>Dn.call(e,t),idleTask:Sn,isArray:In,isBoolean:Bn,isDate:e=>"Date"===_n(e),isFunction:On,isNull:e=>"Null"===_n(e),isNumber:Mn,isObject:Pn,isObjectBehindCamera:xn,isObjectOccludeVisible:An,isObjectVisible:ln,isPromise:e=>"Promise"===_n(e),isString:Cn,isSymbol:e=>"Symbol"===_n(e),isUndefined:e=>"Undefined"===_n(e),log:qt,materialHandle:pn,parseFilePath:dn,randomString:Ln,rotationAFix:rn,rotationAxisFix:nn,sleep:e=>new Promise((t=>setTimeout((()=>t()),e))),syncSpaceAttributeToObject:an,warn:Jt,xmlToJson:En});const Un={"Linear.None":Et.Linear.None,"Quadratic.In":Et.Quadratic.In,"Quadratic.Out":Et.Quadratic.Out,"Quadratic.InOut":Et.Quadratic.InOut,"Cubic.In":Et.Cubic.In,"Cubic.Out":Et.Cubic.Out,"Cubic.InOut":Et.Cubic.InOut,"Quartic.In":Et.Quartic.In,"Quartic.Out":Et.Quartic.Out,"Quartic.InOut":Et.Quartic.InOut,"Quintic.In":Et.Quintic.In,"Quintic.Out":Et.Quintic.Out,"Quintic.InOut":Et.Quintic.InOut,"Sinusoidal.In":Et.Sinusoidal.In,"Sinusoidal.Out":Et.Sinusoidal.Out,"Sinusoidal.InOut":Et.Sinusoidal.InOut,"Exponential.In":Et.Exponential.In,"Exponential.Out":Et.Exponential.Out,"Exponential.InOut":Et.Exponential.InOut,"Circular.In":Et.Circular.In,"Circular.Out":Et.Circular.Out,"Circular.InOut":Et.Circular.InOut,"Elastic.In":Et.Elastic.In,"Elastic.Out":Et.Elastic.Out,"Elastic.InOut":Et.Elastic.InOut,"Back.In":Et.Back.In,"Back.Out":Et.Back.Out,"Back.InOut":Et.Back.InOut,"Bounce.In":Et.Bounce.In,"Bounce.Out":Et.Bounce.Out,"Bounce.InOut":Et.Bounce.InOut};function jn(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;return new Promise(((o,a)=>{const{duration:l=1e3,delay:c=0,repeat:h=!1,mode:u="Linear.None",yoyo:d=!1}=i,f=Un[u],p=new Pt(e).to(t,l).easing(f).delay(c).onUpdate((i=>{e instanceof n&&t instanceof n&&i instanceof n&&(i.order=t.order),null==r||r(i,p)})).onComplete((()=>{o()})).onStop((()=>{a("animation stop")})).onStart((()=>{null==s||s(p)}));Mn(h)?p.repeat(h):Bn(h)&&h&&p.repeat(1/0),p.yoyo(d),p.start()}))}class Fn{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.target=e,this.points=t,this.speed=1,this.reverse=!1,this.needsRotate=!0,this.index=1,this._tween=null,Object.assign(this,n)}get isPlaying(){var e;return!!(null===(e=this._tween)||void 0===e?void 0:e.isPlaying())}async play(){if(this.isPlaying)return!1;this.index=1;let e=this.points.slice();return this.reverse&&(e=e.reverse()),this._play(e)}async _play(e){var t,n;const{target:i}=this,r=null!==(t=this.speed)&&void 0!==t?t:1,s=this.index;let o=e[s-1];if(!o)return!0;o.isVector3||(o=$t(o)),o=o.clone();let a=e[s];if(!a)return!0;a.isVector3||(a=$t(a).clone()),a=a.clone();const l=o.distanceTo(a)/r;this.needsRotate&&(1===s&&i.parent&&i.position.copy(i.parent.worldToLocal(o.clone())),i.lookAt(a)),await jn(o,a,{duration:l},((e,t)=>{var n;if(i.parent){const t=i.parent.worldToLocal(e.clone());i.position.copy(t)}null===(n=this.onUpdate)||void 0===n||n.call(this,e,t)}),(e=>{var t,n;1===s&&(null===(t=this.onStart)||void 0===t||t.call(this,e)),null===(n=this.onEveryStart)||void 0===n||n.call(this,e),this._tween=e})),null===(n=this.onPoint)||void 0===n||n.call(this,s,a),this.index++,await this._play(e)}pause(){var e;null===(e=this._tween)||void 0===e||e.pause()}resume(){var e;null===(e=this._tween)||void 0===e||e.resume()}stop(){var e;null===(e=this._tween)||void 0===e||e.stop(),this._tween=null}}const zn=0,Hn=1,Gn=2,Vn=2,Yn=1.25,Qn=1,Wn=32,Xn=65535,Zn=Math.pow(2,-24);class Kn{constructor(){}}function qn(e,t,n){return n.min.x=t[e],n.min.y=t[e+1],n.min.z=t[e+2],n.max.x=t[e+3],n.max.y=t[e+4],n.max.z=t[e+5],n}function Jn(e){let t=-1,n=-1/0;for(let i=0;i<3;i++){const r=e[i+3]-e[i];r>n&&(n=r,t=i)}return t}function $n(e,t){t.set(e)}function ei(e,t,n){let i,r;for(let s=0;s<3;s++){const o=s+3;i=e[s],r=t[s],n[s]=i<r?i:r,i=e[o],r=t[o],n[o]=i>r?i:r}}function ti(e,t,n){for(let i=0;i<3;i++){const r=t[e+2*i],s=t[e+2*i+1],o=r-s,a=r+s;o<n[i]&&(n[i]=o),a>n[i+3]&&(n[i+3]=a)}}function ni(e){const t=e[3]-e[0],n=e[4]-e[1],i=e[5]-e[2];return 2*(t*n+n*i+i*t)}function ii(e,t,n,i,r=null){let s=1/0,o=1/0,a=1/0,l=-1/0,c=-1/0,h=-1/0,u=1/0,d=1/0,f=1/0,p=-1/0,g=-1/0,m=-1/0;const v=null!==r;for(let i=6*t,r=6*(t+n);i<r;i+=6){const t=e[i+0],n=e[i+1],r=t-n,y=t+n;r<s&&(s=r),y>l&&(l=y),v&&t<u&&(u=t),v&&t>p&&(p=t);const w=e[i+2],b=e[i+3],x=w-b,A=w+b;x<o&&(o=x),A>c&&(c=A),v&&w<d&&(d=w),v&&w>g&&(g=w);const S=e[i+4],T=e[i+5],E=S-T,D=S+T;E<a&&(a=E),D>h&&(h=D),v&&S<f&&(f=S),v&&S>m&&(m=S)}i[0]=s,i[1]=o,i[2]=a,i[3]=l,i[4]=c,i[5]=h,v&&(r[0]=u,r[1]=d,r[2]=f,r[3]=p,r[4]=g,r[5]=m)}const ri=32,si=(e,t)=>e.candidate-t.candidate,oi=new Array(ri).fill().map((()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}))),ai=new Float32Array(6);function li(e,t){function n(e){f&&f(e/p)}function i(t,r,c,f=null,p=0){if(!g&&p>=l&&(g=!0,h&&(console.warn(`MeshBVH: Max depth of ${l} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),c<=u||p>=l)return n(r+c),t.offset=r,t.count=c,t;const m=function(e,t,n,i,r,s){let o=-1,a=0;if(s===zn)o=Jn(t),-1!==o&&(a=(t[o]+t[o+3])/2);else if(s===Hn)o=Jn(e),-1!==o&&(a=function(e,t,n,i){let r=0;for(let s=t,o=t+n;s<o;s++)r+=e[6*s+2*i];return r/n}(n,i,r,o));else if(s===Gn){const s=ni(e);let l=Yn*r;const c=6*i,h=6*(i+r);for(let e=0;e<3;e++){const i=t[e],u=(t[e+3]-i)/ri;if(r<ri/4){const t=[...oi];t.length=r;let i=0;for(let r=c;r<h;r+=6,i++){const s=t[i];s.candidate=n[r+2*e],s.count=0;const{bounds:o,leftCacheBounds:a,rightCacheBounds:l}=s;for(let e=0;e<3;e++)l[e]=1/0,l[e+3]=-1/0,a[e]=1/0,a[e+3]=-1/0,o[e]=1/0,o[e+3]=-1/0;ti(r,n,o)}t.sort(si);let u=r;for(let e=0;e<u;e++){const n=t[e];for(;e+1<u&&t[e+1].candidate===n.candidate;)t.splice(e+1,1),u--}for(let i=c;i<h;i+=6){const r=n[i+2*e];for(let e=0;e<u;e++){const s=t[e];r>=s.candidate?ti(i,n,s.rightCacheBounds):(ti(i,n,s.leftCacheBounds),s.count++)}}for(let n=0;n<u;n++){const i=t[n],c=i.count,h=r-i.count,u=i.leftCacheBounds,d=i.rightCacheBounds;let f=0;0!==c&&(f=ni(u)/s);let p=0;0!==h&&(p=ni(d)/s);const g=Qn+Yn*(f*c+p*h);g<l&&(o=e,l=g,a=i.candidate)}}else{for(let e=0;e<ri;e++){const t=oi[e];t.count=0,t.candidate=i+u+e*u;const n=t.bounds;for(let e=0;e<3;e++)n[e]=1/0,n[e+3]=-1/0}for(let t=c;t<h;t+=6){let r=~~((n[t+2*e]-i)/u);r>=ri&&(r=ri-1);const s=oi[r];s.count++,ti(t,n,s.bounds)}const t=oi[ri-1];$n(t.bounds,t.rightCacheBounds);for(let e=ri-2;e>=0;e--){const t=oi[e],n=oi[e+1];ei(t.bounds,n.rightCacheBounds,t.rightCacheBounds)}let d=0;for(let t=0;t<ri-1;t++){const n=oi[t],i=n.count,c=n.bounds,h=oi[t+1].rightCacheBounds;0!==i&&(0===d?$n(c,ai):ei(c,ai,ai)),d+=i;let u=0,f=0;0!==d&&(u=ni(ai)/s);const p=r-d;0!==p&&(f=ni(h)/s);const g=Qn+Yn*(u*d+f*p);g<l&&(o=e,l=g,a=n.candidate)}}}}else console.warn(`MeshBVH: Invalid build strategy value ${s} used.`);return{axis:o,pos:a}}(t.boundingData,f,o,r,c,d);if(-1===m.axis)return n(r+c),t.offset=r,t.count=c,t;const v=function(e,t,n,i,r){let s=n,o=n+i-1;const a=r.pos,l=2*r.axis;for(;;){for(;s<=o&&t[6*s+l]<a;)s++;for(;s<=o&&t[6*o+l]>=a;)o--;if(!(s<o))return s;for(let n=0;n<3;n++){let i=e[3*s+n];e[3*s+n]=e[3*o+n],e[3*o+n]=i;let r=t[6*s+2*n+0];t[6*s+2*n+0]=t[6*o+2*n+0],t[6*o+2*n+0]=r;let a=t[6*s+2*n+1];t[6*s+2*n+1]=t[6*o+2*n+1],t[6*o+2*n+1]=a}s++,o--}}(a,o,r,c,m);if(v===r||v===r+c)n(r+c),t.offset=r,t.count=c;else{t.splitAxis=m.axis;const e=new Kn,n=r,a=v-r;t.left=e,e.boundingData=new Float32Array(6),ii(o,n,a,e.boundingData,s),i(e,n,a,s,p+1);const l=new Kn,h=v,u=c-a;t.right=l,l.boundingData=new Float32Array(6),ii(o,h,u,l.boundingData,s),i(l,h,u,s,p+1)}return t}!function(e,t){if(!e.index){const n=e.attributes.position.count,i=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;let r;r=n>65535?new Uint32Array(new i(4*n)):new Uint16Array(new i(2*n)),e.setIndex(new c(r,1));for(let e=0;e<n;e++)r[e]=e}}(e,t);const r=new Float32Array(6),s=new Float32Array(6),o=function(e,t){const n=e.attributes.position,i=e.index.array,r=i.length/3,s=new Float32Array(6*r),o=n.normalized,a=n.array,l=n.offset||0;let c=3;n.isInterleavedBufferAttribute&&(c=n.data.stride);const h=["getX","getY","getZ"];for(let e=0;e<r;e++){const r=3*e,u=6*e;let d,f,p;o?(d=i[r+0],f=i[r+1],p=i[r+2]):(d=i[r+0]*c+l,f=i[r+1]*c+l,p=i[r+2]*c+l);for(let e=0;e<3;e++){let i,r,l;o?(i=n[h[e]](d),r=n[h[e]](f),l=n[h[e]](p)):(i=a[d+e],r=a[f+e],l=a[p+e]);let c=i;r<c&&(c=r),l<c&&(c=l);let g=i;r>g&&(g=r),l>g&&(g=l);const m=(g-c)/2,v=2*e;s[u+v+0]=c+m,s[u+v+1]=m+(Math.abs(c)+m)*Zn,c<t[e]&&(t[e]=c),g>t[e+3]&&(t[e+3]=g)}}return s}(e,r),a=e.index.array,l=t.maxDepth,h=t.verbose,u=t.maxLeafTris,d=t.strategy,f=t.onProgress,p=e.index.count/3;let g=!1;const m=[],v=function(e){if(!e.groups||!e.groups.length)return[{offset:0,count:e.index.count/3}];const t=[],n=new Set;for(const t of e.groups)n.add(t.start),n.add(t.start+t.count);const i=Array.from(n.values()).sort(((e,t)=>e-t));for(let e=0;e<i.length-1;e++){const n=i[e],r=i[e+1];t.push({offset:n/3,count:(r-n)/3})}return t}(e);if(1===v.length){const e=v[0],t=new Kn;t.boundingData=r,function(e,t,n,i){let r=1/0,s=1/0,o=1/0,a=-1/0,l=-1/0,c=-1/0;for(let i=6*t,h=6*(t+n);i<h;i+=6){const t=e[i+0];t<r&&(r=t),t>a&&(a=t);const n=e[i+2];n<s&&(s=n),n>l&&(l=n);const h=e[i+4];h<o&&(o=h),h>c&&(c=h)}i[0]=r,i[1]=s,i[2]=o,i[3]=a,i[4]=l,i[5]=c}(o,e.offset,e.count,s),i(t,e.offset,e.count,s),m.push(t)}else for(let e of v){const t=new Kn;t.boundingData=new Float32Array(6),ii(o,e.offset,e.count,t.boundingData,s),i(t,e.offset,e.count,s),m.push(t)}return m}class ci{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let n=1/0,i=-1/0;for(let r=0,s=e.length;r<s;r++){const s=e[r][t];n=s<n?s:n,i=s>i?s:i}this.min=n,this.max=i}setFromPoints(e,t){let n=1/0,i=-1/0;for(let r=0,s=t.length;r<s;r++){const s=t[r],o=e.dot(s);n=o<n?o:n,i=o>i?o:i}this.min=n,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}ci.prototype.setFromBox=function(){const e=new t;return function(t,n){const i=n.min,r=n.max;let s=1/0,o=-1/0;for(let n=0;n<=1;n++)for(let a=0;a<=1;a++)for(let l=0;l<=1;l++){e.x=i.x*n+r.x*(1-n),e.y=i.y*a+r.y*(1-a),e.z=i.z*l+r.z*(1-l);const c=t.dot(e);s=Math.min(c,s),o=Math.max(c,o)}this.min=s,this.max=o}}(),function(){const e=new ci}();const hi=function(){const e=new t,n=new t,i=new t;return function(t,r,s){const o=t.start,a=e,l=r.start,c=n;i.subVectors(o,l),e.subVectors(t.end,t.start),n.subVectors(r.end,r.start);const h=i.dot(c),u=c.dot(a),d=c.dot(c),f=i.dot(a),p=a.dot(a)*d-u*u;let g,m;g=0!==p?(h*u-f*d)/p:0,m=(h+g*u)/d,s.x=g,s.y=m}}(),ui=function(){const e=new h,n=new t,i=new t;return function(t,r,s,o){hi(t,r,e);let a=e.x,l=e.y;if(a>=0&&a<=1&&l>=0&&l<=1)return t.at(a,s),void r.at(l,o);if(a>=0&&a<=1)return l<0?r.at(0,o):r.at(1,o),void t.closestPointToPoint(o,!0,s);if(l>=0&&l<=1)return a<0?t.at(0,s):t.at(1,s),void r.closestPointToPoint(s,!0,o);{let e,c;e=a<0?t.start:t.end,c=l<0?r.start:r.end;const h=n,u=i;return t.closestPointToPoint(c,!0,n),r.closestPointToPoint(e,!0,i),h.distanceToSquared(c)<=u.distanceToSquared(e)?(s.copy(h),void o.copy(c)):(s.copy(e),void o.copy(u))}}}(),di=function(){const e=new t,n=new t,i=new u,r=new d;return function(t,s){const{radius:o,center:a}=t,{a:l,b:c,c:h}=s;r.start=l,r.end=c;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;r.start=l,r.end=h;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;r.start=c,r.end=h;if(r.closestPointToPoint(a,!0,e).distanceTo(a)<=o)return!0;const u=s.getPlane(i);if(Math.abs(u.distanceToPoint(a))<=o){const e=u.projectPoint(a,n);if(s.containsPoint(e))return!0}return!1}}(),fi=1e-15;function pi(e){return Math.abs(e)<fi}class gi extends f{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map((()=>new t)),this.satBounds=new Array(4).fill().map((()=>new ci)),this.points=[this.a,this.b,this.c],this.sphere=new p,this.plane=new u,this.needsUpdate=!0}intersectsSphere(e){return di(e,this)}update(){const e=this.a,t=this.b,n=this.c,i=this.points,r=this.satAxes,s=this.satBounds,o=r[0],a=s[0];this.getNormal(o),a.setFromPoints(o,i);const l=r[1],c=s[1];l.subVectors(e,t),c.setFromPoints(l,i);const h=r[2],u=s[2];h.subVectors(t,n),u.setFromPoints(h,i);const d=r[3],f=s[3];d.subVectors(n,e),f.setFromPoints(d,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}gi.prototype.closestPointToSegment=function(){const e=new t,n=new t,i=new d;return function(t,r=null,s=null){const{start:o,end:a}=t,l=this.points;let c,h=1/0;for(let o=0;o<3;o++){const a=(o+1)%3;i.start.copy(l[o]),i.end.copy(l[a]),ui(i,t,e,n),c=e.distanceToSquared(n),c<h&&(h=c,r&&r.copy(e),s&&s.copy(n))}return this.closestPointToPoint(o,e),c=o.distanceToSquared(e),c<h&&(h=c,r&&r.copy(e),s&&s.copy(o)),this.closestPointToPoint(a,e),c=a.distanceToSquared(e),c<h&&(h=c,r&&r.copy(e),s&&s.copy(a)),Math.sqrt(h)}}(),gi.prototype.intersectsTriangle=function(){const e=new gi,n=new Array(3),i=new Array(3),r=new ci,s=new ci,o=new t,a=new t,l=new t,c=new t,h=new d,u=new d,f=new d;return function(t,d=null,p=!1){this.needsUpdate&&this.update(),t.isExtendedTriangle?t.needsUpdate&&t.update():(e.copy(t),e.update(),t=e);const g=this.plane,m=t.plane;if(Math.abs(g.normal.dot(m.normal))>1-1e-10){const e=this.satBounds,a=this.satAxes;i[0]=t.a,i[1]=t.b,i[2]=t.c;for(let t=0;t<4;t++){const n=e[t],s=a[t];if(r.setFromPoints(s,i),n.isSeparated(r))return!1}const l=t.satBounds,c=t.satAxes;n[0]=this.a,n[1]=this.b,n[2]=this.c;for(let e=0;e<4;e++){const t=l[e],i=c[e];if(r.setFromPoints(i,n),t.isSeparated(r))return!1}for(let e=0;e<4;e++){const t=a[e];for(let e=0;e<4;e++){const a=c[e];if(o.crossVectors(t,a),r.setFromPoints(o,n),s.setFromPoints(o,i),r.isSeparated(s))return!1}}return d&&(p||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),d.start.set(0,0,0),d.end.set(0,0,0)),!0}{const e=this.points;let n=!1,i=0;for(let t=0;t<3;t++){const r=e[t],s=e[(t+1)%3];h.start.copy(r),h.end.copy(s),h.delta(a);const o=n?u.start:u.end,l=pi(m.distanceToPoint(r));if(pi(m.normal.dot(a))&&l){u.copy(h),i=2;break}if((m.intersectLine(h,o)||l)&&!pi(o.distanceTo(s))){if(i++,n)break;n=!0}}if(1===i&&t.containsPoint(u.end))return d&&(d.start.copy(u.end),d.end.copy(u.end)),!0;if(2!==i)return!1;const r=t.points;let s=!1,o=0;for(let e=0;e<3;e++){const t=r[e],n=r[(e+1)%3];h.start.copy(t),h.end.copy(n),h.delta(l);const i=s?f.start:f.end,a=pi(g.distanceToPoint(t));if(pi(g.normal.dot(l))&&a){f.copy(h),o=2;break}if((g.intersectLine(h,i)||a)&&!pi(i.distanceTo(n))){if(o++,s)break;s=!0}}if(1===o&&this.containsPoint(f.end))return d&&(d.start.copy(f.end),d.end.copy(f.end)),!0;if(2!==o)return!1;if(u.delta(a),f.delta(l),a.dot(l)<0){let e=f.start;f.start=f.end,f.end=e}const p=u.start.dot(a),v=u.end.dot(a),y=f.start.dot(a),w=f.end.dot(a);return(p===w||y===v||v<y!==p<w)&&(d&&(c.subVectors(u.start,f.start),c.dot(a)>0?d.start.copy(u.start):d.start.copy(f.start),c.subVectors(u.end,f.end),c.dot(a)<0?d.end.copy(u.end):d.end.copy(f.end)),!0)}}}(),gi.prototype.distanceToPoint=function(){const e=new t;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),gi.prototype.distanceToTriangle=function(){const e=new t,n=new t,i=["a","b","c"],r=new d,s=new d;return function(t,o=null,a=null){const l=o||a?r:null;if(this.intersectsTriangle(t,l))return(o||a)&&(o&&l.getCenter(o),a&&l.getCenter(a)),0;let c=1/0;for(let n=0;n<3;n++){let r;const s=i[n],l=t[s];this.closestPointToPoint(l,e),r=l.distanceToSquared(e),r<c&&(c=r,o&&o.copy(e),a&&a.copy(l));const h=this[s];t.closestPointToPoint(h,e),r=h.distanceToSquared(e),r<c&&(c=r,o&&o.copy(h),a&&a.copy(e))}for(let l=0;l<3;l++){const h=i[l],u=i[(l+1)%3];r.set(this[h],this[u]);for(let l=0;l<3;l++){const h=i[l],u=i[(l+1)%3];s.set(t[h],t[u]),ui(r,s,e,n);const d=e.distanceToSquared(n);d<c&&(c=d,o&&o.copy(e),a&&a.copy(n))}}return Math.sqrt(c)}}();class mi{constructor(e,n,i){this.isOrientedBox=!0,this.min=new t,this.max=new t,this.matrix=new g,this.invMatrix=new g,this.points=new Array(8).fill().map((()=>new t)),this.satAxes=new Array(3).fill().map((()=>new t)),this.satBounds=new Array(3).fill().map((()=>new ci)),this.alignedSatBounds=new Array(3).fill().map((()=>new ci)),this.needsUpdate=!1,e&&this.min.copy(e),n&&this.max.copy(n),i&&this.matrix.copy(i)}set(e,t,n){this.min.copy(e),this.max.copy(t),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}mi.prototype.update=function(){const e=this.matrix,t=this.min,n=this.max,i=this.points;for(let r=0;r<=1;r++)for(let s=0;s<=1;s++)for(let o=0;o<=1;o++){const a=i[1*r|2*s|4*o];a.x=r?n.x:t.x,a.y=s?n.y:t.y,a.z=o?n.z:t.z,a.applyMatrix4(e)}const r=this.satBounds,s=this.satAxes,o=i[0];for(let e=0;e<3;e++){const t=s[e],n=r[e],a=i[1<<e];t.subVectors(o,a),n.setFromPoints(t,i)}const a=this.alignedSatBounds;a[0].setFromPointsField(i,"x"),a[1].setFromPointsField(i,"y"),a[2].setFromPointsField(i,"z"),this.invMatrix.copy(this.matrix).invert(),this.needsUpdate=!1},mi.prototype.intersectsBox=function(){const e=new ci;return function(t){this.needsUpdate&&this.update();const n=t.min,i=t.max,r=this.satBounds,s=this.satAxes,o=this.alignedSatBounds;if(e.min=n.x,e.max=i.x,o[0].isSeparated(e))return!1;if(e.min=n.y,e.max=i.y,o[1].isSeparated(e))return!1;if(e.min=n.z,e.max=i.z,o[2].isSeparated(e))return!1;for(let n=0;n<3;n++){const i=s[n],o=r[n];if(e.setFromBox(i,t),o.isSeparated(e))return!1}return!0}}(),mi.prototype.intersectsTriangle=function(){const e=new gi,n=new Array(3),i=new ci,r=new ci,s=new t;return function(t){this.needsUpdate&&this.update(),t.isExtendedTriangle?t.needsUpdate&&t.update():(e.copy(t),e.update(),t=e);const o=this.satBounds,a=this.satAxes;n[0]=t.a,n[1]=t.b,n[2]=t.c;for(let e=0;e<3;e++){const t=o[e],r=a[e];if(i.setFromPoints(r,n),t.isSeparated(i))return!1}const l=t.satBounds,c=t.satAxes,h=this.points;for(let e=0;e<3;e++){const t=l[e],n=c[e];if(i.setFromPoints(n,h),t.isSeparated(i))return!1}for(let e=0;e<3;e++){const t=a[e];for(let e=0;e<4;e++){const o=c[e];if(s.crossVectors(t,o),i.setFromPoints(s,n),r.setFromPoints(s,h),i.isSeparated(r))return!1}}return!0}}(),mi.prototype.closestPointToPoint=function(e,t){return this.needsUpdate&&this.update(),t.copy(e).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix),t},mi.prototype.distanceToPoint=function(){const e=new t;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),mi.prototype.distanceToBox=function(){const e=["x","y","z"],n=new Array(12).fill().map((()=>new d)),i=new Array(12).fill().map((()=>new d)),r=new t,s=new t;return function(t,o=0,a=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(t))return(a||l)&&(t.getCenter(s),this.closestPointToPoint(s,r),t.closestPointToPoint(r,s),a&&a.copy(r),l&&l.copy(s)),0;const c=o*o,h=t.min,u=t.max,d=this.points;let f=1/0;for(let e=0;e<8;e++){const t=d[e];s.copy(t).clamp(h,u);const n=t.distanceToSquared(s);if(n<f&&(f=n,a&&a.copy(t),l&&l.copy(s),n<c))return Math.sqrt(n)}let p=0;for(let t=0;t<3;t++)for(let r=0;r<=1;r++)for(let s=0;s<=1;s++){const o=(t+1)%3,a=(t+2)%3,l=1<<t|r<<o|s<<a,c=d[r<<o|s<<a],f=d[l];n[p].set(c,f);const g=e[t],m=e[o],v=e[a],y=i[p],w=y.start,b=y.end;w[g]=h[g],w[m]=r?h[m]:u[m],w[v]=s?h[v]:u[m],b[g]=u[g],b[m]=r?h[m]:u[m],b[v]=s?h[v]:u[m],p++}for(let e=0;e<=1;e++)for(let t=0;t<=1;t++)for(let n=0;n<=1;n++){s.x=e?u.x:h.x,s.y=t?u.y:h.y,s.z=n?u.z:h.z,this.closestPointToPoint(s,r);const i=s.distanceToSquared(r);if(i<f&&(f=i,a&&a.copy(r),l&&l.copy(s),i<c))return Math.sqrt(i)}for(let e=0;e<12;e++){const t=n[e];for(let e=0;e<12;e++){const n=i[e];ui(t,n,r,s);const o=r.distanceToSquared(s);if(o<f&&(f=o,a&&a.copy(r),l&&l.copy(s),o<c))return Math.sqrt(o)}}return Math.sqrt(f)}}();const vi=new t,yi=new t,wi=new t,bi=new h,xi=new h,Ai=new h,Si=new t;function Ti(e,n,i,r,s,o,a){vi.fromBufferAttribute(n,r),yi.fromBufferAttribute(n,s),wi.fromBufferAttribute(n,o);const l=function(e,t,n,i,r,s){let o;return o=s===m?e.intersectTriangle(i,n,t,!0,r):e.intersectTriangle(t,n,i,s!==v,r),null===o?null:{distance:e.origin.distanceTo(r),point:r.clone()}}(e,vi,yi,wi,Si,a);if(l){i&&(bi.fromBufferAttribute(i,r),xi.fromBufferAttribute(i,s),Ai.fromBufferAttribute(i,o),l.uv=f.getUV(Si,vi,yi,wi,bi,xi,Ai,new h));const e={a:r,b:s,c:o,normal:new t,materialIndex:0};f.getNormal(vi,yi,wi,e.normal),l.face=e,l.faceIndex=r}return l}function Ei(e,t,n,i,r){const s=3*i,o=e.index.getX(s),a=e.index.getX(s+1),l=e.index.getX(s+2),c=Ti(n,e.attributes.position,e.attributes.uv,o,a,l,t);return c?(c.faceIndex=i,r&&r.push(c),c):null}function Di(e,t,n){return null===e?null:(e.point.applyMatrix4(t.matrixWorld),e.distance=e.point.distanceTo(n.ray.origin),e.object=t,e.distance<n.near||e.distance>n.far?null:e)}function Ci(e,t,n,i){const r=e.a,s=e.b,o=e.c;let a=t,l=t+1,c=t+2;n&&(a=n.getX(t),l=n.getX(t+1),c=n.getX(t+2)),r.x=i.getX(a),r.y=i.getY(a),r.z=i.getZ(a),s.x=i.getX(l),s.y=i.getY(l),s.z=i.getZ(l),o.x=i.getX(c),o.y=i.getY(c),o.z=i.getZ(c)}function Bi(e,t,n,i,r,s,o){const a=n.index,l=n.attributes.position;for(let n=e,c=t+e;n<c;n++)if(Ci(o,3*n,a,l),o.needsUpdate=!0,i(o,n,r,s))return!0;return!1}class Mi{constructor(e){this._getNewPrimitive=e,this._primitives=[]}getPrimitive(){const e=this._primitives;return 0===e.length?this._getNewPrimitive():e.pop()}releasePrimitive(e){this._primitives.push(e)}}function Ii(e,t){return 65535===t[e+15]}function Pi(e,t){return t[e+6]}function Oi(e,t){return t[e+14]}function _i(e){return e+8}function Ri(e,t){return t[e+6]}const Li=new i,Ni=new t,ki=["x","y","z"];function Ui(e,t,n,i,r){let s=2*e,o=Yi,a=Qi,l=Wi;if(Ii(s,a)){!function(e,t,n,i,r,s){for(let o=i,a=i+r;o<a;o++)Ei(e,t,n,o,s)}(t,n,i,Pi(e,l),Oi(s,a),r)}else{const s=_i(e);Hi(s,o,i,Ni)&&Ui(s,t,n,i,r);const a=Ri(e,l);Hi(a,o,i,Ni)&&Ui(a,t,n,i,r)}}function ji(e,t,n,i){let r=2*e,s=Yi,o=Qi,a=Wi;if(Ii(r,o)){return function(e,t,n,i,r){let s=1/0,o=null;for(let a=i,l=i+r;a<l;a++){const i=Ei(e,t,n,a);i&&i.distance<s&&(o=i,s=i.distance)}return o}(t,n,i,Pi(e,a),Oi(r,o))}{const r=function(e,t){return t[e+7]}(e,a),o=ki[r],l=i.direction[o]>=0;let c,h;l?(c=_i(e),h=Ri(e,a)):(c=Ri(e,a),h=_i(e));const u=Hi(c,s,i,Ni)?ji(c,t,n,i):null;if(u){const e=u.point[o];if(l?e<=s[h+r]:e>=s[h+r+3])return u}const d=Hi(h,s,i,Ni)?ji(h,t,n,i):null;return u&&d?u.distance<=d.distance?u:d:u||d||null}}const Fi=function(){let e,t;const n=[],r=new Mi((()=>new i));return function(...i){e=r.getPrimitive(),t=r.getPrimitive(),n.push(e,t);const o=s(...i);r.releasePrimitive(e),r.releasePrimitive(t),n.pop(),n.pop();const a=n.length;return a>0&&(t=n[a-1],e=n[a-2]),o};function s(n,i,r,o,a=null,l=0,c=0){function h(e){let t=2*e,n=Qi,i=Wi;for(;!Ii(t,n);)t=2*(e=_i(e));return Pi(e,i)}function u(e){let t=2*e,n=Qi,i=Wi;for(;!Ii(t,n);)t=2*(e=Ri(e,i));return Pi(e,i)+Oi(t,n)}let d=2*n,f=Yi,p=Qi,g=Wi;if(Ii(d,p)){const t=Pi(n,g),i=Oi(d,p);return qn(n,f,e),o(t,i,!1,c,l+n,e)}{const d=_i(n),m=Ri(n,g);let v,y,w,b,x=d,A=m;if(a&&(w=e,b=t,qn(x,f,w),qn(A,f,b),v=a(w),y=a(b),y<v)){x=m,A=d;const e=v;v=y,y=e,w=b}w||(w=e,qn(x,f,w));const S=r(w,Ii(2*x,p),v,c+1,l+x);let T;if(S===Vn){const e=h(x);T=o(e,u(x)-e,!0,c+1,l+x,w)}else T=S&&s(x,i,r,o,a,l,c+1);if(T)return!0;b=t,qn(A,f,b);const E=r(b,Ii(2*A,p),y,c+1,l+A);let D;if(E===Vn){const e=h(A);D=o(e,u(A)-e,!0,c+1,l+A,b)}else D=E&&s(A,i,r,o,a,l,c+1);return!!D}}}(),zi=function(){const e=new gi,t=new gi,n=new g,i=new mi,r=new mi;return function s(o,a,l,c,h=null){let u=2*o,d=Yi,f=Qi,p=Wi;null===h&&(l.boundingBox||l.computeBoundingBox(),i.set(l.boundingBox.min,l.boundingBox.max,c),h=i);if(!Ii(u,f)){const e=o+8,t=p[o+6];qn(e,d,Li);if(h.intersectsBox(Li)&&s(e,a,l,c,h))return!0;qn(t,d,Li);return!!(h.intersectsBox(Li)&&s(t,a,l,c,h))}{const i=a,s=i.index,h=i.attributes.position,g=l.index,m=l.attributes.position,v=Pi(o,p),y=Oi(u,f);if(n.copy(c).invert(),l.boundsTree){qn(o,d,r),r.matrix.copy(n),r.needsUpdate=!0;return l.boundsTree.shapecast({intersectsBounds:e=>r.intersectsBox(e),intersectsTriangle:e=>{e.a.applyMatrix4(c),e.b.applyMatrix4(c),e.c.applyMatrix4(c),e.needsUpdate=!0;for(let n=3*v,i=3*(y+v);n<i;n+=3)if(Ci(t,n,s,h),t.needsUpdate=!0,e.intersectsTriangle(t))return!0;return!1}})}for(let i=3*v,r=y+3*v;i<r;i+=3){Ci(e,i,s,h),e.a.applyMatrix4(n),e.b.applyMatrix4(n),e.c.applyMatrix4(n),e.needsUpdate=!0;for(let n=0,i=g.count;n<i;n+=3)if(Ci(t,n,g,m),t.needsUpdate=!0,e.intersectsTriangle(t))return!0}}}}();function Hi(e,t,n,i){return qn(e,t,Li),n.intersectBox(Li,i)}const Gi=[];let Vi,Yi,Qi,Wi;function Xi(e){Vi&&Gi.push(Vi),Vi=e,Yi=new Float32Array(e),Qi=new Uint16Array(e),Wi=new Uint32Array(e)}function Zi(){Vi=null,Yi=null,Qi=null,Wi=null,Gi.length&&Xi(Gi.pop())}const Ki=Symbol("skip tree generation"),qi=new i,Ji=new i,$i=new g,er=new mi,tr=new mi,nr=new t,ir=new t,rr=new t,sr=new t,or=new t,ar=new i,lr=new Mi((()=>new gi));class cr{static serialize(e,t={}){if(t.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),cr.serialize(arguments[0],{cloneBuffers:void 0===arguments[2]||arguments[2]});t={cloneBuffers:!0,...t};const n=e.geometry,i=e._roots,r=n.getIndex();let s;return s=t.cloneBuffers?{roots:i.map((e=>e.slice())),index:r.array.slice()}:{roots:i,index:r.array},s}static deserialize(e,t,n={}){if("boolean"==typeof n)return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),cr.deserialize(arguments[0],arguments[1],{setIndex:void 0===arguments[2]||arguments[2]});n={setIndex:!0,...n};const{index:i,roots:r}=e,s=new cr(t,{...n,[Ki]:!0});if(s._roots=r,n.setIndex){const n=t.getIndex();if(null===n){const n=new c(e.index,1,!1);t.setIndex(n)}else n.array!==i&&(n.array.set(i),n.needsUpdate=!0)}return s}constructor(e,t={}){if(!e.isBufferGeometry)throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");if((t=Object.assign({strategy:zn,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[Ki]:!1},t)).useSharedArrayBuffer&&"undefined"==typeof SharedArrayBuffer)throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,t[Ki]||(this._roots=function(e,t){const n=li(e,t);let i,r,s;const o=[],a=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let e=0;e<n.length;e++){const t=n[e];let h=l(t);const u=new a(Wn*h);i=new Float32Array(u),r=new Uint32Array(u),s=new Uint16Array(u),c(0,t),o.push(u)}return o;function l(e){return e.count?1:1+l(e.left)+l(e.right)}function c(e,t){const n=e/4,o=e/2,a=!!t.count,l=t.boundingData;for(let e=0;e<6;e++)i[n+e]=l[e];if(a){const i=t.offset,a=t.count;return r[n+6]=i,s[o+14]=a,s[o+15]=Xn,e+Wn}{const i=t.left,s=t.right,o=t.splitAxis;let a;if(a=c(e+Wn,i),a/4>Math.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return r[n+6]=a/4,a=c(a,s),r[n+7]=o,a}}}(e,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new i))),this.geometry=e}refit(e=null){e&&Array.isArray(e)&&(e=new Set(e));const t=this.geometry,n=t.index.array,i=t.attributes.position;let r,s,o,a,l=0;const c=this._roots;for(let e=0,t=c.length;e<t;e++)r=c[e],s=new Uint32Array(r),o=new Uint16Array(r),a=new Float32Array(r),h(0,l),l+=r.byteLength;function h(t,r,l=!1){const c=2*t;if(o[c+15]===Xn){const e=s[t+6];let r=1/0,l=1/0,h=1/0,u=-1/0,d=-1/0,f=-1/0;for(let t=3*e,s=3*(e+o[c+14]);t<s;t++){const e=n[t],s=i.getX(e),o=i.getY(e),a=i.getZ(e);s<r&&(r=s),s>u&&(u=s),o<l&&(l=o),o>d&&(d=o),a<h&&(h=a),a>f&&(f=a)}return(a[t+0]!==r||a[t+1]!==l||a[t+2]!==h||a[t+3]!==u||a[t+4]!==d||a[t+5]!==f)&&(a[t+0]=r,a[t+1]=l,a[t+2]=h,a[t+3]=u,a[t+4]=d,a[t+5]=f,!0)}{const n=t+8,i=s[t+6],o=n+r,c=i+r;let u=l,d=!1,f=!1;e?u||(d=e.has(o),f=e.has(c),u=!d&&!f):(d=!0,f=!0);const p=u||f;let g=!1;(u||d)&&(g=h(n,r,u));let m=!1;p&&(m=h(i,r,u));const v=g||m;if(v)for(let e=0;e<3;e++){const r=n+e,s=i+e,o=a[r],l=a[r+3],c=a[s],h=a[s+3];a[t+e]=o<c?o:c,a[t+e+3]=l>h?l:h}return v}}}traverse(e,t=0){const n=this._roots[t],i=new Uint32Array(n),r=new Uint16Array(n);!function t(s,o=0){const a=2*s,l=r[a+15]===Xn;if(l){const t=i[s+6],c=r[a+14];e(o,l,new Float32Array(n,4*s,6),t,c)}else{const r=s+Wn/4,a=i[s+6],c=i[s+7];e(o,l,new Float32Array(n,4*s,6),c)||(t(r,o+1),t(a,o+1))}}(0)}raycast(e,t=y){const n=this._roots,i=this.geometry,r=[],s=t.isMaterial,o=Array.isArray(t),a=i.groups,l=s?t.side:t;for(let s=0,c=n.length;s<c;s++){const c=o?t[a[s].materialIndex].side:l,h=r.length;if(Xi(n[s]),Ui(0,i,c,e,r),Zi(),o){const e=a[s].materialIndex;for(let t=h,n=r.length;t<n;t++)r[t].face.materialIndex=e}}return r}raycastFirst(e,t=y){const n=this._roots,i=this.geometry,r=t.isMaterial,s=Array.isArray(t);let o=null;const a=i.groups,l=r?t.side:t;for(let r=0,c=n.length;r<c;r++){const c=s?t[a[r].materialIndex].side:l;Xi(n[r]);const h=ji(0,i,c,e);Zi(),null!=h&&(null==o||h.distance<o.distance)&&(o=h,s&&(h.face.materialIndex=a[r].materialIndex))}return o}intersectsGeometry(e,t){const n=this.geometry;let i=!1;for(const r of this._roots)if(Xi(r),i=zi(0,n,e,t),Zi(),i)break;return i}shapecast(e,t,n){const i=this.geometry;if(e instanceof Function){if(t){const e=t;t=(t,n,i,r)=>{const s=3*n;return e(t,s,s+1,s+2,i,r)}}e={boundsTraverseOrder:n,intersectsBounds:e,intersectsTriangle:t,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}const r=lr.getPrimitive();let{boundsTraverseOrder:s,intersectsBounds:o,intersectsRange:a,intersectsTriangle:l}=e;if(a&&l){const e=a;a=(t,n,s,o,a)=>!!e(t,n,s,o,a)||Bi(t,n,i,l,s,o,r)}else a||(a=l?(e,t,n,s)=>Bi(e,t,i,l,n,s,r):(e,t,n)=>n);let c=!1,h=0;for(const e of this._roots){if(Xi(e),c=Fi(0,i,o,a,s,h),Zi(),c)break;h+=e.byteLength}return lr.releasePrimitive(r),c}bvhcast(e,t,n){let{intersectsRanges:i,intersectsTriangles:r}=n;const s=this.geometry.index,o=this.geometry.attributes.position,a=e.geometry.index,l=e.geometry.attributes.position;$i.copy(t).invert();const c=lr.getPrimitive(),h=lr.getPrimitive();if(r){function d(e,n,i,u,d,f,p,g){for(let m=i,v=i+u;m<v;m++){Ci(h,3*m,a,l),h.a.applyMatrix4(t),h.b.applyMatrix4(t),h.c.applyMatrix4(t),h.needsUpdate=!0;for(let t=e,i=e+n;t<i;t++)if(Ci(c,3*t,s,o),c.needsUpdate=!0,r(c,h,t,m,d,f,p,g))return!0}return!1}if(i){const f=i;i=function(e,t,n,i,r,s,o,a){return!!f(e,t,n,i,r,s,o,a)||d(e,t,n,i,r,s,o,a)}}else i=d}e.getBoundingBox(Ji),Ji.applyMatrix4(t);const u=this.shapecast({intersectsBounds:e=>Ji.intersectsBox(e),intersectsRange:(t,n,r,s,o,a)=>(qi.copy(a),qi.applyMatrix4($i),e.shapecast({intersectsBounds:e=>qi.intersectsBox(e),intersectsRange:(e,r,a,l,c)=>i(t,n,e,r,s,o,l,c)}))});return lr.releasePrimitive(c),lr.releasePrimitive(h),u}intersectsBox(e,t){return er.set(e.min,e.max,t),er.needsUpdate=!0,this.shapecast({intersectsBounds:e=>er.intersectsBox(e),intersectsTriangle:e=>er.intersectsTriangle(e)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,n={},i={},r=0,s=1/0){e.boundingBox||e.computeBoundingBox(),er.set(e.boundingBox.min,e.boundingBox.max,t),er.needsUpdate=!0;const o=this.geometry,a=o.attributes.position,l=o.index,c=e.attributes.position,h=e.index,u=lr.getPrimitive(),d=lr.getPrimitive();let f=ir,p=rr,g=null,m=null;i&&(g=sr,m=or);let v=1/0,y=null,w=null;return $i.copy(t).invert(),tr.matrix.copy($i),this.shapecast({boundsTraverseOrder:e=>er.distanceToBox(e),intersectsBounds:(e,t,n)=>n<v&&n<s&&(t&&(tr.min.copy(e.min),tr.max.copy(e.max),tr.needsUpdate=!0),!0),intersectsRange:(n,i)=>{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:e=>tr.distanceToBox(e),intersectsBounds:(e,t,n)=>n<v&&n<s,intersectsRange:(e,s)=>{for(let o=3*e,b=3*(e+s);o<b;o+=3){Ci(d,o,h,c),d.a.applyMatrix4(t),d.b.applyMatrix4(t),d.c.applyMatrix4(t),d.needsUpdate=!0;for(let e=3*n,t=3*(n+i);e<t;e+=3){Ci(u,e,l,a),u.needsUpdate=!0;const t=u.distanceToTriangle(d,f,g);if(t<v&&(p.copy(f),m&&m.copy(g),v=t,y=e/3,w=o/3),t<r)return!0}}}});for(let e=0,s=h?h.count:c.count;e<s;e+=3){Ci(d,e,h,c),d.a.applyMatrix4(t),d.b.applyMatrix4(t),d.c.applyMatrix4(t),d.needsUpdate=!0;for(let t=3*n,s=3*(n+i);t<s;t+=3){Ci(u,t,l,a),u.needsUpdate=!0;const n=u.distanceToTriangle(d,f,g);if(n<v&&(p.copy(f),m&&m.copy(g),v=n,y=t/3,w=e/3),n<r)return!0}}}}),lr.releasePrimitive(u),lr.releasePrimitive(d),v===1/0?null:(n.point?n.point.copy(p):n.point=p.clone(),n.distance=v,n.faceIndex=y,i&&(i.point?i.point.copy(m):i.point=m.clone(),i.point.applyMatrix4($i),p.applyMatrix4($i),i.distance=p.sub(i.point).length(),i.faceIndex=w),n)}closestPointToPoint(e,t={},n=0,i=1/0){const r=n*n,s=i*i;let o=1/0,a=null;if(this.shapecast({boundsTraverseOrder:t=>(nr.copy(e).clamp(t.min,t.max),nr.distanceToSquared(e)),intersectsBounds:(e,t,n)=>n<o&&n<s,intersectsTriangle:(t,n)=>{t.closestPointToPoint(e,nr);const i=e.distanceToSquared(nr);return i<o&&(ir.copy(nr),o=i,a=n),i<r}}),o===1/0)return null;const l=Math.sqrt(o);return t.point?t.point.copy(ir):t.point=ir.clone(),t.distance=l,t.faceIndex=a,t}getBoundingBox(e){e.makeEmpty();return this._roots.forEach((t=>{qn(0,new Float32Array(t),ar),e.union(ar)})),e}}const hr=new b,ur=new g,dr=w.prototype.raycast;var fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pr(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var gr={},mr={},vr=function(e,t){return vr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},vr(e,t)};var yr=function(){return yr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},yr.apply(this,arguments)};function wr(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}var br=Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]};function xr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ar(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function Sr(e){return this instanceof Sr?(this.v=e,this):new Sr(e)}var Tr=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Er(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Dr(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}var Cr=Object.freeze({__proto__:null,get __assign(){return yr},__asyncDelegator:function(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,r){t[i]=e[i]?function(t){return(n=!n)?{value:Sr(e[i](t)),done:!1}:r?r(t):t}:r}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){s.push([e,t,n,i])>1||a(e,t)}))})}function a(e,t){try{(n=r[e](t)).value instanceof Sr?Promise.resolve(n.value.v).then(l,c):h(s[0][2],n)}catch(e){h(s[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function h(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=xr(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,r){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,r,(t=e[n](t)).done,t.value)}))}}},__await:Sr,__awaiter:function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))},__classPrivateFieldGet:Er,__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:Dr,__createBinding:br,__decorate:function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},__esDecorate:function(e,t,n,i,r,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?i.static?e:e.prototype:null,u=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),d=!1,f=n.length-1;f>=0;f--){var p={};for(var g in i)p[g]="access"===g?{}:i[g];for(var g in i.access)p.access[g]=i.access[g];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var m=(0,n[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=o(m.get))&&(u.get=a),(a=o(m.set))&&(u.set=a),(a=o(m.init))&&r.push(a)}else(a=o(m))&&("field"===l?r.push(a):u[c]=a)}h&&Object.defineProperty(h,i.name,u),d=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||br(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}vr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&br(t,e,n);return Tr(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,i){t(n,i,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:Ar,__rest:wr,__runInitializers:function(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ar(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},__values:xr}),Br=pr(Cr),Mr={},Ir={},Pr={},Or={};Object.defineProperty(Or,"__esModule",{value:!0});var _r=function(){function e(t,n){if(void 0===n&&(n=null),this.nonEmpty=!1,t||n){if(!t)throw new Error("Parameter head cannot be null.");this.head=t,this.tail=n||e.NIL,this.nonEmpty=!0}else{if(e.NIL)throw new Error("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}}return Object.defineProperty(e.prototype,"length",{get:function(){if(!this.nonEmpty)return 0;if(this.tail===e.NIL)return 1;for(var t=0,n=this;n.nonEmpty;)++t,n=n.tail;return t},enumerable:!0,configurable:!0}),e.prototype.prepend=function(t){return new e(t,this)},e.prototype.append=function(t){if(!t)return this;if(!this.nonEmpty)return new e(t);if(this.tail===e.NIL)return new e(t).prepend(this.head);for(var n=new e(this.head),i=n,r=this.tail;r.nonEmpty;)i=i.tail=new e(r.head),r=r.tail;return i.tail=new e(t),n},e.prototype.insertWithPriority=function(t){if(!this.nonEmpty)return new e(t);var n=t.priority;if(n>this.head.priority)return this.prepend(t);for(var i=new e(this.head),r=i,s=this.tail;s.nonEmpty;){if(n>s.head.priority)return r.tail=s.prepend(t),i;r=r.tail=new e(s.head),s=s.tail}return r.tail=new e(t),i},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),i=n,r=this.tail;r.nonEmpty;){if(r.head.listener===t)return i.tail=r.tail,n;i=i.tail=new e(r.head),r=r.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();Or.SlotList=_r;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});var Lr=function(){function e(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=i,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();Rr.Slot=Lr,Object.defineProperty(Pr,"__esModule",{value:!0});var Nr=Or,kr=Rr,Ur=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.slots=Nr.SlotList.NIL,this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if(!(this._valueClasses[t]instanceof Object))throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+">."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=Nr.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var s=this.slots;if(s.nonEmpty)for(;s.nonEmpty;)s.head.execute(e),s=s.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new kr.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();Pr.OnceSignal=Ur,Object.defineProperty(Ir,"__esModule",{value:!0});var jr=Br,Fr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jr.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(Pr.OnceSignal);Ir.Signal=Fr,Object.defineProperty(Mr,"__esModule",{value:!0});var zr=Br,Hr=Rr,Gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zr.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var i=new Hr.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(i),i}return this.slots.find(e)},t}(Ir.Signal);Mr.PrioritySignal=Gr,Object.defineProperty(mr,"__esModule",{value:!0});var Vr=Br,Yr=function(e){function t(t){void 0===t&&(t=null);for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this;return n=1===n.length&&n[0]instanceof Array?n[0]:n,(r=e.call(this,n)||this)._target=t,r}return Vr.__extends(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){e!==this._target&&(this.removeAll(),this._target=e)},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(null!==e[r]&&e[r].constructor!==this._valueClasses[r])throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var s=e[0];s&&(s.target&&(s=s.clone(),e[0]=s),s.target=this.target,s.currentTarget=this.target,s.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(s&&s.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(s.currentTarget=a,a.onEventBubbled(s))););},t}(Mr.PrioritySignal);mr.DeluxeSignal=Yr;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});var Wr=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();Qr.GenericEvent=Wr;var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.IOnceSignal=Symbol("IOnceSignal");var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.IPrioritySignal=Symbol("IPrioritySignal");var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.ISignal=Symbol("ISignal");var qr={};Object.defineProperty(qr,"__esModule",{value:!0}),qr.ISlot=Symbol("ISlot");var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});var $r=Rr,es=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if("function"!=typeof this._valueClasses[t])throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+"'>."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,i=e.length;if(i<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+i+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new $r.Slot(e,this,t)},e}();Jr.MonoSignal=es;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});var ns=Br,is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ns.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDispatched)throw new Error("You cannot dispatch() a Promise more than once");this.isDispatched=!0,this.valueObjects=t,e.prototype.dispatch.apply(this,t)},t}(Pr.OnceSignal);ts.Promise=is,Object.defineProperty(gr,"__esModule",{value:!0});var rs=mr;gr.DeluxeSignal=rs.DeluxeSignal;var ss=Qr;gr.GenericEvent=ss.GenericEvent;var os=Xr;gr.IOnceSignal=os.IOnceSignal;var as=Zr;gr.IPrioritySignal=as.IPrioritySignal;var ls=Kr;gr.ISignal=ls.ISignal;var cs=qr;gr.ISlot=cs.ISlot;var hs=Jr;gr.MonoSignal=hs.MonoSignal;var us=Pr;gr.OnceSignal=us.OnceSignal;var ds=Mr;gr.PrioritySignal=ds.PrioritySignal;var fs=ts;gr.Promise=fs.Promise;var ps=Ir,gs=gr.Signal=ps.Signal,ms=Rr;gr.Slot=ms.Slot;var vs=Or;gr.SlotList=vs.SlotList;const ys=new x;ys.name="Scene";class ws{constructor(e,t){this.signals=e,this.viewportState=t,this.scene=ys.clone(),this.scene.castShadow=!0,this.scene.receiveShadow=!0,this.selectedObjects={edge:[],stroke:[],opacity:[],highlight:[],emissive:[]},this.intersectsList={meshOfModelList:[],poiIconList:[],otherObjList:[],getAll:function(){return[...this.meshOfModelList,...this.poiIconList,...this.otherObjList]}}}addObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void Jt("Scene is disposed");t?t.add(e):this.scene.add(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}removeObject(e){function t(e){var t;e.map&&((t=e.map)&&t.isTexture&&t.dispose()),e.dispose()}e.traverse((e=>{if("Mesh"===e.type){const n=e;n.geometry.dispose(),pn(n.material,t)}e instanceof Cc&&e.element.remove();const{meshOfModelList:n,poiIconList:i,otherObjList:r}=this.intersectsList,s=n.findIndex((t=>t.uuid===e.uuid)),o=i.findIndex((t=>t.uuid===e.uuid)),a=r.findIndex((t=>t.uuid===e.uuid));s>-1&&this.intersectsList.meshOfModelList.splice(s,1),o>-1&&this.intersectsList.poiIconList.splice(o,1),a>-1&&this.intersectsList.otherObjList.splice(a,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:t=13426943,near:n=500,far:i=5e4}=e;this.scene.fog=new A(t,n,i),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],i=e=>{-1===this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid))&&n.push(e)};return In(e)?e.forEach((e=>i(e))):Pn(e)&&i(e),this.selectedObjects.edge=[...this.selectedObjects.edge,...n],this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>{const t=this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.edge.splice(t,1),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge})),Promise.resolve()};return In(e)?Promise.all(e.map((e=>t(e)))):Pn(e)?t(e):Promise.resolve()}strokeShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isOpacityShow:n=!0,color:i=4647927,opacity:r=.2,edgeColor:s=61183,edgeOpacity:o=1}=t,a=e=>{if(-1!==this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid)))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const t=new Ec({id:e.uuid});return e.traverse((n=>{if(n instanceof w){const i=new S(n.geometry,89),r=new T(i,new E({color:s,transparent:!0,opacity:o}));an(r,n),e.attach(r),t.add(r)}})),e.userData.strokeGroup=t,this.addObject(t,e),this.selectedObjects.stroke.push(e),Promise.resolve()};return n&&this.opacityShow(e,{color:i,opacity:r}),In(e)?Promise.all(e.map((e=>a(e)))):Pn(e)?a(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup");const t=this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.stroke.splice(t,1),this.signals.geometryChanged.dispatch(),this.unOpacityShow(e)),Promise.resolve()};return In(e)?Promise.all(e.map((e=>t(e)))):Pn(e)?t(e):Promise.resolve()}opacityShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="#fff",opacity:i=.8}=t;function r(e){return Reflect.construct(e.constructor,[{transparent:!0,depthWrite:!1,side:e.side,color:n,opacity:i}])}const s=e=>(-1!==this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof w){if(e.userData.material)return;e.userData.material=e.material,e.material=pn(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.push(e)),Promise.resolve());return In(e)?Promise.all(e.map((e=>s(e)))):Pn(e)?s(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{const n=this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.opacity.splice(n,1),e.traverse((e=>{if(e instanceof w){if(!e.userData.material)return;mn(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return In(e)?Promise.all(e.map((e=>t(e)))):Pn(e)?t(e):Promise.resolve()}highlightShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="red",opacity:i=1}=t;function r(e){e instanceof D&&(e.color=new a(n),e.opacity=i,e.transparent=i<1)}const s=e=>(-1!==this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof w){if(e.userData.material)return;e.userData.material=e.material,e.material=gn(e.material),pn(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.push(e)),Promise.resolve());return In(e)?Promise.all(e.map((e=>s(e)))):Pn(e)?s(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{const n=this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.highlight.splice(n,1),e.traverse((e=>{if(e instanceof w){if(!e.userData.material)return;mn(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return In(e)?Promise.all(e.map((e=>t(e)))):Pn(e)?t(e):Promise.resolve()}emissiveShow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{color:n="red",opacity:i=.3,maxOpacity:r=1,minOpacity:s=0,duration:o=1e3}=t;function a(e){e instanceof D&&(e.emissive.set(n),e.emissiveIntensity=i,0!==o&&jn({emissiveIntensity:r},{emissiveIntensity:s},{duration:o,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const l=e=>(-1!==this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof w){if(e.userData.material)return;e.userData.material=e.material,e.material=gn(e.material),pn(e.material,a)}})),this.selectedObjects.emissive.push(e),this.signals.materialChanged.dispatch()),Promise.resolve());return In(e)?Promise.all(e.map((e=>l(e)))):Pn(e)?l(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&jt.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{const i=this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid));-1===i&&n(),this.selectedObjects.emissive.splice(i,1),e.traverse((e=>{if(e instanceof w){if(!e.userData.material)return;pn(e.material,t),mn(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return In(e)?Promise.all(e.map((e=>n(e)))):Pn(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof Tc)if("Model"===e.stype)e.traverse((e=>{if(e instanceof w){-1===this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype){-1===this.intersectsList.poiIconList.findIndex((t=>t.uuid===e.icon.uuid))&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof w){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof w){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}))}}class bs extends C{constructor(e){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof bs&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const xs=new t,As=new g,Ss=new g,Ts=new t,Es=new t;class Ds{constructor(e){let t,n,i,r;this.viewport=e,this.domElement=document.createElement("div");const s={objects:new WeakMap};this.domElement.style.overflow="hidden",this.getSize=function(){return{width:t,height:n}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),As.copy(t.matrixWorldInverse),Ss.multiplyMatrices(t.projectionMatrix,As),o(e,e,t),function(e){const t=function(e){const t=[];return e.traverse((function(e){e instanceof bs&&t.push(e)})),t}(e).sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return s.objects.get(e).distanceToCameraSquared-s.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,i=t.length;e<i;e++)t[e].element.style.zIndex=""+(n-e)}(e)},this.setSize=(e,s)=>{t=e,n=s,i=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=s+"px"};const o=(e,t,n)=>{var l;if(e instanceof bs){const t=e.parent;if(t.occlude){const t=!xn(e,this.viewport.camera)&&An(e,this.viewport.camera,this.viewport.raycaster,this.viewport.scener.intersectsList.getAll());e.visible=t}xs.setFromMatrixPosition(e.matrixWorld),xs.applyMatrix4(Ss);const o=ln(e)&&xs.z>=-1&&xs.z<=1&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==o&&(null===(l=t.onChange)||void 0===l||l.call(t,o),t.elementAutoDisplay&&(e.element.style.display=!0===o?"":"none")),e.userData.prevVisible=o,!0===o){const t=e.element;t.style.transform="translate(-50%,-50%) translate("+(xs.x*i+i)+"px,"+(-xs.y*r+r)+"px)",t.parentNode!==this.domElement&&this.domElement.appendChild(t)}const c={distanceToCameraSquared:a(n,e)};s.objects.set(e,c)}for(let i=0,r=e.children.length;i<r;i++)o(e.children[i],t,n)};function a(e,t){return Ts.setFromMatrixPosition(e.matrixWorld),Es.setFromMatrixPosition(t.matrixWorld),Ts.distanceToSquared(Es)}}}const Cs=new t,Bs=new r,Ms=new t;class Is extends C{constructor(e){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Is&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class Ps extends Is{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const Os=new g,_s=new g;class Rs{constructor(e){let t,n,i,r;this.viewport=e,this.domElement=document.createElement("div");const s={camera:{fov:0,style:""},objects:new WeakMap};this.domElement.style.overflow="hidden";const o=document.createElement("div");o.style.transformOrigin="0 0",this.domElement.appendChild(o);const a=document.createElement("div");function l(e){return Math.abs(e)<1e-10?0:e}function c(e){const t=e.elements;return"matrix3d("+l(t[0])+","+l(-t[1])+","+l(t[2])+","+l(t[3])+","+l(t[4])+","+l(-t[5])+","+l(t[6])+","+l(t[7])+","+l(t[8])+","+l(-t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(-t[13])+","+l(t[14])+","+l(t[15])+")"}function h(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+l(t[0])+","+l(t[1])+","+l(t[2])+","+l(t[3])+","+l(-t[4])+","+l(-t[5])+","+l(-t[6])+","+l(-t[7])+","+l(t[8])+","+l(t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(t[13])+","+l(t[14])+","+l(t[15])+")")}a.style.transformStyle="preserve-3d",o.appendChild(a),this.getSize=()=>({width:t,height:n}),this.render=(e,h)=>{const d=h.projectionMatrix.elements[5]*r;s.camera.fov!==d&&(o.style.perspective=h instanceof B?d+"px":"",s.camera.fov=d),h.view&&h.view.enabled?(o.style.transform=`translate( ${-h.view.offsetX*(t/h.view.width)}px, ${-h.view.offsetY*(n/h.view.height)}px )`,o.style.transform+=`scale( ${h.view.fullWidth/h.view.width}, ${h.view.fullHeight/h.view.height} )`):o.style.transform="",!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===h.parent&&!0===h.matrixWorldAutoUpdate&&h.updateMatrixWorld();let f=0,p=0;h instanceof M&&(f=-(h.right+h.left)/2,p=(h.top+h.bottom)/2);const g=h.view&&h.view.enabled?h.view.height/h.view.fullHeight:1,m=(h instanceof M?`scale( ${g} )scale(`+d+")translate("+l(f)+"px,"+l(p)+"px)"+c(h.matrixWorldInverse):`scale( ${g} )translateZ(`+d+"px)"+c(h.matrixWorldInverse))+"translate("+i+"px,"+r+"px)";s.camera.style!==m&&(a.style.transform=m,s.camera.style=m),u(e,e,h)},this.setSize=(e,s)=>{t=e,n=s,i=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=s+"px",o.style.width=e+"px",o.style.height=s+"px",a.style.width=e+"px",a.style.height=s+"px"};const u=(e,t,n,i)=>{var r;if(e instanceof Is){const t=e.parent;if(t.occlude){const t=!xn(e,this.viewport.camera)&&An(e,this.viewport.camera,this.viewport.raycaster,this.viewport.scener.intersectsList.getAll());e.visible=t}const i=ln(e)&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==i&&(null===(r=t.onChange)||void 0===r||r.call(t,i),t.elementAutoDisplay&&(e.element.style.display=!0===i?"":"none")),e.userData.prevVisible=i,!0===i){let t;e instanceof Ps?(Os.copy(n.matrixWorldInverse),Os.transpose(),0!==e.rotation2D&&Os.multiply(_s.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(Cs,Bs,Ms),Os.setPosition(Cs),Os.scale(Ms),Os.elements[3]=0,Os.elements[7]=0,Os.elements[11]=0,Os.elements[15]=1,t=h(Os)):t=h(e.matrixWorld);const i=e.element,r=s.objects.get(e);if(void 0===r||r.style!==t){i.style.transform=t;const n={style:t};s.objects.set(e,n)}i.parentNode!==a&&a.appendChild(i)}}for(let i=0,r=e.children.length;i<r;i++)u(e.children[i],t,n)}}}class Ls{constructor(e){this.viewport=e,this.internalOptions={enableRenderCss2D:!1,enableRenderCss3D:!1},this.container=this._initContainer(),this.renderer=this._initRenderer(),this.rendererCSS2D=this._initRenderCSS2D(),this.rendererCSS3D=this._initRenderCSS3D(),this.interactiveContainer=this._initInteractiveContainer()}setInternalState(e,t){this.internalOptions[e]=t}getWidth(){return this.renderer.domElement.width}getHeight(){return this.renderer.domElement.height}getMouseRelativeConRatio(e){const t=this.container.getBoundingClientRect();return[(e.offsetX-t.left)/t.width,(e.offsetY-t.top)/t.height]}getMousePoint(e){const t=new h(0,0);return t.fromArray(this.getMouseRelativeConRatio(e)),t}_initContainer(){const e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",e}_initRenderer(){const{background:e={},logarithmicDepthBuffer:t}=this.viewport.options,{color:n,alpha:i}=e,r=new I({alpha:i,logarithmicDepthBuffer:t,preserveDrawingBuffer:!0,antialias:!1,stencil:!1,depth:!1,powerPreference:"high-performance"}),s=i?0:1,{offsetWidth:o,offsetHeight:a}=this.container;return r.setSize(o,a),r.setClearColor(n||0,s),r.setPixelRatio(self.devicePixelRatio),r.localClippingEnabled=!0,r.sortObjects=!0,r.shadowMap.enabled=!0,r.shadowMap.type=P,this.container.appendChild(r.domElement),r}_initRenderCSS2D(){const e=new Ds(this.viewport);return e.domElement.id="ssp_view_2DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initRenderCSS3D(){const e=new Rs(this.viewport);return e.domElement.id="ssp_view_3DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initInteractiveContainer(){return this.rendererCSS3D.domElement}}const Ns=new g,ks=(e,t)=>{const i=Ns.clone(),r=Ns.clone(),s=Ns.clone();i.makeRotationY(e),r.makeRotationX(t);const o=new n;return s.multiplyMatrices(i,r),o.setFromRotationMatrix(s),o},Us=ks(-Math.PI/2,-Math.PI/4),js=ks(Math.PI/2,-Math.PI/4),Fs=ks(-Math.PI/4,-Math.PI/4),zs=ks(Math.PI/4,-Math.PI/4),Hs=ks(1.25*Math.PI,-Math.PI/4),Gs=ks(.75*Math.PI,-Math.PI/4),Vs={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(Us.x,Us.y,Us.z),RIGHTTOP:new n(js.x,js.y,js.z),LEFTFRONTTOP:new n(Fs.x,Fs.y,Fs.z),RIGHTFRONTTOP:new n(zs.x,zs.y,zs.z),LEFTBACKTOP:new n(Hs.x,Hs.y,Hs.z),RIGHTBACKTOP:new n(Gs.x,Gs.y,Gs.z)},Ys=e=>Mn(e)?e:e.includes("%")?.01*Number(e.split("%")[0]):isNaN(+e)?0:Number(e),Qs=new t,Ws=new n,Xs=new B(50,1,.1,5e5);Xs.position.set(500,1e3,500),Xs.lookAt(Qs.set(0,0,0)),Xs.name="Camera";class Zs{constructor(e){this.viewport=e,this.mainCamera=Xs.clone(),this.mainCamera.name="freeCamera",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=Xs.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}getMainCamera(){return this.mainCamera}getCameraViewpoint(){if("free"===this.viewport.controls.options.type)return{position:this.currentCamera.position.clone(),rotation:{x:this.currentCamera.rotation.x,y:this.currentCamera.rotation.y,z:this.currentCamera.rotation.z}};{const e=this.viewport.controls.currentControls;return{position:this.currentCamera.position.clone(),target:e.target.clone()}}}setCameraViewpoint(e){if("free"===this.viewport.controls.options.type&&Pn(e)){const{position:t,rotation:n}=e;this.currentCamera.position.set(t.x,t.y,t.z),this.currentCamera.rotation.set(n.x,n.y,n.z)}else if(Pn(e)){const{position:t,target:n}=e,i=this.viewport.controls.currentControls;this.currentCamera.position.set(t.x,t.y,t.z),i.target.set(n.x,n.y,n.z)}this.viewport.signals.cameraChange.dispatch(this.currentCamera.position.clone())}moveTo(e,t){return jn(this.currentCamera.position,e,t,(e=>this.viewport.signals.cameraChange.dispatch(e)))}rotateTo(e,t){const n=this.currentCamera.quaternion.clone(),i=(new r).setFromEuler(e);return jn({t:0},{t:1},t,(e=>{let{t:t}=e;this.currentCamera.quaternion.slerpQuaternions(n,i,t)}))}async flyTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2?arguments[2]:void 0;if(Cn(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?Ws.copy(this.currentCamera.rotation):Vs[e]&&Ws.copy(Vs[e])}else t instanceof n?Ws.copy(t):Pn(t)&&Ws.set(t.x,t.y,t.z);Ws.copy(rn(this.currentCamera.rotation,Ws.clone())),await Promise.all([this.moveTo(e,i),this.rotateTo(Ws,i)])}async flyToBoundingBox(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2?arguments[2]:void 0;if(e.isEmpty())return void Jt("target box is empty");const r=this.viewport.controls.options.type,s=new t;if(Cn(n)){if("CURRENT"===n.toLocaleUpperCase())s.copy(this.getMovePosByBBox(e));else{const t=Vs[n.toLocaleUpperCase()],i=this.getObjectLabelPos(e,t);s.copy(i)}}else{"orbit"===r&&Jt("orbit 控制器不支持 Rotation 类型 的 rotation 参数");const t=en(n),i=this.getObjectLabelPos(e,t);s.copy(i)}if("orbit"===r){const t=e.getCenter(Qs),i=this.viewport.controls.currentControls;i.target.copy(t);const r=new g;r.lookAt(s,t,i.object.up),n=Ws.setFromRotationMatrix(r)}await this.flyTo(s,n,i)}flyToObj(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Pc||e instanceof Cc){const{padding:t=50}=i,r=Ys(t);return this.flyToBoundingBox(e.getBoundingBox(r),n,i)}{const{padding:r="30%"}=i,s=tn(e),o=s.getSize(Qs);let a=0;if(Cn(r)){const e=Math.max(o.x,o.y,o.z);a=Ys(r)*e}else a=r;let l=a,c=a;if(a<0){const e=Math.min(o.x,o.z),t=o.y-1;l=Math.abs(a)>e?-e:a,c=Math.abs(l)>t?-t:l}return 0!==r&&(s.max.add(Qs.set(l/2,c/2,l/2)),s.min.sub(Qs.set(l/2,c/2,l/2))),s.isEmpty()&&(Qs.setFromMatrixPosition(e.matrixWorld),s.setFromCenterAndSize(Qs,new t(0,0,0))),this.flyToBoundingBox(s,n,i)}}surroundOnTarget(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{speed:n=1,angle:i=360,onStart:r}=t,s=$t(e),o=s.clone().setY(this.currentCamera.position.y).distanceTo(this.currentCamera.position),a=Math.abs(i);return jn({angle:0},{angle:Math.PI/180*a},{duration:a/360*5e3/n},(e=>{const t=i>0?e.angle:2*Math.PI-e.angle;if(this.currentCamera.position.x=Math.sin(t)*o+s.x,this.currentCamera.position.z=Math.cos(t)*o+s.z,"orbit"===this.viewport.controls.options.type){const e=this.viewport.controls.currentControls;e.target.copy(s),e.update()}else this.currentCamera.lookAt(s)}),r)}surroundOnObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(new i).setFromObject(e).getCenter(Qs);return this.surroundOnTarget(n,t)}getMovePosByBBox(e){const n=this.currentCamera.position,i=e.getCenter(Qs);(new t).subVectors(i,n).normalize();let r=new p;r=e.getBoundingSphere(r);const s=this.currentCamera.fov/2*Math.PI/180,o=Math.sin(s),a=r.radius/o,l=new t;this.currentCamera.getWorldDirection(l);const c=l.clone();return c.multiplyScalar(-a),i.clone().add(c)}getObjectLabelPos(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Tc&&(e=(new i).setFromObject(e)),e.isEmpty())return Jt("target box is empty"),new t;const{extendScale:s=1.6,mode:o="scene"}=r;if("scene"===o){const t=e.getCenter(Qs),i=e.max.clone().sub(e.min),r=Math.max(i.x,i.y,i.z),o=t.clone(),a=e=>{const t=(s-.5)*Math.abs(r),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Cn(n)?Vs[n.toLocaleUpperCase()]:en(n),a(Qs.set(0,0,1).applyEuler(l)),o}return"screen"===o?e.getCenter(Qs).clone():new t}}
2
2
  /**
3
3
  * postprocessing v6.29.3 build Thu Feb 09 2023
4
4
  * https://github.com/pmndrs/postprocessing
5
5
  * Copyright 2015-2023 Raoul van Rüschen
6
6
  * @license Zlib
7
- */var ca="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}";function ua(e,t){let n="texel";if(null!==e){const i=Number.parseInt(ge);if(!(t&&i>=133&&135!==i&&e.format===o&&e.type===re&&e.encoding===I))switch(e.encoding){case I:n="sRGBToLinear(texel)";break;case u:n="texel";break;default:throw new Error(`Unsupported encoding: ${e.encoding}`)}}return n}function ha(e,t,n){return e*(t-n)-t}function da(e,t,n){return Math.min(Math.max((e+t)/(t-n),0),1)}var fa={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},pa={DEPTH:0,LUMA:1,COLOR:2},ga={NONE:0,DEPTH:1,CONVOLUTION:2},ma={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},va={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},ya={DISABLED:0,DEPTH:1,CUSTOM:2},wa={LOW:0,MEDIUM:1,HIGH:2,ULTRA:3},ba=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],xa=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new be;super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new he(null),texelSize:new he(new be),scale:new he(1),kernel:new he(0)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include <encodings_fragment>\n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.setTexelSize(e.x,e.y),this.kernelSize=va.MEDIUM}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return ba[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){const n=1/e,i=1/t;this.uniforms.texelSize.value.set(n,i,.5*n,.5*i)}},Aa=class extends W{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new he(null),opacity:new he(1)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#include <dithering_pars_fragment>\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;\n#include <encodings_fragment>\n#include <dithering_fragment>\n}",vertexShader:ca}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},Ta=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new he(null),cameraNear:new he(.3),cameraFar:new he(1e3)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#include <packing>\n#include <clipping_planes_pars_fragment>\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;varying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include <clipping_planes_fragment>\nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998);\n#if DEPTH_PACKING == 3201\nfloat fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat fragCoordZ=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include <skinbase_vertex>\n#include <begin_vertex>\n#include <morphtarget_vertex>\n#include <skinning_vertex>\n#include <project_vertex>\nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include <clipping_planes_vertex>\n}"}),this.toneMapped=!1,this.depthBuffer=e,this.depthPacking=pe,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe;this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof $?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Sa=class extends W{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new he(null),normalBuffer:new he(null),texelSize:new he(new M)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#include <packing>\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#ifdef DOWNSAMPLE_NORMALS\nuniform lowp sampler2D normalBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[]=float[4](abs(c-samples[0]),abs(c-samples[1]),abs(c-samples[2]),abs(c-samples[3]));float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[]=float[4](readDepth(vUv0),readDepth(vUv1),readDepth(vUv2),readDepth(vUv3));int index=findBestDepth(d);\n#ifdef DOWNSAMPLE_NORMALS\nvec3 n[]=vec3[4](texture2D(normalBuffer,vUv0).rgb,texture2D(normalBuffer,vUv1).rgb,texture2D(normalBuffer,vUv2).rgb,texture2D(normalBuffer,vUv3).rgb);\n#else\nvec3 n[]=vec3[4](vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));\n#endif\ngl_FragColor=vec4(n[index],d[index]);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.depthBuffer=e,this.depthPacking=t}set normalBuffer(e){this.uniforms.normalBuffer.value=e,null!==e?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(e){this.normalBuffer=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Ea=class extends W{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new he(null),texelSize:new he(new M)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include <encodings_fragment>\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Da=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new M,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pa.COLOR;super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:ge.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new he(null),depthBuffer:new he(null),predicationBuffer:new he(null),texelSize:new he(e)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include <common>\n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Ca=class extends W{constructor(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];super({name:"EffectMaterial",defines:{THREE_REVISION:ge.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new he(null),depthBuffer:new he(null),resolution:new he(new M),texelSize:new he(new M),cameraNear:new he(.3),cameraFar:new he(1e3),aspect:new he(1),time:new he(0)},blending:fe,depthWrite:!1,depthTest:!1,dithering:r}),this.toneMapped=!1,e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(i)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){var t,n,i,r,s;return this.fragmentShader="#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if THREE_REVISION >= 137\nvec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEADvoid main(){FRAGMENT_MAIN_UVvec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGEgl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include <encodings_fragment>\n#endif\n#include <dithering_fragment>\n}".replace(ma.FRAGMENT_HEAD,null!=(t=e.get(ma.FRAGMENT_HEAD))?t:"").replace(ma.FRAGMENT_MAIN_UV,null!=(n=e.get(ma.FRAGMENT_MAIN_UV))?n:"").replace(ma.FRAGMENT_MAIN_IMAGE,null!=(i=e.get(ma.FRAGMENT_MAIN_IMAGE))?i:""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEADvoid main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORTgl_Position=vec4(position.xy,1.0,1.0);}".replace(ma.VERTEX_HEAD,null!=(r=e.get(ma.VERTEX_HEAD))?r:"").replace(ma.VERTEX_MAIN_SUPPORT,null!=(s=e.get(ma.VERTEX_MAIN_SUPPORT))?s:""),this.needsUpdate=!0,this}setDefines(e){for(const t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(const t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){this.extensions={};for(const t of e)this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof $?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return ma}},Ia=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super({name:"LuminanceMaterial",defines:{THREE_REVISION:ge.replace(/\D+/g,"")},uniforms:{inputBuffer:new he(null),threshold:new he(0),smoothing:new he(1),range:new he(null)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*l,l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}",vertexShader:ca}),this.toneMapped=!1,this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},Ma=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new M;super({name:"OutlineMaterial",uniforms:{inputBuffer:new he(null),texelSize:new he(new M)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Ba=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new M,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new M;super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new he(null),searchTexture:new he(null),areaTexture:new he(null),resolution:new he(t),texelSize:new he(e)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x>end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x<end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.y>end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;i++){if(!(texCoord.y<end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){const t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){const t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){const t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){const n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.resolution.value.set(e,t)}},Ra=class extends W{constructor(e){super({name:"SSAOMaterial",defines:{SAMPLES_INT:"0",INV_SAMPLES_FLOAT:"0.0",SPIRAL_TURNS:"0.0",RADIUS:"1.0",RADIUS_SQ:"1.0",DISTANCE_SCALING:"1",DEPTH_PACKING:"0"},uniforms:{depthBuffer:new he(null),normalBuffer:new he(null),normalDepthBuffer:new he(null),noiseTexture:new he(null),inverseProjectionMatrix:new he(new m),projectionMatrix:new he(new m),texelSize:new he(new M),cameraNearFar:new he(new M),distanceCutoff:new he(new M),proximityCutoff:new he(new M),noiseScale:new he(new M),minRadiusScale:new he(.33),intensity:new he(1),fade:new he(.01),bias:new he(0)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#include <packing>\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}\n#else\nuniform lowp sampler2D normalBuffer;\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\nuniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform vec2 cameraNearFar;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#endif\n}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i<SAMPLES_INT;++i){float alpha=(float(i)+0.5)*INV_SAMPLES_FLOAT;float angle=alpha*rings+baseAngle;vec2 rotation=vec2(cos(angle),sin(angle));vec2 coords=alpha*radius*rotation*texelSize+uv;if(coords.s<0.0||coords.s>1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y);\n#else\nfloat linearSampleDepth=sampleDepth;\n#endif\nfloat proximity=abs(depth-linearSampleDepth);if(proximity<proximityCutoff.y){float falloff=1.0-smoothstep(proximityCutoff.x,proximityCutoff.y,proximity);vec3 Q=getViewPosition(coords,sampleDepth,viewZ);vec3 v=Q-p;float vv=dot(v,v);float vn=dot(v,n)-bias;float f=max(RADIUS_SQ-vv,0.0)/RADIUS_SQ;occlusion+=(f*f*f*max(vn/(fade+vv),0.0))*falloff;}++taps;}return occlusion/(4.0*max(float(taps),1.0));}void main(){\n#ifdef NORMAL_DEPTH\nvec4 normalDepth=texture2D(normalDepthBuffer,vUv);\n#else\nvec4 normalDepth=vec4(texture2D(normalBuffer,vUv).xyz,readDepth(vUv));\n#endif\nfloat ao=0.0;float depth=normalDepth.a;float viewZ=getViewZ(depth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y);\n#else\nfloat linearDepth=depth;\n#endif\nif(linearDepth<distanceCutoff.y){vec3 viewPosition=getViewPosition(vUv,depth,viewZ);vec3 viewNormal=unpackRGBToNormal(normalDepth.rgb);ao+=getAmbientOcclusion(viewPosition,viewNormal,linearDepth,vUv);float d=smoothstep(distanceCutoff.x,distanceCutoff.y,linearDepth);ao=mix(ao,0.0,d);\n#ifdef LEGACY_INTENSITY\nao=clamp(1.0-pow(1.0-ao,abs(intensity)),0.0,1.0);\n#endif\n}gl_FragColor.r=ao;}",vertexShader:"uniform vec2 noiseScale;varying vec2 vUv;varying vec2 vUv2;void main(){vUv=position.xy*0.5+0.5;vUv2=vUv*noiseScale;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.copyCameraSettings(e),this.resolution=new M,this.r=1}get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,null!==e?this.defines.NORMAL_DEPTH="1":delete this.defines.NORMAL_DEPTH,this.needsUpdate=!0}setNormalDepthBuffer(e){this.normalDepthBuffer=e}set normalBuffer(e){this.uniforms.normalBuffer.value=e}setNormalBuffer(e){this.uniforms.normalBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.depthBuffer=e,this.depthPacking=t}set noiseTexture(e){this.uniforms.noiseTexture.value=e}setNoiseTexture(e){this.uniforms.noiseTexture.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){this.defines.SAMPLES_INT=e.toFixed(0),this.defines.INV_SAMPLES_FLOAT=(1/e).toFixed(9),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}get rings(){return Number(this.defines.SPIRAL_TURNS)}set rings(e){this.defines.SPIRAL_TURNS=e.toFixed(1),this.needsUpdate=!0}getRings(){return this.rings}setRings(e){this.rings=e}get intensity(){return this.uniforms.intensity.value}set intensity(e){this.uniforms.intensity.value=e,void 0===this.defines.LEGACY_INTENSITY&&(this.defines.LEGACY_INTENSITY="1",this.needsUpdate=!0)}getIntensity(){return this.uniforms.intensity.value}setIntensity(e){this.uniforms.intensity.value=e}get fade(){return this.uniforms.fade.value}set fade(e){this.uniforms.fade.value=e}getFade(){return this.uniforms.fade.value}setFade(e){this.uniforms.fade.value=e}get bias(){return this.uniforms.bias.value}set bias(e){this.uniforms.bias.value=e}getBias(){return this.uniforms.bias.value}setBias(e){this.uniforms.bias.value=e}get minRadiusScale(){return this.uniforms.minRadiusScale.value}set minRadiusScale(e){this.uniforms.minRadiusScale.value=e}getMinRadiusScale(){return this.uniforms.minRadiusScale.value}setMinRadiusScale(e){this.uniforms.minRadiusScale.value=e}updateRadius(){const e=this.r*this.resolution.height;this.defines.RADIUS=e.toFixed(11),this.defines.RADIUS_SQ=(e*e).toFixed(11),this.needsUpdate=!0}get radius(){return this.r}set radius(e){this.r=Math.min(Math.max(e,1e-6),1),this.updateRadius()}getRadius(){return this.radius}setRadius(e){this.radius=e}get distanceScaling(){return!0}set distanceScaling(e){}isDistanceScalingEnabled(){return this.distanceScaling}setDistanceScalingEnabled(e){this.distanceScaling=e}get distanceThreshold(){return this.uniforms.distanceCutoff.value.x}set distanceThreshold(e){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.distanceFalloff,0),1))}get worldDistanceThreshold(){return-ha(this.distanceThreshold,this.near,this.far)}set worldDistanceThreshold(e){this.distanceThreshold=da(-e,this.near,this.far)}get distanceFalloff(){return this.uniforms.distanceCutoff.value.y-this.distanceThreshold}set distanceFalloff(e){this.uniforms.distanceCutoff.value.y=Math.min(Math.max(this.distanceThreshold+e,0),1)}get worldDistanceFalloff(){return-ha(this.distanceFalloff,this.near,this.far)}set worldDistanceFalloff(e){this.distanceFalloff=da(-e,this.near,this.far)}setDistanceCutoff(e,t){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}get proximityThreshold(){return this.uniforms.proximityCutoff.value.x}set proximityThreshold(e){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.proximityFalloff,0),1))}get worldProximityThreshold(){return-ha(this.proximityThreshold,this.near,this.far)}set worldProximityThreshold(e){this.proximityThreshold=da(-e,this.near,this.far)}get proximityFalloff(){return this.uniforms.proximityCutoff.value.y-this.proximityThreshold}set proximityFalloff(e){this.uniforms.proximityCutoff.value.y=Math.min(Math.max(this.proximityThreshold+e,0),1)}get worldProximityFalloff(){return-ha(this.proximityFalloff,this.near,this.far)}set worldProximityFalloff(e){this.proximityFalloff=da(-e,this.near,this.far)}setProximityCutoff(e,t){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),this.uniforms.projectionMatrix.value.copy(e.projectionMatrix),this.uniforms.inverseProjectionMatrix.value.copy(e.projectionMatrix).invert(),e instanceof $?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms,i=n.noiseTexture.value;null!==i&&n.noiseScale.value.set(e/i.image.width,t/i.image.height),n.texelSize.value.set(1/e,1/t),this.resolution.set(e,t),this.updateRadius()}},Pa=class extends W{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new he(null),supportBuffer:new he(null),texelSize:new he(new M),radius:new he(.85)},blending:fe,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include <encodings_fragment>\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Oa=new ie,_a=null;var La=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Pass",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new v,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oa;this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;null!==t?t.material=e:(t=new k(function(){if(null===_a){const e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(_a=new xe).setAttribute?(_a.setAttribute("position",new f(e,3)),_a.setAttribute("uv",new f(t,2))):(_a.addAttribute("position",new f(e,3)),_a.addAttribute("uv",new f(t,2)))}return _a}(),e),t.frustumCulled=!1,null===this.scene&&(this.scene=new v),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e){}render(e,t,n,i,r){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof oe||t instanceof Ae||t instanceof l||t instanceof La)&&this[e].dispose()}}},ka=class extends La{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];super("CopyPass"),this.fullscreenMaterial=new Aa,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new oe(1,1,{minFilter:A,magFilter:A,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,n,i,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTarget.texture.type=n,n!==re?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":e.outputEncoding===I&&(this.renderTarget.texture.encoding=I))}},Na=class extends La{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,n,i,r){const s=e.state.buffers.stencil;s.setLocked(!1),s.setTest(!1)}},Ua=new a,Fa=class extends La{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,i,r){const s=this.overrideClearColor,o=this.overrideClearAlpha,a=e.getClearAlpha(),l=null!==s,c=o>=0;l?(e.getClearColor(Ua),e.setClearColor(s,c?o:a)):c&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(Ua,a):c&&e.setClearAlpha(a)}},ja=-1,za=class extends me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ja,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ja,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(),this.resizable=e,this.baseSize=new M(1,1),this.preferredSize=new M(t,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new M,this.addEventListener("change",(()=>this.updateEffectiveSize())),this.updateEffectiveSize()}updateEffectiveSize(){const e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,i=this.scale;t.width!==ja?n.width=t.width:t.height!==ja?n.width=Math.round(t.height*(e.width/Math.max(e.height,1))):n.width=Math.round(e.width*i),t.height!==ja?n.height=t.height:t.width!==ja?n.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):n.height=Math.round(e.height*i)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(ja),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){this.baseSize.width===e&&this.baseSize.height===t||(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){this.preferredSize.width===e&&this.preferredSize.height===t||(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return ja}},Ha=!1,Ga=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case d:t=this.materialsFlatShadedDoubleSide;break;case _:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case d:t=this.materialsDoubleSide;break;case _:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){const t=this.materials=[e.clone(),e.clone(),e.clone()];for(const n of t)n.uniforms=Object.assign({},e.uniforms),n.side=L;t[2].skinning=!0,this.materialsBackSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.side=_,n})),this.materialsDoubleSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.side=d,n})),this.materialsFlatShaded=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n})),this.materialsFlatShadedBackSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=_,n})),this.materialsFlatShadedDoubleSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=d,n}))}}render(e,t,n){const i=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,Ha){const i=this.originalMaterials;this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n);for(const e of i)e[0].material=e[1];this.meshCount!==i.size&&i.clear()}else{const i=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=i}e.shadowMap.enabled=i}disposeMaterials(){if(null!==this.material){const e=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const t of e)t.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Ha}static set workaroundEnabled(e){Ha=e}},Va=class extends La{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new Fa,this.overrideMaterialManager=null===n?null:new Ga(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){const e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){const t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new Ga(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,n,i,r){const s=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=s.background,u=e.shadowMap.autoUpdate,h=this.renderToScreen?null:t;null!==a&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(s.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(h),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,s,o):e.render(s,o),o.layers.mask=l,s.background=c,e.shadowMap.autoUpdate=u}},Ya=class extends La{constructor(e,t){let{renderTarget:n,resolutionScale:i=1,width:r=za.AUTO_SIZE,height:s=za.AUTO_SIZE,resolutionX:o=r,resolutionY:l=s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("DepthPass"),this.needsSwap=!1,this.renderPass=new Va(e,t,new ve({depthPacking:pe}));const c=this.renderPass;c.skipShadowMapUpdate=!0,c.ignoreBackground=!0;const u=c.getClearPass();u.overrideClearColor=new a(16777215),u.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new oe(1,1,{minFilter:w,magFilter:w}),this.renderTarget.texture.name="DepthPass.Target");const h=this.resolution=new za(this,o,l,i);h.addEventListener("change",(e=>this.setSize(h.baseWidth,h.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,s)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},Wa=class extends La{constructor(){let{normalBuffer:e=null,resolutionScale:t=.5,width:n=za.AUTO_SIZE,height:i=za.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("DepthDownsamplingPass");const o=new Sa;o.normalBuffer=e,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new oe(1,1,{minFilter:w,magFilter:w,depthBuffer:!1,type:V}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new za(this,r,s,t);a.addEventListener("change",(e=>this.setSize(a.baseWidth,a.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,n,i,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,n){const i=e.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}};function Xa(e,t,n){for(const i of t){const t="$1"+e+i.charAt(0).toUpperCase()+i.slice(1),r=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const e of n.entries())null!==e[1]&&n.set(e[0],e[1].replace(r,t))}}function Qa(e,t,n){var i,r,s,o,a;let l=t.getFragmentShader(),c=t.getVertexShader();const u=void 0!==l&&/mainImage/.test(l),h=void 0!==l&&/mainUv/.test(l);if(n.attributes|=t.getAttributes(),void 0===l)throw new Error(`Missing fragment shader (${t.name})`);if(h&&0!=(n.attributes&ga.CONVOLUTION))throw new Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(!u&&!h)throw new Error(`Could not find mainImage or mainUv function (${t.name})`);{const d=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,f=n.shaderParts;let p=null!=(i=f.get(ma.FRAGMENT_HEAD))?i:"",g=null!=(r=f.get(ma.FRAGMENT_MAIN_UV))?r:"",m=null!=(s=f.get(ma.FRAGMENT_MAIN_IMAGE))?s:"",v=null!=(o=f.get(ma.VERTEX_HEAD))?o:"",y=null!=(a=f.get(ma.VERTEX_MAIN_SUPPORT))?a:"";const w=new Set,b=new Set;if(h&&(g+=`\t${e}MainUv(UV);\n`,n.uvTransformation=!0),null!==c&&/mainSupport/.test(c)){const t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(c);y+=`\t${e}MainSupport(`,y+=t?"vUv);\n":");\n";for(const e of c.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const t of e[1].split(/\s*,\s*/))n.varyings.add(t),w.add(t),b.add(t);for(const e of c.matchAll(d))b.add(e[1])}for(const e of l.matchAll(d))b.add(e[1]);for(const e of t.defines.keys())b.add(e.replace(/\([\w\s,]*\)/g,""));for(const e of t.uniforms.keys())b.add(e);b.delete("while"),b.delete("for"),b.delete("if"),t.uniforms.forEach(((t,i)=>n.uniforms.set(e+i.charAt(0).toUpperCase()+i.slice(1),t))),t.defines.forEach(((t,i)=>n.defines.set(e+i.charAt(0).toUpperCase()+i.slice(1),t)));const x=new Map([["fragment",l],["vertex",c]]);Xa(e,b,n.defines),Xa(e,b,x),l=x.get("fragment"),c=x.get("vertex");const A=t.blendMode;if(n.blendModes.set(A.blendFunction,A),u){null!==t.inputColorSpace&&t.inputColorSpace!==n.colorSpace&&(m+=t.inputColorSpace===I?"color0 = LinearTosRGB(color0);\n\t":"color0 = sRGBToLinear(color0);\n\t"),null!==t.outputColorSpace?n.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(n.colorSpace=t.inputColorSpace);const i=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;m+=`${e}MainImage(color0, UV, `,0!=(n.attributes&ga.DEPTH)&&i.test(l)&&(m+="depth, ",n.readDepth=!0),m+="color1);\n\t";const r=e+"BlendOpacity";n.uniforms.set(r,A.opacity),m+=`color0 = blend${A.blendFunction}(color0, color1, ${r});\n\n\t`,p+=`uniform float ${r};\n\n`}if(p+=l+"\n",null!==c&&(v+=c+"\n"),f.set(ma.FRAGMENT_HEAD,p),f.set(ma.FRAGMENT_MAIN_UV,g),f.set(ma.FRAGMENT_MAIN_IMAGE,m),f.set(ma.VERTEX_HEAD,v),f.set(ma.VERTEX_MAIN_SUPPORT,y),null!==t.extensions)for(const e of t.extensions)n.extensions.add(e)}}var Ka=class extends La{constructor(e){super("EffectPass"),this.fullscreenMaterial=new Ca(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.setEffects(n),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(e){for(const t of this.effects)t.mainScene=e}set mainCamera(e){this.fullscreenMaterial.copyCameraSettings(e);for(const t of this.effects)t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){const t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=e.sort(((e,t)=>t.attributes-e.attributes));for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const e=new il;let t=0;for(const n of this.effects)if(n.blendMode.blendFunction===fa.DST)e.attributes|=n.getAttributes()&ga.DEPTH;else{if(0!=(e.attributes&n.getAttributes()&ga.CONVOLUTION))throw new Error(`Convolution effects cannot be merged (${n.name})`);Qa("e"+t++,n,e)}let n=e.shaderParts.get(ma.FRAGMENT_HEAD),i=e.shaderParts.get(ma.FRAGMENT_MAIN_IMAGE),r=e.shaderParts.get(ma.FRAGMENT_MAIN_UV);const s=/\bblend\b/g;for(const t of e.blendModes.values())n+=t.getShaderCode().replace(s,`blend${t.blendFunction}`)+"\n";0!=(e.attributes&ga.DEPTH)?(e.readDepth&&(i="float depth = readDepth(UV);\n\n\t"+i),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===I&&(i+="color0 = sRGBToLinear(color0);\n\t"),e.uvTransformation?(r="vec2 transformedUv = vUv;\n"+r,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(ma.FRAGMENT_HEAD,n),e.shaderParts.set(ma.FRAGMENT_MAIN_IMAGE,i),e.shaderParts.set(ma.FRAGMENT_MAIN_UV,r),e.shaderParts.forEach(((e,t,n)=>n.set(t,null==e?void 0:e.trim().replace(/^#/,"\n#")))),this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t;for(const n of this.effects)n.setDepthTexture(e,t)}render(e,t,n,i,r){for(const n of this.effects)n.update(e,t,i);if(!this.skipRendering||this.renderToScreen){const r=this.fullscreenMaterial;r.inputBuffer=t.texture,r.time+=i*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){this.fullscreenMaterial.setSize(e,t);for(const n of this.effects)n.setSize(e,t)}initialize(e,t,n){this.renderer=e;for(const i of this.effects)i.initialize(e,t,n);this.updateMaterial(),void 0!==n&&n!==re&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const e of this.effects)e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){if("change"===e.type)this.recompile()}},Za=class extends La{constructor(){let{kernelSize:e=va.MEDIUM,resolutionScale:t=.5,width:n=za.AUTO_SIZE,height:i=za.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("KawaseBlurPass"),this.renderTargetA=new oe(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new za(this,r,s,t);o.addEventListener("change",(e=>this.setSize(o.baseWidth,o.baseHeight))),this._blurMaterial=new xa,this._blurMaterial.kernelSize=e,this.copyMaterial=new Aa}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,u=c.kernelSequence;let h=t;this.fullscreenMaterial=c;for(let t=0,n=u.length;t<n;++t){const n=0==(1&t)?a:l;c.kernel=u[t],c.inputBuffer=h.texture,e.setRenderTarget(n),e.render(s,o),h=n}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=h.texture,e.setRenderTarget(this.renderToScreen?null:n),e.render(s,o)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.renderTargetA.setSize(i,r),this.renderTargetB.setSize(i,r),this.blurMaterial.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,n!==re?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):e.outputEncoding===I&&(this.renderTargetA.texture.encoding=I,this.renderTargetB.texture.encoding=I))}static get AUTO_SIZE(){return za.AUTO_SIZE}},qa=class extends La{constructor(){let{renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:i=1,width:r=za.AUTO_SIZE,height:s=za.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("LuminancePass"),this.fullscreenMaterial=new Ia(n,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new oe(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new za(this,o,a,i);l.addEventListener("change",(e=>this.setSize(l.baseWidth,l.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,i,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&n!==re&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Ja=class extends La{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new Fa(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,n,i,r){const s=e.getContext(),o=e.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,u=this.inverted?0:1,h=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),o.stencil.setFunc(s.ALWAYS,u,4294967295),o.stencil.setClear(h),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(e,null):(c.render(e,t),c.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(a,l)):(e.setRenderTarget(t),e.render(a,l),e.setRenderTarget(n),e.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(s.EQUAL,1,4294967295),o.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),o.stencil.setLocked(!0)}},$a=class extends La{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new oe(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new Ea,this.upsamplingMaterial=new Pa,this.resolution=new M}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){const t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n<e;++n){const e=t.clone();e.texture.name="Downsampling.Mipmap"+n,this.downsamplingMipmaps.push(e)}this.upsamplingMipmaps.push(t);for(let n=1,i=e-1;n<i;++n){const e=t.clone();e.texture.name="Upsampling.Mipmap"+n,this.upsamplingMipmaps.push(e)}this.setSize(this.resolution.x,this.resolution.y)}}get radius(){return this.upsamplingMaterial.radius}set radius(e){this.upsamplingMaterial.radius=e}render(e,t,n,i,r){const{scene:s,camera:o}=this,{downsamplingMaterial:a,upsamplingMaterial:l}=this,{downsamplingMipmaps:c,upsamplingMipmaps:u}=this;let h=t;this.fullscreenMaterial=a;for(let t=0,n=c.length;t<n;++t){const n=c[t];a.setSize(h.width,h.height),a.inputBuffer=h.texture,e.setRenderTarget(n),e.render(s,o),h=n}this.fullscreenMaterial=l;for(let t=u.length-1;t>=0;--t){const n=u[t];l.setSize(h.width,h.height),l.inputBuffer=h.texture,l.supportBuffer=c[t].texture,e.setRenderTarget(n),e.render(s,o),h=n}}setSize(e,t){const n=this.resolution;n.set(e,t);let i=n.width,r=n.height;for(let e=0,t=this.downsamplingMipmaps.length;e<t;++e)i=Math.round(.5*i),r=Math.round(.5*r),this.downsamplingMipmaps[e].setSize(i,r),e<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[e].setSize(i,r)}initialize(e,t,n){if(void 0!==n){const t=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(const e of t)e.texture.type=n;if(n!==re)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";else if(e.outputEncoding===I)for(const e of t)e.texture.encoding=I}}dispose(){super.dispose();for(const e of this.downsamplingMipmaps.concat(this.upsamplingMipmaps))e.dispose()}},el=class extends La{constructor(e,t){let{renderTarget:n,resolutionScale:i=1,width:r=za.AUTO_SIZE,height:s=za.AUTO_SIZE,resolutionX:o=r,resolutionY:l=s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("NormalPass"),this.needsSwap=!1,this.renderPass=new Va(e,t,new se);const c=this.renderPass;c.ignoreBackground=!0,c.skipShadowMapUpdate=!0;const u=c.getClearPass();u.overrideClearColor=new a(7829503),u.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new oe(1,1,{minFilter:w,magFilter:w}),this.renderTarget.texture.name="NormalPass.Target");const h=this.resolution=new za(this,o,l,i);h.addEventListener("change",(e=>this.setSize(h.baseWidth,h.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,s,s)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},tl=class extends La{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"inputBuffer";super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,i,r){const s=this.fullscreenMaterial.uniforms;null!==t&&void 0!==s&&void 0!==s[this.input]&&(s[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}initialize(e,t,n){void 0!==n&&n!==re&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},nl=.001,il=class{constructor(){this.shaderParts=new Map([[ma.FRAGMENT_HEAD,null],[ma.FRAGMENT_MAIN_UV,null],[ma.FRAGMENT_MAIN_IMAGE,null],[ma.VERTEX_HEAD,null],[ma.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=ga.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=u}},rl=class extends Set{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;super(),this.l=t,this.exclusive=!1,void 0!==e&&this.set(e)}get layer(){return this.l}set layer(e){const t=this.l;for(const n of this)n.layers.disable(t),n.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const t of this)t.layers.disable(e);return super.clear()}set(e){this.clear();for(const t of e)this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(const t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},sl=new Map([[fa.ADD,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}"],[fa.ALPHA,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}"],[fa.AVERAGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}"],[fa.COLOR,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[fa.COLOR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}"],[fa.COLOR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}"],[fa.DARKEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}"],[fa.DIFFERENCE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}"],[fa.DIVIDE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}"],[fa.DST,null],[fa.EXCLUSION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}"],[fa.HARD_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}"],[fa.HARD_MIX,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}"],[fa.HUE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}"],[fa.INVERT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}"],[fa.INVERT_RGB,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}"],[fa.LIGHTEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}"],[fa.LINEAR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}"],[fa.LINEAR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}"],[fa.LINEAR_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}"],[fa.LUMINOSITY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[fa.MULTIPLY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}"],[fa.NEGATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}"],[fa.NORMAL,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}"],[fa.OVERLAY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}"],[fa.PIN_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}"],[fa.REFLECT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}"],[fa.SATURATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[fa.SCREEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}"],[fa.SOFT_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}"],[fa.SRC,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[fa.SUBTRACT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}"],[fa.VIVID_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}"]]),ol=class extends me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;super(),this._blendFunction=e,this.opacity=new he(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return sl.get(this.blendFunction)}},al=class extends me{constructor(e,t){let{attributes:n=ga.NONE,blendFunction:i=fa.NORMAL,defines:r=new Map,uniforms:s=new Map,extensions:o=null,vertexShader:a=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(),this.name=e,this.renderer=null,this.attributes=n,this.fragmentShader=t,this.vertexShader=a,this.defines=r,this.uniforms=s,this.extensions=o,this.blendMode=new ol(i),this.blendMode.addEventListener("change",(e=>this.setChanged())),this._inputColorSpace=u,this._outputColorSpace=null}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof oe||t instanceof Ae||t instanceof l||t instanceof La)&&this[e].dispose()}}},ll=class extends al{constructor(){let{blendFunction:e=fa.SCREEN,luminanceThreshold:t=.9,luminanceSmoothing:n=.025,mipmapBlur:i=!1,intensity:r=1,radius:s=.85,levels:o=8,kernelSize:a=va.LARGE,resolutionScale:l=.5,width:c=za.AUTO_SIZE,height:u=za.AUTO_SIZE,resolutionX:h=c,resolutionY:d=u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("BloomEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}",{blendFunction:e,uniforms:new Map([["map",new he(null)],["intensity",new he(r)]])}),this.renderTarget=new oe(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new Za({kernelSize:a}),this.luminancePass=new qa({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new $a,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=s,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const f=this.resolution=new za(this,h,d,l);f.addEventListener("change",(e=>this.setSize(f.baseWidth,f.baseHeight)))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){const i=this.renderTarget,r=this.luminancePass;r.enabled?(r.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,r.renderTarget):this.blurPass.render(e,r.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,e.outputEncoding===I&&(this.renderTarget.texture.encoding=I))}};var cl=class extends we{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Te,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:re;super(function(e,t,n){const i=new Map([[Te,1],[Se,1],[Ee,2],[o,4]]);let r;if(i.has(t)||console.error("Invalid noise texture format"),n===re){r=new Uint8Array(e*i.get(t));for(let e=0,t=r.length;e<t;++e)r[e]=255*Math.random()+.5}else{r=new Float32Array(e*i.get(t));for(let e=0,t=r.length;e<t;++e)r[e]=Math.random()}return r}(e*t,n,i),e,t,n,i),this.needsUpdate=!0}};new t,new m,new a;var ul=class extends al{constructor(e,t){let{blendFunction:n=fa.SCREEN,patternTexture:i=null,patternScale:r=1,edgeStrength:s=1,pulseSpeed:o=0,visibleEdgeColor:l=16777215,hiddenEdgeColor:c=2230538,kernelSize:u=va.VERY_SMALL,blur:h=!1,xRay:d=!0,multisampling:f=0,resolutionScale:p=.5,width:g=za.AUTO_SIZE,height:m=za.AUTO_SIZE,resolutionX:v=g,resolutionY:y=m}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("OutlineEffect","uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;\n#ifdef USE_PATTERN\nuniform lowp sampler2D patternTexture;varying vec2 vUvPattern;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;\n#ifndef X_RAY\nedge.y=0.0;\n#endif\nedge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;\n#ifdef USE_PATTERN\nvec4 patternColor=texelToLinear(texture2D(patternTexture,vUvPattern));\n#ifdef X_RAY\nfloat hiddenFactor=0.5;\n#else\nfloat hiddenFactor=0.0;\n#endif\nvisibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;\n#endif\nfloat alpha=max(max(edge.x,edge.y),visibilityFactor);\n#ifdef ALPHA\noutputColor=vec4(color,alpha);\n#else\noutputColor=vec4(color,max(alpha,inputColor.a));\n#endif\n}",{uniforms:new Map([["maskTexture",new he(null)],["edgeTexture",new he(null)],["edgeStrength",new he(s)],["visibleEdgeColor",new he(new a(l))],["hiddenEdgeColor",new he(new a(c))],["pulse",new he(1)],["patternScale",new he(r)],["patternTexture",new he(null)]])}),this.blendMode.addEventListener("change",(e=>{this.blendMode.getBlendFunction()===fa.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()})),this.blendMode.setBlendFunction(n),this.patternTexture=i,this.xRay=d,this.scene=e,this.camera=t,this.renderTargetMask=new oe(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new oe(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new Fa,this.clearPass.overrideClearColor=new a(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new Ya(e,t),this.maskPass=new Va(e,t,new Ta(this.depthPass.texture,t));const w=this.maskPass.clearPass;w.overrideClearColor=new a(16777215),w.overrideClearAlpha=1,this.blurPass=new Za({resolutionScale:p,resolutionX:v,resolutionY:y,kernelSize:u}),this.blurPass.enabled=h;const b=this.blurPass.resolution;b.addEventListener("change",(e=>this.setSize(b.baseWidth,b.baseHeight))),this.outlinePass=new tl(new Ma);this.outlinePass.fullscreenMaterial.inputBuffer=this.renderTargetMask.texture,this.time=0,this.active=!1,this.selection=new rl,this.selection.layer=10,this.pulseSpeed=o}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(e){this.uniforms.get("patternScale").value=e}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(e){this.uniforms.get("edgeStrength").value=e}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(e){this.uniforms.get("visibleEdgeColor").value=e}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(e){this.uniforms.get("hiddenEdgeColor").value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has("X_RAY")}set xRay(e){this.xRay!==e&&(e?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(e){if(null!==e?(e.wrapS=e.wrapT=D,this.defines.set("USE_PATTERN","1"),this.setVertexShader("uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}")):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),null!==this.renderer){const t=ua(e,this.renderer.capabilities.isWebGL2);this.defines.set("texelToLinear(texel)",t)}this.uniforms.get("patternTexture").value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,n){const i=this.scene,r=this.camera,s=this.selection,o=this.uniforms.get("pulse"),a=i.background,l=r.layers.mask;s.size>0?(i.background=null,o.value=1,this.pulseSpeed>0&&(o.value=.375*Math.cos(this.time*this.pulseSpeed*10)+.625),this.active=!0,this.time+=n,s.setVisible(!1),this.depthPass.render(e),s.setVisible(!0),r.layers.set(s.layer),this.maskPass.render(e,this.renderTargetMask),r.layers.mask=l,i.background=a,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)):this.active&&(this.clearPass.render(e,this.renderTargetOutline),this.active=!1)}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.depthPass.setSize(i,r),this.renderTargetOutline.setSize(i,r),this.outlinePass.fullscreenMaterial.setSize(i,r)}initialize(e,t,n){const i=ua(this.patternTexture,e.capabilities.isWebGL2);this.defines.set("texelToLinear(texel)",i),this.blurPass.initialize(e,t,re),void 0!==n&&(this.depthPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.outlinePass.initialize(e,t,n))}};new t,new t;var hl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",dl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70JoGlueB1iKApeqzvOzn44GatTB76Xzhd7suBR7+WWADgDEAwwCG/L54b/poDLrHuvvm70Z2Avhsc+PVcxscBU8F8C8ADg5+ipIjD/PlGwfgju8B924E5seARUfLsiNmqQW0IjL8+7L2NYD/7COBzfcCm+aB8SVgdAkYIRCXKyDax4EdAanL5PuNPllNvXDlAHwFgP8AcC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RyEqzw/4xhGL3hD++MmslgqCbgUfLKAcRrmTlBzDN0DA1tAXUlWcDm1IOIIJAjlT/Fd05lbFQFwjdtgGcewesFt7Rc/Gx8iWjUCjGCT1YvWT1MwgUqrf3NG45tTbcu0aximWx9xENcEQHGbcYAEwtSXSqY0gnCdgeuMI0cvuGx/FUGgFhwEYrR80QckWN+X0fjm1DwAWv8RgJFilJZBznz0pQg+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",fl=class extends al{constructor(){let e,t,{blendFunction:n=fa.SRC,preset:i=wa.MEDIUM,edgeDetectionMode:r=pa.COLOR,predicationMode:s=ya.DISABLED}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("SMAAEffect","uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",{vertexShader:"varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",blendFunction:n,attributes:ga.CONVOLUTION|ga.DEPTH,uniforms:new Map([["weightMap",new he(null)]])}),arguments.length>1&&(e=arguments[0],t=arguments[1],arguments.length>2&&(i=arguments[2]),arguments.length>3&&(r=arguments[3])),this.renderTargetEdges=new oe(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new Fa(!0,!1,!1),this.clearPass.overrideClearColor=new a(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new tl(new Da),this.edgeDetectionMaterial.edgeDetectionMode=r,this.edgeDetectionMaterial.predicationMode=s,this.weightsPass=new tl(new Ba);const o=new de;o.onLoad=()=>{const n=new l(e);n.name="SMAA.Search",n.magFilter=w,n.minFilter=w,n.generateMipmaps=!1,n.needsUpdate=!0,n.flipY=!0,this.weightsMaterial.searchTexture=n;const i=new l(t);i.name="SMAA.Area",i.magFilter=A,i.minFilter=A,i.generateMipmaps=!1,i.needsUpdate=!0,i.flipY=!1,this.weightsMaterial.areaTexture=i,this.dispatchEvent({type:"load"})},o.itemStart("search"),o.itemStart("area"),void 0!==e&&void 0!==t?(o.itemEnd("search"),o.itemEnd("area")):"undefined"!=typeof Image&&(e=new Image,t=new Image,e.addEventListener("load",(()=>o.itemEnd("search"))),t.addEventListener("load",(()=>o.itemEnd("area"))),e.src=hl,t.src=dl),this.applyPreset(i)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){const t=this.edgeDetectionMaterial,n=this.weightsMaterial;switch(e){case wa.LOW:t.edgeDetectionThreshold=.15,n.orthogonalSearchSteps=4,n.diagonalDetection=!1,n.cornerDetection=!1;break;case wa.MEDIUM:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=8,n.diagonalDetection=!1,n.cornerDetection=!1;break;case wa.HIGH:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=16,n.diagonalSearchSteps=8,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0;break;case wa.ULTRA:t.edgeDetectionThreshold=.05,n.orthogonalSearchSteps=32,n.diagonalSearchSteps=16,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0}}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,n){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){const{searchTexture:e,areaTexture:t}=this.weightsMaterial;null!==e&&null!==t&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return hl}static get areaImageDataURL(){return dl}},pl=class extends al{constructor(e,t){let{blendFunction:n=fa.MULTIPLY,samples:i=9,rings:r=7,normalDepthBuffer:s=null,depthAwareUpsampling:a=!0,worldDistanceThreshold:l,worldDistanceFalloff:c,worldProximityThreshold:u,worldProximityFalloff:h,distanceThreshold:d=.97,distanceFalloff:f=.03,rangeThreshold:p=5e-4,rangeFalloff:g=.001,minRadiusScale:m=.1,luminanceInfluence:v=.7,radius:y=.1825,intensity:w=1,bias:b=.025,fade:x=.01,color:A=null,resolutionScale:T=1,width:S=za.AUTO_SIZE,height:E=za.AUTO_SIZE,resolutionX:C=S,resolutionY:I=E}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("SSAOEffect","uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\n#endif\n#ifdef COLORIZE\nuniform vec3 color;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r;\n#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300\nvec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distance<smallestDistance){smallestDistance=distance;index=i;}}ivec2 offsets[4];offsets[0]=ivec2(0,0);offsets[1]=ivec2(0,1);offsets[2]=ivec2(1,0);offsets[3]=ivec2(1,1);ivec2 coord=ivec2(uv*vec2(textureSize(aoBuffer,0)))+offsets[index];float aoNearest=texelFetch(aoBuffer,coord,0).r;float ao=mix(aoNearest,aoLinear,s);\n#else\nfloat ao=aoLinear;\n#endif\nfloat l=luminance(inputColor.rgb);ao=mix(ao,0.0,l*luminanceInfluence);ao=clamp(ao*intensity,0.0,1.0);\n#ifdef COLORIZE\noutputColor=vec4(1.0-ao*(1.0-color),inputColor.a);\n#else\noutputColor=vec4(vec3(1.0-ao),inputColor.a);\n#endif\n}",{blendFunction:n,attributes:ga.DEPTH,defines:new Map([["THRESHOLD","0.997"]]),uniforms:new Map([["aoBuffer",new he(null)],["normalDepthBuffer",new he(s)],["luminanceInfluence",new he(v)],["color",new he(null)],["intensity",new he(w)],["scale",new he(0)]])}),this.renderTarget=new oe(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="AO.Target",this.uniforms.get("aoBuffer").value=this.renderTarget.texture;const M=this.resolution=new za(this,C,I,T);M.addEventListener("change",(e=>this.setSize(M.baseWidth,M.baseHeight))),this.camera=e,this.depthDownsamplingPass=new Wa({normalBuffer:t,resolutionScale:T}),this.depthDownsamplingPass.enabled=null===s,this.ssaoPass=new tl(new Ra(e));const B=new cl(64,64,o);B.wrapS=B.wrapT=D;const R=this.ssaoMaterial;R.normalBuffer=t,R.noiseTexture=B,R.minRadiusScale=m,R.samples=i,R.radius=y,R.rings=r,R.fade=x,R.bias=b,R.distanceThreshold=d,R.distanceFalloff=f,R.proximityThreshold=p,R.proximityFalloff=g,void 0!==l&&(R.worldDistanceThreshold=l),void 0!==c&&(R.worldDistanceFalloff=c),void 0!==u&&(R.worldProximityThreshold=u),void 0!==h&&(R.worldProximityFalloff=h),null!==s&&(this.ssaoMaterial.normalDepthBuffer=s,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=a,this.color=A}set mainCamera(e){this.camera=e,this.ssaoMaterial.copyCameraSettings(e)}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(e){this.ssaoMaterial.samples=e}get rings(){return this.ssaoMaterial.rings}set rings(e){this.ssaoMaterial.rings=e}get radius(){return this.ssaoMaterial.radius}set radius(e){this.ssaoMaterial.radius=e}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(e){this.depthAwareUpsampling!==e&&(e?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(e){this.depthAwareUpsampling=e}get distanceScaling(){return!0}set distanceScaling(e){}get color(){return this.uniforms.get("color").value}set color(e){const t=this.uniforms,n=this.defines;null!==e?n.has("COLORIZE")?t.get("color").value.set(e):(n.set("COLORIZE","1"),t.get("color").value=new a(e),this.setChanged()):n.has("COLORIZE")&&(n.delete("COLORIZE"),t.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(e){this.uniforms.get("luminanceInfluence").value=e}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getColor(){return this.color}setColor(e){this.color=e}setDistanceCutoff(e,t){this.ssaoMaterial.distanceThreshold=e,this.ssaoMaterial.distanceFalloff=t}setProximityCutoff(e,t){this.ssaoMaterial.proximityThreshold=e,this.ssaoMaterial.proximityFalloff=t}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;this.depthDownsamplingPass.setDepthTexture(e,t),this.ssaoMaterial.depthBuffer=e,this.ssaoMaterial.depthPacking=t}update(e,t,n){const i=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(e),this.ssaoPass.render(e,null,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(i,r),this.renderTarget.setSize(i,r),this.depthDownsamplingPass.resolution.scale=n.scale,this.depthDownsamplingPass.setSize(e,t)}initialize(e,t,n){try{let i=this.uniforms.get("normalDepthBuffer").value;null===i&&(this.depthDownsamplingPass.initialize(e,t,n),i=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=i,this.ssaoMaterial.normalDepthBuffer=i,this.defines.set("NORMAL_DEPTH","1"))}catch(e){this.depthDownsamplingPass.enabled=!1}}};function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},gl.apply(this,arguments)}var ml="#define GLSLIFY 1\nvec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;}\n#define Scale (vec3(0.8, 0.8, 0.8))\n#define K (19.19)\nvec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}";class vl extends W{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new he(1),normalMap:new he(null),normalScale:new he(new M(1,1)),uvTransform:new he(new Pe),roughness:new he(1),roughnessMap:new he(null)},vertexShader:"\n #ifdef USE_MRT\n varying vec2 vHighPrecisionZW;\n #endif\n #define NORMAL\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n #endif\n #include <common>\n #include <uv_pars_vertex>\n #include <displacementmap_pars_vertex>\n #include <normal_pars_vertex>\n #include <morphtarget_pars_vertex>\n #include <skinning_pars_vertex>\n #include <logdepthbuf_pars_vertex>\n #include <clipping_planes_pars_vertex>\n void main() {\n #include <uv_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n vViewPosition = - mvPosition.xyz;\n #endif\n #ifdef USE_MRT\n vHighPrecisionZW = gl_Position.zw;\n #endif \n #ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n }\n ",fragmentShader:"\n #define NORMAL\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n #endif\n #include <packing>\n #include <uv_pars_fragment>\n #include <normal_pars_fragment>\n #include <bumpmap_pars_fragment>\n #include <normalmap_pars_fragment>\n #include <logdepthbuf_pars_fragment>\n #include <clipping_planes_pars_fragment>\n #include <roughnessmap_pars_fragment>\n \n #ifdef USE_MRT\n layout(location = 0) out vec4 gNormal;\n layout(location = 1) out vec4 gDepth;\n \n varying vec2 vHighPrecisionZW;\n #endif\n uniform float roughness;\n void main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n\n float roughnessFactor = roughness;\n \n if(roughness > 10.0e9){\n roughnessFactor = 1.;\n }else{\n #ifdef useRoughnessMap\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n }\n\n vec3 normalColor = packNormalToRGB( normal );\n #ifdef USE_MRT\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n vec4 depthColor = packDepthToRGBA( fragCoordZ );\n gNormal = vec4( normalColor, roughnessFactor );\n gDepth = depthColor;\n #else\n gl_FragColor = vec4(normalColor, roughnessFactor);\n #endif\n }\n ",toneMapped:!1}),this.normalMapType=Oe,this.normalScale=new M(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?_e:null},set(e){}})}}class yl extends W{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new he(null),accumulatedTexture:new he(null),normalTexture:new he(null),depthTexture:new he(null),_projectionMatrix:new he(new m),_inverseProjectionMatrix:new he(new m),cameraMatrixWorld:new he(new m),cameraNear:new he(0),cameraFar:new he(0),rayDistance:new he(0),intensity:new he(0),roughnessFade:new he(0),fade:new he(0),thickness:new he(0),ior:new he(0),maxDepthDifference:new he(0),jitter:new he(0),jitterRoughness:new he(0),maxRoughness:new he(0),samples:new he(0),envMap:new he(null),envMapPosition:new he(new t),envMapSize:new he(new t),viewMatrix:new he(new m)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:"#define GLSLIFY 1\nvarying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness;\n#define INVALID_RAY_COORDS vec2(-1.0);\n#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0)\n#define FLOAT_EPSILON 0.00001\nfloat nearMinusFar;float nearMulFar;float farMinusNear;\n#include <packing>\n#include <helperFunctions>\nvec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON){gl_FragColor=EARLY_OUT_COLOR;return;}float unpackedDepth=unpackRGBAToDepth(depthTexel);vec4 normalTexel=textureLod(normalTexture,vUv,0.0);float roughness=normalTexel.a;float specular=1.0-roughness;nearMinusFar=cameraNear-cameraFar;nearMulFar=cameraNear*cameraFar;farMinusNear=cameraFar-cameraNear;normalTexel.rgb=unpackRGBToNormal(normalTexel.rgb);float depth=fastGetViewZ(unpackedDepth);vec3 viewPos=getViewPosition(depth);vec3 viewDir=normalize(viewPos);vec3 viewNormal=normalTexel.xyz;vec3 worldPos=screenSpaceToWorldSpace(vUv,unpackedDepth);vec3 jitt=vec3(0.0);if(jitterRoughness!=0.0||jitter!=0.0){vec3 randomJitter=hash(50.0*samples*worldPos)-0.5;float spread=((2.0-specular)+roughness*jitterRoughness);float jitterMix=jitter*0.25+jitterRoughness*roughness;if(jitterMix>1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i<steps;i++){hitPos+=dir;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;\n#ifndef missedRays\nif(projectedCoord.x<0.0||projectedCoord.x>1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;}\n#endif\ndepthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference<thickness){\n#if refineSteps == 0\nif(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON)return INVALID_RAY_COORDS;\n#else\nreturn BinarySearch(dir,hitPos,rayHitDepthDifference);\n#endif\n}\n#ifndef missedRays\nif(hitPos.z>0.0){return INVALID_RAY_COORDS;}\n#endif\nlastProjectedCoord=projectedCoord;}hitPos.z=1.0;\n#ifndef missedRays\nreturn INVALID_RAY_COORDS;\n#endif\nrayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i<refineSteps;i++){projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;depthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;dir*=0.5;if(rayHitDepthDifference>0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON)return INVALID_RAY_COORDS;if(abs(rayHitDepthDifference)>maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn nearMulFar/(farMinusNear*depth-cameraFar);\n#else\nreturn depth*nearMinusFar-cameraNear;\n#endif\n}\n#include <common>\n#include <cube_uv_reflection_fragment>\nvec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){\n#if defined(ENVMAP_TYPE_CUBE_UV)\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity;\n#else\nreturn vec3(0.0);\n#endif\n}".replace("#include <helperFunctions>",ml),vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",toneMapped:!1,depthWrite:!1,depthTest:!1})}}const wl=e=>{const t=[e],n=[];for(;0!==t.length;){const e=t.shift();e.material&&n.push(e);for(const n of e.children)n.visible&&t.push(n)}return n},bl=(e,t,n)=>{e.uniforms.envMap.value=t;const i=(e=>{const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}})({envMapCubeUVHeight:n});e.defines.ENVMAP_TYPE_CUBE_UV="",e.defines.CUBEUV_TEXEL_WIDTH=i.texelWidth,e.defines.CUBEUV_TEXEL_HEIGHT=i.texelHeight,e.defines.CUBEUV_MAX_MIP=i.maxMip+".0",e.needsUpdate=!0};class xl extends La{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new yl,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const n=t.width||"undefined"!=typeof window?window.innerWidth:2e3,i=t.height||"undefined"!=typeof window?window.innerHeight:1e3;this.renderTarget=new oe(n,i,{minFilter:A,magFilter:A,type:G,depthBuffer:!1}),this.renderPass=new Va(this._scene,this._camera),this.USE_MRT=(()=>{try{const e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}})(),this.USE_MRT?(this.gBuffersRenderTarget=new Be(n,i,2,{minFilter:A,magFilter:A}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new Ya(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=A,this.webgl1DepthPass.renderTarget.magFilter=A,this.webgl1DepthPass.renderTarget.texture.minFilter=A,this.webgl1DepthPass.renderTarget.texture.magFilter=A,this.webgl1DepthPass.setSize("undefined"!=typeof window?window.innerWidth:2e3,"undefined"!=typeof window?window.innerHeight:1e3),this.gBuffersRenderTarget=new oe(n,i,{minFilter:A,magFilter:A}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,t){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,t,n,i){this.ssrEffect[i]?t[n]!==e[n]&&(e[n]=t[n],e.uniforms[n].value=t[n],t[n]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):void 0!==e[n]&&(e[n]=void 0,e.uniforms[n].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=wl(this._scene);for(const e of this.visibleMeshes)if(e.material){const t=e.material;let[n,i]=this.cachedMaterials.get(e)||[];if(t!==n){i&&i.dispose(),i=new vl,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=t.normalScale,i.uniforms.normalScale.value=t.normalScale;const n=t.map||t.normalMap||t.roughnessMap||t.metalnessMap;n&&(i.uniforms.uvTransform.value=n.matrix),this.cachedMaterials.set(e,[t,i])}this.keepMaterialMapUpdated(i,t,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,t,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=0===this.ssrEffect.selection.size||this.ssrEffect.selection.has(e)?t.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const t of this.visibleMeshes){var e;if("MRTMaterial"===(null==(e=t.material)?void 0:e.type)){t.visible=!0;const[e]=this.cachedMaterials.get(t);t.material=e}}}render(e,t){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=t.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const Al={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};class Tl extends W{constructor(e){const t="#define GLSLIFY 1\nuniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv;\n#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001\n#define FLOAT_EPSILON 0.00001\n#define FLOAT_ONE_MINUS_EPSILON 0.99999\nvec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false;\n#ifdef boxBlur\nvec3 boxBlurredColor=inputTexel.rgb;\n#endif\nvec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y);\n#ifdef dilation\nif(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}}\n#endif\nif(abs(depth-neighborDepth)<MAX_NEIGHBOR_DEPTH_DIFFERENCE){\n#ifdef boxBlur\nif(absX<=2&&absY<=2)boxBlurredColor+=col;\n#endif\ncol=transformColor(col);minNeighborColor=min(col,minNeighborColor);maxNeighborColor=max(col,maxNeighborColor);}}}}float velocityLength=length(lastVelocity.xy-velocity.xy);velocityDisocclusion=(velocityLength-0.000005)*10.0;velocityDisocclusion*=velocityDisocclusion;reprojectedUv=vUv-velocity.xy;\n#ifdef boxBlur\nfloat pxRadius=correctionRadius>5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor);\n#endif\nif(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{\n#ifdef boxBlur\naccumulatedColor=boxBlurredColor;\n#else\naccumulatedColor=inputColor;\n#endif\n}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor;\n#include <custom_compose_shader>\ngl_FragColor=vec4(undoColorTransform(outputColor),alpha);}".replace("#include <custom_compose_shader>",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new he(null),accumulatedTexture:new he(null),velocityTexture:new he(null),lastVelocityTexture:new he(null),samples:new he(1),blend:new he(.5),correction:new he(1),exponent:new he(1),invTexSize:new he(new M)},defines:{correctionRadius:1},vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",fragmentShader:t})}}const Sl=`\n\t\tvec3 transformed;\n\n\t\t// Get the normal\n\t\t${De.skinbase_vertex}\n\t\t${De.beginnormal_vertex}\n\t\t${De.skinnormal_vertex}\n\t\t${De.defaultnormal_vertex}\n\n\t\t// Get the current vertex position\n\t\ttransformed = vec3( position );\n\t\t${De.skinning_vertex}\n\t\tnewPosition = velocityMatrix * vec4( transformed, 1.0 );\n\n\t\t// Get the previous vertex position\n\t\ttransformed = vec3( position );\n\t\t${De.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")}\n\t\t${De.skinning_vertex.replace(/vec4 /g,"")}\n\t\tprevPosition = prevVelocityMatrix * vec4( transformed, 1.0 );\n\n\t\tgl_Position = newPosition;\n`;class El extends W{constructor(){super({uniforms:{prevVelocityMatrix:{value:new m},velocityMatrix:{value:new m},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:`\n #define MAX_BONES 1024\n \n ${De.skinning_pars_vertex}\n \n\t\t#ifdef USE_SKINNING\n\t\t#ifdef BONE_TEXTURE\n\t\t\tuniform sampler2D prevBoneTexture;\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tfloat j = i * 4.0;\n\t\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\t\ty = dy * ( y + 0.5 );\n\t\t\t\tvec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\t\tvec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\t\tvec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\t\tvec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#else\n\t\t\tuniform mat4 prevBoneMatrices[ MAX_BONES ];\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tmat4 bone = prevBoneMatrices[ int(i) ];\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#endif\n\t\t#endif\n\n \n uniform mat4 velocityMatrix;\n uniform mat4 prevVelocityMatrix;\n uniform float interpolateGeometry;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n \n ${Sl}\n\n\t\t\t\t\t\tvHighPrecisionZW = gl_Position.zw;\n \n }`,fragmentShader:"\n uniform float intensity;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n\t\t\t\t\t\t#ifdef FULL_MOVEMENT\n\t\t\t\t\t\tgl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t#endif\n\n vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5;\n vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5;\n \n vec2 vel = pos1 - pos0;\n\n\t\t\t\t\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n \n gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. );\n \n }"}),this.isVelocityMaterial=!0}}const Dl=new a(0),Cl=["visible","wireframe","side"];class Il extends La{constructor(e,n){var i,s;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new t,quaternion:new r},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=n,this.renderTarget=new oe((null==(i=window)?void 0:i.innerWidth)||1e3,(null==(s=window)?void 0:s.innerHeight)||1e3,{type:G})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=wl(this._scene);for(const n of this.visibleMeshes){var e;const i=n.material;let[r,s]=this.cachedMaterials.get(n)||[];var t;if(i!==r)s=new El,s.lastMatrixWorld=new m,n.material=s,null!=(t=n.skeleton)&&t.boneTexture&&this.saveBoneTexture(n),this.cachedMaterials.set(n,[i,s]);if(s.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,n.modelViewMatrix),n.userData.needsUpdatedReflections||i.map instanceof Le?("FULL_MOVEMENT"in s.defines||(s.needsUpdate=!0),s.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in s.defines&&(delete s.defines.FULL_MOVEMENT,s.needsUpdate=!0),n.visible=this.cameraMovedThisFrame||!n.matrixWorld.equals(s.lastMatrixWorld)||n.skeleton||"FULL_MOVEMENT"in s.defines,n.material=s,n.visible){this.renderedMeshesThisFrame++;for(const e of Cl)s[e]=i[e];null!=(e=n.skeleton)&&e.boneTexture&&(s.defines.USE_SKINNING="",s.defines.BONE_TEXTURE="",s.uniforms.boneTexture.value=n.skeleton.boneTexture)}}}saveBoneTexture(e){let t=e.material.uniforms.prevBoneTexture.value;if(t&&t.image.width===e.skeleton.boneTexture.width)t=e.material.uniforms.prevBoneTexture.value,t.image.data.set(e.skeleton.boneTexture.image.data);else{var n;null==(n=t)||n.dispose();const i=e.skeleton.boneTexture.image.data.slice(),r=e.skeleton.boneTexture.image.width;t=new we(i,r,r,o,V),e.material.uniforms.prevBoneTexture.value=t,t.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const t of this.visibleMeshes){var e;if(t.material.isVelocityMaterial)t.visible=!0,t.material.lastMatrixWorld.copy(t.matrixWorld),t.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,t.modelViewMatrix),null!=(e=t.skeleton)&&e.boneTexture&&this.saveBoneTexture(t),t.material=this.cachedMaterials.get(t)[0]}}setSize(e,t){this.renderTarget.setSize(e,t)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:t}=this._scene;this._scene.background=Dl,e.render(this._scene,this._camera),this._scene.background=t}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return(e>1e-6||t>1e-6)&&(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0)}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const Ml=new M;class Bl extends La{constructor(e,n,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new t,quaternion:new r},this._scene=e,this._camera=n,this.renderTarget=new oe(1,1,{minFilter:A,magFilter:A,type:G,depthBuffer:!1}),this.velocityPass=new Il(e,n),this.fullscreenMaterial=new Tl(i),this.fullscreenMaterial.defines.correctionRadius=s.correctionRadius||1,s.dilation&&(this.fullscreenMaterial.defines.dilation=""),s.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,t){this.renderTarget.setSize(e,t),this.velocityPass.setSize(e*this.velocityResolutionScale,t*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=1===this.velocityResolutionScale?w:A,this.velocityPass.renderTarget.texture.magFilter=1===this.velocityResolutionScale?w:A,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/t),this.setupFramebuffers(e,t)}setupFramebuffers(e,t){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new Re(e,t,o),this.accumulatedTexture.minFilter=A,this.accumulatedTexture.magFilter=A,this.accumulatedTexture.type=G,this.lastVelocityTexture=new Re(e*this.velocityResolutionScale,t*this.velocityResolutionScale,o),this.lastVelocityTexture.minFilter=1===this.velocityResolutionScale?w:A,this.lastVelocityTexture.magFilter=1===this.velocityResolutionScale?w:A,this.lastVelocityTexture.type=G,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||t>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(Ml,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(Ml,this.lastVelocityTexture)}}const Rl=function(e,t){let n=1,i=0;for(;e>0;)n/=t,i+=n*(e%t),e=~~(e/t);return i};function Pl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Ol="\n#if defined( USE_ENVMAP ) || defined( ) || defined ( USE_SHADOWMAP )\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\n #ifdef BOX_PROJECTED_ENV_MAP\n vWorldPosition = worldPosition.xyz;\n #endif\n#endif\n",_l="\n#ifdef BOX_PROJECTED_ENV_MAP\n uniform vec3 envMapSize;\n uniform vec3 envMapPosition;\n varying vec3 vWorldPosition;\n \n vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) {\n vec3 nDir = normalize( v );\n\n vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n\n vec3 rbminmax;\n\n rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x;\n rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y;\n rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z;\n\n float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z );\n vec3 boxIntersection = vWorldPosition + nDir * correction;\n \n return boxIntersection - cubePos;\n }\n#endif\n",Ll="\n#ifdef BOX_PROJECTED_ENV_MAP\n worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition );\n#endif\n",kl="\n#ifdef BOX_PROJECTED_ENV_MAP\n reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition );\n#endif\n";const Nl="#define GLSLIFY 1\n#define MODE_DEFAULT 0\n#define MODE_REFLECTIONS 1\n#define MODE_RAW_REFLECTION 2\n#define MODE_BLURRED_REFLECTIONS 3\n#define MODE_INPUT 4\n#define MODE_BLUR_MIX 5\n#define FLOAT_EPSILON 0.00001\nuniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples;\n#include <boxBlur>\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);}\n#if RENDER_MODE == MODE_DEFAULT\noutputColor=vec4(inputColor.rgb+reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_REFLECTIONS\noutputColor=vec4(reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_RAW_REFLECTION\noutputColor=vec4(reflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLURRED_REFLECTIONS\noutputColor=vec4(blurredReflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_INPUT\noutputColor=vec4(inputColor.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLUR_MIX\noutputColor=vec4(vec3(blur),1.0);\n#endif\n}".replace("#include <helperFunctions>",ml).replace("#include <boxBlur>","#define GLSLIFY 1\nuniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}"),Ul=["blur","blurSharpness","blurKernel"],Fl=new Ce(1);let jl;class zl extends al{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Al;super("SSREffect",Nl,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new he(null)],["blur",new he(0)],["blurSharpness",new he(0)],["blurKernel",new he(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=(e=>{const t=[];let n=1;const i=n+e;for(;n<i;n++)t.push([Rl(n,2)-.5,Rl(n,3)-.5]);return t})(1024),this.haltonIndex=0,this.selection=new rl,this.lastSize=void 0,this.cubeCamera=new Ie(.001,1e3,Fl),this.usingBoxProjectedEnvMap=!1,this._scene=e,this._camera=t;n=gl({},Al,n,{boxBlur:!0,dilation:!0}),this.temporalResolvePass=new Bl(e,t,"#define GLSLIFY 1\n#define INV_EULER 0.36787944117144233\nalpha=velocityDisocclusion<FLOAT_EPSILON ?(alpha+0.0075): 0.0;alpha=clamp(alpha,0.0,1.0);bool needsBlur=!didReproject||velocityDisocclusion>0.5;\n#ifdef boxBlur\nif(needsBlur)inputColor=boxBlurredColor;\n#endif\nif(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}",n),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new xl(this,n),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:n.width,height:n.height,resolutionScale:n.resolutionScale,velocityResolutionScale:n.velocityResolutionScale},this.setSize(n.width,n.height),this.makeOptionsReactive(n)}makeOptionsReactive(e){let t=!1;const n=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(n);for(const r of Object.keys(e))Object.defineProperty(this,r,{get:()=>e[r],set(s){if(e[r]!==s||!t)switch(e[r]=s,Ul.includes(r)||this.setSize(this.lastSize.width,this.lastSize.height,!0),r){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=s,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=s;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=s;break;case"blurKernel":this.uniforms.get("blurKernel").value=s;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"missedRays":s?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(s),this.temporalResolvePass.fullscreenMaterial.needsUpdate=t;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=s;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=s;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=s;break;case"distance":n.rayDistance.value=s;default:i.includes(r)&&(n[r].value=s)}}}),this[r]=e[r];t=!0}setSize(e,t){(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||e!==this.lastSize.width||t!==this.lastSize.height||this.resolutionScale!==this.lastSize.resolutionScale||this.velocityResolutionScale!==this.lastSize.velocityResolutionScale)&&(this.temporalResolvePass.setSize(e,t),this.reflectionsPass.setSize(e,t),this.lastSize={width:e,height:t,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:512;this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new Ce(r),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),jl||(jl=new Me(e),jl.compileCubemapShader());const s=jl.fromCubemap(this.cubeCamera.renderTarget.texture).texture;s.minFilter=A,s.magFilter=A;const o=this.reflectionsPass.fullscreenMaterial;return function(e,t,n){e.defines.BOX_PROJECTED_ENV_MAP="",e.uniforms.envMapPosition={value:t},e.uniforms.envMapSize={value:n};const i=new RegExp(Pl("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),r=new RegExp(Pl("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");e.vertexShader="varying vec3 vWorldPosition;\n"+e.vertexShader.replace("#include <worldpos_vertex>",Ol),e.fragmentShader=_l+"\n"+e.fragmentShader.replace("#include <envmap_physical_pars_fragment>",De.envmap_physical_pars_fragment).replace(i,`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n ${Ll}`).replace(r,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n ${kl}`)}(o,n,i),o.fragmentShader=o.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),o.uniforms.envMapPosition.value.copy(n),o.uniforms.envMapSize.value.copy(i),bl(o,s,r),this.usingBoxProjectedEnvMap=!0,s}setIBLRadiance(e,t){this._scene.traverse((n=>{if(n.material){var i;const r=null==(i=t.properties.get(n.material))?void 0:i.uniforms;r&&"disableIBLRadiance"in r&&(r.disableIBLRadiance.value=e)}}))}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,t){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const t=this.reflectionsPass.fullscreenMaterial;let n=null;if(this._scene.traverse((t=>{if(!n&&t.material&&!t.material.envMap){const i=e.properties.get(t.material);"envMap"in i&&i.envMap instanceof l&&(n=i.envMap)}})),n){const e=this._scene.environment.image.height;bl(t,n,e)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[n,i]=this.haltonSequence[this.haltonIndex],{width:r,height:s}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(r,s,n,i,r,s),this.reflectionsPass.render(e,t),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;De.envmap_physical_pars_fragment=0===e?De.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):De.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}class Hl{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpddate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpddate)return;this.effectsNeedsUpddate=!1;const{effectComposer:e}=this;e.passes.forEach((t=>{t instanceof Ka&&(e.removePass(t),t.dispose())}));const t=Array.from(this.effectsMap).filter((e=>{let[,{enabled:t}]=e;return t})).map((e=>{let[,{effect:t}]=e;return t})),n=new Ka(this.camera,...t);this.passesMap.set(Hl.CONSTANTS.effectPass,n),e.addPass(n)}updateCamera(e){const{passesMap:t,effectsMap:n}=this,{CONSTANTS:i}=Hl,r=t.get(i.renderPass),s=t.get(i.normalPass),o=t.get(i.effectPass);r.mainCamera=e,s.mainCamera=e,o.mainCamera=e;n.get(i.outlineEffect).effect.mainCamera=e}_initEffectComposer(){const e=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:i=0,frameBufferType:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.renderer=null,this.inputBuffer=this.createBuffer(t,n,r,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new ka,this.depthTexture=null,this.passes=[],this.timer=new class{constructor(){this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return this._delta*nl}get fixedDelta(){return this._fixedDelta*nl}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return this._elapsed*nl}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=void 0!==e?e:performance.now(),this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()}handleEvent(e){document.hidden||(this.currentTime=performance.now())}dispose(){this.autoReset=!1}},this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){const t=e.getSize(new M),n=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===re&&e.outputEncoding===I&&(this.inputBuffer.texture.encoding=I,this.outputBuffer.texture.encoding=I,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const t of this.passes)t.initialize(e,n,i)}}replaceRenderer(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.renderer,i=n.domElement.parentNode;return this.setRenderer(e),t&&null!==i&&(i.removeChild(n.domElement),i.appendChild(e.domElement)),n}createDepthTexture(){const e=this.depthTexture=new ae;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=le,e.type=ce):e.type=ue,e}deleteDepthTexture(){if(null!==this.depthTexture){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,n,i){const r=this.renderer,s=null===r?new M:r.getDrawingBufferSize(new M),o={minFilter:A,magFilter:A,stencilBuffer:t,depthBuffer:e,type:n};let a;return i>0?(a=new oe(s.width,s.height,o),a.ignoreDepthForMultisampleCopy=!1,a.samples=i):a=new oe(s.width,s.height,o),n===re&&null!==r&&r.outputEncoding===I&&(a.texture.encoding=I),a.texture.name="EffectComposer.Buffer",a.texture.generateMipmaps=!1,a}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const n=this.passes,i=this.renderer,r=i.getDrawingBufferSize(new M),s=i.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(r.width,r.height),e.initialize(i,s,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){const t=this.createDepthTexture();for(e of n)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,n=t.indexOf(e);if(-1!==n&&t.splice(n,1).length>0){if(null!==this.depthTexture){const n=(e,t)=>e||t.needsDepthTexture;t.reduce(n,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,n=this.copyPass;let i,r,s,o=this.inputBuffer,a=this.outputBuffer,l=!1;void 0===e&&(this.timer.update(),e=this.timer.delta);for(const c of this.passes)c.enabled&&(c.render(t,o,a,e,l),c.needsSwap&&(l&&(n.renderToScreen=c.renderToScreen,i=t.getContext(),r=t.state.buffers.stencil,r.setFunc(i.NOTEQUAL,1,4294967295),n.render(t,o,a,e,l),r.setFunc(i.EQUAL,1,4294967295)),s=o,o=a,a=s),c instanceof Ja?l=!0:c instanceof Na&&(l=!1))}setSize(e,t,n){const i=this.renderer,r=i.getSize(new M);void 0!==e&&void 0!==t||(e=r.width,t=r.height),r.width===e&&r.height===t||i.setSize(e,t,n);const s=i.getDrawingBufferSize(new M);this.inputBuffer.setSize(s.width,s.height),this.outputBuffer.setSize(s.width,s.height);for(const e of this.passes)e.setSize(s.width,s.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}}(this.renderer,{multisampling:8,frameBufferType:G});return e}_initPasses(){const{effectComposer:e}=this,{CONSTANTS:t}=Hl,n=this._initRenderPass(),i=this._initNormalPass(),r=this._initEffectPass();e.addPass(n),e.addPass(i),e.addPass(r),this.passesMap.set(t.renderPass,n),this.passesMap.set(t.normalPass,i),this.passesMap.set(t.effectPass,r)}_initRenderPass(){return new Va(this.scene,this.camera)}_initNormalPass(){const e=new el(this.scene,this.camera,{resolutionScale:1});return e.enabled=!1,e}_initEffectPass(){return new Ka(this.camera)}_initEffects(){const{CONSTANTS:e}=Hl,t=this._initSMAAEffect(),n=this._initOutlineEffect(),i=this._initSSREffect(),r=this._initBloomEffect(),s=this._initSSAOEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:n}),this.effectsMap.set(e.ssrEffect,{enabled:!1,effect:i}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r}),this.effectsMap.set(e.ssaoEffect,{enabled:!1,effect:s})}_initSMAAEffect(){return new fl({preset:wa.HIGH,edgeDetectionMode:pa.COLOR})}_initSSREffect(){return new zl(this.scene,this.camera)}_initBloomEffect(){return new ll({blendFunction:fa.ADD})}_initOutlineEffect(){return new ul(this.scene,this.camera,{blendFunction:fa.SCREEN})}_initSSAOEffect(){const{CONSTANTS:e}=Hl,t=this.passesMap.get(e.normalPass);return new pl(this.camera,t.texture,{blendFunction:fa.MULTIPLY})}}Hl.CONSTANTS={renderPass:"renderPass",normalPass:"normalPass",effectPass:"effectPass",smaaEffect:"smaaEffect",ssaoEffect:"ssaoEffect",outlineEffect:"outlineEffect",ssrEffect:"ssrEffect",bloomEffect:"bloomEffect"};class Gl{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="slice",force:n=!1,frameSliceCount:i=500}=e,{viewport:{scener:{intersectsList:{meshOfModelList:r}}}}=this,s=e=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||(e.geometry.computeBoundsTree(),this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid))};return new Promise((e=>{if("block"===t)r.forEach(s),e();else{let t=0,n=0;const o=()=>{if(t=requestAnimationFrame(o),!this.cameraChanging){for(const e of r.slice(n,n+i))s(e),n+=1;n>=r.length&&(cancelAnimationFrame(t),e())}};o()}}))}}const Vl=navigator.userAgent.toLowerCase().includes("mac");var Yl;!function(e){e[e.NONE=-1]="NONE",e[e.ROTATE=0]="ROTATE",e[e.ZOOM=1]="ZOOM",e[e.PAN=2]="PAN"}(Yl||(Yl={}));const Wl=new t,Xl=[new t,new t,new t],Ql=[new t,new t,new t];let Kl=new DOMRect;class Zl{constructor(e){this.viewport=e,this.camera=this.viewport.cameraManager.mainCamera,this.domElement=this.viewport.interactiveContainer,this.interactivePosition=null,this.fallbackInteractivePosition=null,this.enabled=!0,this.enabledMousePointInteractive=!0,this.enableZoom=!0,this.zoomSpeed=1,this.zoomMinDistance=1,this.zoomMaxDistance=1e5,this.zoomMinStepDistance=.1,this.zoomMaxStepDistance=2e4,this.enableRotate=!0,this.enableRotateX=!0,this.enableRotateY=!0,this.rotateSpeed=1,this.rotateTiltRange={max:Math.PI,min:0},this.enableAutoRotate=!1,this.autoRotateSpeed=1,this.autoRotateClockwise=!0,this.enableOutOfScene=!0,this.unOffsetOfScene=0,this.enablePan=!0,this.enablePanX=!0,this.enablePanY=!0,this.enablePanAxisX=!0,this.enablePanAxisY=!0,this.enablePanAxisZ=!0,this.panSpeed=2,this.state=Yl.NONE,this.sceneBoxCenter=new t,this.dispose=()=>{},this.domElement=e.interactiveContainer,this.init()}init(){const e=e=>{e.preventDefault(),!1!==this.enabled&&(0===e.button?this.state=Yl.ROTATE:1===e.button?this.state=Yl.ZOOM:2===e.button&&(this.state=Yl.PAN),Kl=this.domElement.getBoundingClientRect(),this.state!==Yl.ROTATE&&this.state!==Yl.PAN||(this.interactivePosition=this.getInteractivePosition(e),this.interactivePosition||(this.sceneBoxCenter=this.getSceneBbox().getCenter(new t)),this.domElement.addEventListener("mousemove",n,!1),window.addEventListener("mouseup",i,!0)))},n=e=>{if(e.preventDefault(),!1===this.enabled)return;const{movementX:n,movementY:i}=e;this.state===Yl.ROTATE?this.rotate(new t(.00375*-n,.00375*-i,0)):this.state===Yl.PAN&&this.pan(new t(-n,i,0))},i=e=>{e.preventDefault(),this.domElement.removeEventListener("mousemove",n,!1),window.removeEventListener("mouseup",i,!0),this.state=Yl.NONE},r=e=>{if(e.preventDefault(),!this.enabled)return;let n=0;n=Vl&&e.shiftKey?120*-e.deltaX:120*-e.deltaY,this.zoom_on_point(new t(0,0,n),e)},s=e=>{if(e.preventDefault(),!1===this.enabled)return;Kl=this.domElement.getBoundingClientRect();const n=e.touches;switch(n.length){case 1:Xl[0].set(n[0].clientX,n[0].clientY,0),Xl[1].set(n[0].clientX,n[0].clientY,0);break;case 2:Xl[0].set(n[0].clientX,n[0].clientY,0),Xl[1].set(n[1].clientX,n[1].clientY,0);break;case 3:case 4:case 5:Xl[0].set(n[0].clientX,n[0].clientY,0),Xl[1].set(n[2].clientX,n[2].clientY,0)}const i=new t(Kl.x,Kl.y,0);Xl[0].sub(i),Xl[1].sub(i),Ql[0].copy(Xl[0]),Ql[1].copy(Xl[1]),this.interactivePosition=this.getInteractivePosition({offsetX:(Xl[0].x+Xl[1].x)/2,offsetY:(Xl[0].y+Xl[1].y)/2}),this.interactivePosition||(this.sceneBoxCenter=this.getSceneBbox().getCenter(new t)),this.domElement.addEventListener("touchmove",o,{passive:!1}),this.domElement.addEventListener("touchend",a,!1)},o=e=>{if(e.preventDefault(),!1===this.enabled)return;function n(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"y";const r=new M(e[1].x-e[0].x,e[1].y-e[0].y),s=new M(n[1].x-n[0].x,n[1].y-n[0].y),o=r.angle(),a=s.angle();r.normalize(),s.normalize();const l=n[0].y-e[0].y;return"y"===i?new t(0,.005*l,0):"x"===i?new t(o-a,0,0):new t}switch(e.touches.length){case 1:{Xl[0].set(e.touches[0].clientX-Kl.x,e.touches[0].clientY-Kl.y,0),Xl[1].set(e.touches[0].clientX-Kl.x,e.touches[0].clientY-Kl.y,0);const t=Xl[0].clone().sub(((e,t)=>{let n=t[0];for(const i in t)n.distanceTo(e)>t[i].distanceTo(e)&&(n=t[i]);return n})(Xl[0],Ql));t.x=-t.x;const n=t.multiplyScalar(.9);this.pan(n);break}case 2:{Xl[0].set(e.touches[0].clientX-Kl.x,e.touches[0].clientY-Kl.y,0),Xl[1].set(e.touches[1].clientX-Kl.x,e.touches[1].clientY-Kl.y,0);const i=Ql[0].distanceTo(Ql[1])-Xl[0].distanceTo(Xl[1]);this.zoom_touch(new t(0,0,i*this.zoomSpeed/25)),this.rotate(n(Xl,Ql,"x"));break}case 3:case 4:case 5:Xl[0].set(e.touches[0].clientX-Kl.x,e.touches[0].clientY-Kl.y,0),Xl[1].set(e.touches[2].clientX-Kl.x,e.touches[2].clientY-Kl.y,0),this.rotate(n(Xl,Ql,"y"))}Ql[0].copy(Xl[0]),Ql[1].copy(Xl[1])},a=e=>{e.preventDefault(),this.state=Yl.NONE,this.domElement.removeEventListener("touchmove",o,!1),this.domElement.removeEventListener("touchend",a,!1)};this.domElement.addEventListener("mousedown",e,!1),this.domElement.addEventListener("wheel",r,{passive:!1}),this.domElement.addEventListener("touchstart",s,{passive:!1}),this.dispose=()=>{this.domElement.removeEventListener("mousedown",e),this.domElement.removeEventListener("wheel",r),this.domElement.removeEventListener("touchstart",s)}}getInteractivePosition(e){if(this.enabledMousePointInteractive){const t=this.viewport.getIntersects(e,void 0,{isFilterHideObject:!0});if(t.length){const[{point:e}]=t;return e.clone()}return this.fallbackInteractivePosition}return this.fallbackInteractivePosition}intersectsBox(e){const n=this.getSceneBbox(),i=new t;n.getSize(i);let r=Math.max(i.x,i.y,i.z);0!=this.unOffsetOfScene&&(r=this.unOffsetOfScene);const s=n.clone();s.min.addScalar(r/2),s.max.addScalar(-r/2);const o=(new $).copy(this.camera);o.position.add(e),o.updateMatrixWorld(),o.updateProjectionMatrix();return(new ke).setFromProjectionMatrix((new m).multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse)).intersectsBox(n)}caculateContainPoint(e,n){const i=(new t).copy(e).applyMatrix4(n.matrixWorldInverse).applyMatrix4(n.projectionMatrix);return!(Math.abs(i.x)>1||Math.abs(i.y)>1||Math.abs(i.z)>1)}panLeft(e){const n=new t,i=this.camera.matrix.elements;this.enablePanAxisX&&n.setX(i[0]),this.enablePanAxisY&&n.setY(i[1]),this.enablePanAxisZ&&n.setZ(i[2]),n.multiplyScalar(e);let r=!0;this.enableOutOfScene||(r=this.intersectsBox(n)),r&&this.camera.position.add(n)}panUp(e){const n=new t,i=this.camera.matrix.elements;this.enablePanAxisX&&n.setX(i[4]),this.enablePanAxisY&&n.setY(i[5]),this.enablePanAxisZ&&n.setZ(i[6]),n.multiplyScalar(e);let r=!0;this.enableOutOfScene||(r=this.intersectsBox(n)),r&&this.camera.position.add(n)}pan(e){var t;if(!this.enablePan)return;this.enablePanX||e.setX(0),this.enablePanY||e.setY(0);const n=null!==(t=this.interactivePosition)&&void 0!==t?t:this.sceneBoxCenter;let i=this.camera.position.clone().sub(n).length();i*=Math.tan(this.camera.fov/2*Math.PI/180),this.panLeft(this.panSpeed*e.x*i/Kl.height),this.panUp(this.panSpeed*e.y*i/Kl.height),this.viewport.signals.cameraChange.dispatch()}zoom_on_point(e,n){if(!this.enableZoom)return;this.interactivePosition=this.getInteractivePosition(n);let i=e.z>0?6:-6;const r=new t(0,0,0);let s;if(this.interactivePosition){s=this.interactivePosition.distanceTo(this.camera.position);const e=this.domElement.getBoundingClientRect();r.set(n.offsetX/e.width*2-1,-n.offsetY/e.height*2+1,.1)}else s=this.camera.position.length(),r.set(0,0,.1);let o=!1;s>this.zoomMaxDistance&&i<0?(o=!0,s=this.zoomMaxDistance,i*=2):s<this.zoomMinDistance&&i>0&&(o=!0,s=this.zoomMinDistance,i*=2),r.unproject(this.camera),r.sub(this.camera.position);let a=s/i*this.zoomSpeed;if(a>0?a>this.zoomMaxStepDistance?a=this.zoomMaxStepDistance:a<this.zoomMinStepDistance&&(a=this.zoomMinStepDistance):a<0&&(a<-this.zoomMaxStepDistance?a=-this.zoomMaxStepDistance:a>-this.zoomMinStepDistance&&(a=-this.zoomMinStepDistance)),o&&!n.shiftKey)return;const l=this.camera.position.clone().addVectors(this.camera.position,r.setLength(a));this.camera.position.copy(l),this.viewport.signals.cameraChange.dispatch()}zoom_touch(e){if(!this.enableZoom)return;let n=e.z;const i=new t(0,0,0);let r;if(this.interactivePosition){const e={offsetX:(Ql[0].x+Ql[1].x)/2,offsetY:(Ql[0].y+Ql[1].y)/2};r=this.interactivePosition.distanceTo(this.camera.position),i.set(e.offsetX/Kl.width*2-1,-e.offsetY/Kl.height*2+1,.1)}else r=this.camera.position.length(),i.set(0,0,.1);if(r>this.zoomMaxDistance&&n>0?(r=this.zoomMaxDistance,n=0):r<this.zoomMinDistance&&n<0&&(r=this.zoomMinDistance),0===n)return;i.unproject(this.camera),i.sub(this.camera.position);let s=r*-n*this.zoomSpeed*.1;s>0?s>this.zoomMaxStepDistance?s=this.zoomMaxStepDistance:s<this.zoomMinStepDistance&&(s=this.zoomMinStepDistance):s<0&&(s<-this.zoomMaxStepDistance?s=-this.zoomMaxStepDistance:s>-this.zoomMinStepDistance&&(s=-this.zoomMinStepDistance));const o=this.camera.position.clone().addVectors(this.camera.position,i.setLength(s));this.camera.position.copy(o),this.viewport.signals.cameraChange.dispatch()}rotate(e){var n;if(!this.enableRotate)return;e.x*=this.rotateSpeed,e.y*=this.rotateSpeed;const i=new t(0,0,-1);i.applyQuaternion(this.camera.quaternion);const r=i.angleTo(new t(0,1,0));(r-e.y>this.rotateTiltRange.max&&e.y<0||r-e.y<this.rotateTiltRange.min&&e.y>0)&&(e.y=0);const s=null!==(n=this.interactivePosition)&&void 0!==n?n:this.sceneBoxCenter;Wl.copy(this.camera.position).sub(s);const o=new m,a=new t(1,0,0);this.enableRotateX&&o.makeRotationAxis(new t(0,1,0),e.x);const l=new m;this.enableRotateY&&(a.applyEuler(this.camera.rotation),l.makeRotationAxis(a,e.y),o.multiply(l)),Wl.applyMatrix4(o),i.applyMatrix4(o),this.camera.position.copy(s).add(Wl),this.camera.lookAt(i.add(this.camera.position)),this.viewport.signals.cameraChange.dispatch()}autoRotate(){const e=this.autoRotateClockwise?.01:-.01;this.rotate(new t(e*this.autoRotateSpeed,0,0))}update(){this.enableAutoRotate&&this.autoRotate()}getSceneBbox(){const e=this.viewport.scene,t=new i;return t.setFromObject(e),t}}const ql={type:"change"},Jl={type:"start"},$l={type:"end"};class ec extends me{constructor(e,n){super(),this.object=e,this.domElement=n,this.enabled=!0,this.target=new t,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.enableAutoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Ne.ROTATE,MIDDLE:Ne.DOLLY,RIGHT:Ne.PAN},this.touches={ONE:Ue.ROTATE,TWO:Ue.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.userData.zoom,this._domElementKeyEvents=null,this.domElement.style.touchAction="none",this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",W),this._domElementKeyEvents=e},this.saveState=function(){i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.userData.zoom},this.reset=function(){i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.userData.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(ql),i.update(),o=s.NONE},this.update=function(){const n=new t,f=(new r).setFromUnitVectors(e.up,new t(0,1,0)),p=f.clone().invert(),g=new t,m=new r,v=2*Math.PI;return function(){const e=i.object.position;n.copy(e).sub(i.target),n.applyQuaternion(f),l.setFromVector3(n),i.enableAutoRotate&&o===s.NONE&&E(2*Math.PI/60/60*i.autoRotateSpeed),i.enableDamping?(l.theta+=c.theta*i.dampingFactor,l.phi+=c.phi*i.dampingFactor):(l.theta+=c.theta,l.phi+=c.phi);let t=i.minAzimuthAngle,r=i.maxAzimuthAngle;return isFinite(t)&&isFinite(r)&&(t<-Math.PI?t+=v:t>Math.PI&&(t-=v),r<-Math.PI?r+=v:r>Math.PI&&(r-=v),l.theta=t<=r?Math.max(t,Math.min(r,l.theta)):l.theta>(t+r)/2?Math.max(t,l.theta):Math.min(r,l.theta)),l.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,l.phi)),l.makeSafe(),l.radius*=u,l.radius=Math.max(i.minDistance,Math.min(i.maxDistance,l.radius)),!0===i.enableDamping?i.target.addScaledVector(h,i.dampingFactor):i.target.add(h),n.setFromSpherical(l),n.applyQuaternion(p),e.copy(i.target).add(n),i.object.lookAt(i.target),!0===i.enableDamping?(c.theta*=1-i.dampingFactor,c.phi*=1-i.dampingFactor,h.multiplyScalar(1-i.dampingFactor)):(c.set(0,0,0),h.set(0,0,0)),u=1,!!(d||g.distanceToSquared(i.object.position)>a||8*(1-m.dot(i.object.quaternion))>a)&&(i.dispatchEvent(ql),g.copy(i.object.position),m.copy(i.object.quaternion),d=!1,!0)}}(),this.dispose=function(){i.domElement.removeEventListener("contextmenu",X),i.domElement.removeEventListener("pointerdown",z),i.domElement.removeEventListener("pointercancel",V),i.domElement.removeEventListener("wheel",Y),i.domElement.removeEventListener("pointermove",H),window.removeEventListener("pointerup",G),null!==i._domElementKeyEvents&&i._domElementKeyEvents.removeEventListener("keydown",W)};const i=this,s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=s.NONE;const a=1e-6,l=new Fe,c=new Fe;let u=1;const h=new t;let d=!1;const f=new M,p=new M,g=new M,m=new M,v=new M,y=new M,w=new M,b=new M,x=new M,A=[],T={};function S(){return Math.pow(.95,i.zoomSpeed)}function E(e){c.theta-=e}function D(e){c.phi-=e}const C=function(){const e=new t;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),h.add(e)}}(),I=function(){const e=new t;return function(t,n){!0===i.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(i.object.up,e)),e.multiplyScalar(t),h.add(e)}}(),B=function(){const e=new t;return function(t,n){const r=i.domElement;if(i.object instanceof $){const s=i.object.position;e.copy(s).sub(i.target);let o=e.length();o*=Math.tan(i.object.fov/2*Math.PI/180),C(2*t*o/r.clientHeight,i.object.matrix),I(2*n*o/r.clientHeight,i.object.matrix)}else i.object.isOrthographicCamera?(C(t*(i.object.right-i.object.left)/i.object.userData.zoom/r.clientWidth,i.object.matrix),I(n*(i.object.top-i.object.bottom)/i.object.userData.zoom/r.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}}();function R(e){i.object instanceof $?u/=e:i.object.isOrthographicCamera?(i.object.userData.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.userData.zoom*e)),i.object.updateProjectionMatrix(),d=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function P(e){i.object instanceof $?u*=e:i.object.isOrthographicCamera?(i.object.userData.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.userData.zoom/e)),i.object.updateProjectionMatrix(),d=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function O(e){f.set(e.clientX,e.clientY)}function _(e){m.set(e.clientX,e.clientY)}function L(){if(1===A.length)f.set(A[0].pageX,A[0].pageY);else{const e=.5*(A[0].pageX+A[1].pageX),t=.5*(A[0].pageY+A[1].pageY);f.set(e,t)}}function k(){if(1===A.length)m.set(A[0].pageX,A[0].pageY);else{const e=.5*(A[0].pageX+A[1].pageX),t=.5*(A[0].pageY+A[1].pageY);m.set(e,t)}}function N(){const e=A[0].pageX-A[1].pageX,t=A[0].pageY-A[1].pageY,n=Math.sqrt(e*e+t*t);w.set(0,n)}function U(e){if(1==A.length)p.set(e.pageX,e.pageY);else{const t=Z(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);p.set(n,i)}g.subVectors(p,f).multiplyScalar(i.rotateSpeed);const t=i.domElement;E(2*Math.PI*g.x/t.clientHeight),D(2*Math.PI*g.y/t.clientHeight),f.copy(p)}function F(e){if(1===A.length)v.set(e.pageX,e.pageY);else{const t=Z(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);v.set(n,i)}y.subVectors(v,m).multiplyScalar(i.panSpeed),B(y.x,y.y),m.copy(v)}function j(e){const t=Z(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);b.set(0,s),x.set(0,Math.pow(b.y/w.y,i.zoomSpeed)),R(x.y),w.copy(b)}function z(e){!1!==i.enabled&&(0===A.length&&(i.domElement.addEventListener("pointermove",H),window.addEventListener("pointerup",G)),function(e){A.push(e)}(e),"touch"===e.pointerType?function(e){switch(K(e),A.length){case 1:switch(i.touches.ONE){case Ue.ROTATE:if(!1===i.enableRotate)return;L(),o=s.TOUCH_ROTATE;break;case Ue.PAN:if(!1===i.enablePan)return;k(),o=s.TOUCH_PAN;break;default:o=s.NONE}break;case 2:switch(i.touches.TWO){case Ue.DOLLY_PAN:if(!1===i.enableZoom&&!1===i.enablePan)return;i.enableZoom&&N(),i.enablePan&&k(),o=s.TOUCH_DOLLY_PAN;break;case Ue.DOLLY_ROTATE:if(!1===i.enableZoom&&!1===i.enableRotate)return;i.enableZoom&&N(),i.enableRotate&&L(),o=s.TOUCH_DOLLY_ROTATE;break;default:o=s.NONE}break;default:o=s.NONE}o!==s.NONE&&i.dispatchEvent(Jl)}(e):function(e){let t;switch(e.button){case 0:t=i.mouseButtons.LEFT;break;case 1:t=i.mouseButtons.MIDDLE;break;case 2:t=i.mouseButtons.RIGHT;break;default:t=-1}switch(t){case Ne.DOLLY:if(!1===i.enableZoom)return;!function(e){w.set(e.clientX,e.clientY)}(e),o=s.DOLLY;break;case Ne.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===i.enablePan)return;_(e),o=s.PAN}else{if(!1===i.enableRotate)return;O(e),o=s.ROTATE}break;case Ne.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===i.enableRotate)return;O(e),o=s.ROTATE}else{if(!1===i.enablePan)return;_(e),o=s.PAN}break;default:o=s.NONE}o!==s.NONE&&i.dispatchEvent(Jl)}(e))}function H(e){e.preventDefault(),!1!==i.enabled&&("touch"===e.pointerType?function(e){switch(K(e),o){case s.TOUCH_ROTATE:if(!1===i.enableRotate)return;U(e),i.update();break;case s.TOUCH_PAN:if(!1===i.enablePan)return;F(e),i.update();break;case s.TOUCH_DOLLY_PAN:if(!1===i.enableZoom&&!1===i.enablePan)return;!function(e){i.enableZoom&&j(e),i.enablePan&&F(e)}(e),i.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===i.enableZoom&&!1===i.enableRotate)return;!function(e){i.enableZoom&&j(e),i.enableRotate&&U(e)}(e),i.update();break;default:o=s.NONE}}(e):function(e){switch(o){case s.ROTATE:if(!1===i.enableRotate)return;!function(e){p.set(e.clientX,e.clientY),g.subVectors(p,f).multiplyScalar(i.rotateSpeed);const t=i.domElement;E(2*Math.PI*g.x/t.clientHeight),D(2*Math.PI*g.y/t.clientHeight),f.copy(p),i.update()}(e);break;case s.DOLLY:if(!1===i.enableZoom)return;!function(e){b.set(e.clientX,e.clientY),x.subVectors(b,w),x.y>0?R(S()):x.y<0&&P(S()),w.copy(b),i.update()}(e);break;case s.PAN:if(!1===i.enablePan)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,m).multiplyScalar(i.panSpeed),B(y.x,y.y),m.copy(v),i.update()}(e)}}(e))}function G(e){Q(e),0===A.length&&(i.domElement.removeEventListener("pointermove",H),window.removeEventListener("pointerup",G)),i.dispatchEvent($l),o=s.NONE}function V(e){Q(e)}function Y(e){!1!==i.enabled&&!1!==i.enableZoom&&o===s.NONE&&(e.preventDefault(),i.dispatchEvent(Jl),function(e){e.deltaY<0?P(S()):e.deltaY>0&&R(S()),i.update()}(e),i.dispatchEvent($l))}function W(e){!1!==i.enabled&&!1!==i.enablePan&&function(e){let t=!1;switch(e.code){case i.keys.UP:B(0,i.keyPanSpeed),t=!0;break;case i.keys.BOTTOM:B(0,-i.keyPanSpeed),t=!0;break;case i.keys.LEFT:B(i.keyPanSpeed,0),t=!0;break;case i.keys.RIGHT:B(-i.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),i.update())}(e)}function X(e){!1!==i.enabled&&e.preventDefault()}function Q(e){delete T[e.pointerId];for(let t=0;t<A.length;t++)if(A[t].pointerId==e.pointerId)return void A.splice(t,1)}function K(e){let t=T[e.pointerId];void 0===t&&(t=new M,T[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Z(e){const t=e.pointerId===A[0].pointerId?A[1]:A[0];return T[t.pointerId]}i.domElement.addEventListener("contextmenu",X),i.domElement.addEventListener("pointerdown",z),i.domElement.addEventListener("pointercancel",V),i.domElement.addEventListener("wheel",Y,{passive:!1})}}class tc{get options(){return this._options}set options(e){this._options=e,e.type||(this._options.type="free"),this._onChangeCallback()}constructor(e){this.viewport=e,this._options={type:"free"},this._disposeList=new Set,this.currentControls=new Zl(this.viewport)}handleFreeControls(){const e=Un(this.options,["type"]),{postRender:t}=this.viewport,n=this.currentControls=new Zl(this.viewport);Object.assign(n,e),t.set("FreeControlsUpdate",(()=>{n.update()})),this._disposeList.add((()=>{t.delete("FreeControlsUpdate")}))}handleOrbitControls(){const e=Un(Object.assign({},this.options),["type"]),{cameraManager:{mainCamera:t},interactiveContainer:n,postRender:i}=this.viewport,r=this.currentControls=new ec(t,n);Object.assign(r,e),r.update();const s=()=>{this.viewport.signals.cameraChange.dispatch()};if(r.addEventListener("change",s),this._disposeList.add((()=>{r.removeEventListener("change",s)})),e.enableDamping||e.enableAutoRotate)i.set("OrbitControlsUpdate",(()=>{this.viewport.render((()=>{r.update()}))})),this._disposeList.add((()=>{i.delete("OrbitControlsUpdate")}));else{const e=e=>{e&&r.update()};this.viewport.signals.cameraChange.add(e),this._disposeList.add((()=>{this.viewport.signals.cameraChange.remove(e)}))}}_onChangeCallback(){switch(this.dispose(),this.options.type){case"free":default:this.handleFreeControls();break;case"orbit":this.handleOrbitControls()}this.viewport.triggerRender()}setOptions(e){this.options=e}dispose(){this.currentControls.dispose(),this._disposeList.forEach((e=>e())),this._disposeList.clear()}}var nc="0123456789abcdefghijklmnopqrstuvwxyz";function ic(e){return nc.charAt(e)}function rc(e,t){return e&t}function sc(e,t){return e|t}function oc(e,t){return e^t}function ac(e,t){return e&~t}function lc(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function cc(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var uc,hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dc="=";function fc(e){var t,n,i="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),i+=hc.charAt(n>>6)+hc.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),i+=hc.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),i+=hc.charAt(n>>2)+hc.charAt((3&n)<<4));(3&i.length)>0;)i+=dc;return i}function pc(e){var t,n="",i=0,r=0;for(t=0;t<e.length&&e.charAt(t)!=dc;++t){var s=hc.indexOf(e.charAt(t));s<0||(0==i?(n+=ic(s>>2),r=3&s,i=1):1==i?(n+=ic(r<<2|s>>4),r=15&s,i=2):2==i?(n+=ic(r),n+=ic(s>>2),r=3&s,i=3):(n+=ic(r<<2|s>>4),n+=ic(15&s),i=0))}return 1==i&&(n+=ic(r<<2)),n}var gc,mc=function(e){var t;if(void 0===uc){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(uc={},t=0;t<16;++t)uc[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)uc[n.charAt(t)]=t;for(t=0;t<i.length;++t)uc[i.charAt(t)]=-1}var r=[],s=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=uc[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);s|=a,++o>=2?(r[r.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return r},vc={decode:function(e){var t;if(void 0===gc){var n="= \f\n\r\t \u2028\u2029";for(gc=Object.create(null),t=0;t<64;++t)gc["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(gc["-"]=62,gc._=63,t=0;t<n.length;++t)gc[n.charAt(t)]=-1}var i=[],r=0,s=0;for(t=0;t<e.length;++t){var o=e.charAt(t);if("="==o)break;if(-1!=(o=gc[o])){if(void 0===o)throw new Error("Illegal character at offset "+t);r|=o,++s>=4?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,r=0,s=0):r<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=vc.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return vc.decode(e)}},yc=1e13,wc=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,i,r=this.buf,s=r.length;for(n=0;n<s;++n)(i=r[n]*e+t)<yc?t=0:i-=(t=0|i/yc)*yc,r[n]=i;t>0&&(r[n]=t)},e.prototype.sub=function(e){var t,n,i=this.buf,r=i.length;for(t=0;t<r;++t)(n=i[t]-e)<0?(n+=yc,e=1):e=0,i[t]=n;for(;0===i[i.length-1];)i.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),i=t.length-2;i>=0;--i)n+=(yc+t[i]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*yc+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),bc="…",xc=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Ac=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Tc(e,t){return e.length>t&&(e=e.substring(0,t)+bc),e}var Sc,Ec=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var i="",r=e;r<t;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var i=this.get(n);if(i<32||i>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",i=e;i<t;++i)n+=String.fromCharCode(this.get(i));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",i=e;i<t;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):r>191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,i,r="",s=e;s<t;)n=this.get(s++),i=this.get(s++),r+=String.fromCharCode(n<<8|i);return r},e.prototype.parseTime=function(e,t,n){var i=this.parseStringISO(e,t),r=(n?xc:Ac).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(e,t){for(var n,i=this.get(e),r=i>127,s=r?255:0,o="";i==s&&++e<t;)i=this.get(e);if(0===(n=t-e))return r?-1:0;if(n>4){for(o=i,n<<=3;0==(128&(+o^s));)o=+o<<1,--n;o="("+n+" bit)\n"}r&&(i-=256);for(var a=new wc(i),l=e+1;l<t;++l)a.mulAdd(256,this.get(l));return o+a.toString()},e.prototype.parseBitString=function(e,t,n){for(var i=this.get(e),r="("+((t-e-1<<3)-i)+" bit)\n",s="",o=e+1;o<t;++o){for(var a=this.get(o),l=o==t-1?i:0,c=7;c>=l;--c)s+=a>>c&1?"1":"0";if(s.length>n)return r+Tc(s,n)}return r+s},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return Tc(this.parseStringISO(e,t),n);var i=t-e,r="("+i+" byte)\n";i>(n/=2)&&(t=e+n);for(var s=e;s<t;++s)r+=this.hexByte(this.get(s));return i>n&&(r+=bc),r},e.prototype.parseOID=function(e,t,n){for(var i="",r=new wc,s=0,o=e;o<t;++o){var a=this.get(o);if(r.mulAdd(128,127&a),s+=7,!(128&a)){if(""===i)if((r=r.simplify())instanceof wc)r.sub(80),i="2."+r.toString();else{var l=r<80?r<40?0:1:2;i=l+"."+(r-40*l)}else i+="."+r.toString();if(i.length>n)return Tc(i,n);r=new wc,s=0}}return s>0&&(i+=".incomplete"),i},e}(),Dc=function(){function e(e,t,n,i,r){if(!(i instanceof Cc))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=i,this.sub=r}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return Tc(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return Tc(this.stream.parseStringISO(t,t+n),e);case 30:return Tc(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,i=this.sub.length;n<i;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var i=0;i<n;++i)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},e.decode=function(t){var n;n=t instanceof Ec?t:new Ec(t,0);var i=new Ec(n),r=new Cc(n),s=e.decodeLength(n),o=n.pos,a=o-i.pos,l=null,c=function(){var t=[];if(null!==s){for(var i=o+s;n.pos<i;)t[t.length]=e.decode(n);if(n.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var r=e.decode(n);if(r.tag.isEOC())break;t[t.length]=r}s=o-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(r.tagConstructed)l=c();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var u=0;u<l.length;++u)if(l[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){l=null}if(null===l){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);n.pos=o+Math.abs(s)}return new e(i,a,s,r,l)},e}(),Cc=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!=(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new wc;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),Ic=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Mc=(1<<26)/Ic[Ic.length-1],Bc=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<<t)-1,r=!1,s="",o=this.t,a=this.DB-o*this.DB%t;if(o-- >0)for(a<this.DB&&(n=this[o]>>a)>0&&(r=!0,s=ic(n));o>=0;)a<t?(n=(this[o]&(1<<a)-1)<<t-a,n|=this[--o]>>(a+=this.DB-t)):(n=this[o]>>(a-=t)&i,a<=0&&(a+=this.DB,--o)),n>0&&(r=!0),r&&(s+=ic(n));return r?s:"0"},e.prototype.negate=function(){var t=Lc();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Gc(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=Lc();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new Pc(t):new Oc(t),this.exp(e,n)},e.prototype.clone=function(){var e=Lc();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,i=this.DB-e*this.DB%8,r=0;if(e-- >0)for(i<this.DB&&(n=this[e]>>i)!=(this.s&this.DM)>>i&&(t[r++]=n|this.s<<this.DB-i);e>=0;)i<8?(n=(this[e]&(1<<i)-1)<<8-i,n|=this[--e]>>(i+=this.DB-8)):(n=this[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(t[r++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=Lc();return this.bitwiseTo(e,rc,t),t},e.prototype.or=function(e){var t=Lc();return this.bitwiseTo(e,sc,t),t},e.prototype.xor=function(e){var t=Lc();return this.bitwiseTo(e,oc,t),t},e.prototype.andNot=function(e){var t=Lc();return this.bitwiseTo(e,ac,t),t},e.prototype.not=function(){for(var e=Lc(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=Lc();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=Lc();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lc(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=cc(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,sc)},e.prototype.clearBit=function(e){return this.changeBit(e,ac)},e.prototype.flipBit=function(e){return this.changeBit(e,oc)},e.prototype.add=function(e){var t=Lc();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=Lc();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=Lc();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=Lc();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=Lc();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=Lc(),n=Lc();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,i,r=e.bitLength(),s=Hc(1);if(r<=0)return s;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new Pc(t):t.isEven()?new _c(t):new Oc(t);var o=[],a=3,l=n-1,c=(1<<n)-1;if(o[1]=i.convert(this),n>1){var u=Lc();for(i.sqrTo(o[1],u);a<=c;)o[a]=Lc(),i.mulTo(u,o[a-2],o[a]),a+=2}var h,d,f=e.t-1,p=!0,g=Lc();for(r=Gc(e[f])-1;f>=0;){for(r>=l?h=e[f]>>r-l&c:(h=(e[f]&(1<<r+1)-1)<<l-r,f>0&&(h|=e[f-1]>>this.DB+r-l)),a=n;0==(1&h);)h>>=1,--a;if((r-=a)<0&&(r+=this.DB,--f),p)o[h].copyTo(s),p=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(d=s,s=g,g=d),i.mulTo(g,o[h],s)}for(;f>=0&&0==(e[f]&1<<r);)i.sqrTo(s,g),d=s,s=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(s)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var i=t.clone(),r=this.clone(),s=Hc(1),o=Hc(0),a=Hc(0),l=Hc(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(t,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&l.isEven()||(a.addTo(this,a),l.subTo(t,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);i.compareTo(r)>=0?(i.subTo(r,i),n&&s.subTo(a,s),o.subTo(l,o)):(r.subTo(i,r),n&&a.subTo(s,a),l.subTo(o,l))}return 0!=r.compareTo(e.ONE)?e.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},e.prototype.pow=function(e){return this.exp(e,new Rc)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var i=t;t=n,n=i}var r=t.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)return t;for(r<s&&(s=r),s>0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=Ic[Ic.length-1]){for(t=0;t<Ic.length;++t)if(n[0]==Ic[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<Ic.length;){for(var i=Ic[t],r=t+1;r<Ic.length&&i<Mc;)i*=Ic[r++];for(i=n.modInt(i);t<r;)if(i%Ic[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var i;if(16==n)i=4;else if(8==n)i=3;else if(256==n)i=8;else if(2==n)i=1;else if(32==n)i=5;else{if(4!=n)return void this.fromRadix(t,n);i=2}this.t=0,this.s=0;for(var r=t.length,s=!1,o=0;--r>=0;){var a=8==i?255&+t[r]:zc(t,r);a<0?"-"==t.charAt(r)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=i)>=this.DB&&(o-=this.DB))}8==i&&0!=(128&+t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,i=this.DB-n,r=(1<<i)-1,s=Math.floor(e/this.DB),o=this.s<<n&this.DM,a=this.t-1;a>=0;--a)t[a+s+1]=this[a]>>i|o,o=(this[a]&r)<<n;for(a=s-1;a>=0;--a)t[a]=0;t[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,s=(1<<i)-1;t[0]=this[n]>>i;for(var o=n+1;o<this.t;++o)t[o-n-1]|=(this[o]&s)<<r,t[o-n]=this[o]>>i;i>0&&(t[this.t-n-1]|=(this.s&s)<<r),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;)i+=this[n]-e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i-=e[n],t[n++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[n++]=this.DV+i:i>0&&(t[n++]=i),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var i=this.abs(),r=t.abs(),s=i.t;for(n.t=s+r.t;--s>=0;)n[s]=0;for(s=0;s<r.t;++s)n[s+i.t]=i.am(0,r[s],n,s,0,i.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var i=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,i,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,i){var r=t.abs();if(!(r.t<=0)){var s=this.abs();if(s.t<r.t)return null!=n&&n.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Lc());var o=Lc(),a=this.s,l=t.s,c=this.DB-Gc(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,i)):(r.copyTo(o),s.copyTo(i));var u=o.t,h=o[u-1];if(0!=h){var d=h*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,g=1<<this.F2,m=i.t,v=m-u,y=null==n?Lc():n;for(o.dlShiftTo(v,y),i.compareTo(y)>=0&&(i[i.t++]=1,i.subTo(y,i)),e.ONE.dlShiftTo(u,y),y.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--v>=0;){var w=i[--m]==h?this.DM:Math.floor(i[m]*f+(i[m-1]+g)*p);if((i[m]+=o.am(0,w,i,v,0,u))<w)for(o.dlShiftTo(v,y),i.subTo(y,i);i[m]<--w;)i.subTo(y,i)}null!=n&&(i.drShiftTo(u,n),a!=l&&e.ZERO.subTo(n,n)),i.t=u,i.clamp(),c>0&&i.rShiftTo(c,i),a<0&&e.ZERO.subTo(i,i)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var i=Lc(),r=Lc(),s=n.convert(this),o=Gc(t)-1;for(s.copyTo(i);--o>=0;)if(n.sqrTo(i,r),(t&1<<o)>0)n.mulTo(r,s,i);else{var a=i;i=r,r=a}return n.revert(i)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),i=Hc(n),r=Lc(),s=Lc(),o="";for(this.divRemTo(i,r,s);r.signum()>0;)o=(n+s.intValue()).toString(e).substr(1)+o,r.divRemTo(i,r,s);return s.intValue().toString(e)+o},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var i=this.chunkSize(n),r=Math.pow(n,i),s=!1,o=0,a=0,l=0;l<t.length;++l){var c=zc(t,l);c<0?"-"==t.charAt(l)&&0==this.signum()&&(s=!0):(a=n*a+c,++o>=i&&(this.dMultiply(r),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(n,o)),this.dAddOffset(a,0)),s&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,i){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sc,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var r=[],s=7&t;r.length=1+(t>>3),n.nextBytes(r),s>0?r[0]&=(1<<s)-1:r[0]=0,this.fromString(r,256)}},e.prototype.bitwiseTo=function(e,t,n){var i,r,s=Math.min(e.t,this.t);for(i=0;i<s;++i)n[i]=t(this[i],e[i]);if(e.t<this.t){for(r=e.s&this.DM,i=s;i<this.t;++i)n[i]=t(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=s;i<e.t;++i)n[i]=t(r,e[i]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var i=e.ONE.shiftLeft(t);return this.bitwiseTo(i,n,i),i},e.prototype.addTo=function(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;)i+=this[n]+e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i+=e[n],t[n++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[n++]=i:i<-1&&(t[n++]=this.DV+i),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var i=n.t=this.t+e.t-t;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)n[this.t+i-t]=this.am(t-i,e[i],n,0,0,this.t+i-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var i=this.t-1;i>=0;--i)n=(t*n+this[i])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),i=n.getLowestSetBit();if(i<=0)return!1;var r=n.shiftRight(i);(t=t+1>>1)>Ic.length&&(t=Ic.length);for(var s=Lc(),o=0;o<t;++o){s.fromInt(Ic[Math.floor(Math.random()*Ic.length)]);var a=s.modPow(r,this);if(0!=a.compareTo(e.ONE)&&0!=a.compareTo(n)){for(var l=1;l++<i&&0!=a.compareTo(n);)if(0==(a=a.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=a.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=Lc();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var s=n.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)t(n);else{s<o&&(o=s),o>0&&(n.rShiftTo(o,n),i.rShiftTo(o,i));var a=function(){(s=n.getLowestSetBit())>0&&n.rShiftTo(s,n),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),n.compareTo(i)>=0?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),n.signum()>0?setTimeout(a,0):(o>0&&i.lShiftTo(o,i),setTimeout((function(){t(i)}),0))};setTimeout(a,10)}},e.prototype.fromNumberAsync=function(t,n,i,r){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),sc,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(e.ONE.shiftLeft(t-1),s),s.isProbablePrime(n)?setTimeout((function(){r()}),0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],l=7&t;a.length=1+(t>>3),n.nextBytes(a),l>0?a[0]&=(1<<l)-1:a[0]=0,this.fromString(a,256)}},e}(),Rc=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Pc=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Oc=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=Lc();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Bc.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=Lc();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],i=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),_c=function(){function e(e){this.m=e,this.r2=Lc(),this.q3=Lc(),Bc.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=Lc();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function Lc(){return new Bc(null)}function kc(e,t){return new Bc(e,t)}var Nc="undefined"!=typeof navigator;Nc&&"Microsoft Internet Explorer"==navigator.appName?(Bc.prototype.am=function(e,t,n,i,r,s){for(var o=32767&t,a=t>>15;--s>=0;){var l=32767&this[e],c=this[e++]>>15,u=a*l+c*o;r=((l=o*l+((32767&u)<<15)+n[i]+(1073741823&r))>>>30)+(u>>>15)+a*c+(r>>>30),n[i++]=1073741823&l}return r},Sc=30):Nc&&"Netscape"!=navigator.appName?(Bc.prototype.am=function(e,t,n,i,r,s){for(;--s>=0;){var o=t*this[e++]+n[i]+r;r=Math.floor(o/67108864),n[i++]=67108863&o}return r},Sc=26):(Bc.prototype.am=function(e,t,n,i,r,s){for(var o=16383&t,a=t>>14;--s>=0;){var l=16383&this[e],c=this[e++]>>14,u=a*l+c*o;r=((l=o*l+((16383&u)<<14)+n[i]+r)>>28)+(u>>14)+a*c,n[i++]=268435455&l}return r},Sc=28),Bc.prototype.DB=Sc,Bc.prototype.DM=(1<<Sc)-1,Bc.prototype.DV=1<<Sc;Bc.prototype.FV=Math.pow(2,52),Bc.prototype.F1=52-Sc,Bc.prototype.F2=2*Sc-52;var Uc,Fc,jc=[];for(Uc="0".charCodeAt(0),Fc=0;Fc<=9;++Fc)jc[Uc++]=Fc;for(Uc="a".charCodeAt(0),Fc=10;Fc<36;++Fc)jc[Uc++]=Fc;for(Uc="A".charCodeAt(0),Fc=10;Fc<36;++Fc)jc[Uc++]=Fc;function zc(e,t){var n=jc[e.charCodeAt(t)];return null==n?-1:n}function Hc(e){var t=Lc();return t.fromInt(e),t}function Gc(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}Bc.ZERO=Hc(0),Bc.ONE=Hc(1);var Vc=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,i;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[n],this.S[n]=i;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var Yc,Wc,Xc=256,Qc=null;if(null==Qc){Qc=[],Wc=0;var Kc=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var Zc=new Uint32Array(256);for(window.crypto.getRandomValues(Zc),Kc=0;Kc<Zc.length;++Kc)Qc[Wc++]=255&Zc[Kc]}var qc=0,Jc=function(e){if((qc=qc||0)>=256||Wc>=Xc)window.removeEventListener?window.removeEventListener("mousemove",Jc,!1):window.detachEvent&&window.detachEvent("onmousemove",Jc);else try{var t=e.x+e.y;Qc[Wc++]=255&t,qc+=1}catch(e){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",Jc,!1):window.attachEvent&&window.attachEvent("onmousemove",Jc))}function $c(){if(null==Yc){for(Yc=new Vc;Wc<Xc;){var e=Math.floor(65536*Math.random());Qc[Wc++]=255&e}for(Yc.init(Qc),Wc=0;Wc<Qc.length;++Wc)Qc[Wc]=0;Wc=0}return Yc.next()}var eu=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=$c()},e}();var tu=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=kc(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,n=function(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=e.length-1;i>=0&&t>0;){var r=e.charCodeAt(i--);r<128?n[--t]=r:r>127&&r<2048?(n[--t]=63&r|128,n[--t]=r>>6|192):(n[--t]=63&r|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}n[--t]=0;for(var s=new eu,o=[];t>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);n[--t]=o[0]}return n[--t]=2,n[--t]=0,new Bc(n)}(e,t);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;for(var r=i.toString(16),s=r.length,o=0;o<2*t-s;o++)r="0"+r;return r},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=kc(e,16),this.e=parseInt(t,16),this.d=kc(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,i,r,s,o,a){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=kc(e,16),this.e=parseInt(t,16),this.d=kc(n,16),this.p=kc(i,16),this.q=kc(r,16),this.dmp1=kc(s,16),this.dmq1=kc(o,16),this.coeff=kc(a,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new eu,i=e>>1;this.e=parseInt(t,16);for(var r=new Bc(t,16);;){for(;this.p=new Bc(e-i,1,n),0!=this.p.subtract(Bc.ONE).gcd(r).compareTo(Bc.ONE)||!this.p.isProbablePrime(10););for(;this.q=new Bc(i,1,n),0!=this.q.subtract(Bc.ONE).gcd(r).compareTo(Bc.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(Bc.ONE),a=this.q.subtract(Bc.ONE),l=o.multiply(a);if(0==l.gcd(r).compareTo(Bc.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(l),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=kc(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),i=0;for(;i<n.length&&0==n[i];)++i;if(n.length-i!=t-1||2!=n[i])return null;++i;for(;0!=n[i];)if(++i>=n.length)return null;var r="";for(;++i<n.length;){var s=255&n[i];s<128?r+=String.fromCharCode(s):s>191&&s<224?(r+=String.fromCharCode((31&s)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&s)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var i=new eu,r=e>>1;this.e=parseInt(t,16);var s=new Bc(t,16),o=this,a=function(){var t=function(){if(o.p.compareTo(o.q)<=0){var e=o.p;o.p=o.q,o.q=e}var t=o.p.subtract(Bc.ONE),i=o.q.subtract(Bc.ONE),r=t.multiply(i);0==r.gcd(s).compareTo(Bc.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(r),o.dmp1=o.d.mod(t),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout((function(){n()}),0)):setTimeout(a,0)},l=function(){o.q=Lc(),o.q.fromNumberAsync(r,1,i,(function(){o.q.subtract(Bc.ONE).gcda(s,(function(e){0==e.compareTo(Bc.ONE)&&o.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(l,0)}))}))},c=function(){o.p=Lc(),o.p.fromNumberAsync(e-r,1,i,(function(){o.p.subtract(Bc.ONE).gcda(s,(function(e){0==e.compareTo(Bc.ONE)&&o.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(a,0)},e.prototype.sign=function(e,t,n){var i=function(e){return nu[e]||""}(n),r=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,i="",r=0;r<n;r+=2)i+="ff";return kc("0001"+i+"00"+e,16)}(i+t(e).toString(),this.n.bitLength()/4);if(null==r)return null;var s=this.doPrivate(r);if(null==s)return null;var o=s.toString(16);return 0==(1&o.length)?o:"0"+o},e.prototype.verify=function(e,t,n){var i=kc(t,16),r=this.doPublic(i);return null==r?null:function(e){for(var t in nu)if(nu.hasOwnProperty(t)){var n=nu[t],i=n.length;if(e.substr(0,i)==n)return e.substr(i)}return e}
7
+ */var Ks="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}";function qs(e,t){let n="texel";if(null!==e){const i=Number.parseInt(K);if(!(t&&i>=133&&135!==i&&e.format===o&&e.type===R&&e.encoding===_))switch(e.encoding){case _:n="sRGBToLinear(texel)";break;case H:n="texel";break;default:throw new Error(`Unsupported encoding: ${e.encoding}`)}}return n}function Js(e,t,n){return e*(t-n)-t}function $s(e,t,n){return Math.min(Math.max((e+t)/(t-n),0),1)}var eo={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},to={DEPTH:0,LUMA:1,COLOR:2},no={NONE:0,DEPTH:1,CONVOLUTION:2},io={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},ro={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},so={DISABLED:0,DEPTH:1,CUSTOM:2},oo={LOW:0,MEDIUM:1,HIGH:2,ULTRA:3},ao=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],lo=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ne;super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new G(null),texelSize:new G(new ne),scale:new G(1),kernel:new G(0)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include <encodings_fragment>\n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.setTexelSize(e.x,e.y),this.kernelSize=ro.MEDIUM}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return ao[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){const n=1/e,i=1/t;this.uniforms.texelSize.value.set(n,i,.5*n,.5*i)}},co=class extends W{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new G(null),opacity:new G(1)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#include <dithering_pars_fragment>\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;\n#include <encodings_fragment>\n#include <dithering_fragment>\n}",vertexShader:Ks}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},ho=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new G(null),cameraNear:new G(.3),cameraFar:new G(1e3)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#include <packing>\n#include <clipping_planes_pars_fragment>\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;varying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include <clipping_planes_fragment>\nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998);\n#if DEPTH_PACKING == 3201\nfloat fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat fragCoordZ=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include <skinbase_vertex>\n#include <begin_vertex>\n#include <morphtarget_vertex>\n#include <skinning_vertex>\n#include <project_vertex>\nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include <clipping_planes_vertex>\n}"}),this.toneMapped=!1,this.depthBuffer=e,this.depthPacking=Z,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z;this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof B?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},uo=class extends W{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new G(null),normalBuffer:new G(null),texelSize:new G(new h)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#include <packing>\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#ifdef DOWNSAMPLE_NORMALS\nuniform lowp sampler2D normalBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[]=float[4](abs(c-samples[0]),abs(c-samples[1]),abs(c-samples[2]),abs(c-samples[3]));float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[]=float[4](readDepth(vUv0),readDepth(vUv1),readDepth(vUv2),readDepth(vUv3));int index=findBestDepth(d);\n#ifdef DOWNSAMPLE_NORMALS\nvec3 n[]=vec3[4](texture2D(normalBuffer,vUv0).rgb,texture2D(normalBuffer,vUv1).rgb,texture2D(normalBuffer,vUv2).rgb,texture2D(normalBuffer,vUv3).rgb);\n#else\nvec3 n[]=vec3[4](vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));\n#endif\ngl_FragColor=vec4(n[index],d[index]);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.depthBuffer=e,this.depthPacking=t}set normalBuffer(e){this.uniforms.normalBuffer.value=e,null!==e?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(e){this.normalBuffer=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},fo=class extends W{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new G(null),texelSize:new G(new h)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include <encodings_fragment>\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},po=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new h,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:to.COLOR;super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:K.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new G(null),depthBuffer:new G(null),predicationBuffer:new G(null),texelSize:new G(e)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include <common>\n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},go=class extends W{constructor(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];super({name:"EffectMaterial",defines:{THREE_REVISION:K.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new G(null),depthBuffer:new G(null),resolution:new G(new h),texelSize:new G(new h),cameraNear:new G(.3),cameraFar:new G(1e3),aspect:new G(1),time:new G(0)},blending:X,depthWrite:!1,depthTest:!1,dithering:r}),this.toneMapped=!1,e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(i)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){var t,n,i,r,s;return this.fragmentShader="#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if THREE_REVISION >= 137\nvec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEADvoid main(){FRAGMENT_MAIN_UVvec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGEgl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include <encodings_fragment>\n#endif\n#include <dithering_fragment>\n}".replace(io.FRAGMENT_HEAD,null!=(t=e.get(io.FRAGMENT_HEAD))?t:"").replace(io.FRAGMENT_MAIN_UV,null!=(n=e.get(io.FRAGMENT_MAIN_UV))?n:"").replace(io.FRAGMENT_MAIN_IMAGE,null!=(i=e.get(io.FRAGMENT_MAIN_IMAGE))?i:""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEADvoid main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORTgl_Position=vec4(position.xy,1.0,1.0);}".replace(io.VERTEX_HEAD,null!=(r=e.get(io.VERTEX_HEAD))?r:"").replace(io.VERTEX_MAIN_SUPPORT,null!=(s=e.get(io.VERTEX_MAIN_SUPPORT))?s:""),this.needsUpdate=!0,this}setDefines(e){for(const t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(const t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){this.extensions={};for(const t of e)this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof B?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return io}},mo=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super({name:"LuminanceMaterial",defines:{THREE_REVISION:K.replace(/\D+/g,"")},uniforms:{inputBuffer:new G(null),threshold:new G(0),smoothing:new G(1),range:new G(null)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*l,l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}",vertexShader:Ks}),this.toneMapped=!1,this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},vo=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new h;super({name:"OutlineMaterial",uniforms:{inputBuffer:new G(null),texelSize:new G(new h)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},yo=class extends W{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new h,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new h;super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new G(null),searchTexture:new G(null),areaTexture:new G(null),resolution:new G(t),texelSize:new G(e)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x>end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x<end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.y>end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;i++){if(!(texCoord.y<end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){const t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){const t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){const t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){const n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.resolution.value.set(e,t)}},wo=class extends W{constructor(e){super({name:"SSAOMaterial",defines:{SAMPLES_INT:"0",INV_SAMPLES_FLOAT:"0.0",SPIRAL_TURNS:"0.0",RADIUS:"1.0",RADIUS_SQ:"1.0",DISTANCE_SCALING:"1",DEPTH_PACKING:"0"},uniforms:{depthBuffer:new G(null),normalBuffer:new G(null),normalDepthBuffer:new G(null),noiseTexture:new G(null),inverseProjectionMatrix:new G(new g),projectionMatrix:new G(new g),texelSize:new G(new h),cameraNearFar:new G(new h),distanceCutoff:new G(new h),proximityCutoff:new G(new h),noiseScale:new G(new h),minRadiusScale:new G(.33),intensity:new G(1),fade:new G(.01),bias:new G(0)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#include <common>\n#include <packing>\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}\n#else\nuniform lowp sampler2D normalBuffer;\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\nuniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform vec2 cameraNearFar;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#endif\n}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i<SAMPLES_INT;++i){float alpha=(float(i)+0.5)*INV_SAMPLES_FLOAT;float angle=alpha*rings+baseAngle;vec2 rotation=vec2(cos(angle),sin(angle));vec2 coords=alpha*radius*rotation*texelSize+uv;if(coords.s<0.0||coords.s>1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y);\n#else\nfloat linearSampleDepth=sampleDepth;\n#endif\nfloat proximity=abs(depth-linearSampleDepth);if(proximity<proximityCutoff.y){float falloff=1.0-smoothstep(proximityCutoff.x,proximityCutoff.y,proximity);vec3 Q=getViewPosition(coords,sampleDepth,viewZ);vec3 v=Q-p;float vv=dot(v,v);float vn=dot(v,n)-bias;float f=max(RADIUS_SQ-vv,0.0)/RADIUS_SQ;occlusion+=(f*f*f*max(vn/(fade+vv),0.0))*falloff;}++taps;}return occlusion/(4.0*max(float(taps),1.0));}void main(){\n#ifdef NORMAL_DEPTH\nvec4 normalDepth=texture2D(normalDepthBuffer,vUv);\n#else\nvec4 normalDepth=vec4(texture2D(normalBuffer,vUv).xyz,readDepth(vUv));\n#endif\nfloat ao=0.0;float depth=normalDepth.a;float viewZ=getViewZ(depth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y);\n#else\nfloat linearDepth=depth;\n#endif\nif(linearDepth<distanceCutoff.y){vec3 viewPosition=getViewPosition(vUv,depth,viewZ);vec3 viewNormal=unpackRGBToNormal(normalDepth.rgb);ao+=getAmbientOcclusion(viewPosition,viewNormal,linearDepth,vUv);float d=smoothstep(distanceCutoff.x,distanceCutoff.y,linearDepth);ao=mix(ao,0.0,d);\n#ifdef LEGACY_INTENSITY\nao=clamp(1.0-pow(1.0-ao,abs(intensity)),0.0,1.0);\n#endif\n}gl_FragColor.r=ao;}",vertexShader:"uniform vec2 noiseScale;varying vec2 vUv;varying vec2 vUv2;void main(){vUv=position.xy*0.5+0.5;vUv2=vUv*noiseScale;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1,this.copyCameraSettings(e),this.resolution=new h,this.r=1}get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,null!==e?this.defines.NORMAL_DEPTH="1":delete this.defines.NORMAL_DEPTH,this.needsUpdate=!0}setNormalDepthBuffer(e){this.normalDepthBuffer=e}set normalBuffer(e){this.uniforms.normalBuffer.value=e}setNormalBuffer(e){this.uniforms.normalBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.depthBuffer=e,this.depthPacking=t}set noiseTexture(e){this.uniforms.noiseTexture.value=e}setNoiseTexture(e){this.uniforms.noiseTexture.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){this.defines.SAMPLES_INT=e.toFixed(0),this.defines.INV_SAMPLES_FLOAT=(1/e).toFixed(9),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}get rings(){return Number(this.defines.SPIRAL_TURNS)}set rings(e){this.defines.SPIRAL_TURNS=e.toFixed(1),this.needsUpdate=!0}getRings(){return this.rings}setRings(e){this.rings=e}get intensity(){return this.uniforms.intensity.value}set intensity(e){this.uniforms.intensity.value=e,void 0===this.defines.LEGACY_INTENSITY&&(this.defines.LEGACY_INTENSITY="1",this.needsUpdate=!0)}getIntensity(){return this.uniforms.intensity.value}setIntensity(e){this.uniforms.intensity.value=e}get fade(){return this.uniforms.fade.value}set fade(e){this.uniforms.fade.value=e}getFade(){return this.uniforms.fade.value}setFade(e){this.uniforms.fade.value=e}get bias(){return this.uniforms.bias.value}set bias(e){this.uniforms.bias.value=e}getBias(){return this.uniforms.bias.value}setBias(e){this.uniforms.bias.value=e}get minRadiusScale(){return this.uniforms.minRadiusScale.value}set minRadiusScale(e){this.uniforms.minRadiusScale.value=e}getMinRadiusScale(){return this.uniforms.minRadiusScale.value}setMinRadiusScale(e){this.uniforms.minRadiusScale.value=e}updateRadius(){const e=this.r*this.resolution.height;this.defines.RADIUS=e.toFixed(11),this.defines.RADIUS_SQ=(e*e).toFixed(11),this.needsUpdate=!0}get radius(){return this.r}set radius(e){this.r=Math.min(Math.max(e,1e-6),1),this.updateRadius()}getRadius(){return this.radius}setRadius(e){this.radius=e}get distanceScaling(){return!0}set distanceScaling(e){}isDistanceScalingEnabled(){return this.distanceScaling}setDistanceScalingEnabled(e){this.distanceScaling=e}get distanceThreshold(){return this.uniforms.distanceCutoff.value.x}set distanceThreshold(e){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.distanceFalloff,0),1))}get worldDistanceThreshold(){return-Js(this.distanceThreshold,this.near,this.far)}set worldDistanceThreshold(e){this.distanceThreshold=$s(-e,this.near,this.far)}get distanceFalloff(){return this.uniforms.distanceCutoff.value.y-this.distanceThreshold}set distanceFalloff(e){this.uniforms.distanceCutoff.value.y=Math.min(Math.max(this.distanceThreshold+e,0),1)}get worldDistanceFalloff(){return-Js(this.distanceFalloff,this.near,this.far)}set worldDistanceFalloff(e){this.distanceFalloff=$s(-e,this.near,this.far)}setDistanceCutoff(e,t){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}get proximityThreshold(){return this.uniforms.proximityCutoff.value.x}set proximityThreshold(e){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.proximityFalloff,0),1))}get worldProximityThreshold(){return-Js(this.proximityThreshold,this.near,this.far)}set worldProximityThreshold(e){this.proximityThreshold=$s(-e,this.near,this.far)}get proximityFalloff(){return this.uniforms.proximityCutoff.value.y-this.proximityThreshold}set proximityFalloff(e){this.uniforms.proximityCutoff.value.y=Math.min(Math.max(this.proximityThreshold+e,0),1)}get worldProximityFalloff(){return-Js(this.proximityFalloff,this.near,this.far)}set worldProximityFalloff(e){this.proximityFalloff=$s(-e,this.near,this.far)}setProximityCutoff(e,t){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),this.uniforms.projectionMatrix.value.copy(e.projectionMatrix),this.uniforms.inverseProjectionMatrix.value.copy(e.projectionMatrix).invert(),e instanceof B?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms,i=n.noiseTexture.value;null!==i&&n.noiseScale.value.set(e/i.image.width,t/i.image.height),n.texelSize.value.set(1/e,1/t),this.resolution.set(e,t),this.updateRadius()}},bo=class extends W{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new G(null),supportBuffer:new G(null),texelSize:new G(new h),radius:new G(.85)},blending:X,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include <encodings_fragment>\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.toneMapped=!1}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},xo=new O,Ao=null;var So=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Pass",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new x,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:xo;this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;null!==t?t.material=e:(t=new w(function(){if(null===Ao){const e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(Ao=new ie).setAttribute?(Ao.setAttribute("position",new c(e,3)),Ao.setAttribute("uv",new c(t,2))):(Ao.addAttribute("position",new c(e,3)),Ao.addAttribute("uv",new c(t,2)))}return Ao}(),e),t.frustumCulled=!1,null===this.scene&&(this.scene=new x),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e){}render(e,t,n,i,r){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof N||t instanceof re||t instanceof l||t instanceof So)&&this[e].dispose()}}},To=class extends So{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];super("CopyPass"),this.fullscreenMaterial=new co,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new N(1,1,{minFilter:Q,magFilter:Q,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,n,i,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTarget.texture.type=n,n!==R?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":e.outputEncoding===_&&(this.renderTarget.texture.encoding=_))}},Eo=class extends So{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,n,i,r){const s=e.state.buffers.stencil;s.setLocked(!1),s.setTest(!1)}},Do=new a,Co=class extends So{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,i,r){const s=this.overrideClearColor,o=this.overrideClearAlpha,a=e.getClearAlpha(),l=null!==s,c=o>=0;l?(e.getClearColor(Do),e.setClearColor(s,c?o:a)):c&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(Do,a):c&&e.setClearAlpha(a)}},Bo=-1,Mo=class extends q{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bo,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Bo,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(),this.resizable=e,this.baseSize=new h(1,1),this.preferredSize=new h(t,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new h,this.addEventListener("change",(()=>this.updateEffectiveSize())),this.updateEffectiveSize()}updateEffectiveSize(){const e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,i=this.scale;t.width!==Bo?n.width=t.width:t.height!==Bo?n.width=Math.round(t.height*(e.width/Math.max(e.height,1))):n.width=Math.round(e.width*i),t.height!==Bo?n.height=t.height:t.width!==Bo?n.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):n.height=Math.round(e.height*i)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(Bo),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){this.baseSize.width===e&&this.baseSize.height===t||(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){this.preferredSize.width===e&&this.preferredSize.height===t||(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Bo}},Io=!1,Po=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case v:t=this.materialsFlatShadedDoubleSide;break;case m:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case v:t=this.materialsDoubleSide;break;case m:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){const t=this.materials=[e.clone(),e.clone(),e.clone()];for(const n of t)n.uniforms=Object.assign({},e.uniforms),n.side=y;t[2].skinning=!0,this.materialsBackSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.side=m,n})),this.materialsDoubleSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.side=v,n})),this.materialsFlatShaded=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n})),this.materialsFlatShadedBackSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=m,n})),this.materialsFlatShadedDoubleSide=t.map((t=>{const n=t.clone();return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=v,n}))}}render(e,t,n){const i=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,Io){const i=this.originalMaterials;this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n);for(const e of i)e[0].material=e[1];this.meshCount!==i.size&&i.clear()}else{const i=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=i}e.shadowMap.enabled=i}disposeMaterials(){if(null!==this.material){const e=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const t of e)t.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Io}static set workaroundEnabled(e){Io=e}},Oo=class extends So{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new Co,this.overrideMaterialManager=null===n?null:new Po(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){const e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){const t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new Po(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,n,i,r){const s=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=s.background,h=e.shadowMap.autoUpdate,u=this.renderToScreen?null:t;null!==a&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(s.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(u),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,s,o):e.render(s,o),o.layers.mask=l,s.background=c,e.shadowMap.autoUpdate=h}},_o=class extends So{constructor(e,t){let{renderTarget:n,resolutionScale:i=1,width:r=Mo.AUTO_SIZE,height:s=Mo.AUTO_SIZE,resolutionX:o=r,resolutionY:l=s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("DepthPass"),this.needsSwap=!1,this.renderPass=new Oo(e,t,new J({depthPacking:Z}));const c=this.renderPass;c.skipShadowMapUpdate=!0,c.ignoreBackground=!0;const h=c.getClearPass();h.overrideClearColor=new a(16777215),h.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new N(1,1,{minFilter:k,magFilter:k}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new Mo(this,o,l,i);u.addEventListener("change",(e=>this.setSize(u.baseWidth,u.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,s)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},Ro=class extends So{constructor(){let{normalBuffer:e=null,resolutionScale:t=.5,width:n=Mo.AUTO_SIZE,height:i=Mo.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("DepthDownsamplingPass");const o=new uo;o.normalBuffer=e,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new N(1,1,{minFilter:k,magFilter:k,depthBuffer:!1,type:$}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new Mo(this,r,s,t);a.addEventListener("change",(e=>this.setSize(a.baseWidth,a.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,n,i,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,n){const i=e.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}};function Lo(e,t,n){for(const i of t){const t="$1"+e+i.charAt(0).toUpperCase()+i.slice(1),r=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const e of n.entries())null!==e[1]&&n.set(e[0],e[1].replace(r,t))}}function No(e,t,n){var i,r,s,o,a;let l=t.getFragmentShader(),c=t.getVertexShader();const h=void 0!==l&&/mainImage/.test(l),u=void 0!==l&&/mainUv/.test(l);if(n.attributes|=t.getAttributes(),void 0===l)throw new Error(`Missing fragment shader (${t.name})`);if(u&&0!=(n.attributes&no.CONVOLUTION))throw new Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(!h&&!u)throw new Error(`Could not find mainImage or mainUv function (${t.name})`);{const d=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,f=n.shaderParts;let p=null!=(i=f.get(io.FRAGMENT_HEAD))?i:"",g=null!=(r=f.get(io.FRAGMENT_MAIN_UV))?r:"",m=null!=(s=f.get(io.FRAGMENT_MAIN_IMAGE))?s:"",v=null!=(o=f.get(io.VERTEX_HEAD))?o:"",y=null!=(a=f.get(io.VERTEX_MAIN_SUPPORT))?a:"";const w=new Set,b=new Set;if(u&&(g+=`\t${e}MainUv(UV);\n`,n.uvTransformation=!0),null!==c&&/mainSupport/.test(c)){const t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(c);y+=`\t${e}MainSupport(`,y+=t?"vUv);\n":");\n";for(const e of c.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const t of e[1].split(/\s*,\s*/))n.varyings.add(t),w.add(t),b.add(t);for(const e of c.matchAll(d))b.add(e[1])}for(const e of l.matchAll(d))b.add(e[1]);for(const e of t.defines.keys())b.add(e.replace(/\([\w\s,]*\)/g,""));for(const e of t.uniforms.keys())b.add(e);b.delete("while"),b.delete("for"),b.delete("if"),t.uniforms.forEach(((t,i)=>n.uniforms.set(e+i.charAt(0).toUpperCase()+i.slice(1),t))),t.defines.forEach(((t,i)=>n.defines.set(e+i.charAt(0).toUpperCase()+i.slice(1),t)));const x=new Map([["fragment",l],["vertex",c]]);Lo(e,b,n.defines),Lo(e,b,x),l=x.get("fragment"),c=x.get("vertex");const A=t.blendMode;if(n.blendModes.set(A.blendFunction,A),h){null!==t.inputColorSpace&&t.inputColorSpace!==n.colorSpace&&(m+=t.inputColorSpace===_?"color0 = LinearTosRGB(color0);\n\t":"color0 = sRGBToLinear(color0);\n\t"),null!==t.outputColorSpace?n.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(n.colorSpace=t.inputColorSpace);const i=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;m+=`${e}MainImage(color0, UV, `,0!=(n.attributes&no.DEPTH)&&i.test(l)&&(m+="depth, ",n.readDepth=!0),m+="color1);\n\t";const r=e+"BlendOpacity";n.uniforms.set(r,A.opacity),m+=`color0 = blend${A.blendFunction}(color0, color1, ${r});\n\n\t`,p+=`uniform float ${r};\n\n`}if(p+=l+"\n",null!==c&&(v+=c+"\n"),f.set(io.FRAGMENT_HEAD,p),f.set(io.FRAGMENT_MAIN_UV,g),f.set(io.FRAGMENT_MAIN_IMAGE,m),f.set(io.VERTEX_HEAD,v),f.set(io.VERTEX_MAIN_SUPPORT,y),null!==t.extensions)for(const e of t.extensions)n.extensions.add(e)}}var ko=class extends So{constructor(e){super("EffectPass"),this.fullscreenMaterial=new go(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.setEffects(n),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(e){for(const t of this.effects)t.mainScene=e}set mainCamera(e){this.fullscreenMaterial.copyCameraSettings(e);for(const t of this.effects)t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){const t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=e.sort(((e,t)=>t.attributes-e.attributes));for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const e=new Yo;let t=0;for(const n of this.effects)if(n.blendMode.blendFunction===eo.DST)e.attributes|=n.getAttributes()&no.DEPTH;else{if(0!=(e.attributes&n.getAttributes()&no.CONVOLUTION))throw new Error(`Convolution effects cannot be merged (${n.name})`);No("e"+t++,n,e)}let n=e.shaderParts.get(io.FRAGMENT_HEAD),i=e.shaderParts.get(io.FRAGMENT_MAIN_IMAGE),r=e.shaderParts.get(io.FRAGMENT_MAIN_UV);const s=/\bblend\b/g;for(const t of e.blendModes.values())n+=t.getShaderCode().replace(s,`blend${t.blendFunction}`)+"\n";0!=(e.attributes&no.DEPTH)?(e.readDepth&&(i="float depth = readDepth(UV);\n\n\t"+i),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===_&&(i+="color0 = sRGBToLinear(color0);\n\t"),e.uvTransformation?(r="vec2 transformedUv = vUv;\n"+r,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(io.FRAGMENT_HEAD,n),e.shaderParts.set(io.FRAGMENT_MAIN_IMAGE,i),e.shaderParts.set(io.FRAGMENT_MAIN_UV,r),e.shaderParts.forEach(((e,t,n)=>n.set(t,null==e?void 0:e.trim().replace(/^#/,"\n#")))),this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t;for(const n of this.effects)n.setDepthTexture(e,t)}render(e,t,n,i,r){for(const n of this.effects)n.update(e,t,i);if(!this.skipRendering||this.renderToScreen){const r=this.fullscreenMaterial;r.inputBuffer=t.texture,r.time+=i*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){this.fullscreenMaterial.setSize(e,t);for(const n of this.effects)n.setSize(e,t)}initialize(e,t,n){this.renderer=e;for(const i of this.effects)i.initialize(e,t,n);this.updateMaterial(),void 0!==n&&n!==R&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const e of this.effects)e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){if("change"===e.type)this.recompile()}},Uo=class extends So{constructor(){let{kernelSize:e=ro.MEDIUM,resolutionScale:t=.5,width:n=Mo.AUTO_SIZE,height:i=Mo.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("KawaseBlurPass"),this.renderTargetA=new N(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new Mo(this,r,s,t);o.addEventListener("change",(e=>this.setSize(o.baseWidth,o.baseHeight))),this._blurMaterial=new lo,this._blurMaterial.kernelSize=e,this.copyMaterial=new co}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,h=c.kernelSequence;let u=t;this.fullscreenMaterial=c;for(let t=0,n=h.length;t<n;++t){const n=0==(1&t)?a:l;c.kernel=h[t],c.inputBuffer=u.texture,e.setRenderTarget(n),e.render(s,o),u=n}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=u.texture,e.setRenderTarget(this.renderToScreen?null:n),e.render(s,o)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.renderTargetA.setSize(i,r),this.renderTargetB.setSize(i,r),this.blurMaterial.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,n!==R?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):e.outputEncoding===_&&(this.renderTargetA.texture.encoding=_,this.renderTargetB.texture.encoding=_))}static get AUTO_SIZE(){return Mo.AUTO_SIZE}},jo=class extends So{constructor(){let{renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:i=1,width:r=Mo.AUTO_SIZE,height:s=Mo.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("LuminancePass"),this.fullscreenMaterial=new mo(n,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new N(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new Mo(this,o,a,i);l.addEventListener("change",(e=>this.setSize(l.baseWidth,l.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,i,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&n!==R&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Fo=class extends So{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new Co(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,n,i,r){const s=e.getContext(),o=e.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,h=this.inverted?0:1,u=1-h;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),o.stencil.setFunc(s.ALWAYS,h,4294967295),o.stencil.setClear(u),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(e,null):(c.render(e,t),c.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(a,l)):(e.setRenderTarget(t),e.render(a,l),e.setRenderTarget(n),e.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(s.EQUAL,1,4294967295),o.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),o.stencil.setLocked(!0)}},zo=class extends So{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new N(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new fo,this.upsamplingMaterial=new bo,this.resolution=new h}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){const t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n<e;++n){const e=t.clone();e.texture.name="Downsampling.Mipmap"+n,this.downsamplingMipmaps.push(e)}this.upsamplingMipmaps.push(t);for(let n=1,i=e-1;n<i;++n){const e=t.clone();e.texture.name="Upsampling.Mipmap"+n,this.upsamplingMipmaps.push(e)}this.setSize(this.resolution.x,this.resolution.y)}}get radius(){return this.upsamplingMaterial.radius}set radius(e){this.upsamplingMaterial.radius=e}render(e,t,n,i,r){const{scene:s,camera:o}=this,{downsamplingMaterial:a,upsamplingMaterial:l}=this,{downsamplingMipmaps:c,upsamplingMipmaps:h}=this;let u=t;this.fullscreenMaterial=a;for(let t=0,n=c.length;t<n;++t){const n=c[t];a.setSize(u.width,u.height),a.inputBuffer=u.texture,e.setRenderTarget(n),e.render(s,o),u=n}this.fullscreenMaterial=l;for(let t=h.length-1;t>=0;--t){const n=h[t];l.setSize(u.width,u.height),l.inputBuffer=u.texture,l.supportBuffer=c[t].texture,e.setRenderTarget(n),e.render(s,o),u=n}}setSize(e,t){const n=this.resolution;n.set(e,t);let i=n.width,r=n.height;for(let e=0,t=this.downsamplingMipmaps.length;e<t;++e)i=Math.round(.5*i),r=Math.round(.5*r),this.downsamplingMipmaps[e].setSize(i,r),e<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[e].setSize(i,r)}initialize(e,t,n){if(void 0!==n){const t=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(const e of t)e.texture.type=n;if(n!==R)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";else if(e.outputEncoding===_)for(const e of t)e.texture.encoding=_}}dispose(){super.dispose();for(const e of this.downsamplingMipmaps.concat(this.upsamplingMipmaps))e.dispose()}},Ho=class extends So{constructor(e,t){let{renderTarget:n,resolutionScale:i=1,width:r=Mo.AUTO_SIZE,height:s=Mo.AUTO_SIZE,resolutionX:o=r,resolutionY:l=s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("NormalPass"),this.needsSwap=!1,this.renderPass=new Oo(e,t,new L);const c=this.renderPass;c.ignoreBackground=!0,c.skipShadowMapUpdate=!0;const h=c.getClearPass();h.overrideClearColor=new a(7829503),h.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new N(1,1,{minFilter:k,magFilter:k}),this.renderTarget.texture.name="NormalPass.Target");const u=this.resolution=new Mo(this,o,l,i);u.addEventListener("change",(e=>this.setSize(u.baseWidth,u.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,s,s)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},Go=class extends So{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"inputBuffer";super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,i,r){const s=this.fullscreenMaterial.uniforms;null!==t&&void 0!==s&&void 0!==s[this.input]&&(s[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}initialize(e,t,n){void 0!==n&&n!==R&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Vo=.001,Yo=class{constructor(){this.shaderParts=new Map([[io.FRAGMENT_HEAD,null],[io.FRAGMENT_MAIN_UV,null],[io.FRAGMENT_MAIN_IMAGE,null],[io.VERTEX_HEAD,null],[io.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=no.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=H}},Qo=class extends Set{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;super(),this.l=t,this.exclusive=!1,void 0!==e&&this.set(e)}get layer(){return this.l}set layer(e){const t=this.l;for(const n of this)n.layers.disable(t),n.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const t of this)t.layers.disable(e);return super.clear()}set(e){this.clear();for(const t of e)this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(const t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},Wo=new Map([[eo.ADD,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}"],[eo.ALPHA,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}"],[eo.AVERAGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}"],[eo.COLOR,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[eo.COLOR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}"],[eo.COLOR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}"],[eo.DARKEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}"],[eo.DIFFERENCE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}"],[eo.DIVIDE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}"],[eo.DST,null],[eo.EXCLUSION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}"],[eo.HARD_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}"],[eo.HARD_MIX,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}"],[eo.HUE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}"],[eo.INVERT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}"],[eo.INVERT_RGB,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}"],[eo.LIGHTEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}"],[eo.LINEAR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}"],[eo.LINEAR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}"],[eo.LINEAR_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}"],[eo.LUMINOSITY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[eo.MULTIPLY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}"],[eo.NEGATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}"],[eo.NORMAL,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}"],[eo.OVERLAY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}"],[eo.PIN_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}"],[eo.REFLECT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}"],[eo.SATURATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[eo.SCREEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}"],[eo.SOFT_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}"],[eo.SRC,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[eo.SUBTRACT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}"],[eo.VIVID_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}"]]),Xo=class extends q{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;super(),this._blendFunction=e,this.opacity=new G(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return Wo.get(this.blendFunction)}},Zo=class extends q{constructor(e,t){let{attributes:n=no.NONE,blendFunction:i=eo.NORMAL,defines:r=new Map,uniforms:s=new Map,extensions:o=null,vertexShader:a=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(),this.name=e,this.renderer=null,this.attributes=n,this.fragmentShader=t,this.vertexShader=a,this.defines=r,this.uniforms=s,this.extensions=o,this.blendMode=new Xo(i),this.blendMode.addEventListener("change",(e=>this.setChanged())),this._inputColorSpace=H,this._outputColorSpace=null}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof N||t instanceof re||t instanceof l||t instanceof So)&&this[e].dispose()}}},Ko=class extends Zo{constructor(){let{blendFunction:e=eo.SCREEN,luminanceThreshold:t=.9,luminanceSmoothing:n=.025,mipmapBlur:i=!1,intensity:r=1,radius:s=.85,levels:o=8,kernelSize:a=ro.LARGE,resolutionScale:l=.5,width:c=Mo.AUTO_SIZE,height:h=Mo.AUTO_SIZE,resolutionX:u=c,resolutionY:d=h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("BloomEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}",{blendFunction:e,uniforms:new Map([["map",new G(null)],["intensity",new G(r)]])}),this.renderTarget=new N(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new Uo({kernelSize:a}),this.luminancePass=new jo({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new zo,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=s,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const f=this.resolution=new Mo(this,u,d,l);f.addEventListener("change",(e=>this.setSize(f.baseWidth,f.baseHeight)))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){const i=this.renderTarget,r=this.luminancePass;r.enabled?(r.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,r.renderTarget):this.blurPass.render(e,r.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,e.outputEncoding===_&&(this.renderTarget.texture.encoding=_))}};var qo=class extends te{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:se,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R;super(function(e,t,n){const i=new Map([[se,1],[oe,1],[ae,2],[o,4]]);let r;if(i.has(t)||console.error("Invalid noise texture format"),n===R){r=new Uint8Array(e*i.get(t));for(let e=0,t=r.length;e<t;++e)r[e]=255*Math.random()+.5}else{r=new Float32Array(e*i.get(t));for(let e=0,t=r.length;e<t;++e)r[e]=Math.random()}return r}(e*t,n,i),e,t,n,i),this.needsUpdate=!0}};new t,new g,new a;var Jo=class extends Zo{constructor(e,t){let{blendFunction:n=eo.SCREEN,patternTexture:i=null,patternScale:r=1,edgeStrength:s=1,pulseSpeed:o=0,visibleEdgeColor:l=16777215,hiddenEdgeColor:c=2230538,kernelSize:h=ro.VERY_SMALL,blur:u=!1,xRay:d=!0,multisampling:f=0,resolutionScale:p=.5,width:g=Mo.AUTO_SIZE,height:m=Mo.AUTO_SIZE,resolutionX:v=g,resolutionY:y=m}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("OutlineEffect","uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;\n#ifdef USE_PATTERN\nuniform lowp sampler2D patternTexture;varying vec2 vUvPattern;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;\n#ifndef X_RAY\nedge.y=0.0;\n#endif\nedge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;\n#ifdef USE_PATTERN\nvec4 patternColor=texelToLinear(texture2D(patternTexture,vUvPattern));\n#ifdef X_RAY\nfloat hiddenFactor=0.5;\n#else\nfloat hiddenFactor=0.0;\n#endif\nvisibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;\n#endif\nfloat alpha=max(max(edge.x,edge.y),visibilityFactor);\n#ifdef ALPHA\noutputColor=vec4(color,alpha);\n#else\noutputColor=vec4(color,max(alpha,inputColor.a));\n#endif\n}",{uniforms:new Map([["maskTexture",new G(null)],["edgeTexture",new G(null)],["edgeStrength",new G(s)],["visibleEdgeColor",new G(new a(l))],["hiddenEdgeColor",new G(new a(c))],["pulse",new G(1)],["patternScale",new G(r)],["patternTexture",new G(null)]])}),this.blendMode.addEventListener("change",(e=>{this.blendMode.getBlendFunction()===eo.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()})),this.blendMode.setBlendFunction(n),this.patternTexture=i,this.xRay=d,this.scene=e,this.camera=t,this.renderTargetMask=new N(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new N(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new Co,this.clearPass.overrideClearColor=new a(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new _o(e,t),this.maskPass=new Oo(e,t,new ho(this.depthPass.texture,t));const w=this.maskPass.clearPass;w.overrideClearColor=new a(16777215),w.overrideClearAlpha=1,this.blurPass=new Uo({resolutionScale:p,resolutionX:v,resolutionY:y,kernelSize:h}),this.blurPass.enabled=u;const b=this.blurPass.resolution;b.addEventListener("change",(e=>this.setSize(b.baseWidth,b.baseHeight))),this.outlinePass=new Go(new vo);this.outlinePass.fullscreenMaterial.inputBuffer=this.renderTargetMask.texture,this.time=0,this.active=!1,this.selection=new Qo,this.selection.layer=10,this.pulseSpeed=o}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(e){this.uniforms.get("patternScale").value=e}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(e){this.uniforms.get("edgeStrength").value=e}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(e){this.uniforms.get("visibleEdgeColor").value=e}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(e){this.uniforms.get("hiddenEdgeColor").value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has("X_RAY")}set xRay(e){this.xRay!==e&&(e?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(e){if(null!==e?(e.wrapS=e.wrapT=V,this.defines.set("USE_PATTERN","1"),this.setVertexShader("uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}")):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),null!==this.renderer){const t=qs(e,this.renderer.capabilities.isWebGL2);this.defines.set("texelToLinear(texel)",t)}this.uniforms.get("patternTexture").value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,n){const i=this.scene,r=this.camera,s=this.selection,o=this.uniforms.get("pulse"),a=i.background,l=r.layers.mask;s.size>0?(i.background=null,o.value=1,this.pulseSpeed>0&&(o.value=.375*Math.cos(this.time*this.pulseSpeed*10)+.625),this.active=!0,this.time+=n,s.setVisible(!1),this.depthPass.render(e),s.setVisible(!0),r.layers.set(s.layer),this.maskPass.render(e,this.renderTargetMask),r.layers.mask=l,i.background=a,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)):this.active&&(this.clearPass.render(e,this.renderTargetOutline),this.active=!1)}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.depthPass.setSize(i,r),this.renderTargetOutline.setSize(i,r),this.outlinePass.fullscreenMaterial.setSize(i,r)}initialize(e,t,n){const i=qs(this.patternTexture,e.capabilities.isWebGL2);this.defines.set("texelToLinear(texel)",i),this.blurPass.initialize(e,t,R),void 0!==n&&(this.depthPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.outlinePass.initialize(e,t,n))}};new t,new t;var $o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",ea="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70JoGlueB1iKApeqzvOzn44GatTB76Xzhd7suBR7+WWADgDEAwwCG/L54b/poDLrHuvvm70Z2Avhsc+PVcxscBU8F8C8ADg5+ipIjD/PlGwfgju8B924E5seARUfLsiNmqQW0IjL8+7L2NYD/7COBzfcCm+aB8SVgdAkYIRCXKyDax4EdAanL5PuNPllNvXDlAHwFgP8AcC2AhRIoDXbsYb48dl5WkVFTE3LGDcC9m4CZCWBuFFgeAZaGAYJQQCRqDHT+McJrVb8zwATUXH02MHYfMHEIGFsAxgjApQqACYQORjtd/B7Axt/z79sC0+cMPgjjlwPwVwHcA+DfAHzTxcVgWBroqMN8+cYBeM71wH0TwKExYHYUWCIAHYRLTlkCYgcIBcAgU/n3qy8GRu4HRgnAOWBkERhddPAJhGJDBxkvw7cqimr+zFM/ZLnZF64cgL8BYD+AWwB8x/dlWuWagHi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wPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",ta=class extends Zo{constructor(){let e,t,{blendFunction:n=eo.SRC,preset:i=oo.MEDIUM,edgeDetectionMode:r=to.COLOR,predicationMode:s=so.DISABLED}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("SMAAEffect","uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",{vertexShader:"varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",blendFunction:n,attributes:no.CONVOLUTION|no.DEPTH,uniforms:new Map([["weightMap",new G(null)]])}),arguments.length>1&&(e=arguments[0],t=arguments[1],arguments.length>2&&(i=arguments[2]),arguments.length>3&&(r=arguments[3])),this.renderTargetEdges=new N(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new Co(!0,!1,!1),this.clearPass.overrideClearColor=new a(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new Go(new po),this.edgeDetectionMaterial.edgeDetectionMode=r,this.edgeDetectionMaterial.predicationMode=s,this.weightsPass=new Go(new yo);const o=new Y;o.onLoad=()=>{const n=new l(e);n.name="SMAA.Search",n.magFilter=k,n.minFilter=k,n.generateMipmaps=!1,n.needsUpdate=!0,n.flipY=!0,this.weightsMaterial.searchTexture=n;const i=new l(t);i.name="SMAA.Area",i.magFilter=Q,i.minFilter=Q,i.generateMipmaps=!1,i.needsUpdate=!0,i.flipY=!1,this.weightsMaterial.areaTexture=i,this.dispatchEvent({type:"load"})},o.itemStart("search"),o.itemStart("area"),void 0!==e&&void 0!==t?(o.itemEnd("search"),o.itemEnd("area")):"undefined"!=typeof Image&&(e=new Image,t=new Image,e.addEventListener("load",(()=>o.itemEnd("search"))),t.addEventListener("load",(()=>o.itemEnd("area"))),e.src=$o,t.src=ea),this.applyPreset(i)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){const t=this.edgeDetectionMaterial,n=this.weightsMaterial;switch(e){case oo.LOW:t.edgeDetectionThreshold=.15,n.orthogonalSearchSteps=4,n.diagonalDetection=!1,n.cornerDetection=!1;break;case oo.MEDIUM:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=8,n.diagonalDetection=!1,n.cornerDetection=!1;break;case oo.HIGH:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=16,n.diagonalSearchSteps=8,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0;break;case oo.ULTRA:t.edgeDetectionThreshold=.05,n.orthogonalSearchSteps=32,n.diagonalSearchSteps=16,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0}}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,n){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){const{searchTexture:e,areaTexture:t}=this.weightsMaterial;null!==e&&null!==t&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return $o}static get areaImageDataURL(){return ea}},na=class extends Zo{constructor(e,t){let{blendFunction:n=eo.MULTIPLY,samples:i=9,rings:r=7,normalDepthBuffer:s=null,depthAwareUpsampling:a=!0,worldDistanceThreshold:l,worldDistanceFalloff:c,worldProximityThreshold:h,worldProximityFalloff:u,distanceThreshold:d=.97,distanceFalloff:f=.03,rangeThreshold:p=5e-4,rangeFalloff:g=.001,minRadiusScale:m=.1,luminanceInfluence:v=.7,radius:y=.1825,intensity:w=1,bias:b=.025,fade:x=.01,color:A=null,resolutionScale:S=1,width:T=Mo.AUTO_SIZE,height:E=Mo.AUTO_SIZE,resolutionX:D=T,resolutionY:C=E}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super("SSAOEffect","uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity;\n#if THREE_REVISION < 143\n#define luminance(v) linearToRelativeLuminance(v)\n#endif\n#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\n#endif\n#ifdef COLORIZE\nuniform vec3 color;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r;\n#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300\nvec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distance<smallestDistance){smallestDistance=distance;index=i;}}ivec2 offsets[4];offsets[0]=ivec2(0,0);offsets[1]=ivec2(0,1);offsets[2]=ivec2(1,0);offsets[3]=ivec2(1,1);ivec2 coord=ivec2(uv*vec2(textureSize(aoBuffer,0)))+offsets[index];float aoNearest=texelFetch(aoBuffer,coord,0).r;float ao=mix(aoNearest,aoLinear,s);\n#else\nfloat ao=aoLinear;\n#endif\nfloat l=luminance(inputColor.rgb);ao=mix(ao,0.0,l*luminanceInfluence);ao=clamp(ao*intensity,0.0,1.0);\n#ifdef COLORIZE\noutputColor=vec4(1.0-ao*(1.0-color),inputColor.a);\n#else\noutputColor=vec4(vec3(1.0-ao),inputColor.a);\n#endif\n}",{blendFunction:n,attributes:no.DEPTH,defines:new Map([["THRESHOLD","0.997"]]),uniforms:new Map([["aoBuffer",new G(null)],["normalDepthBuffer",new G(s)],["luminanceInfluence",new G(v)],["color",new G(null)],["intensity",new G(w)],["scale",new G(0)]])}),this.renderTarget=new N(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="AO.Target",this.uniforms.get("aoBuffer").value=this.renderTarget.texture;const B=this.resolution=new Mo(this,D,C,S);B.addEventListener("change",(e=>this.setSize(B.baseWidth,B.baseHeight))),this.camera=e,this.depthDownsamplingPass=new Ro({normalBuffer:t,resolutionScale:S}),this.depthDownsamplingPass.enabled=null===s,this.ssaoPass=new Go(new wo(e));const M=new qo(64,64,o);M.wrapS=M.wrapT=V;const I=this.ssaoMaterial;I.normalBuffer=t,I.noiseTexture=M,I.minRadiusScale=m,I.samples=i,I.radius=y,I.rings=r,I.fade=x,I.bias=b,I.distanceThreshold=d,I.distanceFalloff=f,I.proximityThreshold=p,I.proximityFalloff=g,void 0!==l&&(I.worldDistanceThreshold=l),void 0!==c&&(I.worldDistanceFalloff=c),void 0!==h&&(I.worldProximityThreshold=h),void 0!==u&&(I.worldProximityFalloff=u),null!==s&&(this.ssaoMaterial.normalDepthBuffer=s,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=a,this.color=A}set mainCamera(e){this.camera=e,this.ssaoMaterial.copyCameraSettings(e)}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(e){this.ssaoMaterial.samples=e}get rings(){return this.ssaoMaterial.rings}set rings(e){this.ssaoMaterial.rings=e}get radius(){return this.ssaoMaterial.radius}set radius(e){this.ssaoMaterial.radius=e}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(e){this.depthAwareUpsampling!==e&&(e?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(e){this.depthAwareUpsampling=e}get distanceScaling(){return!0}set distanceScaling(e){}get color(){return this.uniforms.get("color").value}set color(e){const t=this.uniforms,n=this.defines;null!==e?n.has("COLORIZE")?t.get("color").value.set(e):(n.set("COLORIZE","1"),t.get("color").value=new a(e),this.setChanged()):n.has("COLORIZE")&&(n.delete("COLORIZE"),t.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(e){this.uniforms.get("luminanceInfluence").value=e}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getColor(){return this.color}setColor(e){this.color=e}setDistanceCutoff(e,t){this.ssaoMaterial.distanceThreshold=e,this.ssaoMaterial.distanceFalloff=t}setProximityCutoff(e,t){this.ssaoMaterial.proximityThreshold=e,this.ssaoMaterial.proximityFalloff=t}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;this.depthDownsamplingPass.setDepthTexture(e,t),this.ssaoMaterial.depthBuffer=e,this.ssaoMaterial.depthPacking=t}update(e,t,n){const i=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(e),this.ssaoPass.render(e,null,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t);const i=n.width,r=n.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(i,r),this.renderTarget.setSize(i,r),this.depthDownsamplingPass.resolution.scale=n.scale,this.depthDownsamplingPass.setSize(e,t)}initialize(e,t,n){try{let i=this.uniforms.get("normalDepthBuffer").value;null===i&&(this.depthDownsamplingPass.initialize(e,t,n),i=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=i,this.ssaoMaterial.normalDepthBuffer=i,this.defines.set("NORMAL_DEPTH","1"))}catch(e){this.depthDownsamplingPass.enabled=!1}}};function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ia.apply(this,arguments)}var ra="#define GLSLIFY 1\nvec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;}\n#define Scale (vec3(0.8, 0.8, 0.8))\n#define K (19.19)\nvec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}";class sa extends W{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new G(1),normalMap:new G(null),normalScale:new G(new h(1,1)),uvTransform:new G(new ge),roughness:new G(1),roughnessMap:new G(null)},vertexShader:"\n #ifdef USE_MRT\n varying vec2 vHighPrecisionZW;\n #endif\n #define NORMAL\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n #endif\n #include <common>\n #include <uv_pars_vertex>\n #include <displacementmap_pars_vertex>\n #include <normal_pars_vertex>\n #include <morphtarget_pars_vertex>\n #include <skinning_pars_vertex>\n #include <logdepthbuf_pars_vertex>\n #include <clipping_planes_pars_vertex>\n void main() {\n #include <uv_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n vViewPosition = - mvPosition.xyz;\n #endif\n #ifdef USE_MRT\n vHighPrecisionZW = gl_Position.zw;\n #endif \n #ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n }\n ",fragmentShader:"\n #define NORMAL\n #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n #endif\n #include <packing>\n #include <uv_pars_fragment>\n #include <normal_pars_fragment>\n #include <bumpmap_pars_fragment>\n #include <normalmap_pars_fragment>\n #include <logdepthbuf_pars_fragment>\n #include <clipping_planes_pars_fragment>\n #include <roughnessmap_pars_fragment>\n \n #ifdef USE_MRT\n layout(location = 0) out vec4 gNormal;\n layout(location = 1) out vec4 gDepth;\n \n varying vec2 vHighPrecisionZW;\n #endif\n uniform float roughness;\n void main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n\n float roughnessFactor = roughness;\n \n if(roughness > 10.0e9){\n roughnessFactor = 1.;\n }else{\n #ifdef useRoughnessMap\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n }\n\n vec3 normalColor = packNormalToRGB( normal );\n #ifdef USE_MRT\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n vec4 depthColor = packDepthToRGBA( fragCoordZ );\n gNormal = vec4( normalColor, roughnessFactor );\n gDepth = depthColor;\n #else\n gl_FragColor = vec4(normalColor, roughnessFactor);\n #endif\n }\n ",toneMapped:!1}),this.normalMapType=me,this.normalScale=new h(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?ve:null},set(e){}})}}class oa extends W{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new G(null),accumulatedTexture:new G(null),normalTexture:new G(null),depthTexture:new G(null),_projectionMatrix:new G(new g),_inverseProjectionMatrix:new G(new g),cameraMatrixWorld:new G(new g),cameraNear:new G(0),cameraFar:new G(0),rayDistance:new G(0),intensity:new G(0),roughnessFade:new G(0),fade:new G(0),thickness:new G(0),ior:new G(0),maxDepthDifference:new G(0),jitter:new G(0),jitterRoughness:new G(0),maxRoughness:new G(0),samples:new G(0),envMap:new G(null),envMapPosition:new G(new t),envMapSize:new G(new t),viewMatrix:new G(new g)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:"#define GLSLIFY 1\nvarying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness;\n#define INVALID_RAY_COORDS vec2(-1.0);\n#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0)\n#define FLOAT_EPSILON 0.00001\nfloat nearMinusFar;float nearMulFar;float farMinusNear;\n#include <packing>\n#include <helperFunctions>\nvec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON){gl_FragColor=EARLY_OUT_COLOR;return;}float unpackedDepth=unpackRGBAToDepth(depthTexel);vec4 normalTexel=textureLod(normalTexture,vUv,0.0);float roughness=normalTexel.a;float specular=1.0-roughness;nearMinusFar=cameraNear-cameraFar;nearMulFar=cameraNear*cameraFar;farMinusNear=cameraFar-cameraNear;normalTexel.rgb=unpackRGBToNormal(normalTexel.rgb);float depth=fastGetViewZ(unpackedDepth);vec3 viewPos=getViewPosition(depth);vec3 viewDir=normalize(viewPos);vec3 viewNormal=normalTexel.xyz;vec3 worldPos=screenSpaceToWorldSpace(vUv,unpackedDepth);vec3 jitt=vec3(0.0);if(jitterRoughness!=0.0||jitter!=0.0){vec3 randomJitter=hash(50.0*samples*worldPos)-0.5;float spread=((2.0-specular)+roughness*jitterRoughness);float jitterMix=jitter*0.25+jitterRoughness*roughness;if(jitterMix>1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i<steps;i++){hitPos+=dir;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;\n#ifndef missedRays\nif(projectedCoord.x<0.0||projectedCoord.x>1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;}\n#endif\ndepthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference<thickness){\n#if refineSteps == 0\nif(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON)return INVALID_RAY_COORDS;\n#else\nreturn BinarySearch(dir,hitPos,rayHitDepthDifference);\n#endif\n}\n#ifndef missedRays\nif(hitPos.z>0.0){return INVALID_RAY_COORDS;}\n#endif\nlastProjectedCoord=projectedCoord;}hitPos.z=1.0;\n#ifndef missedRays\nreturn INVALID_RAY_COORDS;\n#endif\nrayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i<refineSteps;i++){projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;depthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;dir*=0.5;if(rayHitDepthDifference>0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)<FLOAT_EPSILON)return INVALID_RAY_COORDS;if(abs(rayHitDepthDifference)>maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn nearMulFar/(farMinusNear*depth-cameraFar);\n#else\nreturn depth*nearMinusFar-cameraNear;\n#endif\n}\n#include <common>\n#include <cube_uv_reflection_fragment>\nvec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){\n#if defined(ENVMAP_TYPE_CUBE_UV)\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity;\n#else\nreturn vec3(0.0);\n#endif\n}".replace("#include <helperFunctions>",ra),vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",toneMapped:!1,depthWrite:!1,depthTest:!1})}}const aa=e=>{const t=[e],n=[];for(;0!==t.length;){const e=t.shift();e.material&&n.push(e);for(const n of e.children)n.visible&&t.push(n)}return n},la=(e,t,n)=>{e.uniforms.envMap.value=t;const i=(e=>{const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}})({envMapCubeUVHeight:n});e.defines.ENVMAP_TYPE_CUBE_UV="",e.defines.CUBEUV_TEXEL_WIDTH=i.texelWidth,e.defines.CUBEUV_TEXEL_HEIGHT=i.texelHeight,e.defines.CUBEUV_MAX_MIP=i.maxMip+".0",e.needsUpdate=!0};class ca extends So{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new oa,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const n=t.width||"undefined"!=typeof window?window.innerWidth:2e3,i=t.height||"undefined"!=typeof window?window.innerHeight:1e3;this.renderTarget=new N(n,i,{minFilter:Q,magFilter:Q,type:de,depthBuffer:!1}),this.renderPass=new Oo(this._scene,this._camera),this.USE_MRT=(()=>{try{const e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}})(),this.USE_MRT?(this.gBuffersRenderTarget=new fe(n,i,2,{minFilter:Q,magFilter:Q}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new _o(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=Q,this.webgl1DepthPass.renderTarget.magFilter=Q,this.webgl1DepthPass.renderTarget.texture.minFilter=Q,this.webgl1DepthPass.renderTarget.texture.magFilter=Q,this.webgl1DepthPass.setSize("undefined"!=typeof window?window.innerWidth:2e3,"undefined"!=typeof window?window.innerHeight:1e3),this.gBuffersRenderTarget=new N(n,i,{minFilter:Q,magFilter:Q}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,t){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,t,n,i){this.ssrEffect[i]?t[n]!==e[n]&&(e[n]=t[n],e.uniforms[n].value=t[n],t[n]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):void 0!==e[n]&&(e[n]=void 0,e.uniforms[n].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=aa(this._scene);for(const e of this.visibleMeshes)if(e.material){const t=e.material;let[n,i]=this.cachedMaterials.get(e)||[];if(t!==n){i&&i.dispose(),i=new sa,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=t.normalScale,i.uniforms.normalScale.value=t.normalScale;const n=t.map||t.normalMap||t.roughnessMap||t.metalnessMap;n&&(i.uniforms.uvTransform.value=n.matrix),this.cachedMaterials.set(e,[t,i])}this.keepMaterialMapUpdated(i,t,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,t,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=0===this.ssrEffect.selection.size||this.ssrEffect.selection.has(e)?t.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const t of this.visibleMeshes){var e;if("MRTMaterial"===(null==(e=t.material)?void 0:e.type)){t.visible=!0;const[e]=this.cachedMaterials.get(t);t.material=e}}}render(e,t){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=t.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const ha={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};class ua extends W{constructor(e){const t="#define GLSLIFY 1\nuniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv;\n#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001\n#define FLOAT_EPSILON 0.00001\n#define FLOAT_ONE_MINUS_EPSILON 0.99999\nvec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false;\n#ifdef boxBlur\nvec3 boxBlurredColor=inputTexel.rgb;\n#endif\nvec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y);\n#ifdef dilation\nif(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}}\n#endif\nif(abs(depth-neighborDepth)<MAX_NEIGHBOR_DEPTH_DIFFERENCE){\n#ifdef boxBlur\nif(absX<=2&&absY<=2)boxBlurredColor+=col;\n#endif\ncol=transformColor(col);minNeighborColor=min(col,minNeighborColor);maxNeighborColor=max(col,maxNeighborColor);}}}}float velocityLength=length(lastVelocity.xy-velocity.xy);velocityDisocclusion=(velocityLength-0.000005)*10.0;velocityDisocclusion*=velocityDisocclusion;reprojectedUv=vUv-velocity.xy;\n#ifdef boxBlur\nfloat pxRadius=correctionRadius>5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor);\n#endif\nif(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{\n#ifdef boxBlur\naccumulatedColor=boxBlurredColor;\n#else\naccumulatedColor=inputColor;\n#endif\n}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor;\n#include <custom_compose_shader>\ngl_FragColor=vec4(undoColorTransform(outputColor),alpha);}".replace("#include <custom_compose_shader>",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new G(null),accumulatedTexture:new G(null),velocityTexture:new G(null),lastVelocityTexture:new G(null),samples:new G(1),blend:new G(.5),correction:new G(1),exponent:new G(1),invTexSize:new G(new h)},defines:{correctionRadius:1},vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",fragmentShader:t})}}const da=`\n\t\tvec3 transformed;\n\n\t\t// Get the normal\n\t\t${le.skinbase_vertex}\n\t\t${le.beginnormal_vertex}\n\t\t${le.skinnormal_vertex}\n\t\t${le.defaultnormal_vertex}\n\n\t\t// Get the current vertex position\n\t\ttransformed = vec3( position );\n\t\t${le.skinning_vertex}\n\t\tnewPosition = velocityMatrix * vec4( transformed, 1.0 );\n\n\t\t// Get the previous vertex position\n\t\ttransformed = vec3( position );\n\t\t${le.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")}\n\t\t${le.skinning_vertex.replace(/vec4 /g,"")}\n\t\tprevPosition = prevVelocityMatrix * vec4( transformed, 1.0 );\n\n\t\tgl_Position = newPosition;\n`;class fa extends W{constructor(){super({uniforms:{prevVelocityMatrix:{value:new g},velocityMatrix:{value:new g},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:`\n #define MAX_BONES 1024\n \n ${le.skinning_pars_vertex}\n \n\t\t#ifdef USE_SKINNING\n\t\t#ifdef BONE_TEXTURE\n\t\t\tuniform sampler2D prevBoneTexture;\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tfloat j = i * 4.0;\n\t\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\t\ty = dy * ( y + 0.5 );\n\t\t\t\tvec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\t\tvec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\t\tvec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\t\tvec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#else\n\t\t\tuniform mat4 prevBoneMatrices[ MAX_BONES ];\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tmat4 bone = prevBoneMatrices[ int(i) ];\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#endif\n\t\t#endif\n\n \n uniform mat4 velocityMatrix;\n uniform mat4 prevVelocityMatrix;\n uniform float interpolateGeometry;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n \n ${da}\n\n\t\t\t\t\t\tvHighPrecisionZW = gl_Position.zw;\n \n }`,fragmentShader:"\n uniform float intensity;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n\t\t\t\t\t\t#ifdef FULL_MOVEMENT\n\t\t\t\t\t\tgl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t#endif\n\n vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5;\n vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5;\n \n vec2 vel = pos1 - pos0;\n\n\t\t\t\t\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n \n gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. );\n \n }"}),this.isVelocityMaterial=!0}}const pa=new a(0),ga=["visible","wireframe","side"];class ma extends So{constructor(e,n){var i,s;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new t,quaternion:new r},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=n,this.renderTarget=new N((null==(i=window)?void 0:i.innerWidth)||1e3,(null==(s=window)?void 0:s.innerHeight)||1e3,{type:de})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=aa(this._scene);for(const n of this.visibleMeshes){var e;const i=n.material;let[r,s]=this.cachedMaterials.get(n)||[];var t;if(i!==r)s=new fa,s.lastMatrixWorld=new g,n.material=s,null!=(t=n.skeleton)&&t.boneTexture&&this.saveBoneTexture(n),this.cachedMaterials.set(n,[i,s]);if(s.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,n.modelViewMatrix),n.userData.needsUpdatedReflections||i.map instanceof ye?("FULL_MOVEMENT"in s.defines||(s.needsUpdate=!0),s.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in s.defines&&(delete s.defines.FULL_MOVEMENT,s.needsUpdate=!0),n.visible=this.cameraMovedThisFrame||!n.matrixWorld.equals(s.lastMatrixWorld)||n.skeleton||"FULL_MOVEMENT"in s.defines,n.material=s,n.visible){this.renderedMeshesThisFrame++;for(const e of ga)s[e]=i[e];null!=(e=n.skeleton)&&e.boneTexture&&(s.defines.USE_SKINNING="",s.defines.BONE_TEXTURE="",s.uniforms.boneTexture.value=n.skeleton.boneTexture)}}}saveBoneTexture(e){let t=e.material.uniforms.prevBoneTexture.value;if(t&&t.image.width===e.skeleton.boneTexture.width)t=e.material.uniforms.prevBoneTexture.value,t.image.data.set(e.skeleton.boneTexture.image.data);else{var n;null==(n=t)||n.dispose();const i=e.skeleton.boneTexture.image.data.slice(),r=e.skeleton.boneTexture.image.width;t=new te(i,r,r,o,$),e.material.uniforms.prevBoneTexture.value=t,t.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const t of this.visibleMeshes){var e;if(t.material.isVelocityMaterial)t.visible=!0,t.material.lastMatrixWorld.copy(t.matrixWorld),t.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,t.modelViewMatrix),null!=(e=t.skeleton)&&e.boneTexture&&this.saveBoneTexture(t),t.material=this.cachedMaterials.get(t)[0]}}setSize(e,t){this.renderTarget.setSize(e,t)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:t}=this._scene;this._scene.background=pa,e.render(this._scene,this._camera),this._scene.background=t}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return(e>1e-6||t>1e-6)&&(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0)}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const va=new h;class ya extends So{constructor(e,n,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new t,quaternion:new r},this._scene=e,this._camera=n,this.renderTarget=new N(1,1,{minFilter:Q,magFilter:Q,type:de,depthBuffer:!1}),this.velocityPass=new ma(e,n),this.fullscreenMaterial=new ua(i),this.fullscreenMaterial.defines.correctionRadius=s.correctionRadius||1,s.dilation&&(this.fullscreenMaterial.defines.dilation=""),s.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,t){this.renderTarget.setSize(e,t),this.velocityPass.setSize(e*this.velocityResolutionScale,t*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=1===this.velocityResolutionScale?k:Q,this.velocityPass.renderTarget.texture.magFilter=1===this.velocityResolutionScale?k:Q,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/t),this.setupFramebuffers(e,t)}setupFramebuffers(e,t){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new pe(e,t,o),this.accumulatedTexture.minFilter=Q,this.accumulatedTexture.magFilter=Q,this.accumulatedTexture.type=de,this.lastVelocityTexture=new pe(e*this.velocityResolutionScale,t*this.velocityResolutionScale,o),this.lastVelocityTexture.minFilter=1===this.velocityResolutionScale?k:Q,this.lastVelocityTexture.magFilter=1===this.velocityResolutionScale?k:Q,this.lastVelocityTexture.type=de,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||t>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(va,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(va,this.lastVelocityTexture)}}const wa=function(e,t){let n=1,i=0;for(;e>0;)n/=t,i+=n*(e%t),e=~~(e/t);return i};function ba(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const xa="\n#if defined( USE_ENVMAP ) || defined( ) || defined ( USE_SHADOWMAP )\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\n #ifdef BOX_PROJECTED_ENV_MAP\n vWorldPosition = worldPosition.xyz;\n #endif\n#endif\n",Aa="\n#ifdef BOX_PROJECTED_ENV_MAP\n uniform vec3 envMapSize;\n uniform vec3 envMapPosition;\n varying vec3 vWorldPosition;\n \n vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) {\n vec3 nDir = normalize( v );\n\n vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n\n vec3 rbminmax;\n\n rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x;\n rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y;\n rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z;\n\n float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z );\n vec3 boxIntersection = vWorldPosition + nDir * correction;\n \n return boxIntersection - cubePos;\n }\n#endif\n",Sa="\n#ifdef BOX_PROJECTED_ENV_MAP\n worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition );\n#endif\n",Ta="\n#ifdef BOX_PROJECTED_ENV_MAP\n reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition );\n#endif\n";const Ea="#define GLSLIFY 1\n#define MODE_DEFAULT 0\n#define MODE_REFLECTIONS 1\n#define MODE_RAW_REFLECTION 2\n#define MODE_BLURRED_REFLECTIONS 3\n#define MODE_INPUT 4\n#define MODE_BLUR_MIX 5\n#define FLOAT_EPSILON 0.00001\nuniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples;\n#include <boxBlur>\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);}\n#if RENDER_MODE == MODE_DEFAULT\noutputColor=vec4(inputColor.rgb+reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_REFLECTIONS\noutputColor=vec4(reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_RAW_REFLECTION\noutputColor=vec4(reflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLURRED_REFLECTIONS\noutputColor=vec4(blurredReflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_INPUT\noutputColor=vec4(inputColor.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLUR_MIX\noutputColor=vec4(vec3(blur),1.0);\n#endif\n}".replace("#include <helperFunctions>",ra).replace("#include <boxBlur>","#define GLSLIFY 1\nuniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}"),Da=["blur","blurSharpness","blurKernel"],Ca=new ce(1);let Ba;class Ma extends Zo{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ha;super("SSREffect",Ea,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new G(null)],["blur",new G(0)],["blurSharpness",new G(0)],["blurKernel",new G(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=(e=>{const t=[];let n=1;const i=n+e;for(;n<i;n++)t.push([wa(n,2)-.5,wa(n,3)-.5]);return t})(1024),this.haltonIndex=0,this.selection=new Qo,this.lastSize=void 0,this.cubeCamera=new he(.001,1e3,Ca),this.usingBoxProjectedEnvMap=!1,this._scene=e,this._camera=t;n=ia({},ha,n,{boxBlur:!0,dilation:!0}),this.temporalResolvePass=new ya(e,t,"#define GLSLIFY 1\n#define INV_EULER 0.36787944117144233\nalpha=velocityDisocclusion<FLOAT_EPSILON ?(alpha+0.0075): 0.0;alpha=clamp(alpha,0.0,1.0);bool needsBlur=!didReproject||velocityDisocclusion>0.5;\n#ifdef boxBlur\nif(needsBlur)inputColor=boxBlurredColor;\n#endif\nif(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}",n),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new ca(this,n),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:n.width,height:n.height,resolutionScale:n.resolutionScale,velocityResolutionScale:n.velocityResolutionScale},this.setSize(n.width,n.height),this.makeOptionsReactive(n)}makeOptionsReactive(e){let t=!1;const n=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(n);for(const r of Object.keys(e))Object.defineProperty(this,r,{get:()=>e[r],set(s){if(e[r]!==s||!t)switch(e[r]=s,Da.includes(r)||this.setSize(this.lastSize.width,this.lastSize.height,!0),r){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=s,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=s;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=s;break;case"blurKernel":this.uniforms.get("blurKernel").value=s;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"missedRays":s?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(s),this.temporalResolvePass.fullscreenMaterial.needsUpdate=t;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=s;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=s;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=s;break;case"distance":n.rayDistance.value=s;default:i.includes(r)&&(n[r].value=s)}}}),this[r]=e[r];t=!0}setSize(e,t){(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||e!==this.lastSize.width||t!==this.lastSize.height||this.resolutionScale!==this.lastSize.resolutionScale||this.velocityResolutionScale!==this.lastSize.velocityResolutionScale)&&(this.temporalResolvePass.setSize(e,t),this.reflectionsPass.setSize(e,t),this.lastSize={width:e,height:t,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:512;this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new ce(r),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),Ba||(Ba=new ue(e),Ba.compileCubemapShader());const s=Ba.fromCubemap(this.cubeCamera.renderTarget.texture).texture;s.minFilter=Q,s.magFilter=Q;const o=this.reflectionsPass.fullscreenMaterial;return function(e,t,n){e.defines.BOX_PROJECTED_ENV_MAP="",e.uniforms.envMapPosition={value:t},e.uniforms.envMapSize={value:n};const i=new RegExp(ba("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),r=new RegExp(ba("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");e.vertexShader="varying vec3 vWorldPosition;\n"+e.vertexShader.replace("#include <worldpos_vertex>",xa),e.fragmentShader=Aa+"\n"+e.fragmentShader.replace("#include <envmap_physical_pars_fragment>",le.envmap_physical_pars_fragment).replace(i,`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n ${Sa}`).replace(r,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n ${Ta}`)}(o,n,i),o.fragmentShader=o.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),o.uniforms.envMapPosition.value.copy(n),o.uniforms.envMapSize.value.copy(i),la(o,s,r),this.usingBoxProjectedEnvMap=!0,s}setIBLRadiance(e,t){this._scene.traverse((n=>{if(n.material){var i;const r=null==(i=t.properties.get(n.material))?void 0:i.uniforms;r&&"disableIBLRadiance"in r&&(r.disableIBLRadiance.value=e)}}))}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,t){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const t=this.reflectionsPass.fullscreenMaterial;let n=null;if(this._scene.traverse((t=>{if(!n&&t.material&&!t.material.envMap){const i=e.properties.get(t.material);"envMap"in i&&i.envMap instanceof l&&(n=i.envMap)}})),n){const e=this._scene.environment.image.height;la(t,n,e)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[n,i]=this.haltonSequence[this.haltonIndex],{width:r,height:s}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(r,s,n,i,r,s),this.reflectionsPass.render(e,t),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;le.envmap_physical_pars_fragment=0===e?le.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):le.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}class Ia{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpddate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpddate)return;this.effectsNeedsUpddate=!1;const{effectComposer:e}=this;e.passes.forEach((t=>{t instanceof ko&&(e.removePass(t),t.dispose())}));const t=Array.from(this.effectsMap).filter((e=>{let[,{enabled:t}]=e;return t})).map((e=>{let[,{effect:t}]=e;return t})),n=new ko(this.camera,...t);this.passesMap.set(Ia.CONSTANTS.effectPass,n),e.addPass(n)}updateCamera(e){const{passesMap:t,effectsMap:n}=this,{CONSTANTS:i}=Ia,r=t.get(i.renderPass),s=t.get(i.normalPass),o=t.get(i.effectPass);r.mainCamera=e,s.mainCamera=e,o.mainCamera=e;n.get(i.outlineEffect).effect.mainCamera=e}_initEffectComposer(){const e=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:i=0,frameBufferType:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.renderer=null,this.inputBuffer=this.createBuffer(t,n,r,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new To,this.depthTexture=null,this.passes=[],this.timer=new class{constructor(){this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return this._delta*Vo}get fixedDelta(){return this._fixedDelta*Vo}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return this._elapsed*Vo}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=void 0!==e?e:performance.now(),this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()}handleEvent(e){document.hidden||(this.currentTime=performance.now())}dispose(){this.autoReset=!1}},this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){const t=e.getSize(new h),n=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===R&&e.outputEncoding===_&&(this.inputBuffer.texture.encoding=_,this.outputBuffer.texture.encoding=_,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const t of this.passes)t.initialize(e,n,i)}}replaceRenderer(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.renderer,i=n.domElement.parentNode;return this.setRenderer(e),t&&null!==i&&(i.removeChild(n.domElement),i.appendChild(e.domElement)),n}createDepthTexture(){const e=this.depthTexture=new U;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=j,e.type=F):e.type=z,e}deleteDepthTexture(){if(null!==this.depthTexture){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,n,i){const r=this.renderer,s=null===r?new h:r.getDrawingBufferSize(new h),o={minFilter:Q,magFilter:Q,stencilBuffer:t,depthBuffer:e,type:n};let a;return i>0?(a=new N(s.width,s.height,o),a.ignoreDepthForMultisampleCopy=!1,a.samples=i):a=new N(s.width,s.height,o),n===R&&null!==r&&r.outputEncoding===_&&(a.texture.encoding=_),a.texture.name="EffectComposer.Buffer",a.texture.generateMipmaps=!1,a}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const n=this.passes,i=this.renderer,r=i.getDrawingBufferSize(new h),s=i.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(r.width,r.height),e.initialize(i,s,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){const t=this.createDepthTexture();for(e of n)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,n=t.indexOf(e);if(-1!==n&&t.splice(n,1).length>0){if(null!==this.depthTexture){const n=(e,t)=>e||t.needsDepthTexture;t.reduce(n,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,n=this.copyPass;let i,r,s,o=this.inputBuffer,a=this.outputBuffer,l=!1;void 0===e&&(this.timer.update(),e=this.timer.delta);for(const c of this.passes)c.enabled&&(c.render(t,o,a,e,l),c.needsSwap&&(l&&(n.renderToScreen=c.renderToScreen,i=t.getContext(),r=t.state.buffers.stencil,r.setFunc(i.NOTEQUAL,1,4294967295),n.render(t,o,a,e,l),r.setFunc(i.EQUAL,1,4294967295)),s=o,o=a,a=s),c instanceof Fo?l=!0:c instanceof Eo&&(l=!1))}setSize(e,t,n){const i=this.renderer,r=i.getSize(new h);void 0!==e&&void 0!==t||(e=r.width,t=r.height),r.width===e&&r.height===t||i.setSize(e,t,n);const s=i.getDrawingBufferSize(new h);this.inputBuffer.setSize(s.width,s.height),this.outputBuffer.setSize(s.width,s.height);for(const e of this.passes)e.setSize(s.width,s.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}}(this.renderer,{multisampling:8,frameBufferType:de});return e}_initPasses(){const{effectComposer:e}=this,{CONSTANTS:t}=Ia,n=this._initRenderPass(),i=this._initNormalPass(),r=this._initEffectPass();e.addPass(n),e.addPass(i),e.addPass(r),this.passesMap.set(t.renderPass,n),this.passesMap.set(t.normalPass,i),this.passesMap.set(t.effectPass,r)}_initRenderPass(){return new Oo(this.scene,this.camera)}_initNormalPass(){const e=new Ho(this.scene,this.camera,{resolutionScale:1});return e.enabled=!1,e}_initEffectPass(){return new ko(this.camera)}_initEffects(){const{CONSTANTS:e}=Ia,t=this._initSMAAEffect(),n=this._initOutlineEffect(),i=this._initSSREffect(),r=this._initBloomEffect(),s=this._initSSAOEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:n}),this.effectsMap.set(e.ssrEffect,{enabled:!1,effect:i}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r}),this.effectsMap.set(e.ssaoEffect,{enabled:!1,effect:s})}_initSMAAEffect(){return new ta({preset:oo.HIGH,edgeDetectionMode:to.COLOR})}_initSSREffect(){return new Ma(this.scene,this.camera)}_initBloomEffect(){return new Ko({blendFunction:eo.ADD})}_initOutlineEffect(){return new Jo(this.scene,this.camera,{blendFunction:eo.SCREEN})}_initSSAOEffect(){const{CONSTANTS:e}=Ia,t=this.passesMap.get(e.normalPass);return new na(this.camera,t.texture,{blendFunction:eo.MULTIPLY})}}Ia.CONSTANTS={renderPass:"renderPass",normalPass:"normalPass",effectPass:"effectPass",smaaEffect:"smaaEffect",ssaoEffect:"ssaoEffect",outlineEffect:"outlineEffect",ssrEffect:"ssrEffect",bloomEffect:"bloomEffect"};class Pa{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="slice",force:n=!1,frameSliceCount:i=500}=e,{viewport:{scener:{intersectsList:{meshOfModelList:r}}}}=this,s=e=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||(e.geometry.computeBoundsTree(),this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid))};return new Promise((e=>{if("block"===t)r.forEach(s),e();else{let t=0,n=0;const o=()=>{if(t=requestAnimationFrame(o),!this.cameraChanging){for(const e of r.slice(n,n+i))s(e),n+=1;n>=r.length&&(cancelAnimationFrame(t),e())}};o()}}))}}const Oa=navigator.userAgent.toLowerCase().includes("mac");var _a;!function(e){e[e.NONE=-1]="NONE",e[e.ROTATE=0]="ROTATE",e[e.ZOOM=1]="ZOOM",e[e.PAN=2]="PAN"}(_a||(_a={}));const Ra=new t,La=[new t,new t,new t],Na=[new t,new t,new t];let ka=new DOMRect;class Ua{constructor(e){this.viewport=e,this.camera=this.viewport.cameraManager.mainCamera,this.domElement=this.viewport.interactiveContainer,this.interactivePosition=null,this.fallbackInteractivePosition=null,this.enabled=!0,this.enabledMousePointInteractive=!0,this.enableZoom=!0,this.zoomSpeed=1,this.zoomMinDistance=1,this.zoomMaxDistance=1e5,this.zoomMinStepDistance=.1,this.zoomMaxStepDistance=2e4,this.enableRotate=!0,this.enableRotateX=!0,this.enableRotateY=!0,this.rotateSpeed=1,this.rotateTiltRange={max:Math.PI,min:0},this.enableAutoRotate=!1,this.autoRotateSpeed=1,this.autoRotateClockwise=!0,this.enableOutOfScene=!0,this.unOffsetOfScene=0,this.enablePan=!0,this.enablePanX=!0,this.enablePanY=!0,this.enablePanAxisX=!0,this.enablePanAxisY=!0,this.enablePanAxisZ=!0,this.panSpeed=2,this.state=_a.NONE,this.sceneBoxCenter=new t,this.dispose=()=>{},this.domElement=e.interactiveContainer,this.init()}init(){const e=e=>{e.preventDefault(),!1!==this.enabled&&(0===e.button?this.state=_a.ROTATE:1===e.button?this.state=_a.ZOOM:2===e.button&&(this.state=_a.PAN),ka=this.domElement.getBoundingClientRect(),this.state!==_a.ROTATE&&this.state!==_a.PAN||(this.interactivePosition=this.getInteractivePosition(e),this.interactivePosition||(this.sceneBoxCenter=this.getSceneBbox().getCenter(new t)),this.domElement.addEventListener("mousemove",n,!1),window.addEventListener("mouseup",i,!0)))},n=e=>{if(e.preventDefault(),!1===this.enabled)return;const{movementX:n,movementY:i}=e;this.state===_a.ROTATE?this.rotate(new t(.00375*-n,.00375*-i,0)):this.state===_a.PAN&&this.pan(new t(-n,i,0))},i=e=>{e.preventDefault(),this.domElement.removeEventListener("mousemove",n,!1),window.removeEventListener("mouseup",i,!0),this.state=_a.NONE},r=e=>{if(e.preventDefault(),!this.enabled)return;let n=0;n=Oa&&e.shiftKey?120*-e.deltaX:120*-e.deltaY,this.zoom_on_point(new t(0,0,n),e)},s=e=>{if(e.preventDefault(),!1===this.enabled)return;ka=this.domElement.getBoundingClientRect();const n=e.touches;switch(n.length){case 1:La[0].set(n[0].clientX,n[0].clientY,0),La[1].set(n[0].clientX,n[0].clientY,0);break;case 2:La[0].set(n[0].clientX,n[0].clientY,0),La[1].set(n[1].clientX,n[1].clientY,0);break;case 3:case 4:case 5:La[0].set(n[0].clientX,n[0].clientY,0),La[1].set(n[2].clientX,n[2].clientY,0)}const i=new t(ka.x,ka.y,0);La[0].sub(i),La[1].sub(i),Na[0].copy(La[0]),Na[1].copy(La[1]),this.interactivePosition=this.getInteractivePosition({offsetX:(La[0].x+La[1].x)/2,offsetY:(La[0].y+La[1].y)/2}),this.interactivePosition||(this.sceneBoxCenter=this.getSceneBbox().getCenter(new t)),this.domElement.addEventListener("touchmove",o,{passive:!1}),this.domElement.addEventListener("touchend",a,!1)},o=e=>{if(e.preventDefault(),!1===this.enabled)return;function n(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"y";const r=new h(e[1].x-e[0].x,e[1].y-e[0].y),s=new h(n[1].x-n[0].x,n[1].y-n[0].y),o=r.angle(),a=s.angle();r.normalize(),s.normalize();const l=n[0].y-e[0].y;return"y"===i?new t(0,.005*l,0):"x"===i?new t(o-a,0,0):new t}switch(e.touches.length){case 1:{La[0].set(e.touches[0].clientX-ka.x,e.touches[0].clientY-ka.y,0),La[1].set(e.touches[0].clientX-ka.x,e.touches[0].clientY-ka.y,0);const t=La[0].clone().sub(((e,t)=>{let n=t[0];for(const i in t)n.distanceTo(e)>t[i].distanceTo(e)&&(n=t[i]);return n})(La[0],Na));t.x=-t.x;const n=t.multiplyScalar(.9);this.pan(n);break}case 2:{La[0].set(e.touches[0].clientX-ka.x,e.touches[0].clientY-ka.y,0),La[1].set(e.touches[1].clientX-ka.x,e.touches[1].clientY-ka.y,0);const i=Na[0].distanceTo(Na[1])-La[0].distanceTo(La[1]);this.zoom_touch(new t(0,0,i*this.zoomSpeed/25)),this.rotate(n(La,Na,"x"));break}case 3:case 4:case 5:La[0].set(e.touches[0].clientX-ka.x,e.touches[0].clientY-ka.y,0),La[1].set(e.touches[2].clientX-ka.x,e.touches[2].clientY-ka.y,0),this.rotate(n(La,Na,"y"))}Na[0].copy(La[0]),Na[1].copy(La[1])},a=e=>{e.preventDefault(),this.state=_a.NONE,this.domElement.removeEventListener("touchmove",o,!1),this.domElement.removeEventListener("touchend",a,!1)};this.domElement.addEventListener("mousedown",e,!1),this.domElement.addEventListener("wheel",r,{passive:!1}),this.domElement.addEventListener("touchstart",s,{passive:!1}),this.dispose=()=>{this.domElement.removeEventListener("mousedown",e),this.domElement.removeEventListener("wheel",r),this.domElement.removeEventListener("touchstart",s)}}getInteractivePosition(e){if(this.enabledMousePointInteractive){const t=this.viewport.getIntersects(e,void 0,{isFilterHideObject:!0});if(t.length){const[{point:e}]=t;return e.clone()}return this.fallbackInteractivePosition}return this.fallbackInteractivePosition}intersectsBox(e){const n=this.getSceneBbox(),i=new t;n.getSize(i);let r=Math.max(i.x,i.y,i.z);0!=this.unOffsetOfScene&&(r=this.unOffsetOfScene);const s=n.clone();s.min.addScalar(r/2),s.max.addScalar(-r/2);const o=(new B).copy(this.camera);o.position.add(e),o.updateMatrixWorld(),o.updateProjectionMatrix();return(new we).setFromProjectionMatrix((new g).multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse)).intersectsBox(n)}caculateContainPoint(e,n){const i=(new t).copy(e).applyMatrix4(n.matrixWorldInverse).applyMatrix4(n.projectionMatrix);return!(Math.abs(i.x)>1||Math.abs(i.y)>1||Math.abs(i.z)>1)}panLeft(e){const n=new t,i=this.camera.matrix.elements;this.enablePanAxisX&&n.setX(i[0]),this.enablePanAxisY&&n.setY(i[1]),this.enablePanAxisZ&&n.setZ(i[2]),n.multiplyScalar(e);let r=!0;this.enableOutOfScene||(r=this.intersectsBox(n)),r&&this.camera.position.add(n)}panUp(e){const n=new t,i=this.camera.matrix.elements;this.enablePanAxisX&&n.setX(i[4]),this.enablePanAxisY&&n.setY(i[5]),this.enablePanAxisZ&&n.setZ(i[6]),n.multiplyScalar(e);let r=!0;this.enableOutOfScene||(r=this.intersectsBox(n)),r&&this.camera.position.add(n)}pan(e){var t;if(!this.enablePan)return;this.enablePanX||e.setX(0),this.enablePanY||e.setY(0);const n=null!==(t=this.interactivePosition)&&void 0!==t?t:this.sceneBoxCenter;let i=this.camera.position.clone().sub(n).length();i*=Math.tan(this.camera.fov/2*Math.PI/180),this.panLeft(this.panSpeed*e.x*i/ka.height),this.panUp(this.panSpeed*e.y*i/ka.height),this.viewport.signals.cameraChange.dispatch()}zoom_on_point(e,n){if(!this.enableZoom)return;this.interactivePosition=this.getInteractivePosition(n);let i=e.z>0?6:-6;const r=new t(0,0,0);let s;if(this.interactivePosition){s=this.interactivePosition.distanceTo(this.camera.position);const e=this.domElement.getBoundingClientRect();r.set(n.offsetX/e.width*2-1,-n.offsetY/e.height*2+1,.1)}else s=this.camera.position.length(),r.set(0,0,.1);let o=!1;s>this.zoomMaxDistance&&i<0?(o=!0,s=this.zoomMaxDistance,i*=2):s<this.zoomMinDistance&&i>0&&(o=!0,s=this.zoomMinDistance,i*=2),r.unproject(this.camera),r.sub(this.camera.position);let a=s/i*this.zoomSpeed;if(a>0?a>this.zoomMaxStepDistance?a=this.zoomMaxStepDistance:a<this.zoomMinStepDistance&&(a=this.zoomMinStepDistance):a<0&&(a<-this.zoomMaxStepDistance?a=-this.zoomMaxStepDistance:a>-this.zoomMinStepDistance&&(a=-this.zoomMinStepDistance)),o&&!n.shiftKey)return;const l=this.camera.position.clone().addVectors(this.camera.position,r.setLength(a));this.camera.position.copy(l),this.viewport.signals.cameraChange.dispatch()}zoom_touch(e){if(!this.enableZoom)return;let n=e.z;const i=new t(0,0,0);let r;if(this.interactivePosition){const e={offsetX:(Na[0].x+Na[1].x)/2,offsetY:(Na[0].y+Na[1].y)/2};r=this.interactivePosition.distanceTo(this.camera.position),i.set(e.offsetX/ka.width*2-1,-e.offsetY/ka.height*2+1,.1)}else r=this.camera.position.length(),i.set(0,0,.1);if(r>this.zoomMaxDistance&&n>0?(r=this.zoomMaxDistance,n=0):r<this.zoomMinDistance&&n<0&&(r=this.zoomMinDistance),0===n)return;i.unproject(this.camera),i.sub(this.camera.position);let s=r*-n*this.zoomSpeed*.1;s>0?s>this.zoomMaxStepDistance?s=this.zoomMaxStepDistance:s<this.zoomMinStepDistance&&(s=this.zoomMinStepDistance):s<0&&(s<-this.zoomMaxStepDistance?s=-this.zoomMaxStepDistance:s>-this.zoomMinStepDistance&&(s=-this.zoomMinStepDistance));const o=this.camera.position.clone().addVectors(this.camera.position,i.setLength(s));this.camera.position.copy(o),this.viewport.signals.cameraChange.dispatch()}rotate(e){var n;if(!this.enableRotate)return;e.x*=this.rotateSpeed,e.y*=this.rotateSpeed;const i=new t(0,0,-1);i.applyQuaternion(this.camera.quaternion);const r=i.angleTo(new t(0,1,0));(r-e.y>this.rotateTiltRange.max&&e.y<0||r-e.y<this.rotateTiltRange.min&&e.y>0)&&(e.y=0);const s=null!==(n=this.interactivePosition)&&void 0!==n?n:this.sceneBoxCenter;Ra.copy(this.camera.position).sub(s);const o=new g,a=new t(1,0,0);this.enableRotateX&&o.makeRotationAxis(new t(0,1,0),e.x);const l=new g;this.enableRotateY&&(a.applyEuler(this.camera.rotation),l.makeRotationAxis(a,e.y),o.multiply(l)),Ra.applyMatrix4(o),i.applyMatrix4(o),this.camera.position.copy(s).add(Ra),this.camera.lookAt(i.add(this.camera.position)),this.viewport.signals.cameraChange.dispatch()}autoRotate(){const e=this.autoRotateClockwise?.01:-.01;this.rotate(new t(e*this.autoRotateSpeed,0,0))}update(){this.enableAutoRotate&&this.autoRotate()}getSceneBbox(){const e=this.viewport.scene,t=new i;return t.setFromObject(e),t}}const ja={type:"change"},Fa={type:"start"},za={type:"end"};class Ha extends q{constructor(e,n){super(),this.object=e,this.domElement=n,this.enabled=!0,this.target=new t,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.enableAutoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:be.ROTATE,MIDDLE:be.DOLLY,RIGHT:be.PAN},this.touches={ONE:xe.ROTATE,TWO:xe.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.userData.zoom,this._domElementKeyEvents=null,this.domElement.style.touchAction="none",this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",W),this._domElementKeyEvents=e},this.saveState=function(){i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.userData.zoom},this.reset=function(){i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.userData.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(ja),i.update(),o=s.NONE},this.update=function(){const n=new t,h=(new r).setFromUnitVectors(e.up,new t(0,1,0)),p=h.clone().invert(),g=new t,m=new r,v=2*Math.PI;return function(){const e=i.object.position;n.copy(e).sub(i.target),n.applyQuaternion(h),l.setFromVector3(n),i.enableAutoRotate&&o===s.NONE&&D(2*Math.PI/60/60*i.autoRotateSpeed),i.enableDamping?(l.theta+=c.theta*i.dampingFactor,l.phi+=c.phi*i.dampingFactor):(l.theta+=c.theta,l.phi+=c.phi);let t=i.minAzimuthAngle,r=i.maxAzimuthAngle;return isFinite(t)&&isFinite(r)&&(t<-Math.PI?t+=v:t>Math.PI&&(t-=v),r<-Math.PI?r+=v:r>Math.PI&&(r-=v),l.theta=t<=r?Math.max(t,Math.min(r,l.theta)):l.theta>(t+r)/2?Math.max(t,l.theta):Math.min(r,l.theta)),l.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,l.phi)),l.makeSafe(),l.radius*=u,l.radius=Math.max(i.minDistance,Math.min(i.maxDistance,l.radius)),!0===i.enableDamping?i.target.addScaledVector(d,i.dampingFactor):i.target.add(d),n.setFromSpherical(l),n.applyQuaternion(p),e.copy(i.target).add(n),i.object.lookAt(i.target),!0===i.enableDamping?(c.theta*=1-i.dampingFactor,c.phi*=1-i.dampingFactor,d.multiplyScalar(1-i.dampingFactor)):(c.set(0,0,0),d.set(0,0,0)),u=1,!!(f||g.distanceToSquared(i.object.position)>a||8*(1-m.dot(i.object.quaternion))>a)&&(i.dispatchEvent(ja),g.copy(i.object.position),m.copy(i.object.quaternion),f=!1,!0)}}(),this.dispose=function(){i.domElement.removeEventListener("contextmenu",X),i.domElement.removeEventListener("pointerdown",H),i.domElement.removeEventListener("pointercancel",Y),i.domElement.removeEventListener("wheel",Q),i.domElement.removeEventListener("pointermove",G),window.removeEventListener("pointerup",V),null!==i._domElementKeyEvents&&i._domElementKeyEvents.removeEventListener("keydown",W)};const i=this,s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=s.NONE;const a=1e-6,l=new Ae,c=new Ae;let u=1;const d=new t;let f=!1;const p=new h,g=new h,m=new h,v=new h,y=new h,w=new h,b=new h,x=new h,A=new h,S=[],T={};function E(){return Math.pow(.95,i.zoomSpeed)}function D(e){c.theta-=e}function C(e){c.phi-=e}const M=function(){const e=new t;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),d.add(e)}}(),I=function(){const e=new t;return function(t,n){!0===i.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(i.object.up,e)),e.multiplyScalar(t),d.add(e)}}(),P=function(){const e=new t;return function(t,n){const r=i.domElement;if(i.object instanceof B){const s=i.object.position;e.copy(s).sub(i.target);let o=e.length();o*=Math.tan(i.object.fov/2*Math.PI/180),M(2*t*o/r.clientHeight,i.object.matrix),I(2*n*o/r.clientHeight,i.object.matrix)}else i.object.isOrthographicCamera?(M(t*(i.object.right-i.object.left)/i.object.userData.zoom/r.clientWidth,i.object.matrix),I(n*(i.object.top-i.object.bottom)/i.object.userData.zoom/r.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}}();function O(e){i.object instanceof B?u/=e:i.object.isOrthographicCamera?(i.object.userData.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.userData.zoom*e)),i.object.updateProjectionMatrix(),f=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function _(e){i.object instanceof B?u*=e:i.object.isOrthographicCamera?(i.object.userData.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.userData.zoom/e)),i.object.updateProjectionMatrix(),f=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function R(e){p.set(e.clientX,e.clientY)}function L(e){v.set(e.clientX,e.clientY)}function N(){if(1===S.length)p.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);p.set(e,t)}}function k(){if(1===S.length)v.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);v.set(e,t)}}function U(){const e=S[0].pageX-S[1].pageX,t=S[0].pageY-S[1].pageY,n=Math.sqrt(e*e+t*t);b.set(0,n)}function j(e){if(1==S.length)g.set(e.pageX,e.pageY);else{const t=q(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);g.set(n,i)}m.subVectors(g,p).multiplyScalar(i.rotateSpeed);const t=i.domElement;D(2*Math.PI*m.x/t.clientHeight),C(2*Math.PI*m.y/t.clientHeight),p.copy(g)}function F(e){if(1===S.length)y.set(e.pageX,e.pageY);else{const t=q(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);y.set(n,i)}w.subVectors(y,v).multiplyScalar(i.panSpeed),P(w.x,w.y),v.copy(y)}function z(e){const t=q(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);x.set(0,s),A.set(0,Math.pow(x.y/b.y,i.zoomSpeed)),O(A.y),b.copy(x)}function H(e){!1!==i.enabled&&(0===S.length&&(i.domElement.addEventListener("pointermove",G),window.addEventListener("pointerup",V)),function(e){S.push(e)}(e),"touch"===e.pointerType?function(e){switch(K(e),S.length){case 1:switch(i.touches.ONE){case xe.ROTATE:if(!1===i.enableRotate)return;N(),o=s.TOUCH_ROTATE;break;case xe.PAN:if(!1===i.enablePan)return;k(),o=s.TOUCH_PAN;break;default:o=s.NONE}break;case 2:switch(i.touches.TWO){case xe.DOLLY_PAN:if(!1===i.enableZoom&&!1===i.enablePan)return;i.enableZoom&&U(),i.enablePan&&k(),o=s.TOUCH_DOLLY_PAN;break;case xe.DOLLY_ROTATE:if(!1===i.enableZoom&&!1===i.enableRotate)return;i.enableZoom&&U(),i.enableRotate&&N(),o=s.TOUCH_DOLLY_ROTATE;break;default:o=s.NONE}break;default:o=s.NONE}o!==s.NONE&&i.dispatchEvent(Fa)}(e):function(e){let t;switch(e.button){case 0:t=i.mouseButtons.LEFT;break;case 1:t=i.mouseButtons.MIDDLE;break;case 2:t=i.mouseButtons.RIGHT;break;default:t=-1}switch(t){case be.DOLLY:if(!1===i.enableZoom)return;!function(e){b.set(e.clientX,e.clientY)}(e),o=s.DOLLY;break;case be.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===i.enablePan)return;L(e),o=s.PAN}else{if(!1===i.enableRotate)return;R(e),o=s.ROTATE}break;case be.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===i.enableRotate)return;R(e),o=s.ROTATE}else{if(!1===i.enablePan)return;L(e),o=s.PAN}break;default:o=s.NONE}o!==s.NONE&&i.dispatchEvent(Fa)}(e))}function G(e){e.preventDefault(),!1!==i.enabled&&("touch"===e.pointerType?function(e){switch(K(e),o){case s.TOUCH_ROTATE:if(!1===i.enableRotate)return;j(e),i.update();break;case s.TOUCH_PAN:if(!1===i.enablePan)return;F(e),i.update();break;case s.TOUCH_DOLLY_PAN:if(!1===i.enableZoom&&!1===i.enablePan)return;!function(e){i.enableZoom&&z(e),i.enablePan&&F(e)}(e),i.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===i.enableZoom&&!1===i.enableRotate)return;!function(e){i.enableZoom&&z(e),i.enableRotate&&j(e)}(e),i.update();break;default:o=s.NONE}}(e):function(e){switch(o){case s.ROTATE:if(!1===i.enableRotate)return;!function(e){g.set(e.clientX,e.clientY),m.subVectors(g,p).multiplyScalar(i.rotateSpeed);const t=i.domElement;D(2*Math.PI*m.x/t.clientHeight),C(2*Math.PI*m.y/t.clientHeight),p.copy(g),i.update()}(e);break;case s.DOLLY:if(!1===i.enableZoom)return;!function(e){x.set(e.clientX,e.clientY),A.subVectors(x,b),A.y>0?O(E()):A.y<0&&_(E()),b.copy(x),i.update()}(e);break;case s.PAN:if(!1===i.enablePan)return;!function(e){y.set(e.clientX,e.clientY),w.subVectors(y,v).multiplyScalar(i.panSpeed),P(w.x,w.y),v.copy(y),i.update()}(e)}}(e))}function V(e){Z(e),0===S.length&&(i.domElement.removeEventListener("pointermove",G),window.removeEventListener("pointerup",V)),i.dispatchEvent(za),o=s.NONE}function Y(e){Z(e)}function Q(e){!1!==i.enabled&&!1!==i.enableZoom&&o===s.NONE&&(e.preventDefault(),i.dispatchEvent(Fa),function(e){e.deltaY<0?_(E()):e.deltaY>0&&O(E()),i.update()}(e),i.dispatchEvent(za))}function W(e){!1!==i.enabled&&!1!==i.enablePan&&function(e){let t=!1;switch(e.code){case i.keys.UP:P(0,i.keyPanSpeed),t=!0;break;case i.keys.BOTTOM:P(0,-i.keyPanSpeed),t=!0;break;case i.keys.LEFT:P(i.keyPanSpeed,0),t=!0;break;case i.keys.RIGHT:P(-i.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),i.update())}(e)}function X(e){!1!==i.enabled&&e.preventDefault()}function Z(e){delete T[e.pointerId];for(let t=0;t<S.length;t++)if(S[t].pointerId==e.pointerId)return void S.splice(t,1)}function K(e){let t=T[e.pointerId];void 0===t&&(t=new h,T[e.pointerId]=t),t.set(e.pageX,e.pageY)}function q(e){const t=e.pointerId===S[0].pointerId?S[1]:S[0];return T[t.pointerId]}i.domElement.addEventListener("contextmenu",X),i.domElement.addEventListener("pointerdown",H),i.domElement.addEventListener("pointercancel",Y),i.domElement.addEventListener("wheel",Q,{passive:!1})}}class Ga{get options(){return this._options}set options(e){this._options=e,e.type||(this._options.type="free"),this._onChangeCallback()}constructor(e){this.viewport=e,this._options={type:"free"},this._disposeList=new Set,this.currentControls=new Ua(this.viewport)}handleFreeControls(){const e=wr(this.options,["type"]),{postRender:t}=this.viewport,n=this.currentControls=new Ua(this.viewport);Object.assign(n,e),t.set("FreeControlsUpdate",(()=>{n.update()})),this._disposeList.add((()=>{t.delete("FreeControlsUpdate")}))}handleOrbitControls(){const e=wr(Object.assign({},this.options),["type"]),{cameraManager:{mainCamera:t},interactiveContainer:n,postRender:i}=this.viewport,r=this.currentControls=new Ha(t,n);Object.assign(r,e),r.update();const s=()=>{this.viewport.signals.cameraChange.dispatch()};if(r.addEventListener("change",s),this._disposeList.add((()=>{r.removeEventListener("change",s)})),e.enableDamping||e.enableAutoRotate)i.set("OrbitControlsUpdate",(()=>{this.viewport.render((()=>{r.update()}))})),this._disposeList.add((()=>{i.delete("OrbitControlsUpdate")}));else{const e=e=>{e&&r.update()};this.viewport.signals.cameraChange.add(e),this._disposeList.add((()=>{this.viewport.signals.cameraChange.remove(e)}))}}_onChangeCallback(){switch(this.dispose(),this.options.type){case"free":default:this.handleFreeControls();break;case"orbit":this.handleOrbitControls()}this.viewport.triggerRender()}setOptions(e){this.options=e}dispose(){this.currentControls.dispose(),this._disposeList.forEach((e=>e())),this._disposeList.clear()}}var Va="0123456789abcdefghijklmnopqrstuvwxyz";function Ya(e){return Va.charAt(e)}function Qa(e,t){return e&t}function Wa(e,t){return e|t}function Xa(e,t){return e^t}function Za(e,t){return e&~t}function Ka(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function qa(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var Ja,$a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",el="=";function tl(e){var t,n,i="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),i+=$a.charAt(n>>6)+$a.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),i+=$a.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),i+=$a.charAt(n>>2)+$a.charAt((3&n)<<4));(3&i.length)>0;)i+=el;return i}function nl(e){var t,n="",i=0,r=0;for(t=0;t<e.length&&e.charAt(t)!=el;++t){var s=$a.indexOf(e.charAt(t));s<0||(0==i?(n+=Ya(s>>2),r=3&s,i=1):1==i?(n+=Ya(r<<2|s>>4),r=15&s,i=2):2==i?(n+=Ya(r),n+=Ya(s>>2),r=3&s,i=3):(n+=Ya(r<<2|s>>4),n+=Ya(15&s),i=0))}return 1==i&&(n+=Ya(r<<2)),n}var il,rl=function(e){var t;if(void 0===Ja){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(Ja={},t=0;t<16;++t)Ja[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)Ja[n.charAt(t)]=t;for(t=0;t<i.length;++t)Ja[i.charAt(t)]=-1}var r=[],s=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=Ja[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);s|=a,++o>=2?(r[r.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return r},sl={decode:function(e){var t;if(void 0===il){var n="= \f\n\r\t \u2028\u2029";for(il=Object.create(null),t=0;t<64;++t)il["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(il["-"]=62,il._=63,t=0;t<n.length;++t)il[n.charAt(t)]=-1}var i=[],r=0,s=0;for(t=0;t<e.length;++t){var o=e.charAt(t);if("="==o)break;if(-1!=(o=il[o])){if(void 0===o)throw new Error("Illegal character at offset "+t);r|=o,++s>=4?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,r=0,s=0):r<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=sl.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return sl.decode(e)}},ol=1e13,al=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,i,r=this.buf,s=r.length;for(n=0;n<s;++n)(i=r[n]*e+t)<ol?t=0:i-=(t=0|i/ol)*ol,r[n]=i;t>0&&(r[n]=t)},e.prototype.sub=function(e){var t,n,i=this.buf,r=i.length;for(t=0;t<r;++t)(n=i[t]-e)<0?(n+=ol,e=1):e=0,i[t]=n;for(;0===i[i.length-1];)i.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),i=t.length-2;i>=0;--i)n+=(ol+t[i]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*ol+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),ll="…",cl=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,hl=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function ul(e,t){return e.length>t&&(e=e.substring(0,t)+ll),e}var dl,fl=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var i="",r=e;r<t;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var i=this.get(n);if(i<32||i>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",i=e;i<t;++i)n+=String.fromCharCode(this.get(i));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",i=e;i<t;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):r>191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,i,r="",s=e;s<t;)n=this.get(s++),i=this.get(s++),r+=String.fromCharCode(n<<8|i);return r},e.prototype.parseTime=function(e,t,n){var i=this.parseStringISO(e,t),r=(n?cl:hl).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(e,t){for(var n,i=this.get(e),r=i>127,s=r?255:0,o="";i==s&&++e<t;)i=this.get(e);if(0===(n=t-e))return r?-1:0;if(n>4){for(o=i,n<<=3;0==(128&(+o^s));)o=+o<<1,--n;o="("+n+" bit)\n"}r&&(i-=256);for(var a=new al(i),l=e+1;l<t;++l)a.mulAdd(256,this.get(l));return o+a.toString()},e.prototype.parseBitString=function(e,t,n){for(var i=this.get(e),r="("+((t-e-1<<3)-i)+" bit)\n",s="",o=e+1;o<t;++o){for(var a=this.get(o),l=o==t-1?i:0,c=7;c>=l;--c)s+=a>>c&1?"1":"0";if(s.length>n)return r+ul(s,n)}return r+s},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return ul(this.parseStringISO(e,t),n);var i=t-e,r="("+i+" byte)\n";i>(n/=2)&&(t=e+n);for(var s=e;s<t;++s)r+=this.hexByte(this.get(s));return i>n&&(r+=ll),r},e.prototype.parseOID=function(e,t,n){for(var i="",r=new al,s=0,o=e;o<t;++o){var a=this.get(o);if(r.mulAdd(128,127&a),s+=7,!(128&a)){if(""===i)if((r=r.simplify())instanceof al)r.sub(80),i="2."+r.toString();else{var l=r<80?r<40?0:1:2;i=l+"."+(r-40*l)}else i+="."+r.toString();if(i.length>n)return ul(i,n);r=new al,s=0}}return s>0&&(i+=".incomplete"),i},e}(),pl=function(){function e(e,t,n,i,r){if(!(i instanceof gl))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=i,this.sub=r}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return ul(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return ul(this.stream.parseStringISO(t,t+n),e);case 30:return ul(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,i=this.sub.length;n<i;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var i=0;i<n;++i)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},e.decode=function(t){var n;n=t instanceof fl?t:new fl(t,0);var i=new fl(n),r=new gl(n),s=e.decodeLength(n),o=n.pos,a=o-i.pos,l=null,c=function(){var t=[];if(null!==s){for(var i=o+s;n.pos<i;)t[t.length]=e.decode(n);if(n.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var r=e.decode(n);if(r.tag.isEOC())break;t[t.length]=r}s=o-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(r.tagConstructed)l=c();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var h=0;h<l.length;++h)if(l[h].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){l=null}if(null===l){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);n.pos=o+Math.abs(s)}return new e(i,a,s,r,l)},e}(),gl=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!=(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new al;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),ml=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],vl=(1<<26)/ml[ml.length-1],yl=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<<t)-1,r=!1,s="",o=this.t,a=this.DB-o*this.DB%t;if(o-- >0)for(a<this.DB&&(n=this[o]>>a)>0&&(r=!0,s=Ya(n));o>=0;)a<t?(n=(this[o]&(1<<a)-1)<<t-a,n|=this[--o]>>(a+=this.DB-t)):(n=this[o]>>(a-=t)&i,a<=0&&(a+=this.DB,--o)),n>0&&(r=!0),r&&(s+=Ya(n));return r?s:"0"},e.prototype.negate=function(){var t=Sl();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Pl(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=Sl();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new bl(t):new xl(t),this.exp(e,n)},e.prototype.clone=function(){var e=Sl();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,i=this.DB-e*this.DB%8,r=0;if(e-- >0)for(i<this.DB&&(n=this[e]>>i)!=(this.s&this.DM)>>i&&(t[r++]=n|this.s<<this.DB-i);e>=0;)i<8?(n=(this[e]&(1<<i)-1)<<8-i,n|=this[--e]>>(i+=this.DB-8)):(n=this[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(t[r++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=Sl();return this.bitwiseTo(e,Qa,t),t},e.prototype.or=function(e){var t=Sl();return this.bitwiseTo(e,Wa,t),t},e.prototype.xor=function(e){var t=Sl();return this.bitwiseTo(e,Xa,t),t},e.prototype.andNot=function(e){var t=Sl();return this.bitwiseTo(e,Za,t),t},e.prototype.not=function(){for(var e=Sl(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=Sl();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=Sl();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+Ka(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=qa(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,Wa)},e.prototype.clearBit=function(e){return this.changeBit(e,Za)},e.prototype.flipBit=function(e){return this.changeBit(e,Xa)},e.prototype.add=function(e){var t=Sl();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=Sl();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=Sl();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=Sl();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=Sl();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=Sl(),n=Sl();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,i,r=e.bitLength(),s=Il(1);if(r<=0)return s;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new bl(t):t.isEven()?new Al(t):new xl(t);var o=[],a=3,l=n-1,c=(1<<n)-1;if(o[1]=i.convert(this),n>1){var h=Sl();for(i.sqrTo(o[1],h);a<=c;)o[a]=Sl(),i.mulTo(h,o[a-2],o[a]),a+=2}var u,d,f=e.t-1,p=!0,g=Sl();for(r=Pl(e[f])-1;f>=0;){for(r>=l?u=e[f]>>r-l&c:(u=(e[f]&(1<<r+1)-1)<<l-r,f>0&&(u|=e[f-1]>>this.DB+r-l)),a=n;0==(1&u);)u>>=1,--a;if((r-=a)<0&&(r+=this.DB,--f),p)o[u].copyTo(s),p=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(d=s,s=g,g=d),i.mulTo(g,o[u],s)}for(;f>=0&&0==(e[f]&1<<r);)i.sqrTo(s,g),d=s,s=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(s)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var i=t.clone(),r=this.clone(),s=Il(1),o=Il(0),a=Il(0),l=Il(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(t,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&l.isEven()||(a.addTo(this,a),l.subTo(t,l)),a.rShiftTo(1,a)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);i.compareTo(r)>=0?(i.subTo(r,i),n&&s.subTo(a,s),o.subTo(l,o)):(r.subTo(i,r),n&&a.subTo(s,a),l.subTo(o,l))}return 0!=r.compareTo(e.ONE)?e.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},e.prototype.pow=function(e){return this.exp(e,new wl)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var i=t;t=n,n=i}var r=t.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)return t;for(r<s&&(s=r),s>0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=ml[ml.length-1]){for(t=0;t<ml.length;++t)if(n[0]==ml[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<ml.length;){for(var i=ml[t],r=t+1;r<ml.length&&i<vl;)i*=ml[r++];for(i=n.modInt(i);t<r;)if(i%ml[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var i;if(16==n)i=4;else if(8==n)i=3;else if(256==n)i=8;else if(2==n)i=1;else if(32==n)i=5;else{if(4!=n)return void this.fromRadix(t,n);i=2}this.t=0,this.s=0;for(var r=t.length,s=!1,o=0;--r>=0;){var a=8==i?255&+t[r]:Ml(t,r);a<0?"-"==t.charAt(r)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=i)>=this.DB&&(o-=this.DB))}8==i&&0!=(128&+t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,i=this.DB-n,r=(1<<i)-1,s=Math.floor(e/this.DB),o=this.s<<n&this.DM,a=this.t-1;a>=0;--a)t[a+s+1]=this[a]>>i|o,o=(this[a]&r)<<n;for(a=s-1;a>=0;--a)t[a]=0;t[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,s=(1<<i)-1;t[0]=this[n]>>i;for(var o=n+1;o<this.t;++o)t[o-n-1]|=(this[o]&s)<<r,t[o-n]=this[o]>>i;i>0&&(t[this.t-n-1]|=(this.s&s)<<r),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;)i+=this[n]-e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i-=e[n],t[n++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[n++]=this.DV+i:i>0&&(t[n++]=i),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var i=this.abs(),r=t.abs(),s=i.t;for(n.t=s+r.t;--s>=0;)n[s]=0;for(s=0;s<r.t;++s)n[s+i.t]=i.am(0,r[s],n,s,0,i.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var i=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,i,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,i){var r=t.abs();if(!(r.t<=0)){var s=this.abs();if(s.t<r.t)return null!=n&&n.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Sl());var o=Sl(),a=this.s,l=t.s,c=this.DB-Pl(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,i)):(r.copyTo(o),s.copyTo(i));var h=o.t,u=o[h-1];if(0!=u){var d=u*(1<<this.F1)+(h>1?o[h-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,g=1<<this.F2,m=i.t,v=m-h,y=null==n?Sl():n;for(o.dlShiftTo(v,y),i.compareTo(y)>=0&&(i[i.t++]=1,i.subTo(y,i)),e.ONE.dlShiftTo(h,y),y.subTo(o,o);o.t<h;)o[o.t++]=0;for(;--v>=0;){var w=i[--m]==u?this.DM:Math.floor(i[m]*f+(i[m-1]+g)*p);if((i[m]+=o.am(0,w,i,v,0,h))<w)for(o.dlShiftTo(v,y),i.subTo(y,i);i[m]<--w;)i.subTo(y,i)}null!=n&&(i.drShiftTo(h,n),a!=l&&e.ZERO.subTo(n,n)),i.t=h,i.clamp(),c>0&&i.rShiftTo(c,i),a<0&&e.ZERO.subTo(i,i)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var i=Sl(),r=Sl(),s=n.convert(this),o=Pl(t)-1;for(s.copyTo(i);--o>=0;)if(n.sqrTo(i,r),(t&1<<o)>0)n.mulTo(r,s,i);else{var a=i;i=r,r=a}return n.revert(i)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),i=Il(n),r=Sl(),s=Sl(),o="";for(this.divRemTo(i,r,s);r.signum()>0;)o=(n+s.intValue()).toString(e).substr(1)+o,r.divRemTo(i,r,s);return s.intValue().toString(e)+o},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var i=this.chunkSize(n),r=Math.pow(n,i),s=!1,o=0,a=0,l=0;l<t.length;++l){var c=Ml(t,l);c<0?"-"==t.charAt(l)&&0==this.signum()&&(s=!0):(a=n*a+c,++o>=i&&(this.dMultiply(r),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(n,o)),this.dAddOffset(a,0)),s&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,i){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),Wa,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var r=[],s=7&t;r.length=1+(t>>3),n.nextBytes(r),s>0?r[0]&=(1<<s)-1:r[0]=0,this.fromString(r,256)}},e.prototype.bitwiseTo=function(e,t,n){var i,r,s=Math.min(e.t,this.t);for(i=0;i<s;++i)n[i]=t(this[i],e[i]);if(e.t<this.t){for(r=e.s&this.DM,i=s;i<this.t;++i)n[i]=t(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=s;i<e.t;++i)n[i]=t(r,e[i]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var i=e.ONE.shiftLeft(t);return this.bitwiseTo(i,n,i),i},e.prototype.addTo=function(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;)i+=this[n]+e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i+=e[n],t[n++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[n++]=i:i<-1&&(t[n++]=this.DV+i),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var i=n.t=this.t+e.t-t;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)n[this.t+i-t]=this.am(t-i,e[i],n,0,0,this.t+i-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var i=this.t-1;i>=0;--i)n=(t*n+this[i])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),i=n.getLowestSetBit();if(i<=0)return!1;var r=n.shiftRight(i);(t=t+1>>1)>ml.length&&(t=ml.length);for(var s=Sl(),o=0;o<t;++o){s.fromInt(ml[Math.floor(Math.random()*ml.length)]);var a=s.modPow(r,this);if(0!=a.compareTo(e.ONE)&&0!=a.compareTo(n)){for(var l=1;l++<i&&0!=a.compareTo(n);)if(0==(a=a.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=a.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=Sl();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var s=n.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)t(n);else{s<o&&(o=s),o>0&&(n.rShiftTo(o,n),i.rShiftTo(o,i));var a=function(){(s=n.getLowestSetBit())>0&&n.rShiftTo(s,n),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),n.compareTo(i)>=0?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),n.signum()>0?setTimeout(a,0):(o>0&&i.lShiftTo(o,i),setTimeout((function(){t(i)}),0))};setTimeout(a,10)}},e.prototype.fromNumberAsync=function(t,n,i,r){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),Wa,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(e.ONE.shiftLeft(t-1),s),s.isProbablePrime(n)?setTimeout((function(){r()}),0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],l=7&t;a.length=1+(t>>3),n.nextBytes(a),l>0?a[0]&=(1<<l)-1:a[0]=0,this.fromString(a,256)}},e}(),wl=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),bl=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),xl=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=Sl();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(yl.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=Sl();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],i=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Al=function(){function e(e){this.m=e,this.r2=Sl(),this.q3=Sl(),yl.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=Sl();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function Sl(){return new yl(null)}function Tl(e,t){return new yl(e,t)}var El="undefined"!=typeof navigator;El&&"Microsoft Internet Explorer"==navigator.appName?(yl.prototype.am=function(e,t,n,i,r,s){for(var o=32767&t,a=t>>15;--s>=0;){var l=32767&this[e],c=this[e++]>>15,h=a*l+c*o;r=((l=o*l+((32767&h)<<15)+n[i]+(1073741823&r))>>>30)+(h>>>15)+a*c+(r>>>30),n[i++]=1073741823&l}return r},dl=30):El&&"Netscape"!=navigator.appName?(yl.prototype.am=function(e,t,n,i,r,s){for(;--s>=0;){var o=t*this[e++]+n[i]+r;r=Math.floor(o/67108864),n[i++]=67108863&o}return r},dl=26):(yl.prototype.am=function(e,t,n,i,r,s){for(var o=16383&t,a=t>>14;--s>=0;){var l=16383&this[e],c=this[e++]>>14,h=a*l+c*o;r=((l=o*l+((16383&h)<<14)+n[i]+r)>>28)+(h>>14)+a*c,n[i++]=268435455&l}return r},dl=28),yl.prototype.DB=dl,yl.prototype.DM=(1<<dl)-1,yl.prototype.DV=1<<dl;yl.prototype.FV=Math.pow(2,52),yl.prototype.F1=52-dl,yl.prototype.F2=2*dl-52;var Dl,Cl,Bl=[];for(Dl="0".charCodeAt(0),Cl=0;Cl<=9;++Cl)Bl[Dl++]=Cl;for(Dl="a".charCodeAt(0),Cl=10;Cl<36;++Cl)Bl[Dl++]=Cl;for(Dl="A".charCodeAt(0),Cl=10;Cl<36;++Cl)Bl[Dl++]=Cl;function Ml(e,t){var n=Bl[e.charCodeAt(t)];return null==n?-1:n}function Il(e){var t=Sl();return t.fromInt(e),t}function Pl(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}yl.ZERO=Il(0),yl.ONE=Il(1);var Ol=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,i;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[n],this.S[n]=i;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var _l,Rl,Ll=256,Nl=null;if(null==Nl){Nl=[],Rl=0;var kl=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var Ul=new Uint32Array(256);for(window.crypto.getRandomValues(Ul),kl=0;kl<Ul.length;++kl)Nl[Rl++]=255&Ul[kl]}var jl=0,Fl=function(e){if((jl=jl||0)>=256||Rl>=Ll)window.removeEventListener?window.removeEventListener("mousemove",Fl,!1):window.detachEvent&&window.detachEvent("onmousemove",Fl);else try{var t=e.x+e.y;Nl[Rl++]=255&t,jl+=1}catch(e){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",Fl,!1):window.attachEvent&&window.attachEvent("onmousemove",Fl))}function zl(){if(null==_l){for(_l=new Ol;Rl<Ll;){var e=Math.floor(65536*Math.random());Nl[Rl++]=255&e}for(_l.init(Nl),Rl=0;Rl<Nl.length;++Rl)Nl[Rl]=0;Rl=0}return _l.next()}var Hl=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=zl()},e}();var Gl=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Tl(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,n=function(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=e.length-1;i>=0&&t>0;){var r=e.charCodeAt(i--);r<128?n[--t]=r:r>127&&r<2048?(n[--t]=63&r|128,n[--t]=r>>6|192):(n[--t]=63&r|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}n[--t]=0;for(var s=new Hl,o=[];t>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);n[--t]=o[0]}return n[--t]=2,n[--t]=0,new yl(n)}(e,t);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;for(var r=i.toString(16),s=r.length,o=0;o<2*t-s;o++)r="0"+r;return r},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Tl(e,16),this.e=parseInt(t,16),this.d=Tl(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,i,r,s,o,a){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Tl(e,16),this.e=parseInt(t,16),this.d=Tl(n,16),this.p=Tl(i,16),this.q=Tl(r,16),this.dmp1=Tl(s,16),this.dmq1=Tl(o,16),this.coeff=Tl(a,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new Hl,i=e>>1;this.e=parseInt(t,16);for(var r=new yl(t,16);;){for(;this.p=new yl(e-i,1,n),0!=this.p.subtract(yl.ONE).gcd(r).compareTo(yl.ONE)||!this.p.isProbablePrime(10););for(;this.q=new yl(i,1,n),0!=this.q.subtract(yl.ONE).gcd(r).compareTo(yl.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(yl.ONE),a=this.q.subtract(yl.ONE),l=o.multiply(a);if(0==l.gcd(r).compareTo(yl.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(l),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=Tl(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),i=0;for(;i<n.length&&0==n[i];)++i;if(n.length-i!=t-1||2!=n[i])return null;++i;for(;0!=n[i];)if(++i>=n.length)return null;var r="";for(;++i<n.length;){var s=255&n[i];s<128?r+=String.fromCharCode(s):s>191&&s<224?(r+=String.fromCharCode((31&s)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&s)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var i=new Hl,r=e>>1;this.e=parseInt(t,16);var s=new yl(t,16),o=this,a=function(){var t=function(){if(o.p.compareTo(o.q)<=0){var e=o.p;o.p=o.q,o.q=e}var t=o.p.subtract(yl.ONE),i=o.q.subtract(yl.ONE),r=t.multiply(i);0==r.gcd(s).compareTo(yl.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(r),o.dmp1=o.d.mod(t),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout((function(){n()}),0)):setTimeout(a,0)},l=function(){o.q=Sl(),o.q.fromNumberAsync(r,1,i,(function(){o.q.subtract(yl.ONE).gcda(s,(function(e){0==e.compareTo(yl.ONE)&&o.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(l,0)}))}))},c=function(){o.p=Sl(),o.p.fromNumberAsync(e-r,1,i,(function(){o.p.subtract(yl.ONE).gcda(s,(function(e){0==e.compareTo(yl.ONE)&&o.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(a,0)},e.prototype.sign=function(e,t,n){var i=function(e){return Vl[e]||""}(n),r=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,i="",r=0;r<n;r+=2)i+="ff";return Tl("0001"+i+"00"+e,16)}(i+t(e).toString(),this.n.bitLength()/4);if(null==r)return null;var s=this.doPrivate(r);if(null==s)return null;var o=s.toString(16);return 0==(1&o.length)?o:"0"+o},e.prototype.verify=function(e,t,n){var i=Tl(t,16),r=this.doPublic(i);return null==r?null:function(e){for(var t in Vl)if(Vl.hasOwnProperty(t)){var n=Vl[t],i=n.length;if(e.substr(0,i)==n)return e.substr(i)}return e}
8
8
  /*!
9
9
  Copyright (c) 2011, Yahoo! Inc. All rights reserved.
10
10
  Code licensed under the BSD License:
11
11
  http://developer.yahoo.com/yui/license.html
12
12
  version: 2.9.0
13
- */(r.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var nu={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var iu={};iu.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var r;for(r in n)e.prototype[r]=n[r];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(e,t){for(r=0;r<o.length;r+=1){var n=o[r],i=t[n];"function"==typeof i&&i!=Object.prototype[n]&&(e[n]=i)}})}catch(e){}s(e.prototype,n)}}};
13
+ */(r.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var Vl={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var Yl={};Yl.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var r;for(r in n)e.prototype[r]=n[r];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(e,t){for(r=0;r<o.length;r+=1){var n=o[r],i=t[n];"function"==typeof i&&i!=Object.prototype[n]&&(e[n]=i)}})}catch(e){}s(e.prototype,n)}}};
14
14
  /**
15
15
  * @fileOverview
16
16
  * @name asn1-1.0.js
@@ -19,10 +19,4 @@ version: 2.9.0
19
19
  * @since jsrsasign 2.1
20
20
  * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
21
21
  */
22
- var ru={};void 0!==ru.asn1&&ru.asn1||(ru.asn1={}),ru.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var i="",r=0;r<n;r++)i+="f";t=new Bc(i,16).xor(e).add(Bc.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=ru.asn1,n=t.DERBoolean,i=t.DERInteger,r=t.DERBitString,s=t.DEROctetString,o=t.DERNull,a=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,u=t.DERNumericString,h=t.DERPrintableString,d=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,g=t.DERGeneralizedTime,m=t.DERSequence,v=t.DERSet,y=t.DERTaggedObject,w=t.ASN1Util.newObject,b=Object.keys(e);if(1!=b.length)throw"key of param shall be only one.";var x=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+x+":"))throw"undefined key: "+x;if("bool"==x)return new n(e[x]);if("int"==x)return new i(e[x]);if("bitstr"==x)return new r(e[x]);if("octstr"==x)return new s(e[x]);if("null"==x)return new o(e[x]);if("oid"==x)return new a(e[x]);if("enum"==x)return new l(e[x]);if("utf8str"==x)return new c(e[x]);if("numstr"==x)return new u(e[x]);if("prnstr"==x)return new h(e[x]);if("telstr"==x)return new d(e[x]);if("ia5str"==x)return new f(e[x]);if("utctime"==x)return new p(e[x]);if("gentime"==x)return new g(e[x]);if("seq"==x){for(var A=e[x],T=[],S=0;S<A.length;S++){var E=w(A[S]);T.push(E)}return new m({array:T})}if("set"==x){for(A=e[x],T=[],S=0;S<A.length;S++){E=w(A[S]);T.push(E)}return new v({array:T})}if("tag"==x){var D=e[x];if("[object Array]"===Object.prototype.toString.call(D)&&3==D.length){var C=w(D[2]);return new y({tag:D[0],explicit:D[1],obj:C})}var I={};if(void 0!==D.explicit&&(I.explicit=D.explicit),void 0!==D.tag&&(I.tag=D.tag),void 0===D.obj)throw"obj shall be specified for 'tag'.";return I.obj=w(D.obj),new y(I)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},ru.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),i=(t=Math.floor(n/40)+"."+n%40,""),r=2;r<e.length;r+=2){var s=("00000000"+parseInt(e.substr(r,2),16).toString(2)).slice(-8);if(i+=s.substr(1,7),"0"==s.substr(0,1))t=t+"."+new Bc(i,2).toString(10),i=""}return t},ru.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",i=new Bc(e,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var s="",o=0;o<r;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var i="",r=e.split("."),s=40*parseInt(r[0])+parseInt(r[1]);i+=t(s),r.splice(0,2);for(var o=0;o<r.length;o++)i+=n(r[o]);return i},ru.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},ru.asn1.DERAbstractString=function(e){ru.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},iu.lang.extend(ru.asn1.DERAbstractString,ru.asn1.ASN1Object),ru.asn1.DERAbstractTime=function(e){ru.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var i=this.zeroPadding,r=this.localDateToUTC(e),s=String(r.getFullYear());"utc"==t&&(s=s.substr(2,2));var o=s+i(String(r.getMonth()+1),2)+i(String(r.getDate()),2)+i(String(r.getHours()),2)+i(String(r.getMinutes()),2)+i(String(r.getSeconds()),2);if(!0===n){var a=r.getMilliseconds();if(0!=a){var l=i(String(a),3);o=o+"."+(l=l.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,i,r,s){var o=new Date(Date.UTC(e,t-1,n,i,r,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},iu.lang.extend(ru.asn1.DERAbstractTime,ru.asn1.ASN1Object),ru.asn1.DERAbstractStructured=function(e){ru.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},iu.lang.extend(ru.asn1.DERAbstractStructured,ru.asn1.ASN1Object),ru.asn1.DERBoolean=function(){ru.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},iu.lang.extend(ru.asn1.DERBoolean,ru.asn1.ASN1Object),ru.asn1.DERInteger=function(e){ru.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ru.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Bc(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},iu.lang.extend(ru.asn1.DERInteger,ru.asn1.ASN1Object),ru.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ru.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}ru.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var i="";for(n=0;n<e.length-1;n+=8){var r=e.substr(n,8),s=parseInt(r,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+t+i},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},iu.lang.extend(ru.asn1.DERBitString,ru.asn1.ASN1Object),ru.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ru.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}ru.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},iu.lang.extend(ru.asn1.DEROctetString,ru.asn1.DERAbstractString),ru.asn1.DERNull=function(){ru.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},iu.lang.extend(ru.asn1.DERNull,ru.asn1.ASN1Object),ru.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",i=new Bc(e,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var s="",o=0;o<r;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};ru.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var i="",r=e.split("."),s=40*parseInt(r[0])+parseInt(r[1]);i+=t(s),r.splice(0,2);for(var o=0;o<r.length;o++)i+=n(r[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(e){var t=ru.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},iu.lang.extend(ru.asn1.DERObjectIdentifier,ru.asn1.ASN1Object),ru.asn1.DEREnumerated=function(e){ru.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ru.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Bc(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},iu.lang.extend(ru.asn1.DEREnumerated,ru.asn1.ASN1Object),ru.asn1.DERUTF8String=function(e){ru.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},iu.lang.extend(ru.asn1.DERUTF8String,ru.asn1.DERAbstractString),ru.asn1.DERNumericString=function(e){ru.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},iu.lang.extend(ru.asn1.DERNumericString,ru.asn1.DERAbstractString),ru.asn1.DERPrintableString=function(e){ru.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},iu.lang.extend(ru.asn1.DERPrintableString,ru.asn1.DERAbstractString),ru.asn1.DERTeletexString=function(e){ru.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},iu.lang.extend(ru.asn1.DERTeletexString,ru.asn1.DERAbstractString),ru.asn1.DERIA5String=function(e){ru.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},iu.lang.extend(ru.asn1.DERIA5String,ru.asn1.DERAbstractString),ru.asn1.DERUTCTime=function(e){ru.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},iu.lang.extend(ru.asn1.DERUTCTime,ru.asn1.DERAbstractTime),ru.asn1.DERGeneralizedTime=function(e){ru.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},iu.lang.extend(ru.asn1.DERGeneralizedTime,ru.asn1.DERAbstractTime),ru.asn1.DERSequence=function(e){ru.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},iu.lang.extend(ru.asn1.DERSequence,ru.asn1.DERAbstractStructured),ru.asn1.DERSet=function(e){ru.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},iu.lang.extend(ru.asn1.DERSet,ru.asn1.DERAbstractStructured),ru.asn1.DERTaggedObject=function(e){ru.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},iu.lang.extend(ru.asn1.DERTaggedObject,ru.asn1.ASN1Object);var su,ou,au,lu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cu=function(e){function t(n){var i=e.call(this)||this;return n&&("string"==typeof n?i.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&i.parsePropertiesFrom(n)),i}return lu(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?mc(e):vc.unarmor(e),r=Dc.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){t=r.sub[1].getHexStringValue(),this.n=kc(t,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var s=r.sub[3].getHexStringValue();this.d=kc(s,16);var o=r.sub[4].getHexStringValue();this.p=kc(o,16);var a=r.sub[5].getHexStringValue();this.q=kc(a,16);var l=r.sub[6].getHexStringValue();this.dmp1=kc(l,16);var c=r.sub[7].getHexStringValue();this.dmq1=kc(c,16);var u=r.sub[8].getHexStringValue();this.coeff=kc(u,16)}else{if(2!==r.sub.length)return!1;if(r.sub[0].sub){var h=r.sub[1].sub[0];t=h.sub[0].getHexStringValue(),this.n=kc(t,16),n=h.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=r.sub[0].getHexStringValue(),this.n=kc(t,16),n=r.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new ru.asn1.DERInteger({int:0}),new ru.asn1.DERInteger({bigint:this.n}),new ru.asn1.DERInteger({int:this.e}),new ru.asn1.DERInteger({bigint:this.d}),new ru.asn1.DERInteger({bigint:this.p}),new ru.asn1.DERInteger({bigint:this.q}),new ru.asn1.DERInteger({bigint:this.dmp1}),new ru.asn1.DERInteger({bigint:this.dmq1}),new ru.asn1.DERInteger({bigint:this.coeff})]};return new ru.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return fc(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new ru.asn1.DERSequence({array:[new ru.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new ru.asn1.DERNull]}),t=new ru.asn1.DERSequence({array:[new ru.asn1.DERInteger({bigint:this.n}),new ru.asn1.DERInteger({int:this.e})]}),n=new ru.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new ru.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return fc(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(tu),uu="undefined"!=typeof process?null===(su=process.env)||void 0===su?void 0:su.npm_package_version:void 0,hu=function(){function e(e){void 0===e&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new cu(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(pc(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return fc(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.sign=function(e,t,n){try{return fc(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,pc(t),n)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new cu,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=uu,e}(),du={},fu={get exports(){return du},set exports(e){du=e}},pu={};ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",au={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&au.rotl(e,8)|4278255360&au.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=au.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,i=0;n<e.length;n++,i+=8)t[i>>>5]|=e[n]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],r=0;r<4;r++)8*n+6*r<=8*e.length?t.push(ou.charAt(i>>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&t.push((ou.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|ou.indexOf(e.charAt(n))>>>6-2*i);return t}},{get exports(){return pu},set exports(e){pu=e}}.exports=au;var gu={utf8:{stringToBytes:function(e){return gu.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(gu.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},mu=gu,vu=function(e){return null!=e&&(yu(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&yu(e.slice(0,0))}(e)||!!e._isBuffer)};function yu(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}!function(){var e=pu,t=mu.utf8,n=vu,i=mu.bin,r=function(s,o){s.constructor==String?s=o&&"binary"===o.encoding?i.stringToBytes(s):t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):Array.isArray(s)||s.constructor===Uint8Array||(s=s.toString());for(var a=e.bytesToWords(s),l=8*s.length,c=1732584193,u=-271733879,h=-1732584194,d=271733878,f=0;f<a.length;f++)a[f]=16711935&(a[f]<<8|a[f]>>>24)|4278255360&(a[f]<<24|a[f]>>>8);a[l>>>5]|=128<<l%32,a[14+(l+64>>>9<<4)]=l;var p=r._ff,g=r._gg,m=r._hh,v=r._ii;for(f=0;f<a.length;f+=16){var y=c,w=u,b=h,x=d;c=p(c,u,h,d,a[f+0],7,-680876936),d=p(d,c,u,h,a[f+1],12,-389564586),h=p(h,d,c,u,a[f+2],17,606105819),u=p(u,h,d,c,a[f+3],22,-1044525330),c=p(c,u,h,d,a[f+4],7,-176418897),d=p(d,c,u,h,a[f+5],12,1200080426),h=p(h,d,c,u,a[f+6],17,-1473231341),u=p(u,h,d,c,a[f+7],22,-45705983),c=p(c,u,h,d,a[f+8],7,1770035416),d=p(d,c,u,h,a[f+9],12,-1958414417),h=p(h,d,c,u,a[f+10],17,-42063),u=p(u,h,d,c,a[f+11],22,-1990404162),c=p(c,u,h,d,a[f+12],7,1804603682),d=p(d,c,u,h,a[f+13],12,-40341101),h=p(h,d,c,u,a[f+14],17,-1502002290),c=g(c,u=p(u,h,d,c,a[f+15],22,1236535329),h,d,a[f+1],5,-165796510),d=g(d,c,u,h,a[f+6],9,-1069501632),h=g(h,d,c,u,a[f+11],14,643717713),u=g(u,h,d,c,a[f+0],20,-373897302),c=g(c,u,h,d,a[f+5],5,-701558691),d=g(d,c,u,h,a[f+10],9,38016083),h=g(h,d,c,u,a[f+15],14,-660478335),u=g(u,h,d,c,a[f+4],20,-405537848),c=g(c,u,h,d,a[f+9],5,568446438),d=g(d,c,u,h,a[f+14],9,-1019803690),h=g(h,d,c,u,a[f+3],14,-187363961),u=g(u,h,d,c,a[f+8],20,1163531501),c=g(c,u,h,d,a[f+13],5,-1444681467),d=g(d,c,u,h,a[f+2],9,-51403784),h=g(h,d,c,u,a[f+7],14,1735328473),c=m(c,u=g(u,h,d,c,a[f+12],20,-1926607734),h,d,a[f+5],4,-378558),d=m(d,c,u,h,a[f+8],11,-2022574463),h=m(h,d,c,u,a[f+11],16,1839030562),u=m(u,h,d,c,a[f+14],23,-35309556),c=m(c,u,h,d,a[f+1],4,-1530992060),d=m(d,c,u,h,a[f+4],11,1272893353),h=m(h,d,c,u,a[f+7],16,-155497632),u=m(u,h,d,c,a[f+10],23,-1094730640),c=m(c,u,h,d,a[f+13],4,681279174),d=m(d,c,u,h,a[f+0],11,-358537222),h=m(h,d,c,u,a[f+3],16,-722521979),u=m(u,h,d,c,a[f+6],23,76029189),c=m(c,u,h,d,a[f+9],4,-640364487),d=m(d,c,u,h,a[f+12],11,-421815835),h=m(h,d,c,u,a[f+15],16,530742520),c=v(c,u=m(u,h,d,c,a[f+2],23,-995338651),h,d,a[f+0],6,-198630844),d=v(d,c,u,h,a[f+7],10,1126891415),h=v(h,d,c,u,a[f+14],15,-1416354905),u=v(u,h,d,c,a[f+5],21,-57434055),c=v(c,u,h,d,a[f+12],6,1700485571),d=v(d,c,u,h,a[f+3],10,-1894986606),h=v(h,d,c,u,a[f+10],15,-1051523),u=v(u,h,d,c,a[f+1],21,-2054922799),c=v(c,u,h,d,a[f+8],6,1873313359),d=v(d,c,u,h,a[f+15],10,-30611744),h=v(h,d,c,u,a[f+6],15,-1560198380),u=v(u,h,d,c,a[f+13],21,1309151649),c=v(c,u,h,d,a[f+4],6,-145523070),d=v(d,c,u,h,a[f+11],10,-1120210379),h=v(h,d,c,u,a[f+2],15,718787259),u=v(u,h,d,c,a[f+9],21,-343485551),c=c+y>>>0,u=u+w>>>0,h=h+b>>>0,d=d+x>>>0}return e.endian([c,u,h,d])};r._ff=function(e,t,n,i,r,s,o){var a=e+(t&n|~t&i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._gg=function(e,t,n,i,r,s,o){var a=e+(t&i|n&~i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._hh=function(e,t,n,i,r,s,o){var a=e+(t^n^i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._ii=function(e,t,n,i,r,s,o){var a=e+(n^(t|~i))+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._blocksize=16,r._digestsize=16,fu.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var s=e.wordsToBytes(r(t,n));return n&&n.asBytes?s:n&&n.asString?i.bytesToString(s):e.bytesToHex(s)}}();var wu,bu,xu={serialNums:[],key:""};class Au{constructor(e){this.viewport=e,this.encryptInfo=xu,wu.set(this,!0),bu.set(this,setTimeout((()=>{Wn(this,wu,!1,"f"),this.viewport.triggerRender()}),5e3))}verify(e,t){var n;clearTimeout(Yn(this,bu,"f"));const i=new hu;i.setPublicKey(null===(n=this.encryptInfo)||void 0===n?void 0:n.key);const r=i.verify(e,t,du);return Wn(this,wu,r,"f"),this.viewport.triggerRender(),r}getVerified(){return!0}}wu=new WeakMap,bu=new WeakMap;class Tu{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,vertices:0,triangles:0,frametime:0,lodFrametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function i(){return document.createElement("br")}const r=n("0"),s=n("0"),o=n("0"),a=n("0"),l=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(r),this.container.appendChild(i()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(s),this.container.appendChild(i()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(o),this.container.appendChild(i()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(a),this.container.appendChild(i()),this.container.appendChild(n("lodFrametime",!1)),this.container.appendChild(l);const c=()=>{this.state.objects=0,this.state.vertices=0,this.state.triangles=0;for(let t=0;t<e.children.length;t++){e.children[t].traverseVisible((e=>{var t,n,i,r;if("SceneManager"!==e.stype&&this.state.objects++,e.isMesh){const s=e.geometry;s.isGeometry?(this.state.vertices+=(null===(t=s.vertices)||void 0===t?void 0:t.length)||0,this.state.triangles+=(null===(n=s.faces)||void 0===n?void 0:n.length)||0):s.isBufferGeometry&&(this.state.vertices+=(null===(i=s.attributes.position)||void 0===i?void 0:i.count)||0,null!==s.index?this.state.triangles+=s.index.count/3:this.state.triangles+=(null===(r=s.attributes.position)||void 0===r?void 0:r.count)/3||0)}}))}r.innerText=String(this.state.objects),o.innerText=String(this.state.vertices),s.innerText=String(this.state.triangles)};t.objectAdded.add(c),t.objectRemoved.add(c),t.geometryChanged.add(c);t.sceneRendered.add((e=>{this.state.frametime=e,a.innerText=Number(e).toFixed(2)+" ms"}));t.loadRendered.add((e=>{this.state.lodFrametime=e,l.innerText=Number(e).toFixed(2)+" ms"}))}}const Su=new e.Vector4;class Eu extends e.Object3D{constructor(t,n){super();const i=new e.Color("#ff3653"),r=new e.Color("#8adb00"),s=new e.Color("#2c8fff"),o=new e.OrthographicCamera(-2,2,2,-2,0,4);o.position.set(0,0,2);const a=new e.BoxGeometry(.8,.05,.05).translate(.4,0,0),l=new e.Mesh(a,y(i)),c=new e.Mesh(a,y(r)),u=new e.Mesh(a,y(s));c.rotation.z=Math.PI/2,u.rotation.y=-Math.PI/2,this.add(l),this.add(u),this.add(c);const h=new e.Sprite(w(i,"X"));h.userData.type="posX";const d=new e.Sprite(w(r,"Y"));d.userData.type="posY";const f=new e.Sprite(w(s,"Z"));f.userData.type="posZ";const p=new e.Sprite(w(i));p.userData.type="negX";const g=new e.Sprite(w(r));g.userData.type="negY";const m=new e.Sprite(w(s));m.userData.type="negZ",h.position.x=1,d.position.y=1,f.position.z=1,p.position.x=-1,p.scale.setScalar(.8),g.position.y=-1,g.scale.setScalar(.8),m.position.z=-1,m.scale.setScalar(.8),this.add(h),this.add(d),this.add(f),this.add(p),this.add(g),this.add(m);const v=new e.Vector3;function y(t){return new e.MeshBasicMaterial({color:t,toneMapped:!1})}function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=document.createElement("canvas");i.width=64,i.height=64;const r=i.getContext("2d");if(!r)return;r.beginPath(),r.arc(32,32,16,0,2*Math.PI),r.closePath(),r.fillStyle=t.getStyle(),r.fill(),null!==n&&(r.font="24px Arial",r.textAlign="center",r.fillStyle="#000000",r.fillText(n,32,41));const s=new e.CanvasTexture(i);return new e.SpriteMaterial({map:s,toneMapped:!1})}this.render=function(e){this.quaternion.copy(t.quaternion).invert(),this.updateMatrixWorld(),v.set(0,0,1),v.applyQuaternion(t.quaternion),v.x>=0?(h.material.opacity=1,p.material.opacity=.5):(h.material.opacity=.5,p.material.opacity=1),v.y>=0?(d.material.opacity=1,g.material.opacity=.5):(d.material.opacity=.5,g.material.opacity=1),v.z>=0?(f.material.opacity=1,m.material.opacity=.5):(f.material.opacity=.5,m.material.opacity=1);const i=n.offsetWidth-128;e.clearDepth(),e.getViewport(Su),e.setViewport(i,0,128,128),e.render(this,o),e.setViewport(Su.x,Su.y,Su.z,Su.w)}}}const Du=new be,Cu=128;class Iu extends J{constructor(e){super(),this.viewport=e,this.camera=new ee(-1.6,1.6,.8,-.8,0,4),this.camera.position.z=2,this._generateMark()}_generateMark(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"试用版";const t=document.createElement("canvas");t.width=150,t.height=74;const n=t.getContext("2d");if(n){const i=n.createLinearGradient(0,0,t.width,t.height);i.addColorStop(0,"#ff3653"),i.addColorStop(.5,"#8adb00"),i.addColorStop(1,"#2c8fff"),n.fillStyle=i,n.font="bold 32px/1 serif",n.fillText(e,26,46)}const i=new je(t),r=new z({map:i,toneMapped:!1,transparent:!1}),s=new k(new ze(2,1),r);this.add(s)}render(){const{renderer:e,container:t}=this.viewport,n=t.offsetWidth-256,i=t.offsetHeight-Cu;e.clearDepth(),e.getViewport(Du),e.setViewport(n,i,256,Cu),e.render(this,this.camera),e.setViewport(Du.x,Du.y,Du.z,Du.w)}}xe.prototype.computeBoundsTree=function(e){return this.boundsTree=new ws(this,e),this.boundsTree},xe.prototype.disposeBoundsTree=function(){this.boundsTree=null},k.prototype.raycast=function(e,t){if(this.geometry.boundsTree){if(void 0===this.material)return;xs.copy(this.matrixWorld).invert(),bs.copy(e.ray).applyMatrix4(xs);const n=this.geometry.boundsTree;if(!0===e.firstHitOnly){const i=kr(n.raycastFirst(bs,this.material),this,e);i&&t.push(i)}else{const i=n.raycast(bs,this.material);for(let n=0,r=i.length;n<r;n++){const r=kr(i[n],this,e);r&&t.push(r)}}}else As.call(this,e,t)},He.prototype.firstHitOnly=!0;const Mu={needsUpdate:!1};let Bu=0,Ru=0;const Pu=e=>{e instanceof l&&e.dispose()};class Ou{constructor(e){this.clock=new Ge,this.sky=null,this.options=e,this.state={useFreq:1,isPausedRender:!1,isDisposed:!1},this.signals={windowResize:new xo,cameraObjectChange:new xo,sceneChanged:new xo,backgroundChanged:new xo,beforeRender:new xo,sceneRendered:new xo,loadRendered:new xo,tweenUpdate:new xo,hover:new xo,click:new xo,dblClick:new xo,rightClick:new xo,mouseDown:new xo,mouseMove:new xo,mouseUp:new xo,mouseWheel:new xo,keyDown:new xo,keyUp:new xo,modelHover:new xo,modelUnHover:new xo,modelClick:new xo,modelDblClick:new xo,modelRightClick:new xo,poiHover:new xo,poiUnHover:new xo,poiClick:new xo,poiDblClick:new xo,poiRightClick:new xo,selectPosition:new xo,sceneClick:new xo,objectAdded:new xo,objectRemoved:new xo,objectChanged:new xo,geometryChanged:new xo,materialAdded:new xo,materialChanged:new xo,materialRemoved:new xo,cameraChange:new xo,outlineChange:new xo,modelAnimation:new xo,getSceneInfo:new xo},this.scener=new Eo(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new la(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new Qo(e),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.rendererCSS2DHalf=this.rendererManager.rendererCSS2DHalf,this.pmremGenerator=new Me(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new Hl(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Gl(this),this.controls=new tc(this),this.info=new Tu(this.scene,this.signals),this.stats=Cs(),this.mixer=new Ve(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this.selectModel=null,this.selectPoi=null,this._loop=0,this.viewHelper=new Eu(this.camera,this.container),this.license=new Au(this),this.waterMark=new Iu(this),this._initInfo(),this._initStats(),this._signalsEventListenr(),this._containerAddEventListener(this.container),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setSSR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0,intensity:n=1,exponent:i=1.75,distance:r=20,fade:s=0,roughnessFade:o=1,thickness:a=3.5,ior:l=1.75,maxRoughness:c=.1,maxDepthDifference:u=20,blend:h=.95,correction:d=1,correctionRadius:f=1,blur:p=1,blurKernel:g=1,blurSharpness:m=10,jitter:v=0,jitterRoughness:y=2,steps:w=20,refineSteps:b=10,missedRays:x=!1,useNormalMap:A=!0,useRoughnessMap:T=!0,resolutionScale:S=1,velocityResolutionScale:E=1}=e,{effectManager:D}=this;D.effectsNeedsUpddate=!0;const C=D.effectsMap.get(Hl.CONSTANTS.ssrEffect);C.enabled=t;const{effect:I}=C;I.usingBoxProjectedEnvMap=!0,I.intensity=n,I.exponent=i,I.distance=r,I.fade=s,I.roughnessFade=o,I.thickness=a,I.ior=l,I.maxRoughness=c,I.maxDepthDifference=u,I.blend=h,I.correction=d,I.correctionRadius=f,I.blur=p,I.blurKernel=g,I.blurSharpness=m,I.jitter=v,I.jitterRoughness=y,I.steps=w,I.refineSteps=b,I.missedRays=x,I.useNormalMap=A,I.useRoughnessMap=T,I.resolutionScale=S,I.velocityResolutionScale=E,this.triggerRender()}setBloom(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{enabled:n=!0,mipmapBlur:i=!0,radius:r=.85,intensity:s=3,threshold:o=1,smoothing:a=0,scalar:l=2,opacity:c=1,selection:u=[]}=e,{effectManager:h}=this;h.effectsNeedsUpddate=!0;const d=h.effectsMap.get(Hl.CONSTANTS.bloomEffect);d.enabled=n;const{effect:f}=d;f.intensity=s;const{mipmapBlurPass:p,renderTarget:g}=f;p.enabled=i,p.radius=r;const m=f.uniforms.get("map");m&&(m.value=i?p.texture:g.texture),f.luminanceMaterial.threshold=o,f.luminanceMaterial.smoothing=a,f.blendMode.opacity.value=c,null===(t=f.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e instanceof k&&e.material.color&&(e.material.toneMapped=!0,e.material.color.multiplyScalar(1/l))})),f.luminanceMaterial.userData.bloomSelection=[],n&&u.forEach((e=>{e.traverse((e=>{e instanceof k&&e.material.color&&(e.material.toneMapped=!1,e.material.color.multiplyScalar(l),f.luminanceMaterial.userData.bloomSelection.push(e))}))})),this.triggerRender()}setSSAO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0,depthAwareUpsampling:n=!0,samples:i=32,rings:r=7,distanceThreshold:s=.02,distanceFalloff:o=.0025,rangeThreshold:l=3e-4,rangeFalloff:c=1e-4,luminanceInfluence:u=.7,minRadiusScale:h=.33,radius:d=.1,intensity:f=3,bias:p=.004,fade:g=.01,color:m=null,resolutionScale:v=1}=e,{effectManager:y}=this;y.effectsNeedsUpddate=!0;const w=y.passesMap.get(Hl.CONSTANTS.normalPass),b=y.effectsMap.get(Hl.CONSTANTS.ssaoEffect);w.enabled=t,b.enabled=t;const{effect:x}=b,{ssaoMaterial:A}=x;x.depthAwareUpsampling=n,x.luminanceInfluence=u,x.resolution.scale=v,x.intensity=f,A.samples=i,A.rings=r,A.distanceThreshold=s,A.distanceFalloff=o,A.proximityThreshold=l,A.proximityFalloff=c,A.minRadiusScale=h,A.fade=g,A.bias=p,A.radius=d,m&&(x.color=new a(m)),this.triggerRender()}setColorSpace(e){this.renderer.outputEncoding="sRGB"===e?I:u,this.signals.sceneChanged.dispatch()}setToneMapping(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="ACESFilmic",exposure:n=.8}=e,i={None:Xe,Linear:Qe,Reinhard:Ke,Cineon:Ze,ACESFilmic:Ye};this.renderer.toneMapping=i[t],this.renderer.toneMappingExposure=n,this.signals.sceneChanged.dispatch()}setSphereSkyBackground(e){return Fn(this,void 0,void 0,(function*(){const t=Wi(e);if("hdr"===t||"pic"===t){const t=yield(new Es).loadAsync(e);t.mapping=qe,Pu(this.scene.background),this.scene.background=t}else{const t=yield(new Je).loadAsync(e);t.mapping=qe,Pu(this.scene.background),this.scene.background=t}this.signals.backgroundChanged.dispatch()}))}setSkyBackground(e,t){return Fn(this,void 0,void 0,(function*(){const n=yield Mn(e,t);Pu(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}))}setBackgroundColor(e){Pu(this.scene.background),this.scene.background=new a(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){Pu(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new a(e),t),this.signals.backgroundChanged.dispatch()}setBackgroundImage(e){return Fn(this,void 0,void 0,(function*(){const t=new Je,n=yield t.loadAsync(e);this.scene.background=n,this.signals.backgroundChanged.dispatch()}))}setSky(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:n=!0,position:i={x:0,y:0,z:0},scalar:r=45e4,turbidity:s=10,rayleigh:o=3,elevation:a=2,azimuth:l=180,exposure:c=.6}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new Is,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(i.x,i.y,i.z),this.sky.scale.setScalar(r);const u=this.sky.material.uniforms;u.turbidity.value=s,u.rayleigh.value=o,u.mieCoefficient.value=.005,u.mieDirectionalG.value=.7;const h=new t,d=Sn(90-a),f=Sn(l);return h.setFromSphericalCoords(1,d,f),u.sunPosition.value.copy(h),this.sky.userData.toneMapping=this.renderer.toneMapping,this.sky.userData.toneMappingExposure=this.renderer.toneMappingExposure,this.renderer.toneMapping=Ye,this.renderer.toneMappingExposure=c,this.signals.objectAdded.dispatch(),this.sky}closeSky(){if(!this.sky)return!1;const{toneMapping:e,toneMappingExposure:t}=this.sky.userData;return this.renderer.toneMapping=e,this.renderer.toneMappingExposure=t,this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}setEnvironment(){return this.scene.environment=this.pmremGenerator.fromScene(new Ts,.04).texture,this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof We?n=t:Fi(t)?n=e.animations[t]:Hi(t)&&(n=e.animations.find(t)),!n)return;const i=this.mixer.clipAction(n,e);return i.play(),this.clipsSet.add(n),i}stopModelAnimation(e,t){var n;let i;t instanceof We?i=t:Fi(t)?i=e.animations[t]:Hi(t)&&(i=e.animations.find(t)),i&&(null===(n=this.mixer.existingAction(i))||void 0===n||n.stop(),this.mixer.uncacheAction(i,e),this.clipsSet.delete(i))}render(e){return Fn(this,void 0,void 0,(function*(){return yield null==e?void 0:e(),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}))}triggerRender(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.state.useFreq=e}setPauseRender(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Fn(this,void 0,void 0,(function*(){if(this.state.isPausedRender=e,!1===e)return this.render()}))}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(e){if(this.state.useFreq<=0&&!Mu.needsUpdate)return;if(this.state.useFreq>0&&this.state.useFreq--,Mu.needsUpdate&&(Mu.needsUpdate=!1),this.state.isPausedRender)return;Bu=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.effectComposer.render();const t=this.scene.matrixWorldAutoUpdate;this.scene.matrixWorldAutoUpdate=!1,this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.scene,this.camera),this.rendererCSS2DHalf&&this.rendererManager.internalOptions.enableRenderCss2DHalf&&this.rendererCSS2DHalf.render(this.scene,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.scene,this.camera),this.scene.matrixWorldAutoUpdate=t,this.options.showViewHelper&&this.camera===this.cameraManager.mainCamera&&this.viewHelper.render(this.renderer),this.license.getVerified()||this.waterMark.render(),this.postRender.forEach((t=>t(e))),Ru=performance.now(),this.signals.sceneRendered.dispatch(Ru-Bu)}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),pn.update()&&this.signals.tweenUpdate.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(e),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),i=this.renderer.domElement.getBoundingClientRect();return{left:Math.round(i.left+i.width/2*(n.x+1)),top:Math.round(i.top+i.height/2*(1-n.y))}}getPositionByOffset(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;const i=new t(0,0,0),r=new t(0,0,0),s=this.renderer.domElement.getBoundingClientRect();r.set(e.offsetX/s.width*2-1,-e.offsetY/s.height*2+1,n),r.unproject(this.camera),r.sub(this.camera.position).normalize();const o=r.distanceTo(this.camera.position);return i.copy(this.camera.position).add(r.multiplyScalar(o)),i}getIntersects(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scener.intersectsList.getAll(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{isFilterHideObject:i=!0}=n,r=this.container.getBoundingClientRect();let s={offsetX:0,offsetY:0};if(e instanceof MouseEvent)s={offsetX:e.clientX-r.left,offsetY:e.clientY-r.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];s={offsetX:t.clientX-r.left,offsetY:t.clientY-r.top}}else s=e;const o=new M;o.set(s.offsetX/r.width*2-1,-s.offsetY/r.height*2+1);const a=new He;a.setFromCamera(o,this.camera);let l=[];return l=ji(t)?a.intersectObjects(t,!0):a.intersectObject(t,!0),i?l.filter((e=>{let{object:t}=e;return Cn(t)})):l}rayClash(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.camera.position,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(0,-1,0),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.scener.intersectsList.meshOfModelList;const r=new He;return r.set(e,n),ji(i)?r.intersectObjects(i,!0):r.intersectObject(i,!0)}setHoverEnabled(e){this.options.hoverEnabled=e}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),pn.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0}_signalsEventListenr(){const e=()=>{const{offsetWidth:e,offsetHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.rendererCSS2DHalf&&this.rendererCSS2DHalf.setSize(e,t),this.triggerRender()};setTimeout((()=>e())),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e),this.signals.sceneChanged.add((()=>this.triggerRender())),this.signals.backgroundChanged.add((()=>this.triggerRender())),this.signals.objectAdded.add((()=>this.triggerRender())),this.signals.objectRemoved.add((()=>this.triggerRender())),this.signals.objectChanged.add((()=>this.triggerRender())),this.signals.materialAdded.add((()=>this.triggerRender())),this.signals.materialRemoved.add((()=>this.triggerRender())),this.signals.materialChanged.add((()=>this.triggerRender())),this.signals.geometryChanged.add((()=>this.triggerRender())),this.signals.cameraChange.add((()=>this.triggerRender())),this.signals.tweenUpdate.add((()=>this.triggerRender())),this.signals.modelAnimation.add((()=>this.triggerRender()));this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:i,hideColor:r,edgeThickness:s,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this;a.effectsNeedsUpddate=!0;const l=a.effectsMap.get(Hl.CONSTANTS.outlineEffect),c=t.length>0;l.enabled=c;const{effect:u}=l,{uniforms:h}=u,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof k&&d.push(e)}))})),u.selection.set(d),u.blur=s>0,u.blurPass.kernelSize=s;const f=h.get("visibleEdgeColor"),p=h.get("hiddenEdgeColor"),g=h.get("edgeStrength");f&&f.value.set(i),p&&p.value.set(r),g&&(g.value=o),this.triggerRender()}))}_containerAddEventListener(e){const t=[0,0];let n=null;const i=r=>{var s,o;this.signals.mouseUp.dispatch(r);const a=r.offsetX-(null!==(s=null==n?void 0:n.offsetX)&&void 0!==s?s:0),l=r.offsetY-(null!==(o=null==n?void 0:n.offsetY)&&void 0!==o?o:0);if(Math.abs(a)>2||Math.abs(l)>2)return t[0]=0,void(t[1]=0);setTimeout((()=>{0!==t[0]&&0===t[1]&&(0===r.button?(this.signals.click.dispatch(r),this._triggerSceneEventInAllObject("click",r)):2===r.button&&(this.signals.rightClick.dispatch(r),this._triggerSceneEventInAllObject("rightClick",r))),t[0]=0,t[1]=0}),300),e.removeEventListener("mouseup",i,!1)};let r=!1,s=null,o=null;const a=[0,0],l=e=>{var t,n;s&&clearTimeout(s);const i=()=>{r=!1,a[0]=0,a[1]=0},l=e.changedTouches[0].clientX-(null!==(t=null==o?void 0:o.changedTouches[0].clientX)&&void 0!==t?t:0),c=e.changedTouches[0].clientY-(null!==(n=null==o?void 0:o.changedTouches[0].clientY)&&void 0!==n?n:0);Math.abs(l)>2||Math.abs(c)>2?i():r?(i(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):setTimeout((()=>{0!==a[0]&&0===a[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==a[0]&&0!==a[1]&&a[1]-a[0]<=300&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)),i()}),300)};e.addEventListener("mousedown",(r=>{n=r,this.signals.mouseDown.dispatch(r),0===t[0]?t[0]=performance.now():0===t[1]&&(t[1]=performance.now()),e.addEventListener("mouseup",i,!1)}),!1),e.addEventListener("mousemove",(e=>{this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e)}),!1),e.addEventListener("dblclick",(e=>{this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)}),!1),e.addEventListener("wheel",(e=>{this.signals.mouseWheel.dispatch(e)}),{passive:!0}),e.addEventListener("touchstart",(t=>{0===a[0]?a[0]=performance.now():0===a[1]&&(a[1]=performance.now()),o=t,s&&clearTimeout(s),s=setTimeout((()=>{r=!0}),800),e.addEventListener("touchend",l,{once:!0})}),{passive:!0}),e.addEventListener("contextmenu",(e=>e.preventDefault()),!1),document.addEventListener("keydown",(e=>{this.signals.keyDown.dispatch(e)}),!1),document.addEventListener("keyup",(e=>{this.signals.keyUp.dispatch(e)}),!1)}_triggerSceneEventInAllObject(e,t){const n=this.getIntersects(t,this.scener.intersectsList.getAll());if(0===n.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void this.signals.sceneClick.dispatch({type:e,event:t});const i={object:null,type:null,point:null},r=[],s=[];function o(e){return e.parent?"Model"===e.parent.stype?e.parent:o(e.parent):void 0}n.forEach((e=>{if(e.object.parent instanceof Gu){const t=e.object.parent;i.object||(i.type="Poi",i.object=e.object,i.point=e.point);-1===r.findIndex((e=>e.poi.uuid===t.uuid))&&r.push({poi:t,sourceData:e})}else if(e.object instanceof J){const t=o(e.object);t&&(i.object||(i.type="Model",i.object=e.object,i.point=e.point),s.push({model:t,sourceData:e}))}})),"click"===e&&i.point&&this.signals.selectPosition.dispatch(i.point);const a=e.slice(0,1).toUpperCase()+e.slice(1),l=e=>{var n;const{model:r}=e[0];if(r)if("Hover"===a)(null===(n=this.selectModel)||void 0===n?void 0:n.uuid)!==r.uuid&&(this.signals.modelHover.dispatch({target:r,currentTarget:i.object,intersects:e,event:t}),this.selectModel=r);else{let n=null;"Click"===a?(n=r.onClick,r.dispatchEvent({type:"click"})):"RightClick"===a?(n=r.onRightClick,r.dispatchEvent({type:"rightClick"})):"DblClick"===a&&(n=r.onDblClick,r.dispatchEvent({type:"dblClick"})),n?n(r):r.isEventPropagation=!0,r.isEventPropagation&&(this.signals[`model${a}`].dispatch({target:r,currentTarget:i.object,intersects:e,event:t}),r.isEventPropagation=!1)}},c=e=>{var n;const{poi:i}=e[0];if(i)if("Hover"===a)(null===(n=this.selectPoi)||void 0===n?void 0:n.uuid)!==i.uuid&&(this.signals.poiHover.dispatch({target:i,event:t}),this.selectPoi=i);else{let e=null;"Click"===a?(e=i.onClick,i.dispatchEvent({type:"click"})):"RightClick"===a?(e=i.onRightClick,i.dispatchEvent({type:"rightClick"})):"DblClick"===a&&(e=i.onDblClick,i.dispatchEvent({type:"dblClick"})),e?e(i):i.isEventPropagation=!0,i.isEventPropagation&&(this.signals[`poi${a}`].dispatch({target:i,event:t}),i.isEventPropagation=!1)}};"Model"===i.type?l(s):"Poi"===i.type&&c(r)}}class _u extends k{constructor(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"BaseMesh";super(e,t);const{id:r,name:s="",level:o={max:null,min:null},visible:a=!0,position:l={x:0,y:0,z:0},rotation:c={x:0,y:0,z:0},scale:u={x:1,y:1,z:1},userData:h={}}=n;if(void 0===r)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=r,this.name=s,this.stype=i,this.level=o,this.visible=null==a||a,this.handleHide=!a,this.position.set(l.x,l.y,l.z),this.rotation.set(c.x,c.y,c.z),this.scale.set(u.x,u.y,u.z),this.castShadow=!0,this.receiveShadow=!0,this.userData=h,this.isEventPropagation=!1,this.autoUpdate=!1}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0,Mu.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0,Mu.needsUpdate=!0}setMove(e,t,n,i){return Ki(this.position,wn(e),t,n,i)}setRotate(e,t,n,i){const s=bn(e),o=this.quaternion.clone(),a=(new r).setFromEuler(s);return Ki({t:0},{t:1},t,((e,t)=>{let{t:i}=e;this.quaternion.slerpQuaternions(o,a,i),null==n||n(this.rotation,t)}),i)}setScale(e,t,n,i){return Ki(this.scale,wn(e),t,n,i)}getBoundingBox(){return new i(new t,new t).setFromObject(this)}eventPropagation(){this.isEventPropagation=!0}sClone(e){return new _u(this.geometry,this.material,{id:`clone_${Yi()}`}).sCopy(this,e)}sCopy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.stype=e.stype,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.geometry=e.geometry,this.material=e.material,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,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.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++)e.children[t]instanceof ku||e.children[t]instanceof _u?this.add(e.children[t].sClone()):this.add(e.children[t].clone());return this}}const Lu={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class ku extends J{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BaseObject3D";super();const{id:n,name:i="",level:r={max:null,min:null},visible:s=!0,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},userData:c={},onLoad:u,onClick:h,onDblClick:d,onRightClick:f}=Object.assign(Object.assign({},Lu),e);if(void 0===n)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=n,this.name=i,this.stype=t,this.level=r,this.visible=null==s||s,this.handleHide=!s,this.isEventPropagation=!1,this.position.set(o.x,o.y,o.z),this.rotation.set(a.x,a.y,a.z),this.scale.set(l.x,l.y,l.z),this.castShadow=!0,this.receiveShadow=!0,this.userData=c,this.autoUpdate=!1,this.onLoad=(null==u?void 0:u.bind(this))||null,this.onClick=(null==h?void 0:h.bind(this))||null,this.onDblClick=(null==d?void 0:d.bind(this))||null,this.onRightClick=(null==f?void 0:f.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0,Mu.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0,Mu.needsUpdate=!0}setMove(e,t,n,i){return Ki(this.position,wn(e),t,n,i)}setRotate(e,t,n,i){const s=bn(e),o=this.quaternion.clone(),a=(new r).setFromEuler(s);return Ki({t:0},{t:1},t,((e,t)=>{let{t:i}=e;this.quaternion.slerpQuaternions(o,a,i),null==n||n(this.rotation,t)}),i)}setScale(e,t,n,i){return Ki(this.scale,wn(e),t,n,i)}sClone(e){return new ku({id:`clone_${Yi()}`}).sCopy(this,e)}sCopy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.stype=e.stype,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.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.userData=JSON.parse(JSON.stringify(e.userData)),this.animations=e.animations,!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];n instanceof ku||n instanceof _u?this.add(n.sClone()):this.add(n.clone())}return this}getBoundingBox(){return new i(new t,new t).setFromObject(this)}getSpaceAttribute(){return En(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}syncSpaceAttribute(e){e instanceof ku?Dn(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]):yn("In soonspacejs: BaseObject3D 对象原型方法 'syncSpaceAttribute' 第一个参数对象类型错误!")}}class Nu extends ku{constructor(e){super(e,"Group")}showAllChild(){this.children.forEach((e=>{e instanceof ku&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof ku&&e.hide()}))}}class Uu extends ku{constructor(e){super(e,"PluginObject")}}class Fu extends ku{constructor(e){super(e,"PoiNode");const{type:t,element:n}=e;this.elementType=t,this.element=n,this.create(t)}create(e){"2D"===e||"2d"===e?this._create2D():"2.5D"===e||"2.5d"===e?this._create2DHalf():"3D"!==e&&"3d"!==e||this._create3D()}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0}getBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;e=e<=0?50:e;const n=new t,r=new t,s=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(s),r.add(s),new i(n,r)}_create2D(){this.add(new Do(this.element))}_create2DHalf(){this.add(new Vo(this.element))}_create3D(){this.add(new ko(this.element))}}class ju extends ku{constructor(e){super(e,"Model");const{format:t}=e;this.formatType=t}setEnvMap(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mn(e,t).then((e=>{this.traverse((t=>{if(t instanceof k&&t.material instanceof F){const{reflectivity:i=.5}=n;t.material.envMap=e,t.material.envMapIntensity=i,Mu.needsUpdate=!0}}))}))}sClone(e){return new ju({id:`${this.sid}_clone`,url:"",format:this.formatType}).sCopy(this,e)}}const zu={position:{x:0,y:0,z:0},scale:{x:16,y:16,z:1},stype:"Icon"};class Hu extends $e{constructor(e,t){super(e);const{position:n,scale:i,stype:r}=Object.assign(Object.assign({},zu),t);this.stype=r,this.position.set(n.x,n.y,n.z),this.scale.set(i.x,i.y,i.z),this.renderOrder=1}}class Gu extends ku{constructor(e,t){super(t,"Poi");const{name:n,type:i="2.5d",nameScale:r={x:16,y:16,z:1}}=t;this.iconType=i,this.icon=this._createIcon(e);const s={position:{x:0,y:10,z:0},name:n,scale:r};this.text=this.name?this._createText(s):null,this.renderOrder=11}getBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;e=e<=0?50:e;const n=new t,r=new t,s=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(s),r.add(s),new i(n,r)}sClone(e,t){return new Gu(this.icon.material,{id:`${this.sid}_clone`,url:"",type:null!=t?t:this.iconType,name:this.name}).sCopy(this,e)}_createIcon(e){const t=new Hu(this._computeMaterialSizeAttenuation(e));return this.add(t),t}_createText(e){const t=this._createTextMaterial(e),n=new Hu(this._computeMaterialSizeAttenuation(t),e);return this.add(n),n}_createTextMaterial(e){const t=this._createTextCanvas(e.name||""),n=new l(t);n.flipY=!0,n.version+=1;return new et({map:n,depthTest:!0})}_createTextCanvas(e,t){const n=256,i=document.createElement("canvas");i.width=n,i.height=n;const r=i.getContext("2d"),{fontFamily:s,fontSize:o,color:a,textAlign:l,textBaseline:c}=Object.assign(Object.assign({},{fontFamily:"Microsoft YaHei",fontSize:32,color:"#fff",textAlign:"center",textBaseline:"bottom"}),t);return r&&(r.save(),r.font=o+"px "+s,r.textAlign=l,r.textBaseline=c,r.shadowColor="black",r.strokeStyle="black",r.lineWidth=3,r.fillStyle=a,r.strokeText(e,128,128),r.fillText(e,128,128),r.restore()),i}_computeMaterialSizeAttenuation(e){return"2D"===this.iconType||"2d"===this.iconType?e.sizeAttenuation=!1:"2.5D"!==this.iconType&&"2.5d"!==this.iconType||(e.sizeAttenuation=!0),e}}class Vu extends _u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Point";const{radius:n=10,color:i=16777215,opacity:r=1,gradient:s}=e;super(function(e){return new tt(e,32,32)}(n),function(e,t,n){return new z({color:e,opacity:t,transparent:t<1,map:Bn(n)})}(i,r,s),e,t)}setOptions(e){const{color:t,opacity:n,radius:i,position:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&(this.geometry=new tt(i,32,32)),r&&this.position.copy(wn(r)),s&&(o.map=Bn(s)),o.needsUpdate=!0,Mu.needsUpdate=!0}}class Yu extends Vu{constructor(e){super(e,"Node"),this.graphs=e.graphs}}class Wu extends _u{constructor(e){const{radius:t=50,color:n=16777215,opacity:i=1,gradient:r}=e;super(function(e){return new nt(e,64)}(t),function(e,t,n){return new z({color:e,opacity:t,transparent:t<1,side:d,map:Bn(n)})}(n,i,r),e,"Circle"),this.rotation.set(Math.PI/2,0,0)}setOptions(e){const{color:t,opacity:n,radius:i,position:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&(this.geometry=new nt(i,64)),r&&this.position.copy(wn(r)),s&&(o.map=Bn(s)),o.needsUpdate=!0,Mu.needsUpdate=!0}}class Xu extends _u{constructor(e){const{start:n,end:i,imgUrl:r,width:s=20,color:o=65280,opacity:a=1,animation:l=!1,passable:c=0,restrict:u=0}=e,h=wn(n),f=wn(i),p=h.distanceTo(f);super(function(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new t(0,1,0);const s=i/2,o=new t,a=new t;o.subVectors(n,e),o.normalize(),a.crossVectors(o,r),0===a.length()&&a.crossVectors(o,new t(0,0,-1));const l=new t(a.x*s,a.y*s,a.z*s),c=new t(-a.x*s,-a.y*s,-a.z*s),u=new t;u.addVectors(e,l);const h=new t;h.addVectors(e,c);const d=new t;d.addVectors(n,c);const f=new t;f.addVectors(n,l);const p=new xe;return p.setAttribute("position",new it([u.x,u.y,u.z,h.x,h.y,h.z,d.x,d.y,d.z,d.x,d.y,d.z,f.x,f.y,f.z,u.x,u.y,u.z],3)),p.setAttribute("uv",new it([0,0,1,0,1,1,1,1,0,1,0,0],2)),p}(h,f,s),function(e,t,n,i,r,s){const o=new z({color:n,side:d,transparent:void 0!==i&&i<1,opacity:i});let a;return r&&(a=(new Je).load(r,(n=>{a.repeat.set(1,e/(t*(n.image.height/n.image.width))*.63*(n.image.height/n.image.height)),o.color.set(16777215)})),a.wrapS=D,a.wrapT=D,a.flipY=!0,a.matrixAutoUpdate=!0,Ui(s)&&s?Ki(a.offset,{y:-1,x:0},{repeat:!0,duration:500}):zi(s)&&Ki(a.offset,{y:-1,x:0},Object.assign(Object.assign({},s),{repeat:!0})),o.map=a),o}(p,s,o,a,r,l),e,"Link"),this.passable=c,this.restrict=u}}class Qu extends ku{constructor(e){super(e,"Topology");const{type:t="line"}=e;this.topologyType=t,this.nodes=[],this.links=[],this.info=e,this.create()}create(){var e,t;const{nodes:n,renderLink:i=!0,linkWidth:r=20,linkColor:s=65280,renderNode:o=!0,nodeColor:a=255,nodeRadius:l=r/2,imgUrl:c,animation:u=!1}=this.info,h=[];for(const d of n){const n=this.createNode(Object.assign(Object.assign({},d),{radius:l,color:a}));if(!1===o&&n.hide(),this.nodes.push(n),!c&&i){const n=ji(s)?s[null===(e=d.graphs[0])||void 0===e?void 0:e.passable]?s[null===(t=d.graphs[0])||void 0===t?void 0:t.passable]:s[0]:s;!o&&this.createCircle({id:`${d.id}_circle`,name:`${d.name||d.id}_circle`,position:d.position,radius:r/2,color:n})}if(i)for(let e=0;e<d.graphs.length;e++){const{linkInfo:t,targetNodeId:n,passable:i,restrict:o}=d.graphs[e],{id:a,name:l}=t,f=this.info.nodes.find((e=>e.id===n));if(!h.includes(a)&&f){h.push(a);const e=ji(s)?s[i]?s[i]:s[0]:s,t=this.createLink({id:a,name:l,start:d.position,end:f.position,width:r,color:e,imgUrl:c,opacity:c?.99:1,animation:u,passable:i,restrict:o,userData:{startNodeId:d.id,endNodeId:f.id}});this.links.push(t)}}}}createNode(e){const t=new Yu(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new Wu(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new Xu(Object.assign({},e));return this.add(t),t}resetNodes(e){const{renderLink:t=!0,linkWidth:n=20,linkColor:i=65280,renderNode:r=!0,nodeColor:s=255,nodeRadius:o=n/2,imgUrl:a,animation:l=!1}=this.info,c=[],u=[...this.info.nodes];this.info.nodes=[...e];const h=[];for(let t=0;t<u.length;t++){const n=e.find((e=>e.id===u[t].id));n&&wn(n.position).equals(wn(u[t].position))||h.push(u[t])}for(let e=0;e<h.length;e++){const t=this.nodes.findIndex((t=>h[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const d=[];for(let t=0;t<e.length;t++){const n=u.find((n=>n.id===e[t].id));n&&wn(n.position).equals(wn(e[t].position))||d.push(e[t])}for(let e=0;e<d.length;e++){const t=this.createNode(Object.assign(Object.assign({},d[e]),{radius:o,color:s}));this.nodes.push(t)}this.remove(...this.links),this.links.length=0;for(const r of e)if(t)for(let e=0;e<r.graphs.length;e++){const{linkInfo:t,targetNodeId:s,passable:o,restrict:u}=r.graphs[e],{id:h,name:d}=t,f=this.info.nodes.find((e=>e.id===s));if(!c.includes(h)&&f){c.push(h);const e=ji(i)?i[o]?i[o]:i[0]:i,t=this.createLink({id:h,name:d,start:r.position,end:f.position,width:n,color:e,imgUrl:a,opacity:a?.99:1,animation:l,passable:o,restrict:u});this.links.push(t)}}}getLength(){let e=0;for(let t=1;t<this.nodes.length;t++)e+=this.nodes[t].position.distanceTo(this.nodes[t-1].position);return e}}function Ku(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t(0,1,0);const r=n/2,s=new xe;let o=[],a=[];if(e.length<2)return s;for(let n=0;n<e.length-1;n++){const s=wn(e[n]),l=wn(e[n+1]),c=new t,u=new t;c.subVectors(l,s),c.normalize(),u.crossVectors(c,i);const h=new t(u.x*r,u.y*r,u.z*r),d=new t(-u.x*r,-u.y*r,-u.z*r),f=new t;f.addVectors(s,h);const p=new t;p.addVectors(s,d);const g=new t;g.addVectors(l,d);const m=new t;m.addVectors(l,h),o=[...o,f.x,f.y,f.z,p.x,p.y,p.z,g.x,g.y,g.z,g.x,g.y,g.z,m.x,m.y,m.z,f.x,f.y,f.z],a=[...a,0,0,1,0,1,1,1,1,0,1,0,0]}return s.setAttribute("position",new it(o,3)),s.setAttribute("uv",new it(a,2)),s}class Zu extends _u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Line";const{points:n,width:i=20,color:r=16777215,opacity:s=1,gradient:o}=e;super(Ku(n,i),function(e,t,n){return new z({color:e,side:d,transparent:t<1,opacity:t,map:Bn(n)})}(r,s,o),e,t),this.params=e,this.points=n,this.frustumCulled=!1}setOptions(e){var t;const{color:n,opacity:i,points:r,width:s,gradient:o}=e;this.points=r;const l=this.material;n&&(l.color=new a(n)),i&&(l.opacity=i),o&&(l.map=Bn(o)),r&&s?this.geometry=Ku(r,s):r?this.geometry=Ku(r,null!==(t=this.params.width)&&void 0!==t?t:20):s&&(this.geometry=Ku(this.points,s)),l.needsUpdate=!0,Mu.needsUpdate=!0}}function qu(e){const t=[];for(let n=0;n<e.length;n++)t.push(new M(e[n].x,e[n].z));return t.length>2?new rt(new st(t)):new xe}class Ju extends _u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Polygon";const{yHeight:n,points:i,color:r=16777215,opacity:s=1,gradient:o}=e;super(qu(i),function(e,t,n){return new z({color:e,opacity:t,transparent:t<1,side:d,map:Bn(n)})}(r,s,o),e,t),this.points=i,this.position.set(0,n,0),this.rotation.set(Math.PI/2,0,0)}setOptions(e){const{color:t,opacity:n,yHeight:i,points:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&this.position.set(0,i,0),r&&(this.geometry=qu(r)),s&&(o.map=Bn(s)),o.needsUpdate=!0,Mu.needsUpdate=!0}}class $u extends ku{constructor(e){super(e,"Canvas3D"),this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:i=[],circles:r=[]}=e;for(let e=0;e<t.length;e++)this.createPoint(t[e]);for(let e=0;e<n.length;e++)this.createLine(n[e]);for(let e=0;e<i.length;e++)this.createPolygon(i[e]);for(let e=0;e<r.length;e++)this.createCircle(r[e])}createPoint(e){const t=new Vu(e);return this.add(t),Mu.needsUpdate=!0,t}getPoint(e){return this.getChildForType("Point",e)}removePoint(e){const t=this.getPoint(e);t&&this.remove(t),Mu.needsUpdate=!0}createLine(e){const t=new Zu(e);return this.add(t),Mu.needsUpdate=!0,t}getLine(e){return this.getChildForType("Line",e)}removeLine(e){const t=this.getLine(e);t&&this.remove(t),Mu.needsUpdate=!0}createPolygon(e){const t=new Ju(e);return this.add(t),Mu.needsUpdate=!0,t}getPolygon(e){return this.getChildForType("Polygon",e)}removePolygon(e){const t=this.getPolygon(e);t&&this.remove(t),Mu.needsUpdate=!0}createCircle(e){const t=new Wu(e);return this.add(t),Mu.needsUpdate=!0,t}getCircle(e){return this.getChildForType("Circle",e)}removeCircle(e){const t=this.getCircle(e);t&&this.remove(t),Mu.needsUpdate=!0}getChildForType(e,t){for(let n=0;n<this.children.length;n++)if(this.children[n].stype===e&&this.children[n].sid===t)return this.children[n];return null}}class eh extends _u{constructor(e,t,n){super(e,t,n,"Ground")}}var th=Object.freeze({__proto__:null,BaseMesh:_u,BaseObject3D:ku,Canvas3D:$u,Circle:Wu,Ground:eh,Group:Nu,Icon:Hu,Line:Zu,Link:Xu,Model:ju,Node:Yu,PluginObject:Uu,Poi:Gu,PoiNode:Fu,Point:Vu,Polygon:Ju,Topology:Qu});class nh{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,-4.48815e-7,.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,9.07581e-7,1.12813,.997866,-8.96716e-7,.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,8.79224e-7,.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,6.55682e-7,.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,4.62391e-7,.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,3.04092e-7,.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,1.73682e-7,.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,7.78271e-8,.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,-6.27338e-7,.0306409,1.97672e-8,99168e-8,-158573e-10,.0314638,4.99803e-7,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,2.37499e-8,-9.99999e-8,282592e-10,1.14596e-10,100292e-11,-166369e-11,250354e-9,6.77492e-9,350752e-11,-637769e-11,357289e-9,6.31655e-8,826445e-11,-174689e-10,516179e-9,3.1851e-7,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],t=[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,5.45037e-10,0,0,.999994,2.85095e-9,0,0,.999989,1.26931e-8,0,0,.999973,4.89938e-8,0,0,.999947,1.66347e-7,0,0,.999894,5.02694e-7,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,1.15855e-10,0,0,.999996,6.6947e-10,0,0,.999991,3.30863e-9,0,0,.999983,1.41737e-8,0,0,.999968,5.32626e-8,0,0,.99994,1.77431e-7,0,0,.999891,5.28835e-7,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,2.22338e-10,0,0,.999995,1.0967e-9,0,0,.999991,4.82132e-9,0,0,.999981,1.89434e-8,0,0,.999967,6.67716e-8,0,0,.999938,2.12066e-7,0,0,.999886,6.0977e-7,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,1.01739e-10,0,0,.999997,4.70132e-10,0,0,.999993,2.00436e-9,0,0,.999988,7.83682e-9,0,0,.999979,2.80338e-8,0,0,.999962,9.17033e-8,0,0,.999933,2.74514e-7,0,0,.999881,7.53201e-7,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,2.51859e-10,0,0,.999996,9.96192e-10,0,0,.999992,3.74531e-9,0,0,.999986,1.32022e-8,0,0,.999975,4.33315e-8,0,0,.999959,1.31956e-7,0,0,.999927,3.72249e-7,0,0,.999871,9.72461e-7,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,1.79597e-10,0,0,.999997,6.02367e-10,0,0,.999994,2.06835e-9,0,0,.99999,6.94952e-9,0,0,.999984,2.23363e-8,0,0,.999972,6.78578e-8,0,0,.999952,1.93571e-7,0,0,.999919,5.16594e-7,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,1.14608e-10,0,0,.999998,2.10507e-10,0,0,.999997,4.99595e-10,0,0,.999995,1.39897e-9,0,0,.999994,4.19818e-9,0,0,.999988,1.27042e-8,0,0,.999979,3.75153e-8,0,0,.999965,1.06206e-7,0,0,.999945,2.85381e-7,0,0,.999908,7.23611e-7,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,2.86798e-10,0,0,1,2.86877e-10,0,0,1,2.88094e-10,0,0,1,2.93506e-10,0,0,1,3.09262e-10,0,0,.999999,3.48593e-10,0,0,.999999,4.44582e-10,0,0,.999998,6.88591e-10,0,0,.999996,1.34391e-9,0,0,.999993,3.17438e-9,0,0,.999989,8.35609e-9,0,0,.999983,2.28677e-8,0,0,.999974,6.23361e-8,0,0,.999959,1.65225e-7,0,0,.999936,4.19983e-7,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,1.68222e-7,.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,1.09018e-9,0,0,1,1.0904e-9,0,0,1,1.09393e-9,0,0,1,1.1095e-9,0,0,1,1.154e-9,0,0,1,1.26089e-9,0,0,.999999,1.5059e-9,0,0,.999997,2.07899e-9,0,0,.999994,3.48164e-9,0,0,.999993,7.05728e-9,0,0,.999987,1.63692e-8,0,0,.999981,4.06033e-8,0,0,.999969,1.0245e-7,0,0,.999953,2.55023e-7,0,0,.999925,6.1511e-7,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,3.54014e-9,0,0,1,3.54073e-9,0,0,1,3.54972e-9,0,0,1,3.58929e-9,0,0,1,3.70093e-9,0,0,.999999,3.96194e-9,0,0,.999998,4.53352e-9,0,0,.999997,5.78828e-9,0,0,.999994,8.63812e-9,0,0,.999991,1.53622e-8,0,0,.999985,3.16356e-8,0,0,.999977,7.12781e-8,0,0,.999964,1.66725e-7,0,0,.999945,3.90501e-7,0,0,.999912,8.95622e-7,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,1.0153e-8,0,0,1,1.01544e-8,0,0,1,1.01751e-8,0,0,1,1.02662e-8,0,0,1,1.0521e-8,0,0,.999999,1.11049e-8,0,0,.999999,1.23408e-8,0,0,.999996,1.4924e-8,0,0,.999992,2.04471e-8,0,0,.999989,3.26539e-8,0,0,.99998,6.03559e-8,0,0,.999971,1.23936e-7,0,0,.999955,2.69058e-7,0,0,.999933,5.93604e-7,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,2.2038e-7,.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,2.63344e-8,0,0,1,2.63373e-8,0,0,1,2.63815e-8,0,0,1,2.65753e-8,0,0,1,2.71132e-8,0,0,.999999,2.83279e-8,0,0,.999997,3.0833e-8,0,0,.999995,3.58711e-8,0,0,.999992,4.61266e-8,0,0,.999985,6.7574e-8,0,0,.999977,1.1358e-7,0,0,.999966,2.13657e-7,0,0,.999948,4.31151e-7,0,0,.999923,8.96656e-7,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,6.28647e-8,0,0,1,6.28705e-8,0,0,1,6.29587e-8,0,0,1,6.33441e-8,0,0,.999999,6.44087e-8,0,0,.999998,6.67856e-8,0,0,.999997,7.15889e-8,0,0,.999995,8.09577e-8,0,0,.999989,9.92764e-8,0,0,.999983,1.35834e-7,0,0,.999974,2.10482e-7,0,0,.999959,3.65215e-7,0,0,.999939,6.86693e-7,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,1.39968e-7,0,0,1,1.39979e-7,0,0,1,1.40145e-7,0,0,1,1.4087e-7,0,0,.999999,1.42865e-7,0,0,.999998,1.47279e-7,0,0,.999997,1.56057e-7,0,0,.999992,1.7276e-7,0,0,.999989,2.04352e-7,0,0,.99998,2.6494e-7,0,0,.999969,3.83435e-7,0,0,.999953,6.18641e-7,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,2.9368e-7,0,0,1,2.937e-7,0,0,1,2.93998e-7,0,0,1,2.95298e-7,0,0,.999999,2.98865e-7,0,0,.999998,3.067e-7,0,0,.999995,3.22082e-7,0,0,.999992,3.50767e-7,0,0,.999986,4.03538e-7,0,0,.999976,5.01372e-7,0,0,.999964,6.8562e-7,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,5.85473e-7,0,0,1,5.85507e-7,0,0,1,5.8602e-7,0,0,.999999,5.88259e-7,0,0,.999999,5.94381e-7,0,0,.999998,6.07754e-7,0,0,.999995,6.33729e-7,0,0,.99999,6.8137e-7,0,0,.999984,7.67003e-7,0,0,.999973,9.21212e-7,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,8.8288e-7,.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],n=new Float32Array(e),i=new Float32Array(t);ot.LTC_FLOAT_1=new we(n,64,64,o,V,at,E,E,A,w,1),ot.LTC_FLOAT_2=new we(i,64,64,o,V,at,E,E,A,w,1),ot.LTC_FLOAT_1.needsUpdate=!0,ot.LTC_FLOAT_2.needsUpdate=!0;const r=new Uint16Array(e.length);e.forEach((function(e,t){r[t]=Y.toHalfFloat(e)}));const s=new Uint16Array(t.length);t.forEach((function(e,t){s[t]=Y.toHalfFloat(e)})),ot.LTC_HALF_1=new we(r,64,64,o,G,at,E,E,A,w,1),ot.LTC_HALF_2=new we(s,64,64,o,G,at,E,E,A,w,1),ot.LTC_HALF_1.needsUpdate=!0,ot.LTC_HALF_2.needsUpdate=!0}}class ih{constructor(e,t,n){this.type=e,this.scene=n,this.viewport=t}createGroup(e,t){const n=new Nu(e);return null!==t&&this.viewport.scener.addObject(n,null!=t?t:this.scene),n}clear(){this.getAll().forEach((e=>{this.viewport.scener.removeObject(e)}))}getAll(){const e=[];return this.scene.traverse((t=>{((t instanceof ku||t instanceof _u)&&zi(t)&&t.stype===this.type||zi(t)&&t.userData.stype===this.type)&&e.push(t)})),e}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class rh extends ih{constructor(e,t){super("Light",e,t),nh.init()}createAmbientLight(e){const{id:t,name:n="",color:i=10132122,intensity:r=1}=e,s=new lt(i,r);return s.name=n,s.userData.sid=t,s.userData.stype="Light",this.viewport.scener.addObject(s,this.scene),s}setAmbientLight(e,t){const{name:n="",color:i=10132122,intensity:r=1}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:i=10132122,intensity:r=1,position:s={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,u=new ct(i,r);if(u.name=n,u.userData.sid=t,u.userData.stype="Light",u.position.set(s.x,s.y,s.z),u.target.name=`${n}-target`,u.target.position.set(o.x,o.y,o.z),u.castShadow=a,a){const e=u.position.distanceTo(u.target.position);u.shadow.bias=-.005,u.shadow.camera.left=-e,u.shadow.camera.right=e,u.shadow.camera.top=e,u.shadow.camera.bottom=-e,u.shadow.camera.far=e,u.shadow.autoUpdate=l,u.shadow.mapSize.width=c,u.shadow.mapSize.height=c,u.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(u,this.scene),this.viewport.scener.addObject(u.target,this.scene),u}setDirectionalLight(e,t){const{name:n="",color:i=10132122,intensity:r=1,position:s={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:u=4096}=t;if(!e)return!1;if(e.name=n,e.color=new a(i),e.intensity=r,e.position.set(s.x,s.y,s.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=l,l){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=c,e.shadow.mapSize.width=u,e.shadow.mapSize.height=u,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:i=16777215,groundColor:r=14540253,intensity:s=1,position:o={x:0,y:0,z:0}}=e,a=new ut(i,r,s);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:i=16777215,groundColor:r=14540253,intensity:s=1,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new a(i),e.groundColor=new a(r),e.intensity=s,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,angle:s=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:u=4096}=e,h=wn(o).distanceTo(wn(a)),d=new ht(i,r,h,Math.PI/360*s,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.mapSize.width=u,d.shadow.mapSize.height=u,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,angle:s=45,position:o={x:0,y:500,z:0},target:l={x:0,y:0,z:0},openShadow:c=!1,shadowAutoUpdate:u=!1,mapSize:h=4096}=t;if(!e)return!1;const d=wn(o).distanceTo(wn(l));if(e.name=n,e.color=new a(i),e.intensity=r,e.distance=d,e.angle=Math.PI/360*s,e.position.set(o.x,o.y,o.z),e.castShadow=c,e.target.position.set(l.x,l.y,l.z),e.target.castShadow=c,e.target.updateMatrixWorld(),c){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=u,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,distance:s=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,u=new j(i,r,s);return u.name=n,u.userData.sid=t,u.userData.stype="Light",u.position.set(o.x,o.y,o.z),u.castShadow=a,a&&(u.shadow.bias=-.005,u.shadow.camera.far=s,u.shadow.autoUpdate=l,u.shadow.mapSize.width=c,u.shadow.mapSize.height=c,u.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(u,this.scene),u}setPointLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,distance:s=5e3,position:o={x:0,y:500,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:u=4096}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,e.distance=s,e.position.set(o.x,o.y,o.z),e.castShadow=l,l&&(e.shadow.bias=-.005,e.shadow.camera.far=s,e.shadow.autoUpdate=c,e.shadow.mapSize.width=u,e.shadow.mapSize.height=u,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,width:s=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new dt(i,r,s,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,width:s=10,height:o=10,position:l={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,e.width=s,e.height=o,e.position.set(l.x,l.y,l.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}}
23
- /*!
24
- fflate - fast JavaScript compression/decompression
25
- <https://101arrowz.github.io/fflate>
26
- Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
27
- version 0.6.9
28
- */var sh=function(e){return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};try{URL.revokeObjectURL(sh(""))}catch(Zn){sh=function(e){return"data:application/javascript;charset=UTF-8,"+encodeURI(e)}}var oh=Uint8Array,ah=Uint16Array,lh=Uint32Array,ch=new oh([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),uh=new oh([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),hh=new oh([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dh=function(e,t){for(var n=new ah(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];var r=new lh(n[30]);for(i=1;i<30;++i)for(var s=n[i];s<n[i+1];++s)r[s]=s-n[i]<<5|i;return[n,r]},fh=dh(ch,2),ph=fh[0],gh=fh[1];ph[28]=258,gh[258]=28;for(var mh=dh(uh,0)[0],vh=new ah(32768),yh=0;yh<32768;++yh){var wh=(43690&yh)>>>1|(21845&yh)<<1;wh=(61680&(wh=(52428&wh)>>>2|(13107&wh)<<2))>>>4|(3855&wh)<<4,vh[yh]=((65280&wh)>>>8|(255&wh)<<8)>>>1}var bh=function(e,t,n){for(var i=e.length,r=0,s=new ah(t);r<i;++r)++s[e[r]-1];var o,a=new ah(t);for(r=0;r<t;++r)a[r]=a[r-1]+s[r-1]<<1;if(n){o=new ah(1<<t);var l=15-t;for(r=0;r<i;++r)if(e[r])for(var c=r<<4|e[r],u=t-e[r],h=a[e[r]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[vh[h]>>>l]=c}else for(o=new ah(i),r=0;r<i;++r)e[r]&&(o[r]=vh[a[e[r]-1]++]>>>15-e[r]);return o},xh=new oh(288);for(yh=0;yh<144;++yh)xh[yh]=8;for(yh=144;yh<256;++yh)xh[yh]=9;for(yh=256;yh<280;++yh)xh[yh]=7;for(yh=280;yh<288;++yh)xh[yh]=8;var Ah=new oh(32);for(yh=0;yh<32;++yh)Ah[yh]=5;var Th=bh(xh,9,1),Sh=bh(Ah,5,1),Eh=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Dh=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},Ch=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Ih=function(e,t,n){var i=e.length;if(!i||n&&!n.l&&i<5)return t||new oh(0);var r=!t||n,s=!n||n.i;n||(n={}),t||(t=new oh(3*i));var o,a=function(e){var n=t.length;if(e>n){var i=new oh(Math.max(2*n,e));i.set(t),t=i}},l=n.f||0,c=n.p||0,u=n.b||0,h=n.l,d=n.d,f=n.m,p=n.n,g=8*i;do{if(!h){n.f=l=Dh(e,c,1);var m=Dh(e,c+1,3);if(c+=3,!m){var v=e[(I=((o=c)/8|0)+(7&o&&1)+4)-4]|e[I-3]<<8,y=I+v;if(y>i){if(s)throw"unexpected EOF";break}r&&a(u+v),t.set(e.subarray(I,y),u),n.b=u+=v,n.p=c=8*y;continue}if(1==m)h=Th,d=Sh,f=9,p=5;else{if(2!=m)throw"invalid block type";var w=Dh(e,c,31)+257,b=Dh(e,c+10,15)+4,x=w+Dh(e,c+5,31)+1;c+=14;for(var A=new oh(x),T=new oh(19),S=0;S<b;++S)T[hh[S]]=Dh(e,c+3*S,7);c+=3*b;var E=Eh(T),D=(1<<E)-1,C=bh(T,E,1);for(S=0;S<x;){var I,M=C[Dh(e,c,D)];if(c+=15&M,(I=M>>>4)<16)A[S++]=I;else{var B=0,R=0;for(16==I?(R=3+Dh(e,c,3),c+=2,B=A[S-1]):17==I?(R=3+Dh(e,c,7),c+=3):18==I&&(R=11+Dh(e,c,127),c+=7);R--;)A[S++]=B}}var P=A.subarray(0,w),O=A.subarray(w);f=Eh(P),p=Eh(O),h=bh(P,f,1),d=bh(O,p,1)}if(c>g){if(s)throw"unexpected EOF";break}}r&&a(u+131072);for(var _=(1<<f)-1,L=(1<<p)-1,k=c;;k=c){var N=(B=h[Ch(e,c)&_])>>>4;if((c+=15&B)>g){if(s)throw"unexpected EOF";break}if(!B)throw"invalid length/literal";if(N<256)t[u++]=N;else{if(256==N){k=c,h=null;break}var U=N-254;if(N>264){var F=ch[S=N-257];U=Dh(e,c,(1<<F)-1)+ph[S],c+=F}var j=d[Ch(e,c)&L],z=j>>>4;if(!j)throw"invalid distance";c+=15&j;O=mh[z];if(z>3){F=uh[z];O+=Ch(e,c)&(1<<F)-1,c+=F}if(c>g){if(s)throw"unexpected EOF";break}r&&a(u+131072);for(var H=u+U;u<H;u+=4)t[u]=t[u-O],t[u+1]=t[u+1-O],t[u+2]=t[u+2-O],t[u+3]=t[u+3-O];u=H}}n.l=h,n.p=k,n.b=u,h&&(l=1,n.m=f,n.d=d,n.n=p)}while(!l);return u==t.length?t:function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var i=new(e instanceof ah?ah:e instanceof lh?lh:oh)(n-t);return i.set(e.subarray(t,n)),i}(t,0,u)},Mh=new oh(0),Bh=function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};var Rh="undefined"!=typeof TextDecoder&&new TextDecoder;try{Rh.decode(Mh,{stream:!0}),1}catch(Zn){}function Ph(e,t,n){const i=n.length-e-1;if(t>=n[i])return i-1;if(t<=n[e])return e;let r=e,s=i,o=Math.floor((r+s)/2);for(;t<n[o]||t>=n[o+1];)t<n[o]?s=o:r=o,o=Math.floor((r+s)/2);return o}function Oh(e,t){let n=1;for(let t=2;t<=e;++t)n*=t;let i=1;for(let e=2;e<=t;++e)i*=e;for(let n=2;n<=e-t;++n)i*=n;return n/i}function _h(e,n,i,r,s){const o=function(e,t,n,i,r){const s=r<e?r:e,o=[],a=Ph(e,i,t),l=function(e,t,n,i,r){const s=[];for(let e=0;e<=n;++e)s[e]=0;const o=[];for(let e=0;e<=i;++e)o[e]=s.slice(0);const a=[];for(let e=0;e<=n;++e)a[e]=s.slice(0);a[0][0]=1;const l=s.slice(0),c=s.slice(0);for(let i=1;i<=n;++i){l[i]=t-r[e+1-i],c[i]=r[e+i]-t;let n=0;for(let e=0;e<i;++e){const t=c[e+1],r=l[i-e];a[i][e]=t+r;const s=a[e][i-1]/a[i][e];a[e][i]=n+t*s,n=r*s}a[i][i]=n}for(let e=0;e<=n;++e)o[0][e]=a[e][n];for(let e=0;e<=n;++e){let t=0,r=1;const l=[];for(let e=0;e<=n;++e)l[e]=s.slice(0);l[0][0]=1;for(let s=1;s<=i;++s){let i=0;const c=e-s,u=n-s;e>=s&&(l[r][0]=l[t][0]/a[u+1][c],i=l[r][0]*a[c][u]);const h=e-1<=u?s-1:n-e;for(let e=c>=-1?1:-c;e<=h;++e)l[r][e]=(l[t][e]-l[t][e-1])/a[u+1][c+e],i+=l[r][e]*a[c+e][u];e<=u&&(l[r][s]=-l[t][s-1]/a[u+1][e],i+=l[r][s]*a[e][u]),o[s][e]=i;const d=t;t=r,r=d}}let u=n;for(let e=1;e<=i;++e){for(let t=0;t<=n;++t)o[e][t]*=u;u*=n-e}return o}(a,i,e,s,t),c=[];for(let e=0;e<n.length;++e){const t=n[e].clone(),i=t.w;t.x*=i,t.y*=i,t.z*=i,c[e]=t}for(let t=0;t<=s;++t){const n=c[a-e].clone().multiplyScalar(l[t][0]);for(let i=1;i<=e;++i)n.add(c[a-e+i].clone().multiplyScalar(l[t][i]));o[t]=n}for(let e=s+1;e<=r+1;++e)o[e]=new be(0,0,0);return o}(e,n,i,r,s);return function(e){const n=e.length,i=[],r=[];for(let s=0;s<n;++s){const n=e[s];i[s]=new t(n.x,n.y,n.z),r[s]=n.w}const s=[];for(let e=0;e<n;++e){const t=i[e].clone();for(let n=1;n<=e;++n)t.sub(s[e-n].clone().multiplyScalar(Oh(e,n)*r[n]));s[e]=t.divideScalar(r[0])}return s}(o)}class Lh extends ft{constructor(e,t,n,i,r){super(),this.degree=e,this.knots=t,this.controlPoints=[],this.startKnot=i||0,this.endKnot=r||this.knots.length-1;for(let e=0;e<n.length;++e){const t=n[e];this.controlPoints[e]=new be(t.x,t.y,t.z,t.w)}}getPoint(e){const n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t,i=this.knots[this.startKnot]+e*(this.knots[this.endKnot]-this.knots[this.startKnot]),r=function(e,t,n,i){const r=Ph(e,i,t),s=function(e,t,n,i){const r=[],s=[],o=[];r[0]=1;for(let a=1;a<=n;++a){s[a]=t-i[e+1-a],o[a]=i[e+a]-t;let n=0;for(let e=0;e<a;++e){const t=o[e+1],i=s[a-e],l=r[e]/(t+i);r[e]=n+t*l,n=i*l}r[a]=n}return r}(r,i,e,t),o=new be(0,0,0,0);for(let t=0;t<=e;++t){const i=n[r-e+t],a=s[t],l=i.w*a;o.x+=i.x*l,o.y+=i.y*l,o.z+=i.z*l,o.w+=i.w*a}return o}(this.degree,this.knots,this.controlPoints,i);return 1!==r.w&&r.divideScalar(r.w),n.set(r.x,r.y,r.z)}getTangent(e){const n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t,i=this.knots[0]+e*(this.knots[this.knots.length-1]-this.knots[0]),r=_h(this.degree,this.knots,this.controlPoints,i,1);return n.copy(r[1]).normalize(),n}}let kh,Nh,Uh;class Fh extends pt{constructor(e){super(e)}load(e,t,n,i){const r=this,s=""===r.path?gt.extractUrlBase(e):r.path,o=new mt(this.manager);o.setPath(r.path),o.setResponseType("arraybuffer"),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,(function(n){try{t(r.parse(n,s))}catch(t){i?i(t):console.error(t),r.manager.itemError(e)}}),n,i)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===nd(e,0,t.length)}(e))kh=(new Vh).parse(e);else{const t=nd(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function i(t){const i=e[t-1];return e=e.slice(n+t),n++,i}for(let e=0;e<t.length;++e){if(i(1)===t[e])return!1}return!0}(t))throw new Error("THREE.FBXLoader: Unknown format.");if(Xh(t)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+Xh(t));kh=(new Gh).parse(t)}const n=new Je(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);return new jh(n,this.manager).parse(kh)}}class jh{constructor(e,t){this.textureLoader=e,this.manager=t}parse(){Nh=this.parseConnections();const e=this.parseImages(),t=this.parseTextures(e),n=this.parseMaterials(t),i=this.parseDeformers(),r=(new zh).parse(i);return this.parseScene(i,r,n),Uh}parseConnections(){const e=new Map;if("Connections"in kh){kh.Connections.connections.forEach((function(t){const n=t[0],i=t[1],r=t[2];e.has(n)||e.set(n,{parents:[],children:[]});const s={ID:i,relationship:r};e.get(n).parents.push(s),e.has(i)||e.set(i,{parents:[],children:[]});const o={ID:n,relationship:r};e.get(i).children.push(o)}))}return e}parseImages(){const e={},t={};if("Video"in kh.Objects){const n=kh.Objects.Video;for(const i in n){const r=n[i];if(e[parseInt(i)]=r.RelativeFilename||r.Filename,"Content"in r){const e=r.Content instanceof ArrayBuffer&&r.Content.byteLength>0,s="string"==typeof r.Content&&""!==r.Content;if(e||s){const e=this.parseImage(n[i]);t[r.RelativeFilename||r.Filename]=e}}}}for(const n in e){const i=e[n];void 0!==t[i]?e[n]=t[i]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,i=n.slice(n.lastIndexOf(".")+1).toLowerCase();let r;switch(i){case"bmp":r="image/bmp";break;case"jpg":case"jpeg":r="image/jpeg";break;case"png":r="image/png";break;case"tif":r="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),r="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"==typeof t)return"data:"+r+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:r}))}}parseTextures(e){const t=new Map;if("Texture"in kh.Objects){const n=kh.Objects.Texture;for(const i in n){const r=this.parseTexture(n[i],e);t.set(parseInt(i),r)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const i=e.WrapModeU,r=e.WrapModeV,s=void 0!==i?i.value:0,o=void 0!==r?r.value:0;if(n.wrapS=0===s?D:E,n.wrapT=0===o?D:E,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}if("Translation"in e){const t=e.Translation.value;n.offset.x=t[0],n.offset.y=t[1]}return n}loadTexture(e,t){let n;const i=this.textureLoader.path,r=Nh.get(e.id).children;let s;void 0!==r&&r.length>0&&void 0!==t[r[0].ID]&&(n=t[r[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),s=new l):(t.setPath(this.textureLoader.path),s=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),s=new l):s=this.textureLoader.load(n);return this.textureLoader.setPath(i),s}parseMaterials(e){const t=new Map;if("Material"in kh.Objects){const n=kh.Objects.Material;for(const i in n){const r=this.parseMaterial(n[i],e);null!==r&&t.set(parseInt(i),r)}}return t}parseMaterial(e,t){const n=e.id,i=e.attrName;let r=e.ShadingModel;if("object"==typeof r&&(r=r.value),!Nh.has(n))return null;const s=this.parseParameters(e,t,n);let o;switch(r.toLowerCase()){case"phong":o=new vt;break;case"lambert":o=new yt;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',r),o=new vt}return o.setValues(s),o.name=i,o}parseParameters(e,t,n){const i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new a).fromArray(e.Diffuse.value):!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(i.color=(new a).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new a).fromArray(e.Emissive.value):!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(i.emissive=(new a).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new a).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new a).fromArray(e.SpecularColor.value));const r=this;return Nh.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":i.bumpMap=r.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":i.aoMap=r.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":i.map=r.getTexture(t,e.ID),void 0!==i.map&&(i.map.encoding=I);break;case"DisplacementColor":i.displacementMap=r.getTexture(t,e.ID);break;case"EmissiveColor":i.emissiveMap=r.getTexture(t,e.ID),void 0!==i.emissiveMap&&(i.emissiveMap.encoding=I);break;case"NormalMap":case"Maya|TEX_normal_map":i.normalMap=r.getTexture(t,e.ID);break;case"ReflectionColor":i.envMap=r.getTexture(t,e.ID),void 0!==i.envMap&&(i.envMap.mapping=qe,i.envMap.encoding=I);break;case"SpecularColor":i.specularMap=r.getTexture(t,e.ID),void 0!==i.specularMap&&(i.specularMap.encoding=I);break;case"TransparentColor":case"TransparencyFactor":i.alphaMap=r.getTexture(t,e.ID),i.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),i}getTexture(e,t){return"LayeredTexture"in kh.Objects&&t in kh.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Nh.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in kh.Objects){const n=kh.Objects.Deformer;for(const i in n){const r=n[i],s=Nh.get(parseInt(i));if("Skin"===r.attrType){const t=this.parseSkeleton(s,n);t.ID=i,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=s.parents[0].ID,e[i]=t}else if("BlendShape"===r.attrType){const e={id:i};e.rawTargets=this.parseMorphTargets(s,n),e.id=i,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[i]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const i=t[e.ID];if("Cluster"!==i.attrType)return;const r={ID:e.ID,indices:[],weights:[],transformLink:(new m).fromArray(i.TransformLink.a)};"Indexes"in i&&(r.indices=i.Indexes.a,r.weights=i.Weights.a),n.push(r)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let i=0;i<e.children.length;i++){const r=e.children[i],s=t[r.ID],o={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;o.geoID=Nh.get(parseInt(r.ID)).children.filter((function(e){return void 0===e.relationship}))[0].ID,n.push(o)}return n}parseScene(e,t,n){Uh=new wt;const i=this.parseModels(e.skeletons,t,n),r=kh.Objects.Model,s=this;i.forEach((function(e){const t=r[e.ID];s.setLookAtProperties(e,t);Nh.get(e.ID).parents.forEach((function(t){const n=i.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&Uh.add(e)})),this.bindSkeleton(e.skeletons,t,i),this.createAmbientLight(),Uh.traverse((function(e){if(e.userData.transformData){e.parent&&(e.userData.transformData.parentMatrix=e.parent.matrix,e.userData.transformData.parentMatrixWorld=e.parent.matrixWorld);const t=$h(e.userData.transformData);e.applyMatrix4(t),e.updateWorldMatrix()}}));const o=(new Hh).parse();1===Uh.children.length&&Uh.children[0].isGroup&&(Uh.children[0].animations=o,Uh=Uh.children[0]),Uh.animations=o}parseModels(e,t,n){const i=new Map,r=kh.Objects.Model;for(const s in r){const o=parseInt(s),a=r[s],l=Nh.get(o);let c=this.buildSkeleton(l,e,o,a.attrName);if(!c){switch(a.attrType){case"Camera":c=this.createCamera(l);break;case"Light":c=this.createLight(l);break;case"Mesh":c=this.createMesh(l,t,n);break;case"NurbsCurve":c=this.createCurve(l,t);break;case"LimbNode":case"Root":c=new bt;break;default:c=new wt}c.name=a.attrName?p.sanitizeNodeName(a.attrName):"",c.ID=o}this.getTransformData(c,a),i.set(o,c)}return i}buildSkeleton(e,t,n,i){let r=null;return e.parents.forEach((function(e){for(const s in t){const o=t[s];o.rawBones.forEach((function(t,s){if(t.ID===e.ID){const e=r;r=new bt,r.matrixWorld.copy(t.transformLink),r.name=i?p.sanitizeNodeName(i):"",r.ID=n,o.bones[s]=r,null!==e&&r.add(e)}}))}})),r}createCamera(e){let t,n;if(e.children.forEach((function(e){const t=kh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new J;else{let e=0;void 0!==n.CameraProjectionType&&1===n.CameraProjectionType.value&&(e=1);let i=1;void 0!==n.NearPlane&&(i=n.NearPlane.value/1e3);let r=1e3;void 0!==n.FarPlane&&(r=n.FarPlane.value/1e3);let s=window.innerWidth,o=window.innerHeight;void 0!==n.AspectWidth&&void 0!==n.AspectHeight&&(s=n.AspectWidth.value,o=n.AspectHeight.value);const a=s/o;let l=45;void 0!==n.FieldOfView&&(l=n.FieldOfView.value);const c=n.FocalLength?n.FocalLength.value:null;switch(e){case 0:t=new $(l,a,i,r),null!==c&&t.setFocalLength(c);break;case 1:t=new ee(-s/2,s/2,o/2,-o/2,i,r);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+e+"."),t=new J}}return t}createLight(e){let t,n;if(e.children.forEach((function(e){const t=kh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new J;else{let e;e=void 0===n.LightType?0:n.LightType.value;let i=16777215;void 0!==n.Color&&(i=(new a).fromArray(n.Color.value));let r=void 0===n.Intensity?1:n.Intensity.value/100;void 0!==n.CastLightOnObject&&0===n.CastLightOnObject.value&&(r=0);let s=0;void 0!==n.FarAttenuationEnd&&(s=void 0!==n.EnableFarAttenuation&&0===n.EnableFarAttenuation.value?0:n.FarAttenuationEnd.value);const o=1;switch(e){case 0:t=new j(i,r,s,o);break;case 1:t=new ct(i,r);break;case 2:let e=Math.PI/3;void 0!==n.InnerAngle&&(e=h.degToRad(n.InnerAngle.value));let a=0;void 0!==n.OuterAngle&&(a=h.degToRad(n.OuterAngle.value),a=Math.max(a,1)),t=new ht(i,r,s,e,a,o);break;default:console.warn("THREE.FBXLoader: Unknown light type "+n.LightType.value+", defaulting to a PointLight."),t=new j(i,r)}void 0!==n.CastShadows&&1===n.CastShadows.value&&(t.castShadow=!0)}return t}createMesh(e,t,n){let i,r=null,s=null;const o=[];return e.children.forEach((function(e){t.has(e.ID)&&(r=t.get(e.ID)),n.has(e.ID)&&o.push(n.get(e.ID))})),o.length>1?s=o:o.length>0?s=o[0]:(s=new vt({color:13421772}),o.push(s)),"color"in r.attributes&&o.forEach((function(e){e.vertexColors=!0})),r.FBX_Deformer?(i=new xt(r,s),i.normalizeSkinWeights()):i=new k(r,s),i}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),i=new q({color:3342591,linewidth:1});return new At(n,i)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?ed(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,n){if("LookAtProperty"in n){Nh.get(e.ID).children.forEach((function(n){if("LookAtProperty"===n.relationship){const i=kh.Objects.Model[n.ID];if("Lcl_Translation"in i){const n=i.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),Uh.add(e.target)):e.lookAt((new t).fromArray(n))}}}))}}bindSkeleton(e,t,n){const i=this.parsePoseNodes();for(const r in e){const s=e[r];Nh.get(parseInt(s.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Nh.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new Tt(s.bones),i[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in kh.Objects){const t=kh.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const i=t[n].PoseNode;Array.isArray(i)?i.forEach((function(t){e[t.Node]=(new m).fromArray(t.Matrix.a)})):e[i.Node]=(new m).fromArray(i.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in kh&&"AmbientColor"in kh.GlobalSettings){const e=kh.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],i=e[2];if(0!==t||0!==n||0!==i){const e=new a(t,n,i);Uh.add(new lt(e,1))}}}}class zh{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in kh.Objects){const n=kh.Objects.Geometry;for(const i in n){const r=Nh.get(parseInt(i)),s=this.parseGeometry(r,n[i],e);t.set(parseInt(i),s)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const i=n.skeletons,r=[],s=e.parents.map((function(e){return kh.Objects.Model[e.ID]}));if(0===s.length)return;const o=e.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&r.push(n.morphTargets[e.ID])}));const a=s[0],l={};"RotationOrder"in a&&(l.eulerOrder=ed(a.RotationOrder.value)),"InheritType"in a&&(l.inheritType=parseInt(a.InheritType.value)),"GeometricTranslation"in a&&(l.translation=a.GeometricTranslation.value),"GeometricRotation"in a&&(l.rotation=a.GeometricRotation.value),"GeometricScaling"in a&&(l.scale=a.GeometricScaling.value);const c=$h(l);return this.genGeometry(t,o,r,c)}genGeometry(e,t,n,i){const r=new xe;e.attrName&&(r.name=e.attrName);const s=this.parseGeoNode(e,t),o=this.genBuffers(s),a=new it(o.vertex,3);if(a.applyMatrix4(i),r.setAttribute("position",a),o.colors.length>0&&r.setAttribute("color",new it(o.colors,3)),t&&(r.setAttribute("skinIndex",new St(o.weightsIndices,4)),r.setAttribute("skinWeight",new it(o.vertexWeights,4)),r.FBX_Deformer=t),o.normal.length>0){const e=(new Pe).getNormalMatrix(i),t=new it(o.normal,3);t.applyNormalMatrix(e),r.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){let n="uv"+(t+1).toString();0===t&&(n="uv"),r.setAttribute(n,new it(o.uvs[t],2))})),s.material&&"AllSame"!==s.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,i){n!==e&&(r.addGroup(t,i-t,e),e=n,t=i)})),r.groups.length>0){const t=r.groups[r.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&r.addGroup(n,o.materialIndex.length-n,e)}0===r.groups.length&&r.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(r,e,n,i),r}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(i,r){void 0===n.weightTable[i]&&(n.weightTable[i]=[]),n.weightTable[i].push({id:t,weight:e.weights[r]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,i=0,r=!1,s=[],o=[],a=[],l=[],c=[],u=[];const h=this;return e.vertexIndices.forEach((function(d,f){let p,g=!1;d<0&&(d^=-1,g=!0);let m=[],v=[];if(s.push(3*d,3*d+1,3*d+2),e.color){const t=Zh(f,n,d,e.color);a.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),m.push(e.id)})),v.length>4){r||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),r=!0);const e=[0,0,0,0],t=[0,0,0,0];v.forEach((function(n,i){let r=n,s=m[i];t.forEach((function(t,n,i){if(r>t){i[n]=r,r=t;const o=e[n];e[n]=s,s=o}}))})),m=e,v=t}for(;v.length<4;)v.push(0),m.push(0);for(let e=0;e<4;++e)c.push(v[e]),u.push(m[e])}if(e.normal){const t=Zh(f,n,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(p=Zh(f,n,d,e.material)[0],p<0&&(h.negativeMaterialIndices=!0,p=0)),e.uv&&e.uv.forEach((function(e,t){const i=Zh(f,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(i[0]),l[t].push(i[1])})),i++,g&&(i>4&&console.warn("THREE.FBXLoader: Polygons with more than four sides are not supported. Make sure to triangulate the geometry during export."),h.genFace(t,e,s,p,o,a,l,c,u,i),n++,i=0,s=[],o=[],a=[],l=[],c=[],u=[])})),t}genFace(e,t,n,i,r,s,o,a,l,c){for(let u=2;u<c;u++)e.vertex.push(t.vertexPositions[n[0]]),e.vertex.push(t.vertexPositions[n[1]]),e.vertex.push(t.vertexPositions[n[2]]),e.vertex.push(t.vertexPositions[n[3*(u-1)]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+1]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+2]]),e.vertex.push(t.vertexPositions[n[3*u]]),e.vertex.push(t.vertexPositions[n[3*u+1]]),e.vertex.push(t.vertexPositions[n[3*u+2]]),t.skeleton&&(e.vertexWeights.push(a[0]),e.vertexWeights.push(a[1]),e.vertexWeights.push(a[2]),e.vertexWeights.push(a[3]),e.vertexWeights.push(a[4*(u-1)]),e.vertexWeights.push(a[4*(u-1)+1]),e.vertexWeights.push(a[4*(u-1)+2]),e.vertexWeights.push(a[4*(u-1)+3]),e.vertexWeights.push(a[4*u]),e.vertexWeights.push(a[4*u+1]),e.vertexWeights.push(a[4*u+2]),e.vertexWeights.push(a[4*u+3]),e.weightsIndices.push(l[0]),e.weightsIndices.push(l[1]),e.weightsIndices.push(l[2]),e.weightsIndices.push(l[3]),e.weightsIndices.push(l[4*(u-1)]),e.weightsIndices.push(l[4*(u-1)+1]),e.weightsIndices.push(l[4*(u-1)+2]),e.weightsIndices.push(l[4*(u-1)+3]),e.weightsIndices.push(l[4*u]),e.weightsIndices.push(l[4*u+1]),e.weightsIndices.push(l[4*u+2]),e.weightsIndices.push(l[4*u+3])),t.color&&(e.colors.push(s[0]),e.colors.push(s[1]),e.colors.push(s[2]),e.colors.push(s[3*(u-1)]),e.colors.push(s[3*(u-1)+1]),e.colors.push(s[3*(u-1)+2]),e.colors.push(s[3*u]),e.colors.push(s[3*u+1]),e.colors.push(s[3*u+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(i),e.materialIndex.push(i),e.materialIndex.push(i)),t.normal&&(e.normal.push(r[0]),e.normal.push(r[1]),e.normal.push(r[2]),e.normal.push(r[3*(u-1)]),e.normal.push(r[3*(u-1)+1]),e.normal.push(r[3*(u-1)+2]),e.normal.push(r[3*u]),e.normal.push(r[3*u+1]),e.normal.push(r[3*u+2])),t.uv&&t.uv.forEach((function(t,n){void 0===e.uvs[n]&&(e.uvs[n]=[]),e.uvs[n].push(o[n][0]),e.uvs[n].push(o[n][1]),e.uvs[n].push(o[n][2*(u-1)]),e.uvs[n].push(o[n][2*(u-1)+1]),e.uvs[n].push(o[n][2*u]),e.uvs[n].push(o[n][2*u+1])}))}addMorphTargets(e,t,n,i){if(0===n.length)return;e.morphTargetsRelative=!0,e.morphAttributes.position=[];const r=this;n.forEach((function(n){n.rawTargets.forEach((function(n){const s=kh.Objects.Geometry[n.geoID];void 0!==s&&r.genMorphGeometry(e,t,s,i,n.name)}))}))}genMorphGeometry(e,t,n,i,r){const s=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],o=void 0!==n.Vertices?n.Vertices.a:[],a=void 0!==n.Indexes?n.Indexes.a:[],l=3*e.attributes.position.count,c=new Float32Array(l);for(let e=0;e<a.length;e++){const t=3*a[e];c[t]=o[3*e],c[t+1]=o[3*e+1],c[t+2]=o[3*e+2]}const u={vertexIndices:s,vertexPositions:c},h=this.genBuffers(u),d=new it(h.vertex,3);d.name=r||n.attrName,d.applyMatrix4(i),e.morphAttributes.position.push(d)}parseNormals(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,i=e.Normals.a;let r=[];return"IndexToDirect"===n&&("NormalIndex"in e?r=e.NormalIndex.a:"NormalsIndex"in e&&(r=e.NormalsIndex.a)),{dataSize:3,buffer:i,indices:r,mappingType:t,referenceType:n}}parseUVs(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,i=e.UV.a;let r=[];return"IndexToDirect"===n&&(r=e.UVIndex.a),{dataSize:2,buffer:i,indices:r,mappingType:t,referenceType:n}}parseVertexColors(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,i=e.Colors.a;let r=[];return"IndexToDirect"===n&&(r=e.ColorIndex.a),{dataSize:4,buffer:i,indices:r,mappingType:t,referenceType:n}}parseMaterialIndices(e){const t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};const i=e.Materials.a,r=[];for(let e=0;e<i.length;++e)r.push(e);return{dataSize:1,buffer:i,indices:r,mappingType:t,referenceType:n}}parseNurbsGeometry(e){const t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new xe;const n=t-1,i=e.KnotVector.a,r=[],s=e.Points.a;for(let e=0,t=s.length;e<t;e+=4)r.push((new be).fromArray(s,e));let o,a;if("Closed"===e.Form)r.push(r[0]);else if("Periodic"===e.Form){o=n,a=i.length-1-o;for(let e=0;e<n;++e)r.push(r[e])}const l=new Lh(n,i,r,o,a).getPoints(12*r.length);return(new xe).setFromPoints(l)}}class Hh{parse(){const e=[],t=this.parseClips();if(void 0!==t)for(const n in t){const i=t[n],r=this.addClip(i);e.push(r)}return e}parseClips(){if(void 0===kh.Objects.AnimationCurve)return;const e=this.parseAnimationCurveNodes();this.parseAnimationCurves(e);const t=this.parseAnimationLayers(e);return this.parseAnimStacks(t)}parseAnimationCurveNodes(){const e=kh.Objects.AnimationCurveNode,t=new Map;for(const n in e){const i=e[n];if(null!==i.attrName.match(/S|R|T|DeformPercent/)){const e={id:i.id,attr:i.attrName,curves:{}};t.set(e.id,e)}}return t}parseAnimationCurves(e){const t=kh.Objects.AnimationCurve;for(const n in t){const i={id:t[n].id,times:t[n].KeyTime.a.map(Qh),values:t[n].KeyValueFloat.a},r=Nh.get(i.id);if(void 0!==r){const t=r.parents[0].ID,n=r.parents[0].relationship;n.match(/X/)?e.get(t).curves.x=i:n.match(/Y/)?e.get(t).curves.y=i:n.match(/Z/)?e.get(t).curves.z=i:n.match(/d|DeformPercent/)&&e.has(t)&&(e.get(t).curves.morph=i)}}}parseAnimationLayers(e){const t=kh.Objects.AnimationLayer,n=new Map;for(const i in t){const t=[],r=Nh.get(parseInt(i));if(void 0!==r){r.children.forEach((function(n,i){if(e.has(n.ID)){const r=e.get(n.ID);if(void 0!==r.curves.x||void 0!==r.curves.y||void 0!==r.curves.z){if(void 0===t[i]){const e=Nh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID;if(void 0!==e){const r=kh.Objects.Model[e.toString()];if(void 0===r)return void console.warn("THREE.FBXLoader: Encountered a unused curve.",n);const s={modelName:r.attrName?p.sanitizeNodeName(r.attrName):"",ID:r.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};Uh.traverse((function(e){e.ID===r.id&&(s.transform=e.matrix,e.userData.transformData&&(s.eulerOrder=e.userData.transformData.eulerOrder))})),s.transform||(s.transform=new m),"PreRotation"in r&&(s.preRotation=r.PreRotation.value),"PostRotation"in r&&(s.postRotation=r.PostRotation.value),t[i]=s}}t[i]&&(t[i][r.attr]=r)}else if(void 0!==r.curves.morph){if(void 0===t[i]){const e=Nh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID,r=Nh.get(e).parents[0].ID,s=Nh.get(r).parents[0].ID,o=Nh.get(s).parents[0].ID,a=kh.Objects.Model[o],l={modelName:a.attrName?p.sanitizeNodeName(a.attrName):"",morphName:kh.Objects.Deformer[e].attrName};t[i]=l}t[i][r.attr]=r}}})),n.set(parseInt(i),t)}}return n}parseAnimStacks(e){const t=kh.Objects.AnimationStack,n={};for(const i in t){const r=Nh.get(parseInt(i)).children;r.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const s=e.get(r[0].ID);n[i]={name:t[i].attrName,layer:s}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new We(e.name,-1,t)}generateTracks(e){const i=[];let s=new t,o=new r,a=new t;if(e.transform&&e.transform.decompose(s,o,a),s=s.toArray(),o=(new n).setFromQuaternion(o,e.eulerOrder).toArray(),a=a.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.T.curves,s,"position");void 0!==t&&i.push(t)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const t=this.generateRotationTrack(e.modelName,e.R.curves,o,e.preRotation,e.postRotation,e.eulerOrder);void 0!==t&&i.push(t)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.S.curves,a,"scale");void 0!==t&&i.push(t)}if(void 0!==e.DeformPercent){const t=this.generateMorphTrack(e);void 0!==t&&i.push(t)}return i}generateVectorTrack(e,t,n,i){const r=this.getTimesForAllAxes(t),s=this.getKeyframeTrackValues(r,t,n);return new Et(e+"."+i,r,s)}generateRotationTrack(e,t,i,s,o,a){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(h.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(h.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(h.degToRad));const l=this.getTimesForAllAxes(t),c=this.getKeyframeTrackValues(l,t,i);void 0!==s&&((s=s.map(h.degToRad)).push(a),s=(new n).fromArray(s),s=(new r).setFromEuler(s)),void 0!==o&&((o=o.map(h.degToRad)).push(a),o=(new n).fromArray(o),o=(new r).setFromEuler(o).invert());const u=new r,d=new n,f=[];for(let e=0;e<c.length;e+=3)d.set(c[e],c[e+1],c[e+2],a),u.setFromEuler(d),void 0!==s&&u.premultiply(s),void 0!==o&&u.multiply(o),u.toArray(f,e/3*4);return new Dt(e+".quaternion",l,f)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,n=t.values.map((function(e){return e/100})),i=Uh.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new Ct(e.modelName+".morphTargetInfluences["+i+"]",t.times,n)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})),t.length>1){let e=1,n=t[0];for(let i=1;i<t.length;i++){const r=t[i];r!==n&&(t[e]=r,n=r,e++)}t=t.slice(0,e)}return t}getKeyframeTrackValues(e,t,n){const i=n,r=[];let s=-1,o=-1,a=-1;return e.forEach((function(e){if(t.x&&(s=t.x.times.indexOf(e)),t.y&&(o=t.y.times.indexOf(e)),t.z&&(a=t.z.times.indexOf(e)),-1!==s){const e=t.x.values[s];r.push(e),i[0]=e}else r.push(i[0]);if(-1!==o){const e=t.y.values[o];r.push(e),i[1]=e}else r.push(i[1]);if(-1!==a){const e=t.z.values[a];r.push(e),i[2]=e}else r.push(i[2])})),r}interpolateRotations(e){for(let t=1;t<e.values.length;t++){const n=e.values[t-1],i=e.values[t]-n,r=Math.abs(i);if(r>=180){const s=r/180,o=i/s;let a=n+o;const l=e.times[t-1],c=(e.times[t]-l)/s;let u=l+c;const h=[],d=[];for(;u<e.times[t];)h.push(u),u+=c,d.push(a),a+=o;e.times=id(e.times,t,h),e.values=id(e.values,t,d)}}}}class Gh{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new Wh,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,i){const r=e.match(/^[\s\t]*;/),s=e.match(/^[\s\t]*$/);if(r||s)return;const o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),a=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):a?t.parseNodeProperty(e,a,n[++i]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)})),this.allNodes}parseNodeBegin(e,t){const n=t[1].trim().replace(/^"/,"").replace(/"$/,""),i=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),r={name:n},s=this.parseNodeAttr(i),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,r):n in o?("PoseNode"===n?o.PoseNode.push(r):void 0!==o[n].id&&(o[n]={},o[n][o[n].id]=o[n]),""!==s.id&&(o[n][s.id]=r)):"number"==typeof s.id?(o[n]={},o[n][s.id]=r):"Properties70"!==n&&(o[n]="PoseNode"===n?[r]:r),"number"==typeof s.id&&(r.id=s.id),""!==s.name&&(r.attrName=s.name),""!==s.type&&(r.attrType=s.type),this.pushStack(r)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let n="",i="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),i=e[2]),{id:t,name:n,type:i}}parseNodeProperty(e,t,n){let i=t[1].replace(/^"/,"").replace(/"$/,"").trim(),r=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===i&&","===r&&(r=n.replace(/"/g,"").replace(/,$/,"").trim());const s=this.getCurrentNode();if("Properties70"!==s.name){if("C"===i){const e=r.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let o=r.split(",").slice(3);o=o.map((function(e){return e.trim().replace(/^"/,"")})),i="connections",r=[t,n],function(e,t){for(let n=0,i=e.length,r=t.length;n<r;n++,i++)e[i]=t[n]}(r,o),void 0===s[i]&&(s[i]=[])}"Node"===i&&(s.id=r),i in s&&Array.isArray(s[i])?s[i].push(r):"a"!==i?s[i]=r:s.a=r,this.setCurrentProp(s,i),"a"===i&&","!==r.slice(-1)&&(s.a=td(r))}else this.parseNodeSpecialProperty(e,i,r)}parseNodePropertyContinued(e){const t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=td(t.a))}parseNodeSpecialProperty(e,t,n){const i=n.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),r=i[0],s=i[1],o=i[2],a=i[3];let l=i[4];switch(s){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=td(l)}this.getPrevNode()[r]={type:s,type2:o,flag:a,value:l},this.setCurrentProp(this.getPrevNode(),r)}}class Vh{parse(e){const t=new Yh(e);t.skip(23);const n=t.getUint32();if(n<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+n);const i=new Wh;for(;!this.endOfContent(t);){const e=this.parseNode(t,n);null!==e&&i.add(e.name,e)}return i}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},i=t>=7500?e.getUint64():e.getUint32(),r=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const s=e.getUint8(),o=e.getString(s);if(0===i)return null;const a=[];for(let t=0;t<r;t++)a.push(this.parseProperty(e));const l=a.length>0?a[0]:"",c=a.length>1?a[1]:"",u=a.length>2?a[2]:"";for(n.singleProperty=1===r&&e.getOffset()===i;i>e.getOffset();){const i=this.parseNode(e,t);null!==i&&this.parseSubNode(o,n,i)}return n.propertyList=a,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==u&&(n.attrType=u),""!==o&&(n.name=o),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],i=n.propertyList[1];const r=n.propertyList[2],s=n.propertyList[3];let o;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===i.indexOf("Lcl ")&&(i=i.replace("Lcl ","Lcl_")),o="Color"===i||"ColorRGB"===i||"Vector"===i||"Vector3D"===i||0===i.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:i,type2:r,flag:s,value:o}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const i=e.getUint32(),r=e.getUint32(),s=e.getUint32();if(0===r)switch(t){case"b":case"c":return e.getBooleanArray(i);case"d":return e.getFloat64Array(i);case"f":return e.getFloat32Array(i);case"i":return e.getInt32Array(i);case"l":return e.getInt64Array(i)}const o=function(e,t){return Ih((Bh(e),e.subarray(2,-4)),t)}(new Uint8Array(e.getArrayBuffer(s))),a=new Yh(o.buffer);switch(t){case"b":case"c":return a.getBooleanArray(i);case"d":return a.getFloat64Array(i);case"f":return a.getFloat32Array(i);case"i":return a.getInt32Array(i);case"l":return a.getInt64Array(i)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class Yh{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n<e;n++)t.push(this.getBoolean());return t}getUint8(){const e=this.dv.getUint8(this.offset);return this.offset+=1,e}getInt16(){const e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}getInt32(){const e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}getInt32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt32());return t}getUint32(){const e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}getInt64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,e=4294967295&~e,4294967295===e&&(t=t+1&4294967295),e=e+1&4294967295,-(4294967296*t+e)):4294967296*t+e}getInt64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt64());return t}getUint64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e}getFloat32(){const e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}getFloat32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat32());return t}getFloat64(){const e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}getFloat64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat64());return t}getArrayBuffer(e){const t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}getString(e){const t=this.offset;let n=new Uint8Array(this.dv.buffer,t,e);this.skip(e);const i=n.indexOf(0);return i>=0&&(n=new Uint8Array(this.dv.buffer,t,i)),this._textDecoder.decode(n)}}class Wh{add(e,t){this[e]=t}}function Xh(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function Qh(e){return e/46186158e3}const Kh=[];function Zh(e,t,n,i){let r;switch(i.mappingType){case"ByPolygonVertex":r=e;break;case"ByPolygon":r=t;break;case"ByVertice":r=n;break;case"AllSame":r=i.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+i.mappingType)}"IndexToDirect"===i.referenceType&&(r=i.indices[r]);const s=r*i.dataSize,o=s+i.dataSize;return function(e,t,n,i){for(let r=n,s=0;r<i;r++,s++)e[s]=t[r];return e}(Kh,i.buffer,s,o)}const qh=new n,Jh=new t;function $h(e){const i=new m,r=new m,s=new m,o=new m,a=new m,l=new m,c=new m,u=new m,d=new m,f=new m,p=new m,g=new m,v=e.inheritType?e.inheritType:0;if(e.translation&&i.setPosition(Jh.fromArray(e.translation)),e.preRotation){const t=e.preRotation.map(h.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),r.makeRotationFromEuler(qh.fromArray(t))}if(e.rotation){const t=e.rotation.map(h.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),s.makeRotationFromEuler(qh.fromArray(t))}if(e.postRotation){const t=e.postRotation.map(h.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),o.makeRotationFromEuler(qh.fromArray(t)),o.invert()}e.scale&&a.scale(Jh.fromArray(e.scale)),e.scalingOffset&&c.setPosition(Jh.fromArray(e.scalingOffset)),e.scalingPivot&&l.setPosition(Jh.fromArray(e.scalingPivot)),e.rotationOffset&&u.setPosition(Jh.fromArray(e.rotationOffset)),e.rotationPivot&&d.setPosition(Jh.fromArray(e.rotationPivot)),e.parentMatrixWorld&&(p.copy(e.parentMatrix),f.copy(e.parentMatrixWorld));const y=r.clone().multiply(s).multiply(o),w=new m;w.extractRotation(f);const b=new m;b.copyPosition(f);const x=b.clone().invert().multiply(f),A=w.clone().invert().multiply(x),T=a,S=new m;if(0===v)S.copy(w).multiply(y).multiply(A).multiply(T);else if(1===v)S.copy(w).multiply(A).multiply(y).multiply(T);else{const e=(new m).scale((new t).setFromMatrixScale(p)).clone().invert(),n=A.clone().multiply(e);S.copy(w).multiply(y).multiply(n).multiply(T)}const E=d.clone().invert(),D=l.clone().invert();let C=i.clone().multiply(u).multiply(d).multiply(r).multiply(s).multiply(o).multiply(E).multiply(c).multiply(l).multiply(a).multiply(D);const I=(new m).copyPosition(C),M=f.clone().multiply(I);return g.copyPosition(M),C=g.clone().multiply(S),C.premultiply(f.invert()),C}function ed(e){const t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===(e=e||0)?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function td(e){return e.split(",").map((function(e){return parseFloat(e)}))}function nd(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),(new TextDecoder).decode(new Uint8Array(e,t,n))}function id(e,t,n){return e.slice(0,t).concat(n).concat(e.slice(t))}class rd extends H{constructor(e){super(e)}parse(e){const t=0,n=1,i=2,r=3,s=9,o=10,a=11,l=48,c=4,u=0,h=1,d=2,f=3;e.length<19&&console.error("THREE.TGALoader: Not enough data to contain header.");let p=0;const g=new Uint8Array(e),m={id_length:g[p++],colormap_type:g[p++],image_type:g[p++],colormap_index:g[p++]|g[p++]<<8,colormap_length:g[p++]|g[p++]<<8,colormap_size:g[p++],origin:[g[p++]|g[p++]<<8,g[p++]|g[p++]<<8],width:g[p++]|g[p++]<<8,height:g[p++]|g[p++]<<8,pixel_size:g[p++],flags:g[p++]};!function(e){switch(e.image_type){case n:case s:(e.colormap_length>256||24!==e.colormap_size||1!==e.colormap_type)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case i:case r:case o:case a:e.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case t:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',e.image_type)}(e.width<=0||e.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size&&console.error('THREE.TGALoader: Invalid pixel size "%s".',e.pixel_size)}(m),m.id_length+p>e.length&&console.error("THREE.TGALoader: No data."),p+=m.id_length;let v=!1,y=!1,w=!1;switch(m.image_type){case s:v=!0,y=!0;break;case n:y=!0;break;case o:v=!0;break;case i:break;case a:v=!0,w=!0;break;case r:w=!0}const b=new Uint8Array(m.width*m.height*4),x=function(e,t,n,i,r){let s,o;const a=n.pixel_size>>3,l=n.width*n.height*a;if(t&&(o=r.subarray(i,i+=n.colormap_length*(n.colormap_size>>3))),e){let e,t,n;s=new Uint8Array(l);let o=0;const c=new Uint8Array(a);for(;o<l;)if(e=r[i++],t=1+(127&e),128&e){for(n=0;n<a;++n)c[n]=r[i++];for(n=0;n<t;++n)s.set(c,o+n*a);o+=a*t}else{for(t*=a,n=0;n<t;++n)s[o+n]=r[i++];o+=t}}else s=r.subarray(i,i+=t?n.width*n.height:l);return{pixel_data:s,palettes:o}}(v,y,m,p,g);return function(e,t,n,i,r){let s,o,a,p,g,v;switch((m.flags&l)>>c){default:case d:s=0,a=1,g=t,o=0,p=1,v=n;break;case u:s=0,a=1,g=t,o=n-1,p=-1,v=-1;break;case f:s=t-1,a=-1,g=-1,o=0,p=1,v=n;break;case h:s=t-1,a=-1,g=-1,o=n-1,p=-1,v=-1}if(w)switch(m.pixel_size){case 8:!function(e,t,n,i,r,s,o,a){let l,c,u,h=0;const d=m.width;for(u=t;u!==i;u+=n)for(c=r;c!==o;c+=s,h++)l=a[h],e[4*(c+d*u)+0]=l,e[4*(c+d*u)+1]=l,e[4*(c+d*u)+2]=l,e[4*(c+d*u)+3]=255}(e,o,p,v,s,a,g,i);break;case 16:!function(e,t,n,i,r,s,o,a){let l,c,u=0;const h=m.width;for(c=t;c!==i;c+=n)for(l=r;l!==o;l+=s,u+=2)e[4*(l+h*c)+0]=a[u+0],e[4*(l+h*c)+1]=a[u+0],e[4*(l+h*c)+2]=a[u+0],e[4*(l+h*c)+3]=a[u+1]}(e,o,p,v,s,a,g,i);break;default:console.error("THREE.TGALoader: Format not supported.")}else switch(m.pixel_size){case 8:!function(e,t,n,i,r,s,o,a,l){const c=l;let u,h,d,f=0;const p=m.width;for(d=t;d!==i;d+=n)for(h=r;h!==o;h+=s,f++)u=a[f],e[4*(h+p*d)+3]=255,e[4*(h+p*d)+2]=c[3*u+0],e[4*(h+p*d)+1]=c[3*u+1],e[4*(h+p*d)+0]=c[3*u+2]}(e,o,p,v,s,a,g,i,r);break;case 16:!function(e,t,n,i,r,s,o,a){let l,c,u,h=0;const d=m.width;for(u=t;u!==i;u+=n)for(c=r;c!==o;c+=s,h+=2)l=a[h+0]+(a[h+1]<<8),e[4*(c+d*u)+0]=(31744&l)>>7,e[4*(c+d*u)+1]=(992&l)>>2,e[4*(c+d*u)+2]=(31&l)<<3,e[4*(c+d*u)+3]=32768&l?0:255}(e,o,p,v,s,a,g,i);break;case 24:!function(e,t,n,i,r,s,o,a){let l,c,u=0;const h=m.width;for(c=t;c!==i;c+=n)for(l=r;l!==o;l+=s,u+=3)e[4*(l+h*c)+3]=255,e[4*(l+h*c)+2]=a[u+0],e[4*(l+h*c)+1]=a[u+1],e[4*(l+h*c)+0]=a[u+2]}(e,o,p,v,s,a,g,i);break;case 32:!function(e,t,n,i,r,s,o,a){let l,c,u=0;const h=m.width;for(c=t;c!==i;c+=n)for(l=r;l!==o;l+=s,u+=4)e[4*(l+h*c)+2]=a[u+0],e[4*(l+h*c)+1]=a[u+1],e[4*(l+h*c)+0]=a[u+2],e[4*(l+h*c)+3]=a[u+3]}(e,o,p,v,s,a,g,i);break;default:console.error("THREE.TGALoader: Format not supported.")}}(b,m.width,m.height,x.pixel_data,x.palettes),{data:b,width:m.width,height:m.height,flipY:!0,generateMipmaps:!0,minFilter:S}}}function sd(e,t){if(t===It)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===Mt||t===Bt){let n=e.getIndex();if(null===n){const t=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<i.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const i=n.count-2,r=[];if(t===Mt)for(let e=1;e<=i;e++)r.push(n.getX(0)),r.push(n.getX(e)),r.push(n.getX(e+1));else for(let e=0;e<i;e++)e%2==0?(r.push(n.getX(e)),r.push(n.getX(e+1)),r.push(n.getX(e+2))):(r.push(n.getX(e+2)),r.push(n.getX(e+1)),r.push(n.getX(e)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=e.clone();return s.setIndex(r),s.clearGroups(),s}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}class od extends pt{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new dd(e)})),this.register((function(e){return new wd(e)})),this.register((function(e){return new bd(e)})),this.register((function(e){return new pd(e)})),this.register((function(e){return new gd(e)})),this.register((function(e){return new md(e)})),this.register((function(e){return new vd(e)})),this.register((function(e){return new hd(e)})),this.register((function(e){return new yd(e)})),this.register((function(e){return new fd(e)})),this.register((function(e){return new cd(e)})),this.register((function(e){return new xd(e)})),this.register((function(e){return new Ad(e)}))}load(e,t,n,i){const r=this;let s;s=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:gt.extractUrlBase(e),this.manager.itemStart(e);const o=function(t){i?i(t):console.error(t),r.manager.itemError(e),r.manager.itemEnd(e)},a=new mt(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{r.parse(n,s,(function(n){t(n),r.manager.itemEnd(e)}),o)}catch(e){o(e)}}),n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r;const s={},o={},a=new TextDecoder;if("string"==typeof e)r=JSON.parse(e);else if(e instanceof ArrayBuffer){if(a.decode(new Uint8Array(e,0,4))===Td){try{s[ld.KHR_BINARY_GLTF]=new Dd(e)}catch(e){return void(i&&i(e))}r=JSON.parse(s[ld.KHR_BINARY_GLTF].content)}else r=JSON.parse(a.decode(e))}else r=e;if(void 0===r.asset||r.asset.version[0]<2)return void(i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const l=new Jd(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](l);o[t.name]=t,s[t.name]=!0}if(r.extensionsUsed)for(let e=0;e<r.extensionsUsed.length;++e){const t=r.extensionsUsed[e],n=r.extensionsRequired||[];switch(t){case ld.KHR_MATERIALS_UNLIT:s[t]=new ud;break;case ld.KHR_DRACO_MESH_COMPRESSION:s[t]=new Cd(r,this.dracoLoader);break;case ld.KHR_TEXTURE_TRANSFORM:s[t]=new Id;break;case ld.KHR_MESH_QUANTIZATION:s[t]=new Md;break;default:n.indexOf(t)>=0&&void 0===o[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(s),l.setPlugins(o),l.parse(n,i)}parseAsync(e,t){const n=this;return new Promise((function(i,r){n.parse(e,t,i,r)}))}}function ad(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const ld={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class cd{constructor(e){this.parser=e,this.name=ld.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){const i=t[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const r=t.json,s=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e];let o;const l=new a(16777215);void 0!==s.color&&l.fromArray(s.color);const c=void 0!==s.range?s.range:0;switch(s.type){case"directional":o=new ct(l),o.target.position.set(0,0,-1),o.add(o.target);break;case"point":o=new j(l),o.distance=c;break;case"spot":o=new ht(l),o.distance=c,s.spot=s.spot||{},s.spot.innerConeAngle=void 0!==s.spot.innerConeAngle?s.spot.innerConeAngle:0,s.spot.outerConeAngle=void 0!==s.spot.outerConeAngle?s.spot.outerConeAngle:Math.PI/4,o.angle=s.spot.outerConeAngle,o.penumbra=1-s.spot.innerConeAngle/s.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+s.type)}return o.position.set(0,0,0),o.decay=2,Wd(o,s),void 0!==s.intensity&&(o.intensity=s.intensity),o.name=t.createUniqueName(s.name||"light_"+e),i=Promise.resolve(o),t.cache.add(n,i),i}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,i=n.json.nodes[e],r=(i.extensions&&i.extensions[this.name]||{}).light;return void 0===r?null:this._loadLight(r).then((function(e){return n._getNodeRef(t.cache,r,e)}))}}class ud{constructor(){this.name=ld.KHR_MATERIALS_UNLIT}getMaterialType(){return z}extendParams(e,t,n){const i=[];e.color=new a(1,1,1),e.opacity=1;const r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const t=r.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==r.baseColorTexture&&i.push(n.assignTexture(e,"map",r.baseColorTexture,I))}return Promise.all(i)}}class hd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name].emissiveStrength;return void 0!==i&&(t.emissiveIntensity=i),Promise.resolve()}}class dd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];if(void 0!==s.clearcoatFactor&&(t.clearcoat=s.clearcoatFactor),void 0!==s.clearcoatTexture&&r.push(n.assignTexture(t,"clearcoatMap",s.clearcoatTexture)),void 0!==s.clearcoatRoughnessFactor&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),void 0!==s.clearcoatRoughnessTexture&&r.push(n.assignTexture(t,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),void 0!==s.clearcoatNormalTexture&&(r.push(n.assignTexture(t,"clearcoatNormalMap",s.clearcoatNormalTexture)),void 0!==s.clearcoatNormalTexture.scale)){const e=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new M(e,e)}return Promise.all(r)}}class fd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.iridescenceFactor&&(t.iridescence=s.iridescenceFactor),void 0!==s.iridescenceTexture&&r.push(n.assignTexture(t,"iridescenceMap",s.iridescenceTexture)),void 0!==s.iridescenceIor&&(t.iridescenceIOR=s.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==s.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),void 0!==s.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),void 0!==s.iridescenceThicknessTexture&&r.push(n.assignTexture(t,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class pd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[];t.sheenColor=new a(0,0,0),t.sheenRoughness=0,t.sheen=1;const s=i.extensions[this.name];return void 0!==s.sheenColorFactor&&t.sheenColor.fromArray(s.sheenColorFactor),void 0!==s.sheenRoughnessFactor&&(t.sheenRoughness=s.sheenRoughnessFactor),void 0!==s.sheenColorTexture&&r.push(n.assignTexture(t,"sheenColorMap",s.sheenColorTexture,I)),void 0!==s.sheenRoughnessTexture&&r.push(n.assignTexture(t,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(r)}}class gd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return void 0!==s.transmissionFactor&&(t.transmission=s.transmissionFactor),void 0!==s.transmissionTexture&&r.push(n.assignTexture(t,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class md{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];t.thickness=void 0!==s.thicknessFactor?s.thicknessFactor:0,void 0!==s.thicknessTexture&&r.push(n.assignTexture(t,"thicknessMap",s.thicknessTexture)),t.attenuationDistance=s.attenuationDistance||1/0;const o=s.attenuationColor||[1,1,1];return t.attenuationColor=new a(o[0],o[1],o[2]),Promise.all(r)}}class vd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const i=n.extensions[this.name];return t.ior=void 0!==i.ior?i.ior:1.5,Promise.resolve()}}class yd{constructor(e){this.parser=e,this.name=ld.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Rt:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];t.specularIntensity=void 0!==s.specularFactor?s.specularFactor:1,void 0!==s.specularTexture&&r.push(n.assignTexture(t,"specularIntensityMap",s.specularTexture));const o=s.specularColorFactor||[1,1,1];return t.specularColor=new a(o[0],o[1],o[2]),void 0!==s.specularColorTexture&&r.push(n.assignTexture(t,"specularColorMap",s.specularColorTexture,I)),Promise.all(r)}}class wd{constructor(e){this.parser=e,this.name=ld.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const r=i.extensions[this.name],s=t.options.ktx2Loader;if(!s){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,s)}}class bd{constructor(e){this.parser=e,this.name=ld.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const s=r.extensions[t],o=i.images[s.source];let a=n.textureLoader;if(o.uri){const e=n.options.manager.getHandler(o.uri);null!==e&&(a=e)}return this.detectSupport().then((function(r){if(r)return n.loadTextureImage(e,s.source,a);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class xd{constructor(e){this.name=ld.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],i=this.parser.getDependency("buffer",e.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then((function(t){const n=e.byteOffset||0,i=e.byteLength||0,s=e.count,o=e.byteStride,a=new Uint8Array(t,n,i);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,o,a,e.mode,e.filter).then((function(e){return e.buffer})):r.ready.then((function(){const t=new ArrayBuffer(s*o);return r.decodeGltfBuffer(new Uint8Array(t),s,o,a,e.mode,e.filter),t}))}))}return null}}class Ad{constructor(e){this.name=ld.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,i=n.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const s=n.meshes[i.mesh];for(const e of s.primitives)if(e.mode!==Od.TRIANGLES&&e.mode!==Od.TRIANGLE_STRIP&&e.mode!==Od.TRIANGLE_FAN&&void 0!==e.mode)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const e in o)a.push(this.parser.getDependency("accessor",o[e]).then((t=>(l[e]=t,l[e]))));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then((e=>{const n=e.pop(),i=n.isGroup?n.children:[n],s=e[0].count,o=[];for(const e of i){const n=new m,i=new t,a=new r,c=new t(1,1,1),u=new Pt(e.geometry,e.material,s);for(let e=0;e<s;e++)l.TRANSLATION&&i.fromBufferAttribute(l.TRANSLATION,e),l.ROTATION&&a.fromBufferAttribute(l.ROTATION,e),l.SCALE&&c.fromBufferAttribute(l.SCALE,e),u.setMatrixAt(e,n.compose(i,a,c));for(const t in l)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,l[t]);J.prototype.copy.call(u,e),u.frustumCulled=!1,this.parser.assignFinalMaterial(u),o.push(u)}return n.isGroup?(n.clear(),n.add(...o),n):o[0]})))}}const Td="glTF",Sd=1313821514,Ed=5130562;class Dd{constructor(e){this.name=ld.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Td)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-12,r=new DataView(e,12);let s=0;for(;s<i;){const t=r.getUint32(s,!0);s+=4;const i=r.getUint32(s,!0);if(s+=4,i===Sd){const i=new Uint8Array(e,12+s,t);this.content=n.decode(i)}else if(i===Ed){const n=12+s;this.body=e.slice(n,n+t)}s+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Cd{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ld.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,o={},a={},l={};for(const e in s){const t=Ud[e]||e.toLowerCase();o[t]=s[e]}for(const t in e.attributes){const i=Ud[t]||t.toLowerCase();if(void 0!==s[t]){const r=n.accessors[e.attributes[t]],s=_d[r.componentType];l[i]=s.name,a[i]=!0===r.normalized}}return t.getDependency("bufferView",r).then((function(e){return new Promise((function(t){i.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],i=a[t];void 0!==i&&(n.normalized=i)}t(e)}),o,l)}))}))}}class Id{constructor(){this.name=ld.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Md{constructor(){this.name=ld.KHR_MESH_QUANTIZATION}}class Bd extends Ft{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let e=0;e!==i;e++)t[e]=n[r+e];return t}interpolate_(e,t,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=2*o,l=3*o,c=i-t,u=(n-t)/c,h=u*u,d=h*u,f=e*l,p=f-l,g=-2*d+3*h,m=d-h,v=1-g,y=m-h+u;for(let e=0;e!==o;e++){const t=s[p+e+o],n=s[p+e+a]*c,i=s[f+e+o],l=s[f+e]*c;r[e]=v*t+y*n+g*i+m*l}return r}}const Rd=new r;class Pd extends Bd{interpolate_(e,t,n,i){const r=super.interpolate_(e,t,n,i);return Rd.fromArray(r).normalize().toArray(r),r}}const Od={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},_d={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Ld={9728:w,9729:A,9984:b,9985:T,9986:x,9987:S},kd={33071:E,33648:C,10497:D},Nd={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ud={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Fd={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},jd={CUBICSPLINE:void 0,LINEAR:y,STEP:g},zd="OPAQUE",Hd="MASK",Gd="BLEND";function Vd(e){return void 0===e.DefaultMaterial&&(e.DefaultMaterial=new F({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:L})),e.DefaultMaterial}function Yd(e,t,n){for(const i in n.extensions)void 0===e[i]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=n.extensions[i])}function Wd(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Xd(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,i=t.weights.length;n<i;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,i=n.length;t<i;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Qd(e){const t=e.extensions&&e.extensions[ld.KHR_DRACO_MESH_COMPRESSION];let n;return n=t?"draco:"+t.bufferView+":"+t.indices+":"+Kd(t.attributes):e.indices+":"+Kd(e.attributes)+":"+e.mode,n}function Kd(e){let t="";const n=Object.keys(e).sort();for(let i=0,r=n.length;i<r;i++)t+=n[i]+":"+e[n[i]]+";";return t}function Zd(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const qd=new m;class Jd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new ad,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,r=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||i&&r<98?this.textureLoader=new Je(this.options.manager):this.textureLoader=new Ot(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new mt(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const s={scene:t[0][i.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:i.asset,parser:n,userData:{}};Yd(r,s,i),Wd(s,i),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(s)}))).then((function(){e(s)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,i=t.length;n<i;n++){const i=t[n].joints;for(let t=0,n=i.length;t<n;t++)e[i[t]].isBone=!0}for(let t=0,i=e.length;t<i;t++){const i=e[t];void 0!==i.mesh&&(this._addNodeRef(this.meshCache,i.mesh),void 0!==i.skin&&(n[i.mesh].isSkinnedMesh=!0)),void 0!==i.camera&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const i=n.clone(),r=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,i]of e.children.entries())r(i,t.children[n])};return r(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const i=e(t[n]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let i=0;i<t.length;i++){const r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){const n=e+":"+t;let i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":i=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":i=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)})),!i)throw new Error("Unknown type: "+e)}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,i=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(i.map((function(t,i){return n.getDependency(e,i)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[ld.KHR_BINARY_GLTF].body);const i=this.options;return new Promise((function(e,r){n.load(gt.resolveURL(t.uri,i.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,i=t.byteOffset||0;return e.slice(i,i+n)}))}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(void 0===i.bufferView&&void 0===i.sparse){const e=Nd[i.type],t=_d[i.componentType],n=!0===i.normalized,r=new t(i.count*e);return Promise.resolve(new f(r,e,n))}const r=[];return void 0!==i.bufferView?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),void 0!==i.sparse&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then((function(e){const r=e[0],s=Nd[i.type],o=_d[i.componentType],a=o.BYTES_PER_ELEMENT,l=a*s,c=i.byteOffset||0,u=void 0!==i.bufferView?n.bufferViews[i.bufferView].byteStride:void 0,h=!0===i.normalized;let d,p;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+e+":"+i.count;let l=t.cache.get(n);l||(d=new o(r,e*u,i.count*u/a),l=new _t(d,u/a),t.cache.add(n,l)),p=new Lt(l,s,c%u/a,h)}else d=null===r?new o(i.count*s):new o(r,c,i.count*s),p=new f(d,s,h);if(void 0!==i.sparse){const t=Nd.SCALAR,n=_d[i.sparse.indices.componentType],a=i.sparse.indices.byteOffset||0,l=i.sparse.values.byteOffset||0,c=new n(e[1],a,i.sparse.count*t),u=new o(e[2],l,i.sparse.count*s);null!==r&&(p=new f(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(p.setX(t,u[e*s]),s>=2&&p.setY(t,u[e*s+1]),s>=3&&p.setZ(t,u[e*s+2]),s>=4&&p.setW(t,u[e*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,i=t.textures[e].source,r=t.images[i];let s=this.textureLoader;if(r.uri){const e=n.manager.getHandler(r.uri);null!==e&&(s=e)}return this.loadTextureImage(e,i,s)}loadTextureImage(e,t,n){const i=this,r=this.json,s=r.textures[e],o=r.images[t],a=(o.uri||o.bufferView)+":"+s.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=s.name||o.name||"";const n=(r.samplers||{})[s.sampler]||{};return t.magFilter=Ld[n.magFilter]||A,t.minFilter=Ld[n.minFilter]||S,t.wrapS=kd[n.wrapS]||D,t.wrapT=kd[n.wrapT]||D,i.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this,i=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const s=i.images[e],o=self.URL||self.webkitURL;let a=s.uri||"",c=!1;if(void 0!==s.bufferView)a=n.getDependency("bufferView",s.bufferView).then((function(e){c=!0;const t=new Blob([e],{type:s.mimeType});return a=o.createObjectURL(t),a}));else if(void 0===s.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(a).then((function(e){return new Promise((function(n,i){let s=n;!0===t.isImageBitmapLoader&&(s=function(e){const t=new l(e);t.needsUpdate=!0,n(t)}),t.load(gt.resolveURL(e,r.path),s,void 0,i)}))})).then((function(e){var t;return!0===c&&o.revokeObjectURL(a),e.userData.mimeType=s.mimeType||((t=s.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",a),e}));return this.sourceCache[e]=u,u}assignTexture(e,t,n,i){const r=this;return this.getDependency("texture",n.index).then((function(s){if(!s)return null;if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),r.extensions[ld.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[ld.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=r.associations.get(s);s=r.extensions[ld.KHR_TEXTURE_TRANSFORM].extendTexture(s,e),r.associations.set(s,t)}}return void 0!==i&&(s.encoding=i),e[t]=s,s}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=void 0===t.attributes.tangent,r=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new kt,Ae.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new q,Ae.prototype.copy.call(t,n),t.color.copy(n.color),this.cache.add(e,t)),n=t}if(i||r||s){let e="ClonedMaterial:"+n.uuid+":";i&&(e+="derivative-tangents:"),r&&(e+="vertex-colors:"),s&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),r&&(t.vertexColors=!0),s&&(t.flatShading=!0),i&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n}getMaterialType(){return F}loadMaterial(e){const t=this,n=this.json,i=this.extensions,r=n.materials[e];let s;const o={},l=[];if((r.extensions||{})[ld.KHR_MATERIALS_UNLIT]){const e=i[ld.KHR_MATERIALS_UNLIT];s=e.getMaterialType(),l.push(e.extendParams(o,r,t))}else{const n=r.pbrMetallicRoughness||{};if(o.color=new a(1,1,1),o.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;o.color.fromArray(e),o.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(t.assignTexture(o,"map",n.baseColorTexture,I)),o.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,o.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(t.assignTexture(o,"metalnessMap",n.metallicRoughnessTexture)),l.push(t.assignTexture(o,"roughnessMap",n.metallicRoughnessTexture))),s=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),l.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,o)}))))}!0===r.doubleSided&&(o.side=d);const c=r.alphaMode||zd;if(c===Gd?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,c===Hd&&(o.alphaTest=void 0!==r.alphaCutoff?r.alphaCutoff:.5)),void 0!==r.normalTexture&&s!==z&&(l.push(t.assignTexture(o,"normalMap",r.normalTexture)),o.normalScale=new M(1,1),void 0!==r.normalTexture.scale)){const e=r.normalTexture.scale;o.normalScale.set(e,e)}return void 0!==r.occlusionTexture&&s!==z&&(l.push(t.assignTexture(o,"aoMap",r.occlusionTexture)),void 0!==r.occlusionTexture.strength&&(o.aoMapIntensity=r.occlusionTexture.strength)),void 0!==r.emissiveFactor&&s!==z&&(o.emissive=(new a).fromArray(r.emissiveFactor)),void 0!==r.emissiveTexture&&s!==z&&l.push(t.assignTexture(o,"emissiveMap",r.emissiveTexture,I)),Promise.all(l).then((function(){const n=new s(o);return r.name&&(n.name=r.name),Wd(n,r),t.associations.set(n,{materials:e}),r.extensions&&Yd(i,n,r),n}))}createUniqueName(e){const t=p.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function r(e){return n[ld.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return $d(n,e,t)}))}const s=[];for(let n=0,o=e.length;n<o;n++){const o=e[n],a=Qd(o),l=i[a];if(l)s.push(l.promise);else{let e;e=o.extensions&&o.extensions[ld.KHR_DRACO_MESH_COMPRESSION]?r(o):$d(new xe,o,t),i[a]={primitive:o,promise:e},s.push(e)}}return Promise.all(s)}loadMesh(e){const t=this,n=this.json,i=this.extensions,r=n.meshes[e],s=r.primitives,o=[];for(let e=0,t=s.length;e<t;e++){const t=void 0===s[e].material?Vd(this.cache):this.getDependency("material",s[e].material);o.push(t)}return o.push(t.loadGeometries(s)),Promise.all(o).then((function(n){const o=n.slice(0,n.length-1),a=n[n.length-1],l=[];for(let n=0,c=a.length;n<c;n++){const c=a[n],u=s[n];let h;const d=o[n];if(u.mode===Od.TRIANGLES||u.mode===Od.TRIANGLE_STRIP||u.mode===Od.TRIANGLE_FAN||void 0===u.mode)h=!0===r.isSkinnedMesh?new xt(c,d):new k(c,d),!0!==h.isSkinnedMesh||h.geometry.attributes.skinWeight.normalized||h.normalizeSkinWeights(),u.mode===Od.TRIANGLE_STRIP?h.geometry=sd(h.geometry,Bt):u.mode===Od.TRIANGLE_FAN&&(h.geometry=sd(h.geometry,Mt));else if(u.mode===Od.LINES)h=new Z(c,d);else if(u.mode===Od.LINE_STRIP)h=new At(c,d);else if(u.mode===Od.LINE_LOOP)h=new Nt(c,d);else{if(u.mode!==Od.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+u.mode);h=new Ut(c,d)}Object.keys(h.geometry.morphAttributes).length>0&&Xd(h,r),h.name=t.createUniqueName(r.name||"mesh_"+e),Wd(h,r),u.extensions&&Yd(i,h,u),t.assignFinalMaterial(h),l.push(h)}for(let n=0,i=l.length;n<i;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return l[0];const c=new wt;t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(i)return"perspective"===n.type?t=new $(h.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):"orthographic"===n.type&&(t=new ee(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Wd(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n=[];for(let e=0,i=t.joints.length;e<i;e++)n.push(this.getDependency("node",t.joints[e]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(e){const n=e.pop(),i=e,r=[],s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e];if(o){r.push(o);const t=new m;null!==n&&t.fromArray(n.array,16*e),s.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}return new Tt(r,s)}))}loadAnimation(e){const t=this.json.animations[e],n=[],i=[],r=[],s=[],o=[];for(let e=0,a=t.channels.length;e<a;e++){const a=t.channels[e],l=t.samplers[a.sampler],c=a.target,u=c.node,h=void 0!==t.parameters?t.parameters[l.input]:l.input,d=void 0!==t.parameters?t.parameters[l.output]:l.output;n.push(this.getDependency("node",u)),i.push(this.getDependency("accessor",h)),r.push(this.getDependency("accessor",d)),s.push(l),o.push(c)}return Promise.all([Promise.all(n),Promise.all(i),Promise.all(r),Promise.all(s),Promise.all(o)]).then((function(n){const i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=[];for(let e=0,t=i.length;e<t;e++){const t=i[e],n=r[e],c=s[e],u=o[e],h=a[e];if(void 0===t)continue;let d;switch(t.updateMatrix(),Fd[h.path]){case Fd.weights:d=Ct;break;case Fd.rotation:d=Dt;break;default:d=Et}const f=t.name?t.name:t.uuid,p=void 0!==u.interpolation?jd[u.interpolation]:y,g=[];Fd[h.path]===Fd.weights?t.traverse((function(e){e.morphTargetInfluences&&g.push(e.name?e.name:e.uuid)})):g.push(f);let m=c.array;if(c.normalized){const e=Zd(m.constructor),t=new Float32Array(m.length);for(let n=0,i=m.length;n<i;n++)t[n]=m[n]*e;m=t}for(let e=0,t=g.length;e<t;e++){const t=new d(g[e]+"."+Fd[h.path],n.array,m,p);"CUBICSPLINE"===u.interpolation&&(t.createInterpolant=function(e){return new(this instanceof Dt?Pd:Bd)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}const c=t.name?t.name:"animation_"+e;return new We(c,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,i=t.nodes[e];return void 0===i.mesh?null:n.getDependency("mesh",i.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,i.mesh,e);return void 0!==i.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=i.weights.length;t<n;t++)e.morphTargetInfluences[t]=i.weights[t]})),t}))}loadNode(e){const t=this.json,n=this.extensions,i=this,r=t.nodes[e],s=r.name?i.createUniqueName(r.name):"";return function(){const t=[],n=i._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));n&&t.push(n),void 0!==r.camera&&t.push(i.getDependency("camera",r.camera).then((function(e){return i._getNodeRef(i.cameraCache,r.camera,e)}))),i._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)}));const s=[],o=r.children||[];for(let e=0,t=o.length;e<t;e++)s.push(i.getDependency("node",o[e]));const a=void 0===r.skin?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([Promise.all(t),Promise.all(s),a])}().then((function(t){const o=t[0],a=t[1],l=t[2];let c;if(c=!0===r.isBone?new bt:o.length>1?new wt:1===o.length?o[0]:new J,c!==o[0])for(let e=0,t=o.length;e<t;e++)c.add(o[e]);if(r.name&&(c.userData.name=r.name,c.name=s),Wd(c,r),r.extensions&&Yd(n,c,r),void 0!==r.matrix){const e=new m;e.fromArray(r.matrix),c.applyMatrix4(e)}else void 0!==r.translation&&c.position.fromArray(r.translation),void 0!==r.rotation&&c.quaternion.fromArray(r.rotation),void 0!==r.scale&&c.scale.fromArray(r.scale);i.associations.has(c)||i.associations.set(c,{}),i.associations.get(c).nodes=e,null!==l&&c.traverse((function(e){e.isSkinnedMesh&&e.bind(l,qd)}));for(let e=0,t=a.length;e<t;e++)c.add(a[e]);return c}))}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,r=new wt;n.name&&(r.name=i.createUniqueName(n.name)),Wd(r,n),n.extensions&&Yd(t,r,n);const s=n.nodes||[],o=[];for(let e=0,t=s.length;e<t;e++)o.push(i.getDependency("node",s[e]));return Promise.all(o).then((function(e){for(let t=0,n=e.length;t<n;t++)r.add(e[t]);return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof Ae||e instanceof l)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(r),r}))}}function $d(e,n,r){const s=n.attributes,o=[];function a(t,n){return r.getDependency("accessor",t).then((function(t){e.setAttribute(n,t)}))}for(const t in s){const n=Ud[t]||t.toLowerCase();n in e.attributes||o.push(a(s[t],n))}if(void 0!==n.indices&&!e.index){const t=r.getDependency("accessor",n.indices).then((function(t){e.setIndex(t)}));o.push(t)}return Wd(e,n),function(e,n,r){const s=n.attributes,o=new i;if(void 0===s.POSITION)return;{const e=r.json.accessors[s.POSITION],n=e.min,i=e.max;if(void 0===n||void 0===i)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(o.set(new t(n[0],n[1],n[2]),new t(i[0],i[1],i[2])),e.normalized){const t=Zd(_d[e.componentType]);o.min.multiplyScalar(t),o.max.multiplyScalar(t)}}const a=n.targets;if(void 0!==a){const e=new t,n=new t;for(let t=0,i=a.length;t<i;t++){const i=a[t];if(void 0!==i.POSITION){const t=r.json.accessors[i.POSITION],s=t.min,o=t.max;if(void 0!==s&&void 0!==o){if(n.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),n.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),n.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),t.normalized){const e=Zd(_d[t.componentType]);n.multiplyScalar(e)}e.max(n)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}o.expandByVector(e)}e.boundingBox=o;const l=new O;o.getCenter(l.center),l.radius=o.min.distanceTo(o.max)/2,e.boundingSphere=l}(e,n,r),Promise.all(o).then((function(){return void 0!==n.targets?function(e,t,n){let i=!1,r=!1,s=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(i=!0),void 0!==n.NORMAL&&(r=!0),void 0!==n.COLOR_0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(e);const o=[],a=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(i){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;o.push(t)}if(r){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(s){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then((function(t){const n=t[0],o=t[1],a=t[2];return i&&(e.morphAttributes.position=n),r&&(e.morphAttributes.normal=o),s&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,n.targets,r):e}))}const ef=new WeakMap;class tf extends pt{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const r=new mt(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,(e=>{this.decodeDracoFile(e,t).catch(i)}),n,i)}decodeDracoFile(e,t,n,i){const r={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!n};return this.decodeGeometry(e,r).then(t)}decodeGeometry(e,t){const n=JSON.stringify(t);if(ef.has(e)){const t=ef.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const r=this.workerNextTaskID++,s=e.byteLength,o=this._getWorker(r,s).then((n=>(i=n,new Promise(((n,s)=>{i._callbacks[r]={resolve:n,reject:s},i.postMessage({type:"decode",id:r,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return o.catch((()=>!0)).then((()=>{i&&r&&this._releaseTask(i,r)})),ef.set(e,{key:n,promise:o}),o}_createGeometry(e){const t=new xe;e.index&&t.setIndex(new f(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const i=e.attributes[n],r=i.name,s=i.array,o=i.itemSize;t.setAttribute(r,new f(s,o))}return t}_loadLibrary(e,t){const n=new mt(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,i)=>{n.load(e,t,void 0,i)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const i=nf.toString(),r=["/* draco decoder */",n,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,""!==this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),this}}function nf(){let e,t;function n(e,t,n,i,r,s){const o=s.num_components(),a=n.num_points()*o,l=a*r.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,r),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,s,c,l,u);const h=new r(e.HEAPF32.buffer,u,a).slice();return e._free(u),{name:i,array:h,itemSize:o}}onmessage=function(i){const r=i.data;switch(r.type){case"init":e=r.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const i=r.buffer,s=r.taskConfig;t.then((e=>{const t=e.draco,o=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(i),i.byteLength);try{const e=function(e,t,i,r){const s=r.attributeIDs,o=r.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(i);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(i,a);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(i,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const i in s){const l=self[o[i]];let c,h;if(r.useUniqueIDs)h=s[i],c=t.GetAttributeByUniqueId(a,h);else{if(h=t.GetAttributeId(a,e[s[i]]),-1===h)continue;c=t.GetAttribute(a,h)}u.attributes.push(n(e,t,a,i,l,c))}c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const i=n.num_faces(),r=3*i,s=4*r,o=e._malloc(s);t.GetTrianglesUInt32Array(n,s,o);const a=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:a,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,o,a,s),i=e.attributes.map((e=>e.array.buffer));e.index&&i.push(e.index.array.buffer),self.postMessage({type:"decode",id:r.id,geometry:e},i)}catch(e){console.error(e),self.postMessage({type:"error",id:r.id,error:e.message})}finally{t.destroy(a),t.destroy(o)}}))}}}function rf(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sf={};({get exports(){return sf},set exports(e){sf=e}}).exports=function e(t,n,i){function r(o,a){if(!n[o]){if(!t[o]){if(!a&&rf)return rf(o);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return r(n||e)}),c,c.exports,e,t,n,i)}return n[o].exports}for(var s=rf,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){(function(e){var n,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var s=0,o=new r(u),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;i=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}i=!1}function h(e){1!==c.push(e)||i||n()}t.exports=h}).call(this,void 0!==Ms?Ms:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){i((function(){var i;try{i=t(n)}catch(t){return s.reject(e,t)}i===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,i)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function i(t){n||(n=!0,s.reject(e,t))}function r(t){n||(n=!0,s.resolve(e,t))}function o(){t(r,i)}var a=p(o);"error"===a.status&&i(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function g(e){return e instanceof this?e:s.resolve(new this(r),e)}function m(e){var t=new this(r);return s.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(r);++l<n;)u(e[l],l);return c;function u(e,r){function l(e){o[r]=e,++a!==n||i||(i=!0,s.resolve(c,o))}t.resolve(e).then(l,(function(e){i||(i=!0,s.reject(c,e))}))}}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var o=-1,a=new this(r);++o<n;)l(e[o]);return a;function l(e){t.resolve(e).then((function(e){i||(i=!0,s.resolve(a,e))}),(function(e){i||(i=!0,s.reject(a,e))}))}}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(r);return this.state!==l?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){s.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},s.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return s.reject(e,n.value);var i=n.value;if(i)f(e,i);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},c.resolve=g,c.reject=m,c.all=v,c.race=y},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Ms?Ms:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var o=s();function a(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<e.length;i+=1)n.append(e[i]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var c=Promise;function u(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function h(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function d(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",g=void 0,m={},v=Object.prototype.toString,y="readonly",w="readwrite";function b(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r<t;r++)i[r]=e.charCodeAt(r);return n}function x(e){return new c((function(t){var n=e.transaction(p,w),i=l([""]);n.objectStore(p).put(i,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}function A(e){return"boolean"==typeof g?c.resolve(g):x(e).then((function(e){return g=e}))}function T(e){var t=m[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=m[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function E(e,t){var n=m[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function D(e,t){return new c((function(n,i){if(m[e.name]=m[e.name]||k(),e.db){if(!t)return n(e.db);T(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var s=o.open.apply(o,r);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),i(s.error)},s.onsuccess=function(){n(s.result),S(e)}}))}function C(e){return D(e,!1)}function I(e){return D(e,!0)}function M(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,r=e.version>e.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function B(e){return new c((function(t,n){var i=new FileReader;i.onerror=n,i.onloadend=function(n){var i=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)}))}function R(e){return l([b(atob(e.data))],{type:e.type})}function P(e){return e&&e.__local_forage_encoded_blob}function O(e){var t=this,n=t._initReady().then((function(){var e=m[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return h(n,e,e),n}function _(e){T(e);for(var t=m[e.name],n=t.forages,i=0;i<n.length;i++){var r=n[i];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,C(e).then((function(t){return e.db=t,M(e)?I(e):t})).then((function(i){e.db=t.db=i;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=i})).catch((function(t){throw E(e,t),t}))}function L(e,t,n,i){void 0===i&&(i=1);try{var r=e.db.transaction(e.storeName,t);n(null,r)}catch(r){if(i>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),I(e)})).then((function(){return _(e).then((function(){L(e,t,n,i-1)}))})).catch(n);n(r)}}function k(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function N(e){var t=this,n={db:null};if(e)for(var i in e)n[i]=e[i];var r=m[n.name];r||(r=k(),m[n.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=O);var s=[];function o(){return c.resolve()}for(var a=0;a<r.forages.length;a++){var l=r.forages[a];l!==t&&s.push(l._initReady().catch(o))}var u=r.forages.slice(0);return c.all(s).then((function(){return n.db=r.db,C(n)})).then((function(e){return n.db=e,M(n,t._defaultConfig.version)?I(n):e})).then((function(e){n.db=r.db=e,t._dbInfo=n;for(var i=0;i<u.length;i++){var s=u[i];s!==t&&(s._dbInfo.db=n.db,s._dbInfo.version=n.version)}}))}function U(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),P(e)&&(e=R(e)),t(e)},o.onerror=function(){i(o.error)}}catch(e){i(e)}}))})).catch(i)}));return u(i,t),i}function F(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var n=o.result;if(n){var i=n.value;P(i)&&(i=R(i));var r=e(i,n.key,a++);void 0!==r?t(r):n.continue()}else t()},o.onerror=function(){i(o.error)}}catch(e){i(e)}}))})).catch(i)}));return u(i,t),i}function j(e,t,n){var i=this;e=d(e);var r=new c((function(n,r){var s;i.ready().then((function(){return s=i._dbInfo,"[object Blob]"===v.call(t)?A(s.db).then((function(e){return e?t:B(t)})):t})).then((function(t){L(i._dbInfo,w,(function(s,o){if(s)return r(s);try{var a=o.objectStore(i._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),n(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return u(r,n),r}function z(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,w,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).delete(e);s.oncomplete=function(){t()},s.onerror=function(){i(o.error)},s.onabort=function(){var e=o.error?o.error:o.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return u(i,t),i}function H(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,w,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=s.error?s.error:s.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return u(n,e),n}function G(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,y,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).count();s.onsuccess=function(){e(s.result)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,e),n}function V(e,t){var n=this,i=new c((function(t,i){e<0?t(null):n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){i(l.error)}}catch(e){i(e)}}))})).catch(i)}));return u(i,t),i}function Y(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,y,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var t=s.result;t?(o.push(t.key),t.continue()):e(o)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return u(n,e),n}function W(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i,r=this;if(e.name){var s=e.name===n.name&&r._dbInfo.db?c.resolve(r._dbInfo.db):C(e).then((function(t){var n=m[e.name],i=n.forages;n.db=t;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=t;return t}));i=e.storeName?s.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;T(e);var i=m[e.name],r=i.forages;t.close();for(var s=0;s<r.length;s++){var a=r[s];a._dbInfo.db=null,a._dbInfo.version=n}var l=new c((function(t,i){var r=o.open(e.name,n);r.onerror=function(e){r.result.close(),i(e)},r.onupgradeneeded=function(){r.result.deleteObjectStore(e.storeName)},r.onsuccess=function(){var e=r.result;e.close(),t(e)}}));return l.then((function(e){i.db=e;for(var t=0;t<r.length;t++){var n=r[t];n._dbInfo.db=e,S(n._dbInfo)}})).catch((function(t){throw(E(e,t)||c.resolve()).catch((function(){})),t}))}})):s.then((function(t){T(e);var n=m[e.name],i=n.forages;t.close();for(var r=0;r<i.length;r++)i[r]._dbInfo.db=null;var s=new c((function(t,n){var i=o.deleteDatabase(e.name);i.onerror=i.onblocked=function(e){var t=i.result;t&&t.close(),n(e)},i.onsuccess=function(){var e=i.result;e&&e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<i.length;t++)S(i[t]._dbInfo)})).catch((function(t){throw(E(e,t)||c.resolve()).catch((function(){})),t}))}))}else i=c.reject("Invalid arguments");return u(i,t),i}var X={_driver:"asyncStorage",_initStorage:N,_support:a(),iterate:F,getItem:U,setItem:j,removeItem:z,clear:H,length:G,key:V,keys:Y,dropInstance:W};function Q(){return"function"==typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z="~~local_forage_type~",q=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",$=J.length,ee="arbf",te="blob",ne="si08",ie="ui08",re="uic8",se="si16",oe="si32",ae="ur16",le="ui32",ce="fl32",ue="fl64",he=$+ee.length,de=Object.prototype.toString;function fe(e){var t,n,i,r,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=K.indexOf(e[t]),i=K.indexOf(e[t+1]),r=K.indexOf(e[t+2]),s=K.indexOf(e[t+3]),u[l++]=n<<2|i>>4,u[l++]=(15&i)<<4|r>>2,u[l++]=(3&r)<<6|63&s;return c}function pe(e){var t,n=new Uint8Array(e),i="";for(t=0;t<n.length;t+=3)i+=K[n[t]>>2],i+=K[(3&n[t])<<4|n[t+1]>>4],i+=K[(15&n[t+1])<<2|n[t+2]>>6],i+=K[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}function ge(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var i,r=J;e instanceof ArrayBuffer?(i=e,r+=ee):(i=e.buffer,"[object Int8Array]"===n?r+=ne:"[object Uint8Array]"===n?r+=ie:"[object Uint8ClampedArray]"===n?r+=re:"[object Int16Array]"===n?r+=se:"[object Uint16Array]"===n?r+=ae:"[object Int32Array]"===n?r+=oe:"[object Uint32Array]"===n?r+=le:"[object Float32Array]"===n?r+=ce:"[object Float64Array]"===n?r+=ue:t(new Error("Failed to get type for BinaryArray"))),t(r+pe(i))}else if("[object Blob]"===n){var s=new FileReader;s.onload=function(){var n=Z+e.type+"~"+pe(this.result);t(J+te+n)},s.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function me(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(he),i=e.substring($,he);if(i===te&&q.test(n)){var r=n.match(q);t=r[1],n=n.substring(r[0].length)}var s=fe(n);switch(i){case ee:return s;case te:return l([s],{type:t});case ne:return new Int8Array(s);case ie:return new Uint8Array(s);case re:return new Uint8ClampedArray(s);case se:return new Int16Array(s);case ae:return new Uint16Array(s);case oe:return new Int32Array(s);case le:return new Uint32Array(s);case ce:return new Float32Array(s);case ue:return new Float64Array(s);default:throw new Error("Unkown type: "+i)}}var ve={serialize:ge,deserialize:me,stringToBuffer:fe,bufferToString:pe};function ye(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function we(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var r=new c((function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return i(e)}n.db.transaction((function(r){ye(r,n,(function(){t._dbInfo=n,e()}),(function(e,t){i(t)}))}),i)}));return n.serializer=ve,r}function be(e,t,n,i,r,s){e.executeSql(n,i,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?s(e,o):ye(e,t,(function(){e.executeSql(n,i,r,s)}),s)}),s):s(e,o)}),s)}function xe(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return u(i,t),i}function Ae(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName,[],(function(n,i){for(var s=i.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){i(t)}))}))})).catch(i)}));return u(i,t),i}function Te(e,t,n,i){var r=this;e=d(e);var s=new c((function(s,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(n){be(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){s(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void s(Te.apply(r,[e,a,n,i-1]));o(t)}}))}))})).catch(o)}));return u(s,n),s}function Se(e,t,n){return Te.apply(this,[e,t,n,1])}function Ee(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return u(i,t),i}function De(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,n){var i=n.rows.item(0).c;e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ie(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return u(i,t),i}function Me(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"SELECT key FROM "+i.storeName,[],(function(t,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Be(e){return new c((function(t,n){e.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],s=0;s<i.rows.length;s++)r.push(i.rows.item(s).name);t({db:e,storeNames:r})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Re(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i,r=this;return i=e.name?new c((function(t){var i;i=e.name===n.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:i,storeNames:[e.storeName]}):t(Be(i))})).then((function(e){return new c((function(t,n){e.db.transaction((function(i){function r(e){return new c((function(t,n){i.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var s=[],o=0,a=e.storeNames.length;o<a;o++)s.push(r(e.storeNames[o]));c.all(s).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):c.reject("Invalid arguments"),u(i,t),i}var Pe={_driver:"webSQLStorage",_initStorage:we,_support:Q(),iterate:Ae,getItem:xe,setItem:Se,removeItem:Ee,clear:De,length:Ce,key:Ie,keys:Me,dropInstance:Re};function Oe(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function _e(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Le(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function ke(){return!Le()||localStorage.length>0}function Ne(e){var t=this,n={};if(e)for(var i in e)n[i]=e[i];return n.keyPrefix=_e(e,t._defaultConfig),ke()?(t._dbInfo=n,n.serializer=ve,c.resolve()):c.reject()}function Ue(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return u(n,e),n}function Fe(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return u(i,t),i}function je(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,r=i.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(i)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return u(i,t),i}function ze(e,t){var n=this,i=n.ready().then((function(){var t,i=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t}));return u(i,t),i}function He(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++){var s=localStorage.key(r);0===s.indexOf(e.keyPrefix)&&i.push(s.substring(e.keyPrefix.length))}return i}));return u(n,e),n}function Ge(e){var t=this.keys().then((function(e){return e.length}));return u(t,e),t}function Ve(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return u(i,t),i}function Ye(e,t,n){var i=this;e=d(e);var r=i.ready().then((function(){void 0===t&&(t=null);var n=t;return new c((function(r,s){var o=i._dbInfo;o.serializer.serialize(t,(function(t,i){if(i)s(i);else try{localStorage.setItem(o.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||s(e),s(e)}}))}))}));return u(r,n),r}function We(e,t){if(t=f.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var i,r=this;return i=e.name?new c((function(t){e.storeName?t(_e(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),u(i,t),i}var Xe={_driver:"localStorageWrapper",_initStorage:Ne,_support:Oe(),iterate:je,getItem:Fe,setItem:Ye,removeItem:Ve,clear:Ue,length:Ge,key:ze,keys:He,dropInstance:We},Qe=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){for(var n=e.length,i=0;i<n;){if(Qe(e[i],t))return!0;i++}return!1},Ze=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},qe={},Je={},$e={INDEXEDDB:X,WEBSQL:Pe,LOCALSTORAGE:Xe},et=[$e.INDEXEDDB._driver,$e.WEBSQL._driver,$e.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),it={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function rt(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function st(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Ze(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ot=function(){function e(t){for(var n in r(this,e),$e)if($e.hasOwnProperty(n)){var i=$e[n],s=i._driver;this[n]=s,qe[s]||this.defineDriver(i)}this._defaultConfig=st({},it),this._config=st({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":i(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var i=new c((function(t,n){try{var i=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(r);for(var s=nt.concat("_initStorage"),o=0,a=s.length;o<a;o++){var l=s[o];if((!Ke(tt,l)||e[l])&&"function"!=typeof e[l])return void n(r)}var h=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=c.reject(t);return u(n,arguments[arguments.length-1]),n}},n=0,i=tt.length;n<i;n++){var r=tt[n];e[r]||(e[r]=t(r))}};h();var d=function(n){qe[i]&&console.info("Redefining LocalForage driver: "+i),qe[i]=e,Je[i]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}}));return h(i,t,n),i},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var i=qe[e]?c.resolve(qe[e]):c.reject(new Error("Driver not found."));return h(i,t,n),i},e.prototype.getSerializer=function(e){var t=c.resolve(ve);return h(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return h(n,e,e),n},e.prototype.setDriver=function(e,t,n){var i=this;Ze(e)||(e=[e]);var r=this._getSupportedDrivers(e);function s(){i._config.driver=i.driver()}function o(e){return i._extend(e),s(),i._ready=i._initStorage(i._config),i._ready}function a(e){return function(){var t=0;function n(){for(;t<e.length;){var r=e[t];return t++,i._dbInfo=null,i._ready=null,i.getDriver(r).then(o).catch(n)}s();var a=new Error("No available storage method found.");return i._driverSet=c.reject(a),i._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return c.resolve()})):c.resolve();return this._driverSet=l.then((function(){var e=r[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then((function(e){i._driver=e._driver,s(),i._wrapLibraryMethodsWithReady(),i._initDriver=a(r)}))})).catch((function(){s();var e=new Error("No available storage method found.");return i._driverSet=c.reject(e),i._driverSet})),h(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Je[e]},e.prototype._extend=function(e){st(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)rt(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new ot;t.exports=at},{3:3}]},{},[4])(4);class of{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:t,msg:n,transfer:i}=this.queue.shift();this.workersResolve[e]=t,this.workers[e].postMessage(n,i)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise((n=>{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=n,this.workers[i].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})}))}dispose(){this.workers.forEach((e=>e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const af=()=>{self.noCompressWorker=function(e,t){const[n]=new Uint32Array(e,t,1),i={byteOffset:t+=4,length:3*n},r={byteOffset:t+=3*n*4,length:2*n},s={byteOffset:t+=2*n*4,length:4*n},o={byteOffset:t+=4*n*1,length:3*n};t+=3*n*1;let a=(s.length+o.length)%4;a>0&&(a=4-a,t+=a);const l=new Uint32Array(e,t,1);t+=4;const[c]=l,u={byteOffset:t,length:c};t+=4*c;const h=new Uint32Array(e,t,1);t+=4;const[d]=h,f=[];if(d>0)for(let n=0;n<d;n++){const[n]=new Uint32Array(e,t,1);t+=4;const[i]=new Uint32Array(e,t,1);t+=4;const[r]=new Uint32Array(e,t,1);t+=4;const[s]=new Uint32Array(e,t,1);t+=4;const o=new Uint8Array(e,t,s);t+=s;const a=(new TextDecoder).decode(o);f.push({start:n,count:i,uuid:a,alphaMode:r})}return{buffer:e,position:i,normal:o,color:s,texcoord:r,indice:u,sub_mesh:f}}},lf=()=>{self.gzipCompressWorker=function(e){const t=new Uint8Array(e,4,e.byteLength-4),n=new pako.Inflate;n.push(t,!0);const{result:i}=n;if(i instanceof Uint8Array){const{buffer:e}=i;let t=0;const[n]=new Uint32Array(e,t,1);t+=4;const r={byteOffset:t,length:3*n};t+=3*n*4;const s={byteOffset:t,length:2*n};t+=2*n*4;const o={byteOffset:t,length:4*n};t+=4*n*1;const a={byteOffset:t,length:3*n};t+=3*n*1;let l=(o.length+a.length)%4;l>0&&(l=4-l,t+=l);const c=new Uint32Array(e,t,1);t+=4;const[u]=c,h={byteOffset:t,length:u};t+=4*u;const d=new Uint32Array(e,t,1);t+=4;const[f]=d,p=[];if(f>0)for(let n=0;n<f;n++){const[n]=new Uint32Array(e,t,1);t+=4;const[i]=new Uint32Array(e,t,1);t+=4;const[r]=new Uint32Array(e,t,1);t+=4;const[s]=new Uint32Array(e,t,1);t+=4;const o=new Uint8Array(e,t,s);t+=s;const a=(new TextDecoder).decode(o);p.push({start:n,count:i,uuid:a,alphaMode:r})}return{buffer:e,position:r,normal:a,color:o,texcoord:s,indice:h,sub_mesh:p}}}},cf=()=>{self.parseChunkWorker=function(e){let t=0;const n=new Int8Array(e,t,128);t+=128,(new TextDecoder).decode(n.slice(0,4));const[i]=n.slice(4,8);if(0===i)return self.noCompressWorker(e,t);if(1===i){const t=e.slice(128);return self.gzipCompressWorker(t)}throw new Error("unknown compress mode [ .sbmx model ]")}},uf="\n onmessage = function ( e ) {\n \n const message = e.data\n\n switch ( message.type ) {\n\n case 'decode': {\n\n const chunkInfo = self.parseChunkWorker( message.data )\n\n if ( chunkInfo ) { \n\n self.postMessage( \n { type: 'decode', data: chunkInfo, }, \n [ chunkInfo.buffer ]\n )\n\n } else {\n\n self.postMessage( { type: 'decode', data: {}, } )\n\n }\n\n break\n \n }\n \n }\n\n }\n\n",hf="textureIndex.json";class df extends pt{constructor(e){super(),this.store=e,this.loadedTextures=new Map,this.loadedMaterialsMap=new Map,this.defaultMaterial=new F({name:"defaultDatMaterial",color:0}),this.loadedMaterials=[this.defaultMaterial],this.dracoDecoderPath=null,this.workerPool=new of(4),this.workerSourceURL="";const t=this._initWorkerCreator();this.workerPool.setWorkerCreator(t)}parseAsync(e,t){return Fn(this,void 0,void 0,(function*(){const[n]=yield Promise.allSettled([this._decodeBuffer(e,t),this._createMaterial(t)]);if("fulfilled"===n.status&&n.value){const e=Rn(t),i=this._createMesh(n.value,e),r=new wt;return r.add(i),r}}))}_decodeBuffer(e,t){return Fn(this,void 0,void 0,(function*(){const n=yield this.store.getItem(`${t}_object`);if(n)return n;const[{data:i}]=yield Promise.all([this.workerPool.postMessage({type:"decode",data:e},[e])]);if(i){const{type:e,data:n}=null!=i?i:{};if("decode"===e&&n){const{buffer:{byteLength:e}}=n;return Fi(e)&&e/1024/1024<=500&&Kn((()=>{this.store.setItem(`${t}_object`,n)})),n}}}))}_initWorkerCreator(){if(!this.workerSourceURL){const e=af.toString(),t=lf.toString(),n=cf.toString(),i=["/* dat decoder */",["/* pako */","\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.pako = {}));\n}(this, (function (exports) { 'use strict';\n\n // Note: adler32 takes 12% for level 0 and 2% for level 6.\n // It isn't worth it to make additional optimizations as in original.\n // Small size is preferable.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express ofr implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n const adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n };\n\n\n var adler32_1 = adler32;\n\n // Note: we can't get significant speed boost here.\n // So write code to minimize size - no pregenerated tables\n // and array tools dependencies.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // Use ordinary array, since untyped makes no boost here\n const makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n };\n\n // Create table on load. Just 255 signed longs. Not a problem.\n const crcTable = new Uint32Array(makeTable());\n\n\n const crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n };\n\n\n var crc32_1 = crc32;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // See state defs from inflate.js\n const BAD$1 = 30; /* got a data error -- remain here until reset */\n const TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\n\n /*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\n var inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n //#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n //#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n //#ifdef INFLATE_STRICT\n dmax = state.dmax;\n //#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\" :\n // \"inflate: literal 0x%02x\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n //#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n //#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // if (len <= op - whave) {\n // do {\n // output[_out++] = 0;\n // } while (--len);\n // continue top;\n // }\n // len -= op - whave;\n // do {\n // output[_out++] = 0;\n // } while (--op > whave);\n // if (op === 0) {\n // from = _out - dist;\n // do {\n // output[_out++] = output[from++];\n // } while (--len);\n // continue top;\n // }\n //#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n const MAXBITS = 15;\n const ENOUGH_LENS$1 = 852;\n const ENOUGH_DISTS$1 = 592;\n //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n const CODES$1 = 0;\n const LENS$1 = 1;\n const DISTS$1 = 2;\n\n const lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n ]);\n\n const lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n ]);\n\n const dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n ]);\n\n const dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n ]);\n\n const inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n {\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n // let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS$1) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n };\n\n\n var inftrees = inflate_table;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var constants$1 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\n const CODES = 0;\n const LENS = 1;\n const DISTS = 2;\n\n /* Public constants ==========================================================*/\n /* ===========================================================================*/\n\n const {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n } = constants$1;\n\n\n /* STATES ====================================================================*/\n /* ===========================================================================*/\n\n\n const HEAD = 1; /* i: waiting for magic header */\n const FLAGS = 2; /* i: waiting for method and flags (gzip) */\n const TIME = 3; /* i: waiting for modification time (gzip) */\n const OS = 4; /* i: waiting for extra flags and operating system (gzip) */\n const EXLEN = 5; /* i: waiting for extra length (gzip) */\n const EXTRA = 6; /* i: waiting for extra bytes (gzip) */\n const NAME = 7; /* i: waiting for end of file name (gzip) */\n const COMMENT = 8; /* i: waiting for end of comment (gzip) */\n const HCRC = 9; /* i: waiting for header crc (gzip) */\n const DICTID = 10; /* i: waiting for dictionary check value */\n const DICT = 11; /* waiting for inflateSetDictionary() call */\n const TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n const TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\n const STORED = 14; /* i: waiting for stored size (length and complement) */\n const COPY_ = 15; /* i/o: same as COPY below, but only first time in */\n const COPY = 16; /* i/o: waiting for input or output to copy stored block */\n const TABLE = 17; /* i: waiting for dynamic block table lengths */\n const LENLENS = 18; /* i: waiting for code length code lengths */\n const CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\n const LEN_ = 20; /* i: same as LEN below, but only first time in */\n const LEN = 21; /* i: waiting for length/lit/eob code */\n const LENEXT = 22; /* i: waiting for length extra bits */\n const DIST = 23; /* i: waiting for distance code */\n const DISTEXT = 24; /* i: waiting for distance extra bits */\n const MATCH = 25; /* o: waiting for output space to copy string */\n const LIT = 26; /* o: waiting for output space to write literal */\n const CHECK = 27; /* i: waiting for 32-bit check value */\n const LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\n const DONE = 29; /* finished check, done -- remain here until reset */\n const BAD = 30; /* got a data error -- remain here until reset */\n const MEM = 31; /* got an inflate() memory error -- remain here until reset */\n const SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n /* ===========================================================================*/\n\n\n\n const ENOUGH_LENS = 852;\n const ENOUGH_DISTS = 592;\n //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n const MAX_WBITS = 15;\n /* 32K LZ77 window */\n const DEF_WBITS = MAX_WBITS;\n\n\n const zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n };\n\n\n function InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n }\n\n\n const inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\"));\n return Z_OK$1;\n };\n\n\n const inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n };\n\n\n const inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n };\n\n\n const inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n };\n\n\n const inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n };\n\n\n /*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\n let virgin = true;\n\n let lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\n const fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n };\n\n\n /*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\n const updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n };\n\n\n const inflate$1 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n //#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracev((stderr, \"inflate: table sizes ok\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\" :\n // \"inflate: literal 0x%02x\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracevv((stderr, \"inflate: distance %u\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // Trace((stderr, \"inflate.c too far\"));\n // copy -= state.whave;\n // if (copy > state.length) { copy = state.length; }\n // if (copy > left) { copy = left; }\n // left -= copy;\n // state.length -= copy;\n // do {\n // output[put++] = 0;\n // } while (--copy);\n // if (state.length === 0) { state.mode = LEN; }\n // break;\n //#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n };\n\n\n const inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n };\n\n\n const inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n };\n\n\n const inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\"));\n return Z_OK$1;\n };\n\n\n var inflateReset_1 = inflateReset;\n var inflateReset2_1 = inflateReset2;\n var inflateResetKeep_1 = inflateResetKeep;\n var inflateInit_1 = inflateInit;\n var inflateInit2_1 = inflateInit2;\n var inflate_2$1 = inflate$1;\n var inflateEnd_1 = inflateEnd;\n var inflateGetHeader_1 = inflateGetHeader;\n var inflateSetDictionary_1 = inflateSetDictionary;\n var inflateInfo = 'pako inflate (from Nodeca project)';\n\n /* Not implemented\n module.exports.inflateCopy = inflateCopy;\n module.exports.inflateGetDictionary = inflateGetDictionary;\n module.exports.inflateMark = inflateMark;\n module.exports.inflatePrime = inflatePrime;\n module.exports.inflateSync = inflateSync;\n module.exports.inflateSyncPoint = inflateSyncPoint;\n module.exports.inflateUndermine = inflateUndermine;\n */\n\n var inflate_1$1 = {\n \tinflateReset: inflateReset_1,\n \tinflateReset2: inflateReset2_1,\n \tinflateResetKeep: inflateResetKeep_1,\n \tinflateInit: inflateInit_1,\n \tinflateInit2: inflateInit2_1,\n \tinflate: inflate_2$1,\n \tinflateEnd: inflateEnd_1,\n \tinflateGetHeader: inflateGetHeader_1,\n \tinflateSetDictionary: inflateSetDictionary_1,\n \tinflateInfo: inflateInfo\n };\n\n const _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n };\n\n var assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n };\n\n\n // Join array of chunks to single array.\n var flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n };\n\n var common = {\n \tassign: assign,\n \tflattenChunks: flattenChunks\n };\n\n // String encode/decode helpers\n\n\n // Quick check if we can use fast array to bin string conversion\n //\n // - apply(Array) can fail on Android 2.2\n // - apply(Uint8Array) can fail on iOS 5.1 Safari\n //\n let STR_APPLY_UIA_OK = true;\n\n try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n // Table with utf8 lengths (calculated by first byte of sequence)\n // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n // because max possible codepoint is 0x10ffff\n const _utf8len = new Uint8Array(256);\n for (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n }\n _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n // convert string to array (typed, when possible)\n var string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n };\n\n // Helper\n const buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n };\n\n\n // convert array to string\n var buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n };\n\n\n // Calculate max possible position in utf8 buffer,\n // that will not break sequence. If that's not possible\n // - (very small limits) return max size as is.\n //\n // buf[] - utf8 bytes array\n // max - length limit (mandatory);\n var utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n };\n\n var strings = {\n \tstring2buf: string2buf,\n \tbuf2string: buf2string,\n \tutf8border: utf8border\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n }\n\n var zstream = ZStream;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n }\n\n var gzheader = GZheader;\n\n const toString = Object.prototype.toString;\n\n /* Public constants ==========================================================*/\n /* ===========================================================================*/\n\n const {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n } = constants$1;\n\n /* ===========================================================================*/\n\n\n /**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n /* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n /**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n /**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n /**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n /**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\n function Inflate(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$1.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$1.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$1.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n }\n\n /**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\n Inflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$1.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$1.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$1.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$1.inflateReset(strm);\n status = inflate_1$1.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$1.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n };\n\n\n /**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\n Inflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n };\n\n\n /**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\n Inflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n };\n\n\n /**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\n function inflate(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n }\n\n\n /**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\n function inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n }\n\n\n /**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\n var Inflate_1 = Inflate;\n var inflate_2 = inflate;\n var inflateRaw_1 = inflateRaw;\n var ungzip = inflate;\n var constants = constants$1;\n\n var inflate_1 = {\n \tInflate: Inflate_1,\n \tinflate: inflate_2,\n \tinflateRaw: inflateRaw_1,\n \tungzip: ungzip,\n \tconstants: constants\n };\n\n exports.Inflate = Inflate_1;\n exports.constants = constants;\n exports['default'] = inflate_1;\n exports.inflate = inflate_2;\n exports.inflateRaw = inflateRaw_1;\n exports.ungzip = ungzip;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n","/* noCompress */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}")),"/* gzipCompress */",t.substring(t.indexOf("{")+1,t.lastIndexOf("}")),"/* parseChunk */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n"),"","/* worker */",uf].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}return()=>new Worker(this.workerSourceURL)}_createMesh(e,t){const{buffer:n,position:i,normal:r,texcoord:s,indice:o,sub_mesh:a}=e,l=new Uint32Array(n,o.byteOffset,o.length),c=new Float32Array(n,i.byteOffset,i.length),u=new Int8Array(n,r.byteOffset,r.length),h=new Float32Array(n,s.byteOffset,s.length),d=new xe;d.setIndex(new f(l,1)),d.setAttribute("position",new f(c,3)),d.setAttribute("normal",new f(u,3,!0)),d.setAttribute("uv",new f(h,2));for(let e=0;e<a.length;e++){const{uuid:n,start:i,count:r}=a[e],s=this.loadedMaterialsMap.get(n);if(s){const{materialIndex:e}=s;d.addGroup(i,r,e)}else d.addGroup(i,r,0),yn(`sbmx material: not found uuid: ${n} in file: ${t+hf}`)}const p=new k(d,this.loadedMaterials);return p.castShadow=!0,p.receiveShadow=!0,p}_createMaterial(e){return Fn(this,void 0,void 0,(function*(){const t=Rn(e),n=t+hf,i=this.loadedTextures.get(n);if(i)return i;const r=yield this.store.getItem(`${e}_texture`);let s;if(r)s=r,this.loadedTextures.set(n,Promise.resolve(s));else{const t=this.loadedTextures.get(n);if(t)return t;const i=Qn(n).then((e=>e.json()));this.loadedTextures.set(n,i),s=yield i,Kn((()=>{this.store.setItem(`${e}_texture`,s)}))}Object.entries(s).forEach((e=>{let[n,i]=e;if(this.loadedMaterialsMap.has(n))return;const{name:r,base_map:s,nor_map:o,alphamode:l,color:c={r:1,g:1,b:1,a:1},metallic:u=.5,roughness:h=.5}=i,{r:d,g:f,b:p,a:g}=c,m=0!==l,v=new F({name:r,color:new a(d,f,p),side:L,metalness:u,roughness:h,opacity:g,transparent:m,depthWrite:!m});if(s){const e=t+s;(new Je).load(e,(e=>{e.flipY=!0,e.encoding=I,e.wrapS=D,e.wrapT=D,e.minFilter=jt,e.magFilter=A,e.needsUpdate=!0,v.map=e,v.needsUpdate=!0,Mu.needsUpdate=!0}))}if(o){const e=t+o;(new Je).load(e,(e=>{e.flipY=!0,e.encoding=I,e.wrapS=D,e.wrapT=D,e.needsUpdate=!0,v.normalMap=e,v.needsUpdate=!0,Mu.needsUpdate=!0}))}const y=this.loadedMaterials.push(v)-1;this.loadedMaterialsMap.set(n,{material:v,materialIndex:y})}))}))}dispose(){this.workerPool.dispose(),URL.revokeObjectURL(this.workerSourceURL)}}const ff=new Map,pf=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},gf=e=>{if(ff.has(e))return ff.get(e);const t=new l;return ff.set(e,t),(new zt).load(e,(e=>{t.image=e,t.needsUpdate=!0,Mu.needsUpdate=!0})),t.encoding=I,t.wrapS=D,t.wrapT=D,t.flipY=!1,t.anisotropy=16,t.mipmaps=[],t.generateMipmaps=!0,t},mf=(e,t,n,i)=>{const[r,s,o,l,c]=t,u=i||l<1;return new F({name:e,color:new a(r,s,o),opacity:l,transparent:u,depthWrite:!u,alphaTest:.01,map:n,side:c})};class vf extends DataView{constructor(e,t){super(e),this.isLE=!0,this.appKeys=t}byteRevers(e,t){const n=t%this.appKeys.length;return e^this.appKeys[n]}getSoonUint8(e){return this.byteRevers(this.getUint8(e),e)}getSoonUint16(e){const t=new DataView(new Uint8Array(2).buffer);for(let n=0;n<2;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getUint16(0,this.isLE)}getSoonUint32(e){const t=new DataView(new Uint8Array(4).buffer);for(let n=0;n<4;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getUint32(0,this.isLE)}getSoonFloat32(e){const t=new DataView(new Uint8Array(4).buffer);for(let n=0;n<4;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getFloat32(0,this.isLE)}}const yf=new TextDecoder;new TextDecoder;class wf{constructor(){this.materials=new Map}parseObject(e,t){const n=new ju(Object.assign(Object.assign({},t),{format:"sbm"})),i=new Nu({id:Yi()});n.add(i);const{materialsCache:r,meshsCache:s}=e;for(const[e,t]of Object.entries(r)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:i}=t;let r=null;n&&(r=gf(n));const s=mf(e,i,r,pf(n));this.materials.set(e,s)}for(const[e,t]of Object.entries(s)){const{meshName:n,materialId:r,position:s,uv:o}=t,a=this.materials.get(r.toString());if(a){const t=new xe,r=new Float32Array(s),l=new Float32Array(o);r.length>0&&t.setAttribute("position",new f(r,3)),l.length>0&&t.setAttribute("uv",new f(l,2)),t.computeVertexNormals();const c=new _u(t,a,{id:`${e}_${Yi()}`,name:n||e});i.add(c)}}return n}}var bf=class{constructor(){this.materials=new Map,this.sbmInfo=null}parseBuffer(e,t,n){return Fn(this,void 0,void 0,(function*(){this.sbmInfo=t;const i=new DataView(e);let r=0;const s=[];for(let e=0;e<8;e++)s.push(i.getUint8(r)),r+=1;if("SBK-----"!==String.fromCharCode(...s))return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})格式或数据错误!`);const o=[],a=[],l=[];for(let e=0;e<32;e++)o.push(i.getUint8(r)),r+=1;const c=i.getUint8(r);r+=1;const u=i.getUint8(r);r+=1;for(let e=0;e<32;e++)a.push(i.getUint8(r)),r+=1;for(let e=0;e<64;e++)l.push(i.getUint8(r)),r+=1;const h=[...a,...l,...o],d=[];for(let e=0;e<h.length;e++)(e<=7||e>23&&e<=31||e>39&&e<=55||e>63&&e<=87||e>95&&e<=103)&&d.push(h[e]);if(64!==d.length)return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url} 数据错误!`);if(1===c){const e=i.buffer.slice(r,i.buffer.byteLength),t=new vf(e,d);return 1===u||2===u?this._parseV2(t,n):3===u?this._parseV3(t,n):Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})版本错误!`)}return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})key 错误!`)}))}_parseV2(e,n){let i=0;const r=performance.now();i+=66;const s={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new ju(Object.assign(Object.assign({},this.sbmInfo),{format:"sbm"})),a=new Nu({id:Yi()});o.add(a);const l=e.getSoonUint16(i);i+=2;const c=e.getSoonUint16(i);i+=2,s.total=c;const u={};for(let t=0;t<l;++t){const t=e.getSoonUint16(i).toString();i+=2,u[t]={materialInfo:[]},i+=4,i+=4,i+=4,i+=4;const n=e.getSoonFloat32(i);i+=4;const r=e.getSoonFloat32(i);i+=4;const s=e.getSoonFloat32(i);i+=4;const o=e.getSoonFloat32(i);i+=4,i+=4,i+=4,i+=4,i+=4;let a=e.getSoonUint8(i);i+=1,0===a?a=L:1===a?a=_:2===a&&(a=d);const l=e.getSoonUint16(i);i+=2;let c=null;if(l>0){let n="",r="";for(let t=0;t<l;t++){const t=e.getSoonUint8(i);t>127?r=r+"%"+t.toString(16).toUpperCase():r.length>0?(n+=decodeURIComponent(r)+String.fromCharCode(t),r=""):n+=String.fromCharCode(t),i+=1}n=n.replace("\\","/");const{url:s,isPlatform:o}=this.sbmInfo,a=this.getTextureUrl(s,n,o);u[t].textureUrl=a,c=gf(a)}if(!this.materials.has(t)){const e=[n,r,s,o,a],i=mf(t,e,c,pf(u[t].textureUrl));this.materials.set(t,i),u[t].materialInfo=e}}const h={};for(let o=0;o<c;++o){const o=e.getSoonUint16(i);i+=2;const l=e.getSoonUint16(i).toString();i+=2,h[o]={materialId:l,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const c=[],u=[],d=[],p=[],g=e.getSoonUint16(i);if(i+=2,g>0)for(let n=0;n<g;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4,c.push(n)}const m=e.getSoonUint16(i);if(i+=2,m>0)for(let n=0;n<m;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4}const v=e.getSoonUint16(i);if(i+=2,v>0)for(let t=0;t<v;t++){const t=new M;t.setX(e.getSoonFloat32(i)),i+=4,t.setY(e.getSoonFloat32(i)),i+=4,u.push(t)}const y=e.getSoonUint16(i);if(i+=2,y>0)for(let t=0;t<y;t++){const t=e.getSoonUint16(i);i+=2;const n=e.getSoonUint16(i);i+=2;const r=e.getSoonUint16(i);i+=2;const s=[t,n,r];d.push(s),u.length>0&&p.push([u[s[0]],u[s[1]],u[s[2]]])}const w=[],b=[];for(let e=0;e<d.length;e++){const t=d[e],n=c[t[0]],i=c[t[1]],r=c[t[2]];w.push(...n.toArray(),...i.toArray(),...r.toArray());let s=new M,o=new M,a=new M;const l=p[e];void 0!==l&&(s=l[0],o=l[1],a=l[2]),b.push(...s.toArray(),...o.toArray(),...a.toArray())}const x=new Float32Array(w),A=new Float32Array(b);h[o].position=x.buffer,h[o].uv=A.buffer;const T=new xe;x.length>0&&T.setAttribute("position",new f(x,3)),A.length>0&&T.setAttribute("uv",new f(A,2)),T.computeVertexNormals();const S=this.materials.get(l);if(S){const e=new _u(T,S,{id:`${o}_${Yi()}`,name:o.toString()});a.add(e)}s.loaded++,s.timeStamp=performance.now()-r,null==n||n(s)}const p={materialsCache:u,meshsCache:h};return Promise.resolve({model:o,caches:p})}_parseV3(e,n){let i=0;i+=66;const r=performance.now(),s={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new ju(Object.assign(Object.assign({},this.sbmInfo),{format:"sbm"})),a=new Nu({id:Yi()});o.add(a);const l=e.getSoonUint16(i);i+=2;const c=e.getSoonUint16(i);i+=2,s.total=c;const u={};for(let t=0;t<l;++t){const t=e.getSoonUint16(i).toString();i+=2,u[t]={materialInfo:[]},i+=4,i+=4,i+=4,i+=4;const n=e.getSoonFloat32(i);i+=4;const r=e.getSoonFloat32(i);i+=4;const s=e.getSoonFloat32(i);i+=4;const o=e.getSoonFloat32(i);i+=4,i+=4,i+=4,i+=4,i+=4;let a=e.getSoonUint8(i);i+=1,0===a?a=L:1===a?a=_:2===a&&(a=d);const l=e.getSoonUint16(i);i+=2;let c=null;if(l>0){let n="",r="";for(let t=0;t<l;t++){const t=e.getSoonUint8(i);t>127?r=r+"%"+t.toString(16).toUpperCase():r.length>0?(n+=decodeURIComponent(r)+String.fromCharCode(t),r=""):n+=String.fromCharCode(t),i+=1}n=n.replace("\\","/");const{url:s,isPlatform:o}=this.sbmInfo,a=this.getTextureUrl(s,n,o);u[t].textureUrl=a,c=gf(a)}if(!this.materials.has(t)){const e=[n,r,s,o,a],i=mf(t,e,c,pf(u[t].textureUrl));this.materials.set(t,i),u[t].materialInfo=e}}const h={};for(let o=0;o<c;++o){const o=e.getSoonUint16(i).toString();i+=2;const l=e.getSoonUint16(i);i+=2;let c="";if(l>0){const t=[];for(let n=0;n<l;n++){const n=e.getSoonUint8(i);t.push(n),i+=1}const n=new Uint8Array(t);c=yf.decode(n)}const u=e.getSoonUint16(i).toString();i+=2,h[o]={meshName:c,materialId:u,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const d=[],p=[],g=[],m=[],v=e.getSoonUint32(i);if(i+=4,v>0)for(let n=0;n<v;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4,d.push(n)}const y=e.getSoonUint32(i);if(i+=4,y>0)for(let n=0;n<y;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4}const w=e.getSoonUint32(i);if(i+=4,w>0)for(let t=0;t<w;t++){const t=new M;t.setX(e.getSoonFloat32(i)),i+=4,t.setY(e.getSoonFloat32(i)),i+=4,p.push(t)}const b=e.getSoonUint32(i);if(i+=4,b>0)for(let t=0;t<b;t++){const t=e.getSoonUint32(i);i+=4;const n=e.getSoonUint32(i);i+=4;const r=e.getSoonUint32(i);i+=4;const s=[t,n,r];g.push(s),p.length>0&&m.push([p[s[0]],p[s[1]],p[s[2]]])}const x=[],A=[];for(let e=0;e<g.length;e++){const t=g[e],n=d[t[0]],i=d[t[1]],r=d[t[2]];x.push(...n.toArray(),...i.toArray(),...r.toArray());let s=new M,o=new M,a=new M;const l=m[e];void 0!==l&&(s=l[0],o=l[1],a=l[2]),A.push(...s.toArray(),...o.toArray(),...a.toArray())}const T=new Float32Array(x),S=new Float32Array(A);h[o].position=T.buffer,h[o].uv=S.buffer;const E=new xe;if(T.length>0&&E.setAttribute("position",new f(T,3)),S.length>0&&E.setAttribute("uv",new f(S,2)),E.computeVertexNormals(),this.materials.has(u)){const e=new _u(E,this.materials.get(u),{id:`${o}_${Yi()}`,name:c});a.add(e)}s.loaded++,s.timeStamp=performance.now()-r,null==n||n(s)}const p={materialsCache:u,meshsCache:h};return Promise.resolve({model:o,caches:p})}getTextureUrl(e,t,n){let i="",r=t;const s=r.lastIndexOf("/");if(-1!==s&&(r=r.substring(s+1)),i=e,n){const e=i.split("/");e.length>1&&(e.splice(e.length-3,e.length),i=e.join("/")+"/Maps/"+r)}else{const e=i.lastIndexOf("/");-1!==e&&(i=i.substring(0,e+1)+"Maps/"+r)}return i}};class xf extends ih{constructor(e,t){super("Model",e,t),this.viewport=e,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this.store=sf.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=sf.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new de,this.datLoader=new df(this.cacheStore),this.gltfLoader=new od(this.loadingManager),this.fbxLoader=new Fh(this.loadingManager),this.dracoDecoderPath=null,this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){this.dracoDecoderPath=e;const t=new tf;t.setDecoderPath(e),this.gltfLoader.setDRACOLoader(t),this.datLoader.dracoDecoderPath=e}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scene;return Fn(this,void 0,void 0,(function*(){const{url:n}=e,i=this.modelsPromiseMap.get(n);if(i){if(yield i,this.isDisposed)return this.dispose(),null;const r=this.modelsMap.get(n);return r?this.clone(r,e,t):null}const r=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,r),r}))}parse(e){return Fn(this,void 0,void 0,(function*(){const{url:t,id:n}=e;if(!t)return yn(`id: ${n} url: ${t} is empty`),null;switch(t.slice(t.lastIndexOf(".")+1).toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"DAT":return this._parseDat(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);default:return yn(`模型资源( id: ${n}, url: ${t} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}))}clone(e,t,n){return new Promise(((i,r)=>{var s;"Model"!==e.stype&&r("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:u,rotation:h,scale:d,onClick:f,onDblClick:p,onRightClick:g,onLoad:m,userData:v}=t;function y(e,t,n){n(e,t);for(let i=0;i<e.children.length;i++)y(e.children[i],t.children[i],n)}const w=function(e){const t=new Map,n=new Map,i=e.sClone();return y(e,i,(function(e,i){t.set(i,e),n.set(e,i)})),i.traverse((function(e){if(e instanceof xt){const i=e,r=t.get(e),s=r.skeleton.bones;i.skeleton=r.skeleton.clone(),i.bindMatrix.copy(r.bindMatrix),i.skeleton.bones=s.map((function(e){return n.get(e)})),i.bind(i.skeleton,i.bindMatrix)}})),i}(e);w.animations=w.animations.map((e=>e.clone())),o&&(w.sid=o),a&&(w.name=a),l&&(w.level=l),!1===c&&w.hide(),u&&w.position.set(u.x,u.y,u.z),h&&w.rotation.set(h.x,h.y,h.z),d&&w.scale.set(d.x,d.y,d.z),w.onClick=f?f.bind(w):null,w.onDblClick=p?p.bind(w):null,w.onRightClick=g?g.bind(w):null,w.onLoad=m?m.bind(w):null,null===(s=w.onLoad)||void 0===s||s.call(w,w),v&&(w.userData=v),null!==n&&this.viewport.scener.addObject(w,n||this.scene||e.parent),i(w)}))}loadToGroup(e,t){return Fn(this,void 0,void 0,(function*(){const n=this.createGroup(e,null);return yield Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}))}addForGroup(e,t){return Fn(this,void 0,void 0,(function*(){return e&&(yield Promise.allSettled(t.map((t=>Fn(this,void 0,void 0,(function*(){return this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)})))))),e}))}clearIdb(){return Fn(this,void 0,void 0,(function*(){yield this.store.clear(),yield this.cacheStore.clear()}))}dispose(){var e;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),this.datLoader.dispose()}_initLoadingManager(e){e.addHandler(/\.tga$/i,new rd)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,t)}_parseSbm(e){return Fn(this,void 0,void 0,(function*(){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,i=t=>Fn(this,void 0,void 0,(function*(){const i=yield(new bf).parseBuffer(t,e),{model:r,caches:s}=i;return s&&Kn((()=>{this.cacheStore.setItem(n,s)})),r})),r=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e)};if(t){const t=yield this.cacheStore.getItem(n);if(t){const n=(new wf).parseObject(t,e);return r(n),n}{const e=(yield this.store.getItem(n))||(yield this._fetchBuffer(n)),t=yield i(e);return r(t),t}}{const e=yield this._fetchBuffer(n),t=yield i(e);return r(t),t}}))}_parseSbmx(e){return Fn(this,void 0,void 0,(function*(){const{url:t}=e,n=yield this._getBuffer(t),i=Vi(n,0,8),r=new DataView(n.slice(8));switch(i){case"SBMG----":for(let e=0;e<r.byteLength;e++){const t=r.getUint8(e),n=(t>>4&15)+(t<<4&240);r.setUint8(e,n)}return this._parseGltf(e,r.buffer);case"SBMD----":return this._parseDat(e,r.buffer);default:return this._parseGltf(e,r.buffer)}}))}_parseDat(e,t){return Fn(this,void 0,void 0,(function*(){const{url:n}=e,i=t||(yield this._getBuffer(n)),r=new ju(Object.assign(Object.assign({},e),{format:"dat"})),s=yield this.datLoader.parseAsync(i,n);return s&&r.add(s),r}))}_parseGltf(e,t){return Fn(this,void 0,void 0,(function*(){const{url:n}=e,i=Rn(n),r=t||(yield this._getBuffer(n)),s=new ju(Object.assign(Object.assign({},e),{format:"gltf"})),o=yield this.gltfLoader.parseAsync(r,i),{animations:a}=o;return a&&a.length>0&&(s.animations=a),o.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e.castShadow=!0,e.receiveShadow=!0})),s.add(o.scene),s}))}_parseFbx(e){return Fn(this,void 0,void 0,(function*(){const{url:t}=e,n=Rn(t),i=yield this._getBuffer(t),r=new ju(Object.assign(Object.assign({},e),{format:"gltf"})),s=this.fbxLoader.parse(i,n),{animations:o}=s;return o&&o.length>0&&(r.animations=o),s.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e.castShadow=!0,e.receiveShadow=!0})),r.add(s),r}))}_innerLoad(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scene;var n;return Fn(this,void 0,void 0,(function*(){const{url:i}=e,r=yield this.parse(e);return r?(null===(n=r.onLoad)||void 0===n||n.call(r,r),this._setModelsMap(i,r.sClone()),null!==t&&this.viewport.scener.addObject(r,t),r):null}))}_fetchBuffer(e){return Fn(this,void 0,void 0,(function*(){const{useIndexedDB:t}=this.viewport.options,n=yield Qn(e),i=yield n.arrayBuffer();return t&&this.store.setItem(e,i),i}))}_getBuffer(e){return Fn(this,void 0,void 0,(function*(){const{useIndexedDB:t}=this.viewport.options;if(t){const t=yield this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}))}}class Af extends ih{constructor(e,t){super("Poi",e,t),this.materials=new Map}create(e){const t=this._createMaterial(e.url),n=new Gu(t,e);return this.viewport.scener.addObject(n,this.scene),n}clone(e,t,n){"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:i,type:r,name:s,level:o,visible:a,position:l,rotation:c,scale:u,onClick:h,onDblClick:d,onRightClick:f,userData:p}=t,g=e.sClone(!1,r);return this._copyMaterial(g),i&&(g.sid=i),s&&(g.name=s),o&&(g.level=o),Ui(a)&&(g.visible=a),l&&g.position.set(l.x,l.y,l.z),c&&g.rotation.set(c.x,c.y,c.z),u&&g.scale.set(u.x,u.y,u.z),g.onClick=h?h.bind(g):null,g.onDblClick=d?d.bind(g):null,g.onRightClick=f?f.bind(g):null,p&&(g.userData=p),null!==n&&this.viewport.scener.addObject(g,n||this.scene||e.parent),g}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._createMaterial(e.url),i=new Gu(t,e);n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{const n=this._createMaterial(t.url),i=new Gu(n,t);e.add(i)})),this.viewport.scener.addObject(e,this.scene)),e}_createMaterial(e){const t=this.materials.get(e);if(!t){const t=(new Je).load(e);t.flipY=!0;const n=new et({map:t,color:16777215});return this.materials.set(e,n),n}return t}_copyMaterial(e){e.traverse((e=>{(e instanceof k||e instanceof $e)&&(ji(e.material)?e.material=e.material.map((e=>e.clone())):e.material instanceof Ae&&(e.material=e.material.clone()))}))}}class Tf extends ih{constructor(e,t){super("PoiNode",e,t)}create(e){this._openEnableRenderCss(e);const t=new Fu(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new Fu(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{this._openEnableRenderCss(t);const n=new Fu(t);e.add(n)})),this.viewport.scener.addObject(e,this.scene)),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":this.viewport.rendererManager.setInternalState("enableRenderCss2DHalf",!0);break;case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class Sf extends ih{constructor(e,t){super("Canvas3D",e,t)}create(e){const t=new $u(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new $u(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{const n=new $u(t);e.add(n)})),this.viewport.scener.addObject(e,this.scene)),e}}class Ef{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,i]=t,r=this.graph.get(e);null==r||r.set(n,i)}}}getPath(e,t){var n;if(e===t)return[];const i=this.queue=new In;i.add(e,0),this.previous.set(e,null);let r=null;for(;r=i.shift();){if(r===t){const e=[];for(;null!==r&&null!==this.previous.get(r);)e.unshift(r),r=null!==(n=this.previous.get(r))&&void 0!==n?n:null;return e}const e=i.getDistance(r);if(e===1/0)return[];const s=this.graph.get(r);s&&s.forEach(((t,n)=>{const s=i.getDistance(n),o=e+t;o<s&&(i.update(n,o),this.previous.set(n,r))}))}return[]}}class Df extends ih{constructor(e,t){super("Topology",e,t),this.dijkstra=new Ef}createFromGml(e){return Fn(this,void 0,void 0,(function*(){const{url:t,linkWidth:n=20,linkColor:i=65280,renderNode:r=!0,nodeColor:s=255}=e;return qn(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const u=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;ji(u)?u.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...u.state],c=[...c,...u.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],i=e.State.topoNode["gml:Node"].node_name;o.push({id:Ni(n)?n:"",name:Ni(i)?i:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],i=e.Transition.topoEdge["gml:Edge"].restrict["#text"],r=e.Transition.topoEdge["gml:Edge"].passable["#text"],s=a.get(t),l=a.get(n),c=e.Transition._attributes["gml:id"],u=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==s&&void 0!==l&&("2"!==r&&"3"!==r&&o[s].graphs.push({targetNodeId:n,linkInfo:{id:c,name:u},enable:!0,restrict:parseInt(i),passable:parseInt(r)}),"1"!==r&&"3"!==r&&o[l].graphs.push({targetNodeId:t,linkInfo:{id:c,name:u},enable:!0,restrict:parseInt(i),passable:parseInt(r)}))}));const h=new Qu(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:i,renderNode:r,nodeColor:s}));return this.setDijkstraGraph(h.nodes),this.viewport.scener.addObject(h,this.scene),Promise.resolve(h)}))}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new Qu(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),i=new Qu(t);this.setDijkstraGraph(i.nodes),n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),i=new Qu(n);this.setDijkstraGraph(i.nodes),e.add(i)})),e}getShortestPath(e,n){const i=Pn(e.info.nodes),r=wn(n.start),s=wn(n.end);let o=null,a=1/0,l=null,c=1/0;for(let n=0;n<i.length;n++){const u=i[n];if(0===u.graphs.length)continue;const h=e.nodes.find((e=>e.sid===u.id));if(!h)continue;const d=h.getWorldPosition(new t),f=d.distanceTo(r),p=d.distanceTo(s);f<a&&(a=f,o=u),p<c&&(c=p,l=u)}if(!o||!l||o.id===l.id)return null;const u=o.id,h=l.id,d=this.dijkstra.getPath(u,h);if(0===d.length)return null;d.unshift(o.id);const f=[];for(let e=0;e<d.length;e++){const t=i.find((t=>t.id==d[e]));t&&(t.id+=Yi(),t.position.y+=.01,f.push(t))}const p=Object.assign(Object.assign(Object.assign({},n),{type:"line",nodes:f}),e.getSpaceAttribute(!0));this.generateLineTopologyInfoNodeGraphs(p);const g=new Qu(p);return this.viewport.scener.addObject(g,this.scene),g}getShortestPathByMultipleStartPoints(e,i){const{nodes:s}=e.info,o=[];i.start.forEach((e=>{const t=wn(e),n=wn(i.end);let r=null,a=1/0,l=null,c=1/0;if(s.forEach((e=>{if(e.graphs.length>0){const i=wn(e.position),s=i.distanceTo(t),o=i.distanceTo(n);s<a&&(a=s,r=e.id),o<c&&(c=o,l=e.id)}})),r&&l){let e=0;const i=this.dijkstra.getPath(r,l);if(i.length>0){const r=[{id:"startPoint",position:t,graphs:[]}];i.forEach(((n,i)=>{const o=s.find((e=>e.id==n));o&&(e+=0===i?wn(o.position).distanceTo(t):wn(o.position).distanceTo(wn(r[r.length-1].position)),r.push(o))})),r.push({id:"endPoint",position:n,graphs:[]}),e+=n.distanceTo(wn(r[r.length-1].position)),o.push({nodeInfo:r,pathLength:e})}}}));let a=[],l=1/0;if(o.forEach((e=>{let{nodeInfo:t,pathLength:n}=e;n<l&&(l=n,a=t)})),a.length){for(let e=0;e<a.length;e++)a[e].position.y+=.01;const s=Object.assign(Object.assign({},i),{type:"line",nodes:a,position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)});this.generateLineTopologyInfoNodeGraphs(s);const o=new Qu(s);return this.viewport.scener.addObject(o,this.scene),o}return null}getShortestPathByMultipleEndPoints(e,i){const{nodes:s}=e.info,o=[];i.end.forEach((e=>{const t=wn(i.start),n=wn(e);let r=null,a=1/0,l=null,c=1/0;if(s.forEach((e=>{if(e.graphs.length>0){const i=wn(e.position),s=i.distanceTo(t),o=i.distanceTo(n);s<a&&(a=s,r=e.id),o<c&&(c=o,l=e.id)}})),r&&l){let e=0;const i=this.dijkstra.getPath(r,l);if(i.length>0){const r=[{id:"startPoint",position:t,graphs:[]}];i.forEach(((n,i)=>{const o=s.find((e=>e.id==n));o&&(e+=0===i?wn(o.position).distanceTo(t):wn(o.position).distanceTo(wn(r[r.length-1].position)),r.push(o))})),r.push({id:"endPoint",position:n,graphs:[]}),e+=n.distanceTo(wn(r[r.length-1].position)),o.push({nodeInfo:r,pathLength:e})}}}));let a=[],l=1/0;if(o.forEach((e=>{let{nodeInfo:t,pathLength:n}=e;n<l&&(l=n,a=t)})),a.length){for(let e=0;e<a.length;e++)a[e].position.y+=.01;const s=Object.assign(Object.assign({},i),{type:"line",nodes:a,position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)});this.generateLineTopologyInfoNodeGraphs(s);const o=new Qu(s);return this.viewport.scener.addObject(o,this.scene),o}return null}setDijkstraGraph(e){const n=[];for(let i=0;i<e.length;i++){const r=e[i];if(0===r.graphs.length)continue;const s=[];for(let n=0;n<r.graphs.length;n++){const i=r.graphs[n],o=e.find((e=>e.sid===i.targetNodeId));if(!o)continue;const a=r.getWorldPosition(new t),l=o.getWorldPosition(new t);s.push([i.targetNodeId,a.distanceTo(l)])}n.push([r.sid,s])}n.length>0&&this.dijkstra.setGraph(n)}generateLineTopologyInfoNodeGraphs(e){const{type:t,nodes:n}=e;if("line"===t)for(let t=0;t<n.length;t++)if(t===n.length-1)n[t].graphs=[];else{const i=e.nodes[t],r=e.nodes[t+1];n[t].graphs=[{targetNodeId:r.id,linkInfo:{id:`${i.id}_to_${r.id}`,name:`${i.name||i.id}_to_${r.name||r.id}`},enable:!0,restrict:0,passable:0}]}return Object.assign(Object.assign({},e),{nodes:n})}}class Cf extends At{constructor(e,t){const n=new xe;n.setAttribute("position",new it([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),n.computeBoundingSphere();super(n,new q({fog:!1})),this.light=e,this.color=t,this.type="RectAreaLightHelper";const i=new xe;i.setAttribute("position",new it([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),i.computeBoundingSphere(),this.add(new k(i,new z({side:_,fog:!1})))}updateMatrixWorld(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),void 0!==this.color)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);const e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld),this.children[0].matrixWorld.copy(this.matrixWorld)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}class If extends ih{constructor(e,t){super("Helper",e,t)}addGridHelper(e){const{id:t,size:n=1e3,divisions:i=20,color:r="#fff",position:s={x:0,y:0,z:0},rotation:o={x:0,y:0,z:0},scale:a={x:1,y:1,z:1}}=e,l=new Ht(n,i,r,r);return l.position.set(s.x,s.y,s.z),l.rotation.set(o.x,o.y,o.z),l.scale.set(a.x,a.y,a.z),l.userData.sid=t,l.userData.stype="Helper",this.viewport.scener.addObject(l,this.scene),l}addAxesHelper(e){const{id:t,axesLength:n=1e3}=e,i=new Gt(n);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addBoxHelper(e){const{id:t,box:n,color:i="#00ff00"}=e,r=new Vt(n,new a(i));return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPlaneHelper(e){const{id:t,width:n=500,height:i=500,color:r="#00ff00",opacity:s=.2,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1}}=e,c=new _u(new ze(n,i),new z({color:r,opacity:s,transparent:s<1,side:d}),{id:t,position:o,rotation:a,scale:l});return c.userData.sid=t,c.userData.stype="Helper",this.viewport.scener.addObject(c,this.scene),c}addGroundHelper(e){const{imgUrl:t,id:n,width:i=500,height:r=500,opacity:s=1,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},repeat:c={x:10,y:10}}=e,u=(new Je).load(t),h=new ze(i,r);h.computeBoundingBox();const f=new F({side:d,map:u,transparent:s<1,opacity:s,roughness:.8});f.map&&(f.map.repeat.set(c.x,c.x),f.map.wrapS=D,f.map.wrapT=D,f.map.version++),a.x-=Math.PI/2,f.version++;const p=new eh(h,f,{id:n,position:o,rotation:a,scale:l});return p.userData.sid=n,p.userData.stype="Helper",this.viewport.scener.addObject(p,this.scene),p}addDirectionalLightHelper(e){const{id:t,light:n,color:i,size:r=50}=e,s=new Yt(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addHemisphereLightHelper(e){const{id:t,light:n,color:i,size:r=20}=e,s=new Wt(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addSpotLightHelper(e){const{id:t,light:n,color:i}=e,r=new Xt(n,i);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPointLightHelper(e){const{id:t,light:n,color:i,size:r=20}=e,s=new Qt(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addRectAreaLightHelper(e){const{id:t,light:n,color:i}=e,r=new Cf(n,i);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}}class Mf extends ih{constructor(e,t){super("PluginObject",e,t)}createObject(e,t){const n=new Uu(e);return t&&n.add(t),this.viewport.scener.addObject(n,this.scene),n}addToObject(e,t){return e?(this.viewport.scener.addObject(t,e),e):null}}class Bf extends ih{constructor(e,t){super("Group",e,t)}}class Rf{constructor(e){this.viewport=e,this.cache={objects:new Map},this.scene=e.scene,this.store={groupManager:new Bf(e,this.scene),lightManager:new rh(e,this.scene),modelManager:new xf(e,this.scene),poiManager:new Af(e,this.scene),poiNodeManager:new Tf(e,this.scene),canvas3DManager:new Sf(e,this.scene),topologyManager:new Df(e,this.scene),helperManager:new If(e,this.scene),pluginObjectManager:new Mf(e,this.scene)},e.postUpdate.set("ManagerRender",this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,e.matrixAutoUpdate=t,e.autoUpdate=!0)},t=t=>{const{level:n,handleHide:i,autoUpdate:r}=t,{max:s=null,min:o=null}=n;if(r)t.autoUpdate=!1,this.viewport.signals.objectChanged.dispatch();else if(!i&&(Fi(s)||Fi(o))){const n=this.viewport.camera.position.distanceTo(t.position);Fi(s)&&n>s||Fi(o)&&n<o?e(t,!1):e(t,!0)}};this.scene.traverse((e=>{(e instanceof ku||e instanceof _u)&&t(e)}))}update(){if(0===this.scene.children.length)return;const e=performance.now();this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.signals.loadRendered.dispatch(performance.now()-e)}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&zi(i)&&(i instanceof ku||i instanceof _u||i.userData.stype)&&(Hi(e)&&e(i.userData)||Ni(e)&&i.userData[e]===t)&&n.push(i)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&((i instanceof ku||i instanceof _u)&&zi(i)&&i[e]===t||zi(i)&&i.userData.stype&&("name"===e&&i.name===t||"sid"===e&&i.userData.sid===t))&&n.push(i)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&yn(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof ku||n instanceof _u){if("string"==typeof n.sid&&n.sid.startsWith(gn))return;t(n,n.sid),this.cache.objects.set(n.sid,n)}else n.userData.sid&&e.userData.stype&&(t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n))}))}deleteObjectCache(e){null==e||e.traverse((t=>{t instanceof ku||t instanceof _u?this.cache.objects.delete(t.sid):t.userData.sid&&e.userData.stype&&this.cache.objects.delete(t.userData.sid)}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.cache.objects.clear(),this.clear()}}function Pf(e){const t=Of(e),n=new m;n.setFromMatrix3(t);const i=e[0],r=n.clone();r.setPosition(i);const s=r.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(s);return new M(t.x,t.y)})),a=new st(o),l=new rt(a),c=new Kt;c.setFromPoints(o);const u=_f(c);return l.getAttribute("uv").applyMatrix3(u),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:r,projectionMatrix:s,position:i}}function Of(e){const[n,i,r]=e,s=new B;s.setFromCoplanarPoints(i,n,r);const o=s.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new Pe;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function _f(e){const t=e.min,n=e.getSize(new M),i=new Pe;return i.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],i.invert()}function Lf(e,t){const n=kf(t);return e.intersectsBox(n)}function kf(e){const n=new i,r=n.min.clone(),s=n.max.clone();if(n.setFromObject(e),n.min.equals(r)&&n.max.equals(s)){const i=new t;e.getWorldPosition(i),n.min.copy(i),n.max.copy(i)}if(e.isInstancedMesh){const{count:t,matrixWorld:i,geometry:r}=e;let s=r.boundingBox;if(s||(r.computeBoundingBox(),s=r.boundingBox),s){const r=i.clone();for(let i=0;i<t;i++){const t=new m;e.getMatrixAt(i,t),t.premultiply(r);const o=s.clone();o.applyMatrix4(r),n.union(o)}}}return n}function Nf(e,t,n){if("string"==typeof e){let i=t?null==n?void 0:n.get(e):null;if(!i){i=(new Je).load(e),null==n||n.set(e,i)}return i}return e instanceof HTMLImageElement?new l(e):e instanceof HTMLCanvasElement?new je(e):new Le(e)}function Uf(e,t,n,i){const r=e.map,s=Nf(t,n,i);if(!r)return e.map=s,s;const o=s.source;return s.copy(r),s.source=o,e.map=s,s}function Ff(e,n){const{top:r,left:s,bottom:o,right:a,front:l,back:c}=e,u=new t(a,r,l),h=new t(s,o,c),d=new i;return function(e){return d.max.addVectors(e,u),d.min.subVectors(e,h),n.filter((e=>Lf(d,e)))}}function jf(e,n){const i=new O(new t,e);return function(e){return i.center.copy(e),n.filter((e=>Lf(i,e)))}}function zf(e,n){const i=e.length-1,r=[];for(let t=0;t<i;t++){const n=e[t],i=e[t+1],s=new R(n,i);r.push(s)}const s=new O(new t,n);return function(e){return e.filter((e=>{const n=kf(e),i=new t;n.getCenter(i);const o=r.filter((e=>{const t=e.closestPointToPointParameter(i);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=i;for(const e of o){const n=e.closestPointToPoint(i,!0,new t),r=i.distanceToSquared(n);r<a&&(a=r,l=n)}return s.center.copy(l),s.intersectsBox(n)}))}}function Hf(e,t){const{image:n,color:i,width:r,height:s,position:o,rotation:a,needLight:l,id:c,name:u,userData:h,level:d,visible:f,cache:p}=e,g=Un(e,["image","color","width","height","position","rotation","needLight","id","name","userData","level","visible","cache"]),m=new ze(r,s),v=n?Object.assign(Object.assign({transparent:!0},g),{map:Nf(n,null==p||p,t)}):g,y=l?new vt(v):new z(v),w=new _u(m,y,{id:c,name:u,userData:h,level:d,visible:f});return o&&w.position.set(o.x,o.y,o.z),a&&w.rotation.set(a.x,a.y,a.z),w}function Gf(e,n){const{points:i,image:r,color:s,needLight:o,id:a,name:l,userData:c,level:u,visible:h,cache:d}=e,f=Un(e,["points","image","color","needLight","id","name","userData","level","visible","cache"]),p=i.map((e=>new t(e.x,e.y,e.z))),g=r?Object.assign(Object.assign({transparent:!0},f),{map:Nf(r,null==d||d,n)}):f,m=o?new vt(g):new z(g),{geometry:v,position:y}=Pf(p),w=new _u(v,m,{id:a,name:l,userData:c,level:u,visible:h});return w.position.copy(y),w}class Vf{constructor(t){this.THREE=e,this.TWEEN=pn,this.utils=Xi,this.version=Jt,this.animation=Ki,this.library=th,this.plugins={},this.textureCache=new Map;const{el:n,options:i={},events:r={}}=t;if(this.domElement=document.querySelector(n),this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,controls:{type:"free"},hoverEnabled:!1,levelEnabled:!1,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0,logarithmicDepthBuffer:!0}),i),this.viewport=new Ou(this.options),this.signals=this.viewport.signals,this.manager=new Rf(this.viewport),!this.domElement)throw new Error(`In SoonSpace: Can't find element by "${n}"!`);this.domElement.appendChild(this.viewport.container),this._init(),this._initEvents(r),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:i,closeInfoLog:r,closeWarnLog:s,useIndexedDB:o}=this.options;if(!r){vn(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),vn(qt,{color:"#3eaf7c","font-size":"24px"}),vn(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),vn("文档: http://www.xwbuilders.com:8800",{color:"#3eaf7c","font-size":"12px"}),vn("样例: http://www.xwbuilders.com:8800/examples",{color:"#3eaf7c","font-size":"12px"}),vn("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Ni(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):zi(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)&&this.setBackgroundColor(t.color),n&&this.openSceneFog(!0===n?void 0:n),i&&this.setControlsOptions(i),s&&(window.console.warn=function(){}),o&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const{modelHover:t,modelUnHover:n,modelClick:i,modelRightClick:r,modelDblClick:s,poiHover:o,poiUnHover:a,poiClick:l,poiRightClick:c,poiDblClick:u,selectPosition:h,sceneClick:d,resize:f}=e;t&&this.signals.modelHover.add(t),n&&this.signals.modelUnHover.add(n),i&&this.signals.modelClick.add(i),r&&this.signals.modelRightClick.add(r),s&&this.signals.modelDblClick.add(s),o&&this.signals.poiHover.add(o),a&&this.signals.poiUnHover.add(a),l&&this.signals.poiClick.add(l),c&&this.signals.poiRightClick.add(c),u&&this.signals.poiDblClick.add(u),h&&this.signals.selectPosition.add(h),d&&this.signals.sceneClick.add(d),f&&this.signals.windowResize.add(f),this.signals.windowResize.dispatch(),window.addEventListener("resize",(()=>this.signals.windowResize.dispatch()),!1)}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}registerPlugin(e,t){const n=new e(this);return this.plugins[t]=n,n}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return yn("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return yn("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return yn("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setSSR(e){this.viewport.setSSR(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setHoverEnabled(e){this.viewport.setHoverEnabled(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(){return this.viewport.setEnvironment()}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t){return this.viewport.getPositionByOffset(e,t)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose()}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e){this.viewport.cameraManager.setCameraViewpoint(e)}getCameraTargetView(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraTargetView(e){this.viewport.cameraManager.setCameraViewpoint(e)}flyTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return"orbit"===this.viewport.controls.options.type&&this.utils.warn("flyTo 方法不适用于 orbit 控制器"),this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.flyToBoundingBox(e,t,n)}flyToObj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"frontTop",t=arguments.length>1?arguments[1]:void 0;return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.viewport.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return yn("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return yn("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e){return this.manager.store.groupManager.createGroup(e)}getGroupById(e){return yn("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return yn("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return yn("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return yn("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){yn("parseSbm is deprecated!")}cloneSbm(e,t,n){return yn("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return yn("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return yn("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return yn("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return yn("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return yn("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return yn("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return yn("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){yn("createGroupForSbm is deprecated!")}getSbmGroupById(e){return yn("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return yn("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return yn("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return yn("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return yn("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return yn("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return yn("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return yn("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return yn("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return yn("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}loadModel(e){return this.manager.store.modelManager.load(e)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return yn("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return yn("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return yn("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return yn("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return yn("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return yn("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return yn("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return yn("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return yn("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return yn("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return yn("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return yn("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return yn("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return yn("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return yn("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return yn("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return yn("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return yn("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return yn("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return yn("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return yn("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return yn("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return yn("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return yn("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return yn("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return yn("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return yn("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=Hf(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=Gf(e,this.textureCache);return this.addObject(t),t}setTexture(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{cache:i=!0,independ:r=!0}=n||{};let s=e.material;if(r&&(s=s.clone(),e.material=s),null===t)return s.map=null,this.render(),null;const o=Uf(s,t,i,this.textureCache);return this.render(),o}createCanvas3D(e){return this.manager.store.canvas3DManager.create(e)}getCanvas3DById(e){return yn("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return yn("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return yn("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return yn("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return yn("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return yn("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return yn("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return yn("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return yn("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return yn("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return yn("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return yn("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return yn("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return yn("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return yn("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return yn("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return yn("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return yn("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return yn("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return yn("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return yn("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return Ff(e,t)}createFindObjectsInSphereNearPosition(e,t){return jf(e,t)}createFindObjectsNearPath(e,t){return zf(e,t)}createPathAnimation(e,t,n){return new Zi(e,t,n)}createTopologyAnimation(e,n,i){const r=n.nodes.map((e=>e.getWorldPosition(new t)));return new Zi(e,r,i)}}Vf.THREE=e,Vf.TWEEN=pn,Vf.utils=Xi;export{Vf as SoonSpace,Lf as boundingIsIntersected,Ff as createFindObjectsInBoxNearPosition,jf as createFindObjectsInSphereNearPosition,zf as createFindObjectsNearPath,Of as createPlaneMatrix,Hf as createPoiMesh,Gf as createPolygonPoiMesh,Nf as createTexture,_f as createUVMatrix,Vf as default,kf as getBoundingBox,Pf as getPolygonGeometryInfo,Uf as setTexture};
22
+ var Ql={};void 0!==Ql.asn1&&Ql.asn1||(Ql.asn1={}),Ql.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var i="",r=0;r<n;r++)i+="f";t=new yl(i,16).xor(e).add(yl.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=Ql.asn1,n=t.DERBoolean,i=t.DERInteger,r=t.DERBitString,s=t.DEROctetString,o=t.DERNull,a=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,h=t.DERNumericString,u=t.DERPrintableString,d=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,g=t.DERGeneralizedTime,m=t.DERSequence,v=t.DERSet,y=t.DERTaggedObject,w=t.ASN1Util.newObject,b=Object.keys(e);if(1!=b.length)throw"key of param shall be only one.";var x=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+x+":"))throw"undefined key: "+x;if("bool"==x)return new n(e[x]);if("int"==x)return new i(e[x]);if("bitstr"==x)return new r(e[x]);if("octstr"==x)return new s(e[x]);if("null"==x)return new o(e[x]);if("oid"==x)return new a(e[x]);if("enum"==x)return new l(e[x]);if("utf8str"==x)return new c(e[x]);if("numstr"==x)return new h(e[x]);if("prnstr"==x)return new u(e[x]);if("telstr"==x)return new d(e[x]);if("ia5str"==x)return new f(e[x]);if("utctime"==x)return new p(e[x]);if("gentime"==x)return new g(e[x]);if("seq"==x){for(var A=e[x],S=[],T=0;T<A.length;T++){var E=w(A[T]);S.push(E)}return new m({array:S})}if("set"==x){for(A=e[x],S=[],T=0;T<A.length;T++){E=w(A[T]);S.push(E)}return new v({array:S})}if("tag"==x){var D=e[x];if("[object Array]"===Object.prototype.toString.call(D)&&3==D.length){var C=w(D[2]);return new y({tag:D[0],explicit:D[1],obj:C})}var B={};if(void 0!==D.explicit&&(B.explicit=D.explicit),void 0!==D.tag&&(B.tag=D.tag),void 0===D.obj)throw"obj shall be specified for 'tag'.";return B.obj=w(D.obj),new y(B)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},Ql.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),i=(t=Math.floor(n/40)+"."+n%40,""),r=2;r<e.length;r+=2){var s=("00000000"+parseInt(e.substr(r,2),16).toString(2)).slice(-8);if(i+=s.substr(1,7),"0"==s.substr(0,1))t=t+"."+new yl(i,2).toString(10),i=""}return t},Ql.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",i=new yl(e,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var s="",o=0;o<r;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var i="",r=e.split("."),s=40*parseInt(r[0])+parseInt(r[1]);i+=t(s),r.splice(0,2);for(var o=0;o<r.length;o++)i+=n(r[o]);return i},Ql.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},Ql.asn1.DERAbstractString=function(e){Ql.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},Yl.lang.extend(Ql.asn1.DERAbstractString,Ql.asn1.ASN1Object),Ql.asn1.DERAbstractTime=function(e){Ql.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var i=this.zeroPadding,r=this.localDateToUTC(e),s=String(r.getFullYear());"utc"==t&&(s=s.substr(2,2));var o=s+i(String(r.getMonth()+1),2)+i(String(r.getDate()),2)+i(String(r.getHours()),2)+i(String(r.getMinutes()),2)+i(String(r.getSeconds()),2);if(!0===n){var a=r.getMilliseconds();if(0!=a){var l=i(String(a),3);o=o+"."+(l=l.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,i,r,s){var o=new Date(Date.UTC(e,t-1,n,i,r,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Yl.lang.extend(Ql.asn1.DERAbstractTime,Ql.asn1.ASN1Object),Ql.asn1.DERAbstractStructured=function(e){Ql.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},Yl.lang.extend(Ql.asn1.DERAbstractStructured,Ql.asn1.ASN1Object),Ql.asn1.DERBoolean=function(){Ql.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Yl.lang.extend(Ql.asn1.DERBoolean,Ql.asn1.ASN1Object),Ql.asn1.DERInteger=function(e){Ql.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Ql.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new yl(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},Yl.lang.extend(Ql.asn1.DERInteger,Ql.asn1.ASN1Object),Ql.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=Ql.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}Ql.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var i="";for(n=0;n<e.length-1;n+=8){var r=e.substr(n,8),s=parseInt(r,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+t+i},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},Yl.lang.extend(Ql.asn1.DERBitString,Ql.asn1.ASN1Object),Ql.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=Ql.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}Ql.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},Yl.lang.extend(Ql.asn1.DEROctetString,Ql.asn1.DERAbstractString),Ql.asn1.DERNull=function(){Ql.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Yl.lang.extend(Ql.asn1.DERNull,Ql.asn1.ASN1Object),Ql.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",i=new yl(e,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var s="",o=0;o<r;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};Ql.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var i="",r=e.split("."),s=40*parseInt(r[0])+parseInt(r[1]);i+=t(s),r.splice(0,2);for(var o=0;o<r.length;o++)i+=n(r[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(e){var t=Ql.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},Yl.lang.extend(Ql.asn1.DERObjectIdentifier,Ql.asn1.ASN1Object),Ql.asn1.DEREnumerated=function(e){Ql.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Ql.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new yl(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},Yl.lang.extend(Ql.asn1.DEREnumerated,Ql.asn1.ASN1Object),Ql.asn1.DERUTF8String=function(e){Ql.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},Yl.lang.extend(Ql.asn1.DERUTF8String,Ql.asn1.DERAbstractString),Ql.asn1.DERNumericString=function(e){Ql.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},Yl.lang.extend(Ql.asn1.DERNumericString,Ql.asn1.DERAbstractString),Ql.asn1.DERPrintableString=function(e){Ql.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},Yl.lang.extend(Ql.asn1.DERPrintableString,Ql.asn1.DERAbstractString),Ql.asn1.DERTeletexString=function(e){Ql.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},Yl.lang.extend(Ql.asn1.DERTeletexString,Ql.asn1.DERAbstractString),Ql.asn1.DERIA5String=function(e){Ql.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},Yl.lang.extend(Ql.asn1.DERIA5String,Ql.asn1.DERAbstractString),Ql.asn1.DERUTCTime=function(e){Ql.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},Yl.lang.extend(Ql.asn1.DERUTCTime,Ql.asn1.DERAbstractTime),Ql.asn1.DERGeneralizedTime=function(e){Ql.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},Yl.lang.extend(Ql.asn1.DERGeneralizedTime,Ql.asn1.DERAbstractTime),Ql.asn1.DERSequence=function(e){Ql.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},Yl.lang.extend(Ql.asn1.DERSequence,Ql.asn1.DERAbstractStructured),Ql.asn1.DERSet=function(e){Ql.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},Yl.lang.extend(Ql.asn1.DERSet,Ql.asn1.DERAbstractStructured),Ql.asn1.DERTaggedObject=function(e){Ql.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Yl.lang.extend(Ql.asn1.DERTaggedObject,Ql.asn1.ASN1Object);var Wl,Xl,Zl,Kl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ql=function(e){function t(n){var i=e.call(this)||this;return n&&("string"==typeof n?i.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&i.parsePropertiesFrom(n)),i}return Kl(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?rl(e):sl.unarmor(e),r=pl.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){t=r.sub[1].getHexStringValue(),this.n=Tl(t,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var s=r.sub[3].getHexStringValue();this.d=Tl(s,16);var o=r.sub[4].getHexStringValue();this.p=Tl(o,16);var a=r.sub[5].getHexStringValue();this.q=Tl(a,16);var l=r.sub[6].getHexStringValue();this.dmp1=Tl(l,16);var c=r.sub[7].getHexStringValue();this.dmq1=Tl(c,16);var h=r.sub[8].getHexStringValue();this.coeff=Tl(h,16)}else{if(2!==r.sub.length)return!1;if(r.sub[0].sub){var u=r.sub[1].sub[0];t=u.sub[0].getHexStringValue(),this.n=Tl(t,16),n=u.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=r.sub[0].getHexStringValue(),this.n=Tl(t,16),n=r.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new Ql.asn1.DERInteger({int:0}),new Ql.asn1.DERInteger({bigint:this.n}),new Ql.asn1.DERInteger({int:this.e}),new Ql.asn1.DERInteger({bigint:this.d}),new Ql.asn1.DERInteger({bigint:this.p}),new Ql.asn1.DERInteger({bigint:this.q}),new Ql.asn1.DERInteger({bigint:this.dmp1}),new Ql.asn1.DERInteger({bigint:this.dmq1}),new Ql.asn1.DERInteger({bigint:this.coeff})]};return new Ql.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return tl(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new Ql.asn1.DERSequence({array:[new Ql.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Ql.asn1.DERNull]}),t=new Ql.asn1.DERSequence({array:[new Ql.asn1.DERInteger({bigint:this.n}),new Ql.asn1.DERInteger({int:this.e})]}),n=new Ql.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new Ql.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return tl(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(Gl),Jl="undefined"!=typeof process?null===(Wl=process.env)||void 0===Wl?void 0:Wl.npm_package_version:void 0,$l=function(){function e(e){void 0===e&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ql(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(nl(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return tl(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.sign=function(e,t,n){try{return tl(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,nl(t),n)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new ql,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=Jl,e}(),ec={},tc={get exports(){return ec},set exports(e){ec=e}},nc={};Xl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zl={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&Zl.rotl(e,8)|4278255360&Zl.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=Zl.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,i=0;n<e.length;n++,i+=8)t[i>>>5]|=e[n]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],r=0;r<4;r++)8*n+6*r<=8*e.length?t.push(Xl.charAt(i>>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&t.push((Xl.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|Xl.indexOf(e.charAt(n))>>>6-2*i);return t}},{get exports(){return nc},set exports(e){nc=e}}.exports=Zl;var ic={utf8:{stringToBytes:function(e){return ic.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ic.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},rc=ic,sc=function(e){return null!=e&&(oc(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&oc(e.slice(0,0))}(e)||!!e._isBuffer)};function oc(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}!function(){var e=nc,t=rc.utf8,n=sc,i=rc.bin,r=function(s,o){s.constructor==String?s=o&&"binary"===o.encoding?i.stringToBytes(s):t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):Array.isArray(s)||s.constructor===Uint8Array||(s=s.toString());for(var a=e.bytesToWords(s),l=8*s.length,c=1732584193,h=-271733879,u=-1732584194,d=271733878,f=0;f<a.length;f++)a[f]=16711935&(a[f]<<8|a[f]>>>24)|4278255360&(a[f]<<24|a[f]>>>8);a[l>>>5]|=128<<l%32,a[14+(l+64>>>9<<4)]=l;var p=r._ff,g=r._gg,m=r._hh,v=r._ii;for(f=0;f<a.length;f+=16){var y=c,w=h,b=u,x=d;c=p(c,h,u,d,a[f+0],7,-680876936),d=p(d,c,h,u,a[f+1],12,-389564586),u=p(u,d,c,h,a[f+2],17,606105819),h=p(h,u,d,c,a[f+3],22,-1044525330),c=p(c,h,u,d,a[f+4],7,-176418897),d=p(d,c,h,u,a[f+5],12,1200080426),u=p(u,d,c,h,a[f+6],17,-1473231341),h=p(h,u,d,c,a[f+7],22,-45705983),c=p(c,h,u,d,a[f+8],7,1770035416),d=p(d,c,h,u,a[f+9],12,-1958414417),u=p(u,d,c,h,a[f+10],17,-42063),h=p(h,u,d,c,a[f+11],22,-1990404162),c=p(c,h,u,d,a[f+12],7,1804603682),d=p(d,c,h,u,a[f+13],12,-40341101),u=p(u,d,c,h,a[f+14],17,-1502002290),c=g(c,h=p(h,u,d,c,a[f+15],22,1236535329),u,d,a[f+1],5,-165796510),d=g(d,c,h,u,a[f+6],9,-1069501632),u=g(u,d,c,h,a[f+11],14,643717713),h=g(h,u,d,c,a[f+0],20,-373897302),c=g(c,h,u,d,a[f+5],5,-701558691),d=g(d,c,h,u,a[f+10],9,38016083),u=g(u,d,c,h,a[f+15],14,-660478335),h=g(h,u,d,c,a[f+4],20,-405537848),c=g(c,h,u,d,a[f+9],5,568446438),d=g(d,c,h,u,a[f+14],9,-1019803690),u=g(u,d,c,h,a[f+3],14,-187363961),h=g(h,u,d,c,a[f+8],20,1163531501),c=g(c,h,u,d,a[f+13],5,-1444681467),d=g(d,c,h,u,a[f+2],9,-51403784),u=g(u,d,c,h,a[f+7],14,1735328473),c=m(c,h=g(h,u,d,c,a[f+12],20,-1926607734),u,d,a[f+5],4,-378558),d=m(d,c,h,u,a[f+8],11,-2022574463),u=m(u,d,c,h,a[f+11],16,1839030562),h=m(h,u,d,c,a[f+14],23,-35309556),c=m(c,h,u,d,a[f+1],4,-1530992060),d=m(d,c,h,u,a[f+4],11,1272893353),u=m(u,d,c,h,a[f+7],16,-155497632),h=m(h,u,d,c,a[f+10],23,-1094730640),c=m(c,h,u,d,a[f+13],4,681279174),d=m(d,c,h,u,a[f+0],11,-358537222),u=m(u,d,c,h,a[f+3],16,-722521979),h=m(h,u,d,c,a[f+6],23,76029189),c=m(c,h,u,d,a[f+9],4,-640364487),d=m(d,c,h,u,a[f+12],11,-421815835),u=m(u,d,c,h,a[f+15],16,530742520),c=v(c,h=m(h,u,d,c,a[f+2],23,-995338651),u,d,a[f+0],6,-198630844),d=v(d,c,h,u,a[f+7],10,1126891415),u=v(u,d,c,h,a[f+14],15,-1416354905),h=v(h,u,d,c,a[f+5],21,-57434055),c=v(c,h,u,d,a[f+12],6,1700485571),d=v(d,c,h,u,a[f+3],10,-1894986606),u=v(u,d,c,h,a[f+10],15,-1051523),h=v(h,u,d,c,a[f+1],21,-2054922799),c=v(c,h,u,d,a[f+8],6,1873313359),d=v(d,c,h,u,a[f+15],10,-30611744),u=v(u,d,c,h,a[f+6],15,-1560198380),h=v(h,u,d,c,a[f+13],21,1309151649),c=v(c,h,u,d,a[f+4],6,-145523070),d=v(d,c,h,u,a[f+11],10,-1120210379),u=v(u,d,c,h,a[f+2],15,718787259),h=v(h,u,d,c,a[f+9],21,-343485551),c=c+y>>>0,h=h+w>>>0,u=u+b>>>0,d=d+x>>>0}return e.endian([c,h,u,d])};r._ff=function(e,t,n,i,r,s,o){var a=e+(t&n|~t&i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._gg=function(e,t,n,i,r,s,o){var a=e+(t&i|n&~i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._hh=function(e,t,n,i,r,s,o){var a=e+(t^n^i)+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._ii=function(e,t,n,i,r,s,o){var a=e+(n^(t|~i))+(r>>>0)+o;return(a<<s|a>>>32-s)+t},r._blocksize=16,r._digestsize=16,tc.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var s=e.wordsToBytes(r(t,n));return n&&n.asBytes?s:n&&n.asString?i.bytesToString(s):e.bytesToHex(s)}}();var ac,lc,cc={serialNums:[],key:""};class hc{constructor(e){this.viewport=e,this.encryptInfo=cc,ac.set(this,!0),lc.set(this,setTimeout((()=>{Dr(this,ac,!1,"f"),this.viewport.triggerRender()}),5e3))}verify(e,t){var n;clearTimeout(Er(this,lc,"f"));const i=new $l;i.setPublicKey(null===(n=this.encryptInfo)||void 0===n?void 0:n.key);const r=i.verify(e,t,ec);return Dr(this,ac,r,"f"),this.viewport.triggerRender(),r}getVerified(){return!0}}ac=new WeakMap,lc=new WeakMap;class uc{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,vertices:0,triangles:0,frametime:0,lodFrametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function i(){return document.createElement("br")}const r=n("0"),s=n("0"),o=n("0"),a=n("0"),l=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(r),this.container.appendChild(i()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(s),this.container.appendChild(i()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(o),this.container.appendChild(i()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(a),this.container.appendChild(i()),this.container.appendChild(n("lodFrametime",!1)),this.container.appendChild(l);const c=()=>{this.state.objects=0,this.state.vertices=0,this.state.triangles=0;for(let t=0;t<e.children.length;t++){e.children[t].traverseVisible((e=>{var t,n,i,r;if("SceneManager"!==e.stype&&this.state.objects++,e.isMesh){const s=e.geometry;s.isGeometry?(this.state.vertices+=(null===(t=s.vertices)||void 0===t?void 0:t.length)||0,this.state.triangles+=(null===(n=s.faces)||void 0===n?void 0:n.length)||0):s.isBufferGeometry&&(this.state.vertices+=(null===(i=s.attributes.position)||void 0===i?void 0:i.count)||0,null!==s.index?this.state.triangles+=s.index.count/3:this.state.triangles+=(null===(r=s.attributes.position)||void 0===r?void 0:r.count)/3||0)}}))}r.innerText=String(this.state.objects),o.innerText=String(this.state.vertices),s.innerText=String(this.state.triangles)};t.objectAdded.add(c),t.objectRemoved.add(c),t.geometryChanged.add(c);t.sceneRendered.add((e=>{this.state.frametime=e,a.innerText=Number(e).toFixed(2)+" ms"}));t.loadRendered.add((e=>{this.state.lodFrametime=e,l.innerText=Number(e).toFixed(2)+" ms"}))}}const dc=new e.Vector4;class fc extends e.Object3D{constructor(t,n){super();const i=new e.Color("#ff3653"),r=new e.Color("#8adb00"),s=new e.Color("#2c8fff"),o=new e.OrthographicCamera(-2,2,2,-2,0,4);o.position.set(0,0,2);const a=new e.BoxGeometry(.8,.05,.05).translate(.4,0,0),l=new e.Mesh(a,y(i)),c=new e.Mesh(a,y(r)),h=new e.Mesh(a,y(s));c.rotation.z=Math.PI/2,h.rotation.y=-Math.PI/2,this.add(l),this.add(h),this.add(c);const u=new e.Sprite(w(i,"X"));u.userData.type="posX";const d=new e.Sprite(w(r,"Y"));d.userData.type="posY";const f=new e.Sprite(w(s,"Z"));f.userData.type="posZ";const p=new e.Sprite(w(i));p.userData.type="negX";const g=new e.Sprite(w(r));g.userData.type="negY";const m=new e.Sprite(w(s));m.userData.type="negZ",u.position.x=1,d.position.y=1,f.position.z=1,p.position.x=-1,p.scale.setScalar(.8),g.position.y=-1,g.scale.setScalar(.8),m.position.z=-1,m.scale.setScalar(.8),this.add(u),this.add(d),this.add(f),this.add(p),this.add(g),this.add(m);const v=new e.Vector3;function y(t){return new e.MeshBasicMaterial({color:t,toneMapped:!1})}function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=document.createElement("canvas");i.width=64,i.height=64;const r=i.getContext("2d");if(!r)return;r.beginPath(),r.arc(32,32,16,0,2*Math.PI),r.closePath(),r.fillStyle=t.getStyle(),r.fill(),null!==n&&(r.font="24px Arial",r.textAlign="center",r.fillStyle="#000000",r.fillText(n,32,41));const s=new e.CanvasTexture(i);return new e.SpriteMaterial({map:s,toneMapped:!1})}this.render=function(e){this.quaternion.copy(t.quaternion).invert(),this.updateMatrixWorld(),v.set(0,0,1),v.applyQuaternion(t.quaternion),v.x>=0?(u.material.opacity=1,p.material.opacity=.5):(u.material.opacity=.5,p.material.opacity=1),v.y>=0?(d.material.opacity=1,g.material.opacity=.5):(d.material.opacity=.5,g.material.opacity=1),v.z>=0?(f.material.opacity=1,m.material.opacity=.5):(f.material.opacity=.5,m.material.opacity=1);const i=n.offsetWidth-128;e.clearDepth(),e.getViewport(dc),e.setViewport(i,0,128,128),e.render(this,o),e.setViewport(dc.x,dc.y,dc.z,dc.w)}}}const pc=new ne,gc=128;class mc extends C{constructor(e){super(),this.viewport=e,this.camera=new M(-1.6,1.6,.8,-.8,0,4),this.camera.position.z=2,this._generateMark()}_generateMark(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"试用版";const t=document.createElement("canvas");t.width=150,t.height=74;const n=t.getContext("2d");if(n){const i=n.createLinearGradient(0,0,t.width,t.height);i.addColorStop(0,"#ff3653"),i.addColorStop(.5,"#8adb00"),i.addColorStop(1,"#2c8fff"),n.fillStyle=i,n.font="bold 32px/1 serif",n.fillText(e,26,46)}const i=new Se(t),r=new Te({map:i,toneMapped:!1,transparent:!1}),s=new w(new Ee(2,1),r);this.add(s)}render(){const{renderer:e,container:t}=this.viewport,n=t.offsetWidth-256,i=t.offsetHeight-gc;e.clearDepth(),e.getViewport(pc),e.setViewport(n,i,256,gc),e.render(this,this.camera),e.setViewport(pc.x,pc.y,pc.z,pc.w)}}ie.prototype.computeBoundsTree=function(e){return this.boundsTree=new cr(this,e),this.boundsTree},ie.prototype.disposeBoundsTree=function(){this.boundsTree=null},w.prototype.raycast=function(e,t){if(this.geometry.boundsTree){if(void 0===this.material)return;ur.copy(this.matrixWorld).invert(),hr.copy(e.ray).applyMatrix4(ur);const n=this.geometry.boundsTree;if(!0===e.firstHitOnly){const i=Di(n.raycastFirst(hr,this.material),this,e);i&&t.push(i)}else{const i=n.raycast(hr,this.material);for(let n=0,r=i.length;n<r;n++){const r=Di(i[n],this,e);r&&t.push(r)}}}else dr.call(this,e,t)},De.prototype.firstHitOnly=!0;const vc={needsUpdate:!1};let yc=0,wc=0;const bc=e=>{e instanceof l&&e.dispose()};class xc{constructor(e){this.clock=new Ce,this.raycaster=new De,this.sky=null,this.options=e,this.state={useFreq:1,isPausedRender:!1,isDisposed:!1},this.signals={windowResize:new gs,cameraObjectChange:new gs,sceneChanged:new gs,backgroundChanged:new gs,beforeRender:new gs,sceneRendered:new gs,loadRendered:new gs,tweenUpdate:new gs,hover:new gs,click:new gs,dblClick:new gs,rightClick:new gs,mouseDown:new gs,mouseMove:new gs,mouseUp:new gs,mouseWheel:new gs,keyDown:new gs,keyUp:new gs,modelHover:new gs,modelUnHover:new gs,modelClick:new gs,modelDblClick:new gs,modelRightClick:new gs,poiHover:new gs,poiUnHover:new gs,poiClick:new gs,poiDblClick:new gs,poiRightClick:new gs,selectPosition:new gs,sceneClick:new gs,objectAdded:new gs,objectRemoved:new gs,objectChanged:new gs,geometryChanged:new gs,materialAdded:new gs,materialChanged:new gs,materialRemoved:new gs,cameraChange:new gs,outlineChange:new gs,modelAnimation:new gs,getSceneInfo:new gs},this.scener=new ws(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new Zs(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new Ls(this),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.pmremGenerator=new ue(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new Ia(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Pa(this),this.controls=new Ga(this),this.info=new uc(this.scene,this.signals),this.stats=ft(),this.mixer=new Be(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this.selectModel=null,this.selectPoi=null,this._loop=0,this.viewHelper=new fc(this.camera,this.container),this.license=new hc(this),this.waterMark=new mc(this),this._initInfo(),this._initStats(),this._signalsEventListenr(),this._containerAddEventListener(this.container),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setSSR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0,intensity:n=1,exponent:i=1.75,distance:r=20,fade:s=0,roughnessFade:o=1,thickness:a=3.5,ior:l=1.75,maxRoughness:c=.1,maxDepthDifference:h=20,blend:u=.95,correction:d=1,correctionRadius:f=1,blur:p=1,blurKernel:g=1,blurSharpness:m=10,jitter:v=0,jitterRoughness:y=2,steps:w=20,refineSteps:b=10,missedRays:x=!1,useNormalMap:A=!0,useRoughnessMap:S=!0,resolutionScale:T=1,velocityResolutionScale:E=1}=e,{effectManager:D}=this;D.effectsNeedsUpddate=!0;const C=D.effectsMap.get(Ia.CONSTANTS.ssrEffect);C.enabled=t;const{effect:B}=C;B.usingBoxProjectedEnvMap=!0,B.intensity=n,B.exponent=i,B.distance=r,B.fade=s,B.roughnessFade=o,B.thickness=a,B.ior=l,B.maxRoughness=c,B.maxDepthDifference=h,B.blend=u,B.correction=d,B.correctionRadius=f,B.blur=p,B.blurKernel=g,B.blurSharpness=m,B.jitter=v,B.jitterRoughness=y,B.steps=w,B.refineSteps=b,B.missedRays=x,B.useNormalMap=A,B.useRoughnessMap=S,B.resolutionScale=T,B.velocityResolutionScale=E,this.triggerRender()}setBloom(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{enabled:n=!0,mipmapBlur:i=!0,radius:r=.85,intensity:s=3,threshold:o=1,smoothing:a=0,scalar:l=2,opacity:c=1,selection:h=[]}=e,{effectManager:u}=this;u.effectsNeedsUpddate=!0;const d=u.effectsMap.get(Ia.CONSTANTS.bloomEffect);d.enabled=n;const{effect:f}=d;f.intensity=s;const{mipmapBlurPass:p,renderTarget:g}=f;p.enabled=i,p.radius=r;const m=f.uniforms.get("map");m&&(m.value=i?p.texture:g.texture),f.luminanceMaterial.threshold=o,f.luminanceMaterial.smoothing=a,f.blendMode.opacity.value=c,null===(t=f.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e instanceof w&&e.material.color&&(e.material.toneMapped=!0,e.material.color.multiplyScalar(1/l))})),f.luminanceMaterial.userData.bloomSelection=[],n&&h.forEach((e=>{e.traverse((e=>{e instanceof w&&e.material.color&&(e.material.toneMapped=!1,e.material.color.multiplyScalar(l),f.luminanceMaterial.userData.bloomSelection.push(e))}))})),this.triggerRender()}setSSAO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0,depthAwareUpsampling:n=!0,samples:i=32,rings:r=7,distanceThreshold:s=.02,distanceFalloff:o=.0025,rangeThreshold:l=3e-4,rangeFalloff:c=1e-4,luminanceInfluence:h=.7,minRadiusScale:u=.33,radius:d=.1,intensity:f=3,bias:p=.004,fade:g=.01,color:m=null,resolutionScale:v=1}=e,{effectManager:y}=this;y.effectsNeedsUpddate=!0;const w=y.passesMap.get(Ia.CONSTANTS.normalPass),b=y.effectsMap.get(Ia.CONSTANTS.ssaoEffect);w.enabled=t,b.enabled=t;const{effect:x}=b,{ssaoMaterial:A}=x;x.depthAwareUpsampling=n,x.luminanceInfluence=h,x.resolution.scale=v,x.intensity=f,A.samples=i,A.rings=r,A.distanceThreshold=s,A.distanceFalloff=o,A.proximityThreshold=l,A.proximityFalloff=c,A.minRadiusScale=u,A.fade=g,A.bias=p,A.radius=d,m&&(x.color=new a(m)),this.triggerRender()}setColorSpace(e){this.renderer.outputEncoding="sRGB"===e?_:H,this.signals.sceneChanged.dispatch()}setToneMapping(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="ACESFilmic",exposure:n=.8}=e,i={None:_e,Linear:Re,Reinhard:Le,Cineon:Ne,ACESFilmic:Pe};this.renderer.toneMapping=i[t],this.renderer.toneMappingExposure=n,this.signals.sceneChanged.dispatch()}async setSphereSkyBackground(e){const t=Nn(e);if("hdr"===t||"pic"===t){const t=await(new dt).loadAsync(e);t.mapping=Me,bc(this.scene.background),this.scene.background=t}else{const t=await(new Ie).loadAsync(e);t.mapping=Me,bc(this.scene.background),this.scene.background=t}this.signals.backgroundChanged.dispatch()}async setSkyBackground(e,t){const n=await hn(e,t);bc(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}setBackgroundColor(e){bc(this.scene.background),this.scene.background=new a(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){bc(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new a(e),t),this.signals.backgroundChanged.dispatch()}async setBackgroundImage(e){const t=new Ie,n=await t.loadAsync(e);this.scene.background=n,this.signals.backgroundChanged.dispatch()}setSky(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:n=!0,position:i={x:0,y:0,z:0},scalar:r=45e4,turbidity:s=10,rayleigh:o=3,elevation:a=2,azimuth:l=180,exposure:c=.6}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new pt,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(i.x,i.y,i.z),this.sky.scale.setScalar(r);const h=this.sky.material.uniforms;h.turbidity.value=s,h.rayleigh.value=o,h.mieCoefficient.value=.005,h.mieDirectionalG.value=.7;const u=new t,d=sn(90-a),f=sn(l);return u.setFromSphericalCoords(1,d,f),h.sunPosition.value.copy(u),this.sky.userData.toneMapping=this.renderer.toneMapping,this.sky.userData.toneMappingExposure=this.renderer.toneMappingExposure,this.renderer.toneMapping=Pe,this.renderer.toneMappingExposure=c,this.signals.objectAdded.dispatch(),this.sky}closeSky(){if(!this.sky)return!1;const{toneMapping:e,toneMappingExposure:t}=this.sky.userData;return this.renderer.toneMapping=e,this.renderer.toneMappingExposure=t,this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}setEnvironment(){return this.scene.environment=this.pmremGenerator.fromScene(new ut,.04).texture,this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof Oe?n=t:Mn(t)?n=e.animations[t]:On(t)&&(n=e.animations.find(t)),!n)return;const i=this.mixer.clipAction(n,e);return i.play(),this.clipsSet.add(n),i}stopModelAnimation(e,t){var n;let i;t instanceof Oe?i=t:Mn(t)?i=e.animations[t]:On(t)&&(i=e.animations.find(t)),i&&(null===(n=this.mixer.existingAction(i))||void 0===n||n.stop(),this.mixer.uncacheAction(i,e),this.clipsSet.delete(i))}async render(e){return await(null==e?void 0:e()),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}triggerRender(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.state.useFreq=e}async setPauseRender(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.state.isPausedRender=e,!1===e)return this.render()}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(e){if(this.state.useFreq<=0&&!vc.needsUpdate)return;if(this.state.useFreq>0&&this.state.useFreq--,vc.needsUpdate&&(vc.needsUpdate=!1),this.state.isPausedRender)return;yc=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.effectComposer.render();const t=this.scene.matrixWorldAutoUpdate;this.scene.matrixWorldAutoUpdate=!1,this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.scene,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.scene,this.camera),this.scene.matrixWorldAutoUpdate=t,this.options.showViewHelper&&this.camera===this.cameraManager.mainCamera&&this.viewHelper.render(this.renderer),this.license.getVerified()||this.waterMark.render(),this.postRender.forEach((t=>t(e))),wc=performance.now(),this.signals.sceneRendered.dispatch(wc-yc)}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),jt.update()&&this.signals.tweenUpdate.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(e),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),i=this.renderer.domElement.getBoundingClientRect();return{left:Math.round(i.left+i.width/2*(n.x+1)),top:Math.round(i.top+i.height/2*(1-n.y))}}getPositionByOffset(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;const i=new t(0,0,0),r=new t(0,0,0),s=this.renderer.domElement.getBoundingClientRect();r.set(e.offsetX/s.width*2-1,-e.offsetY/s.height*2+1,n),r.unproject(this.camera),r.sub(this.camera.position).normalize();const o=r.distanceTo(this.camera.position);return i.copy(this.camera.position).add(r.multiplyScalar(o)),i}getIntersects(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scener.intersectsList.getAll(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{isFilterHideObject:i=!0}=n,r=this.container.getBoundingClientRect();let s={offsetX:0,offsetY:0};if(e instanceof MouseEvent)s={offsetX:e.clientX-r.left,offsetY:e.clientY-r.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];s={offsetX:t.clientX-r.left,offsetY:t.clientY-r.top}}else s=e;const o=new h;o.set(s.offsetX/r.width*2-1,-s.offsetY/r.height*2+1),this.raycaster.setFromCamera(o,this.camera);let a=[];return a=In(t)?this.raycaster.intersectObjects(t,!0):this.raycaster.intersectObject(t,!0),i?a.filter((e=>{let{object:t}=e;return ln(t)})):a}rayClash(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.camera.position,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(0,-1,0),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.scener.intersectsList.meshOfModelList;const r=new De;return r.set(e,n),In(i)?r.intersectObjects(i,!0):r.intersectObject(i,!0)}setHoverEnabled(e){this.options.hoverEnabled=e}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),jt.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0}_signalsEventListenr(){const e=()=>{const{offsetWidth:e,offsetHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.triggerRender()};setTimeout((()=>e())),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e),this.signals.sceneChanged.add((()=>this.triggerRender())),this.signals.backgroundChanged.add((()=>this.triggerRender())),this.signals.objectAdded.add((()=>this.triggerRender())),this.signals.objectRemoved.add((()=>this.triggerRender())),this.signals.objectChanged.add((()=>this.triggerRender())),this.signals.materialAdded.add((()=>this.triggerRender())),this.signals.materialRemoved.add((()=>this.triggerRender())),this.signals.materialChanged.add((()=>this.triggerRender())),this.signals.geometryChanged.add((()=>this.triggerRender())),this.signals.cameraChange.add((()=>this.triggerRender())),this.signals.tweenUpdate.add((()=>this.triggerRender())),this.signals.modelAnimation.add((()=>this.triggerRender()));this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:i,hideColor:r,edgeThickness:s,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this;a.effectsNeedsUpddate=!0;const l=a.effectsMap.get(Ia.CONSTANTS.outlineEffect),c=t.length>0;l.enabled=c;const{effect:h}=l,{uniforms:u}=h,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof w&&d.push(e)}))})),h.selection.set(d),h.blur=s>0,h.blurPass.kernelSize=s;const f=u.get("visibleEdgeColor"),p=u.get("hiddenEdgeColor"),g=u.get("edgeStrength");f&&f.value.set(i),p&&p.value.set(r),g&&(g.value=o),this.triggerRender()}))}_containerAddEventListener(e){const t=[0,0];let n=null;const i=r=>{var s,o;this.signals.mouseUp.dispatch(r);const a=r.offsetX-(null!==(s=null==n?void 0:n.offsetX)&&void 0!==s?s:0),l=r.offsetY-(null!==(o=null==n?void 0:n.offsetY)&&void 0!==o?o:0);if(Math.abs(a)>2||Math.abs(l)>2)return t[0]=0,void(t[1]=0);setTimeout((()=>{0!==t[0]&&0===t[1]&&(0===r.button?(this.signals.click.dispatch(r),this._triggerSceneEventInAllObject("click",r)):2===r.button&&(this.signals.rightClick.dispatch(r),this._triggerSceneEventInAllObject("rightClick",r))),t[0]=0,t[1]=0}),300),e.removeEventListener("mouseup",i,!1)};let r=!1,s=null,o=null;const a=[0,0],l=e=>{var t,n;s&&clearTimeout(s);const i=()=>{r=!1,a[0]=0,a[1]=0},l=e.changedTouches[0].clientX-(null!==(t=null==o?void 0:o.changedTouches[0].clientX)&&void 0!==t?t:0),c=e.changedTouches[0].clientY-(null!==(n=null==o?void 0:o.changedTouches[0].clientY)&&void 0!==n?n:0);Math.abs(l)>2||Math.abs(c)>2?i():r?(i(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):setTimeout((()=>{0!==a[0]&&0===a[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==a[0]&&0!==a[1]&&a[1]-a[0]<=300&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)),i()}),300)};e.addEventListener("mousedown",(r=>{n=r,this.signals.mouseDown.dispatch(r),0===t[0]?t[0]=performance.now():0===t[1]&&(t[1]=performance.now()),e.addEventListener("mouseup",i,!1)}),!1),e.addEventListener("mousemove",(e=>{this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e)}),!1),e.addEventListener("dblclick",(e=>{this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)}),!1),e.addEventListener("wheel",(e=>{this.signals.mouseWheel.dispatch(e)}),{passive:!0}),e.addEventListener("touchstart",(t=>{0===a[0]?a[0]=performance.now():0===a[1]&&(a[1]=performance.now()),o=t,s&&clearTimeout(s),s=setTimeout((()=>{r=!0}),800),e.addEventListener("touchend",l,{once:!0})}),{passive:!0}),e.addEventListener("contextmenu",(e=>e.preventDefault()),!1),document.addEventListener("keydown",(e=>{this.signals.keyDown.dispatch(e)}),!1),document.addEventListener("keyup",(e=>{this.signals.keyUp.dispatch(e)}),!1)}_triggerSceneEventInAllObject(e,t){const n=this.getIntersects(t,this.scener.intersectsList.getAll());if(0===n.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void this.signals.sceneClick.dispatch({type:e,event:t});const i={object:null,type:null,point:null},r=[],s=[];function o(e){return e.parent?"Model"===e.parent.stype?e.parent:o(e.parent):void 0}n.forEach((e=>{if(e.object.parent instanceof Pc){const t=e.object.parent;i.object||(i.type="Poi",i.object=e.object,i.point=e.point);-1===r.findIndex((e=>e.poi.uuid===t.uuid))&&r.push({poi:t,sourceData:e})}else if(e.object instanceof C){const t=o(e.object);t&&(i.object||(i.type="Model",i.object=e.object,i.point=e.point),s.push({model:t,sourceData:e}))}})),"click"===e&&i.point&&this.signals.selectPosition.dispatch(i.point);const a=e.slice(0,1).toUpperCase()+e.slice(1),l=e=>{var n;const{model:r}=e[0];if(r)if("Hover"===a)(null===(n=this.selectModel)||void 0===n?void 0:n.uuid)!==r.uuid&&(this.signals.modelHover.dispatch({target:r,currentTarget:i.object,intersects:e,event:t}),this.selectModel=r);else{let n=null;"Click"===a?(n=r.onClick,r.dispatchEvent({type:"click"})):"RightClick"===a?(n=r.onRightClick,r.dispatchEvent({type:"rightClick"})):"DblClick"===a&&(n=r.onDblClick,r.dispatchEvent({type:"dblClick"})),n?n(r):r.isEventPropagation=!0,r.isEventPropagation&&(this.signals[`model${a}`].dispatch({target:r,currentTarget:i.object,intersects:e,event:t}),r.isEventPropagation=!1)}},c=e=>{var n;const{poi:i}=e[0];if(i)if("Hover"===a)(null===(n=this.selectPoi)||void 0===n?void 0:n.uuid)!==i.uuid&&(this.signals.poiHover.dispatch({target:i,event:t}),this.selectPoi=i);else{let e=null;"Click"===a?(e=i.onClick,i.dispatchEvent({type:"click"})):"RightClick"===a?(e=i.onRightClick,i.dispatchEvent({type:"rightClick"})):"DblClick"===a&&(e=i.onDblClick,i.dispatchEvent({type:"dblClick"})),e?e(i):i.isEventPropagation=!0,i.isEventPropagation&&(this.signals[`poi${a}`].dispatch({target:i,event:t}),i.isEventPropagation=!1)}};if("Hover"===a){if(s.length>0){const[{model:e}]=s;this.selectModel&&this.selectModel.uuid!==e.uuid&&(this.signals.modelUnHover.dispatch(this.selectModel),this.selectModel=null)}if(r.length>0){const[{poi:e}]=r;this.selectPoi&&this.selectPoi.uuid!==e.uuid&&(this.signals.poiUnHover.dispatch(this.selectPoi),this.selectPoi=null)}}"Model"===i.type?l(s):"Poi"===i.type&&c(r)}}class Ac extends w{constructor(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"BaseMesh";super(e,t);const{id:r,name:s="",level:o={max:null,min:null},visible:a=!0,position:l={x:0,y:0,z:0},rotation:c={x:0,y:0,z:0},scale:h={x:1,y:1,z:1},userData:u={}}=n;if(void 0===r)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=r,this.name=s,this.stype=i,this.level=o,this.visible=null==a||a,this.handleHide=!a,this.position.set(l.x,l.y,l.z),this.rotation.set(c.x,c.y,c.z),this.scale.set(h.x,h.y,h.z),this.castShadow=!0,this.receiveShadow=!0,this.userData=u,this.isEventPropagation=!1,this.autoUpdate=!1}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0,vc.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0,vc.needsUpdate=!0}setMove(e,t,n,i){return jn(this.position,$t(e),t,n,i)}setRotate(e,t,n,i){const s=en(e),o=this.quaternion.clone(),a=(new r).setFromEuler(s);return jn({t:0},{t:1},t,((e,t)=>{let{t:i}=e;this.quaternion.slerpQuaternions(o,a,i),null==n||n(this.rotation,t)}),i)}setScale(e,t,n,i){return jn(this.scale,$t(e),t,n,i)}getBoundingBox(){return new i(new t,new t).setFromObject(this)}eventPropagation(){this.isEventPropagation=!0}sClone(e){return new Ac(this.geometry,this.material,{id:`clone_${Ln()}`}).sCopy(this,e)}sCopy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.stype=e.stype,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.geometry=e.geometry,this.material=e.material,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,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.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++)e.children[t]instanceof Tc||e.children[t]instanceof Ac?this.add(e.children[t].sClone()):this.add(e.children[t].clone());return this}}const Sc={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class Tc extends C{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BaseObject3D";super();const{id:n,name:i="",level:r={max:null,min:null},visible:s=!0,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},userData:c={},onLoad:h,onClick:u,onDblClick:d,onRightClick:f}=Object.assign(Object.assign({},Sc),e);if(void 0===n)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=n,this.name=i,this.stype=t,this.level=r,this.visible=null==s||s,this.handleHide=!s,this.isEventPropagation=!1,this.position.set(o.x,o.y,o.z),this.rotation.set(a.x,a.y,a.z),this.scale.set(l.x,l.y,l.z),this.castShadow=!0,this.receiveShadow=!0,this.userData=c,this.autoUpdate=!1,this.onLoad=(null==h?void 0:h.bind(this))||null,this.onClick=(null==u?void 0:u.bind(this))||null,this.onDblClick=(null==d?void 0:d.bind(this))||null,this.onRightClick=(null==f?void 0:f.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0,vc.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0,vc.needsUpdate=!0}setMove(e,t,n,i){return jn(this.position,$t(e),t,n,i)}setRotate(e,t,n,i){const s=en(e),o=this.quaternion.clone(),a=(new r).setFromEuler(s);return jn({t:0},{t:1},t,((e,t)=>{let{t:i}=e;this.quaternion.slerpQuaternions(o,a,i),null==n||n(this.rotation,t)}),i)}setScale(e,t,n,i){return jn(this.scale,$t(e),t,n,i)}sClone(e){return new Tc({id:`clone_${Ln()}`}).sCopy(this,e)}sCopy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.stype=e.stype,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.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.userData=JSON.parse(JSON.stringify(e.userData)),this.animations=e.animations,!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];n instanceof Tc||n instanceof Ac?this.add(n.sClone()):this.add(n.clone())}return this}getBoundingBox(){return new i(new t,new t).setFromObject(this)}getSpaceAttribute(){return on(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}syncSpaceAttribute(e){e instanceof Tc?an(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]):Jt("In soonspacejs: BaseObject3D 对象原型方法 'syncSpaceAttribute' 第一个参数对象类型错误!")}}class Ec extends Tc{constructor(e){super(e,"Group")}showAllChild(){this.children.forEach((e=>{e instanceof Tc&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof Tc&&e.hide()}))}}class Dc extends Tc{constructor(e){super(e,"PluginObject")}}class Cc extends Tc{constructor(e){super(e,"PoiNode");const{type:t,element:n,elementAutoDisplay:i=!0,occlude:r=!1,onChange:s}=e;this.elementType=t,this.element=n,this.elementAutoDisplay=i,this.occlude=r,this.onChange=s,this.create(t)}create(e){"2D"===e||"2d"===e?this._create2D():"2.5D"===e||"2.5d"===e?this._create2DHalf():"3D"!==e&&"3d"!==e||this._create3D()}show(){this.visible=!0,this.handleHide=!1,this.autoUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,this.autoUpdate=!0}getBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;e=e<=0?50:e;const n=new t,r=new t,s=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(s),r.add(s),new i(n,r)}_create2D(){this.add(new bs(this.element))}_create2DHalf(){this.add(new Ps(this.element))}_create3D(){this.add(new Is(this.element))}}class Bc extends Tc{constructor(e){super(e,"Model");const{format:t}=e;this.formatType=t}setEnvMap(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};hn(e,t).then((e=>{this.traverse((t=>{if(t instanceof w&&t.material instanceof D){const{reflectivity:i=.5}=n;t.material.envMap=e,t.material.envMapIntensity=i,vc.needsUpdate=!0}}))}))}sClone(e){return new Bc({id:`${this.sid}_clone`,url:"",format:this.formatType}).sCopy(this,e)}}const Mc={position:{x:0,y:0,z:0},scale:{x:16,y:16,z:1},stype:"Icon"};class Ic extends ke{constructor(e,t){super(e);const{position:n,scale:i,stype:r}=Object.assign(Object.assign({},Mc),t);this.stype=r,this.position.set(n.x,n.y,n.z),this.scale.set(i.x,i.y,i.z),this.renderOrder=1}}class Pc extends Tc{constructor(e,t){super(t,"Poi");const{name:n,type:i="2.5d",nameScale:r={x:16,y:16,z:1}}=t;this.iconType=i,this.icon=this._createIcon(e);const s={position:{x:0,y:10,z:0},name:n,scale:r};this.text=this.name?this._createText(s):null,this.renderOrder=11}getBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;e=e<=0?50:e;const n=new t,r=new t,s=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(s),r.add(s),new i(n,r)}sClone(e,t){return new Pc(this.icon.material,{id:`${this.sid}_clone`,url:"",type:null!=t?t:this.iconType,name:this.name}).sCopy(this,e)}_createIcon(e){const t=new Ic(this._computeMaterialSizeAttenuation(e));return this.add(t),t}_createText(e){const t=this._createTextMaterial(e),n=new Ic(this._computeMaterialSizeAttenuation(t),e);return this.add(n),n}_createTextMaterial(e){const t=this._createTextCanvas(e.name||""),n=new l(t);n.flipY=!0,n.version+=1;return new Ue({map:n,depthTest:!0})}_createTextCanvas(e,t){const n=256,i=document.createElement("canvas");i.width=n,i.height=n;const r=i.getContext("2d"),{fontFamily:s,fontSize:o,color:a,textAlign:l,textBaseline:c}=Object.assign(Object.assign({},{fontFamily:"Microsoft YaHei",fontSize:32,color:"#fff",textAlign:"center",textBaseline:"bottom"}),t);return r&&(r.save(),r.font=o+"px "+s,r.textAlign=l,r.textBaseline=c,r.shadowColor="black",r.strokeStyle="black",r.lineWidth=3,r.fillStyle=a,r.strokeText(e,128,128),r.fillText(e,128,128),r.restore()),i}_computeMaterialSizeAttenuation(e){return"2D"===this.iconType||"2d"===this.iconType?e.sizeAttenuation=!1:"2.5D"!==this.iconType&&"2.5d"!==this.iconType||(e.sizeAttenuation=!0),e}}class Oc extends Ac{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Point";const{radius:n=10,color:i=16777215,opacity:r=1,gradient:s}=e;super(function(e){return new je(e,32,32)}(n),function(e,t,n){return new Te({color:e,opacity:t,transparent:t<1,map:un(n)})}(i,r,s),e,t)}setOptions(e){const{color:t,opacity:n,radius:i,position:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&(this.geometry=new je(i,32,32)),r&&this.position.copy($t(r)),s&&(o.map=un(s)),o.needsUpdate=!0,vc.needsUpdate=!0}}class _c extends Oc{constructor(e){super(e,"Node"),this.graphs=e.graphs}}class Rc extends Ac{constructor(e){const{radius:t=50,color:n=16777215,opacity:i=1,gradient:r}=e;super(function(e){return new Fe(e,64)}(t),function(e,t,n){return new Te({color:e,opacity:t,transparent:t<1,side:v,map:un(n)})}(n,i,r),e,"Circle"),this.rotation.set(Math.PI/2,0,0)}setOptions(e){const{color:t,opacity:n,radius:i,position:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&(this.geometry=new Fe(i,64)),r&&this.position.copy($t(r)),s&&(o.map=un(s)),o.needsUpdate=!0,vc.needsUpdate=!0}}class Lc extends Ac{constructor(e){const{start:n,end:i,imgUrl:r,width:s=20,color:o=65280,opacity:a=1,animation:l=!1,passable:c=0,restrict:h=0}=e,u=$t(n),d=$t(i),f=u.distanceTo(d);super(function(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new t(0,1,0);const s=i/2,o=new t,a=new t;o.subVectors(n,e),o.normalize(),a.crossVectors(o,r),0===a.length()&&a.crossVectors(o,new t(0,0,-1));const l=new t(a.x*s,a.y*s,a.z*s),c=new t(-a.x*s,-a.y*s,-a.z*s),h=new t;h.addVectors(e,l);const u=new t;u.addVectors(e,c);const d=new t;d.addVectors(n,c);const f=new t;f.addVectors(n,l);const p=new ie;return p.setAttribute("position",new ze([h.x,h.y,h.z,u.x,u.y,u.z,d.x,d.y,d.z,d.x,d.y,d.z,f.x,f.y,f.z,h.x,h.y,h.z],3)),p.setAttribute("uv",new ze([0,0,1,0,1,1,1,1,0,1,0,0],2)),p}(u,d,s),function(e,t,n,i,r,s){const o=new Te({color:n,side:v,transparent:void 0!==i&&i<1,opacity:i});let a;return r&&(a=(new Ie).load(r,(n=>{a.repeat.set(1,e/(t*(n.image.height/n.image.width))*.63*(n.image.height/n.image.height)),o.color.set(16777215)})),a.wrapS=V,a.wrapT=V,a.flipY=!0,a.matrixAutoUpdate=!0,Bn(s)&&s?jn(a.offset,{y:-1,x:0},{repeat:!0,duration:500}):Pn(s)&&jn(a.offset,{y:-1,x:0},Object.assign(Object.assign({},s),{repeat:!0})),o.map=a),o}(f,s,o,a,r,l),e,"Link"),this.passable=c,this.restrict=h}}class Nc extends Tc{constructor(e){super(e,"Topology");const{type:t="line"}=e;this.topologyType=t,this.nodes=[],this.links=[],this.info=e,this.create()}create(){var e,t;const{nodes:n,renderLink:i=!0,linkWidth:r=20,linkColor:s=65280,renderNode:o=!0,nodeColor:a=255,nodeRadius:l=r/2,imgUrl:c,animation:h=!1}=this.info,u=[];for(const d of n){const n=this.createNode(Object.assign(Object.assign({},d),{radius:l,color:a}));if(!1===o&&n.hide(),this.nodes.push(n),!c&&i){const n=In(s)?s[null===(e=d.graphs[0])||void 0===e?void 0:e.passable]?s[null===(t=d.graphs[0])||void 0===t?void 0:t.passable]:s[0]:s;!o&&this.createCircle({id:`${d.id}_circle`,name:`${d.name||d.id}_circle`,position:d.position,radius:r/2,color:n})}if(i)for(let e=0;e<d.graphs.length;e++){const{linkInfo:t,targetNodeId:n,passable:i,restrict:o}=d.graphs[e],{id:a,name:l}=t,f=this.info.nodes.find((e=>e.id===n));if(!u.includes(a)&&f){u.push(a);const e=In(s)?s[i]?s[i]:s[0]:s,t=this.createLink({id:a,name:l,start:d.position,end:f.position,width:r,color:e,imgUrl:c,opacity:c?.99:1,animation:h,passable:i,restrict:o,userData:{startNodeId:d.id,endNodeId:f.id}});this.links.push(t)}}}}createNode(e){const t=new _c(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new Rc(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new Lc(Object.assign({},e));return this.add(t),t}resetNodes(e){const{renderLink:t=!0,linkWidth:n=20,linkColor:i=65280,renderNode:r=!0,nodeColor:s=255,nodeRadius:o=n/2,imgUrl:a,animation:l=!1}=this.info,c=[],h=[...this.info.nodes];this.info.nodes=[...e];const u=[];for(let t=0;t<h.length;t++){const n=e.find((e=>e.id===h[t].id));n&&$t(n.position).equals($t(h[t].position))||u.push(h[t])}for(let e=0;e<u.length;e++){const t=this.nodes.findIndex((t=>u[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const d=[];for(let t=0;t<e.length;t++){const n=h.find((n=>n.id===e[t].id));n&&$t(n.position).equals($t(e[t].position))||d.push(e[t])}for(let e=0;e<d.length;e++){const t=this.createNode(Object.assign(Object.assign({},d[e]),{radius:o,color:s}));this.nodes.push(t)}this.remove(...this.links),this.links.length=0;for(const r of e)if(t)for(let e=0;e<r.graphs.length;e++){const{linkInfo:t,targetNodeId:s,passable:o,restrict:h}=r.graphs[e],{id:u,name:d}=t,f=this.info.nodes.find((e=>e.id===s));if(!c.includes(u)&&f){c.push(u);const e=In(i)?i[o]?i[o]:i[0]:i,t=this.createLink({id:u,name:d,start:r.position,end:f.position,width:n,color:e,imgUrl:a,opacity:a?.99:1,animation:l,passable:o,restrict:h});this.links.push(t)}}}getLength(){let e=0;for(let t=1;t<this.nodes.length;t++)e+=this.nodes[t].position.distanceTo(this.nodes[t-1].position);return e}}function kc(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new t(0,1,0);const r=n/2,s=new ie;let o=[],a=[];if(e.length<2)return s;for(let n=0;n<e.length-1;n++){const s=$t(e[n]),l=$t(e[n+1]),c=new t,h=new t;c.subVectors(l,s),c.normalize(),h.crossVectors(c,i);const u=new t(h.x*r,h.y*r,h.z*r),d=new t(-h.x*r,-h.y*r,-h.z*r),f=new t;f.addVectors(s,u);const p=new t;p.addVectors(s,d);const g=new t;g.addVectors(l,d);const m=new t;m.addVectors(l,u),o=[...o,f.x,f.y,f.z,p.x,p.y,p.z,g.x,g.y,g.z,g.x,g.y,g.z,m.x,m.y,m.z,f.x,f.y,f.z],a=[...a,0,0,1,0,1,1,1,1,0,1,0,0]}return s.setAttribute("position",new ze(o,3)),s.setAttribute("uv",new ze(a,2)),s}class Uc extends Ac{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Line";const{points:n,width:i=20,color:r=16777215,opacity:s=1,gradient:o}=e;super(kc(n,i),function(e,t,n){return new Te({color:e,side:v,transparent:t<1,opacity:t,map:un(n)})}(r,s,o),e,t),this.params=e,this.points=n,this.frustumCulled=!1}setOptions(e){var t;const{color:n,opacity:i,points:r,width:s,gradient:o}=e;this.points=r;const l=this.material;n&&(l.color=new a(n)),i&&(l.opacity=i),o&&(l.map=un(o)),r&&s?this.geometry=kc(r,s):r?this.geometry=kc(r,null!==(t=this.params.width)&&void 0!==t?t:20):s&&(this.geometry=kc(this.points,s)),l.needsUpdate=!0,vc.needsUpdate=!0}}function jc(e){const t=[];for(let n=0;n<e.length;n++)t.push(new h(e[n].x,e[n].z));return t.length>2?new He(new Ge(t)):new ie}class Fc extends Ac{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Polygon";const{yHeight:n,points:i,color:r=16777215,opacity:s=1,gradient:o}=e;super(jc(i),function(e,t,n){return new Te({color:e,opacity:t,transparent:t<1,side:v,map:un(n)})}(r,s,o),e,t),this.points=i,this.position.set(0,n,0),this.rotation.set(Math.PI/2,0,0)}setOptions(e){const{color:t,opacity:n,yHeight:i,points:r,gradient:s}=e,o=this.material;t&&(o.color=new a(t)),n&&(o.opacity=n),i&&this.position.set(0,i,0),r&&(this.geometry=jc(r)),s&&(o.map=un(s)),o.needsUpdate=!0,vc.needsUpdate=!0}}class zc extends Tc{constructor(e){super(e,"Canvas3D"),this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:i=[],circles:r=[]}=e;for(let e=0;e<t.length;e++)this.createPoint(t[e]);for(let e=0;e<n.length;e++)this.createLine(n[e]);for(let e=0;e<i.length;e++)this.createPolygon(i[e]);for(let e=0;e<r.length;e++)this.createCircle(r[e])}createPoint(e){const t=new Oc(e);return this.add(t),vc.needsUpdate=!0,t}getPoint(e){return this.getChildForType("Point",e)}removePoint(e){const t=this.getPoint(e);t&&this.remove(t),vc.needsUpdate=!0}createLine(e){const t=new Uc(e);return this.add(t),vc.needsUpdate=!0,t}getLine(e){return this.getChildForType("Line",e)}removeLine(e){const t=this.getLine(e);t&&this.remove(t),vc.needsUpdate=!0}createPolygon(e){const t=new Fc(e);return this.add(t),vc.needsUpdate=!0,t}getPolygon(e){return this.getChildForType("Polygon",e)}removePolygon(e){const t=this.getPolygon(e);t&&this.remove(t),vc.needsUpdate=!0}createCircle(e){const t=new Rc(e);return this.add(t),vc.needsUpdate=!0,t}getCircle(e){return this.getChildForType("Circle",e)}removeCircle(e){const t=this.getCircle(e);t&&this.remove(t),vc.needsUpdate=!0}getChildForType(e,t){for(let n=0;n<this.children.length;n++)if(this.children[n].stype===e&&this.children[n].sid===t)return this.children[n];return null}}class Hc extends Ac{constructor(e,t,n){super(e,t,n,"Ground")}}var Gc=Object.freeze({__proto__:null,BaseMesh:Ac,BaseObject3D:Tc,Canvas3D:zc,Circle:Rc,Ground:Hc,Group:Ec,Icon:Ic,Line:Uc,Link:Lc,Model:Bc,Node:_c,PluginObject:Dc,Poi:Pc,PoiNode:Cc,Point:Oc,Polygon:Fc,Topology:Nc});class Vc{constructor(e,t,n){this.type=e,this.scene=n,this.viewport=t}createGroup(e,t){const n=new Ec(e);return null!==t&&this.viewport.scener.addObject(n,null!=t?t:this.scene),n}clear(){this.getAll().forEach((e=>{this.viewport.scener.removeObject(e)}))}getAll(){const e=[];return this.scene.traverse((t=>{((t instanceof Tc||t instanceof Ac)&&Pn(t)&&t.stype===this.type||Pn(t)&&t.userData.stype===this.type)&&e.push(t)})),e}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class Yc extends Vc{constructor(e,t){super(Ht,e,t),gt.init()}createAmbientLight(e){const{id:t,name:n="",color:i=10132122,intensity:r=1}=e,s=new Ve(i,r);return s.name=n,s.userData.sid=t,s.userData.stype="Light",this.viewport.scener.addObject(s,this.scene),s}setAmbientLight(e,t){const{name:n="",color:i=10132122,intensity:r=1}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:i=10132122,intensity:r=1,position:s={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new Ye(i,r);if(h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(s.x,s.y,s.z),h.target.name=`${n}-target`,h.target.position.set(o.x,o.y,o.z),h.castShadow=a,a){const e=h.position.distanceTo(h.target.position);h.shadow.bias=-.005,h.shadow.camera.left=-e,h.shadow.camera.right=e,h.shadow.camera.top=e,h.shadow.camera.bottom=-e,h.shadow.camera.far=e,h.shadow.autoUpdate=l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(h,this.scene),this.viewport.scener.addObject(h.target,this.scene),h}setDirectionalLight(e,t){const{name:n="",color:i=10132122,intensity:r=1,position:s={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;if(!e)return!1;if(e.name=n,e.color=new a(i),e.intensity=r,e.position.set(s.x,s.y,s.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=l,l){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:i=16777215,groundColor:r=14540253,intensity:s=1,position:o={x:0,y:0,z:0}}=e,a=new Qe(i,r,s);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:i=16777215,groundColor:r=14540253,intensity:s=1,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new a(i),e.groundColor=new a(r),e.intensity=s,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,angle:s=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=e,u=$t(o).distanceTo($t(a)),d=new We(i,r,u,Math.PI/360*s,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.mapSize.width=h,d.shadow.mapSize.height=h,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,angle:s=45,position:o={x:0,y:500,z:0},target:l={x:0,y:0,z:0},openShadow:c=!1,shadowAutoUpdate:h=!1,mapSize:u=4096}=t;if(!e)return!1;const d=$t(o).distanceTo($t(l));if(e.name=n,e.color=new a(i),e.intensity=r,e.distance=d,e.angle=Math.PI/360*s,e.position.set(o.x,o.y,o.z),e.castShadow=c,e.target.position.set(l.x,l.y,l.z),e.target.castShadow=c,e.target.updateMatrixWorld(),c){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=h,e.shadow.mapSize.width=u,e.shadow.mapSize.height=u,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,distance:s=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new Xe(i,r,s);return h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(o.x,o.y,o.z),h.castShadow=a,a&&(h.shadow.bias=-.005,h.shadow.camera.far=s,h.shadow.autoUpdate=l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(h,this.scene),h}setPointLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,distance:s=5e3,position:o={x:0,y:500,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,e.distance=s,e.position.set(o.x,o.y,o.z),e.castShadow=l,l&&(e.shadow.bias=-.005,e.shadow.camera.far=s,e.shadow.autoUpdate=c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:i=16777215,intensity:r=1,width:s=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new Ze(i,r,s,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:i=16777215,intensity:r=1,width:s=10,height:o=10,position:l={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new a(i),e.intensity=r,e.width=s,e.height=o,e.position.set(l.x,l.y,l.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}}function Qc(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wc={};({get exports(){return Wc},set exports(e){Wc=e}}).exports=function e(t,n,i){function r(o,a){if(!n[o]){if(!t[o]){if(!a&&Qc)return Qc(o);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return r(n||e)}),c,c.exports,e,t,n,i)}return n[o].exports}for(var s=Qc,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){(function(e){var n,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var s=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,n=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;i=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}i=!1}function u(e){1!==c.push(e)||i||n()}t.exports=u}).call(this,void 0!==fr?fr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function h(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){i((function(){var i;try{i=t(n)}catch(t){return s.reject(e,t)}i===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,i)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function i(t){n||(n=!0,s.reject(e,t))}function r(t){n||(n=!0,s.resolve(e,t))}function o(){t(r,i)}var a=p(o);"error"===a.status&&i(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function g(e){return e instanceof this?e:s.resolve(new this(r),e)}function m(e){var t=new this(r);return s.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(r);++l<n;)h(e[l],l);return c;function h(e,r){function l(e){o[r]=e,++a!==n||i||(i=!0,s.resolve(c,o))}t.resolve(e).then(l,(function(e){i||(i=!0,s.reject(c,e))}))}}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var o=-1,a=new this(r);++o<n;)l(e[o]);return a;function l(e){t.resolve(e).then((function(e){i||(i=!0,s.resolve(a,e))}),(function(e){i||(i=!0,s.reject(a,e))}))}}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(r);return this.state!==l?u(n,this.state===a?e:t,this.outcome):this.queue.push(new h(n,e,t)),n},h.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){s.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},s.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return s.reject(e,n.value);var i=n.value;if(i)f(e,i);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},c.resolve=g,c.reject=m,c.all=v,c.race=y},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==fr?fr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var o=s();function a(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<e.length;i+=1)n.append(e[i]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var c=Promise;function h(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function d(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",g=void 0,m={},v=Object.prototype.toString,y="readonly",w="readwrite";function b(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r<t;r++)i[r]=e.charCodeAt(r);return n}function x(e){return new c((function(t){var n=e.transaction(p,w),i=l([""]);n.objectStore(p).put(i,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}function A(e){return"boolean"==typeof g?c.resolve(g):x(e).then((function(e){return g=e}))}function S(e){var t=m[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function T(e){var t=m[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function E(e,t){var n=m[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function D(e,t){return new c((function(n,i){if(m[e.name]=m[e.name]||N(),e.db){if(!t)return n(e.db);S(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var s=o.open.apply(o,r);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),i(s.error)},s.onsuccess=function(){n(s.result),T(e)}}))}function C(e){return D(e,!1)}function B(e){return D(e,!0)}function M(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,r=e.version>e.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function I(e){return new c((function(t,n){var i=new FileReader;i.onerror=n,i.onloadend=function(n){var i=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)}))}function P(e){return l([b(atob(e.data))],{type:e.type})}function O(e){return e&&e.__local_forage_encoded_blob}function _(e){var t=this,n=t._initReady().then((function(){var e=m[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(n,e,e),n}function R(e){S(e);for(var t=m[e.name],n=t.forages,i=0;i<n.length;i++){var r=n[i];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,C(e).then((function(t){return e.db=t,M(e)?B(e):t})).then((function(i){e.db=t.db=i;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=i})).catch((function(t){throw E(e,t),t}))}function L(e,t,n,i){void 0===i&&(i=1);try{var r=e.db.transaction(e.storeName,t);n(null,r)}catch(r){if(i>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return R(e).then((function(){L(e,t,n,i-1)}))})).catch(n);n(r)}}function N(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function k(e){var t=this,n={db:null};if(e)for(var i in e)n[i]=e[i];var r=m[n.name];r||(r=N(),m[n.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=_);var s=[];function o(){return c.resolve()}for(var a=0;a<r.forages.length;a++){var l=r.forages[a];l!==t&&s.push(l._initReady().catch(o))}var h=r.forages.slice(0);return c.all(s).then((function(){return n.db=r.db,C(n)})).then((function(e){return n.db=e,M(n,t._defaultConfig.version)?B(n):e})).then((function(e){n.db=r.db=e,t._dbInfo=n;for(var i=0;i<h.length;i++){var s=h[i];s!==t&&(s._dbInfo.db=n.db,s._dbInfo.version=n.version)}}))}function U(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),O(e)&&(e=P(e)),t(e)},o.onerror=function(){i(o.error)}}catch(e){i(e)}}))})).catch(i)}));return h(i,t),i}function j(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var n=o.result;if(n){var i=n.value;O(i)&&(i=P(i));var r=e(i,n.key,a++);void 0!==r?t(r):n.continue()}else t()},o.onerror=function(){i(o.error)}}catch(e){i(e)}}))})).catch(i)}));return h(i,t),i}function F(e,t,n){var i=this;e=d(e);var r=new c((function(n,r){var s;i.ready().then((function(){return s=i._dbInfo,"[object Blob]"===v.call(t)?A(s.db).then((function(e){return e?t:I(t)})):t})).then((function(t){L(i._dbInfo,w,(function(s,o){if(s)return r(s);try{var a=o.objectStore(i._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),n(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return h(r,n),r}function z(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){L(n._dbInfo,w,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName).delete(e);s.oncomplete=function(){t()},s.onerror=function(){i(o.error)},s.onabort=function(){var e=o.error?o.error:o.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return h(i,t),i}function H(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,w,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=s.error?s.error:s.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function G(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,y,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).count();s.onsuccess=function(){e(s.result)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function V(e,t){var n=this,i=new c((function(t,i){e<0?t(null):n.ready().then((function(){L(n._dbInfo,y,(function(r,s){if(r)return i(r);try{var o=s.objectStore(n._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){i(l.error)}}catch(e){i(e)}}))})).catch(i)}));return h(i,t),i}function Y(e){var t=this,n=new c((function(e,n){t.ready().then((function(){L(t._dbInfo,y,(function(i,r){if(i)return n(i);try{var s=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var t=s.result;t?(o.push(t.key),t.continue()):e(o)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function Q(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i,r=this;if(e.name){var s=e.name===n.name&&r._dbInfo.db?c.resolve(r._dbInfo.db):C(e).then((function(t){var n=m[e.name],i=n.forages;n.db=t;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=t;return t}));i=e.storeName?s.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;S(e);var i=m[e.name],r=i.forages;t.close();for(var s=0;s<r.length;s++){var a=r[s];a._dbInfo.db=null,a._dbInfo.version=n}var l=new c((function(t,i){var r=o.open(e.name,n);r.onerror=function(e){r.result.close(),i(e)},r.onupgradeneeded=function(){r.result.deleteObjectStore(e.storeName)},r.onsuccess=function(){var e=r.result;e.close(),t(e)}}));return l.then((function(e){i.db=e;for(var t=0;t<r.length;t++){var n=r[t];n._dbInfo.db=e,T(n._dbInfo)}})).catch((function(t){throw(E(e,t)||c.resolve()).catch((function(){})),t}))}})):s.then((function(t){S(e);var n=m[e.name],i=n.forages;t.close();for(var r=0;r<i.length;r++)i[r]._dbInfo.db=null;var s=new c((function(t,n){var i=o.deleteDatabase(e.name);i.onerror=i.onblocked=function(e){var t=i.result;t&&t.close(),n(e)},i.onsuccess=function(){var e=i.result;e&&e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<i.length;t++)T(i[t]._dbInfo)})).catch((function(t){throw(E(e,t)||c.resolve()).catch((function(){})),t}))}))}else i=c.reject("Invalid arguments");return h(i,t),i}var W={_driver:"asyncStorage",_initStorage:k,_support:a(),iterate:j,getItem:U,setItem:F,removeItem:z,clear:H,length:G,key:V,keys:Y,dropInstance:Q};function X(){return"function"==typeof openDatabase}var Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K="~~local_forage_type~",q=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",$=J.length,ee="arbf",te="blob",ne="si08",ie="ui08",re="uic8",se="si16",oe="si32",ae="ur16",le="ui32",ce="fl32",he="fl64",ue=$+ee.length,de=Object.prototype.toString;function fe(e){var t,n,i,r,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)n=Z.indexOf(e[t]),i=Z.indexOf(e[t+1]),r=Z.indexOf(e[t+2]),s=Z.indexOf(e[t+3]),h[l++]=n<<2|i>>4,h[l++]=(15&i)<<4|r>>2,h[l++]=(3&r)<<6|63&s;return c}function pe(e){var t,n=new Uint8Array(e),i="";for(t=0;t<n.length;t+=3)i+=Z[n[t]>>2],i+=Z[(3&n[t])<<4|n[t+1]>>4],i+=Z[(15&n[t+1])<<2|n[t+2]>>6],i+=Z[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}function ge(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var i,r=J;e instanceof ArrayBuffer?(i=e,r+=ee):(i=e.buffer,"[object Int8Array]"===n?r+=ne:"[object Uint8Array]"===n?r+=ie:"[object Uint8ClampedArray]"===n?r+=re:"[object Int16Array]"===n?r+=se:"[object Uint16Array]"===n?r+=ae:"[object Int32Array]"===n?r+=oe:"[object Uint32Array]"===n?r+=le:"[object Float32Array]"===n?r+=ce:"[object Float64Array]"===n?r+=he:t(new Error("Failed to get type for BinaryArray"))),t(r+pe(i))}else if("[object Blob]"===n){var s=new FileReader;s.onload=function(){var n=K+e.type+"~"+pe(this.result);t(J+te+n)},s.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function me(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(ue),i=e.substring($,ue);if(i===te&&q.test(n)){var r=n.match(q);t=r[1],n=n.substring(r[0].length)}var s=fe(n);switch(i){case ee:return s;case te:return l([s],{type:t});case ne:return new Int8Array(s);case ie:return new Uint8Array(s);case re:return new Uint8ClampedArray(s);case se:return new Int16Array(s);case ae:return new Uint16Array(s);case oe:return new Int32Array(s);case le:return new Uint32Array(s);case ce:return new Float32Array(s);case he:return new Float64Array(s);default:throw new Error("Unkown type: "+i)}}var ve={serialize:ge,deserialize:me,stringToBuffer:fe,bufferToString:pe};function ye(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function we(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var r=new c((function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return i(e)}n.db.transaction((function(r){ye(r,n,(function(){t._dbInfo=n,e()}),(function(e,t){i(t)}))}),i)}));return n.serializer=ve,r}function be(e,t,n,i,r,s){e.executeSql(n,i,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?s(e,o):ye(e,t,(function(){e.executeSql(n,i,r,s)}),s)}),s):s(e,o)}),s)}function xe(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Ae(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName,[],(function(n,i){for(var s=i.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Se(e,t,n,i){var r=this;e=d(e);var s=new c((function(s,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(n){be(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){s(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void s(Se.apply(r,[e,a,n,i-1]));o(t)}}))}))})).catch(o)}));return h(s,n),s}function Te(e,t,n){return Se.apply(this,[e,t,n,1])}function Ee(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function De(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,n){var i=n.rows.item(0).c;e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Be(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Me(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){be(t,i,"SELECT key FROM "+i.storeName,[],(function(t,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ie(e){return new c((function(t,n){e.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],s=0;s<i.rows.length;s++)r.push(i.rows.item(s).name);t({db:e,storeNames:r})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Pe(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i,r=this;return i=e.name?new c((function(t){var i;i=e.name===n.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:i,storeNames:[e.storeName]}):t(Ie(i))})).then((function(e){return new c((function(t,n){e.db.transaction((function(i){function r(e){return new c((function(t,n){i.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var s=[],o=0,a=e.storeNames.length;o<a;o++)s.push(r(e.storeNames[o]));c.all(s).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):c.reject("Invalid arguments"),h(i,t),i}var Oe={_driver:"webSQLStorage",_initStorage:we,_support:X(),iterate:Ae,getItem:xe,setItem:Te,removeItem:Ee,clear:De,length:Ce,key:Be,keys:Me,dropInstance:Pe};function _e(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Re(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Le(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function Ne(){return!Le()||localStorage.length>0}function ke(e){var t=this,n={};if(e)for(var i in e)n[i]=e[i];return n.keyPrefix=Re(e,t._defaultConfig),Ne()?(t._dbInfo=n,n.serializer=ve,c.resolve()):c.reject()}function Ue(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return h(n,e),n}function je(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return h(i,t),i}function Fe(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,r=i.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(i)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return h(i,t),i}function ze(e,t){var n=this,i=n.ready().then((function(){var t,i=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t}));return h(i,t),i}function He(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++){var s=localStorage.key(r);0===s.indexOf(e.keyPrefix)&&i.push(s.substring(e.keyPrefix.length))}return i}));return h(n,e),n}function Ge(e){var t=this.keys().then((function(e){return e.length}));return h(t,e),t}function Ve(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return h(i,t),i}function Ye(e,t,n){var i=this;e=d(e);var r=i.ready().then((function(){void 0===t&&(t=null);var n=t;return new c((function(r,s){var o=i._dbInfo;o.serializer.serialize(t,(function(t,i){if(i)s(i);else try{localStorage.setItem(o.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||s(e),s(e)}}))}))}));return h(r,n),r}function Qe(e,t){if(t=f.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var i,r=this;return i=e.name?new c((function(t){e.storeName?t(Re(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),h(i,t),i}var We={_driver:"localStorageWrapper",_initStorage:ke,_support:_e(),iterate:Fe,getItem:je,setItem:Ye,removeItem:Ve,clear:Ue,length:Ge,key:ze,keys:He,dropInstance:Qe},Xe=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ze=function(e,t){for(var n=e.length,i=0;i<n;){if(Xe(e[i],t))return!0;i++}return!1},Ke=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},qe={},Je={},$e={INDEXEDDB:W,WEBSQL:Oe,LOCALSTORAGE:We},et=[$e.INDEXEDDB._driver,$e.WEBSQL._driver,$e.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),it={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function rt(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function st(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Ke(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ot=function(){function e(t){for(var n in r(this,e),$e)if($e.hasOwnProperty(n)){var i=$e[n],s=i._driver;this[n]=s,qe[s]||this.defineDriver(i)}this._defaultConfig=st({},it),this._config=st({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":i(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var i=new c((function(t,n){try{var i=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(r);for(var s=nt.concat("_initStorage"),o=0,a=s.length;o<a;o++){var l=s[o];if((!Ze(tt,l)||e[l])&&"function"!=typeof e[l])return void n(r)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=c.reject(t);return h(n,arguments[arguments.length-1]),n}},n=0,i=tt.length;n<i;n++){var r=tt[n];e[r]||(e[r]=t(r))}};u();var d=function(n){qe[i]&&console.info("Redefining LocalForage driver: "+i),qe[i]=e,Je[i]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}}));return u(i,t,n),i},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var i=qe[e]?c.resolve(qe[e]):c.reject(new Error("Driver not found."));return u(i,t,n),i},e.prototype.getSerializer=function(e){var t=c.resolve(ve);return u(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(n,e,e),n},e.prototype.setDriver=function(e,t,n){var i=this;Ke(e)||(e=[e]);var r=this._getSupportedDrivers(e);function s(){i._config.driver=i.driver()}function o(e){return i._extend(e),s(),i._ready=i._initStorage(i._config),i._ready}function a(e){return function(){var t=0;function n(){for(;t<e.length;){var r=e[t];return t++,i._dbInfo=null,i._ready=null,i.getDriver(r).then(o).catch(n)}s();var a=new Error("No available storage method found.");return i._driverSet=c.reject(a),i._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return c.resolve()})):c.resolve();return this._driverSet=l.then((function(){var e=r[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then((function(e){i._driver=e._driver,s(),i._wrapLibraryMethodsWithReady(),i._initDriver=a(r)}))})).catch((function(){s();var e=new Error("No available storage method found.");return i._driverSet=c.reject(e),i._driverSet})),u(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Je[e]},e.prototype._extend=function(e){st(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)rt(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new ot;t.exports=at},{3:3}]},{},[4])(4);const Xc=()=>{self.noCompressWorker=function(e,t){const[n]=new Uint32Array(e,t,1),i={byteOffset:t+=4,length:3*n},r={byteOffset:t+=3*n*4,length:2*n},s={byteOffset:t+=2*n*4,length:4*n},o={byteOffset:t+=4*n*1,length:3*n};t+=3*n*1;let a=(s.length+o.length)%4;a>0&&(a=4-a,t+=a);const l=new Uint32Array(e,t,1);t+=4;const[c]=l,h={byteOffset:t,length:c};t+=4*c;const u=new Uint32Array(e,t,1);t+=4;const[d]=u,f=[];if(d>0)for(let n=0;n<d;n++){const[n]=new Uint32Array(e,t,1);t+=4;const[i]=new Uint32Array(e,t,1);t+=4;const[r]=new Uint32Array(e,t,1);t+=4;const[s]=new Uint32Array(e,t,1);t+=4;const o=new Uint8Array(e,t,s);t+=s;const a=(new TextDecoder).decode(o);f.push({start:n,count:i,uuid:a,alphaMode:r})}return{buffer:e,position:i,normal:o,color:s,texcoord:r,indice:h,sub_mesh:f}}},Zc=()=>{self.gzipCompressWorker=function(e){const t=new Uint8Array(e,4,e.byteLength-4),n=new pako.Inflate;n.push(t,!0);const{result:i}=n;if(i instanceof Uint8Array){const{buffer:e}=i;let t=0;const[n]=new Uint32Array(e,t,1);t+=4;const r={byteOffset:t,length:3*n};t+=3*n*4;const s={byteOffset:t,length:2*n};t+=2*n*4;const o={byteOffset:t,length:4*n};t+=4*n*1;const a={byteOffset:t,length:3*n};t+=3*n*1;let l=(o.length+a.length)%4;l>0&&(l=4-l,t+=l);const c=new Uint32Array(e,t,1);t+=4;const[h]=c,u={byteOffset:t,length:h};t+=4*h;const d=new Uint32Array(e,t,1);t+=4;const[f]=d,p=[];if(f>0)for(let n=0;n<f;n++){const[n]=new Uint32Array(e,t,1);t+=4;const[i]=new Uint32Array(e,t,1);t+=4;const[r]=new Uint32Array(e,t,1);t+=4;const[s]=new Uint32Array(e,t,1);t+=4;const o=new Uint8Array(e,t,s);t+=s;const a=(new TextDecoder).decode(o);p.push({start:n,count:i,uuid:a,alphaMode:r})}return{buffer:e,position:r,normal:a,color:o,texcoord:s,indice:u,sub_mesh:p}}}},Kc=()=>{self.parseChunkWorker=function(e){let t=0;const n=new Int8Array(e,t,128);t+=128,(new TextDecoder).decode(n.slice(0,4));const[i]=n.slice(4,8);if(0===i)return self.noCompressWorker(e,t);if(1===i){const t=e.slice(128);return self.gzipCompressWorker(t)}throw new Error("unknown compress mode [ .sbmx model ]")}},qc="\n onmessage = function ( e ) {\n \n const message = e.data\n\n switch ( message.type ) {\n\n case 'decode': {\n\n const chunkInfo = self.parseChunkWorker( message.data )\n\n if ( chunkInfo ) { \n\n self.postMessage( \n { type: 'decode', data: chunkInfo, }, \n [ chunkInfo.buffer ]\n )\n\n } else {\n\n self.postMessage( { type: 'decode', data: {}, } )\n\n }\n\n break\n \n }\n \n }\n\n }\n\n",Jc="textureIndex.json";class $c extends Ke{constructor(e){super(),this.store=e,this.loadedTextures=new Map,this.loadedMaterialsMap=new Map,this.defaultMaterial=new D({name:"defaultDatMaterial",color:0}),this.loadedMaterials=[this.defaultMaterial],this.dracoDecoderPath=null,this.workerPool=new bt(4),this.workerSourceURL="";const t=this._initWorkerCreator();this.workerPool.setWorkerCreator(t)}async parseAsync(e,t){const[n]=await Promise.allSettled([this._decodeBuffer(e,t),this._createMaterial(t)]);if("fulfilled"===n.status&&n.value){const e=dn(t),i=this._createMesh(n.value,e),r=new qe;return r.add(i),r}}async _decodeBuffer(e,t){const n=await this.store.getItem(`${t}_object`);if(n)return n;const[{data:i}]=await Promise.all([this.workerPool.postMessage({type:"decode",data:e},[e])]);if(i){const{type:e,data:n}=null!=i?i:{};if("decode"===e&&n){const{buffer:{byteLength:e}}=n;return Mn(e)&&e/1024/1024<=500&&Sn((()=>{this.store.setItem(`${t}_object`,n)})),n}}}_initWorkerCreator(){if(!this.workerSourceURL){const e=Xc.toString(),t=Zc.toString(),n=Kc.toString(),i=["/* dat decoder */",["/* pako */","\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.pako = {}));\n}(this, (function (exports) { 'use strict';\n\n // Note: adler32 takes 12% for level 0 and 2% for level 6.\n // It isn't worth it to make additional optimizations as in original.\n // Small size is preferable.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express ofr implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n const adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n };\n\n\n var adler32_1 = adler32;\n\n // Note: we can't get significant speed boost here.\n // So write code to minimize size - no pregenerated tables\n // and array tools dependencies.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // Use ordinary array, since untyped makes no boost here\n const makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n };\n\n // Create table on load. Just 255 signed longs. Not a problem.\n const crcTable = new Uint32Array(makeTable());\n\n\n const crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n };\n\n\n var crc32_1 = crc32;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // See state defs from inflate.js\n const BAD$1 = 30; /* got a data error -- remain here until reset */\n const TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\n\n /*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\n var inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n //#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n //#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n //#ifdef INFLATE_STRICT\n dmax = state.dmax;\n //#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\" :\n // \"inflate: literal 0x%02x\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n //#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n //#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // if (len <= op - whave) {\n // do {\n // output[_out++] = 0;\n // } while (--len);\n // continue top;\n // }\n // len -= op - whave;\n // do {\n // output[_out++] = 0;\n // } while (--op > whave);\n // if (op === 0) {\n // from = _out - dist;\n // do {\n // output[_out++] = output[from++];\n // } while (--len);\n // continue top;\n // }\n //#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n const MAXBITS = 15;\n const ENOUGH_LENS$1 = 852;\n const ENOUGH_DISTS$1 = 592;\n //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n const CODES$1 = 0;\n const LENS$1 = 1;\n const DISTS$1 = 2;\n\n const lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n ]);\n\n const lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n ]);\n\n const dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n ]);\n\n const dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n ]);\n\n const inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n {\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n // let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS$1) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n };\n\n\n var inftrees = inflate_table;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var constants$1 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\n const CODES = 0;\n const LENS = 1;\n const DISTS = 2;\n\n /* Public constants ==========================================================*/\n /* ===========================================================================*/\n\n const {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n } = constants$1;\n\n\n /* STATES ====================================================================*/\n /* ===========================================================================*/\n\n\n const HEAD = 1; /* i: waiting for magic header */\n const FLAGS = 2; /* i: waiting for method and flags (gzip) */\n const TIME = 3; /* i: waiting for modification time (gzip) */\n const OS = 4; /* i: waiting for extra flags and operating system (gzip) */\n const EXLEN = 5; /* i: waiting for extra length (gzip) */\n const EXTRA = 6; /* i: waiting for extra bytes (gzip) */\n const NAME = 7; /* i: waiting for end of file name (gzip) */\n const COMMENT = 8; /* i: waiting for end of comment (gzip) */\n const HCRC = 9; /* i: waiting for header crc (gzip) */\n const DICTID = 10; /* i: waiting for dictionary check value */\n const DICT = 11; /* waiting for inflateSetDictionary() call */\n const TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n const TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\n const STORED = 14; /* i: waiting for stored size (length and complement) */\n const COPY_ = 15; /* i/o: same as COPY below, but only first time in */\n const COPY = 16; /* i/o: waiting for input or output to copy stored block */\n const TABLE = 17; /* i: waiting for dynamic block table lengths */\n const LENLENS = 18; /* i: waiting for code length code lengths */\n const CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\n const LEN_ = 20; /* i: same as LEN below, but only first time in */\n const LEN = 21; /* i: waiting for length/lit/eob code */\n const LENEXT = 22; /* i: waiting for length extra bits */\n const DIST = 23; /* i: waiting for distance code */\n const DISTEXT = 24; /* i: waiting for distance extra bits */\n const MATCH = 25; /* o: waiting for output space to copy string */\n const LIT = 26; /* o: waiting for output space to write literal */\n const CHECK = 27; /* i: waiting for 32-bit check value */\n const LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\n const DONE = 29; /* finished check, done -- remain here until reset */\n const BAD = 30; /* got a data error -- remain here until reset */\n const MEM = 31; /* got an inflate() memory error -- remain here until reset */\n const SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n /* ===========================================================================*/\n\n\n\n const ENOUGH_LENS = 852;\n const ENOUGH_DISTS = 592;\n //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n const MAX_WBITS = 15;\n /* 32K LZ77 window */\n const DEF_WBITS = MAX_WBITS;\n\n\n const zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n };\n\n\n function InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n }\n\n\n const inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\"));\n return Z_OK$1;\n };\n\n\n const inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n };\n\n\n const inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n };\n\n\n const inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n };\n\n\n const inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n };\n\n\n /*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\n let virgin = true;\n\n let lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\n const fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n };\n\n\n /*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\n const updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n };\n\n\n const inflate$1 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n //#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracev((stderr, \"inflate: table sizes ok\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\" :\n // \"inflate: literal 0x%02x\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracevv((stderr, \"inflate: distance %u\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // Trace((stderr, \"inflate.c too far\"));\n // copy -= state.whave;\n // if (copy > state.length) { copy = state.length; }\n // if (copy > left) { copy = left; }\n // left -= copy;\n // state.length -= copy;\n // do {\n // output[put++] = 0;\n // } while (--copy);\n // if (state.length === 0) { state.mode = LEN; }\n // break;\n //#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n };\n\n\n const inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n };\n\n\n const inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n };\n\n\n const inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\"));\n return Z_OK$1;\n };\n\n\n var inflateReset_1 = inflateReset;\n var inflateReset2_1 = inflateReset2;\n var inflateResetKeep_1 = inflateResetKeep;\n var inflateInit_1 = inflateInit;\n var inflateInit2_1 = inflateInit2;\n var inflate_2$1 = inflate$1;\n var inflateEnd_1 = inflateEnd;\n var inflateGetHeader_1 = inflateGetHeader;\n var inflateSetDictionary_1 = inflateSetDictionary;\n var inflateInfo = 'pako inflate (from Nodeca project)';\n\n /* Not implemented\n module.exports.inflateCopy = inflateCopy;\n module.exports.inflateGetDictionary = inflateGetDictionary;\n module.exports.inflateMark = inflateMark;\n module.exports.inflatePrime = inflatePrime;\n module.exports.inflateSync = inflateSync;\n module.exports.inflateSyncPoint = inflateSyncPoint;\n module.exports.inflateUndermine = inflateUndermine;\n */\n\n var inflate_1$1 = {\n \tinflateReset: inflateReset_1,\n \tinflateReset2: inflateReset2_1,\n \tinflateResetKeep: inflateResetKeep_1,\n \tinflateInit: inflateInit_1,\n \tinflateInit2: inflateInit2_1,\n \tinflate: inflate_2$1,\n \tinflateEnd: inflateEnd_1,\n \tinflateGetHeader: inflateGetHeader_1,\n \tinflateSetDictionary: inflateSetDictionary_1,\n \tinflateInfo: inflateInfo\n };\n\n const _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n };\n\n var assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n };\n\n\n // Join array of chunks to single array.\n var flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n };\n\n var common = {\n \tassign: assign,\n \tflattenChunks: flattenChunks\n };\n\n // String encode/decode helpers\n\n\n // Quick check if we can use fast array to bin string conversion\n //\n // - apply(Array) can fail on Android 2.2\n // - apply(Uint8Array) can fail on iOS 5.1 Safari\n //\n let STR_APPLY_UIA_OK = true;\n\n try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n // Table with utf8 lengths (calculated by first byte of sequence)\n // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n // because max possible codepoint is 0x10ffff\n const _utf8len = new Uint8Array(256);\n for (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n }\n _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n // convert string to array (typed, when possible)\n var string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n };\n\n // Helper\n const buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n };\n\n\n // convert array to string\n var buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n };\n\n\n // Calculate max possible position in utf8 buffer,\n // that will not break sequence. If that's not possible\n // - (very small limits) return max size as is.\n //\n // buf[] - utf8 bytes array\n // max - length limit (mandatory);\n var utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n };\n\n var strings = {\n \tstring2buf: string2buf,\n \tbuf2string: buf2string,\n \tutf8border: utf8border\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n };\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n }\n\n var zstream = ZStream;\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n }\n\n var gzheader = GZheader;\n\n const toString = Object.prototype.toString;\n\n /* Public constants ==========================================================*/\n /* ===========================================================================*/\n\n const {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n } = constants$1;\n\n /* ===========================================================================*/\n\n\n /**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n /* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n /**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n /**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n /**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n /**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\n function Inflate(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$1.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$1.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$1.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n }\n\n /**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\n Inflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$1.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$1.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$1.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$1.inflateReset(strm);\n status = inflate_1$1.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$1.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n };\n\n\n /**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\n Inflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n };\n\n\n /**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\n Inflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n };\n\n\n /**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\n function inflate(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n }\n\n\n /**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\n function inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n }\n\n\n /**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\n var Inflate_1 = Inflate;\n var inflate_2 = inflate;\n var inflateRaw_1 = inflateRaw;\n var ungzip = inflate;\n var constants = constants$1;\n\n var inflate_1 = {\n \tInflate: Inflate_1,\n \tinflate: inflate_2,\n \tinflateRaw: inflateRaw_1,\n \tungzip: ungzip,\n \tconstants: constants\n };\n\n exports.Inflate = Inflate_1;\n exports.constants = constants;\n exports['default'] = inflate_1;\n exports.inflate = inflate_2;\n exports.inflateRaw = inflateRaw_1;\n exports.ungzip = ungzip;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n","/* noCompress */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}")),"/* gzipCompress */",t.substring(t.indexOf("{")+1,t.lastIndexOf("}")),"/* parseChunk */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n"),"","/* worker */",qc].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}return()=>new Worker(this.workerSourceURL)}_createMesh(e,t){const{buffer:n,position:i,normal:r,texcoord:s,indice:o,sub_mesh:a}=e,l=new Uint32Array(n,o.byteOffset,o.length),h=new Float32Array(n,i.byteOffset,i.length),u=new Int8Array(n,r.byteOffset,r.length),d=new Float32Array(n,s.byteOffset,s.length),f=new ie;f.setIndex(new c(l,1)),f.setAttribute("position",new c(h,3)),f.setAttribute("normal",new c(u,3,!0)),f.setAttribute("uv",new c(d,2));for(let e=0;e<a.length;e++){const{uuid:n,start:i,count:r}=a[e],s=this.loadedMaterialsMap.get(n);if(s){const{materialIndex:e}=s;f.addGroup(i,r,e)}else f.addGroup(i,r,0),Jt(`sbmx material: not found uuid: ${n} in file: ${t+Jc}`)}const p=new w(f,this.loadedMaterials);return p.castShadow=!0,p.receiveShadow=!0,p}async _createMaterial(e){const t=dn(e),n=t+Jc,i=this.loadedTextures.get(n);if(i)return i;const r=await this.store.getItem(`${e}_texture`);let s;if(r)s=r,this.loadedTextures.set(n,Promise.resolve(s));else{const t=this.loadedTextures.get(n);if(t)return t;const i=vn(n).then((e=>e.json()));this.loadedTextures.set(n,i),s=await i,Sn((()=>{this.store.setItem(`${e}_texture`,s)}))}Object.entries(s).forEach((e=>{let[n,i]=e;if(this.loadedMaterialsMap.has(n))return;const{name:r,base_map:s,nor_map:o,alphamode:l,color:c={r:1,g:1,b:1,a:1},metallic:h=.5,roughness:u=.5}=i,{r:d,g:f,b:p,a:g}=c,m=0!==l,v=new D({name:r,color:new a(d,f,p),side:y,metalness:h,roughness:u,opacity:g,transparent:m,depthWrite:!m});if(s){const e=t+s;(new Ie).load(e,(e=>{e.flipY=!0,e.encoding=_,e.wrapS=V,e.wrapT=V,e.minFilter=Je,e.magFilter=Q,e.needsUpdate=!0,v.map=e,v.needsUpdate=!0,vc.needsUpdate=!0}))}if(o){const e=t+o;(new Ie).load(e,(e=>{e.flipY=!0,e.encoding=_,e.wrapS=V,e.wrapT=V,e.needsUpdate=!0,v.normalMap=e,v.needsUpdate=!0,vc.needsUpdate=!0}))}const w=this.loadedMaterials.push(v)-1;this.loadedMaterialsMap.set(n,{material:v,materialIndex:w})}))}dispose(){this.workerPool.dispose(),URL.revokeObjectURL(this.workerSourceURL)}}const eh=new Map,th=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},nh=e=>{if(eh.has(e))return eh.get(e);const t=new l;return eh.set(e,t),(new $e).load(e,(e=>{t.image=e,t.needsUpdate=!0,vc.needsUpdate=!0})),t.encoding=_,t.wrapS=V,t.wrapT=V,t.flipY=!1,t.anisotropy=16,t.mipmaps=[],t.generateMipmaps=!0,t},ih=(e,t,n,i)=>{const[r,s,o,l,c]=t,h=i||l<1;return new D({name:e,color:new a(r,s,o),opacity:l,transparent:h,depthWrite:!h,alphaTest:.01,map:n,side:c})};class rh extends DataView{constructor(e,t){super(e),this.isLE=!0,this.appKeys=t}byteRevers(e,t){const n=t%this.appKeys.length;return e^this.appKeys[n]}getSoonUint8(e){return this.byteRevers(this.getUint8(e),e)}getSoonUint16(e){const t=new DataView(new Uint8Array(2).buffer);for(let n=0;n<2;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getUint16(0,this.isLE)}getSoonUint32(e){const t=new DataView(new Uint8Array(4).buffer);for(let n=0;n<4;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getUint32(0,this.isLE)}getSoonFloat32(e){const t=new DataView(new Uint8Array(4).buffer);for(let n=0;n<4;n++)t.setUint8(n,this.getSoonUint8(e+n));return t.getFloat32(0,this.isLE)}}const sh=new TextDecoder;new TextDecoder;class oh{constructor(){this.materials=new Map}parseObject(e,t){const n=new Bc(Object.assign(Object.assign({},t),{format:"sbm"})),i=new Ec({id:Ln()});n.add(i);const{materialsCache:r,meshsCache:s}=e;for(const[e,t]of Object.entries(r)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:i}=t;let r=null;n&&(r=nh(n));const s=ih(e,i,r,th(n));this.materials.set(e,s)}for(const[e,t]of Object.entries(s)){const{meshName:n,materialId:r,position:s,uv:o}=t,a=this.materials.get(r.toString());if(a){const t=new ie,r=new Float32Array(s),l=new Float32Array(o);r.length>0&&t.setAttribute("position",new c(r,3)),l.length>0&&t.setAttribute("uv",new c(l,2)),t.computeVertexNormals();const h=new Ac(t,a,{id:`${e}_${Ln()}`,name:n||e});i.add(h)}}return n}}var ah=class{constructor(){this.materials=new Map,this.sbmInfo=null}async parseBuffer(e,t,n){this.sbmInfo=t;const i=new DataView(e);let r=0;const s=[];for(let e=0;e<8;e++)s.push(i.getUint8(r)),r+=1;if("SBK-----"!==String.fromCharCode(...s))return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})格式或数据错误!`);const o=[],a=[],l=[];for(let e=0;e<32;e++)o.push(i.getUint8(r)),r+=1;const c=i.getUint8(r);r+=1;const h=i.getUint8(r);r+=1;for(let e=0;e<32;e++)a.push(i.getUint8(r)),r+=1;for(let e=0;e<64;e++)l.push(i.getUint8(r)),r+=1;const u=[...a,...l,...o],d=[];for(let e=0;e<u.length;e++)(e<=7||e>23&&e<=31||e>39&&e<=55||e>63&&e<=87||e>95&&e<=103)&&d.push(u[e]);if(64!==d.length)return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url} 数据错误!`);if(1===c){const e=i.buffer.slice(r,i.buffer.byteLength),t=new rh(e,d);return 1===h||2===h?this._parseV2(t,n):3===h?this._parseV3(t,n):Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})版本错误!`)}return Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})key 错误!`)}_parseV2(e,n){let i=0;const r=performance.now();i+=66;const s={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Bc(Object.assign(Object.assign({},this.sbmInfo),{format:"sbm"})),a=new Ec({id:Ln()});o.add(a);const l=e.getSoonUint16(i);i+=2;const u=e.getSoonUint16(i);i+=2,s.total=u;const d={};for(let t=0;t<l;++t){const t=e.getSoonUint16(i).toString();i+=2,d[t]={materialInfo:[]},i+=4,i+=4,i+=4,i+=4;const n=e.getSoonFloat32(i);i+=4;const r=e.getSoonFloat32(i);i+=4;const s=e.getSoonFloat32(i);i+=4;const o=e.getSoonFloat32(i);i+=4,i+=4,i+=4,i+=4,i+=4;let a=e.getSoonUint8(i);i+=1,0===a?a=y:1===a?a=m:2===a&&(a=v);const l=e.getSoonUint16(i);i+=2;let c=null;if(l>0){let n="",r="";for(let t=0;t<l;t++){const t=e.getSoonUint8(i);t>127?r=r+"%"+t.toString(16).toUpperCase():r.length>0?(n+=decodeURIComponent(r)+String.fromCharCode(t),r=""):n+=String.fromCharCode(t),i+=1}n=n.replace("\\","/");const{url:s,isPlatform:o}=this.sbmInfo,a=this.getTextureUrl(s,n,o);d[t].textureUrl=a,c=nh(a)}if(!this.materials.has(t)){const e=[n,r,s,o,a],i=ih(t,e,c,th(d[t].textureUrl));this.materials.set(t,i),d[t].materialInfo=e}}const f={};for(let o=0;o<u;++o){const o=e.getSoonUint16(i);i+=2;const l=e.getSoonUint16(i).toString();i+=2,f[o]={materialId:l,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const u=[],d=[],p=[],g=[],m=e.getSoonUint16(i);if(i+=2,m>0)for(let n=0;n<m;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4,u.push(n)}const v=e.getSoonUint16(i);if(i+=2,v>0)for(let n=0;n<v;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4}const y=e.getSoonUint16(i);if(i+=2,y>0)for(let t=0;t<y;t++){const t=new h;t.setX(e.getSoonFloat32(i)),i+=4,t.setY(e.getSoonFloat32(i)),i+=4,d.push(t)}const w=e.getSoonUint16(i);if(i+=2,w>0)for(let t=0;t<w;t++){const t=e.getSoonUint16(i);i+=2;const n=e.getSoonUint16(i);i+=2;const r=e.getSoonUint16(i);i+=2;const s=[t,n,r];p.push(s),d.length>0&&g.push([d[s[0]],d[s[1]],d[s[2]]])}const b=[],x=[];for(let e=0;e<p.length;e++){const t=p[e],n=u[t[0]],i=u[t[1]],r=u[t[2]];b.push(...n.toArray(),...i.toArray(),...r.toArray());let s=new h,o=new h,a=new h;const l=g[e];void 0!==l&&(s=l[0],o=l[1],a=l[2]),x.push(...s.toArray(),...o.toArray(),...a.toArray())}const A=new Float32Array(b),S=new Float32Array(x);f[o].position=A.buffer,f[o].uv=S.buffer;const T=new ie;A.length>0&&T.setAttribute("position",new c(A,3)),S.length>0&&T.setAttribute("uv",new c(S,2)),T.computeVertexNormals();const E=this.materials.get(l);if(E){const e=new Ac(T,E,{id:`${o}_${Ln()}`,name:o.toString()});a.add(e)}s.loaded++,s.timeStamp=performance.now()-r,null==n||n(s)}const p={materialsCache:d,meshsCache:f};return Promise.resolve({model:o,caches:p})}_parseV3(e,n){let i=0;i+=66;const r=performance.now(),s={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Bc(Object.assign(Object.assign({},this.sbmInfo),{format:"sbm"})),a=new Ec({id:Ln()});o.add(a);const l=e.getSoonUint16(i);i+=2;const u=e.getSoonUint16(i);i+=2,s.total=u;const d={};for(let t=0;t<l;++t){const t=e.getSoonUint16(i).toString();i+=2,d[t]={materialInfo:[]},i+=4,i+=4,i+=4,i+=4;const n=e.getSoonFloat32(i);i+=4;const r=e.getSoonFloat32(i);i+=4;const s=e.getSoonFloat32(i);i+=4;const o=e.getSoonFloat32(i);i+=4,i+=4,i+=4,i+=4,i+=4;let a=e.getSoonUint8(i);i+=1,0===a?a=y:1===a?a=m:2===a&&(a=v);const l=e.getSoonUint16(i);i+=2;let c=null;if(l>0){let n="",r="";for(let t=0;t<l;t++){const t=e.getSoonUint8(i);t>127?r=r+"%"+t.toString(16).toUpperCase():r.length>0?(n+=decodeURIComponent(r)+String.fromCharCode(t),r=""):n+=String.fromCharCode(t),i+=1}n=n.replace("\\","/");const{url:s,isPlatform:o}=this.sbmInfo,a=this.getTextureUrl(s,n,o);d[t].textureUrl=a,c=nh(a)}if(!this.materials.has(t)){const e=[n,r,s,o,a],i=ih(t,e,c,th(d[t].textureUrl));this.materials.set(t,i),d[t].materialInfo=e}}const f={};for(let o=0;o<u;++o){const o=e.getSoonUint16(i).toString();i+=2;const l=e.getSoonUint16(i);i+=2;let u="";if(l>0){const t=[];for(let n=0;n<l;n++){const n=e.getSoonUint8(i);t.push(n),i+=1}const n=new Uint8Array(t);u=sh.decode(n)}const d=e.getSoonUint16(i).toString();i+=2,f[o]={meshName:u,materialId:d,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const p=[],g=[],m=[],v=[],y=e.getSoonUint32(i);if(i+=4,y>0)for(let n=0;n<y;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4,p.push(n)}const w=e.getSoonUint32(i);if(i+=4,w>0)for(let n=0;n<w;n++){const n=new t;n.setX(e.getSoonFloat32(i)),i+=4,n.setY(e.getSoonFloat32(i)),i+=4,n.setZ(e.getSoonFloat32(i)),i+=4}const b=e.getSoonUint32(i);if(i+=4,b>0)for(let t=0;t<b;t++){const t=new h;t.setX(e.getSoonFloat32(i)),i+=4,t.setY(e.getSoonFloat32(i)),i+=4,g.push(t)}const x=e.getSoonUint32(i);if(i+=4,x>0)for(let t=0;t<x;t++){const t=e.getSoonUint32(i);i+=4;const n=e.getSoonUint32(i);i+=4;const r=e.getSoonUint32(i);i+=4;const s=[t,n,r];m.push(s),g.length>0&&v.push([g[s[0]],g[s[1]],g[s[2]]])}const A=[],S=[];for(let e=0;e<m.length;e++){const t=m[e],n=p[t[0]],i=p[t[1]],r=p[t[2]];A.push(...n.toArray(),...i.toArray(),...r.toArray());let s=new h,o=new h,a=new h;const l=v[e];void 0!==l&&(s=l[0],o=l[1],a=l[2]),S.push(...s.toArray(),...o.toArray(),...a.toArray())}const T=new Float32Array(A),E=new Float32Array(S);f[o].position=T.buffer,f[o].uv=E.buffer;const D=new ie;if(T.length>0&&D.setAttribute("position",new c(T,3)),E.length>0&&D.setAttribute("uv",new c(E,2)),D.computeVertexNormals(),this.materials.has(d)){const e=new Ac(D,this.materials.get(d),{id:`${o}_${Ln()}`,name:u});a.add(e)}s.loaded++,s.timeStamp=performance.now()-r,null==n||n(s)}const p={materialsCache:d,meshsCache:f};return Promise.resolve({model:o,caches:p})}getTextureUrl(e,t,n){let i="",r=t;const s=r.lastIndexOf("/");if(-1!==s&&(r=r.substring(s+1)),i=e,n){const e=i.split("/");e.length>1&&(e.splice(e.length-3,e.length),i=e.join("/")+"/Maps/"+r)}else{const e=i.lastIndexOf("/");-1!==e&&(i=i.substring(0,e+1)+"Maps/"+r)}return i}};class lh extends Vc{constructor(e,t){super(Gt,e,t),this.viewport=e,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this.store=Wc.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=Wc.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new Y,this.datLoader=new $c(this.cacheStore),this.gltfLoader=new yt(this.loadingManager),this.fbxLoader=new mt(this.loadingManager),this.dracoDecoderPath=null,this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){this.dracoDecoderPath=e;const t=new wt;t.setDecoderPath(e),this.gltfLoader.setDRACOLoader(t),this.datLoader.dracoDecoderPath=e}async load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scene;const{url:n}=e,i=this.modelsPromiseMap.get(n);if(i){if(await i,this.isDisposed)return this.dispose(),null;const r=this.modelsMap.get(n);return r?this.clone(r,e,t):null}const r=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,r),r}async parse(e){const{url:t,id:n}=e;if(!t)return Jt(`id: ${n} url: ${t} is empty`),null;switch(t.slice(t.lastIndexOf(".")+1).toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"DAT":return this._parseDat(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);default:return Jt(`模型资源( id: ${n}, url: ${t} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}clone(e,t,n){return new Promise(((i,r)=>{var s;"Model"!==e.stype&&r("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:h,rotation:u,scale:d,onClick:f,onDblClick:p,onRightClick:g,onLoad:m,userData:v}=t;function y(e,t,n){n(e,t);for(let i=0;i<e.children.length;i++)y(e.children[i],t.children[i],n)}const w=function(e){const t=new Map,n=new Map,i=e.sClone();return y(e,i,(function(e,i){t.set(i,e),n.set(e,i)})),i.traverse((function(e){if(e instanceof et){const i=e,r=t.get(e),s=r.skeleton.bones;i.skeleton=r.skeleton.clone(),i.bindMatrix.copy(r.bindMatrix),i.skeleton.bones=s.map((function(e){return n.get(e)})),i.bind(i.skeleton,i.bindMatrix)}})),i}(e);w.animations=w.animations.map((e=>e.clone())),o&&(w.sid=o),a&&(w.name=a),l&&(w.level=l),!1===c&&w.hide(),h&&w.position.set(h.x,h.y,h.z),u&&w.rotation.set(u.x,u.y,u.z),d&&w.scale.set(d.x,d.y,d.z),w.onClick=f?f.bind(w):null,w.onDblClick=p?p.bind(w):null,w.onRightClick=g?g.bind(w):null,w.onLoad=m?m.bind(w):null,null===(s=w.onLoad)||void 0===s||s.call(w,w),v&&(w.userData=v),null!==n&&this.viewport.scener.addObject(w,n||this.scene||e.parent),i(w)}))}async loadToGroup(e,t){const n=this.createGroup(e,null);return await Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}async addForGroup(e,t){return e&&await Promise.allSettled(t.map((async t=>this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)))),e}async clearIdb(){await this.store.clear(),await this.cacheStore.clear()}dispose(){var e;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),this.datLoader.dispose()}_initLoadingManager(e){e.addHandler(/\.tga$/i,new vt)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,t)}async _parseSbm(e){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,i=async t=>{const i=await(new ah).parseBuffer(t,e),{model:r,caches:s}=i;return s&&Sn((()=>{this.cacheStore.setItem(n,s)})),r},r=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e)};if(t){const t=await this.cacheStore.getItem(n);if(t){const n=(new oh).parseObject(t,e);return r(n),n}{const e=await this.store.getItem(n)||await this._fetchBuffer(n),t=await i(e);return r(t),t}}{const e=await this._fetchBuffer(n),t=await i(e);return r(t),t}}async _parseSbmx(e){const{url:t}=e,n=await this._getBuffer(t),i=Rn(n,0,8),r=new DataView(n.slice(8));switch(i){case"SBMG----":for(let e=0;e<r.byteLength;e++){const t=r.getUint8(e),n=(t>>4&15)+(t<<4&240);r.setUint8(e,n)}return this._parseGltf(e,r.buffer);case"SBMD----":return this._parseDat(e,r.buffer);default:return this._parseGltf(e,r.buffer)}}async _parseDat(e,t){const{url:n}=e,i=t||await this._getBuffer(n),r=new Bc(Object.assign(Object.assign({},e),{format:"dat"})),s=await this.datLoader.parseAsync(i,n);return s&&r.add(s),r}async _parseGltf(e,t){const{url:n}=e,i=dn(n),r=t||await this._getBuffer(n),s=new Bc(Object.assign(Object.assign({},e),{format:"gltf"})),o=await this.gltfLoader.parseAsync(r,i),{animations:a}=o;return a&&a.length>0&&(s.animations=a),o.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e.castShadow=!0,e.receiveShadow=!0})),s.add(o.scene),s}async _parseFbx(e){const{url:t}=e,n=dn(t),i=await this._getBuffer(t),r=new Bc(Object.assign(Object.assign({},e),{format:"gltf"})),s=this.fbxLoader.parse(i,n),{animations:o}=s;return o&&o.length>0&&(r.animations=o),s.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e.castShadow=!0,e.receiveShadow=!0})),r.add(s),r}async _innerLoad(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scene;var n;const{url:i}=e,r=await this.parse(e);return r?(null===(n=r.onLoad)||void 0===n||n.call(r,r),this._setModelsMap(i,r.sClone()),null!==t&&this.viewport.scener.addObject(r,t),r):null}async _fetchBuffer(e){const{useIndexedDB:t}=this.viewport.options,n=await vn(e),i=await n.arrayBuffer();return t&&this.store.setItem(e,i),i}async _getBuffer(e){const{useIndexedDB:t}=this.viewport.options;if(t){const t=await this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}}class ch extends Vc{constructor(e,t){super(Vt,e,t),this.materials=new Map}create(e){const t=this._createMaterial(e.url),n=new Pc(t,e);return this.viewport.scener.addObject(n,this.scene),n}clone(e,t,n){"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:i,type:r,name:s,level:o,visible:a,position:l,rotation:c,scale:h,onClick:u,onDblClick:d,onRightClick:f,userData:p}=t,g=e.sClone(!1,r);return this._copyMaterial(g),i&&(g.sid=i),s&&(g.name=s),o&&(g.level=o),Bn(a)&&(g.visible=a),l&&g.position.set(l.x,l.y,l.z),c&&g.rotation.set(c.x,c.y,c.z),h&&g.scale.set(h.x,h.y,h.z),g.onClick=u?u.bind(g):null,g.onDblClick=d?d.bind(g):null,g.onRightClick=f?f.bind(g):null,p&&(g.userData=p),null!==n&&this.viewport.scener.addObject(g,n||this.scene||e.parent),g}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._createMaterial(e.url),i=new Pc(t,e);n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{const n=this._createMaterial(t.url),i=new Pc(n,t);e.add(i)})),this.viewport.scener.addObject(e,this.scene)),e}_createMaterial(e){const t=this.materials.get(e);if(!t){const t=(new Ie).load(e);t.flipY=!0;const n=new Ue({map:t,color:16777215});return this.materials.set(e,n),n}return t}_copyMaterial(e){e.traverse((e=>{(e instanceof w||e instanceof ke)&&(In(e.material)?e.material=e.material.map((e=>e.clone())):e.material instanceof re&&(e.material=e.material.clone()))}))}}class hh extends Vc{constructor(e,t){super(Yt,e,t)}create(e){this._openEnableRenderCss(e);const t=new Cc(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new Cc(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{this._openEnableRenderCss(t);const n=new Cc(t);e.add(n)})),this.viewport.scener.addObject(e,this.scene)),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class uh extends Vc{constructor(e,t){super(Qt,e,t)}create(e){const t=new zc(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new zc(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&(t.forEach((t=>{const n=new zc(t);e.add(n)})),this.viewport.scener.addObject(e,this.scene)),e}}class dh{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,i]=t,r=this.graph.get(e);null==r||r.set(n,i)}}}getPath(e,t){var n;if(e===t)return[];const i=this.queue=new cn;i.add(e,0),this.previous.set(e,null);let r=null;for(;r=i.shift();){if(r===t){const e=[];for(;null!==r&&null!==this.previous.get(r);)e.unshift(r),r=null!==(n=this.previous.get(r))&&void 0!==n?n:null;return e}const e=i.getDistance(r);if(e===1/0)return[];const s=this.graph.get(r);s&&s.forEach(((t,n)=>{const s=i.getDistance(n),o=e+t;o<s&&(i.update(n,o),this.previous.set(n,r))}))}return[]}}class fh extends Vc{constructor(e,t){super(Wt,e,t),this.dijkstra=new dh}async createFromGml(e){const{url:t,linkWidth:n=20,linkColor:i=65280,renderNode:r=!0,nodeColor:s=255}=e;return En(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const h=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;In(h)?h.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...h.state],c=[...c,...h.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],i=e.State.topoNode["gml:Node"].node_name;o.push({id:Cn(n)?n:"",name:Cn(i)?i:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],i=e.Transition.topoEdge["gml:Edge"].restrict["#text"],r=e.Transition.topoEdge["gml:Edge"].passable["#text"],s=a.get(t),l=a.get(n),c=e.Transition._attributes["gml:id"],h=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==s&&void 0!==l&&("2"!==r&&"3"!==r&&o[s].graphs.push({targetNodeId:n,linkInfo:{id:c,name:h},enable:!0,restrict:parseInt(i),passable:parseInt(r)}),"1"!==r&&"3"!==r&&o[l].graphs.push({targetNodeId:t,linkInfo:{id:c,name:h},enable:!0,restrict:parseInt(i),passable:parseInt(r)}))}));const u=new Nc(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:i,renderNode:r,nodeColor:s}));return this.setDijkstraGraph(u.nodes),this.viewport.scener.addObject(u,this.scene),Promise.resolve(u)}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new Nc(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),i=new Nc(t);this.setDijkstraGraph(i.nodes),n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),i=new Nc(n);this.setDijkstraGraph(i.nodes),e.add(i)})),e}getShortestPath(e,n){const i=fn(e.info.nodes),r=$t(n.start),s=$t(n.end);let o=null,a=1/0,l=null,c=1/0;for(let n=0;n<i.length;n++){const h=i[n];if(0===h.graphs.length)continue;const u=e.nodes.find((e=>e.sid===h.id));if(!u)continue;const d=u.getWorldPosition(new t),f=d.distanceTo(r),p=d.distanceTo(s);f<a&&(a=f,o=h),p<c&&(c=p,l=h)}if(!o||!l||o.id===l.id)return null;const h=o.id,u=l.id,d=this.dijkstra.getPath(h,u);if(0===d.length)return null;d.unshift(o.id);const f=[];for(let e=0;e<d.length;e++){const t=i.find((t=>t.id==d[e]));t&&(t.id+=Ln(),t.position.y+=.01,f.push(t))}const p=Object.assign(Object.assign(Object.assign({},n),{type:"line",nodes:f}),e.getSpaceAttribute(!0));this.generateLineTopologyInfoNodeGraphs(p);const g=new Nc(p);return this.viewport.scener.addObject(g,this.scene),g}getShortestPathByMultipleStartPoints(e,i){const{nodes:s}=e.info,o=[];i.start.forEach((e=>{const t=$t(e),n=$t(i.end);let r=null,a=1/0,l=null,c=1/0;if(s.forEach((e=>{if(e.graphs.length>0){const i=$t(e.position),s=i.distanceTo(t),o=i.distanceTo(n);s<a&&(a=s,r=e.id),o<c&&(c=o,l=e.id)}})),r&&l){let e=0;const i=this.dijkstra.getPath(r,l);if(i.length>0){const r=[{id:"startPoint",position:t,graphs:[]}];i.forEach(((n,i)=>{const o=s.find((e=>e.id==n));o&&(e+=0===i?$t(o.position).distanceTo(t):$t(o.position).distanceTo($t(r[r.length-1].position)),r.push(o))})),r.push({id:"endPoint",position:n,graphs:[]}),e+=n.distanceTo($t(r[r.length-1].position)),o.push({nodeInfo:r,pathLength:e})}}}));let a=[],l=1/0;if(o.forEach((e=>{let{nodeInfo:t,pathLength:n}=e;n<l&&(l=n,a=t)})),a.length){for(let e=0;e<a.length;e++)a[e].position.y+=.01;const s=Object.assign(Object.assign({},i),{type:"line",nodes:a,position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)});this.generateLineTopologyInfoNodeGraphs(s);const o=new Nc(s);return this.viewport.scener.addObject(o,this.scene),o}return null}getShortestPathByMultipleEndPoints(e,i){const{nodes:s}=e.info,o=[];i.end.forEach((e=>{const t=$t(i.start),n=$t(e);let r=null,a=1/0,l=null,c=1/0;if(s.forEach((e=>{if(e.graphs.length>0){const i=$t(e.position),s=i.distanceTo(t),o=i.distanceTo(n);s<a&&(a=s,r=e.id),o<c&&(c=o,l=e.id)}})),r&&l){let e=0;const i=this.dijkstra.getPath(r,l);if(i.length>0){const r=[{id:"startPoint",position:t,graphs:[]}];i.forEach(((n,i)=>{const o=s.find((e=>e.id==n));o&&(e+=0===i?$t(o.position).distanceTo(t):$t(o.position).distanceTo($t(r[r.length-1].position)),r.push(o))})),r.push({id:"endPoint",position:n,graphs:[]}),e+=n.distanceTo($t(r[r.length-1].position)),o.push({nodeInfo:r,pathLength:e})}}}));let a=[],l=1/0;if(o.forEach((e=>{let{nodeInfo:t,pathLength:n}=e;n<l&&(l=n,a=t)})),a.length){for(let e=0;e<a.length;e++)a[e].position.y+=.01;const s=Object.assign(Object.assign({},i),{type:"line",nodes:a,position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new r)),scale:e.getWorldScale(new t)});this.generateLineTopologyInfoNodeGraphs(s);const o=new Nc(s);return this.viewport.scener.addObject(o,this.scene),o}return null}setDijkstraGraph(e){const n=[];for(let i=0;i<e.length;i++){const r=e[i];if(0===r.graphs.length)continue;const s=[];for(let n=0;n<r.graphs.length;n++){const i=r.graphs[n],o=e.find((e=>e.sid===i.targetNodeId));if(!o)continue;const a=r.getWorldPosition(new t),l=o.getWorldPosition(new t);s.push([i.targetNodeId,a.distanceTo(l)])}n.push([r.sid,s])}n.length>0&&this.dijkstra.setGraph(n)}generateLineTopologyInfoNodeGraphs(e){const{type:t,nodes:n}=e;if("line"===t)for(let t=0;t<n.length;t++)if(t===n.length-1)n[t].graphs=[];else{const i=e.nodes[t],r=e.nodes[t+1];n[t].graphs=[{targetNodeId:r.id,linkInfo:{id:`${i.id}_to_${r.id}`,name:`${i.name||i.id}_to_${r.name||r.id}`},enable:!0,restrict:0,passable:0}]}return Object.assign(Object.assign({},e),{nodes:n})}}class ph extends Vc{constructor(e,t){super(Xt,e,t)}addGridHelper(e){const{id:t,size:n=1e3,divisions:i=20,color:r="#fff",position:s={x:0,y:0,z:0},rotation:o={x:0,y:0,z:0},scale:a={x:1,y:1,z:1}}=e,l=new tt(n,i,r,r);return l.position.set(s.x,s.y,s.z),l.rotation.set(o.x,o.y,o.z),l.scale.set(a.x,a.y,a.z),l.userData.sid=t,l.userData.stype="Helper",this.viewport.scener.addObject(l,this.scene),l}addAxesHelper(e){const{id:t,axesLength:n=1e3}=e,i=new nt(n);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addBoxHelper(e){const{id:t,box:n,color:i="#00ff00"}=e,r=new it(n,new a(i));return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPlaneHelper(e){const{id:t,width:n=500,height:i=500,color:r="#00ff00",opacity:s=.2,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1}}=e,c=new Ac(new Ee(n,i),new Te({color:r,opacity:s,transparent:s<1,side:v}),{id:t,position:o,rotation:a,scale:l});return c.userData.sid=t,c.userData.stype="Helper",this.viewport.scener.addObject(c,this.scene),c}addGroundHelper(e){const{imgUrl:t,id:n,width:i=500,height:r=500,opacity:s=1,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},repeat:c={x:10,y:10}}=e,h=(new Ie).load(t),u=new Ee(i,r);u.computeBoundingBox();const d=new D({side:v,map:h,transparent:s<1,opacity:s,roughness:.8});d.map&&(d.map.repeat.set(c.x,c.x),d.map.wrapS=V,d.map.wrapT=V,d.map.version++),a.x-=Math.PI/2,d.version++;const f=new Hc(u,d,{id:n,position:o,rotation:a,scale:l});return f.userData.sid=n,f.userData.stype="Helper",this.viewport.scener.addObject(f,this.scene),f}addDirectionalLightHelper(e){const{id:t,light:n,color:i,size:r=50}=e,s=new rt(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addHemisphereLightHelper(e){const{id:t,light:n,color:i,size:r=20}=e,s=new st(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addSpotLightHelper(e){const{id:t,light:n,color:i}=e,r=new ot(n,i);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPointLightHelper(e){const{id:t,light:n,color:i,size:r=20}=e,s=new at(n,r,i);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addRectAreaLightHelper(e){const{id:t,light:n,color:i}=e,r=new xt(n,i);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}}class gh extends Vc{constructor(e,t){super(Zt,e,t)}createObject(e,t){const n=new Dc(e);return t&&n.add(t),this.viewport.scener.addObject(n,this.scene),n}addToObject(e,t){return e?(this.viewport.scener.addObject(t,e),e):null}}class mh extends Vc{constructor(e,t){super(zt,e,t)}}class vh{constructor(e){this.viewport=e,this.cache={objects:new Map,classified:{Group:new Set,Light:new Set,Model:new Set,Poi:new Set,PoiNode:new Set,Canvas3D:new Set,Topology:new Set,Helper:new Set,PluginObject:new Set}},this.scene=e.scene,this.store={groupManager:new mh(e,this.scene),lightManager:new Yc(e,this.scene),modelManager:new lh(e,this.scene),poiManager:new ch(e,this.scene),poiNodeManager:new hh(e,this.scene),canvas3DManager:new uh(e,this.scene),topologyManager:new fh(e,this.scene),helperManager:new ph(e,this.scene),pluginObjectManager:new gh(e,this.scene)},e.postUpdate.set("ManagerRender",this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,e.matrixAutoUpdate=t,e.autoUpdate=!0)},t=t=>{const{level:n,handleHide:i,autoUpdate:r}=t,{max:s=null,min:o=null}=n;if(r)t.autoUpdate=!1,this.viewport.signals.objectChanged.dispatch();else if(!i&&(Mn(s)||Mn(o))){const n=this.viewport.camera.position.distanceTo(t.position);Mn(s)&&n>s||Mn(o)&&n<o?e(t,!1):e(t,!0)}};this.scene.traverse((e=>{(e instanceof Tc||e instanceof Ac)&&t(e)}))}update(){if(0===this.scene.children.length)return;const e=performance.now();this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.signals.loadRendered.dispatch(performance.now()-e)}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&Pn(i)&&(i instanceof Tc||i instanceof Ac||i.userData.stype)&&(On(e)&&e(i.userData)||Cn(e)&&i.userData[e]===t)&&n.push(i)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&((i instanceof Tc||i instanceof Ac)&&Pn(i)&&i[e]===t||Pn(i)&&i.userData.stype&&("name"===e&&i.name===t||"sid"===e&&i.userData.sid===t))&&n.push(i)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&Jt(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof Tc||n instanceof Ac){if("string"==typeof n.sid&&n.sid.startsWith(Ft))return;t(n,n.sid),this.cache.objects.set(n.sid,n);const e=n.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}else if(n.userData.sid&&e.userData.stype){t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n);const e=n.userData.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}}))}deleteObjectCache(e){null==e||e.traverse((t=>{if(t instanceof Tc||t instanceof Ac){this.cache.objects.delete(t.sid);const e=t.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}else if(t.userData.sid&&e.userData.stype){this.cache.objects.delete(t.userData.sid);const e=t.userData.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.cache.objects.clear(),this.clear()}}function yh(e){const t=wh(e),n=new g;n.setFromMatrix3(t);const i=e[0],r=n.clone();r.setPosition(i);const s=r.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(s);return new h(t.x,t.y)})),a=new Ge(o),l=new He(a),c=new lt;c.setFromPoints(o);const u=bh(c);return l.getAttribute("uv").applyMatrix3(u),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:r,projectionMatrix:s,position:i}}function wh(e){const[n,i,r]=e,s=new u;s.setFromCoplanarPoints(i,n,r);const o=s.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new ge;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function bh(e){const t=e.min,n=e.getSize(new h),i=new ge;return i.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],i.invert()}function xh(e,t){const n=Ah(t);return e.intersectsBox(n)}function Ah(e){const n=new i,r=n.min.clone(),s=n.max.clone();if(n.setFromObject(e),n.min.equals(r)&&n.max.equals(s)){const i=new t;e.getWorldPosition(i),n.min.copy(i),n.max.copy(i)}if(e.isInstancedMesh){const{count:t,matrixWorld:i,geometry:r}=e;let s=r.boundingBox;if(s||(r.computeBoundingBox(),s=r.boundingBox),s){const r=i.clone();for(let i=0;i<t;i++){const t=new g;e.getMatrixAt(i,t),t.premultiply(r);const o=s.clone();o.applyMatrix4(r),n.union(o)}}}return n}function Sh(e,t,n){if("string"==typeof e){let i=t?null==n?void 0:n.get(e):null;if(!i){i=(new Ie).load(e),null==n||n.set(e,i)}return i}return e instanceof HTMLImageElement?new l(e):e instanceof HTMLCanvasElement?new Se(e):new ye(e)}function Th(e,t,n,i){const r=e.map,s=Sh(t,n,i);if(!r)return e.map=s,s;const o=s.source;return s.copy(r),s.source=o,e.map=s,s}function Eh(e,n){const{top:r,left:s,bottom:o,right:a,front:l,back:c}=e,h=new t(a,r,l),u=new t(s,o,c),d=new i;return function(e){return d.max.addVectors(e,h),d.min.subVectors(e,u),n.filter((e=>xh(d,e)))}}function Dh(e,n){const i=new p(new t,e);return function(e){return i.center.copy(e),n.filter((e=>xh(i,e)))}}function Ch(e,n){const i=e.length-1,r=[];for(let t=0;t<i;t++){const n=e[t],i=e[t+1],s=new d(n,i);r.push(s)}const s=new p(new t,n);return function(e){return e.filter((e=>{const n=Ah(e),i=new t;n.getCenter(i);const o=r.filter((e=>{const t=e.closestPointToPointParameter(i);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=i;for(const e of o){const n=e.closestPointToPoint(i,!0,new t),r=i.distanceToSquared(n);r<a&&(a=r,l=n)}return s.center.copy(l),s.intersectsBox(n)}))}}function Bh(e,t){const{image:n,color:i,width:r,height:s,position:o,rotation:a,needLight:l,id:c,name:h,userData:u,level:d,visible:f,cache:p}=e,g=wr(e,["image","color","width","height","position","rotation","needLight","id","name","userData","level","visible","cache"]),m=new Ee(r,s),v=n?Object.assign(Object.assign({transparent:!0},g),{map:Sh(n,null==p||p,t)}):g,y=l?new ct(v):new Te(v),w=new Ac(m,y,{id:c,name:h,userData:u,level:d,visible:f});return o&&w.position.set(o.x,o.y,o.z),a&&w.rotation.set(a.x,a.y,a.z),w}function Mh(e,n){const{points:i,image:r,color:s,needLight:o,id:a,name:l,userData:c,level:h,visible:u,cache:d}=e,f=wr(e,["points","image","color","needLight","id","name","userData","level","visible","cache"]),p=i.map((e=>new t(e.x,e.y,e.z))),g=r?Object.assign(Object.assign({transparent:!0},f),{map:Sh(r,null==d||d,n)}):f,m=o?new ct(g):new Te(g),{geometry:v,position:y}=yh(p),w=new Ac(v,m,{id:a,name:l,userData:c,level:h,visible:u});return w.position.copy(y),w}class Ih{constructor(t){this.THREE=e,this.TWEEN=jt,this.utils=kn,this.version=Tt,this.animation=jn,this.library=Gc,this.plugins={},this.textureCache=new Map;const{el:n,options:i={},events:r={}}=t;if(this.domElement=document.querySelector(n),this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,controls:{type:"free"},hoverEnabled:!1,levelEnabled:!1,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0,logarithmicDepthBuffer:!0}),i),this.viewport=new xc(this.options),this.signals=this.viewport.signals,this.manager=new vh(this.viewport),!this.domElement)throw new Error(`In SoonSpace: Can't find element by "${n}"!`);this.domElement.appendChild(this.viewport.container),this._init(),this._initEvents(r),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:i,closeInfoLog:r,closeWarnLog:s,useIndexedDB:o}=this.options;if(!r){qt(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),qt(St,{color:"#3eaf7c","font-size":"24px"}),qt(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),qt("文档: http://www.xwbuilders.com:8800",{color:"#3eaf7c","font-size":"12px"}),qt("样例: http://www.xwbuilders.com:8800/examples",{color:"#3eaf7c","font-size":"12px"}),qt("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Cn(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):Pn(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)&&this.setBackgroundColor(t.color),n&&this.openSceneFog(!0===n?void 0:n),i&&this.setControlsOptions(i),s&&(window.console.warn=function(){}),o&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const{modelHover:t,modelUnHover:n,modelClick:i,modelRightClick:r,modelDblClick:s,poiHover:o,poiUnHover:a,poiClick:l,poiRightClick:c,poiDblClick:h,selectPosition:u,sceneClick:d,resize:f}=e;t&&this.signals.modelHover.add(t),n&&this.signals.modelUnHover.add(n),i&&this.signals.modelClick.add(i),r&&this.signals.modelRightClick.add(r),s&&this.signals.modelDblClick.add(s),o&&this.signals.poiHover.add(o),a&&this.signals.poiUnHover.add(a),l&&this.signals.poiClick.add(l),c&&this.signals.poiRightClick.add(c),h&&this.signals.poiDblClick.add(h),u&&this.signals.selectPosition.add(u),d&&this.signals.sceneClick.add(d),f&&this.signals.windowResize.add(f),this.signals.windowResize.dispatch(),window.addEventListener("resize",(()=>this.signals.windowResize.dispatch()),!1)}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}registerPlugin(e,t){const n=new e(this);return this.plugins[t]=n,n}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return Jt("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return Jt("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return Jt("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setSSR(e){this.viewport.setSSR(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setHoverEnabled(e){this.viewport.setHoverEnabled(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(){return this.viewport.setEnvironment()}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t){return this.viewport.getPositionByOffset(e,t)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose()}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e){this.viewport.cameraManager.setCameraViewpoint(e)}getCameraTargetView(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraTargetView(e){this.viewport.cameraManager.setCameraViewpoint(e)}flyTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return"orbit"===this.viewport.controls.options.type&&this.utils.warn("flyTo 方法不适用于 orbit 控制器"),this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.flyToBoundingBox(e,t,n)}flyToObj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"frontTop",t=arguments.length>1?arguments[1]:void 0;return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"frontTop",n=arguments.length>2?arguments[2]:void 0;return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.viewport.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return Jt("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return Jt("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e){return this.manager.store.groupManager.createGroup(e)}getGroupById(e){return Jt("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return Jt("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return Jt("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return Jt("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){Jt("parseSbm is deprecated!")}cloneSbm(e,t,n){return Jt("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return Jt("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return Jt("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return Jt("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return Jt("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return Jt("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return Jt("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return Jt("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){Jt("createGroupForSbm is deprecated!")}getSbmGroupById(e){return Jt("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return Jt("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return Jt("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return Jt("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return Jt("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return Jt("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return Jt("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return Jt("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return Jt("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return Jt("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}loadModel(e){return this.manager.store.modelManager.load(e)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return Jt("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return Jt("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return Jt("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return Jt("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return Jt("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return Jt("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return Jt("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return Jt("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return Jt("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return Jt("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return Jt("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return Jt("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return Jt("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return Jt("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return Jt("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return Jt("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return Jt("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return Jt("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return Jt("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return Jt("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return Jt("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return Jt("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return Jt("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return Jt("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return Jt("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return Jt("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return Jt("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=Bh(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=Mh(e,this.textureCache);return this.addObject(t),t}setTexture(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{cache:i=!0,independ:r=!0}=n||{};let s=e.material;if(r&&(s=s.clone(),e.material=s),null===t)return s.map=null,this.render(),null;const o=Th(s,t,i,this.textureCache);return this.render(),o}createCanvas3D(e){return this.manager.store.canvas3DManager.create(e)}getCanvas3DById(e){return Jt("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return Jt("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return Jt("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return Jt("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return Jt("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return Jt("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return Jt("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return Jt("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return Jt("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return Jt("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return Jt("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return Jt("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return Jt("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return Jt("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return Jt("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return Jt("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return Jt("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return Jt("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return Jt("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return Jt("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return Jt("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return Eh(e,t)}createFindObjectsInSphereNearPosition(e,t){return Dh(e,t)}createFindObjectsNearPath(e,t){return Ch(e,t)}createPathAnimation(e,t,n){return new Fn(e,t,n)}createTopologyAnimation(e,n,i){const r=n.nodes.map((e=>e.getWorldPosition(new t)));return new Fn(e,r,i)}}Ih.THREE=e,Ih.TWEEN=jt,Ih.utils=kn;export{Ih as SoonSpace,xh as boundingIsIntersected,Eh as createFindObjectsInBoxNearPosition,Dh as createFindObjectsInSphereNearPosition,Ch as createFindObjectsNearPath,wh as createPlaneMatrix,Bh as createPoiMesh,Mh as createPolygonPoiMesh,Sh as createTexture,bh as createUVMatrix,Ih as default,Ah as getBoundingBox,yh as getPolygonGeometryInfo,Th as setTexture};