/*! Released Version 0.9.1,BUILD 143. Fengmap Javascript SDK, see: https://www.fengmap.com for details */ function c(e){if(b[e])return b[e].exports;var t=b[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,c),t.l=!0,t.exports}var a,b;exports.fengmap=(a=[function(e,t,n){e.exports=n(269)},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(186);function r(e,t){for(var n=0;n=e.y||s>=e.y&&ue.x&&(n=!n)}}return n}},{key:"isInCircle",value:function(e,t,n,r){if(e.xr[1])return!1;if(e.yr[3])return!1;var i=n*n,r=e.x,n=e.y,e=t.x,t=t.y,r=e-r,n=t-n,n=r*r+n*n;return ni||e.yn)}},{key:"cross",value:function(e,t,n){return(e.x-n.x)*(t.y-n.y)-(t.x-n.x)*(e.y-n.y)}},{key:"isLineSegmentCross",value:function(e,t,n,r){return!(Math.max(e.x,t.x)=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)){if(o=i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x),Math.abs(o-t.x)<=y)return 2;o=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)i[1]&&t.x>i[1])return!1;if(e.yi[3]&&t.y>i[3])return!1;var a=r*r,o=e.x,s=e.y,l=t.x,u=t.y,h=n.x,c=n.y,d=l-o,i=u-s,r=d*d+i*i,e=h-o,t=c-s,n=e*e+t*t;return g.isZero(r)?!!g.isZero(n)||nr[1]&&t.x>r[1])return!1;if(e.yr[3]&&t.y>r[3])return!1;var i=n.length;if(g.pointInPolygon2d(n,e,i))return!0;if(g.pointInPolygon2d(n,t,i))return!0;for(var a=0;ai[1]&&t.x>i[1])return null;if(e.yi[3]&&t.y>i[3])return null;var a={isContain:!1,crossPoints:[]},o=r*r,s=e.x,l=e.y,u=t.x,h=t.y,c=n.x,d=n.y,f=u-s,p=h-l,m=f*f+p*p,i=c-s,r=d-l,n=i*i+r*r,u=c-u,h=d-h,h=u*u+h*h;return g.isZero(m)?((g.isZero(n)||nr[1]&&t.x>r[1])return null;if(e.yr[3]&&t.y>r[3])return null;var i={containType:0,crossPoints:[]},a=n.length;g.pointInPolygon2d(n,e,a)&&(i.containType|=1),g.pointInPolygon2d(n,t,a)&&(i.containType|=2);for(var o=[],s=0;so)return!1;var m=(p-d)/(f-c),m=m*(u-c)+d;return i.y=m,i.x=u,!(mo||(e=(p-d)/(f-c),e=e*(u-c)+d,i.y=e,i.x=u,he);n++);}}]),e}(),n=n;t.default=n},function(e,t,n){var r=n(98),i=n(82);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(11),i=n(18),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(74),i=Math.min;e.exports=function(e){return 0t&&(t=e[a],n=a);var o=new fm.Vector3(e[n],e[n+1],0),r=0===n?e.length-2:n-2,i=n===e.length-2?0:n+2,r=new fm.Vector3(e[r],e[r+1],0),i=new fm.Vector3(e[i],e[i+1],0),r=(new fm.Vector3).copy(o).sub(r),o=(new fm.Vector3).copy(i).sub(o),o=r.cross(o);return 0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function P(e,t){if(e){if("string"==typeof e)return C(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.distance?e:o:o[0]?o:e[0]?e:[]}},{key:"getFacility",value:function(e,t,n,r,i){if(e=this._scenes[e],!e)return[];i=e.getFacilityByFilter(t,i),this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type;for(var a=this._raycaster.intersectObjects(i),o=0;oa[o-h].object.material.priority;h++){var c=a[o-u],d=a[o-h];a[o-h]=c,a[o]=d,u++}}return a}},{key:"getGroupLength",value:function(e){return this._scenes[""+e].groupLength}},{key:"getGroupIds",value:function(e){return this._scenes[""+e].groupIds}},{key:"getGroup",value:function(e,t){return this._scenes[""+e].groups[t+""]}},{key:"getRenderList",value:function(){if(this._scenes){var e,t=[];for(e in this._scenes){var n=this._scenes[e].getRenderGroup();t.push(n)}return t}}},{key:"conformatScene",value:function(e,t,n){e=new m.default(t,e,this),e.parent=this,this._scenes[t+""]=e,this._scenes[t+""].theme=n}},{key:"checkMaterialAlpha",value:function(e,t){var n;if(e)if(this._focusAlphaMode&&t!==this._map.currentFocusGroup&&(0,y.default)(n=this._map.otherFocus).call(n,t)<0){if((0,b.default)(e.material)){var r,i=k(e.material);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.opacity=this._focusAlpha}}catch(e){i.e(e)}finally{i.f()}}else if(e.material)if(void 0===e.material.length)e.material.opacity!==this._focusAlpha&&(e.material.opacity=this._focusAlpha);else for(var o=0;ou;if(t){switch(e){case"extent":r.renderNodeInited?c.checkMaterialAlpha(r.renderNode,s.eid):c.createExtent(r,h,s.eid);break;case"model":r.renderNodeInited?(c.checkMaterialAlpha(r.renderNode,s.eid),c.checkMaterialAlpha(r.line,s.eid)):c.createModel(r,h,s.eid);break;case"label":r.renderNodeInited?c.checkMaterialAlpha(r._renderNode,s.eid):r.tryInit||c.createLabel(r,h,g,s.eid);break;case"facility":r.renderNodeInited?c.checkMaterialAlpha(r._renderNode,s.eid):c.createFacility(r,h,s.eid);break;case"externalModel":if(r.renderNodeInited)c.checkMaterialAlpha(r._renderNode,s.eid);else{var i=r.bdata,a=r.gdata,o=d.getExteralModelTheme(i.fid);if(!o)return;c._externalLoader.preLoadModels[o.normalid]||(c._externalLoader.preLoadModels[o.normalid]={loaded:!1,isLoading:!1,modelUrl:o.model,model:null,geometry:null,material:null});var n=c._externalLoader.preLoadModels[o.normalid];n.loaded?c.createExterModel(n.geometry,n.material,a,i,o,r,f,p,s.height,m,v,n.isGltf):(c._externalLoader.waitingBacks[o.normalid]?c._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){c.createExterModel(e,t,a,i,o,r,f,p,s.height,m,v,"js"!==n)},i.fid):c._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){c.createExterModel(e,t,a,i,o,r,f,p,s.height,m,v,"js"!==n)},i.fid),n.isLoading||c._externalLoader.load(o.normalid))}}r.checkByFrustum(l)}else r.visible=!1})},o=k(i);try{for(o.s();!(r=o.n()).done;){var s=r.value;a(s)}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error("渲染楼层失败!",e)}}}},{key:"createModel",value:function(e,t,n){var r=this._scenes[""+t].center.x,i=this._scenes[""+t].center.y,a=this._scenes[""+t].mapcenter.x,o=this._scenes[""+t].mapcenter.y,s=this._scenes[""+t].theme,l=e.gdata,u=e.bdata;this._map.MapOptions.useStoreApply&&(h=s.getStoreApplyTheme(u.fid));var h=h||s.getModelTheme(u),s=null,s=1===this._map.dataManager.file_ver?S.default.convertGeo2Geometry(l.geo):S.default.convertArray2Geometry(l.idxs,l.pts);e._data=s,u=l.height&&-1!==l.height?l.height:2,s=this.createGeometry(s,u,t),t=this._materialManager.createNormalMaterial(h),e._geometry=s,s=this.isNeedSweep,this.isNeedSweep&&(fm.ShaderLib.physical.vertexShader=R.vertexShader,fm.ShaderLib.physical.fragmentShader=N.fragmentShader,(0,d.default)(fm.ShaderLib.physical.uniforms,{maxPos:{value:this.sweepMax},minPos:{value:this.sweepMin},relativeModelMatrix:{value:void 0}})),e.initMesh(t,new fm.Vector3(r,i+u,0),s),e.x=a,e.y=o,e.height=u,e.currHeight=u,this.checkMaterialAlpha(e.renderNode,n),e.initLine(this._materialManager.createLineMaterial(h),l.height),this.checkMaterialAlpha(e.line,n),h.image&&h.sizes&&(l=h.sizes.split(","),n=[],h.coords&&(n=h.coords.split(",")),e.addStoreImage({image:h.image?this._map.MapOptions.mapThemeURL+"/"+this._map.MapOptions.defaultThemeName+"/"+h.image:"",angle:h.angle||0,size:[(0,M.default)(l[0]),(0,M.default)(l[1])],mapCoord:h.coords?new fm.Vector2((0,M.default)(n[0]),(0,M.default)(n[1])):void 0}))}},{key:"createExtent",value:function(e,t,n){var r=e.gdata,i=this._scenes[t+""].theme,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=null,u=1===this._map.dataManager.file_ver?S.default.convertGeo2Geometry(r.geo):S.default.convertArray2Geometry(r.idxs,r.pts);e._geometry=this.createGeometry(u,r.height||1,t),e.x=s,e.y=l,l=this._materialManager.createNormalMaterial(),e.initMesh(l,new fm.Vector3(a,o,0),i.floorColor,i.floorOpacity),this.checkMaterialAlpha(e.renderNode,n)}},{key:"createLabel",value:function(e,t,n,r){var i=e.gdata,a=e.bdata,o=this._scenes[""+t].mapcenter.x,s=this._scenes[""+t].mapcenter.y,l=this._scenes[""+t].center.x,u=this._scenes[""+t].center.y,h=this._scenes[t+""].theme,t=null,t=1===this._map.dataManager.file_ver?S.default.convertGeo2Points(i.geo):S.default.convertArrayPoints(i.idxs,i.pts),i=-1===i.height?2.2:i.height,s=new fm.Vector3(t.vertices[0].x-o,-t.vertices[0].y+s,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(l,u+i,0)),l=a.ename,u=a.name,l=n===L.default.ZH?u:l;e.x=t.vertices[0].x,e.y=t.vertices[0].y,e.height=i,e.pos=s,e.tryInit=!0,a=h.getLabelTheme(a),a&&(e.theme=a,e.size=1.4*a.fontsize,l&&(a=this._materialManager.createLabelMaterial(l,a,!1,e),e.initSprite(a,(new fm.Vector3).copy(s)),this.checkMaterialAlpha(e._renderNode,r),e.setSize()))}},{key:"createFacility",value:function(e,t,n){var r=e.gdata,i=e.bdata,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=this._scenes[t+""].theme,t=null,t=1===this._map.dataManager.file_ver?S.default.convertGeo2Points(r.geo):S.default.convertArrayPoints(r.idxs,r.pts),r=-1===r.height?2.2:r.height,o=new fm.Vector3(t.vertices[0].x-s,-t.vertices[0].y+l,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(a,o+r,0)),u=u.getPoiTheme(i),i=this._materialManager.createPoiMaterial(u,e);e.x=t.vertices[0].x,e.y=t.vertices[0].y,e.height=r,e.pos=o,u.height&&(e.size=u.height),this._map.wxInfo.pixelRatio&&(e.size*=this._map.wxInfo.pixelRatio),e.initSprite(i,(new fm.Vector3).copy(o)),this.checkMaterialAlpha(e._renderNode,n),e.setSize()}},{key:"everGroup",value:function(e,t){for(var n=0;n=t.length?{value:void 0,done:!0}:(n=r(t,n),e.index+=n.length,{value:n,done:!1})})},function(e,t){e.exports={}},function(e,t,n){e.exports=n(350)},function(e,t,n){e.exports=n(358)},function(e,t,n){var v=n(33),g=n(194),y=n(46),_=n(72),x=n(112),w=n(195),b=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var r,i,a,o,s,l,u=n&&n.that,h=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),f=_(t,u,1+h+d),p=function(e){return r&&w(r),new b(!0,e)},m=function(e){return h?(v(e),d?f(e[0],e[1],p):f(e[0],e[1])):d?f(e,p):f(e)};if(c)r=e;else{if(c=x(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(g(c)){for(i=0,a=y(e.length);i",c="<",d="prototype",f="script",p=n("IE_PROTO"),m=function(){},v=function(e){return c+f+h+e+c+"/"+f+h},g=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e=u("iframe"),t="java"+f+":";return e.style.display="none",l.appendChild(e),e.src=String(t),e=e.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},_=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}_=r?g(r):y();for(var e=o.length;e--;)delete _[d][o[e]];return _()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[d]=i(e),n=new m,m[d]=null,n[p]=e):n=_(),void 0===t?n:a(n,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0this._time){for(var i in this._left){var a=(this._right[i]-this._left[i])*(this._time-this._countTime)/this._time;this._result[i]+=a,r[i]=a}return this._enable=!1,this._runBack(this._result,r),this._endBack(this._result,r),this._result={},void(this._countTime=0)}for(t in this._left){var o=(this._right[t]-this._left[t])*n/this._time;this._result[t]+=o,r[t]=o}this._countTime+=n,this._runBack(this._result,r)}},{key:"pause",value:function(){return this._enable=!1,this}},{key:"resume",value:function(){return this._enable=!0,this}},{key:"stop",value:function(){return this._enable=!1,this._countTime=0,this._result=(0,o.default)({},this._left),this}},{key:"start",value:function(){return this._enable=!0,this}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e}}]),a}(),n=n;t.default=n},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){var n;t&&(e.super_=t,n=function(){},n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e)}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),o=i(n(2)),s=i(n(3)),l=(i(n(157)),i(n(55))),n=function(){function e(){(0,o.default)(this,e),this.Id=0,this.point={},this._type=0,this.liftFloors=[],this.segLinks=[],this.liftFlag=0,this.relatedLiftNodes=[],this.treatHead=!1,this.treatTail=!1,this._dist=0,this._visited=!1,this._vPre=[]}return(0,s.default)(e,[{key:"nodeType",get:function(){return 3&this._type},set:function(e){-1!=e&&(this._type|=e)}},{key:"liftType",get:function(){return this._type>>2&7},set:function(e){this._type|=e<<2}},{key:"liftEntry",get:function(){return this._type>>5&3},set:function(e){this._type|=e<<5}},{key:"entranceType",get:function(){return this._type>>7&3},set:function(e){this._type|=e<<7}},{key:"tempType",get:function(){return _type>>9&3},set:function(e){this._type|=e<<9}},{key:"init",value:function(e){this.Id=e,this.point={x:0,y:0},this._type=0,this.liftFlag=0,this.treatHead=!1,this.treatTail=!1}},{key:"equals",value:function(e){return this.Id==e.Id}},{key:"setNode",value:function(e){this.Id=e.Id,this.point=(0,a.default)({},e.point),this._type=e._type,this.liftFloors=[];for(var t=0;t=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){e.exports=n(351)},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var i=n(88);e.exports=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:i(e,r,t[r],n);return e}},function(e,t,n){var r=n(51),i=n(59),n=n(24),a=n("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var i=n(53),a=n(453),o=n(196),s=n(202),l=n(35),u=n(456),h=n(91),c=n(0),r=n(1);c(t,"__esModule",{value:!0}),t.default=void 0;var d=r(n(137)),f=r(n(3)),p=r(n(2)),m=r(n(139)),v=r(n(15)),g=r(n(10)),y=r(n(12));function _(t,e){var n,r=i(t);return a&&(n=a(t),e&&(n=o(n).call(n,function(e){return s(t,e).enumerable})),r.push.apply(r,n)),r}function x(t){for(var e=1;ee.far||t.push({distance:n,point:l.clone(),uv:fm.Triangle.getUV(l,p,m,v,g,y,_,new fm.Vector2),face:null,object:s})))}(o,e)}}]),n}(fm.Sprite),t.default=n},function(e,t,n){e.exports=n(501)},function(e,t,n){"use strict";var i=n(44),r=function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=i(n),this.reject=i(r)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(34)),a=i(n(2)),o=i(n(3)),l=i(n(226)),u=i(n(28)),n=function(){function t(e){(0,a.default)(this,t),this._points=e||null,this._groupId=0,this._lineDis=[],this._linePoints=null,this._screenPoints=[],this._screenDis=[],this._radiusPoint=[],this._radiuInit=!1,this._uvys=null,this._minRadius=1,this.needSmooth=!0}return(0,o.default)(t,[{key:"initSegement",value:function(e,t){"number"!=typeof t&&(t=this._minRadius),this._linePoints=this.pointsToLinePnts(e,t),this._uvys=this.computerUVY()}},{key:"pointsToRadius",value:function(e){for(var t,n,r=[],i=new l.default,a=0;an&&(this._minRadius=n)}}}},{key:"points",get:function(){return this._points},set:function(e){this._points=e}},{key:"groupId",get:function(){return this._groupId},set:function(e){this._groupId=e}},{key:"allLength",get:function(){return this.getIndexDis(this._lineDis.length)}},{key:"linePoints",get:function(){return this._linePoints}},{key:"uvys",get:function(){return this._uvys}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t._Math=void 0;var r={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var i=[],e=0;e<256;e++)i[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,r=i[255&e]+i[e>>8&255]+i[e>>16&255]+i[e>>24&255]+"-"+i[255&t]+i[t>>8&255]+"-"+i[t>>16&15|64]+i[t>>24&255]+"-"+i[63&n|128]+i[n>>8&255]+"-"+i[n>>16&255]+i[n>>24&255]+i[255&r]+i[r>>8&255]+i[r>>16&255]+i[r>>24&255];return r.toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*(3-2*e))},smootherstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*e*(e*(6*e-15)+10))},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*r.DEG2RAD},radToDeg:function(e){return e*r.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};t._Math=r},function(t,e,n){"use strict";!function(s){function e(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,n)});case 4:return s.nextTick(function(){e.call(null,t,n,r)});default:for(i=new Array(o-1),a=0;a=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function ie(e,t){if(e){if("string"==typeof e)return ae(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.MapOptions.modelHoverTime?this._enterControl.enableMapHover&&this._lastMoveEvent&&(t=this._lastMoveEvent,n=t.mousePoint,i={x:2*n.x/n.w-1,y:1-2*n.y/n.h},r=this.nodeManager.getNode(this._currentSceneId,this.getVisibleGroups(),i,this.renderer.getCameraByViewMode(this._viewMode)),o=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),i,this.renderer.getCameraByViewMode(this._viewMode)),r.length<1&&o.length<1||(r[0]&&(i=(new fm.Vector3).copy(r[0].point),a={type:"mapHoverNode",target:r[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:r[0].point,eventID:t.eventID,coord:{x:i.x+this.center.x,y:r[0].object.mapNode.y-i.z}},groupID:r[0].object.mapNode.groupID,nodeType:r[0].object.mapNode.nodeType},this.hoverFilterFunction?(i=this.hoverFilterFunction({nodeType:r[0].object.mapNode.nodeType,typeID:r[0].object.mapNode.bdata&&r[0].object.mapNode.bdata.type,data:r[0].object.mapNode.bdata}),i&&(r[0].object.mapNode.nodeType===H.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(a))):(r[0].object.mapNode.nodeType===H.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(a))),o[0]&&(a=(new fm.Vector3).copy(o[0].point),a={type:"mapHoverNode",target:o[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:o[0].point,eventID:t.eventID,coord:{x:a.x+this.center.x,y:o[0].object.mapNode.y-a.z}},groupID:o[0].object.mapNode.groupID,nodeType:o[0].object.mapNode.nodeType},this.hoverFilterFunction?(o=this.hoverFilterFunction({nodeType:o[0].object.mapNode.nodeType,typeID:o[0].object.mapNode.bdata&&o[0].object.mapNode.bdata.type,data:o[0].object.mapNode.bdata}),o&&this.dispatchEvent(a)):this.dispatchEvent(a)),this._mouseHoverStart=!1,this._mouseHoverTime=0)):this._mouseHoverTime+=e)}},{key:"selectNull",value:function(){if(z.default[this.uuid].currentModel){z.default[this.uuid].currentAnimater&&(z.default[this.uuid].currentAnimater.stop(),z.default[this.uuid].currentAnimater=void 0);var e=z.default[this.uuid].currentModel;if(void 0===z.default[this.uuid].currentModel.material.length)e.material.color=z.default[this.uuid].currentModel.material.userData.color,e.material.opacity=z.default[this.uuid].currentModel.material.userData.opacity,e.material.userData.opacity=void 0,e.material.userData.color=void 0,e.material.update=!0,z.default[this.uuid].currentModel=void 0;else{for(var t=0;tthis.mapScaleLevels[0])return 1;if(e=this.mapScaleLevels[t+1]&&e<=this.mapScaleLevels[t]){var n=e-this.mapScaleLevels[t+1],r=this.mapScaleLevels[t]-e;return nc/d?c/(t.x-e.x):d/(t.y-e.y),t=r.x-c/2,e=r.y-d/2,r=document.getElementsByTagName("canvas")[0],p=document.createElement("canvas"),m=document.createElement("canvas"),v=document.createElement("canvas"),g=window.devicePixelRatio,y=new Image;("3d"===this.viewMode?this.renderer.perspectiveCamera:this.renderer.orthographicCamera).setViewOffset(c*f,d*f,c*(f-1)/2+t*f,d*(f-1)/2+e*f,c,d),this.renderer.update(),p.width=u*f*g,p.height=h*f*g,p.style.width=u*f*g+"px",p.style.height=h*f*g+"px",n?(m.width=1240*Math.pow(1.414,s-1),m.height=1754*Math.pow(1.414,s-1),m.style.width=1240*Math.pow(1.414,s-1)+"px",m.style.height=1754*Math.pow(1.414,s-1)+"px"):(m.height=1240*Math.pow(1.414,s-1),m.width=1754*Math.pow(1.414,s-1),m.style.height=1240*Math.pow(1.414,s-1)+"px",m.style.width=1754*Math.pow(1.414,s-1)+"px"),v.height=h*Math.pow(1.414,s-1),v.width=u*Math.pow(1.414,s-1),v.style.height=h*Math.pow(1.414,s-1)+"px",v.style.width=u*Math.pow(1.414,s-1)+"px",y.src=r.toDataURL("image/png"),("3d"===this.viewMode?this.renderer.perspectiveCamera:this.renderer.orthographicCamera).clearViewOffset();var _=p.getContext("2d"),x=m.getContext("2d"),w=v.getContext("2d"),b=this;y.onload=function(){b.viewMode,_.drawImage(y,-(c*g-u*f*g)/2,-(d*g-h*f*g)/2);var o=new Image;o.src=p.toDataURL("image/png"),o.onload=function(){var e=Math.min(1240*Math.pow(1.414,s-1)/(u*f),1754*Math.pow(1.414,s-1)/(h*f)),t=(m.width-u*f*e)/2,n=(m.height-h*f*e)/2;x.drawImage(o,t,n,u*f*e,h*f*e),w.drawImage(o,0,0,u*Math.pow(1.414,s-1),h*Math.pow(1.414,s-1));var r,i=m.toDataURL("image/png"),a=v.toDataURL("image/png");-1<(0,A.default)(e=navigator.userAgent).call(e,"Edge")||-1<(0,A.default)(r=navigator.userAgent).call(r,".NET4.0C")?(e=null,r=null,l(i,e,a,r)):m.toBlob(function(t){v.toBlob(function(e){l(i,t,a,e)})})}}}},{key:"enableKeys",value:function(e){this.controls.enableKeys=e}},{key:"getSearchObjects",value:function(e){for(var t=[],n=0;nthis.maxScaleLevel&&(e=this.maxScaleLevel),this.scaleLevelTo({level:e,duration:t,callback:n}),this._mapScale=this.levelToScale(e),this._mapScaleLevel=e}},{key:"mapScale",get:function(){return this._mapScale},set:function(e){ethis.maxScale&&(e=this.maxScale),this.scaleTo({scale:e}),this._mapScaleLevel=this.scaleTolevel(e),this._mapScale=e}},{key:"scaleLevel",get:function(){return this.mapScaleLevel}},{key:"maxScale",get:function(){return this._maxScale},set:function(e){e<=this.mapScaleLevels[this.mapScaleLevels.length-1]?e=this.mapScaleLevels[this.mapScaleLevels.length-2]:e>this.mapScaleLevels[0]&&(e=this.mapScaleLevels[0]),this._minScaleLevel=this.scaleTolevel(e),this._maxScale=e,this.controls.maxDistance=this.getCameraDistanceByScale(this._maxScale)}},{key:"minScale",get:function(){return this._minScale},set:function(e){e=this.mapScaleLevels[0]&&(e=this.mapScaleLevels[1]),this._maxScaleLevel=this.scaleTolevel(e),this._minScale=e,this.controls.minDistance=this.getCameraDistanceByScale(this._minScale)}},{key:"minScaleLevel",get:function(){return this._minScaleLevel},set:function(e){e<1&&(e=1),29<=e&&(e=28),this._maxScale=this.levelToScale(e),this.controls.maxDistance=this.getCameraDistanceByScale(this._maxScale),this.controls.minZoom=1/this.getCameraScaleByScale(this._maxScale),this._minScaleLevel=e}},{key:"maxScaleLevel",get:function(){return this._maxScaleLevel},set:function(e){e<=1&&(e=2),29Math.PI?e-=2*Math.PI:e<-Math.PI&&(e=2*Math.PI+e),ethis.controls.maxAzimuthAngle&&(e=this.controls.maxAzimuthAngle),this.controls.setUpdate(void 0,void 0,void 0,e),this.controls.update()}},{key:"maxTitleAngle",get:function(){return(Math.PI/2-this.controls.minPolarAngle)*fm.Math.RAD2DEG},set:function(e){"3d"===this._viewMode&&(this.controls.minPolarAngle=(90-e)*fm.Math.DEG2RAD),this.MapOptions.defaultMaxTiltAngle=e}},{key:"minTitleAngle",get:function(){return(Math.PI/2-this.controls.maxPolarAngle)*fm.Math.RAD2DEG},set:function(e){"3d"===this._viewMode&&(this.controls.maxPolarAngle=(90-e)*fm.Math.DEG2RAD),this.MapOptions.defaultMinTiltAngle=e}},{key:"labelLanguage",get:function(){return this.MapOptions.defaultLabelLanguage},set:function(e){var t;e!==this.labelLanguage&&(this.MapOptions.defaultLabelLanguage=e,t=this.nodeManager.getSceneById(this._currentSceneId),t&&t.setLabelLanguage(e))}},{key:"backgroundColor",set:function(e){this.renderer.renderer.setClearColor((0,I.default)(e))}},{key:"tiltAngle",get:function(){return(Math.PI/2-this.controls.getPolarAngle())*fm.Math.RAD2DEG},set:function(e){e=(90-e)*fm.Math.DEG2RAD,ethis.controls.maxPolarAngle&&(e=this.controls.maxPolarAngle),this.controls.setUpdate(void 0,void 0,void 0,void 0,e)}},{key:"listGroups",get:function(){return this.dataManager.getDecodeScene(this._currentSceneId).scene.layerGroups}},{key:"layerLocalHeight",get:function(){return 0}},{key:"gestureEnableController",get:function(){return this._enterControl}}]),a}(o.default),t.default=o},function(e,t,n){e.exports=n(475)},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(89)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(139)),f=a(n(10)),p=a(n(53)),m=a(n(32)),v=a(n(61)),g=a(n(0)),y=a(n(9)),n=a(n(114));function _(n){var r=d();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}var x=new r.default,w=new r.default,b=new r.default;function M(e){var t=1>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=p(e,(0|e)<0?-1:0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=p(e,e<0?-1:0,!1),i&&(a[e]=n),n))}function f(e,t){if(isNaN(e)||!isFinite(e))return t?D:C;if(t){if(e<0)return D;if(g<=e)return U}else{if(e<=-k)return z;if(k<=e+1)return F}return e<0?f(-e,t).neg():p(e%l|0,e/l|0,t)}function p(e,t,n){return new s(e,t,n)}s.fromInt=i,s.fromNumber=f,s.fromBits=p;var c=Math.pow;function m(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return C;if("number"==typeof t&&(n=t,t=!1),n=n||10,n<2||36>>0:this.low},n.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},n.toString=function(e){if(e=e||10,e<2||36>>0,l=s.toString(e),i=o;if(i.isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},n.getHighBits=function(){return this.high},n.getHighBitsUnsigned=function(){return this.high>>>0},n.getLowBits=function(){return this.low},n.getLowBitsUnsigned=function(){return this.low>>>0},n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(z)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;0>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},n.eq=n.equals,n.notEquals=function(e){return!this.eq(e)},n.neq=n.notEquals,n.lessThan=function(e){return this.comp(e)<0},n.lt=n.lessThan,n.lessThanOrEqual=function(e){return this.comp(e)<=0},n.lte=n.lessThanOrEqual,n.greaterThan=function(e){return 0>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},n.comp=n.compare,n.negate=function(){return!this.unsigned&&this.eq(z)?z:this.not().add(O)},n.neg=n.negate,n.add=function(e){d(e)||(e=v(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,h=0,c=0,e=0;return e+=i+l,c+=e>>>16,e&=65535,c+=r+s,h+=c>>>16,c&=65535,h+=n+o,u+=h>>>16,h&=65535,u+=t+a,u&=65535,p(c<<16|e,u<<16|h,this.unsigned)},n.subtract=function(e){return d(e)||(e=v(e)),this.add(e.neg())},n.sub=n.subtract,n.multiply=function(e){if(this.isZero())return C;if(d(e)||(e=v(e)),e.isZero())return C;if(this.eq(z))return e.isOdd()?z:C;if(e.eq(z))return this.isOdd()?z:C;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(P)&&e.lt(P))return f(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,h=0,c=0,e=0;return e+=i*l,c+=e>>>16,e&=65535,c+=r*l,h+=c>>>16,c&=65535,c+=i*s,h+=c>>>16,c&=65535,h+=n*l,u+=h>>>16,h&=65535,h+=r*s,u+=h>>>16,h&=65535,h+=i*o,u+=h>>>16,h&=65535,u+=t*l+n*s+r*o+i*a,u&=65535,p(c<<16|e,u<<16|h,this.unsigned)},n.mul=n.multiply,n.divide=function(e){if(d(e)||(e=v(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?D:C;var t,n;if(this.eq(z)){if(e.eq(O)||e.eq(B))return z;if(e.eq(z))return O;var r=this.shr(1),i=r.div(e).shl(1);return i.eq(C)?e.isNegative()?O:B:(t=this.sub(e.mul(i)),n=i.add(t.div(e)),n)}if(e.eq(z))return this.unsigned?D:C;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();for(n=C,t=this;t.gte(e);){for(var i=Math.max(1,Math.floor(t.toNumber()/e.toNumber())),a=Math.ceil(Math.log(i)/Math.LN2),o=a<=48?1:c(2,a-48),s=f(i),l=s.mul(e);l.isNegative()||l.gt(t);)i-=o,s=f(i,this.unsigned),l=s.mul(e);s.isZero()&&(s=O),n=n.add(s),t=t.sub(l)}return n},n.div=n.divide,n.modulo=function(e){return d(e)||(e=v(e)),this.sub(this.div(e).mul(e))},n.mod=n.modulo,n.not=function(){return p(~this.low,~this.high,this.unsigned)},n.and=function(e){return d(e)||(e=v(e)),p(this.low&e.low,this.high&e.high,this.unsigned)},n.or=function(e){return d(e)||(e=v(e)),p(this.low|e.low,this.high|e.high,this.unsigned)},n.xor=function(e){return d(e)||(e=v(e)),p(this.low^e.low,this.high^e.high,this.unsigned)},n.shiftLeft=function(e){return d(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?p(this.low<>>32-e,this.unsigned):p(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):p(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},n.shr=n.shiftRight,n.shiftRightUnsigned=function(e){if(d(e)&&(e=e.toInt()),e&=63,0===e)return this;var t=this.high;if(e<32){var n=this.low;return p(n>>>e|t<<32-e,t>>>e,this.unsigned)}return p(32===e?t:t>>>e-32,0,this.unsigned)},n.shru=n.shiftRightUnsigned,n.toSigned=function(){return this.unsigned?p(this.low,this.high,!1):this},n.toUnsigned=function(){return this.unsigned?this:p(this.low,this.high,!0)};var G=function e(t,n,r){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===n&&(n=e.DEFAULT_ENDIAN),void 0===r&&(r=e.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");n=!!n,r=!!r}this.buffer=0===t?H:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=n,this.noAssert=r};G.VERSION="5.0.1",G.LITTLE_ENDIAN=!0,G.BIG_ENDIAN=!1,G.DEFAULT_CAPACITY=16,G.DEFAULT_ENDIAN=G.BIG_ENDIAN,G.DEFAULT_NOASSERT=!1,G.Long=s||null;var V=G.prototype;V.__isByteBuffer__,(0,_.default)(V,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var H=new ArrayBuffer(0),j=String.fromCharCode;function W(e){var t=0;return function(){return t>1,h=-7,c=n?i-1:0,d=n?-1:1,n=e[t+c];for(c+=d,a=n&(1<<-h)-1,n>>=-h,h+=s;0>=-h,h+=r;0>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,f=r?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-o))<1&&(o--,r*=2),t+=1<=o+h?c/r:c*Math.pow(2,1-h),2<=t*r&&(o++,r/=2),u<=o+h?(s=0,o=u):1<=o+h?(s=(t*r-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[n+d]=255&s,d+=f,s/=256,i-=8);for(o=o<>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=e.length,a=i>>3,o=0;for(t+=this.writeVarint32(i,t);a--;)l=1&!!e[o++]|(1&!!e[o++])<<1|(1&!!e[o++])<<2|(1&!!e[o++])<<3|(1&!!e[o++])<<4|(1&!!e[o++])<<5|(1&!!e[o++])<<6|(1&!!e[o++])<<7,this.writeByte(l,t++);if(o>3,a=0,o=[];for(e+=n.length;i--;)l=this.readByte(e++),o[a++]=!!(1&l),o[a++]=!!(2&l),o[a++]=!!(4&l),o[a++]=!!(8&l),o[a++]=!!(16&l),o[a++]=!!(32&l),o[a++]=!!(64&l),o[a++]=!!(128&l);if(a>s++&1);return t&&(this.offset=e),o},V.readBytes=function(e,t){var n,r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}return t=(0,b.default)(n=this).call(n,t,t+e),r&&(this.offset+=e),t},V.writeBytes=V.append,V.writeInt8=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return rt?r:t),--t,this.view[t]=e,n&&(this.offset+=1),this},V.writeByte=V.writeInt8,V.readInt8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],128==(128&e)&&(e=-(255-e+1)),t&&(this.offset+=1),e},V.readByte=V.readInt8,V.writeUint8=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return rt?r:t),--t,this.view[t]=e,n&&(this.offset+=1),this},V.writeUInt8=V.writeUint8,V.readUint8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],t&&(this.offset+=1),e},V.readUInt8=V.readUint8,V.writeInt16=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return rt?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},V.writeShort=V.writeInt16,V.readInt16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768==(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},V.readShort=V.readInt16,V.writeUint16=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return rt?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},V.writeUInt16=V.writeUint16,V.readUint16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},V.readUInt16=V.readUint16,V.writeInt32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return rt?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},V.writeInt=V.writeInt32,V.readInt32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),n|=0,t&&(this.offset+=4),n},V.readInt=V.readInt32,V.writeUint32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return rt?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},V.writeUInt32=V.writeUint32,V.readUint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},V.readUInt32=V.readUint32,s&&(V.writeInt64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e)),t+=8;var r=this.buffer.byteLength;return rt?r:t),t-=8,r=e.low,e=e.high,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),n&&(this.offset+=8),this},V.writeLong=V.writeInt64,V.readInt64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,r=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),r=new s(n,r,!1),t&&(this.offset+=8),r},V.readLong=V.readInt64,V.writeUint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e)),t+=8;var r=this.buffer.byteLength;return rt?r:t),t-=8,r=e.low,e=e.high,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),n&&(this.offset+=8),this},V.writeUInt64=V.writeUint64,V.readUint64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,r=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),r=new s(n,r,!0),t&&(this.offset+=8),r},V.readUInt64=V.readUint64),V.writeFloat32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return rt?r:t),t-=4,X(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},V.writeFloat=V.writeFloat32,V.readFloat32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}return e=q(this.view,e,this.littleEndian,23,4),t&&(this.offset+=4),e},V.readFloat=V.readFloat32,V.writeFloat64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var r=this.buffer.byteLength;return rt?r:t),t-=8,X(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},V.writeDouble=V.writeFloat64,V.readFloat64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}return e=q(this.view,e,this.littleEndian,52,8),t&&(this.offset+=8),e},V.readDouble=V.readFloat64,G.MAX_VARINT32_BYTES=5,G.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},G.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},G.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},V.writeVarint32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=G.calculateVarint32(e);t+=i;var a=this.buffer.byteLength;for(at?a:t),t-=i,e>>>=0;128<=e;)r=127&e|128,this.view[t++]=r,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):i},V.writeVarint32ZigZag=function(e,t){return this.writeVarint32(G.zigZagEncode32(e),t)},V.readVarint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=0,r=0;do{if(!this.noAssert&&e>this.limit){var i=Error("Truncated");throw i.truncated=!0,i}}while(i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n,0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},V.readVarint32ZigZag=function(e){return e=this.readVarint32(e),"object"===(0,y.default)(e)?e.value=G.zigZagDecode32(e.value):e=G.zigZagDecode32(e),e},s&&(G.MAX_VARINT64_BYTES=10,G.calculateVarint64=function(e){"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e));var t=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,e=e.shiftRightUnsigned(56).toInt()>>>0;return 0==e?0==n?t<16384?t<128?1:2:t<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:e<128?9:10},G.zigZagEncode64=function(e){return"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},G.zigZagDecode64=function(e){return"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s.ONE).toSigned().negate()).toSigned()},V.writeVarint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var r=G.calculateVarint64(e),i=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;switch(t+=r,e=this.buffer.byteLength,et?e:t),t-=r,r){case 10:this.view[t+9]=o>>>7&1;case 9:this.view[t+8]=9!==r?128|o:127&o;case 8:this.view[t+7]=8!==r?a>>>21|128:a>>>21&127;case 7:this.view[t+6]=7!==r?a>>>14|128:a>>>14&127;case 6:this.view[t+5]=6!==r?a>>>7|128:a>>>7&127;case 5:this.view[t+4]=5!==r?128|a:127&a;case 4:this.view[t+3]=4!==r?i>>>21|128:i>>>21&127;case 3:this.view[t+2]=3!==r?i>>>14|128:i>>>14&127;case 2:this.view[t+1]=2!==r?i>>>7|128:i>>>7&127;case 1:this.view[t]=1!==r?128|i:127&i}return n?(this.offset+=r,this):r},V.writeVarint64ZigZag=function(e,t){return this.writeVarint64(G.zigZagEncode64(e),t)},V.readVarint64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,r=0,i=0,a=0,o=0,o=this.view[e++],r=127&o;if(128&o&&(o=this.view[e++],r|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a|=(127&o)<<7,128&o||this.noAssert&&void 0===o))))))))))throw Error("Buffer overrun");return a=s.fromBits(r|i<<28,i>>>4|a<<24,!1),t?(this.offset=e,a):{value:a,length:e-n}},V.readVarint64ZigZag=function(e){return e=this.readVarint64(e),e&&e.value instanceof s?e.value=G.zigZagDecode64(e.value):e=G.zigZagDecode64(e),e}),V.writeCString=function(e,t){var n=void 0===t;n&&(t=this.offset);var r,i=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}i=K.calculateUTF16asUTF8(W(e))[1],t+=i+1;var a=this.buffer.byteLength;return at?a:t),t-=i+1,K.encodeUTF16toUTF8(W(e),(0,M.default)(a=function(e){this.view[t++]=e}).call(a,this)),this.view[t++]=0,n?(this.offset=t,this):i},V.readCString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,r=e,i=-1;return K.decodeUTF8toUTF16((0,M.default)(n=function(){if(0===i)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return i=this.view[e++],0===i?null:i}).call(n,this),n=Y(),!0),t?(this.offset=e,n()):{string:n(),length:e-r}},V.writeIString=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e),this.noAssert)[1];t+=4+i;var a=this.buffer.byteLength;if(at?a:t),t-=4+i,this.littleEndian?(this.view[t+3]=i>>>24&255,this.view[t+2]=i>>>16&255,this.view[t+1]=i>>>8&255,this.view[t]=255&i):(this.view[t]=i>>>24&255,this.view[t+1]=i>>>16&255,this.view[t+2]=i>>>8&255,this.view[t+3]=255&i),t+=4,K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),t!==r+4+i)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+i));return n?(this.offset=t,this):t-r},V.readIString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,r=this.readUint32(e),r=this.readUTF8String(r,G.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},G.METRICS_CHARS="c",G.METRICS_BYTES="b",V.writeUTF8String=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e))[1];t+=i;var a=this.buffer.byteLength;return at?a:t),t-=i,K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),n?(this.offset=t,this):t-r},V.writeString=V.writeUTF8String,G.calculateUTF8Chars=function(e){return K.calculateUTF16asUTF8(W(e))[0]},G.calculateUTF8Bytes=function(e){return K.calculateUTF16asUTF8(W(e))[1]},G.calculateString=G.calculateUTF8Bytes,V.readUTF8String=function(e,t,n){"number"==typeof t&&(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),void 0===t&&(t=G.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i=0,a=n;if(t===G.METRICS_CHARS){var o,s=Y();if(K.decodeUTF8((0,M.default)(o=function(){return i>>=0,n<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var l=n+e;if(K.decodeUTF8toUTF16((0,M.default)(t=function(){return n>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e),this.noAssert)[1],a=G.calculateVarint32(i);t+=a+i;var o=this.buffer.byteLength;if(ot?o:t),t-=a+i,t+=this.writeVarint32(i,t),K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),t!==r+i+a)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+i+a));return n?(this.offset=t,this):t-r},V.readVString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,r=this.readVarint32(e),r=this.readUTF8String(r.value,G.METRICS_BYTES,e+=r.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},V.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof G||(e=G.wrap(e,t));var i=e.limit-e.offset;return i<=0||(n+=i,t=this.buffer.byteLength,tn?t:n),n-=i,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=i,r&&(this.offset+=i)),this},V.appendTo=function(e,t){return e.append(this,t),this},V.assert=function(e){return this.noAssert=!e,this},V.capacity=function(){return this.buffer.byteLength},V.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},V.clone=function(e){var t=new G(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},V.compact=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=H,this.view=null,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(n),i=new Uint8Array(r);return i.set(this.view.subarray(e,t)),this.buffer=r,this.view=i,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},V.copy=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new G(0,this.littleEndian,this.noAssert);var n=t-e,r=new G(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,0<=r.markedOffset&&(r.markedOffset-=e),this.copyTo(r,0,e,t),r},V.copyTo=function(e,t,n,r){var i,a;if(!this.noAssert&&!G.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(a=void 0===t)?e.offset:0|t,n=(i=void 0===n)?this.offset:0|n,r=void 0===r?this.limit:0|r,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var o=r-n;return 0===o?e:(e.ensureCapacity(t+o),e.view.set(this.view.subarray(n,r),t),i&&(this.offset+=o),a&&(e.offset+=o),this)},V.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},V.fill=function(e,t,n){var r=void 0===t;if(r&&(t=this.offset),"string"==typeof e&&0>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(n<=t)return this;for(;t>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},V.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},V.LE=function(e){return this.littleEndian=void 0===e||!!e,this},V.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},V.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof G||(e=G.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;var a,o=i-n;return 0>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||(0,r.default)(Array.prototype).call(this.view.subarray(e,t)),this},V.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},V.slice=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},V.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,t<0||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}return e||0!==t||n!==this.buffer.byteLength?t===n?H:(e=new ArrayBuffer(n-t),new Uint8Array(e).set(new Uint8Array(this.buffer).subarray(t,n),0),e):this.buffer},V.toArrayBuffer=V.toBuffer,V.toString=function(e,t,n){if(void 0===e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(e="utf8",t=e,n=t),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var Z=function(){for(var e={},i=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],o=[],t=0,n=i.length;t>2&63]),r=(3&n)<<4,null!==(n=e())?(r|=n>>4&15,t(i[63&(r|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(t(i[63&(r|n>>6&3)]),t(i[63&n])):(t(i[63&r]),t(61))):(t(i[63&r]),t(61),t(61))},e.decode=function(e,t){var n,r,i;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(r=o[n],void 0===r&&a(n),null!==(n=e())&&(i=o[n],void 0===i&&a(n),t(r<<2>>>0|(48&i)>>4),null!==(n=e()))){if(r=o[n],void 0===r){if(61===n)break;a(n)}if(t((15&i)<<4>>>0|(60&r)>>2),null!==(n=e())){if(i=o[n],void 0===i){if(61===n)break;a(n)}t((3&r)<<6>>>0|i)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();V.toBase64=function(e,t){var n;if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity||tthis.capacity()||t":i+=n===this.markedOffset?"'":e||0!==n&&n!==r?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";o+=i+a+"\n"}return e?o:i},G.fromDebug=function(e,t,n){for(var r,i,a=e.length,o=new G((a+1)/3|0,t,n),s=0,l=0,u=!1,h=!1,c=!1,d=!1,f=!1;s":if(!n){if(d){f=!0;break}d=!0}o.limit=l,u=!1;break;case"'":if(!n){if(c){f=!0;break}c=!0}o.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!n&&u){f=!0;break}if(i=(0,w.default)(r+e.charAt(s++),16),!n&&(isNaN(i)||i<0||255>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,r=new Array(t-e);e>6&31|192):(n<65536?t(n>>12&15|224):(t(n>>18&7|240),t(n>>12&63|128)),t(n>>6&63|128)),t(63&n|128)),n=null},decodeUTF8:function(e,t){for(var n,r,i,a,o=function(e){e=(0,b.default)(e).call(e,0,(0,x.default)(e).call(e,null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0==(128&n))t(n);else if(192==(224&n))null===(r=e())&&o([n,r]),t((31&n)<<6|63&r);else if(224==(240&n))null!==(r=e())&&null!==(i=e())||o([n,r,i]),t((15&n)<<12|(63&r)<<6|63&i);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);null!==(r=e())&&null!==(i=e())&&null!==(a=e())||o([n,r,i,a]),t((7&n)<<18|(63&r)<<12|(63&i)<<6|63&a)}},UTF16toUTF8:function(e,t){for(var n,r=null;null!==(n=null!==r?r:e());)55296<=n&&n<=57343&&null!==(r=e())&&56320<=r&&r<=57343?(t(1024*(n-55296)+r-56320+65536),r=null):t(n);null!==r&&t(r)},UTF8toUTF16:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(n-=65536,t(55296+(n>>10)),t(n%1024+56320)),n=null},encodeUTF16toUTF8:function(e,t){J.UTF16toUTF8(e,function(e){J.encodeUTF8(e,t)})},decodeUTF8toUTF16:function(e,t){J.decodeUTF8(e,function(e){J.UTF8toUTF16(e,t)})},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},calculateUTF16asUTF8:function(e){var t=0,n=0;return J.UTF16toUTF8(e,function(e){++t,n+=e<128?1:e<2048?2:e<65536?3:4}),[t,n]}},J);V.toUTF8=function(t,n){if(void 0===t&&(t=this.offset),void 0===n&&(n=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}var e,r;try{K.decodeUTF8toUTF16((0,M.default)(r=function(){return t]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,FQTYPEREF:/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},ie.DotProto=function(i,a){var e={},t=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},n=t.prototype;n._readString=function(){var e='"'===this._stringOpen?a.STRING_DQ:a.STRING_SQ;e.lastIndex=this.index-1;var t=e.exec(this.source);if(!t)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,t[1]},n.next=function(){if(0=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,t,n;do{for(e=!1;a.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null}while(t=n,n=this.source.charAt(this.index),"*"!==t||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;a.DELIM.lastIndex=0;var i=a.DELIM.test(this.source.charAt(r++));if(!i)for(;r"),r=this.tn.next(),!a.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=o(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}else if(n=void 0!==n?n:this.tn.next(),"group"===n){if(t=this._parseMessage(e,i),!/^[A-Z]/.test(t.name))throw Error("illegal group name: "+t.name);i.type=t.name,i.name=t.name.toLowerCase(),this.tn.omit(";")}else{if(!a.TYPE.test(n)&&!a.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(i.type=n,r=this.tn.next(),!a.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=o(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}return e.fields.push(i),i},n._parseMessageOneOf=function(e){var t=this.tn.next();if(!a.NAME.test(t))throw Error("illegal oneof name: "+t);var n,r=t,i=[];for(this.tn.skip("{");"}"!==(t=this.tn.next());)n=this._parseMessageField(e,"optional",t),n.oneof=r,i.push(n.id);this.tn.omit(";"),e.oneofs[r]=i},n._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},n._parseEnum=function(e){var t={name:"",values:[],options:{}},n=this.tn.next();if(!a.NAME.test(n))throw Error("illegal name: "+n);for(t.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(t);else{if(!a.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:o(this.tn.next(),!0)},n=this.tn.peek();"["===n&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),(0,h.default)(t).push(r)}this.tn.omit(";"),e.enums.push(t)},n._parseExtensionRanges=function(){var e,t,n,r=[];do{for(t=[];;){switch(e=this.tn.next(),e){case"min":n=i.ID_MIN;break;case"max":n=i.ID_MAX;break;default:n=s(e)}if(t.push(n),2===t.length)break;if("to"!==this.tn.peek()){t.push(n);break}this.tn.next()}}while(r.push(t),this.tn.omit(","));return this.tn.skip(";"),r},n._parseExtend=function(e){var t=this.tn.next();if(!a.TYPEREF.test(t))throw Error("illegal extend reference: "+t);var n={ref:t,fields:[]};for(this.tn.skip("{");"}"!==(t=this.tn.next());)if(a.RULE.test(t))this._parseMessageField(n,t);else{if(!a.TYPEREF.test(t))throw Error("illegal extend token: "+t);if(!this.proto3)throw Error("illegal field rule: "+t);this._parseMessageField(n,"optional",t)}return this.tn.omit(";"),e.messages.push(n),n},n.toString=function(){return"Parser at line "+this.tn.line},e.Parser=r,e}(ie,ie.Lang),ie.Reflect=function(p){var o={},h=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},e=h.prototype;e.fqn=function(){for(var e=this.name,t=this;t=t.parent,null!=t;)e=t.name+"."+e;return e},e.toString=function(e){return(e?this.className+" ":"")+this.fqn()},e.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},o.T=h;var s=function(e,t,n,r,i){h.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=i||"proto2"},t=s.prototype=(0,E.default)(h.prototype);t.getChildren=function(e){var t;if(e=e||null,null==e)return(0,b.default)(t=this.children).call(t);for(var n=[],r=0,i=this.children.length;r>>0:t;case p.TYPES.int64:case p.TYPES.sint64:case p.TYPES.sfixed64:if(p.Long)try{return l(t,!1)}catch(e){r((0,y.default)(t),e.message)}else r((0,y.default)(t),"requires Long.js");case p.TYPES.uint64:case p.TYPES.fixed64:if(p.Long)try{return l(t,!0)}catch(e){r((0,y.default)(t),e.message)}else r((0,y.default)(t),"requires Long.js");case p.TYPES.bool:return"boolean"!=typeof t&&r((0,y.default)(t),"not a boolean"),t;case p.TYPES.float:case p.TYPES.double:return"number"!=typeof t&&r((0,y.default)(t),"not a number"),t;case p.TYPES.string:return"string"==typeof t||t&&t instanceof String||r((0,y.default)(t),"not a string"),""+t;case p.TYPES.bytes:return G.isByteBuffer(t)?t:G.wrap(t,"base64");case p.TYPES.enum:for(var e=this.resolvedType.getChildren(p.Reflect.Enum.Value),i=0;i>>0;case p.TYPES.sint32:return 0|e.readVarint32ZigZag();case p.TYPES.fixed32:return e.readUint32()>>>0;case p.TYPES.sfixed32:return 0|e.readInt32();case p.TYPES.int64:return e.readVarint64();case p.TYPES.uint64:return e.readVarint64().toUnsigned();case p.TYPES.sint64:return e.readVarint64ZigZag();case p.TYPES.fixed64:return e.readUint64();case p.TYPES.sfixed64:return e.readInt64();case p.TYPES.bool:return!!e.readVarint32();case p.TYPES.enum:return e.readVarint32();case p.TYPES.float:return e.readFloat();case p.TYPES.double:return e.readDouble();case p.TYPES.string:return e.readVString();case p.TYPES.bytes:if(i=e.readVarint32(),e.remaining()>>3;switch(r){case p.WIRE_TYPES.VARINT:for(;n=t.readUint8(),128==(128&n););break;case p.WIRE_TYPES.BITS64:t.offset+=8;break;case p.WIRE_TYPES.LDELIM:n=t.readVarint32(),t.offset+=n;break;case p.WIRE_TYPES.STARTGROUP:m(i,t);break;case p.WIRE_TYPES.ENDGROUP:if(i===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+i+" ("+e+" expected)");case p.WIRE_TYPES.BITS32:t.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+r)}return!0}e.build=function(e){if(this.clazz&&!e)return this.clazz;var t=function(c,s){var l=s.getChildren(c.Reflect.Message.Field),u=s.getChildren(c.Reflect.Message.OneOf),r=function e(t,n){c.Builder.Message.call(this);for(var r,i=0,a=u.length;i>>3,i===p.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(o=this._fieldsById[a])o.repeated&&!o.options.packed?u[o.name].push(o.decode(i,e)):(0,A.default)(o)?(s=o.decode(i,e),u[o.name].set(s[0],s[1])):(u[o.name]=o.decode(i,e),o.oneof&&(s=u[o.oneof.name],null!==s&&s!==o.name&&(u[s]=null),u[o.oneof.name]=o.name));else switch(i){case p.WIRE_TYPES.VARINT:e.readVarint32();break;case p.WIRE_TYPES.BITS32:e.offset+=4;break;case p.WIRE_TYPES.BITS64:e.offset+=8;break;case p.WIRE_TYPES.LDELIM:var h=e.readVarint32();e.offset+=h;break;case p.WIRE_TYPES.STARTGROUP:for(;m(a,e););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+i)}}for(var c=0,d=this._fields.length;c>>=3,1===u)o=this.keyElement.decode(l,e,u);else{if(2!==u)throw Error("Unexpected tag in map field key/value submessage");s=this.element.decode(l,e,u)}}return[o,s]}return this.element.decode(t,e,this.id)},o.Message.Field=u,e=function(e,t,n,r,i,a,o){u.call(this,e,t,n,null,r,i,a,o),this.extension},e.prototype=(0,E.default)(u.prototype),o.Message.ExtensionField=e,e=function(e,t,n){h.call(this,e,t,n),this.fields=[]},o.Message.OneOf=e;var a=function(e,t,n,r,i){s.call(this,e,t,n,r,i),this.className="Enum",this.object=null};a.getName=function(e,t){for(var n,r=(0,S.default)(e),i=0;i=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+o.name+": "+t.id+" (not within valid ranges)")}var e=t.name;this.options.convertFieldsToCamelCase&&(e=$.Util.toCamelCase(e));var r=new te.Message.ExtensionField(this,o,t.rule,t.type,this.ptr.fqn()+"."+e,t.id,t.options),e=new te.Extension(this,this.ptr,t.name,r);r.extension=e,this.ptr.addChild(e),o.addChild(r)},this);else if(!/\.?google\.protobuf\./.test(r.ref))throw Error("extended message "+r.ref+" is not defined")}r=null,o=null}e=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},n.import=function(t,e){var n="/";if("string"==typeof e){if($.Util.IS_NODE&&(e=le(207).resolve(e)),!0===this.files[e])return this.reset();this.files[e]=!0}else if("object"===(0,y.default)(e)){var r,i=e.root;if($.Util.IS_NODE&&(i=le(207).resolve(i)),(0<=(0,x.default)(i).call(i,"\\")||0<=(0,x.default)(r=e.file).call(r,"\\"))&&(n="\\"),i=i+n+e.file,!0===this.files[i])return this.reset();this.files[i]=!0}if(t.imports&&0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function M(e,t){if(e){if("string"==typeof e)return T(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function k(e,t){if(e){if("string"==typeof e)return P(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.x&&(this.minX=e.x),this.maxXe.y&&(this.minY=e.y),this.maxYe.maxX||this.minY>e.maxY||this.maxXn&&!a.warned&&(a.warned=!0,n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit"),n.name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,o(n))),e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){return e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=f.bind(e),t.listener=n,e.wrapFn=t,t}function m(e,t,n){return e=e._events,void 0===e?[]:(t=e[t],void 0===t?[]:"function"==typeof t?n?[t.listener||t]:[t]:n?_(t):g(t,t.length))}function v(e){var t=this._events;if(void 0!==t){if(e=t[e],"function"==typeof e)return 1;if(void 0!==e)return e.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r>2&3},set:function(e){this._type|=e<<2}},{key:"tempType",get:function(){return this._type>>4&3},set:function(e){this._type|=e<<4}},{key:"through",get:function(){return 16&this._type?1:0},set:function(e){e?this._type|=16:this._type&=-17}},{key:"setRoad",value:function(e){this.Id=e.Id,this.startId=e.startId,this.startPoint=(0,a.default)({},e.startPoint),this.endId=e.endId,this.endPoint=(0,a.default)({},e.endPoint),this.length=e.length,this._type=e._type,this.pointVector=[],this.extentId=e.extentId;for(var t=0;tthis._maxRoadId&&(this._maxRoadId=this.roadVector[t].Id),t++);for(var n,r=0;rthis._maxNodeId&&(this._maxNodeId=this.nodeVector[r].Id),r++)}},{key:"consoleAdjList",value:function(e){if(e){var t,n=this.adjList,r=(this.nodeVector,this),i=(naviMap.size(),"********* ADJLIST ************\n");for(t in(0,f.default)(n))for(var a=(0,f.default)(n)[t],o=a,s=n.get(a),l=0;lm.default.calcPolygonArea2d(i.points)&&(t=i,n=m.default.calcPolygonArea2d(i.points))}return t}},{key:"getZoneIdByPoint",value:function(e){for(var t=-1,n=0;nv+c._dist?(m._dist=v+c._dist,m._vPre=[],m._vPre.push(h),s.push(e.nodeVector[g]),(0,w.default)(s).call(s,l)):Math.abs(m._dist-(v+c._dist))<1e-12&&-1!=(0,x.default)(v=m._vPre).call(v,h)&&m._vPre.push(h)))}}}}}return!(oi;)o(r,n=t[i++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var l=n(43),u=n(46),h=n(102),n=function(s){return function(e,t,n){var r,i=l(e),a=u(i.length),o=h(n,a);if(s&&t!=t){for(;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n>=1;return n},y=function(e,t,n){for(var r=0;r<4;r++)e[0+r]^=t[16*n+4*r],e[4+r]^=t[16*n+4*r+1],e[8+r]^=t[16*n+4*r+2],e[12+r]^=t[16*n+4*r+3]},_=function(e){for(var t,n,r,i=1;i<4;i++)for(n=0;n>4,r=15&e[4*i+t],e[4*i+t]=o[16*n+r]},w=function(e){for(var t=0;t<4;t++)e[t]=a[16*((240&e[t])>>4)+(15&e[t])]},b=function(e){return(0,s.default)(e,16)},{decryption:function(e,t){for(var n=Array(16),r=0;r<16;r++)n[r]=16*b(t.substr(2*r,1))+b(t.substr(2*r+1,1));for(var i=Array(16),r=0;r<16;r++)i[r]=16*b(e.substr(2*r,1))+b(e.substr(2*r+1,1));var a=Array(16);switch(r=[],n.length){default:case 16:p=4,m=10;break;case 24:p=6,m=12;break;case 32:p=8,m=14}for(var o=r=Array(16*(m+1)),s=Array(4),l=4*(m+1),u=0;u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function S(e,t){if(e){if("string"==typeof e)return A(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne[1].x&&(e[1].x=l[u])):(l[u]e[1].y&&(e[1].y=l[u]))}return e}}]),i}(o.default),t.default=o},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.netArea=t.LayerOrder=t.Prop2Alias=t.AliasLayerMap=t.LayerAlias=void 0;var a=i(n(197)),o=i(n(213)),s=i(n(488)),l=i(n(489)),u=i(n(217)),h=i(n(219)),c=i(n(221)),d=i(n(223)),f=i(n(224)),p=i(n(494)),m=i(n(225)),v=i(n(496)),g=i(n(497)),y=i(n(227)),r=i(n(498)),i=i(n(499)),n=["extent","model","label","facility","line","locationMarker","text","textMarker","polygonMarker","gradientPolygonMarker","extrudeMarker","imageMarker","stair","externalModel","heatmap","dynmodel","symbol","domMarker","waterMarker","dynline"];t.LayerAlias=n,a=new a.default,t.AliasLayerMap=a,a.set("extent",o.default),a.set("externalModel",s.default),a.set("model",l.default),a.set("label",u.default),a.set("facility",h.default),a.set("imageMarker",c.default),a.set("polygonMarker",d.default),a.set("textMarker",f.default),a.set("stair",p.default),a.set("heatmap",m.default),a.set("symbol",v.default),a.set("domMarker",g.default),a.set("dynmodel",y.default),a.set("waterMarker",r.default),a.set("dynline",i.default),i={extentLayer:"extent",externalModelLayer:"externalModel",labelLayer:"label",modelLayer:"model",poiLayer:"facility",stairLayer:"stair"},t.Prop2Alias=i,i={extent:0,line:2,model:1,externalModel:.5,heatmap:3,polygonMarker:4,gradientPolygonMarker:4,extrudeMarker:4,location:4,facility:3.5,label:4,imageMarker:4,textMarker:4,domMarker:4,waterMarker:3,dynmodel:.5,dynline:2},t.LayerOrder=i,i="https://www.fengmap.com/",t.netArea=i},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(487));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(i,e);var r=f(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this,"extentLayer"),n._scene=new fm.Scene,n._scene.name="extent",n._scene.userData.type="extent",n._extents={},n.initNode(e,t),n._visible=!0,n.initLight(),n.putLight(),n}return(0,l.default)(i,[{key:"initLight",value:function(){this._ambientLight=new fm.AmbientLight(7631988),this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.castShadow=!1,this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"initNode",value:function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function T(e,t){if(e){if("string"==typeof e)return E(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn[1].distance&&(a=null,a=n.shift(),n.push(a)):o.distancen.times?o.stopJump():(t%=n.all,t>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=t/n.halfDuration-1,t=1-t*t,o._renderNode.position.y=o._origonY+r*t))):a.off("frameLoop",o.jumpEvent)},a.on("frameLoop",this.jumpEvent)))}},{key:"stopJump",value:function(){var e;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(v.default),e=(0,l.default)(e),e.off("frameLoop",this.jumpEvent))}},{key:"boost",value:function(e){var n,r,i,a=this;this._renderNode&&!this._isBoosting&&(this._isBoosting=!0,n=(0,s.default)({size:8,ratio:0,duration:1,delay:0},e),"number"==typeof n.size&&"number"==typeof n.ratio&&"number"==typeof n.duration&&"number"==typeof n.delay&&(n.duration*=1e3,n.delay*=1e3,n.all=n.duration+n.delay,n.halfDuration=n.duration/2,r=n.size-this._size,this._origonSize=this._size,e=this.findParent(v.default),i=(0,l.default)(e),this.boostEvent=function(e){var t;a._renderNode?(t=(new Date).getTime(),t=Math.sin(t*n.ratio)/2+.5,a._size=a._origonSize+t*r,a.setSize()):i.off("frameLoop",a.boostEvent)},i.on("frameLoop",this.boostEvent)))}},{key:"stopBoost",value:function(){var e;this._renderNode&&this.boostEvent&&(this._size=this._origonSize,this._isBoosting=!1,e=this.findParent(v.default),e=(0,l.default)(e),e.off("frameLoop",this.boostEvent),this.setSize())}},{key:"initSprite",value:function(e,t){this._renderNode=new g.default(e),this._renderNode.mapNode=this,this._renderNode.frustumCulled=!1,this._renderNode.position.copy(t),this._renderNode.parent=this.parent.scene,this.renderNodeInited=!0,this._renderNode.visible=this.show,this._renderNode.name="spirit"}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this.renderNodeInited=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"setByTheme",value:function(e){var t;this._renderNode&&(t=this.findParent(v.default),e=t.materialManager.createPoiMaterial(e),this._renderNode.material.dispose(),this._renderNode.material=e)}},{key:"setSize",value:function(){var e=this.findParent(v.default);e&&(0,l.default)(e).renderer.setFacilitySize(this._renderNode,this._size)}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this.geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,o.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&(this._renderNode&&this.parent.scene.add(this._renderNode),this.setSize()):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode&&(this._renderNode.parent=this.parent.scene)),this._visible=e,this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=(0,u.default)(e)}},{key:"mapCoord",get:function(){var e=(0,l.default)(this.parent.parent.parent.parent).dataManager.file_ver,t=this;if(t){if(t.renderNodeInited)return{x:t.x,y:t.y,z:this.height};var n=null,n=1===e?y.default.convertGeo2Points(t.gdata.geo):y.default.convertArrayPoints(t.gdata.idxs,t.gdata.pts);return{x:n.vertices[0].x,y:n.vertices[0].y,z:this.height}}return{x:null,y:null,z:null}}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(15)),p=c(n(34)),m=c(n(2)),v=c(n(3)),g=c(n(5)),y=c(n(6)),_=c(n(7)),n=c(n(222));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e<0?1:e+1}},{key:"generateUUID",value:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);var n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0,a=4294967295*Math.random()|0,a=e[255&n]+e[n>>8&255]+e[n>>16&255]+e[n>>24&255]+"-"+e[255&r]+e[r>>8&255]+"-"+e[r>>16&15|64]+e[r>>24&255]+"-"+e[63&i|128]+e[i>>8&255]+"-"+e[i>>16&255]+e[i>>24&255]+e[255&a]+e[a>>8&255]+e[a>>16&255]+e[a>>24&255];return a.toUpperCase()}}]),e}();t.FMMathUtils=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(r,e);var n=h(r);function r(){(0,o.default)(this,r);var e=n.call(this),t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new fm.InterleavedBuffer(t,5);return e.setIndex([0,1,2,0,2,3]),e.setAttribute("position",new fm.InterleavedBufferAttribute(t,3,0,!1)),e.setAttribute("uv",new fm.InterleavedBufferAttribute(t,2,3,!1)),e}return r}(fm.BufferGeometry),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(13)),g=i(n(64)),y=i(n(145)),_={};function a(e){this.manager=void 0!==e?e:fm.DefaultLoadingManager}(0,r.default)(a.prototype,{load:function(o,e,t,n){void 0===o&&(o=""),void 0!==this.path&&(o=this.path+o),o=this.manager.resolveURL(o);var s=this,r=fm.Cache.get(o);if(void 0!==r)return s.manager.itemStart(o),(0,g.default)(function(){e&&e(r),s.manager.itemEnd(o)},0),r;if(void 0===_[o]){var i=/^data:(.*?)(;base64)?,(.*)$/,a=o.match(i);if(a){var l=a[1],i=!!a[2],u=a[3],u=decodeURIComponent(u);i&&(u=atob(u));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var c=new Uint8Array(u.length),d=0;d=2.0 are supported. Use LegacyGLTFLoader instead."));else{if(s.extensionsUsed)for(var l=0;l",o).replace("#include ",s).replace("#include ",l).replace("#include ",u).replace("#include ",t);return delete a.roughness,delete a.metalness,delete a.roughnessMap,delete a.metalnessMap,a.specular={value:(new fm.Color).setHex(1118481)},a.glossiness={value:.5},a.specularMap={value:null},a.glossinessMap={value:null},e.vertexShader=i.vertexShader,e.fragmentShader=t,e.uniforms=a,e.defines={STANDARD:""},e.color=new fm.Color(1,1,1),e.opacity=1,t=[],(0,h.default)(r.diffuseFactor)&&(a=r.diffuseFactor,e.color.fromArray(a),e.opacity=a[3]),void 0!==r.diffuseTexture&&t.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new fm.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new fm.Color(1,1,1),(0,h.default)(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture&&(r=r.specularGlossinessTexture,t.push(n.assignTexture(e,"glossinessMap",r)),t.push(n.assignTexture(e,"specularMap",r))),g.default.all(t)},createMaterial:function(e){var t=new fm.ShaderMaterial({defines:e.defines,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,fog:!0,lights:!0,opacity:e.opacity,transparent:e.transparent});return t.isGLTFSpecularGlossinessMaterial=!0,t.color=e.color,t.map=void 0===(0,f.default)(e)?null:(0,f.default)(e),t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t.extensions.derivatives=!0,t},cloneMaterial:function(e){var t=e.clone();t.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function S(e,t){if(e){if("string"==typeof e)return A(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 模型加载失败!",e)})):console.error("外部模型加载器缺失")}},{key:"lookAt",value:function(e){var t,n;this.parent&&this.parent.parent?(n=this._map.center,t=this.parent.parent.height,n=new fm.Vector3(e.x-n.x,t+e.z,-e.y+n.y),this._renderNode.lookAt(n)):console.warn("请将模型加载进入地图!")}},{key:"setPosition",value:function(e,t,n,r){var i=this._mapCenter;this._height=r,this._x=e,this._y=t,this._renderNode.position.set(this._x-i.x,this._height,i.y-this._y)}},{key:"rotateTo",value:function(t){var n=this,e=this._renderNode.rotation.y,r=t.to%360*fm.Math.DEG2RAD;this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var i=new M.default({angle:e},{angle:r},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(i),n.rotateAnimater=null,t.callback&&t.callback()},function(e){n._renderNode.rotation.y=e.angle,t.update&&t.update()}).start();this._map.addAnimater(i),this.rotateAnimater=i}},{key:"setRotate",value:function(e){this._renderNode.rotation.y=e%360*fm.Math.DEG2RAD}},{key:"setScale",value:function(e){for(var t=this._renderNode.children,n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function T(e,t){if(e){if("string"==typeof e)return E(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn.times?o.stopJump():(t%=n.all,t>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=t/n.halfDuration-1,t=1-t*t,o._renderNode.position.y=o._origonY+r*t))):a.off("frameLoop",o.jumpEvent)},a.on("frameLoop",this.jumpEvent)))}},{key:"stopJump",value:function(){var e;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(p.default),e=(0,s.default)(e),e.off("frameLoop",this.jumpEvent))}},{key:"url",get:function(){return this._url},set:function(e){var t=this.findParent(p.default);if(!t)return!1;t=t.materialManager.createPoiMaterial({imageUrl:e,imageSrc:e,alpha:1}),t.userData.size=this._size,this._renderNode.material.dispose(),this._renderNode.material=t,this._url=e}},{key:"setSize",value:function(){var e=this.findParent(p.default);(0,s.default)(e).renderer.setFacilitySize(this._renderNode,this._size)}},{key:"getCenterByAnchor",value:function(e){var t=new fm.Vector2(.5,.5);switch(e){case _.default.LEFT:t.setX(0);break;case _.default.RIGHT:t.setX(1);break;case _.default.TOP:t.setY(1);break;case _.default.BOTTOM:t.setY(0);break;case _.default.LEFT_TOP:t.set(0,1);break;case _.default.RIGHT_TOP:t.set(1,1);break;case _.default.LEFT_BOTTOM:t.set(0,0);break;case _.default.RIGHT_BOTTOM:t.set(1,0)}return t}},{key:"visible",set:function(e){var t;e?(0,o.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):this._renderNode&&this.parent.scene.remove(this._renderNode),this._visible=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=e}},{key:"height",set:function(e){this._height=e,this._renderNode.position.y=this._height}}]),i}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),r=a(n(17)),c=a(n(547)),d=a(n(36)),f=a(n(78)),p=n(67);function m(n){var r=v();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function v(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,l.default)(i,e);var r=m(i);function i(e,t){var n;return(0,o.default)(this,i),n=r.call(this,0,d.default.LOCATION_MARKER),n._map=e,n._size=t.size||20,n._map.wxInfo.pixelRatio&&(n._size*=n._map.wxInfo.pixelRatio),n._url=t.url,n._groupId=t.groupID||1,n._x=t.x||n._x,n._y=t.y||n._y,n._dheight=t.height||2.1,n._gid=t.groupID||1,n._scene=null,n._renderNode=null,n._callBack=t.callback,n.rotateAnimater=null,n}return(0,s.default)(i,[{key:"initSprite",value:function(e){var t=this,n=new c.default,r=new fm.MeshBasicMaterial,i=!0;return e.materialManager.loadTexture(this._url,function(e){e.minFilter=fm.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,r.map=e,r.needsUpdate=!0,t._renderNode?(t.picLoading=!1,t._renderNode.layers.set(0)):i=!1}),r.side=2,r.transparent=!0,this._renderNode=new fm.Mesh(n,r),this._renderNode.mapNode=this,i&&(this.picLoading=!0,this._renderNode.layers.set(2)),n=this._scene.mapcenter,this._x&&this._y||(this._x=n.x,this._y=n.y),this._callBack&&this._callBack(this),this.setPosition({x:this._x,y:this._y}),!0}},{key:"setPosition",value:function(e){if(this._scene){void 0!==e.zOffset&&(this._dheight=e.zOffset),void 0!==e.height&&(this._dheight=e.height);var t=this._scene.groups[this._gid];if(e.groupID&&e.groupID!==this._gid){var n=t,r=this._scene.groups[e.groupID];if(!r)return void console.warn(p.tileMessage.noGroup);n.removeLocation(this),r.addLocation(this),t=r,this.isAlwaysShow&&this.alwaysShow(),this._gid=e.groupID,this._groupId=this._gid}t=this._scene.mapcenter,this._x=e.x,this._y=e.y,this._renderNode.position.set(this._x-t.x,this._dheight,-this._y+t.y)}else console.error("Can't change position before map init Marker")}},{key:"rotate",value:function(e){this._renderNode.rotation.y=e*fm.Math.DEG2RAD}},{key:"rotateTo",value:function(t){var n=this,e=this.renderNode.rotation.y,r=t.to%360*fm.Math.DEG2RAD,i=r,a=0;r-e!=0&&(a=Math.sin(r-e)/Math.abs(Math.sin(r-e))*Math.acos(Math.cos(r-e))),a=e+a,this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var o=new f.default({angle:e},{angle:a},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(o),n.rotateAnimater=null,n._renderNode.rotation.y=i,t.callback&&t.callback()},function(e){n._renderNode.rotation.y=e.angle,t.update&&t.update()}).start();this._map.addAnimater(o),this.rotateAnimater=o}},{key:"moveTo",value:function(t){var e,n,r,i=this;this._isRuning||(e=t.x,n=t.y,r=new f.default({x:this._x,y:this._y},{x:e,y:n},t.time?1e3*t.time:500,function(){i._map.removeAnimater(r),i._isRuning=!1,t.callback&&t.callback()},function(e){i.setPosition({x:e.x,y:e.y,groupID:0,height:i._dheight}),t.update&&t.update(e)}).start(),this._isRuning=!0,this._map.addAnimater(r))}},{key:"alwaysShow",value:function(){var e;this._alwaysShow=!0;for(var t=this.parent;t;){if(t.isGroup){e=t;break}t=t.parent}e&&this.renderNode&&(this.renderNode.material.depthTest=!1,e.alwaysShowMarkers.push(this.renderNode))}},{key:"dispose",value:function(){this.parent&&this.parent.removeLocation(this),this.parent=null,this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"direction",get:function(){return this.renderNode.rotation.y},set:function(e){this.renderNode.rotation.y=e*fm.Math.DEG2RAD}},{key:"scene",set:function(e){this._scene=e}},{key:"map",set:function(e){this._map=e}},{key:"size",get:function(){return this._size}},{key:"renderNode",get:function(){return this._renderNode}},{key:"groupID",get:function(){return this._groupId}},{key:"height",get:function(){return this._dheight}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={FULL:"full",DOTTED:"dotted",DOT_DASH:"dotDash",CENTER:"center",DASH:"dash",DOUBLE_DOT_DASH:"doubleDotDash",TRI_DOT_DASH:"triDotDash",NORMAL:"normal",ARROW:"arrow",RAW:"raw",FMARROW:"fmarrow",TEXTURE:"texture"},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(91)),n=i(n(60));fm.UniformsLib.line={linewidth:{value:1},resolution:{value:new fm.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},mmap:{value:null},offset:{value:new fm.Vector2(0,0)},repeat:{value:new fm.Vector2(1,1)},miny:{value:0},pcolor:{value:new fm.Color(11447982)}},fm.ShaderLib.line={uniforms:fm.UniformsUtils.merge([fm.UniformsLib.common,fm.UniformsLib.fog,fm.UniformsLib.line]),vertexShader:"\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute float uvyStart;\n\t\tattribute float uvyEnd;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\t\tattribute vec2 uv2;\n\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vUv2;\n\t\tvarying float uvScale;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\t\t\t\n\t\t\tfloat duvy = uvyEnd - uvyStart;\n\t\t\tfloat uvy = uvyStart + duvy * uv2.y;\n\t\t\t// vUv2 = vec2(uv2.x ,uvy);\n\t\t\tvUv2 = ( position.y < 0.5 ) ? vec2(uv2.x ,uvyStart) : vec2(uv2.x ,uvyEnd);\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tfloat scaleDir = length(dir);\n\t\t\tuvScale = 0.05/scaleDir;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include \n\t\t\t\n\t\t\t#include \n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\t\tuniform vec2 repeat;\n\t\tuniform vec2 offset;\n\t\tuniform float miny;\n\t\tuniform vec3 pcolor;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\t\t\n\t\t\n\n\t\t\tuniform sampler2D mmap;\n\n\t\n\n\t\tvarying float vLineDistance;\n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tvarying float uvScale;\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vUv2;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\t// if ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t// \tfloat a = vUv.x;\n\t\t\t// \tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t// \tfloat len2 = a * a + b * b;\n\n\t\t\t// \tif ( len2 > 1.0 ) discard;\n\n\t\t\t// }\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t\n\t\t\t#ifdef USE_MMAP\n\t\t\t\n\t\t\t\tif(vUv2.y>miny){\t\t\t\t\n\t\t\t\tdiffuseColor = texture2D( mmap, vUv2 * repeat + offset );\n\t\t\t\t}else{\n\t\t\t\t\tdiffuseColor = vec4(pcolor,1.0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t#endif\n\n\t\t\t#include \n\t\t\tgl_FragColor = diffuseColor;\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\n\t\t}\n\t\t"},fm.LineMaterial=function(e){fm.ShaderMaterial.call(this,{type:"LineMaterial",uniforms:fm.UniformsUtils.clone(fm.ShaderLib.line.uniforms),vertexShader:fm.ShaderLib.line.vertexShader,fragmentShader:fm.ShaderLib.line.fragmentShader}),this.dashed=!1,(0,a.default)(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)},fm.LineMaterial.prototype=(0,n.default)(fm.ShaderMaterial.prototype),fm.LineMaterial.prototype.constructor=fm.LineMaterial,fm.LineMaterial.prototype.isLineMaterial=!0,fm.LineMaterial.prototype.copy=function(e){return fm.ShaderMaterial.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.resolution=e.resolution,this},n=fm.LineMaterial,t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),c=a(n(250));function d(n){var r=f();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function f(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=d(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e.type="LineGeometry",e.isLineGeometry=!0,e}return(0,s.default)(n,[{key:"setPositions",value:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;rm.default&&(a=Math.sqrt(a),r=Math.atan2(a,r*i),n=Math.sin(n*r)/a,o=Math.sin(o*r)/a),i*=o,s=s*n+c*i,l=l*n+d*i,u=u*n+f*i,h=h*n+p*i,n===1-o&&(o=1/Math.sqrt(s*s+l*l+u*u+h*h),s*=o,l*=o,u*=o,h*=o)),e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,i.default)(o.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),(0,t.default)(o.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),e=o(r/2),o=o(i/2),n=s(n/2),r=s(r/2),i=s(i/2);return"XYZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"YXZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"ZXY"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"ZYX"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"YZX"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o-n*r*i):"XZY"===a&&(this._x=n*e*o-l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o+n*r*i),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,t=Math.sin(n);return this._x=e.x*t,this._y=e.y*t,this._z=e.z*t,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],e=n[10],n=r+s+e;return 0Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),this._w=r,this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(a._Math.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);return 0===n||(n=Math.min(1,t/n),this.slerp(e,n)),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,e=t._z,t=t._w;return this._x=n*t+a*o+r*e-i*s,this._y=r*t+a*s+i*o-n*e,this._z=i*t+a*e+n*s-r*o,this._w=a*t-n*o-r*s-i*e,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=n,this._y=r,this._z=i,this;if(e=1-o*o,e<=m.default){var s=1-t;return this._w=s*a+t*this._w,this._x=s*n+t*this._x,this._y=s*r+t*this._y,this._z=s*i+t*this._z,this.normalize(),this._onChangeCallback(),this}return s=Math.sqrt(e),e=Math.atan2(s,o),o=Math.sin((1-t)*e)/s,s=Math.sin(t*e)/s,this._w=a*o+this._w*s,this._x=n*o+this._x*s,this._y=r*o+this._y*s,this._z=i*o+this._z*s,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}})},function(H,e,j){"use strict";!function(e,m){var v=j(120);H.exports=f;var a,r=j(257);f.ReadableState=d,j(160).EventEmitter;var g=function(e,t){return e.listeners(t).length},n=j(258),s=j(121).Buffer,t=e.Uint8Array||function(){};function l(e){return s.from(e)}function i(e){return s.isBuffer(e)||e instanceof t}var o=Object.create(j(96));o.inherits=j(79);var u,e=j(580),y=void 0,y=e&&e.debuglog?e.debuglog("stream"):function(){},h=j(581),e=j(260);o.inherits(f,n);var c=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function d(e,t){a=a||j(70),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,t=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:t,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u=u||j(261).StringDecoder,this.decoder=new u(e.encoding),this.encoding=e.encoding)}function f(e){if(a=a||j(70),!(this instanceof f))return new f(e);this._readableState=new d(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function p(e,t,n,r,i){var a,o=e._readableState;return null===t?(o.reading=!1,S(e,o)):(i||(a=w(o,t)),a?e.emit("error",a):o.objectMode||t&&0>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e,t){var n;t.ended||(t.decoder&&(n=t.decoder.end(),n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)),t.ended=!0,A(e))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?v.nextTick(I,e):I(e))}function I(e){y("emit readable"),e.emit("readable"),D(e)}function L(e,t){t.readingMore||(t.readingMore=!0,v.nextTick(R,e,t))}function R(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=B(e,t.buffer,t.decoder),n);var n}function B(e,t,n){var r;return ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function U(e,t){var n=s.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function z(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return y("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?z:A)(this),null;if(e=E(e,t),0===e&&t.ended)return 0===t.length&&z(this),null;var r=t.needReadable;return y("need readable",r),(0===t.length||t.length-e=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),c.alloc(+e)}function y(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0}}function _(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e=e||"utf8";;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i)for(var u=-1,h=n;h>>10&1023|55296),h=56320|1023&h),r.push(h),i+=c}return k(r)}ee.Buffer=c,ee.SlowBuffer=g,ee.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:t(),ee.kMaxLength=n(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return s(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return u(null,e,t,n)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);it&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,s=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),h=0;hthis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var a=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function k(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);for(var n="",r=0;re.length)throw new RangeError("Index out of range")}function U(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function G(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,n,r,23,4),n+4}function H(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):n>>8):U(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){e=+e,t|=0,r||(r=Math.pow(2,8*n-1),F(this,e,t,n,r-1,-r));var i=0,a=1,o=0;for(this[t]=255&e;++i>0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){e=+e,t|=0,r||(r=Math.pow(2,8*n-1),F(this,e,t,n,r-1,-r));var i=n-1,a=1,o=0;for(this[t+i]=255&e;0<=--i&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),t=t||0,0=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e=e||0,"number"==typeof e)for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Z(e){for(var t=[],n=0;n>8,r%=256,i.push(r),i.push(n);return i}function K(e){return r.toByteArray(W(e))}function Q(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e){return e!=e}}.call(this,te(49))},function(e,t,n){"use strict";var a=n(120);function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||a.nextTick(o,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(a.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}e.exports={destroy:r,undestroy:i}},function(e,t,n){"use strict";var r=n(121).Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=a(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=v,this.end=g,t=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e,t,n){var r=t.length-1;if(r=t.length&&(t=(0,a.default)(t).call(t,n),n=0),e}},this.peek=function(){return 0>8&255]+Ar[e>>16&255]+Ar[e>>24&255]+"-"+Ar[255&t]+Ar[t>>8&255]+"-"+Ar[t>>16&15|64]+Ar[t>>24&255]+"-"+Ar[63&n|128]+Ar[n>>8&255]+"-"+Ar[n>>16&255]+Ar[n>>24&255]+Ar[255&r]+Ar[r>>8&255]+Ar[r>>16&255]+Ar[r>>24&255];return r.toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*(3-2*e))},smootherstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*e*(e*(6*e-15)+10))},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Rr.DEG2RAD},radToDeg:function(e){return e*Rr.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,o=Math.sin,s=a(n/2),l=o(n/2),u=a((t+r)/2),h=o((t+r)/2),c=a((t-r)/2),n=o((t-r)/2),a=a((r-t)/2),t=o((r-t)/2);"XYX"===i?e.set(s*h,l*c,l*n,s*u):"YZY"===i?e.set(l*n,s*h,l*c,s*u):"ZXZ"===i?e.set(l*c,l*n,s*h,s*u):"XZX"===i?e.set(s*h,l*t,l*a,s*u):"YXY"===i?e.set(l*a,s*h,l*t,s*u):"ZYZ"===i?e.set(l*t,l*a,s*h,s*u):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function Nr(e,t){this.x=e||0,this.y=t||0}function kr(){this.elements=[1,0,0,0,1,0,0,0,1],0ne.default&&(a=Math.sqrt(a),r=Math.atan2(a,r*i),n=Math.sin(n*r)/a,o=Math.sin(o*r)/a),i*=o,s=s*n+c*i,l=l*n+d*i,u=u*n+f*i,h=h*n+p*i,n===1-o&&(o=1/Math.sqrt(s*s+l*l+u*u+h*h),s*=o,l*=o,u*=o,h*=o)),e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,u.default)(Ur.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),(0,je.default)(Ur.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),e=o(r/2),o=o(i/2),n=s(n/2),r=s(r/2),i=s(i/2);return"XYZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"YXZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"ZXY"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"ZYX"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"YZX"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o-n*r*i):"XZY"===a&&(this._x=n*e*o-l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o+n*r*i),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,t=Math.sin(n);return this._x=e.x*t,this._y=e.y*t,this._z=e.z*t,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],e=n[10],n=r+s+e;return 0Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),this._w=r,this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(Rr.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);return 0===n||(n=Math.min(1,t/n),this.slerp(e,n)),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,e=t._z,t=t._w;return this._x=n*t+a*o+r*e-i*s,this._y=r*t+a*s+i*o-n*e,this._z=i*t+a*e+n*s-r*o,this._w=a*t-n*o-r*s-i*e,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=n,this._y=r,this._z=i,this;if(e=1-o*o,e<=ne.default){var s=1-t;return this._w=s*a+t*this._w,this._x=s*n+t*this._x,this._y=s*r+t*this._y,this._z=s*i+t*this._z,this.normalize(),this._onChangeCallback(),this}return s=Math.sqrt(e),e=Math.atan2(s,o),o=Math.sin((1-t)*e)/s,s=Math.sin(t*e)/s,this._w=a*o+this._w*s,this._x=n*o+this._x*s,this._y=r*o+this._y*s,this._z=i*o+this._z*s,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},fromBufferAttribute:function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var zr=new Vr,Gr=new Ur;function Vr(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}(0,je.default)(Vr.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Gr.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Gr.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[3]*n+e[6]*r,this.y=e[1]*t+e[4]*n+e[7]*r,this.z=e[2]*t+e[5]*n+e[8]*r,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,e=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*e,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*e,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*e,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,e=s*r+i*n-a*t,r=-i*t-a*n-o*r;return this.x=l*s+r*-i+u*-o-e*-a,this.y=u*s+r*-a+e*-i-l*-o,this.z=e*s+r*-o+l*-a-u*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[4]*n+e[8]*r,this.y=e[1]*t+e[5]*n+e[9]*r,this.z=e[2]*t+e[6]*n+e[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,e=t.y,t=t.z;return this.x=r*t-i*e,this.y=i*a-n*t,this.z=n*e-r*a,this},projectOnVector:function(e){var t=e.lengthSq();return 0===t?this.set(0,0,0):(t=e.dot(this)/t,this.copy(e).multiplyScalar(t))},projectOnPlane:function(e){return zr.copy(this).projectOnVector(e),this.sub(zr)},reflect:function(e){return this.sub(zr.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:(t=this.dot(e)/t,Math.acos(Rr.clamp(t,-1,1)))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,e=this.z-e.z;return t*t+n*n+e*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){return e=e.elements,this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),e=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=e,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},setFromMatrix3Column:function(e,t){return this.fromArray(e.elements,3*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}});var Hr=new Vr,jr=new Jr,Wr=new Vr(0,0,0),Yr=new Vr(1,1,1),qr=new Vr,Xr=new Vr,Zr=new Vr;function Jr(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0s)return!1}return!0}(0,je.default)(Li.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=Infinity,n=Infinity,r=Infinity,i=-Infinity,a=-Infinity,o=-Infinity,s=0,l=e.length;sthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new Vr),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectsSphere:function(e){return this.clampPoint(e.center,gi),gi.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,n=0=-e.constant},intersectsTriangle:function(e){return!this.isEmpty()&&(this.getCenter(Ei),Si.subVectors(this.max,Ei),_i.subVectors(e.a,Ei),xi.subVectors(e.b,Ei),wi.subVectors(e.c,Ei),bi.subVectors(xi,_i),Mi.subVectors(wi,xi),Ti.subVectors(_i,wi),e=[0,-bi.z,bi.y,0,-Mi.z,Mi.y,0,-Ti.z,Ti.y,bi.z,0,-bi.x,Mi.z,0,-Mi.x,Ti.z,0,-Ti.x,-bi.y,bi.x,0,-Mi.y,Mi.x,0,-Ti.y,Ti.x,0],!!Ri(e,_i,xi,wi,Si)&&(e=[1,0,0,0,1,0,0,0,1],!!Ri(e,_i,xi,wi,Si)&&(Ai.crossVectors(bi,Mi),e=[Ai.x,Ai.y,Ai.z],Ri(e,_i,xi,wi,Si))))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Vr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=gi.copy(e).clamp(this.min,this.max);return t.sub(e).length()},getBoundingSphere:function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(gi).length(),e},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){return this.isEmpty()||(vi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),vi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),vi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),vi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),vi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),vi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),vi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),vi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(vi)),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Ni=new Li;function ki(e,t){this.center=void 0!==e?e:new Vr,this.radius=void 0!==t?t:0}(0,je.default)(ki.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var n=this.center;void 0!==t?n.copy(t):Ni.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new Li),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}});var Pi=new Vr,Ci=new Vr,Di=new Vr,Oi=new Vr,Bi=new Vr,Fi=new Vr,Ui=new Vr;function zi(e,t){this.origin=void 0!==e?e:new Vr,this.direction=void 0!==t?t:new Vr(0,0,-1)}(0,je.default)(zi.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new Vr),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(e){return this.origin.copy(this.at(e,Pi)),this},closestPointToPoint:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Vr),t.subVectors(e,this.origin),e=t.dot(this.direction),e<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(e).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=Pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Pi.copy(this.direction).multiplyScalar(t).add(this.origin),Pi.distanceToSquared(e))},distanceSqToSegment:function(e,t,n,r){Ci.copy(e).add(t).multiplyScalar(.5),Di.copy(t).sub(e).normalize(),Oi.copy(this.origin).sub(Ci);var i,a,o=.5*e.distanceTo(t),s=-this.direction.dot(Di),l=Oi.dot(this.direction),u=-Oi.dot(Di),h=Oi.lengthSq(),e=Math.abs(1-s*s),h=0>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(e,t,n){return e=Rr.euclideanModulo(e,1),t=Rr.clamp(t,0,1),n=Rr.clamp(n,0,1),0===t?this.r=this.g=this.b=n:(t=n<=.5?n*(1+t):n+t-n*t,n=2*n-t,this.r=oa(n,t,e+1/3),this.g=oa(n,t,e),this.b=oa(n,t,e-1/3)),this},setStyle:function(t){function e(e){void 0!==e&&(0,de.default)(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}if(l=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=l[1],i=l[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(255,(0,_.default)(n[1],10))/255,this.g=Math.min(255,(0,_.default)(n[2],10))/255,this.b=Math.min(255,(0,_.default)(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(100,(0,_.default)(n[1],10))/100,this.g=Math.min(100,(0,_.default)(n[2],10))/100,this.b=Math.min(100,(0,_.default)(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i)){var a=(0,de.default)(n[1])/360,o=(0,_.default)(n[2],10)/100,s=(0,_.default)(n[3],10)/100;return e(n[5]),this.setHSL(a,o,s)}}}else if(l=/^\#([A-Fa-f0-9]+)$/.exec(t)){var r=l[1],l=r.length;if(3===l)return this.r=(0,_.default)(r.charAt(0)+r.charAt(0),16)/255,this.g=(0,_.default)(r.charAt(1)+r.charAt(1),16)/255,this.b=(0,_.default)(r.charAt(2)+r.charAt(2),16)/255,this;if(6===l)return this.r=(0,_.default)(r.charAt(0)+r.charAt(1),16)/255,this.g=(0,_.default)(r.charAt(2)+r.charAt(3),16)/255,this.b=(0,_.default)(r.charAt(4)+r.charAt(5),16)/255,this}return t&&0t&&(t=e[n]);return t}(0,m.default)(pa.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),(0,je.default)(pa.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;rn.far?null:{distance:s,point:Ja.clone(),object:e})}function $a(e,t,n,r,i,a,o,s,l,u,h,c){Ba.fromBufferAttribute(i,u),Fa.fromBufferAttribute(i,h),Ua.fromBufferAttribute(i,c);var d=e.morphTargetInfluences;if(t.morphTargets&&a&&d){Ha.set(0,0,0),ja.set(0,0,0),Wa.set(0,0,0);for(var f=0,p=a.length;f","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},r=new fo({type:"CubemapFromEquirect",uniforms:so(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Xe,blending:ge});return r.uniforms.tEquirect.value=t,t=new Ka(new oo(5,5,5),r),n.add(t),r=new yo(1,10,1),r.renderTarget=this,r.renderTarget.texture.name="CubeCameraTexture",r.update(e,n),t.geometry.dispose(),t.material.dispose(),this},xo.prototype=(0,d.default)(Dr.prototype),xo.prototype.constructor=xo,xo.prototype.isDataTexture=!0;var wo=new ki,bo=new Vr;function Mo(e,t,n,r,i,a){this.planes=[void 0!==e?e:new ji,void 0!==t?t:new ji,void 0!==n?n:new ji,void 0!==r?r:new ji,void 0!==i?i:new ji,void 0!==a?a:new ji]}(0,je.default)(Mo.prototype,{set:function(e,t,n,r,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromProjectionMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],f=n[10],p=n[11],m=n[12],v=n[13],e=n[14],n=n[15];return t[0].setComponents(o-r,h-s,p-c,n-m).normalize(),t[1].setComponents(o+r,h+s,p+c,n+m).normalize(),t[2].setComponents(o+i,h+l,p+d,n+v).normalize(),t[3].setComponents(o-i,h-l,p-d,n-v).normalize(),t[4].setComponents(o-a,h-u,p-f,n-e).normalize(),t[5].setComponents(o+a,h+u,p+f,n+e).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),wo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(wo)},intersectsSprite:function(e){return wo.center.set(0,0,0),wo.radius=.7071067811865476,wo.applyMatrix4(e.matrixWorld),this.intersectsSphere(wo)},intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){var a=t[i].distanceToPoint(n);if(a/gm;function Uu(e){return e.replace(Fu,zu)}function zu(e,t){var n=cl[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Uu(n)}var Gu=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Vu=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function Hu(e){return e.replace(Vu,Wu).replace(Gu,ju)}function ju(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Wu(e,t,n,r)}function Wu(e,t,n,r){for(var i="",a=(0,_.default)(t);a<(0,_.default)(n);a++)i+=r.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function Yu(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function qu(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===V?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===H?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===j&&(t="SHADOWMAP_TYPE_VSM"),t}function Xu(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ue:case $e:t="ENVMAP_TYPE_CUBE";break;case rt:case it:t="ENVMAP_TYPE_CUBE_UV";break;case et:case tt:t="ENVMAP_TYPE_EQUIREC";break;case nt:t="ENVMAP_TYPE_SPHERE"}return t}function Zu(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case $e:case tt:t="ENVMAP_MODE_REFRACTION"}return t}function Ju(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case X:t="ENVMAP_BLENDING_MULTIPLY";break;case Z:t="ENVMAP_BLENDING_MIX";break;case J:t="ENVMAP_BLENDING_ADD"}return t}function Ku(e,t,n){var r,i,a=e.getContext(),o=n.defines,s=n.vertexShader,l=n.fragmentShader,u=qu(n),h=Xu(n),c=Zu(n),d=Ju(n),f=0v||x.y>v)&&(console.warn("THREE.WebGLShadowMap:",u,"has shadow exceeding max texture size, reducing"),x.x>v&&(w.x=Math.floor(v/d.x),x.x=w.x*d.x,h.mapSize.x=w.x),x.y>v&&(w.y=Math.floor(v/d.y),x.y=w.y*d.y,h.mapSize.y=w.y)),null!==(0,Ye.default)(h)||h.isPointLightShadow||this.type!==j||(c={minFilter:ft,magFilter:ft,format:kt},h.map=new Br(x.x,x.y,c),(0,Ye.default)(h).texture.name=u.name+".shadowMap",h.mapPass=new Br(x.x,x.y,c),h.camera.updateProjectionMatrix()),null===(0,Ye.default)(h)&&(c={minFilter:lt,magFilter:lt,format:kt},h.map=new Br(x.x,x.y,c),(0,Ye.default)(h).texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()),g.setRenderTarget((0,Ye.default)(h)),g.clear();for(var f=h.getViewportCount(),p=0;pr||e.height>r)&&(i=r/Math.max(e.width,e.height)),(i<1||!0===t)&&("object"!==(0,te.default)(e)?"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."):(r=t?Rr.floorPowerOfTwo:Math.floor,t=r(i*e.width),r=r(i*e.height),void 0===a&&(a=h(t,r)),i=n?h(t,r):a,i.width=t,i.height=r,n=i.getContext("2d"),n.drawImage(e,0,0,t,r),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+t+"x"+r+")."),e.src=i.toDataURL("image/png"))),e}function M(e){return Rr.isPowerOfTwo(e.width)&&Rr.isPowerOfTwo(e.height)}function f(e){return!x&&(e.wrapS!==ot||e.wrapT!==ot||e.minFilter!==lt&&e.minFilter!==ft)}function T(e,t){return e.generateMipmaps&&t&&e.minFilter!==lt&&e.minFilter!==ft}function E(e,t,n,r){v.generateMipmap(e),t=y.get(t),t.__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function S(e,t,n){if(!1===x)return t;if(null!==e){if(void 0!==v[e])return v[e];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}return e=t,6403===t&&(5126===n&&(e=33326),5131===n&&(e=33325),5121===n&&(e=33321)),6407===t&&(5126===n&&(e=34837),5131===n&&(e=34843),5121===n&&(e=32849)),6408===t&&(5126===n&&(e=34836),5131===n&&(e=34842),5121===n&&(e=32856)),33325!==e&&33326!==e&&34842!==e&&34836!==e||r.get("EXT_color_buffer_float"),e}function c(e){return e===lt||e===ut||e===ct?9728:9729}function p(e){e=e.target,e.removeEventListener("dispose",p),A(e),e.isVideoTexture&&s.delete(e),l.memory.textures--}function m(e){e=e.target,e.removeEventListener("dispose",m),I(e),l.memory.textures--}function A(e){var t=y.get(e);void 0!==t.__webglInit&&(v.deleteTexture(t.__webglTexture),y.remove(e))}function I(e){var t=y.get(e),n=y.get(e.texture);if(e){if(void 0!==n.__webglTexture&&v.deleteTexture(n.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(var r=0;r<6;r++)v.deleteFramebuffer(t.__webglFramebuffer[r]),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer[r]);else v.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer),t.__webglMultisampledFramebuffer&&v.deleteFramebuffer(t.__webglMultisampledFramebuffer),t.__webglColorRenderbuffer&&v.deleteRenderbuffer(t.__webglColorRenderbuffer),t.__webglDepthRenderbuffer&&v.deleteRenderbuffer(t.__webglDepthRenderbuffer);y.remove(e.texture),y.remove(e)}}var L=0;function R(){L=0}function N(){var e=L;return t<=e&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+t),L+=1,e}function k(e,t){var n=y.get(e);if(e.isVideoTexture&&J(e),0e.far||t.push({distance:i,point:Rh.clone(),uv:ta.getUV(Rh,Oh,Bh,Fh,Uh,zh,Gh,new Nr),face:null,object:this}))},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return pi.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var jh=new Vr,Wh=new Vr;function Yh(){pi.call(this),this._currentLevel=0,this.type="LOD",(0,u.default)(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function qh(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Ka.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Jr,this.bindMatrixInverse=new Jr}Yh.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Yh,isLOD:!0,copy:function(e){pi.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;re.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else for(f=0,p=c.length/3-1;fe.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(n.isGeometry)for(var y=n.vertices,_=y.length,f=0;f<_-1;f+=h){var x,g=sc.distanceSqToSegment(y[f],y[f+1],u,l);ae.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var hc=new Vr,cc=new Vr;function dc(e,t){uc.call(this,e,t),this.type="LineSegments"}function fc(e,t){uc.call(this,e,t),this.type="LineLoop"}function pc(e){ca.call(this),this.type="PointsMaterial",this.color=new aa(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}dc.prototype=(0,je.default)((0,d.default)(uc.prototype),{constructor:dc,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;ri.far||a.push({distance:r,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:o}))}function wc(e,t,n,r,i,a,o,s,l){Dr.call(this,e,t,n,r,i,a,o,s,l),this.format=void 0!==o?o:Nt,this.minFilter=void 0!==a?a:ft,this.magFilter=void 0!==i?i:ft,this.generateMipmaps=!1}function bc(e,t,n,r,i,a,o,s,l,u,h,c){Dr.call(this,null,a,o,s,l,u,r,i,h,c),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Mc(e,t,n,r,i,a,o,s,l){Dr.call(this,e,t,n,r,i,a,o,s,l),this.needsUpdate=!0}function Tc(e,t,n,r,i,a,o,s,l,u){if(u=void 0!==u?u:Ot,u!==Ot&&u!==Bt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ot&&(n=wt),void 0===n&&u===Bt&&(n=Lt),Dr.call(this,null,r,i,a,o,s,u,n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:lt,this.minFilter=void 0!==s?s:lt,this.flipY=!1,this.generateMipmaps=!1}function Ec(e){Pa.call(this),this.type="WireframeGeometry";var t,n,r,i,a,o,s=[],l=[0,0],u={},h=["a","b","c"];if(e&&e.isGeometry){for(var c=e.faces,d=0,f=c.length;d=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),bc.prototype=(0,d.default)(Dr.prototype),bc.prototype.constructor=bc,bc.prototype.isCompressedTexture=!0,Mc.prototype=(0,d.default)(Dr.prototype),Mc.prototype.constructor=Mc,Mc.prototype.isCanvasTexture=!0,Tc.prototype=(0,d.default)(Dr.prototype),Tc.prototype.constructor=Tc,Tc.prototype.isDepthTexture=!0,Ec.prototype=(0,d.default)(Pa.prototype),Ec.prototype.constructor=Ec,Sc.prototype=(0,d.default)(io.prototype),Sc.prototype.constructor=Sc,Ac.prototype=(0,d.default)(Pa.prototype),Ac.prototype.constructor=Ac,Ic.prototype=(0,d.default)(io.prototype),Ic.prototype.constructor=Ic,Lc.prototype=(0,d.default)(Pa.prototype),Lc.prototype.constructor=Lc,Rc.prototype=(0,d.default)(io.prototype),Rc.prototype.constructor=Rc,Nc.prototype=(0,d.default)(Lc.prototype),Nc.prototype.constructor=Nc,kc.prototype=(0,d.default)(io.prototype),kc.prototype.constructor=kc,Pc.prototype=(0,d.default)(Lc.prototype),Pc.prototype.constructor=Pc,Cc.prototype=(0,d.default)(io.prototype),Cc.prototype.constructor=Cc,Dc.prototype=(0,d.default)(Lc.prototype),Dc.prototype.constructor=Dc,Oc.prototype=(0,d.default)(io.prototype),Oc.prototype.constructor=Oc,Bc.prototype=(0,d.default)(Lc.prototype),Bc.prototype.constructor=Bc,Fc.prototype=(0,d.default)(io.prototype),Fc.prototype.constructor=Fc,Uc.prototype=(0,d.default)(Pa.prototype),Uc.prototype.constructor=Uc,Uc.prototype.toJSON=function(){var e=Pa.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},zc.prototype=(0,d.default)(io.prototype),zc.prototype.constructor=zc,Gc.prototype=(0,d.default)(Pa.prototype),Gc.prototype.constructor=Gc,Vc.prototype=(0,d.default)(io.prototype),Vc.prototype.constructor=Vc,Hc.prototype=(0,d.default)(Pa.prototype),Hc.prototype.constructor=Hc;var jc={triangulate:function(e,t,n){n=n||2;var r,i,a,o,s,l=t&&t.length,u=l?t[0]*n:e.length,h=Wc(e,0,u,n,!0),c=[];if(!h||h.next===h.prev)return c;if(l&&(h=Qc(e,t,h,n)),e.length>80*n){for(var d=r=e[0],f=i=e[1],p=n;pa.x?i.x>o.x?i:o:a.x>o.x?a:o).x,h=(i.y>a.y?i.y>o.y?i:o:a.y>o.y?a:o).y,c=id(s,l,t,n,r),d=id(u,h,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=c&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=ld(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=ld(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==e.prev&&f!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=ld(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=ld(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function Jc(e,t,n){var r=e;do{var i=r.prev,a=r.next.next}while(!ud(i,a)&&hd(i,r,r.next,a)&&dd(i,a)&&dd(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),vd(r),vd(r.next),r=e=a),r=r.next,r!==e);return r}function Kc(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&sd(o,s)){var l=pd(o,s),o=Yc(o,o.next),l=Yc(l,l.next);return qc(o,t,n,r,i,a),void qc(l,t,n,r,i,a)}s=s.next}}while(o=o.next,o!==e)}function Qc(e,t,n,r){for(var i,a,o=[],s=0,l=t.length;s=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&o=r.x&&r.x>=h&&i!==r.x&&od(an.x)&&dd(r,e)&&(n=r,d=l)),r=r.next;return n}function nd(e,t,n,r){for(var i=e;null===i.z&&(i.z=id(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,rd(i)}function rd(e){var t,n,r,i,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;ta!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}function pd(e,t){var n=new gd(e.i,e.x,e.y),r=new gd(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function md(e,t,n,r){return n=new gd(e,t,n),r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function vd(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function gd(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yd(e,t,n,r){for(var i=0,a=t,o=n-r;ane.default){var u=Math.sqrt(s),h=Math.sqrt(a*a+o*o),c=t.x-i/u,d=t.y+r/u,u=n.x-o/h,h=n.y+a/h,u=((u-c)*o-(h-d)*a)/(r*o-i*a),h=c+r*u-e.x,c=d+i*u-e.y,d=h*h+c*c;if(d<=2)return new Nr(h,c);u=Math.sqrt(d/2)}else d=!1,r>ne.default?a>ne.default&&(d=!0):r<-ne.default?a<-ne.default&&(d=!0):(0,re.default)(i)===(0,re.default)(o)&&(d=!0),u=d?(h=-i,c=r,Math.sqrt(s)):(h=r,c=i,Math.sqrt(s/2));return new Nr(h/u,c/u)}for(var D=[],O=0,B=b.length,F=B-1,U=O+1;Oa.tracks[s].times[0]&&(m=a.tracks[s].times[0]);for(s=0;s>>1;et;)--o;return++o,0===a&&o===i||(o<=a&&(o=Math.max(o,1),a=o-1),n=this.getValueSize(),this.times=nf.arraySlice(r,a,o),this.values=nf.arraySlice((0,T.default)(this),a*n,o*n)),this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=(0,T.default)(this),i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&sne.default&&(l.normalize(),r=Math.acos(Rr.clamp(a[h-1].dot(a[h]),-1,1)),o[h].applyMatrix4(u.makeRotationAxis(l,r))),s[h].crossVectors(a[h],o[h]);if(!0===t)for(r=Math.acos(Rr.clamp(o[0].dot(o[e]),-1,1)),r/=e,0r.length-2?r.length-1:a+1],a=r[a>r.length-3?r.length-1:a+2];return n.set(zf(o,t.x,e.x,i.x,a.x),zf(o,t.y,e.y,i.y,a.y)),n},np.prototype.copy=function(e){Nf.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),o=0===o?0:1-i/o;return a.getPointAt(o)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;nne.default){if(u<0&&(o=t[a],l=-l,s=t[i],u=-u),!(e.ys.y))if(e.y===o.y){if(e.x===o.x)return!0}else{if(l=u*(e.x-o.x)-l*(e.y-o.y),0===l)return!0;l<0||(r=!r)}}else if(e.y===o.y&&(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x))return!0}return r}var i=_d.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,l,u=[];if(1===a.length)return s=a[0],l=new op,l.curves=s.curves,u.push(l),u;var h,c=!i(a[0].getPoints()),c=e?!c:c,d=[],f=[],p=[],m=0;f[m]=void 0,p[m]=[];for(var v=0,g=a.length;vt.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1)))),this._effectiveWeight=r,r},_updateTimeScale:function(e){var t,n,r=0;return this.paused||(r=this.timeScale,t=this._timeScaleInterpolant,null!==t&&(n=t.evaluate(e)[0],r*=n,e>t.parameterPositions[1]&&(this.stopWarping(),0===r?this.paused=!0:this.timeScale=r))),this._effectiveTimeScale=r,r},_updateTime:function(e){var t,n=this.time+e,r=this._clip.duration,i=this.loop,a=this._loopCount,o=i===Pn;if(0===e)return-1!==a&&o&&1==(1&a)?r-n:n;if(i===Nn){-1===a&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r<=n)n=r;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else if(-1===a&&(0<=e?(a=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r<=n||n<0?(t=Math.floor(n/r),n-=r*t,a+=Math.abs(t),i=this.repetitions-a,i<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=0this.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Nr),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Nr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=Tm.copy(e).clamp(this.min,this.max);return t.sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Sm=new Vr,Am=new Vr;function Im(e,t){this.start=void 0!==e?e:new Vr,this.end=void 0!==t?t:new Vr}function Lm(e){pi.call(this),this.material=e,this.render=function(){}}(0,je.default)(Im.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Vr),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Vr),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Vr),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){Sm.subVectors(e,this.start),Am.subVectors(this.end,this.start);var n=Am.dot(Am),e=Am.dot(Sm),n=e/n;return t&&(n=Rr.clamp(n,0,1)),n},closestPointToPoint:function(e,t,n){return t=this.closestPointToPointParameter(e,t),void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Vr),this.delta(n).multiplyScalar(t).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Lm.prototype=(0,d.default)(pi.prototype),Lm.prototype.constructor=Lm,Lm.prototype.isImmediateRenderObject=!0;var Rm=new Vr;function Nm(e,t){pi.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var e=new Pa,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,i=1,a=32;r\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return n.type="SphericalGaussianBlur",n}function Fv(){var e=new Nr(1,1),e=new Yd({uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:fv[Hn]},outputEncoding:{value:fv[Hn]}},vertexShader:zv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n".concat(Gv(),"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return e.type="EquirectangularToCubeUV",e}function Uv(){var e=new Yd({uniforms:{envMap:{value:null},inputEncoding:{value:fv[Hn]},outputEncoding:{value:fv[Hn]}},vertexShader:zv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n".concat(Gv(),"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return e.type="CubemapToCubeUV",e}function zv(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}function Gv(){return"\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include \n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"}function Vv(e,t,n,r,i,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new ua(e,t,n,i,a,o)}Ev.prototype={constructor:Ev,fromScene:function(e){var t=1>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){n=n(191),e.exports=n},function(e,t,n){var r=n(8),n=n(76);r({target:"Array",stat:!0},{isArray:n})},function(e,t,n){n=n(359),e.exports=n},function(e,t,n){n(360);var r=n(11);r.JSON||(r.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return r.JSON.stringify.apply(null,arguments)}},function(e,t,n){var r=n(8),i=n(45),n=n(16),a=i("JSON","stringify"),o=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,l=/^[\uDC00-\uDFFF]$/,u=function(e,t,n){var r=n.charAt(t-1),t=n.charAt(t+1);return s.test(e)&&!l.test(t)||l.test(e)&&!s.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},n=n(function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")});a&&r({target:"JSON",stat:!0,forced:n},{stringify:function(e,t,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(o,u):r}})},function(e,t,n){n=n(362),e.exports=n},function(e,t,n){n(363),n=n(11),e.exports=n.parseFloat},function(e,t,n){var r=n(8),n=n(364);r({global:!0,forced:parseFloat!=n},{parseFloat:n})},function(e,t,n){var r=n(18),i=n(138).trim,n=n(110),a=r.parseFloat,n=1/a(n+"-0")!=-Infinity;e.exports=n?function(e){var t=i(String(e)),e=a(t);return 0===e&&"-"==t.charAt(0)?-0:e}:a},function(e,t,n){n=n(366),e.exports=n},function(e,t,n){n(367),n=n(11),e.exports=n.parseInt},function(e,t,n){var r=n(8),n=n(368);r({global:!0,forced:parseInt!=n},{parseInt:n})},function(e,t,n){var r=n(18),i=n(138).trim,n=n(110),a=r.parseInt,o=/^[+-]?0[Xx]/,n=8!==a(n+"08")||22!==a(n+"0x16");e.exports=n?function(e,t){return e=i(String(e)),a(e,t>>>0||(o.test(e)?16:10))}:a},function(e,t,n){n=n(370),e.exports=n},function(e,t,n){var r=n(371),i=Array.prototype;e.exports=function(e){var t=e.map;return e===i||e instanceof Array&&t===i.map?r:t}},function(e,t,n){n(372),n=n(26),e.exports=n("Array").map},function(e,t,n){"use strict";var r=n(8),i=n(57).map,n=n(87),n=n("map");r({target:"Array",proto:!0,forced:!n},{map:function(e){return i(this,e,1_||8*(1-d.dot(f.object.quaternion))>_)&&(f.dispatchEvent(p),c.copy(f.object.position),d.copy(f.object.quaternion),T=!1,!0)}),this.dispose=function(){f.domElement.removeEventListener("contextmenu",me,!1),f.domElement.removeEventListener("mousedown",ae,!1),f.domElement.removeEventListener("wheel",he,!1),f.domElement.removeEventListener("touchstart",de,!1),f.domElement.removeEventListener("touchend",pe,!1),f.domElement.removeEventListener("touchmove",fe,!1),f.domElement.removeEventListener("mouseup",se,!1),f.domElement.removeEventListener("mousemove",le,!1),Te.default.PointerEvent&&!Te.default.TouchEvent&&(f.domElement.removeEventListener("pointerdown",ye,!1),f.domElement.removeEventListener("pointermove",_e,!1),f.domElement.removeEventListener("pointerup",xe,!1)),Ee.default.removeEventListener("mousemove",oe,!1),Ee.default.removeEventListener("mouseup",ue,!1),Te.default.removeEventListener("keydown",ce,!1),this.enterCtrl=void 0,this.domElement=void 0,this.object=void 0};var f=this,p={type:"change"},m={type:"start"},v={type:"end"},g={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4,TOUCH_PAN:5,TOUCH_DOLLY_ROTATE:6},y=g.NONE,_=1e-6,x=new fm.Spherical,w=new fm.Spherical,b=1,M=new fm.Vector3,T=!1,E=new fm.Vector2,S=new fm.Vector2,A=new fm.Vector2,I=new fm.Vector2,L=new fm.Vector2,R=(new fm.Vector2,new fm.Vector2),N=new fm.Vector2,k=new fm.Vector2,P=new fm.Vector2,C=new fm.Vector2,D=new fm.Vector2,O=new fm.Vector2;function B(){return 2*Math.PI/60/60*f.autoRotateSpeed}function F(){return Math.pow(.95,f.zoomSpeed)}function U(e){f.enterCtrl&&!f.enterCtrl.enableMapRotate||(w.theta-=e)}function z(e){f.enterCtrl&&!f.enterCtrl.enableMapIncline||(w.phi-=e)}this.rotateLeft=function(e){U(e)};var G,V,H=(G=new fm.Vector3,function(e,t){G.setFromMatrixColumn(t,0),G.multiplyScalar(-e),M.add(G)}),j=(V=new fm.Vector3,function(e,t){!0===f.screenSpacePanning?V.setFromMatrixColumn(t,1):(V.setFromMatrixColumn(t,0),V.crossVectors(f.object.up,V)),V.multiplyScalar(e),M.add(V)});this.panUp=function(e){var t=new fm.Vector3;t.y=1,t.multiplyScalar(e),M.add(t)};var W,Y=(W=new fm.Vector3,function(e,t){var n,r;f.enterCtrl&&!f.enterCtrl.enableMapPan||(n=f.domElement===Ee.default?f.domElement.body:f.domElement,f.object.isPerspectiveCamera?(r=f.object.position,W.copy(r).sub(f.target),r=W.length(),r*=Math.tan(f.object.fov/2*Math.PI/180),H(2*e*r/n.clientHeight,f.object.matrix),j(2*t*r/n.clientHeight,f.object.matrix)):f.object.isOrthographicCamera?(H(e*(f.object.right-f.object.left)/f.object.zoom/n.clientWidth,f.object.matrix),j(t*(f.object.top-f.object.bottom)/f.object.zoom/n.clientHeight,f.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),f.enablePan=!1))});function q(e){f.enterCtrl&&!f.enterCtrl.enableMapPinch||(f.object.isPerspectiveCamera?b/=e:f.object.isOrthographicCamera?(f.object.zoom=Math.max(f.minZoom,Math.min(f.maxZoom,f.object.zoom*e)),f.object.updateProjectionMatrix(),b/=e,T=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),f.enableZoom=!1))}function X(e){f.enterCtrl&&!f.enterCtrl.enableMapPinch||(f.object.isPerspectiveCamera?b*=e:f.object.isOrthographicCamera?(f.object.zoom=Math.max(f.minZoom,Math.min(f.maxZoom,f.object.zoom/e)),f.object.updateProjectionMatrix(),T=!0,b*=e):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),f.enableZoom=!1))}function Z(e){E.set(e.clientX,e.clientY)}function J(e){P.set(e.clientX,e.clientY)}function K(e){R.set(e.clientX,e.clientY)}function Q(e){S.set(e.clientX,e.clientY),A.subVectors(S,E).multiplyScalar(f.rotateSpeed),e=f.domElement===Ee.default?f.domElement.body:f.domElement,U(2*Math.PI*A.x/e.clientHeight),z(2*Math.PI*A.y/e.clientHeight),E.copy(S)}function $(e){C.set(e.clientX,e.clientY),D.subVectors(C,P),0s;)n=i(r,t=a[s++]),void 0!==n&&c(o,t,n);return o}})},function(e,t,n){var r=n(45),i=n(130),a=n(131),o=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0,r=i(n(142)),i=i(n(114)),n={createElement:function(e){return e=e.toLowerCase(),"canvas"===e?wx.createCanvas():"image"===e?wx.createImage():void 0}},(0,r.default)(n.constructor.prototype,i.default.prototype),t.default=n},function(e,t,n){"use strict";var r=n(1),o=r(n(15)),s=r(n(12));fm.Evento={convert:function(i,a){return a=a||{},i.on=function(e,t){return(a[e]=a[e]||[]).push(t),i},i.getHandlers=function(e){return a[e]},i.once=function(e,t){function n(){t.apply(i.off(e,n),arguments)}return n.h=t,i.on(e,n)},i.off=function(e,t){for(var n=a[e],r=0;t&&n&&n[r];r++)n[r]!=t&&n[r].h!=t||(0,o.default)(n).call(n,r--,1);return t||delete a[e],i},i.emit=function(e){for(var t=a[e],n=0;t&&t[n];)t[n++].apply(i,(0,s.default)(t).call(arguments,1));return i},i.offAll=function(){for(var e in a)a[e]=[],delete a[e];a=void 0},i}}},function(e,t,n){var r=n(464),i=n(203);function a(e){if(r(e))return i(e)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(465)},function(e,t,n){n=n(191),e.exports=n},function(e,t,n){var r=n(175),i=n(467),a=n(204);function o(e){if(void 0!==r&&i(Object(e)))return a(e)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(468)},function(e,t,n){n(41),n(58),n=n(469),e.exports=n},function(e,t,n){var r=n(51),i=n(24),a=n(59),o=i("iterator");e.exports=function(e){return e=Object(e),void 0!==e[o]||"@@iterator"in e||a.hasOwnProperty(r(e))}},function(e,t,n){n=n(200),e.exports=n},function(e,t,n){var r=n(472),i=n(204),a=n(203);function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(473)},function(e,t,n){n=n(190),e.exports=n},function(e,t){function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){n(199),n=n(11),e.exports=n.setInterval},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),o=i(n(0)),s=i(n(2)),l=i(n(3)),u=i(n(66)),h=i(n(206)),c=i(n(93)),d=i(n(142)),f=i(n(114)),n=function(){function n(e,t){(0,s.default)(this,n),this.wxInfo=t||{},t=location&&"http:"===location.protocol?"http://":"https://",t=c.default.replace("FMCloud/","").replace("www.fengmap.com","source.fengmap.com")+"webtheme",this._key=null,this._appName=null,this._mapServerURL="fengmap",this._mapThemeURL=t,this._container=null,this._canvas=null,this._tmpCanvas=null,this._tmpCanvas2=null,this._compassOffset=[28,20],this._compassSize=50,this.wxInfo.pixelRatio&&(this._compassSize*=this.wxInfo.pixelRatio),this._compassFg=null,this._compassBg=null,this.compassPosition=1,this._defaultThemeName="2001",this._focusAnimateMode=!0,this._focusAnimateTime=.3,this._focusAlphaMode=!0,this._focusAlpha=.1,this._viewModeAnimateMode=!0,this._viewModeAnimateTime=.3,this._moveToAnimateMode=!0,this._moveToAnimateTime=.3,this._scaleToAnimateMode=!0,this._modelSelectedEffect=!0,this._modelHoverEffect=!1,this._modelHoverTime=1e3,this.minScaleLevel=0,this.maxScaleLevel=6,this.defaultScaleLevel=3,this.mapScaleLevelRange=[16,23],this.mapScaleRange=null,this.defaultMapScaleLevel=20,this.defaultMapScale=null,this.minViewDistance=2e3,this.defaultVisibleGroups=[1],this.defaultFocusGroup=1,this.defaultViewMode="3d",this.shadowEnabled=!1,this.lightAngleX=45,this.lightAngleY=45,this.shadowSize=2048,this.shadowAlpha=.6,this.storeImageAngle=0,this.naviLineAnimation=!0,this.controlsRotateThreshold=.03,this.controlsScaleThreshold=.03,this.defaultGroupSpace=50,this.passiveMode=!1,this.themeVersion=null,this.themeFileType=null,this.cornerRoundLimit=1,this.stairsConfig={},this.defaultControlsPose=-15,this.defaultTiltAngle=30,this.defaultMaxTiltAngle=90,this.defaultMinTiltAngle=30,this.extentHeight=0,this.poiLabelFadeMode=!1,this.poiLabelFadeSpeed=5,this.defaultBackgroundColor=null,this.defaultBackgroundAlpha=null,this.storeImageDistanceEnabled=!1,this.storeImageDistance=500,this.useStoreApply=!0,this.frameRate=12,this.defaultViewCenter=null,this.pickCoordHeight=1,this.modelFileSuffix="js",this.enabledFXAA=!1,this.dynamicTextureScale=1,this.enabledPanRange=!1,this.tile=!1,this.levelShowOffset=0,this.lightEffects=!1,this.defaultLabelLanguage=u.default.ZH,this.font={family:'"Microsoft Yahei","微软雅黑",Tahoma,Arial'},(0,a.default)(this,e)}return(0,l.default)(n,[{key:"computePoseToAngle",value:function(){if("number"==typeof this.defaultControlsPose)return this.defaultControlsPose;if(this.defaultControlsPose){var e=h.default[this.defaultControlsPose];return e||-15}}},{key:"key",get:function(){return this._key},set:function(e){this._key=e}},{key:"appName",get:function(){return this._appName},set:function(e){this._appName=e}},{key:"mapServerURL",get:function(){return this._mapServerURL},set:function(e){this._mapServerURL=e}},{key:"mapThemeURL",get:function(){return this._mapThemeURL},set:function(e){this._mapThemeURL=e}},{key:"container",get:function(){return this._container},set:function(e){this._container=e,(0,o.default)(this._container,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._container,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._container,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"canvas",get:function(){return this._canvas},set:function(e){this._canvas=e,this.wxInfo.pixelRatio&&(this._canvas.height*=this.wxInfo.pixelRatio,this._canvas.width*=this.wxInfo.pixelRatio);var n=this;(0,o.default)(this._canvas,"style",{configurable:!0,get:function(){var e=this.width,t=this.height;return n.wxInfo.pixelRatio&&(e/=n.wxInfo.pixelRatio,t/=n.wxInfo.pixelRatio),{width:e+"px",height:t+"px"}}}),(0,o.default)(this._canvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._canvas,"clientWidth",{configurable:!0,get:function(){return this.width}}),(0,d.default)(this._canvas.constructor.prototype,f.default.prototype)}},{key:"tempCanvas",get:function(){return this._tmpCanvas},set:function(e){this._tmpCanvas=e,(0,o.default)(this._tmpCanvas,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._tmpCanvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._tmpCanvas,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"tempCanvas2",get:function(){return this._tmpCanvas2},set:function(e){this._tmpCanvas2=e,(0,o.default)(this._tmpCanvas2,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._tmpCanvas2,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._tmpCanvas2,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"getImage",value:function(){return this._canvas.createImage()}},{key:"compassOffset",get:function(){return this._compassOffset},set:function(e){this._compassOffset=e}},{key:"compassSize",get:function(){return this._compassSize},set:function(e){this._compassSize=e,this.wxInfo.pixelRatio&&(this._compassSize*=this.wxInfo.pixelRatio)}},{key:"compassFg",get:function(){return this._compassFg},set:function(e){this._compassFg=e}},{key:"compassBg",get:function(){return this._compassBg},set:function(e){this._compassBg=e}},{key:"defaultThemeName",get:function(){return this._defaultThemeName},set:function(e){this._defaultThemeName=e}},{key:"focusAnimateMode",get:function(){return this._focusAnimateMode},set:function(e){this._focusAnimateMode=e}},{key:"focusAnimateTime",get:function(){return this._focusAnimateTime},set:function(e){this._focusAnimateTime=e}},{key:"focusAlphaMode",get:function(){this._focusAlphaMode},set:function(e){this._focusAlphaMode=e}},{key:"focusAlpha",get:function(){return this._focusAlpha},set:function(e){this._focusAlpha=e}},{key:"viewModeAnimateMode",get:function(){return this._viewModeAnimateMode},set:function(e){this._viewModeAnimateMode=e}},{key:"moveToAnimateMode",get:function(){return this._moveToAnimateMode},set:function(e){this._moveToAnimateMode=e}},{key:"scaleToAnimateMode",get:function(){return this._scaleToAnimateMode},set:function(e){this._scaleToAnimateMode=e}},{key:"viewModeAnimateTime",get:function(){return this._viewModeAnimateTime},set:function(e){this._viewModeAnimateTime=e}},{key:"modelHoverTime",get:function(){return this._modelHoverTime},set:function(e){e<300&&(e=300),this._modelHoverTime=e}},{key:"modelHoverEffect",get:function(){return this._modelHoverEffect},set:function(e){this._modelHoverEffect=e}},{key:"modelSelectedEffect",get:function(){return this._modelSelectedEffect},set:function(e){this._modelSelectedEffect=e}}]),n}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var m=o(n(12)),c=o(n(2)),d=o(n(3)),v=o(n(478)),g=o(n(484)),y=o(n(485)),_=o(n(148));function f(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return x(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16)+(t>>16)+(n>>16);return t<<16|65535&n}function s(e,t){return e<>>32-t}function l(e,t,n,r,i,a){return c(s(c(c(t,e),c(r,a)),i),n)}function d(e,t,n,r,i,a,o){return l(t&n|~t&r,e,t,i,a,o)}function f(e,t,n,r,i,a,o){return l(t&r|n&~r,e,t,i,a,o)}function p(e,t,n,r,i,a,o){return l(t^n^r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return l(n^(t|~r),e,t,i,a,o)}function u(e,t){var n,r,i,a;e[t>>5]|=128<>>9<<4)]=t;for(var o=1732584193,s=-271733879,l=-1732584194,u=271733878,h=0;h>5]>>>r%32&255);return t}function v(e){var t=[];for(t[(e.length>>2)-1]=void 0,r=0;r>5]|=(255&e.charCodeAt(r/8))<>>4&15)+n.charAt(15&t);return r}function x(e){return unescape(encodeURIComponent(e))}function w(e){return g(x(e))}function b(e){return _(w(e))}function M(e,t){return y(x(e),x(t))}function T(e,t){return _(M(e,t))}function E(e,t,n){return t?(n?M:T)(t,e):(n?w:b)(e)}t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(27)),s=a(n(9)),l=a(n(2)),u=a(n(3)),h=a(n(5)),c=a(n(6)),d=a(n(7)),r=a(n(17)),f=a(n(36));function p(n){var r=m();return function(){var e,t=(0,d.default)(n),t=r?(e=(0,d.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,c.default)(this,t)}}function m(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,h.default)(i,e);var r=p(i);function i(e,t){var n;return(0,l.default)(this,i),n=r.call(this,t.eid,f.default.FLOOR),n.bdata=t,n.gdata=e,n._parseData=null,n._isInitMesh=!0,n._visible=!0,n._renderNode=null,n._geometry=void 0,n}return(0,u.default)(i,[{key:"initMesh",value:function(e,t,n,r){this._geometry&&(this._renderNode=new fm.Mesh(this._geometry.geometry,e),this._renderNode.mapNode=this,e.color=new fm.Color(n),e.opacity=(0,o.default)(r),e.userData.opacity=r,e.transparent=!0,this._renderNode.scale.set(1,-1,1),this._renderNode.rotation.set(Math.PI/2,0,0,"XYZ"),this._renderNode.position.copy(t),this._renderNode.frustumCulled=!1,this._renderNode.parent=this.parent.scene,this._renderNode.visible=this.show,this._renderNode.receiveShadow=!0,this.renderNodeInited=!0,this._geometry=null)}},{key:"setByTheme",value:function(e){this._renderNode&&(this._renderNode.material.color=new fm.Color(e.floorColor),this._renderNode.material.alpha=e.floorOpacity,this._renderNode.material.userData.opacity=e.floorOpacity)}},{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&this._renderNode.updateMatrixWorld(!0),this.visible=t}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this._geometry=null,this.renderNodeInited=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"restoreGpuMemeory",value:function(){}},{key:"getBbox",value:function(){}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"isInitMesh",get:function(){return this._isInitMesh},set:function(e){this._isInitMesh=e}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,s.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(214)),f=a(n(94));function p(n){var r=m();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function m(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(a,e);var i=p(a);function a(e,t,n){var r;return(0,s.default)(this,a),r=i.call(this,"externalModelLayer"),r._scene=new fm.Scene,r._scene.userData.type="externalModel",r.alias="externalModel",r._models={},r.initNode(e,t),r._visible=!0,r.initLight(),r.putLight(),r}return(0,l.default)(a,[{key:"initNode",value:function(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function _(e,t){if(e){if("string"==typeof e)return x(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n varying vec2 vUv;\n \n void main() {\n vec4 diffuseColor = vec4( diffuse, 1.0 );\n vec2 muv = vec2(vUv.x , 1.0 - vUv.y);\n diffuseColor = texture2D( mapfront, muv );\n \n vec4 backColor = vec4(1.0 , 0.0 ,0.0 ,1.0);\n backColor = texture2D( mapBack, muv );\n\n float alphacomp = backColor.a + diffuseColor.a * (1.0 -backColor.a);\n vec3 resultColor = diffuseColor.rgb * diffuseColor.a + backColor.rgb * (1.0 - diffuseColor.a);\n gl_FragColor = vec4(resultColor , alphacomp);\n }\n "},t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(10)),d=o(n(2)),f=o(n(3)),p=o(n(517)),m=o(n(234)),v=o(n(93));function g(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return _(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn;){var r,i,a,o=f[n++],s=t?o.ok:o.fail,l=o.resolve,u=o.reject,h=o.domain;try{s?(t||(c.rejection===ee&&oe(c),c.rejection=$),!0===s?r=e:(h&&h.enter(),r=s(e),h&&(h.exit(),a=!0)),r===o.promise?u(z("Promise-chain cycle")):(i=te(r))?i.call(r,l,u):l(r)):u(e)}catch(e){h&&!a&&h.exit(),u(e)}}c.reactions=[],c.notified=!1,d&&!c.rejection&&ie(c)}))},re=function(e,t,n){var r,i;Y?(r=G.createEvent("Event"),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!q&&(i=u["on"+e])?i(r):e===X&&S("Unhandled promise rejection",n)},ie=function(i){M.call(u,function(){var e,t=i.facade,n=i.value,r=ae(i);if(r&&(e=I(function(){k?V.emit("unhandledRejection",n,t):re(X,t,n)}),i.rejection=k||ae(i)?ee:$,e.error))throw e.value})},ae=function(e){return e.rejection!==$&&!e.parent},oe=function(t){M.call(u,function(){var e=t.facade;k?V.emit("rejectionHandled",e):re(Z,e,t.value)})},se=function(t,n,r){return function(e){t(n,e,r)}},le=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=Q,ne(e,!0))},ue=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw z("Promise can't be resolved itself");var r=te(e);r?T(function(){var t={done:!1};try{r.call(e,se(ue,t,n),se(le,t,n))}catch(e){le(t,e,n)}}):(n.value=e,n.state=K,ne(n,!1))}catch(e){le({done:!1},e,n)}}};R&&(U=function(e){y(this,U,D),g(e),r.call(this);var t=O(this);try{e(se(ue,t),se(le,t))}catch(e){le(t,e)}},r=function(e){B(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:J,value:void 0})},r.prototype=f(U.prototype,{then:function(e,t){var n=F(this),r=j(b(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=k?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=J&&ne(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=O(e);this.promise=e,this.resolve=se(ue,t),this.reject=se(le,t)},A.f=j=function(e){return e===U||e===a?new i(e):W(e)},l||"function"!=typeof c||(o=c.prototype.then,d(c.prototype,"then",function(e,t){var n=this;return new U(function(e,t){o.call(n,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return E(U,H.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:R},{Promise:U}),p(U,D,!1,!0),m(D),a=h(D),s({target:D,stat:!0,forced:R},{reject:function(e){var t=j(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:l||R},{resolve:function(e){return E(l&&this===a?U:this,e)}}),s({target:D,stat:!0,forced:w},{all:function(e){var s=this,t=j(s),l=t.resolve,u=t.reject,n=I(function(){var r=g(s.resolve),i=[],a=0,o=1;x(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(s,e).then(function(e){n||(n=!0,i[t]=e,--o||l(i))},u)}),--o||l(i)});return n.error&&u(n.value),t.promise},race:function(e){var n=this,r=j(n),i=r.reject,t=I(function(){var t=g(n.resolve);x(e,function(e){t.call(n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}})},function(e,t,n){var r,i,a,o,s,l,u,h,c=n(18),d=n(81).f,f=n(237).set,p=n(238),m=n(526),v=n(85),g=c.MutationObserver||c.WebKitMutationObserver,y=c.document,_=c.process,n=c.Promise,d=d(c,"queueMicrotask"),d=d&&d.value;d||(r=function(){var e,t;for(v&&(e=_.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?o():a=void 0,e}}a=void 0,e&&e.enter()},o=p||v||m||!g||!y?n&&n.resolve?(u=n.resolve(void 0),h=u.then,function(){h.call(u,r)}):v?function(){_.nextTick(r)}:function(){f.call(c,r)}:(s=!0,l=y.createTextNode(""),new g(r).observe(l,{characterData:!0}),function(){l.data=s=!s})),e.exports=d||function(e){e={fn:e,next:void 0},a&&(a.next=e),i||(i=e,o()),a=e}},function(e,t,n){n=n(105),e.exports=/web0s(?!.*chrome)/i.test(n)},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(8),u=n(44),i=n(117),a=n(151),h=n(62);r({target:"Promise",stat:!0},{allSettled:function(e){var s=this,t=i.f(s),l=t.resolve,n=t.reject,r=a(function(){var r=u(s.resolve),i=[],a=0,o=1;h(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(s,e).then(function(e){n||(n=!0,i[t]={status:"fulfilled",value:e},--o||l(i))},function(e){n||(n=!0,i[t]={status:"rejected",reason:e},--o||l(i))})}),--o||l(i)});return r.error&&n(r.value),t.promise}})},function(e,t,n){"use strict";var r=n(8),c=n(44),d=n(45),i=n(117),a=n(151),f=n(62),p="No one promise resolved";r({target:"Promise",stat:!0},{any:function(e){var l=this,t=i.f(l),u=t.resolve,h=t.reject,n=a(function(){var r=c(l.resolve),i=[],a=0,o=1,s=!1;f(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(l,e).then(function(e){n||s||(s=!0,u(e))},function(e){n||s||(n=!0,i[t]=e,--o||h(new(d("AggregateError"))(i,p)))})}),--o||h(new(d("AggregateError"))(i,p))});return n.error&&h(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(8),i=n(75),a=n(235),o=n(16),s=n(45),l=n(236),u=n(239),n=n(88),o=!!a&&o(function(){a.prototype.finally.call({then:function(){}},function(){})});r({target:"Promise",proto:!0,real:!0,forced:o},{finally:function(t){var n=l(this,s("Promise")),e="function"==typeof t;return this.then(e?function(e){return u(n,t()).then(function(){return e})}:t,e?function(e){return u(n,t()).then(function(){throw e})}:t)}}),i||"function"!=typeof a||a.prototype.finally||n(a.prototype,"finally",s("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(234)),n=function(){function t(e){(0,a.default)(this,t),this._map=e,this.dynamicModel={},this.loader=new s.default(this._map)}return(0,o.default)(t,[{key:"load",value:function(i,t,e){var a=this;this.dynamicModel[i]?0==this.dynamicModel[i].loadComplete?(this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e)):this.dynamicModel[i].error?e&&e(this.dynamicModel[i].error):t&&this.loader.parse(this.dynamicModel[i].data,fm.LoaderUtils.extractUrlBase(i),function(e){t(e)},function(){}):(this.dynamicModel[i]={gltf:null,loadComplete:!1,error:null,scbs:[],fcbs:[]},this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e),this.loader.load(i,function(e,t){a.dynamicModel[i].gltf=e,a.dynamicModel[i].data=t,a.dynamicModel[i].loadComplete=!0;for(var n=a.dynamicModel[i].scbs,r=0;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255,a:e}}},{key:"getModelTheme",value:function(e){return e?(e=this._type2theme[e.type],e||this._defaultTheme):this._defaultTheme}},{key:"getPoiTheme",value:function(e){var t=e.type,e=e.fid,e=this._poiFidTheme[e];return e=e||this._poiimagetheme[t],e=(0,c.default)(e||this._poiimagetheme[0],{}),"rtheme"==this.fileType?e.imageSrc=this.getRThemeTexture(e.imagename):e.imageSrc=this._themeUrl+"/"+this.themeName+"/"+e.imagename,e.imageUrl=this._themeUrl+"/"+this.themeName+"/"+e.imagename,e.imagehead=this._themeUrl+"/"+this.themeName+"/",e}},{key:"getLabelTheme",value:function(e){var t,n=e.type,e=e.fid,n=this.storeLabelTypeDic[n];return e&&(t=this._labelFidTheme[e]),n||t?n&&(t=t||this.storeLabelThemeDic[n.normalid]||this._labelStyle):t=this._labelStyle,t=t||this._labelDefaultTheme,t.fillcolor&&t.alpha&&t.fontsize||(n={fillcolor:"0,0,0",alpha:"1.0",fontsize:"12.0"},t=(0,c.default)(t,n)),t.image?("rtheme"===this.fileType?t.imageSrc=this.getRThemeTexture(t.image):t.imageSrc=this._themeUrl+"/"+this.themeName+"/"+t.image,t.imageUrl=this._themeUrl+"/"+this.themeName+"/"+t.image):t.imageSrc=!1,t}},{key:"getExteralModelTheme",value:function(e){return this._externalModelTheme[e]}},{key:"dispose",value:function(){this._type2theme=void 0,this._poiimagetheme=void 0,this._storePoiThemes=void 0,this._storeLabelTypeDic=void 0,this._storeLabelThemeDic=void 0,this._storethemes=void 0,this._data=void 0}},{key:"storeLabelTypeDic",get:function(){return this._storeLabelTypeDic},set:function(e){this._storeLabelTypeDic=e}},{key:"storeLabelThemeDic",get:function(){return this._storeLabelThemeDic},set:function(e){this._storeLabelThemeDic=e}},{key:"storePoiThemes",get:function(){return this._storePoiThemes},set:function(e){this._storePoiThemes=e}},{key:"storethemes",get:function(){return this._storethemes},set:function(e){this._storethemes=e}},{key:"themeUrl",get:function(){return this._themeUrl},set:function(e){this.themeUrl=e}},{key:"floorColor",get:function(){return this._floorColor},set:function(e){this._floorColor=e}},{key:"floorOpacity",get:function(){return this._floorOpacity},set:function(e){this._floorOpacity=e}},{key:"selectedColor",get:function(){return this._selectedColor}}]),n}(),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(9)),d=o(n(15)),f=o(n(13)),p=o(n(2)),m=o(n(3));function v(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n varying vec2 vUv;\n \n void main() {\n \n // vec2 muv = vec2(vUv.x , 1.0 - vUv.y);\n vec4 diffuseColor = texture2D( mmap, vUv );\n \n \n gl_FragColor = diffuseColor;\n }\n "},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function t(e){(0,a.default)(this,t),this.videoMemoryAmount=null,this._map=e}return(0,o.default)(t,[{key:"getVideoMemoryAmount",value:function(e){if(this._map.nodeManager){var t,n=this._map.nodeManager._scenes[""+e].groups;for(t in n)this.videoMemoryAmount+=n[""+t].layers.facility[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.model[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.extent[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.label[0].getVideoMemoryAmount();return this.videoMemoryAmount}}},{key:"_addAmount",value:function(e){this.videoMemoryAmount+=e}},{key:"_subtractAmount",value:function(e){this.videoMemoryAmount-=e}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(){(0,a.default)(this,e);var t=wx.getSystemInfoSync();this.pixelRatio=t.pixelRatio,this.screenWidth=t.screenWidth,this.device=t.model,this.system=t.system,this.platform=t.platform,this.brand=t.brand},n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(13)),u=a(n(10)),h=a(n(9)),c=a(n(2)),d=a(n(3)),f=a(n(5)),s=a(n(6)),l=a(n(7)),p=a(n(48)),m=a(n(115)),v=a(n(149)),g=a(n(78)),y=a(n(36)),_=a(n(154)),x=n(67),n=a(n(155));function w(n){var r=b();return function(){var e,t=(0,l.default)(n),t=r?(e=(0,l.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,s.default)(this,t)}}function b(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,f.default)(l,e);var s=w(l);function l(e,t,n){var r;if((0,c.default)(this,l),r=s.call(this,0,y.default.TEXT_MARKER),r._map=e,r._map.wxInfo.pixelRatio&&(t.fontsize*=r._map.wxInfo.pixelRatio),r._text=t.name,r._param=t,r._opx=t.x||0,r._opy=t.y||0,r._height=t.height||0,r._isRuning=!1,r._size=1.4*t.fontsize,r._callBack=t.callback,r._fillcolor=t.fillcolor,r._platecolor=t.platecolor,r._platestrokecolor=t.platestrokecolor,r._fontsize=t.fontsize,r._strokecolor=t.strokecolor,r._content=t.content,r.needAvoid=!1,!r._content){r.needAvoid=!0;for(var i=r._text.split("%rn%"),a=[],o=0;oi&&(i=s[0]),s[1]>a&&(a=s[1])}var l=i-n,u=a-r,h=Math.min(l,u),c=h/2;if(0===h)return[n,r];for(var d=new g(void 0,y),f=n;fm.d&&(m=u),d.length;0m.d&&(m=v),v.max-m.d<=t||(c=v.h/2,d.push(new _(v.x-c,v.y-c,c,e)),d.push(new _(v.x+c,v.y-c,c,e)),d.push(new _(v.x-c,v.y+c,c,e)),d.push(new _(v.x+c,v.y+c,c,e)))}return[m.x,m.y]}function y(e,t){return t.max-e.max}function _(e,t,n,r){this.x=e,this.y=t,this.h=n,this.d=o(e,t,r),this.max=this.d+this.h*Math.SQRT2}function o(e,t,n){for(var r=!1,i=Infinity,a=0;at!=c[1]>t&&e<(c[0]-h[0])*(t-h[1])/(c[1]-h[1])+h[0]&&(r=!r),i=Math.min(i,d(e,t,h,c))}return(r?1:-1)*Math.sqrt(i)}function x(e){for(var t=0,n=0,r=0,i=e[0],a=0,o=i.length,s=o-1;a>1)-1;0<=n;n--)this._down(n)}return(0,o.default)(r,[{key:"push",value:function(e){this.data.push(e),this.length++,this._up(this.length-1)}},{key:"pop",value:function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,0>1,a=t[i];if(0<=n(r,a))break;t[e]=a,e=i}t[e]=r}},{key:"_down",value:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e=e||t.h>=e)&&(t.w>=t.h?(n=t.h/t.w,t.w=e,t.h=(0,a.default)(e*n)):(n=t.w/t.h,t.h=e,t.w=(0,a.default)(e*n))),t},getPixXY:function(e,t){return e=(e-this.map_.minX)/(this.map_.maxX-this.map_.minX),t=(this.map_.maxY-t)/(this.map_.maxY-this.map_.minY),t={x:e,y:t},t.x=t.x*this.options.width,t.y=t.y*this.options.height,t},config:function(e){var t=this,n=t.getDeviceWH(e),r=n.w,i=n.h;t.options={width:r,height:i,opacity:e.opacity?255*e.opacity:25500,radius:e.radius||30,bshadow:e.radius?e.radius/20:1.5,maxSize:e.mapSize||2048,boundVal:15e3,shadowBlur:Math.ceil(.3*e.radius),points:{max:e.max||100,data:[]},gradient:e.gradient||{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"},isHeatPlan:e.isHeatPlan,heatHeight:e.heatHeight,tempCanvas:e.tempCanvas},n=e.canvas,e=n.getContext("2d"),n.width=r,n.height=i,n.style.width=r+"rpx",n.style.height=i+"rpx",t.options.ctx=e,t.options.canvas=n},renderShadow:function(e,t,n,r){var i=this,a=i.options.ctx,o=(i.options.radius,i.options.boundVal),s=(0,l.default)(n/i.options.points.max,10);a.shadowColor="rgba(0, 0, 0, "+s+")",a.shadowOffsetX=o,a.shadowOffsetY=o,a.shadowBlur=i.options.shadowBlur,a.beginPath(),a.arc(e-o,t-o,i.options.radius,0,2*Math.PI,!0),a.closePath(),(0,u.default)(a).call(a),r||i.cachePoint(e,t,n)},colorize:function(){for(var e=this,t=e.options.width,n=e.options.height,r=e.options.ctx,n=r.getImageData(0,0,t,n),i=n.data,a=i.length,o=e.getPalette(),s=e.options.opacity,l=3;l=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function b(e,t){if(e){if("string"==typeof e)return M(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function b(e,t){if(e){if("string"==typeof e)return M(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=i[1])){for(var a=i[0],o=i[1],s=i[0];a=e[s].distance&&sr.x?i:r.x,a=ar.y?o:r.y,s=sl.x?u:l.x,h=hl.y?c:l.y,d=dthis._max.x&&(this._max.x=e.x),e.y>this._max.y&&(this._max.y=e.y)}},{key:"contain",value:function(e){return!(e.xthis._max.x||e.ythis._max.y)}}]),r}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={Left:0,Center:1,Right:2},t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={MODE_2D:"top",MODE_3D:"3d"},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(t,n){(0,a.default)(this,e),this.x=void 0===t?0:t,this.y=void 0===n?0:n},n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function r(e,t,n){(0,a.default)(this,r),this._locOrigion=null,this._locRange=null,this._mapOrigion=null,this._mapAxisX=null,this._mapAxisY=null,this._mapRange=null,e&&t&&n&&this.init(e,t,n)}return(0,o.default)(r,[{key:"init",value:function(e,t,n){if(4!=n.length)return!1;this._locOrigion=e,this._locRange=t,this._mapOrigion=n[0],this._mapAxisX={x:n[1].x-n[0].x,y:n[1].y-n[0].y},this._mapAxisY={x:n[3].x-n[0].x,y:n[3].y-n[0].y},this._mapRange={x:this._getVectorLen(this._mapAxisX),y:this._getVectorLen(this._mapAxisY)},this._mapAxisX.x/=this._mapRange.x,this._mapAxisX.y/=this._mapRange.x,this._mapAxisY.x/=this._mapRange.y,this._mapAxisY.y/=this._mapRange.y}},{key:"transform",value:function(e){return e={x:(e.x-this._locOrigion.x)/this._locRange.x,y:(e.y-this._locOrigion.y)/this._locRange.y},e={x:e.x*this._mapRange.x,y:e.y*this._mapRange.y},e={x:this._mapOrigion.x+this._mapAxisX.x*e.x+this._mapAxisY.x*e.y,y:this._mapOrigion.y+this._mapAxisX.y*e.x+this._mapAxisY.y*e.y},e}},{key:"_getVectorLen",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}}]),r}(),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var k=a(n(10)),y=a(n(13)),s=a(n(29)),l=a(n(31)),u=a(n(15)),h=a(n(570)),c=a(n(32)),P=a(n(54)),o=a(n(35)),d=a(n(61)),f=a(n(50)),p=a(n(2)),m=a(n(3)),v=a(n(89)),g=a(n(5)),_=a(n(6)),x=a(n(7)),w=a(n(574)),b=a(n(576));n(577),n(591);var C=a(n(28)),M=a(n(118)),T=a(n(68)),E=a(n(95)),S=a(n(69)),r=a(n(152)),D=a(n(47)),A=a(n(42)),I=a(n(245)),L=a(n(156)),R=a(n(246)),N=a(n(66)),O=a(n(263)),B=n(244),F=n(159),U=n(119),z=n(609),G=n(255);function V(n){var r=H();return function(){var e,t=(0,x.default)(n),t=r?(e=(0,x.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,t)}}function H(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,g.default)(r,e);var n=V(r);function r(e){var t;return(0,p.default)(this,r),t=n.call(this),(0,k.default)(e)&&e.scaleLevel&&!e.scale&&(e.scale=(0,k.default)(e).mapScaleLevels[e.scaleLevel]),(0,k.default)(e)&&e.offsetHeight&&!e.lineMarkerHeight&&(e.lineMarkerHeight=e.offsetHeight),t.map=null,t.sceneData=null,t.speed=5,t.followSpeed=.2,t.followPosition=!0,t.followAngle=!1,t.locationMarkerFollowAngle=!0,t.isMultiGroups=!1,t.inTime=1.2,t.tiltAngle=80,t.changeGroupTiltAngle=30,t.scale=282,t.changeTiltAngle=!0,t.minScale=141,t.extendScale=1.3,t.locationMarkerUrl="",t.locationMarkerSize=100,t.locationMarkerHeight=3,t.lineMarkerHeight=1,t.imageMarkerHeight=6,t.directionAssert=10,t.combineAsset=5,t.completeDistance=0,t.naviLanguage=N.default.ZH,t.naviMode=T.default.MODULE_SHORTEST,t.naviPriority=E.default.PRIORITY_DEFAULT,t.autoRoute=!0,t.autoClearNaviLine=!0,t.lineStyle={lineWidth:10,radius:.5,dash:{size:4,gap:2}},t._passingPts={},t._passPtsEpson=1,t._failedInsertedPts={},(0,y.default)((0,v.default)(t),e),t._init(),t}return(0,m.default)(r,[{key:"_init",value:function(){var e,t,n=this;(0,k.default)(this)&&(this.mapServerURL&&this.mapID?(e={key:(0,k.default)(this).MapOptions.key,appName:(0,k.default)(this).MapOptions.appName,tile:!1,mapServerURL:this.mapServerURL,mapID:this.mapID},t=new b.default(e),t.openMap(function(){var e=t.dataManager._sceneDecodeData[n.mapID];n._analyser=new O.default({}),n._analyser.initByScene(e),n.callback()})):(this._analyser=new O.default,this._analyser.init((0,k.default)(this))),this._analyser=new O.default,this._analyser.init((0,k.default)(this)),this._naviDescriptionsCalculator=new w.default({map:(0,k.default)(this),directionAssert:this.directionAssert,combineAsset:this.combineAsset,naviLanguage:this.naviLanguage,completeDistance:this.completeDistance})),this._simulateParams=null,this._startData=null,this._endData=null,this._startMarker=null,this._endMarker=null,this._startMarkerLayer=null,this._endMarkerLayer=null,this._locationMarker=null,this._naviLineMarkers=[],this._naviResults=[],this._naviDescriptions=[],this._naviDescriptionsData=[],this._naviDistance=0,this._naviGroupsDistance=null,this._naviEntracesDistance=[null,null],this._timer=new fm.Clock,this._pause=!1,this._toPos=null,this._toRot=null,this._allLen=0,this._preGid=0,this._locateLastGroupID=null,this._changeGrouping=!1,this._animateFun=null,this._isSimulating=!1,this._isEnd=!1,this._groupPointsIndex=0,this._gpsData=null,this._tiltToAnimater=null,this._scaleToAnimater=null,this._moveToAnimater=null,this._focusGroupToAnimater=null,this._passingPts={},this._failedInsertedPts={}}},{key:"naviToDoor",get:function(){return this._analyser.naviToDoor},set:function(e){this._analyser.naviToDoor=e}},{key:"locationMarker",get:function(){return this._locationMarker||(this._locationMarker=new R.default((0,k.default)(this),{id:"location",url:this.locationMarkerUrl||"",size:this.locationMarkerSize}),(0,k.default)(this).addLocationMarker(this._locationMarker)),this._locationMarker},set:function(e){e instanceof R.default&&(this._locationMarker=e,(0,k.default)(this).addLocationMarker(this._locationMarker))}},{key:"startMarker",get:function(){return this._startMarker},set:function(e){this._startMarker=e}},{key:"endMarker",get:function(){return this._endMarker},set:function(e){this._endMarker=e}},{key:"naviDescriptions",get:function(){return this._naviDescriptions}},{key:"naviDescriptionsData",get:function(){return this._naviDescriptionsData}},{key:"naviDistance",get:function(){return this._naviDistance}},{key:"naviGroupsDistance",get:function(){return this._naviGroupsDistance}},{key:"naviEntrancesDistance",get:function(){return this._naviEntracesDistance}},{key:"assignInfos",value:function(e){function t(e){var t,n=[];for(t in e){var r={gid:(0,s.default)(t),coords:e[t]};n.push(r)}(0,l.default)(n).call(n,function(e,t){return e.gid-t.gid});var i=n[n.length-1],a=n[0],o=i.coords.length;return{end:{groupID:i.gid,x:i.coords[o-1][0],y:i.coords[o-1][1]},start:{groupID:a.gid,x:a.coords[0][0],y:a.coords[0][1]}}}this._analyser.assignInfos(e),this._naviResults=this._analyser.getNaviResults(),this._addZeroResult(this._naviResults),this._getGroupsPoints();var n=this._naviDescriptionsCalculator.calculate(this._naviResults);this._naviDescriptions=n[0],this._naviDescriptionsData=n[1],this._naviDistance=n[2],this._naviGroupsDistance=n[3],e=t(e),this._startData=e.start,this._endData=e.end,this._naviEntracesDistance[1]=this._calcEntraceDistance(this._naviResults,this._endData,!0)}},{key:"on",value:function(e,t){this.addEventListener(e,t)}},{key:"off",value:function(e,t){this.removeEventListener(e,t)}},{key:"dispose",value:function(){this.stop(),this.map=null,this._analyser&&(this._analyser.dispose(),this._analyser=null),this._naviDescriptionsCalculator&&(this._naviDescriptionsCalculator.dispose(),this._naviDescriptionsCalculator=null)}},{key:"getRouteDescriptions",value:function(e,t){return e=e||this._naviResults,this._isNaviResultsValide(e)?(t=(0,y.default)({},t),(0,k.default)(t)||(t.map=this._map,t.analyser=this),t=new w.default(t),e=t.calculate(e),{naviDescriptions:e[0],naviDescriptionsData:e[1],naviDistance:e[2],naviGroupsDistance:e[3]}):{}}},{key:"setLineStyle",value:function(e){this._naviLineMarker&&this._naviLineMarker.updateStyle(e),this.lineStyle=e}},{key:"setNaviLanguage",value:function(e){return!(!e||"string"!=typeof e||(e=e.toLowerCase(),e!=N.default.ZH&&e!=N.default.EN||(this.naviLanguage!=e&&(this.naviLanguage=e,this._naviDescriptionsCalculator&&(this._naviDescriptionsCalculator.naviLanguage=e),0n.index;g--)g-1>n.index&&(p=r[g],m=r[g-1],p.groupID==m.groupID&&(v+=C.default.distanceOfTwoPoints(p,m)));r[n.index+1]&&r[n.index+1].groupID==n.coord.groupID&&(v+=C.default.distanceOfTwoPoints(r[n.index+1],n.coord)),n.remain=v}return n}}}},{key:"pathConstraint",value:function(e,t){return this._analyser?this._analyser.pathConstraint(e,t):null}},{key:"locate",value:function(e,t){this._isSimulating&&this.stop(),e.groupID||e.groupId&&(e.groupID=e.groupId),e.groupID!=this._locateLastGroupID&&(this._locateLastGroupID=e.groupID),this.locateWalking(e,t)}},{key:"dropPtsByCicle",value:function(e){var t,n=[];for(t in this._passingPts)if(t==e.groupID)for(var r=0;rd&&(u[0]=d),u[1]c&&(u[2]=c),u[3]t.children[o].geometry.boundingBox.min.x&&(i.x=t.children[o].geometry.boundingBox.min.x),i.z>t.children[o].geometry.boundingBox.min.z&&(i.z=t.children[o].geometry.boundingBox.min.z)));n.x=(r.x+i.x)/2+e.center.x,n.y=-(r.x+i.y)/2+e.center.y,e.moveTo(n),e.rotateTo({to:0}),e.nodeManager._scenes[e._currentSceneId].groups[1]._layers.extent[0]._scene.children[5].geometry.computeBoundingBox();var s=e.nodeManager._scenes[e._currentSceneId].groups[1]._layers.extent[0]._scene.children[5].geometry.boundingBox,n=new fm.Vector2(s.max.x-s.min.x,s.max.y-s.min.y),s=n.length(),n=new fm.Vector2(r.x-i.x,r.y-i.y),n=n.length();e.mapScale=564*n/s,e.controls.panAdd({x:0,y:e.groupSpace/2,z:0})}}]),r}(r.default),t.default=r},function(e,t,n){e.exports=n(571)},function(e,t,n){n=n(572),e.exports=n},function(e,t,n){n(573),n=n(11),e.exports=n.Number.isNaN},function(e,t,n){n=n(8),n({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),_=i(n(32)),o=i(n(29)),u=i(n(10)),s=i(n(216)),x=i(n(229)),l=i(n(2)),h=i(n(3)),c=i(n(575)),d=i(n(66)),f=i(n(42)),p=n(159),m=n(119),n=function(){function t(e){(0,l.default)(this,t),this.directionAssert=10,this.combineAsset=5,this.naviLanguage=d.default.ZH,this.completeDistance=0,this.map=null,this.combinePoints=[],this.dirArr=["north","northeast","east","southeast","south","southwest","west","northwest","north"],this.dirArr2=["front_pure","right_front_pure","right_pure","right_back_pure","back_pure","left_back_pure","left_pure","left_front_pure","front_pure"],this.dirArr3=["still_go_straight","right_front","turn_right","turn_right_rear","back_to","turn_left_rear","turn_left","left_front","still_go_straight"],this._boo=!1,this._tailLen=0,(0,a.default)(this,e)}return(0,h.default)(t,[{key:"tailLen",get:function(){return this._tailLen}},{key:"dispose",value:function(){this.map=null}},{key:"calculate",value:function(e){return this._calculate(e)}},{key:"_getNs",value:function(e){for(var t=[],n=0;n>16&255,i[a++]=t>>8&255,i[a++]=255&t;return 2===n&&(t=u[e.charCodeAt(s)]<<2|u[e.charCodeAt(s+1)]>>4,i[a++]=255&t),1===n&&(t=u[e.charCodeAt(s)]<<10|u[e.charCodeAt(s+1)]<<4|u[e.charCodeAt(s+2)]>>2,i[a++]=t>>8&255,i[a++]=255&t),i}function f(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function p(e,t,n){for(var r,i=[],a=t;a>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),i.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,h=-7,c=n?i-1:0,d=n?-1:1,n=e[t+c];for(c+=d,a=n&(1<<-h)-1,n>>=-h,h+=s;0>=-h,h+=r;0>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,f=r?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-o))<1&&(o--,r*=2),t+=1<=o+h?c/r:c*Math.pow(2,1-h),2<=t*r&&(o++,r/=2),u<=o+h?(s=0,o=u):1<=o+h?(s=(t*r-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[n+d]=255&s,d+=f,s/=256,i-=8);for(o=o<>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},s),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,i,a){!function(e){var t=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new r(n.call(setTimeout,t,arguments),clearTimeout)},i.setInterval=function(){return new r(n.call(setInterval,t,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(t,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},a(584),i.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,i.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}.call(this,a(49))},function(e,t,n){!function(e,y){!function(n,r){"use strict";var i,a,o,s,l,e;function t(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nn.groupId))for(var _=0;_R.default.epsilon()?l.push.apply(l,(0,p.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._startZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._startZoneId,i._startNode,t))}),s||(0,d.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._startZoneId,e.cross,e.road),i._joinTwoNodes(i._startZoneId,i._startNode,e)}),o==t.size())return v.default.ROUTE_FAILED_NO_DATA_START}if(a&&null!=this._startModel&&0R.default.epsilon()?l.push.apply(l,(0,p.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._endZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._endZoneId,i._endNode,t))}),s||(0,d.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._endZoneId,e.cross,e.road),i._joinTwoNodes(i._endZoneId,i._endNode,e)}),o==t.size())return v.default.ROUTE_FAILED_NO_DATA_END}if(a&&null!=this._endModel&&0u&&(u=l.area,uR.default.distanceOfTwoPoints(m.cross,n.startPoint)?(a.push(m),a.push(p)):(a.push(p),a.push(m))),a;return a}},{key:"_calcAllAdherance",value:function(e,t,n,r,i,a){for(var o=i||30,s=0;s<360;s+=o){var l=new u.default;this._calcAdherenceAtOneAngle(e,t,s,n,l,a),1==l.stickToRoad&&r.push(l)}(0,g.default)(r).call(r,this._adherenceCompare)}},{key:"_seekNearRoads",value:function(e,t,n,r,i){var a=new h.default,o=[];for(this._calcAllAdherance(e,t,n,o,r,i);0!=o.length;){var s=o[0],l=a.get(s.road.Id);l?l.push(s):(l=[],l.push(s),a.put(s.road.Id,l)),(0,D.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new F.default;return n.Id=this._newTmpId(),n.point=(0,C.default)({},t),t=this._zoneIdGraph.get(e),t.nodeVector.push(n),e=this._zoneIdSimpleDijkstraMap.get(e),e._naviGraph._nodeMap.put(n.Id,t.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){return n?this._insertTmpIsolatedNode(e,t):(n=new F.default,n.Id=this._naviGraph.generateNodeId(),n.point=(0,C.default)({},t),t=this.zoneIdGraph.get(e),e=t.nodeVector,e=this._insertItemToVector(n,e),t._nodeMap.put(n.Id,e),n)}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;oR.default.epsilon())return null}void 0===r&&(r=B.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new U.default;u.startId=t.Id,u.startPoint=t.point,u.endId=n.Id,u.endPoint=n.point,u.pointVector=[t.point,n.point],u.roadRank=1,this._tmpAdjNodeIds.push(t.Id),this._tmpAdjNodeIds.push(n.Id),u.Id=i?this._newTmpId():this._naviGraph.generateRoadId(),u.roadEntry=r,u.calcLength(),a&&this._attachedTempRoads.push(u),a=this._zoneIdGraph.get(e),a.roadVector.push(u);var h,c,a=this._zoneIdSimpleDijkstraMap.get(e);return B.default.NaviRoadEntry_BOTH==r&&(e={nodeId:n.Id,length:u.length},h=a._naviGraph.adjList.get(t.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(t.Id,h)),e={nodeId:t.Id,length:u.length},h=a._naviGraph.adjList.get(n.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(n.Id,h))),B.default.NaviRoadEntry_FORWARD==r&&(h={nodeId:n.Id,length:u.length},c=a._naviGraph.adjList.get(t.Id),c?c.push(h):(c=[],c.push(h),a._naviGraph.adjList(t.Id,c))),B.default.NaviRoadEntry_BACK==r&&(r={nodeId:t.Id,length:u.length},c=a._naviGraph.adjList.get(n.Id),c?c.push(r):(c=[],c.push(r),a._naviGraph.adjList.put(n.Id,c))),u}},{key:"_isPointInPNTModel",value:function(e){var t=this._calcZoneIdByCoord(e),n=this._zonePNTModelsMap.get(t);if(n)for(var r=0;rR.default.epsilon()?l.push.apply(l,(0,y.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._startZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._startZoneId,i._startNode,t))}),s||(0,v.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._startZoneId,e.cross,e.road),i._joinTwoNodes(i._startZoneId,i._startNode,e)}),o==t.size())return p.default.ROUTE_FAILED_NO_DATA_START}if(a){for(var n=null,u=!1,h=0;hR.default.epsilon()?l.push.apply(l,(0,y.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._endZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._endZoneId,i._endNode,t))}),s||(0,v.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._endZoneId,e.cross,e.road),i._joinTwoNodes(i._endZoneId,i._endNode,e)}),o==t.size())return p.default.ROUTE_FAILED_NO_DATA_END}if(a){for(var n=null,u=!1,h=0;hR.default.epsilon()?c.push.apply(c,(0,y.default)(t)):(h=!0,t=a._insertTempNodeToRoad(l,t[0].cross,t[0].road),a._joinTwoNodes(l,i,t))}),h||(0,v.default)(c).call(c,function(e){e=a._insertTempNodeToRoad(l,e.cross,e.road),a._joinTwoNodes(l,i,e)}),u==e.size())return!1}if(o){for(var d=null,f=!1,p=0;pu&&(u=l.area,uR.default.distanceOfTwoPoints(m.cross,n.startPoint)?(a.push(m),a.push(p)):(a.push(p),a.push(m))),a;return a}},{key:"_calcAllAdherance",value:function(e,t,n,r,i,a){for(var o=i||30,s=0;s<360;s+=o){var l=new u.default;this._calcAdherenceAtAngle(e,t,s,n,l,a),1==l.stickToRoad&&r.push(l)}(0,g.default)(r).call(r,this._adherenceCompare)}},{key:"_seekNearRoads",value:function(e,t,n,r,i){var a=new h.default,o=[];for(this._calcAllAdherance(e,t,n,o,r,i);0!=o.length;){var s=o[0],l=a.get(s.road.Id);l?l.push(s):(l=[],l.push(s),a.put(s.road.Id,l)),(0,O.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new F.default;return n.Id=this._newTmpId(),n.point=(0,D.default)({},t),t=this._zoneIdGraph.get(e),t.nodeVector.push(n),e=this._zoneIdDijkstras.get(e),e._naviGraph._nodeMap.put(n.Id,t.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){return n?this._insertTmpIsolatedNode(e,t):(n=new F.default,n.Id=this._naviGraph.generateNodeId(),n.point=(0,D.default)({},t),t=this.zoneIdGraph.get(e),e=t.nodeVector,e=this._insertItemToVector(n,e),t._nodeMap.put(n.Id,e),n)}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;oR.default.epsilon())return null}void 0===r&&(r=B.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new U.default;u.startId=t.Id,u.startPoint=t.point,u.endId=n.Id,u.endPoint=n.point,u.pointVector=[t.point,n.point],this._tmp_adj_node_ids.push(t.Id),this._tmp_adj_node_ids.push(n.Id),u.Id=i?this._newTmpId():this._naviGraph.generateRoadId(),u.roadEntry=r,u.calcLength(),a&&this._attachedTempRoads.push(u),a=this._zoneIdGraph.get(e),a.roadVector.push(u);var h,c,a=this._zoneIdDijkstras.get(e);return B.default.NaviRoadEntry_BOTH==r&&(e={nodeId:n.Id,length:u.length},h=a._naviGraph.adjList.get(t.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(t.Id,h)),e={nodeId:t.Id,length:u.length},h=a._naviGraph.adjList.get(n.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(n.Id,h))),B.default.NaviRoadEntry_FORWARD==r&&(h={nodeId:n.Id,length:u.length},c=a._naviGraph.adjList.get(t.Id),c?c.push(h):(c=[],c.push(h),a._naviGraph.adjList(t.Id,c))),B.default.NaviRoadEntry_BACK==r&&(r={nodeId:t.Id,length:u.length},c=a._naviGraph.adjList.get(n.Id),c?c.push(r):(c=[],c.push(r),a._naviGraph.adjList.put(n.Id,c))),u}},{key:"_isPointInPNTModel",value:function(e){var t=this._calcZoneIdByCoord(e),n=this._zonePNTModelsMap.get(t);if(n)for(var r=0;r=this.size())throw"positon is out of bounder";this._array[e]=t}},{key:"get",value:function(e){var t,n=e;return"string"==typeof e&&(n=(0,a.default)(t=this._names).call(t,e)),this._array[n]}},{key:"toArray",value:function(){for(var e=[],t=0;t