From 5da738cc5768cd2f6551e3398c9a1df40c9e8cf8 Mon Sep 17 00:00:00 2001 From: chenshengle <954534408@qq.com> Date: Fri, 27 Aug 2021 12:30:17 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E3=80=90=E9=87=91=E8=8C=82=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E5=88=9D=E5=A7=8B=E5=8C=96=E3=80=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b5c7243cfde3d957e6ea813b9639c5383ce049e1. --- app.json | 3 +- config/config.js | 2 - index/index.wxml | 18 +- index/passCar.js | 4 +- index/passCar.wxml | 4 +- index/searchbar.js | 150 +++++------ pages/marketAtlas/marketAtlas.js | 6 - pages/marketAtlas/marketAtlas.wxml | 27 +- pages/ques/ques.wxml | 4 +- .../FMAllLayerControl/FMAllLayerControl.js | 28 --- .../FMAllLayerControl/FMAllLayerControl.json | 4 - .../FMAllLayerControl/FMAllLayerControl.wxml | 6 - .../FMAllLayerControl/FMAllLayerControl.wxss | 11 - .../FMAllLayerControl/image/layer.png | Bin 623 -> 0 bytes .../FMAllLayerControl/image/layers.png | Bin 1142 -> 0 bytes .../FMButtonGroupsControl.js | 101 -------- .../FMButtonGroupsControl.json | 4 - .../FMButtonGroupsControl.wxml | 14 -- .../FMButtonGroupsControl.wxss | 23 -- .../FMScrollGroupsControl.js | 112 --------- .../FMScrollGroupsControl.json | 4 - .../FMScrollGroupsControl.wxml | 25 -- .../FMScrollGroupsControl.wxss | 11 - .../FMScrollGroupsControl/image/arrow1.png | Bin 266 -> 0 bytes .../FMScrollGroupsControl/image/arrow2.png | Bin 267 -> 0 bytes .../FMScrollGroupsControl/image/arrow3.png | Bin 259 -> 0 bytes .../FMScrollGroupsControl/image/arrow4.png | Bin 257 -> 0 bytes .../FMScrollGroupsControl/image/layer.png | Bin 623 -> 0 bytes .../FMScrollGroupsControl/image/layers.png | Bin 1142 -> 0 bytes .../FMViewModeControl/FMViewModeControl.js | 38 --- .../FMViewModeControl/FMViewModeControl.json | 4 - .../FMViewModeControl/FMViewModeControl.wxml | 6 - .../FMViewModeControl/FMViewModeControl.wxss | 12 - .../component/FMViewModeControl/image/2D.png | Bin 823 -> 0 bytes .../component/FMViewModeControl/image/3D.png | Bin 823 -> 0 bytes pages2/fengMap/fengMap.js | 232 ------------------ pages2/fengMap/fengMap.json | 10 - pages2/fengMap/fengMap.wxml | 19 -- pages2/fengMap/fengMap.wxss | 13 - pages2/js/fengmap.miniprogram.min.js | 2 - project.config.json | 22 +- 41 files changed, 97 insertions(+), 822 deletions(-) delete mode 100644 pages2/component/FMAllLayerControl/FMAllLayerControl.js delete mode 100644 pages2/component/FMAllLayerControl/FMAllLayerControl.json delete mode 100644 pages2/component/FMAllLayerControl/FMAllLayerControl.wxml delete mode 100644 pages2/component/FMAllLayerControl/FMAllLayerControl.wxss delete mode 100644 pages2/component/FMAllLayerControl/image/layer.png delete mode 100644 pages2/component/FMAllLayerControl/image/layers.png delete mode 100644 pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.js delete mode 100644 pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.json delete mode 100644 pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxml delete mode 100644 pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxss delete mode 100644 pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.js delete mode 100644 pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.json delete mode 100644 pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxml delete mode 100644 pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxss delete mode 100644 pages2/component/FMScrollGroupsControl/image/arrow1.png delete mode 100644 pages2/component/FMScrollGroupsControl/image/arrow2.png delete mode 100644 pages2/component/FMScrollGroupsControl/image/arrow3.png delete mode 100644 pages2/component/FMScrollGroupsControl/image/arrow4.png delete mode 100644 pages2/component/FMScrollGroupsControl/image/layer.png delete mode 100644 pages2/component/FMScrollGroupsControl/image/layers.png delete mode 100644 pages2/component/FMViewModeControl/FMViewModeControl.js delete mode 100644 pages2/component/FMViewModeControl/FMViewModeControl.json delete mode 100644 pages2/component/FMViewModeControl/FMViewModeControl.wxml delete mode 100644 pages2/component/FMViewModeControl/FMViewModeControl.wxss delete mode 100644 pages2/component/FMViewModeControl/image/2D.png delete mode 100644 pages2/component/FMViewModeControl/image/3D.png delete mode 100644 pages2/fengMap/fengMap.js delete mode 100644 pages2/fengMap/fengMap.json delete mode 100644 pages2/fengMap/fengMap.wxml delete mode 100644 pages2/fengMap/fengMap.wxss delete mode 100644 pages2/js/fengmap.miniprogram.min.js diff --git a/app.json b/app.json index 0ca8a0a..59a01be 100644 --- a/app.json +++ b/app.json @@ -80,8 +80,7 @@ "name": "pages2", "independent": false, "pages": [ - "live/livelist/index", - "fengMap/fengMap" + "live/livelist/index" ] } ], diff --git a/config/config.js b/config/config.js index d1b2bb8..34d193c 100755 --- a/config/config.js +++ b/config/config.js @@ -355,8 +355,6 @@ var config = { getRoomList: "/live/roomList", //商城地图 getStoreMap:"/wxMallBuilding/getbuildingfloorlist", - //判断有没有蜂鸟地图 - ifFengMap:'/fengniaomap/getConfig', //分享小程序二维码 getQrcodeFx:"/user/userinfoQrCode", }, diff --git a/index/index.wxml b/index/index.wxml index 80da12a..4d1b6ba 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -52,13 +52,11 @@ 消费卡 - - - - 游戏 + + + + 直播厅 - - - - - 直播厅 + + + 游戏 - diff --git a/index/passCar.js b/index/passCar.js index 85fe744..99b2998 100644 --- a/index/passCar.js +++ b/index/passCar.js @@ -198,7 +198,7 @@ Page({ paySuccess: function () { wx.showModal({ title: '支付成功', - content: '请15分钟内离场', + content: '请尽快离场', showCancel: false }) }, @@ -209,11 +209,9 @@ Page({ }) }, bindfail: function (res) { - console.log(123) console.log(res) }, gotoCarMini: function (e) { - console.log(478) var that = this // etcp parkVendor1 // 泊链停车 parkVendor5 diff --git a/index/passCar.wxml b/index/passCar.wxml index 576abf3..064975e 100644 --- a/index/passCar.wxml +++ b/index/passCar.wxml @@ -26,7 +26,7 @@ - 使用停车券: + 优惠券: {{quantitle}} {{totalTicketNum}}张可用 @@ -78,8 +78,6 @@ 立即支付 - - 立即支付 diff --git a/index/searchbar.js b/index/searchbar.js index 556726e..8c26e4e 100644 --- a/index/searchbar.js +++ b/index/searchbar.js @@ -1,4 +1,4 @@ -const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" +const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" const Http = require("../utils/HttpBasics"); const imgurl = require("../utils/imgurl"); const config = require("../config/config"); @@ -11,49 +11,20 @@ Page({ data: { navigationBarHeight, lists: [], - merchantVoList: [], + merchantVoList:[], indexId: 0, - businessId: 0, - windowHeight: "", - page: 1, - isFirstPage: false, - isLastPage: false, + businessId:0, + windowHeight:"", + page:1, + isFirstPage:false, + isLastPage:false, teljpgUrl: imgurl.teljpg.url, - map: imgurl.map.url, //商场地图 - mapUrl: '/pages/marketAtlas/marketAtlas', //跳转地图的路径 - }, - getFemgMap() { //判断时候对接封了地图 - Http.get({ - url: config.api.ifFengMap - }).then(res => { - if (res.data) { // - let initMpa = { - appName: res.data.appName, - key: res.data.appKey, - defaultThemeName: res.data.themeId, - tenantId: res.data.tenantId, - mapId: res.data.mapId - } - console.log(initMpa, "initMpa") - this.setData({ - mapUrl: `/pages2/fengMap/fengMap?initMap=${JSON.stringify(initMpa)}` - }) - } else { - this.setData({ - mapUrl: "/pages/marketAtlas/marketAtlas" - }) - - } - }).catch(err => { - this.setData({ - mapUrl: "/pages/marketAtlas/marketAtlas" - }) - }) + map: imgurl.map.url,//商场地图 }, //跳转到地图 - goMap() { + goMap(){ wx.navigateTo({ - url: this.data.mapUrl, + url: '/pages/marketAtlas/marketAtlas', }) }, // 左侧点击事件 @@ -65,11 +36,11 @@ Page({ businessId: index }); that.setData({ - page: 1 + page:1 }) that.getList(1, that.data.businessId); }, - goSearchBar() { + goSearchBar(){ wx.navigateTo({ url: '/pages/searchbar/searchbar', }) @@ -77,7 +48,7 @@ Page({ /** * 跳转到门店列表的详情页面 */ - gotoDetail(e) { + gotoDetail(e){ wx.navigateTo({ url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` }) @@ -85,7 +56,7 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) { + onLoad: function (options) { let that = this; that.getBussiness(); that.getList(1, 0); @@ -93,8 +64,7 @@ Page({ title: '加载中...', }) }, - onShow() { - this.getFemgMap() + onShow(){ let that = this; if (typeof this.getTabBar === 'function' && that.getTabBar()) { @@ -103,47 +73,43 @@ Page({ }) }; wx.getSystemInfo({ - success: function(res) { + success: function (res) { that.setData({ - windowHeight: res.windowHeight + windowHeight: res.windowHeight }) }, }) }, - getBussiness: function() { + getBussiness:function(){ let that = this; Http.get({ - url: config.api.businessList, - data: { - filter: 1 - } - }).then(res => { - that.setData({ - lists: [{ - id: 0, - title: "全部", - type: 1 - }].concat(res.data) - }); - }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) + url: config.api.businessList, + data:{ + filter:1 + } + }).then(res => { + that.setData({ + lists: [{ id: 0, title: "全部", type: 1 }].concat(res.data) + }); + }) + .catch(err => { + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) }, - getList: function(page, businessId) { + getList: function (page, businessId) { let that = this; let data; - if (businessId == 0) { + if(businessId == 0){ data = { pageNum: page, pageSize: 8 } - } else { + }else{ data = { pageNum: page, pageSize: 8, @@ -151,25 +117,25 @@ Page({ } } Http.get({ - url: config.api.merchantList, - data: data - }).then(res => { - wx.hideLoading(); - if (page == 1) { - that.setData({ - merchantVoList: [], - }) - } - var tmpArr = that.data.merchantVoList; - tmpArr.push.apply(tmpArr, res.data.list); - // console.log(tmpArr) + url: config.api.merchantList, + data: data + }).then(res => { + wx.hideLoading(); + if (page == 1) { that.setData({ - merchantVoList: tmpArr, - isFirstPage: res.data.isFirstPage, - isLastPage: res.data.isLastPage + merchantVoList: [], }) - // console.log(that.data.merchantVoList) + } + var tmpArr = that.data.merchantVoList; + tmpArr.push.apply(tmpArr, res.data.list); + // console.log(tmpArr) + that.setData({ + merchantVoList: tmpArr, + isFirstPage: res.data.isFirstPage, + isLastPage: res.data.isLastPage }) + // console.log(that.data.merchantVoList) + }) .catch(err => { wx.hideLoading(); wx.showToast({ @@ -180,7 +146,7 @@ Page({ }); }) }, - phone: function(e) { + phone: function (e) { let that = this; if (e.currentTarget.dataset.merchantlinkphone) { wx.makePhoneCall({ @@ -191,7 +157,7 @@ Page({ /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function() { + onReachBottom: function () { let that = this; that.data.page++; that.setData({ @@ -200,8 +166,8 @@ Page({ console.log(that.data.page); // 如果是最后一页 //就不发送请求 - if (!that.data.isLastPage || that.data.isFirstPage && that.data.isLastPage) { + if (!that.data.isLastPage || that.data.isFirstPage && that.data.isLastPage){ that.getList(that.data.page, that.data.businessId); } } -}) \ No newline at end of file +}) diff --git a/pages/marketAtlas/marketAtlas.js b/pages/marketAtlas/marketAtlas.js index 9cb4d9a..05fd108 100644 --- a/pages/marketAtlas/marketAtlas.js +++ b/pages/marketAtlas/marketAtlas.js @@ -13,7 +13,6 @@ Page({ tierFalg:0,//楼层标识 dataLsit:[],//楼层信息 tmpePicture:'',//零时存放 图片 - url:"", }, lookimg(){ app.globalData.previewFlag = true @@ -22,7 +21,6 @@ Page({ urls: [this.data.tmpePicture] // 需要预览的图片http链接列表 }) }, - setFalgFloor(e){//设置选中楼层 let index = e.currentTarget.dataset.index this.setData({ @@ -90,10 +88,6 @@ Page({ */ onLoad: function (options) { this.getStoreMap() - this.setData({ - url: config.url +'/wapmaphtml/index.html' - }) - console.log(this.data.url,"url") }, /** diff --git a/pages/marketAtlas/marketAtlas.wxml b/pages/marketAtlas/marketAtlas.wxml index e97b17c..af074a9 100644 --- a/pages/marketAtlas/marketAtlas.wxml +++ b/pages/marketAtlas/marketAtlas.wxml @@ -2,25 +2,24 @@ - - - - {{item.floorName}} - + + + + {{item.floorName}} + + + + {{item.buildingName}} + + - - {{item.buildingName}} - - - - + - + 该商场暂未配置 - - + \ No newline at end of file diff --git a/pages/ques/ques.wxml b/pages/ques/ques.wxml index 3806045..e1a0644 100644 --- a/pages/ques/ques.wxml +++ b/pages/ques/ques.wxml @@ -3,7 +3,7 @@ Q我怎么添加车牌呢? - 首次使用“停车缴费”的用户需绑定车牌号,即可为车辆进行缴费 。您可以最多添加四张车牌。 + 首次使用“停车缴费”的用户需绑定车牌号,即可为车辆进行缴费 。您可以最多添加三张车牌。 Q有哪些方式可以支持停车费? @@ -31,7 +31,7 @@ Q我为什么绑定(解绑)不了车牌? - 每位用户最多可同时绑定四张车牌。当您绑定的车牌在停车场内是无法解绑车牌的,支付离场后才可以进行变更哦! + 每位用户最多可同时绑定三张车牌。当您绑定的车牌在停车场内是无法解绑车牌的,支付离场后才可以进行变更哦! Q每个用户可以绑定几个车牌? diff --git a/pages2/component/FMAllLayerControl/FMAllLayerControl.js b/pages2/component/FMAllLayerControl/FMAllLayerControl.js deleted file mode 100644 index 45eb3af..0000000 --- a/pages2/component/FMAllLayerControl/FMAllLayerControl.js +++ /dev/null @@ -1,28 +0,0 @@ -// component/FMAllLayerControl/FMAllLayerControl.js -Component({ - /** - * 组件的属性列表 - */ - properties: { - allLayer: { - type: Boolean, - } - }, - - /** - * 组件的初始数据 - */ - data: { - btnUrl: './image/', - }, - - /** - * 组件的方法列表 - */ - methods: { - // 切换单多层 - switchLayers: function () { - this.triggerEvent('switchLayers'); - }, - } -}) diff --git a/pages2/component/FMAllLayerControl/FMAllLayerControl.json b/pages2/component/FMAllLayerControl/FMAllLayerControl.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages2/component/FMAllLayerControl/FMAllLayerControl.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages2/component/FMAllLayerControl/FMAllLayerControl.wxml b/pages2/component/FMAllLayerControl/FMAllLayerControl.wxml deleted file mode 100644 index 1239001..0000000 --- a/pages2/component/FMAllLayerControl/FMAllLayerControl.wxml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pages2/component/FMAllLayerControl/FMAllLayerControl.wxss b/pages2/component/FMAllLayerControl/FMAllLayerControl.wxss deleted file mode 100644 index 2422a47..0000000 --- a/pages2/component/FMAllLayerControl/FMAllLayerControl.wxss +++ /dev/null @@ -1,11 +0,0 @@ -/* component/FMAllLayerControl/FMAllLayerControl.wxss */ -.fm-control-layer { - width: 84rpx; - position: absolute; - background-color: white; - box-shadow: rgba(0, 0, 0, 0.3) 4rpx 4rpx 6rpx; - border-radius: 4rpx; - top: 328rpx; - left: 40rpx; - z-index: 1; -} \ No newline at end of file diff --git a/pages2/component/FMAllLayerControl/image/layer.png b/pages2/component/FMAllLayerControl/image/layer.png deleted file mode 100644 index 54a034dfdee2038b2b2f4aaee80e54b608abd653..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 623 zcmeAS@N?(olHy`uVBq!ia0vp^S|H593?x6vT4n+%mUKs7M+SzC{oH>NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fF5l(-b&6XFV_<(hsC8wB)@ zPs&SfAmvgLdas-(ud^`Fu2%*5BZ11DVOSfz=DiJO)29pbXwxg+*KL;H08 z`Brs|j^Zo=LShG(288(BVdeGk@Jcich&sk9Eih@SbEt;W`Ug$I8d{pltbJYFaSOTv zR<*@1?Y5f4Y+~|J7Q#E^ngteBXpr5|Og2z5L4g?x-ePCv&)^hu?{NiCyDq!$*^>bP0 Hl+XkK;LH36 diff --git a/pages2/component/FMAllLayerControl/image/layers.png b/pages2/component/FMAllLayerControl/image/layers.png deleted file mode 100644 index f85d47daa22897f8462731b3e41b1e26790cd160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1142 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxKmUKs7M+SzC{oH>NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fHRz`&Rt;1l8sR3O*%YZTEs z1c2epGGj^&kSZ?;@(X5A>v_Q*zVDw(=S$Ym-Ae62JO3)QJk!{+_2#SBfzLyBDYNZW z?T*~P{>-}Gw`(6iZI+KY6m4_Sk6FgwYQeWBjj{rHSN?4F5nS~BQJu6AbUyPp9&HI{NY6M4%HGlf2zs7&=&G zJ%Aj}0*}aI1_o{+5N5n|x9$&6!BbBc#}JFtXG4BkGdW7cY2AMKN+58`Bo`IINdbLc z3!OdBaS1-1Q-A;5nOirvh5mi=@!y8?HTS>2`+cTH-1V<=NvXHW-PpGgL6Q8t5*KWZ zGP!5PEM$?H!nM=F`|54?X0{8pdsnGN{cm9Da4@=XU%_m}wTAcwf&BkYWR*HEP;D!T zYFj3Mtzp}Ro)?j+)8GGN{NlFAFz5Ip!3_B~)w3rROZY3?T>Nmn4`hAV2wte(rtGm21#rcEDZ0pm-*D4<}J^#3<;H2f}^qp@+v+lf}9eplZ zXX@pbMJrEO=H;&oe0=ZjVi((xjx|$Ktm7*kGV5xT4u{s(3EunpbSIZ`#f~43XRW@< zxjOE&qM^|`jyFsz_U%jj{Z_P-Q;cC+YWS(&$DcnxZk=Vaaca{6y_M_rZJ74!X#RO{ m?wTCaW)J4K;xFSLNpE5iU-R|$2@7B gd.gid === gid); - if (group) { - this.setData({ - focusGroupName: group.gname - }) - - console.log(group.gname); - } - } - - } -}) diff --git a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.json b/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxml b/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxml deleted file mode 100644 index d6df878..0000000 --- a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxml +++ /dev/null @@ -1,14 +0,0 @@ - - - {{focusGroupName}} - - - - - - {{item.gname}} - - - - - \ No newline at end of file diff --git a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxss b/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxss deleted file mode 100644 index af6157f..0000000 --- a/pages2/component/FMButtonGroupsControl/FMButtonGroupsControl.wxss +++ /dev/null @@ -1,23 +0,0 @@ -/* component/FMScrollGroupsControl/FMScrollGroupsControl.wxss */ -.fm-control-groups-btn { - width: 84rpx; - height: 84px; - position: absolute; - background-color: white; - box-shadow: rgba(0, 0, 0, 0.3) 4rpx 4rpx 6rpx; - border-radius: 4rpx; - top: 40rpx; - left: 40rpx; - z-index: 1; -} - -.fm-layer-list { - width: 84rpx; - position: absolute; - background-color: white; - box-shadow: rgba(0, 0, 0, 0.3) 4rpx 4rpx 6rpx; - border-radius: 4rpx; - top: 184rpx; - left: 40rpx; - z-index: 1; -} \ No newline at end of file diff --git a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.js b/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.js deleted file mode 100644 index deb6e48..0000000 --- a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.js +++ /dev/null @@ -1,112 +0,0 @@ -// component/FMScrollGroupsControl/FMScrollGroupsControl.js -Component({ - /** - * 组件的属性列表 - */ - properties: { - //楼层数组 - groupIDs: { - type: Array, - value: null - }, - //视野内显示多少个按钮,可手触上下滚动 - showBtnCount: { - type: Number, - value: 0, - observer: function (newVal, oldVal) { - // console.log('height----', this.properties.showBtnCount * 84); - if (this.properties.showBtnCount < this.properties.groupIDs.length) { - this.setData({ - needArrow: true, - scrollHeight: this.properties.showBtnCount * 84 - }) - } - } - }, - //当前的聚焦楼层id - focusGroupID: { - type: Number, - value: 1, - observer: function (newVal, oldVal) { - console.log("focusGroupID") - this._setArrowBtnStatus(this.properties.focusGroupID); - } - }, - allLayer: { - type: Boolean - } - }, - - /** - * 组件的初始数据 - */ - data: { - btnUrl: './image/', - scrollHeight: 250, - isTop: false, - isBottom: true, - needArrow: false - }, - - /** - * 组件的方法列表 - */ - methods: { - /** - * 切换聚焦楼层 - * @param {*} e - */ - switchGroup: function (e) { - let focusId = e.currentTarget.dataset.gid; - this.triggerEvent('switchGroup', focusId); - - this._setArrowBtnStatus(focusId); - }, - - /** - * 设置上下箭头按钮的状态 - * @param {*} focusId 聚焦楼层id - */ - _setArrowBtnStatus: function (focusId) { - if (focusId === 1) { - this.setData({ - isBottom: true - }) - } else if (focusId === this.properties.groupIDs.length - 1) { - this.setData({ - isTop: true - }) - } else { - this.setData({ - isTop: false, - isBottom: false - }) - } - }, - - /** - * 切换单层多层 - */ - switchLayers: function () { - this.triggerEvent('switchLayers'); - }, - - /** - * 向上切换楼层 - */ - goTop: function () { - let gid = this.properties.focusGroupID + 1; - this.triggerEvent('switchGroup', gid); - this._setArrowBtnStatus(gid); - }, - - /** - * 向下切换楼层 - */ - goBottom: function () { - let gid = this.properties.focusGroupID - 1; - this.triggerEvent('switchGroup', gid); - this._setArrowBtnStatus(gid); - } - } -}) diff --git a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.json b/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.json deleted file mode 100644 index e8cfaaf..0000000 --- a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxml b/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxml deleted file mode 100644 index bd92ebf..0000000 --- a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - {{item.gname}} - - - - - - - - - - \ No newline at end of file diff --git a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxss b/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxss deleted file mode 100644 index 6c36f7a..0000000 --- a/pages2/component/FMScrollGroupsControl/FMScrollGroupsControl.wxss +++ /dev/null @@ -1,11 +0,0 @@ -/* component/FMScrollGroupsControl/FMScrollGroupsControl.wxss */ -.fm-control-groups { - width: 84rpx; - position: absolute; - background-color: white; - box-shadow: rgba(0, 0, 0, 0.3) 4rpx 4rpx 6rpx; - border-radius: 4rpx; - /* top: 40rpx; */ - bottom: 350rpx; - right: 40rpx; -} \ No newline at end of file diff --git a/pages2/component/FMScrollGroupsControl/image/arrow1.png b/pages2/component/FMScrollGroupsControl/image/arrow1.png deleted file mode 100644 index 956d052f7c8a08a1e0606bc79738351ff29ed45b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^AT}EZ8<70wy$! zfk$L90|U1Z2s2)~TlWVjnCI!@7{YPA_UuC5Lje-47lS>rIJs?Dr41Yf=PvaQ`J;Tm zD8Y(hO~6&&toeubD8zAw*IAxi8r5a9}TjwTp)g0nJJ}E3_+Qzy2 z4P5OW^cH`$5Z_~_`AN<{=I_0hy7u4lEV6m>CwEJQPWv~r4CE|NS3j3^P6wy$! zfk$L90|U1Z2s2)~TlWVjnD6Q07{YPA_WVZPLk0}27sbW%ZXOWTHei|3p&FFJDlW&g z?IcSML#UWT9xto!gaC(~pZ=Nd_g*^pV)Sz%gM^q)Hy+s~m&|q~?e56C;cIz~A-GSp z`pWtjjfeMe%3D9JI4-DfQ#k8xeNbkt*4yWIqz@dFz1}IL3i2I;r>mdKI;Vst0FH)I A#Q*>R diff --git a/pages2/component/FMScrollGroupsControl/image/arrow3.png b/pages2/component/FMScrollGroupsControl/image/arrow3.png deleted file mode 100644 index 6803884e078263703d5e9f6149a846e41788849d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^AT}EZ8<70wy$! zfk$L90|U1Z2s2)~TlWVjnC|J~7{YPA_N*cAp#%w*3*iC*!dn@btOVxNteoekzLY1l zf%$_&0E74856(M2zEgFdtP(tF<=fqCy%8S{?Ob(De@4my(Z6A~1#4FQW>wy$! zfk$L90|U1Z2s2)~TlWVjnCj``7{YPA_Pil4lOu!6#qH?~E)C2EOiE_q4Re&0*?1Bj zx;XH2p3P%^vg}Xg*(oZ*Zl`ziSUlX-kY^$8vFVWPZGDsE`0Uy#ag%bS;NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fF5l(-b&6XFV_<(hsC8wB)@ zPs&SfAmvgLdas-(ud^`Fu2%*5BZ11DVOSfz=DiJO)29pbXwxg+*KL;H08 z`Brs|j^Zo=LShG(288(BVdeGk@Jcich&sk9Eih@SbEt;W`Ug$I8d{pltbJYFaSOTv zR<*@1?Y5f4Y+~|J7Q#E^ngteBXpr5|Og2z5L4g?x-ePCv&)^hu?{NiCyDq!$*^>bP0 Hl+XkK;LH36 diff --git a/pages2/component/FMScrollGroupsControl/image/layers.png b/pages2/component/FMScrollGroupsControl/image/layers.png deleted file mode 100644 index f85d47daa22897f8462731b3e41b1e26790cd160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1142 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxKmUKs7M+SzC{oH>NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fHRz`&Rt;1l8sR3O*%YZTEs z1c2epGGj^&kSZ?;@(X5A>v_Q*zVDw(=S$Ym-Ae62JO3)QJk!{+_2#SBfzLyBDYNZW z?T*~P{>-}Gw`(6iZI+KY6m4_Sk6FgwYQeWBjj{rHSN?4F5nS~BQJu6AbUyPp9&HI{NY6M4%HGlf2zs7&=&G zJ%Aj}0*}aI1_o{+5N5n|x9$&6!BbBc#}JFtXG4BkGdW7cY2AMKN+58`Bo`IINdbLc z3!OdBaS1-1Q-A;5nOirvh5mi=@!y8?HTS>2`+cTH-1V<=NvXHW-PpGgL6Q8t5*KWZ zGP!5PEM$?H!nM=F`|54?X0{8pdsnGN{cm9Da4@=XU%_m}wTAcwf&BkYWR*HEP;D!T zYFj3Mtzp}Ro)?j+)8GGN{NlFAFz5Ip!3_B~)w3rROZY3?T>Nmn4`hAV2wte(rtGm21#rcEDZ0pm-*D4<}J^#3<;H2f}^qp@+v+lf}9eplZ zXX@pbMJrEO=H;&oe0=ZjVi((xjx|$Ktm7*kGV5xT4u{s(3EunpbSIZ`#f~43XRW@< zxjOE&qM^|`jyFsz_U%jj{Z_P-Q;cC+YWS(&$DcnxZk=Vaaca{6y_M_rZJ74!X#RO{ m?wTCaW)J4K;xFSLNpE5iU-R|$2@7B - - - - - \ No newline at end of file diff --git a/pages2/component/FMViewModeControl/FMViewModeControl.wxss b/pages2/component/FMViewModeControl/FMViewModeControl.wxss deleted file mode 100644 index 07c703b..0000000 --- a/pages2/component/FMViewModeControl/FMViewModeControl.wxss +++ /dev/null @@ -1,12 +0,0 @@ -/* component/FMViewModeControl/FMViewModeControl.wxss */ -.fm-control-mode { - width: 84rpx; - height: 84rpx; - position: absolute; - background-color: white; - box-shadow: rgba(0, 0, 0, 0.3) 4rpx 4rpx 6rpx; - border-radius: 4rpx; - bottom: 700rpx; - right: 40rpx; - z-index: 1; -} \ No newline at end of file diff --git a/pages2/component/FMViewModeControl/image/2D.png b/pages2/component/FMViewModeControl/image/2D.png deleted file mode 100644 index 337ba3b916d4c315df00418bf6be0035fa8d67bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 823 zcmeAS@N?(olHy`uVBq!ia0vp^Y9P$P3?%12mYf5mSkfJR9T^xl_H+M9WCijSl0AZa z85pX73L9D&7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+081EY9=Plzi}LE0!l4FO=7 z+>x0j2c)7)g8YIRSR(c*hLy&Urk_h*#6=Bq1vy$w%70e zyOXGTSWYyc|MZ_{D|3>0-CNFiD|HC`?b?$eWvNzGq4B$&LneFo%}XYN(W}3dpPA{h zD%4oLu<#tv8pb4VcNc~ZR#^`qhqJ&VvY3H^TL^?1FWs&C15_a9>Eak-ar)}T$lyZ; z0_-1LS5}C;>J$|fU9tU9?G~kbOnMPpxAgx0yT3iN@JhQ{>KwZl{}m_C{4?pS8pD6} zm5m3t7)_bD_~FEhhNiPGA5&LbzRWd4&3^THQ6}54Qxy^gLH^j%?-%`W)=yJ~2#!20m z-|jL~=uhpQ`n>ohL#wpP8Rmqr69-Z!t(y0Ew(T*0(c@nx95qT~+VeO)(Djany^#%O9ub| diff --git a/pages2/component/FMViewModeControl/image/3D.png b/pages2/component/FMViewModeControl/image/3D.png deleted file mode 100644 index 218015f7bcaea8e6bbd7f77834960b75e6567302..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 823 zcmeAS@N?(olHy`uVBq!ia0vp^Y9P$P3?%12mYf5mSkfJR9T^xl_H+M9WCijSl0AZa z85pX73L9D&7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+081EY9=Plzi}fn3wCQG^@< zz%V&>(c~VGiY^KA3ua)6*tZ}}laVX;-qV`i6TjYWEVE)4X?%S(fz4t2hwq1Kzxvu< zzx(e_qUvEe(SZKbf1a((N#=ELIp?j^A@H|rPllAGT2+O{?{*HE?A|Xp=oILZ-q_b)a z|J7GE9^7IyW#Zz86E7N?&c1w1U2XX?*9 { - const canvas = res[0].node; - this.canvas = canvas - - wx.createSelectorQuery().select("#temp").node().exec((tempRes) => { - const tmpCanvas = tempRes[0].node; - - const fmapID = this.data.initMap.mapId; - - const mapOptions = { - //必要,地图容器 - canvas: canvas, - // 必要,2d画布 - tempCanvas: tmpCanvas, - // 地图默认旋转角度 - defaultControlsPose: 90, - // 地图默认倾斜角 - defaultTiltAngle: 60, - // 初始二维/三维状态,默认3D显示 - defaultViewMode: this.data.is3D ? fengmap.FMViewMode.MODE_3D : fengmap.FMViewMode.MODE_2D, - // 设置初始指南针的偏移量 - compassOffset: [40, 40], - // 设置指南针大小 - compassSize: 48, - //必要,地图应用名称,通过蜂鸟云后台创建 - appName: this.data.initMap.appName, - //必要,地图应用密钥,通过蜂鸟云后台获取 - key: this.data.initMap.key, - mapServerURL: config.url + `/fengniaoMapfile/${this.data.initMap.tenantId}/${this.data.initMap.mapId}`, - mapThemeURL: config.url + `/fengniaoMapfile/${this.data.initMap.tenantId}/theme/`, - defaultThemeName: this.data.initMap.defaultThemeName, - defaultMapScaleLevel:19, - - // compassOffset:[28,100] - }; - console.log(mapOptions,"mapOptions") - - //初始化地图对象 - this.fmap = new fengmap.FMMap(mapOptions); - - //打开Fengmap服务器的地图数据和主题 - this.fmap.openMapById(fmapID, function (error) { - //打印错误信息 - // console.log(error); - }); - - //地图加载完成事件 - this.fmap.on('loadComplete', () => { - console.log('地图加载完成'); - - this.setData({ - mapLoaded: true - }) - - // 设置楼层数据 - this.loadScrollFloorCtrl(); - - // 显示指北针 - this.showCompass(); - }) - }) - }) - }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - if (this.fmap) { - this.fmap.dispose(); - this.fmap = null; - } - }, - // 手指触摸动作开始 - touchStart(e) { - this.canvas.dispatchTouchEvent({ - ...e, - type: 'touchstart' - }) - }, - // 手指触摸后移动 - touchMove(e) { - this.canvas.dispatchTouchEvent({ - ...e, - type: 'touchmove' - }) - }, - // 手指触摸动作结束 - touchEnd(e) { - this.canvas.dispatchTouchEvent({ - ...e, - type: 'touchend' - }) - }, - - /** - * 显示指北针 - */ - showCompass() { - /** - * 显示指北针,设置背景色需要在加载指北针之前设置 - * */ - // this.fmap.compass.setBgImage('../../images/compass_bg.png'); //设置背景图片 - // this.fmap.compass.setFgImage('../../images/compass_fg.png'); //设置前景图片 - this.fmap.showCompass = true; - - // 点击指北针事件, 使角度归0 - this.fmap.on('mapClickCompass', () => { - this.fmap.rotateTo({ - //设置角度 - to: 0, - //动画持续时间,默认为。3秒 - duration: 0.3, - callback: function () { //回调函数 - console.log('rotateTo complete!'); - } - }) - }); - }, - - /** - * 2D/3D切换 - */ - changeMode() { - if (this.fmap) { - if (!this.data.is3D) { - // 切换地图为三维模式 - this.fmap.viewMode = fengmap.FMViewMode.MODE_3D; - } else { - // 切换地图为二维模式 - this.fmap.viewMode = fengmap.FMViewMode.MODE_2D; - } - } - //更改状态 - this.setData({ - is3D: !this.data.is3D - }) - }, - - - /////////////////////////////////////////////// - // 楼层控件回调事件(start) - ////////////////////////////////////////////// - // 设置楼层数据 - loadScrollFloorCtrl: function () { - // 获取楼层id - let groupIDs = []; - this.fmap.listGroups.map((ls) => { - let obj = { - alias: ls.alias, - gid: ls.gid, - gname: ls.gname - } - groupIDs.push(obj); - return obj; - }); - - this.setData({ - mapGroupIDs: groupIDs.reverse(), - focusGroupID: this.fmap.focusGroupID - }) - - }, - // 切换楼层 - switchGroup(e) { - if (this.fmap) { - this.fmap.focusGroupID = e.detail; - this.setData({ - focusGroupID: e.detail - }) - } - }, - - /** - * 切换单、多层 - * @param {*} e - */ - switchLayers() { - if (this.fmap) { - if (!this.data.isAllLayer) { - this.fmap.visibleGroupIDs = this.fmap.groupIDs; - } else { - this.fmap.visibleGroupIDs = [this.fmap.focusGroupID]; - } - } - //更改状态 - this.setData({ - isAllLayer: !this.data.isAllLayer - }) - } - - /////////////////////////////////////////////// - //楼层控件回调事件(end) - ////////////////////////////////////////////// -}) \ No newline at end of file diff --git a/pages2/fengMap/fengMap.json b/pages2/fengMap/fengMap.json deleted file mode 100644 index 01d1c58..0000000 --- a/pages2/fengMap/fengMap.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationBarTitleText": "UI控件", - "usingComponents": { - "FMScrollGroupsControl": "../component/FMScrollGroupsControl/FMScrollGroupsControl", - "FMButtonGroupsControl": "../component/FMButtonGroupsControl/FMButtonGroupsControl", - "FMViewModeControl": "../component/FMViewModeControl/FMViewModeControl", - "FMAllLayerControl": "../component/FMAllLayerControl/FMAllLayerControl", - "navbar": "../../components/navbar/navbar" - } -} \ No newline at end of file diff --git a/pages2/fengMap/fengMap.wxml b/pages2/fengMap/fengMap.wxml deleted file mode 100644 index 95a99de..0000000 --- a/pages2/fengMap/fengMap.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages2/fengMap/fengMap.wxss b/pages2/fengMap/fengMap.wxss deleted file mode 100644 index c833b23..0000000 --- a/pages2/fengMap/fengMap.wxss +++ /dev/null @@ -1,13 +0,0 @@ -/* pages/FMController/index.wxss */ -.container { - height: 100vh; - overflow: hidden; -} -#temp{ - position: fixed; - top:0; - left: -100%; -} -page{ - padding-bottom:0; -} \ No newline at end of file diff --git a/pages2/js/fengmap.miniprogram.min.js b/pages2/js/fengmap.miniprogram.min.js deleted file mode 100644 index 13b0ff4..0000000 --- a/pages2/js/fengmap.miniprogram.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! Released Version 0.9.1,BUILD 137. 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(268)},function(e){function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t},function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=t},function(e,t,n){var i=n(194);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,a=e.x,o=e.y,s=t.x,l=t.y,u=s-a,h=l-o,c=u*u+h*h;return ci||e.yo)}},{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)<=V)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,f=u-s,p=d*d+f*f,m=h-o,v=c-s,g=m*m+v*v;if(G.isZero(p))return!!G.isZero(g)||gr[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,v=c-s,g=d-l,y=v*v+g*g,_=c-u,x=d-h,w=_*_+x*x;if(G.isZero(m))return(G.isZero(y)||yr[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),v=m*(u-c)+d;return i.y=v,i.x=u,!(vo)return!1;var g=(p-d)/(f-c),y=g*(u-c)+d;return i.y=y,i.x=u,!(he);n++);}}]),e}(),c=h;t.default=c},function(e,t,n){var r=n(98),i=n(82);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(29),i=n(39),a=n(81);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(73),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,s=new fm.Vector3(e[r],e[r+1],0),l=new fm.Vector3(e[i],e[i+1],0),u=(new fm.Vector3).copy(o).sub(s),h=(new fm.Vector3).copy(l).sub(o),c=u.cross(h);return 0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function S(e,t){var n;if(e){if("string"==typeof e)return A(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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);nl.distance?l:u:u[0]?u:l[0]?l:[]}},{key:"getFacility",value:function(e,t,n,r,i){var a=this._scenes[e];if(!a)return[];var o=a.getFacilityByFilter(t,i);this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type;for(var s=this._raycaster.intersectObjects(o),l=0;ls[l-d].object.material.priority;d++){var f=s[l-c],p=s[l-d];s[l-d]=f,s[l]=p,c++}}return s}},{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){var r=new f.default(t,e,this);r.parent=this,this._scenes[t+""]=r,this._scenes[t+""].theme=n}},{key:"checkMaterialAlpha",value:function(e,t){var n;if(e)if(this._focusAlphaMode&&t!==this._map.currentFocusGroup&&(0,x.default)(n=this._map.otherFocus).call(n,t)<0){if((0,P.default)(e.material)){var r,i=O(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;oh;if(n){switch(e){case"extent":r.renderNodeInited?d.checkMaterialAlpha(r.renderNode,l.eid):d.createExtent(r,c,l.eid);break;case"model":r.renderNodeInited?(d.checkMaterialAlpha(r.renderNode,l.eid),d.checkMaterialAlpha(r.line,l.eid)):d.createModel(r,c,l.eid);break;case"label":r.renderNodeInited?d.checkMaterialAlpha(r._renderNode,l.eid):r.tryInit||d.createLabel(r,c,y,l.eid);break;case"facility":r.renderNodeInited?d.checkMaterialAlpha(r._renderNode,l.eid):d.createFacility(r,c,l.eid);break;case"externalModel":if(r.renderNodeInited)d.checkMaterialAlpha(r._renderNode,l.eid);else{var i=r.bdata,a=r.gdata,o=f.getExteralModelTheme(i.fid);if(!o)return;d._externalLoader.preLoadModels[o.normalid]||(d._externalLoader.preLoadModels[o.normalid]={loaded:!1,isLoading:!1,modelUrl:o.model,model:null,geometry:null,material:null});var s=d._externalLoader.preLoadModels[o.normalid];s.loaded?d.createExterModel(s.geometry,s.material,a,i,o,r,p,m,l.height,v,g,s.isGltf):(d._externalLoader.waitingBacks[o.normalid]?d._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){d.createExterModel(e,t,a,i,o,r,p,m,l.height,v,g,"js"!==n)},i.fid):d._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){d.createExterModel(e,t,a,i,o,r,p,m,l.height,v,g,"js"!==n)},i.fid),s.isLoading||d._externalLoader.load(o.normalid))}}r.checkByFrustum(u)}else r.visible=!1})},o=O(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,i=this._scenes[""+t].center.x,a=this._scenes[""+t].center.y,o=this._scenes[""+t].mapcenter.x,s=this._scenes[""+t].mapcenter.y,l=this._scenes[""+t].theme,u=e.gdata,h=e.bdata;this._map.MapOptions.useStoreApply&&(r=l.getStoreApplyTheme(h.fid)),r=r||l.getModelTheme(h);var c=null,c=1===this._map.dataManager.file_ver?C.default.convertGeo2Geometry(u.geo):C.default.convertArray2Geometry(u.idxs,u.pts);e._data=c;var d=u.height&&-1!==u.height?u.height:2,f=this.createGeometry(c,d,t),p=this._materialManager.createNormalMaterial(r);e._geometry=f;var m,v,g=this.isNeedSweep;this.isNeedSweep&&(fm.ShaderLib.physical.vertexShader=M.vertexShader,fm.ShaderLib.physical.fragmentShader=T.fragmentShader,(0,y.default)(fm.ShaderLib.physical.uniforms,{maxPos:{value:this.sweepMax},minPos:{value:this.sweepMin},relativeModelMatrix:{value:void 0}})),e.initMesh(p,new fm.Vector3(i,a+d,0),g),e.x=o,e.y=s,e.height=d,e.currHeight=d,this.checkMaterialAlpha(e.renderNode,n),e.initLine(this._materialManager.createLineMaterial(r),u.height),this.checkMaterialAlpha(e.line,n),r.image&&r.sizes&&(m=r.sizes.split(","),v=[],r.coords&&(v=r.coords.split(",")),e.addStoreImage({image:r.image?this._map.MapOptions.mapThemeURL+"/"+this._map.MapOptions.defaultThemeName+"/"+r.image:"",angle:r.angle?r.angle:0,size:[(0,k.default)(m[0]),(0,k.default)(m[1])],mapCoord:r.coords?new fm.Vector2((0,k.default)(v[0]),(0,k.default)(v[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?C.default.convertGeo2Geometry(r.geo):C.default.convertArray2Geometry(r.idxs,r.pts);e._geometry=this.createGeometry(u,r.height?r.height:1,t),e.x=s,e.y=l;var h=this._materialManager.createNormalMaterial();e.initMesh(h,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,c=null,c=1===this._map.dataManager.file_ver?C.default.convertGeo2Points(i.geo):C.default.convertArrayPoints(i.idxs,i.pts),d=-1===i.height?2.2:i.height,f=new fm.Vector3(c.vertices[0].x-o,-c.vertices[0].y+s,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(l,u+d,0)),p=a.ename,m=a.name,v=n===b.default.ZH?m:p;e.x=c.vertices[0].x,e.y=c.vertices[0].y,e.height=d,e.pos=f,e.tryInit=!0;var g,y=h.getLabelTheme(a);y&&(e.theme=y,e.size=1.4*y.fontsize,v&&(g=this._materialManager.createLabelMaterial(v,y,!1,e),e.initSprite(g,(new fm.Vector3).copy(f)),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,h=null,h=1===this._map.dataManager.file_ver?C.default.convertGeo2Points(r.geo):C.default.convertArrayPoints(r.idxs,r.pts),c=-1===r.height?2.2:r.height,d=new fm.Vector3(h.vertices[0].x-s,-h.vertices[0].y+l,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(a,o+c,0)),f=u.getPoiTheme(i),p=this._materialManager.createPoiMaterial(f,e);e.x=h.vertices[0].x,e.y=h.vertices[0].y,e.height=c,e.pos=d,f.height&&(e.size=f.height),this._map.wxInfo.pixelRatio&&(e.size*=this._map.wxInfo.pixelRatio),e.initSprite(p,(new fm.Vector3).copy(d)),this.checkMaterialAlpha(e._renderNode,n),e.setSize()}},{key:"everGroup",value:function(e,t){for(var n=0;n=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})})},function(e,t,n){var a=n(124),o=n(39).f,s=n(43),l=n(34),u=n(284),r=n(25),h=r("toStringTag");e.exports=function(e,t,n,r){var i;e&&(i=n?e:e.prototype,l(i,h)||o(i,h,{configurable:!0,value:t}),r&&!a&&s(i,"toString",u))}},function(e){e.exports={}},function(e,t,n){e.exports=n(295)},function(e,t,n){var x=n(72),w=n(98),b=n(38),M=n(44),T=n(128),S=[].push,r=function(f){var p=1==f,m=2==f,v=3==f,g=4==f,y=6==f,_=5==f||y;return function(e,t,n,r){for(var i,a,o=b(e),s=w(o),l=x(t,n,3),u=M(s.length),h=0,c=r||T,d=p?c(e,u):m?c(e,0):void 0;hthis._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,u.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}}]),l}(),s=o;t.default=s},function(e){"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(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(12)),o=r(n(2)),s=r(n(3)),l=(r(n(152)),r(n(56))),u=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:"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>2&7}},{key:"liftEntry",set:function(e){this._type|=e<<5},get:function(){return this._type>>5&3}},{key:"entranceType",set:function(e){this._type|=e<<7},get:function(){return this._type>>7&3}},{key:"tempType",set:function(e){this._type|=e<<9},get:function(){return _type>>9&3}}]),e}(),h=u;t.default=h},function(e,t,n){var r=n(29),i=n(117),a=n(81),o=n(42),s=n(99),l=n(34),u=n(165),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=o(e),t=s(t,!0),u)try{return h(e,t)}catch(e){}if(l(e,t))return a(!i.f.call(e,t),e[t])}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e){e.exports={}},function(e,t,n){var r,i=n(35),a=n(175),o=n(123),s=n(83),l=n(178),u=n(118),h=n(100),c=">",d="<",f="prototype",p="script",m=h("IE_PROTO"),v=function(){},g=function(e){return d+p+c+e+d+"/"+p+c},y=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e,t=u("iframe"),n="java"+p+":";return t.style.display="none",l.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(g("document.F=Object")),e.close(),e.F},x=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=r?y(r):_();for(var e=o.length;e--;)delete x[f][o[e]];return x()};s[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(v[f]=i(e),n=new v,v[f]=null,n[m]=e):n=x(),void 0===t?n:a(n,t)}},function(e,t,n){var i=n(43);e.exports=function(e,t,n,r){r&&r.enumerable?e[t]=n:i(e,t,n)}},function(e,t,n){"use strict";var i=n(99),a=n(39),o=n(81);e.exports=function(e,t,n){var r=i(t);r in e?a.f(e,r,o(0,n)):e[r]=n}},function(e,t,n){"use strict";var r=n(16);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t,n){var r=n(83),i=n(23),a=n(34),o=n(39).f,s=n(101),l=n(184),u=s("meta"),h=0,c=Object.isExtensible||function(){return!0},d=function(e){o(e,u,{value:{objectID:"O"+ ++h,weakData:{}}})},f=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,u)){if(!c(e))return"F";if(!t)return"E";d(e)}return e[u].objectID},p=function(e,t){if(!a(e,u)){if(!c(e))return!0;if(!t)return!1;d(e)}return e[u].weakData},m=function(e){return l&&v.REQUIRED&&c(e)&&!a(e,u)&&d(e),e},v=e.exports={REQUIRED:!1,fastKey:f,getWeakData:p,onFreeze:m};r[u]=!0},function(e,t,n){var r=n(16),i=n(25),a=n(129),o=i("species");e.exports=function(n){return 51<=a||!r(function(){var e=[],t=e.constructor={};return t[o]=function(){return{foo:1}},1!==e[n](Boolean).foo})}},function(e,t,n){var f=n(35),p=n(181),m=n(44),v=n(72),g=n(104),y=n(180),_=function(e,t){this.stopped=e,this.result=t},r=e.exports=function(e,t,n,r,i){var a,o,s,l,u,h,c,d=v(t,n,r?2:1);if(i)a=e;else{if(o=g(e),"function"!=typeof o)throw TypeError("Target is not iterable");if(p(o)){for(s=0,l=m(e.length);s=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){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var i=n(85);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(){},function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){e.exports=n(399)},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(2)),s=r(n(3)),l=r(n(5)),u=r(n(6)),h=r(n(7));function c(r){var i=d();return function(){var e,t=(0,h.default)(r),n=i?(e=(0,h.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,n)}}function d(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var f=function(e){(0,l.default)(n,e);var t=c(n);function n(e){return(0,o.default)(this,n),t.call(this,e)}return(0,s.default)(n,[{key:"raycast",value:function(o,e){var c=this,d=new fm.Vector3,f=new fm.Vector3,p=new fm.Vector3,s=new fm.Vector2,l=new fm.Vector2,m=new fm.Matrix4,v=new fm.Vector3,g=new fm.Vector3,y=new fm.Vector3,_=new fm.Vector2,x=new fm.Vector2,w=new fm.Vector2,u=new fm.Vector4,b=function(e,t,n,r,i,a){s.subVectors(e,n).addScalar(.5).multiply(r),o.perspective&&!c.material.sizeAttenuation&&(u.applyMatrix4(c.modelViewMatrix),s.multiplyScalar(Math.abs(u.z))),void 0!==i?(l.x=a*s.x-i*s.y,l.y=i*s.x+a*s.y):l.copy(s),e.copy(t),e.x+=l.x,e.y+=l.y,e.applyMatrix4(m)};!function(e,t){f.setFromMatrixScale(c.matrixWorld),m.getInverse(c.modelViewMatrix).premultiply(c.matrixWorld),p.setFromMatrixPosition(c.modelViewMatrix);var n,r,i=c.material.rotation;0!==i&&(r=Math.cos(i),n=Math.sin(i));var a=c.center;b(v.set(-.5,-.5,0),p,a,f,n,r),b(g.set(.5,-.5,0),p,a,f,n,r),b(y.set(.5,.5,0),p,a,f,n,r),_.set(0,0),x.set(1,0),w.set(1,1);var o,s,l,u,h=e.ray.intersectTriangle(v,g,y,!1,d);null===h&&(b(g.set(-.5,.5,0),p,a,f,n,r),x.set(0,1),h=e.ray.intersectTriangle(v,y,g,!1,d),null===h)||(o=v.clone().project(e.camera),s=g.clone().project(e.camera),l=y.clone().project(e.camera),(o.x<-1||1e.far||t.push({distance:u,point:d.clone(),uv:fm.Triangle.getUV(d,v,g,y,_,x,w,new fm.Vector2),face:null,object:c})))}(o,e)}}]),n}(fm.Sprite),p=f;t.default=p},function(e,t,n){e.exports=n(498)},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var h=r(n(33)),a=r(n(2)),o=r(n(3)),l=r(n(226)),u=r(n(28)),s=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,a=[],o=new l.default,s=0;sr&&(this._minRadius=r)}}}},{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}(),c=s;t.default=c},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t._Math=void 0;var i={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var a=[],e=0;e<256;e++)a[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,i=a[255&e]+a[e>>8&255]+a[e>>16&255]+a[e>>24&255]+"-"+a[255&t]+a[t>>8&255]+"-"+a[t>>16&15|64]+a[t>>24&255]+"-"+a[63&n|128]+a[n>>8&255]+"-"+a[n>>16&255]+a[n>>24&255]+a[255&r]+a[r>>8&255]+a[r>>16&255]+a[r>>24&255];return i.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*i.DEG2RAD},radToDeg:function(e){return e*i.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=i},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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function re(e,t){var n;if(e){if("string"==typeof e)return ie(e,t);var r=(0,w.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ie(e,t):void 0}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.MapOptions.modelHoverTime){if(!this._enterControl.enableMapHover)return;if(!this._lastMoveEvent)return;var t,n,r,i,a,o,s=this._lastMoveEvent,l=s.mousePoint,u={x:2*l.x/l.w-1,y:1-2*l.y/l.h},h=this.nodeManager.getNode(this._currentSceneId,this.getVisibleGroups(),u,this.renderer.getCameraByViewMode(this._viewMode)),c=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),u,this.renderer.getCameraByViewMode(this._viewMode));if(h.length<1&&c.length<1)return;h[0]&&(t=(new fm.Vector3).copy(h[0].point),n={type:"mapHoverNode",target:h[0].object.mapNode,mouse:l,eventInfo:{domEvent:s.event,threeCoord:h[0].point,eventID:s.eventID,coord:{x:t.x+this.center.x,y:h[0].object.mapNode.y-t.z}},groupID:h[0].object.mapNode.groupID,nodeType:h[0].object.mapNode.nodeType},this.hoverFilterFunction?(r=this.hoverFilterFunction({nodeType:h[0].object.mapNode.nodeType,typeID:h[0].object.mapNode.bdata&&h[0].object.mapNode.bdata.type,data:h[0].object.mapNode.bdata}),r&&(h[0].object.mapNode.nodeType===V.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(h[0].object),this.dispatchEvent(n))):(h[0].object.mapNode.nodeType===V.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(h[0].object),this.dispatchEvent(n))),c[0]&&(i=(new fm.Vector3).copy(c[0].point),a={type:"mapHoverNode",target:c[0].object.mapNode,mouse:l,eventInfo:{domEvent:s.event,threeCoord:c[0].point,eventID:s.eventID,coord:{x:i.x+this.center.x,y:c[0].object.mapNode.y-i.z}},groupID:c[0].object.mapNode.groupID,nodeType:c[0].object.mapNode.nodeType},this.hoverFilterFunction?(o=this.hoverFilterFunction({nodeType:c[0].object.mapNode.nodeType,typeID:c[0].object.mapNode.bdata&&c[0].object.mapNode.bdata.type,data:c[0].object.mapNode.bdata}),o&&this.dispatchEvent(a)):this.dispatchEvent(a)),this._mouseHoverStart=!1,this._mouseHoverTime=0}else this._mouseHoverTime+=e}},{key:"selectNull",value:function(){if(B.default[this.uuid].currentModel){B.default[this.uuid].currentAnimater&&(B.default[this.uuid].currentAnimater.stop(),B.default[this.uuid].currentAnimater=void 0);var e=B.default[this.uuid].currentModel;if(void 0===B.default[this.uuid].currentModel.material.length)e.material.color=B.default[this.uuid].currentModel.material.userData.color,e.material.opacity=B.default[this.uuid].currentModel.material.userData.opacity,e.material.userData.opacity=void 0,e.material.userData.color=void 0,e.material.update=!0,B.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 no/s?o/(t.x-e.x):s/(t.y-e.y),l=r.x-o/2,u=r.y-s/2,m=document.getElementsByTagName("canvas")[0],v=document.createElement("canvas"),g=document.createElement("canvas"),y=document.createElement("canvas"),_=window.devicePixelRatio,x=new Image;"3d"===this.viewMode?this.renderer.perspectiveCamera.setViewOffset(o*p,s*p,o*(p-1)/2+l*p,s*(p-1)/2+u*p,o,s):this.renderer.orthographicCamera.setViewOffset(o*p,s*p,o*(p-1)/2+l*p,s*(p-1)/2+u*p,o,s),this.renderer.update(),v.width=d*p*_,v.height=f*p*_,v.style.width=d*p*_+"px",v.style.height=f*p*_+"px",n?(g.width=1240*Math.pow(1.414,h-1),g.height=1754*Math.pow(1.414,h-1),g.style.width=1240*Math.pow(1.414,h-1)+"px",g.style.height=1754*Math.pow(1.414,h-1)+"px"):(g.height=1240*Math.pow(1.414,h-1),g.width=1754*Math.pow(1.414,h-1),g.style.height=1240*Math.pow(1.414,h-1)+"px",g.style.width=1754*Math.pow(1.414,h-1)+"px"),y.height=f*Math.pow(1.414,h-1),y.width=d*Math.pow(1.414,h-1),y.style.height=f*Math.pow(1.414,h-1)+"px",y.style.width=d*Math.pow(1.414,h-1)+"px",x.src=m.toDataURL("image/png"),"3d"===this.viewMode?this.renderer.perspectiveCamera.clearViewOffset():this.renderer.orthographicCamera.clearViewOffset();var w=v.getContext("2d"),b=g.getContext("2d"),M=y.getContext("2d"),T=this;x.onload=function(){T.viewMode,w.drawImage(x,-(o*_-d*p*_)/2,-(s*_-f*p*_)/2);var u=new Image;u.src=v.toDataURL("image/png"),u.onload=function(){var e,t,n=Math.min(1240*Math.pow(1.414,h-1)/(d*p),1754*Math.pow(1.414,h-1)/(f*p)),r=(g.width-d*p*n)/2,i=(g.height-f*p*n)/2;b.drawImage(u,r,i,d*p*n,f*p*n),M.drawImage(u,0,0,d*Math.pow(1.414,h-1),f*Math.pow(1.414,h-1));var a,o,s=g.toDataURL("image/png"),l=y.toDataURL("image/png");-1<(0,S.default)(e=navigator.userAgent).call(e,"Edge")||-1<(0,S.default)(t=navigator.userAgent).call(t,".NET4.0C")?(a=null,o=null,c(s,a,l,o)):g.toBlob(function(t){y.toBlob(function(e){c(s,t,l,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},get:function(){return this._mapScaleLevel}},{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",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)},get:function(){return this._maxScale}},{key:"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)},get:function(){return this._minScale}},{key:"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},get:function(){return this._minScaleLevel}},{key:"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,g.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}}]),h}(G.default),ue=le;t.default=ue},function(e,t,n){e.exports=n(472)},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),p=r(n(9)),m=r(n(0)),v=r(n(63)),o=r(n(31)),s=r(n(55)),l=r(n(10)),u=r(n(2)),h=r(n(3)),c=r(n(91)),d=r(n(5)),f=r(n(6)),g=r(n(7)),y=r(n(135)),_=r(n(137));function x(r){var i=w();return function(){var e,t=(0,g.default)(r),n=i?(e=(0,g.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,f.default)(this,n)}}function w(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var b=new y.default,M=new y.default,T=new y.default;function S(e,t){var n=1>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=v(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=v(e,e<0?-1:0,!1),i&&(a[e]=n),n))}function m(e,t){if(isNaN(e)||!isFinite(e))return t?M:b;if(t){if(e<0)return M;if(_<=e)return V}else{if(e<=-x)return H;if(x<=e+1)return G}return e<0?m(-e,t).neg():v(e%y|0,e/y|0,t)}function v(e,t,n){return new l(e,t,n)}l.fromInt=i,l.fromNumber=m,l.fromBits=v;var c=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return b;if("number"==typeof t&&(n=t,t=!1),n=n||10,n<2||36>>0:this.low},j.toNumber=function(){return this.unsigned?(this.high>>>0)*y+(this.low>>>0):this.high*y+(this.low>>>0)},j.toString=function(e){if(e=e||10,e<2||36>>0,u=l.toString(e),a=s;if(a.isZero())return u+o;for(;u.length<6;)u="0"+u;o=""+u+o}},j.getHighBits=function(){return this.high},j.getHighBitsUnsigned=function(){return this.high>>>0},j.getLowBits=function(){return this.low},j.getLowBitsUnsigned=function(){return this.low>>>0},j.getNumBitsAbs=function(){if(this.isNegative())return this.eq(H)?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},j.eq=j.equals,j.notEquals=function(e){return!this.eq(e)},j.neq=j.notEquals,j.lessThan=function(e){return this.comp(e)<0},j.lt=j.lessThan,j.lessThanOrEqual=function(e){return this.comp(e)<=0},j.lte=j.lessThanOrEqual,j.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},j.comp=j.compare,j.negate=function(){return!this.unsigned&&this.eq(H)?H:this.not().add(T)},j.neg=j.negate,j.add=function(e){f(e)||(e=g(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,d=0;return d+=i+l,c+=d>>>16,d&=65535,c+=r+s,h+=c>>>16,c&=65535,h+=n+o,u+=h>>>16,h&=65535,u+=t+a,u&=65535,v(c<<16|d,u<<16|h,this.unsigned)},j.subtract=function(e){return f(e)||(e=g(e)),this.add(e.neg())},j.sub=j.subtract,j.multiply=function(e){if(this.isZero())return b;if(f(e)||(e=g(e)),e.isZero())return b;if(this.eq(H))return e.isOdd()?H:b;if(e.eq(H))return this.isOdd()?H:b;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(w)&&e.lt(w))return m(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,d=0;return d+=i*l,c+=d>>>16,d&=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,v(c<<16|d,u<<16|h,this.unsigned)},j.mul=j.multiply,j.divide=function(e){if(f(e)||(e=g(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?M:b;var t,n;if(this.eq(H)){if(e.eq(T)||e.eq(z))return H;if(e.eq(H))return T;var r=this.shr(1),i=r.div(e).shl(1);return i.eq(b)?e.isNegative()?T:z:(t=this.sub(e.mul(i)),n=i.add(t.div(e)),n)}if(e.eq(H))return this.unsigned?M:b;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=b,t=this;t.gte(e);){i=Math.max(1,Math.floor(t.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(i)/Math.LN2),o=a<=48?1:c(2,a-48),s=m(i),l=s.mul(e);l.isNegative()||l.gt(t);)i-=o,s=m(i,this.unsigned),l=s.mul(e);s.isZero()&&(s=T),n=n.add(s),t=t.sub(l)}return n},j.div=j.divide,j.modulo=function(e){return f(e)||(e=g(e)),this.sub(this.div(e).mul(e))},j.mod=j.modulo,j.not=function(){return v(~this.low,~this.high,this.unsigned)},j.and=function(e){return f(e)||(e=g(e)),v(this.low&e.low,this.high&e.high,this.unsigned)},j.or=function(e){return f(e)||(e=g(e)),v(this.low|e.low,this.high|e.high,this.unsigned)},j.xor=function(e){return f(e)||(e=g(e)),v(this.low^e.low,this.high^e.high,this.unsigned)},j.shiftLeft=function(e){return f(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?v(this.low<>>32-e,this.unsigned):v(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):v(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},j.shr=j.shiftRight,j.shiftRightUnsigned=function(e){if(f(e)&&(e=e.toInt()),e&=63,0===e)return this;var t=this.high;if(e<32){var n=this.low;return v(n>>>e|t<<32-e,t>>>e,this.unsigned)}return v(32===e?t:t>>>e-32,0,this.unsigned)},j.shru=j.shiftRightUnsigned,j.toSigned=function(){return this.unsigned?v(this.low,this.high,!1):this},j.toUnsigned=function(){return this.unsigned?this:v(this.low,this.high,!0)};var W=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?q: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};W.VERSION="5.0.1",W.LITTLE_ENDIAN=!0,W.BIG_ENDIAN=!1,W.DEFAULT_CAPACITY=16,W.DEFAULT_ENDIAN=W.BIG_ENDIAN,W.DEFAULT_NOASSERT=!1,W.Long=l||null;var Y=W.prototype;Y.__isByteBuffer__,(0,U.default)(Y,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var q=new ArrayBuffer(0),X=String.fromCharCode;function Z(e){var t=0;return function(){return t>1,h=-7,c=n?i-1:0,d=n?-1:1,f=e[t+c];for(c+=d,a=f&(1<<-h)-1,f>>=-h,h+=s;0>=-h,h+=r;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=1<=o+c?d/l:d*Math.pow(2,1-c),2<=t*l&&(o++,l/=2),h<=o+c?(s=0,o=h):1<=o+c?(s=(t*l-1)*Math.pow(2,i),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));8<=i;e[n+f]=255&s,f+=p,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},Y.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)}var i=(0,D.default)(n=this).call(n,t,t+e);return r&&(this.offset+=e),i},Y.writeBytes=Y.append,Y.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},Y.writeByte=Y.writeInt8,Y.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)}var n=this.view[e];return 128==(128&n)&&(n=-(255-n+1)),t&&(this.offset+=1),n},Y.readByte=Y.readInt8,Y.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},Y.writeUInt8=Y.writeUint8,Y.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)}var n=this.view[e];return t&&(this.offset+=1),n},Y.readUInt8=Y.readUint8,Y.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},Y.writeShort=Y.writeInt16,Y.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},Y.readShort=Y.readInt16,Y.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},Y.writeUInt16=Y.writeUint16,Y.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},Y.readUInt16=Y.readUint16,Y.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},Y.writeInt=Y.writeInt32,Y.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},Y.readInt=Y.readInt32,Y.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},Y.writeUInt32=Y.writeUint32,Y.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},Y.readUInt32=Y.readUint32,l&&(Y.writeInt64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e)),t+=8;var r=this.buffer.byteLength;rt?r:t),t-=8;var i=e.low,a=e.high;return 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,t+=4,this.view[t+3]=a>>>24&255,this.view[t+2]=a>>>16&255,this.view[t+1]=a>>>8&255,this.view[t]=255&a):(this.view[t]=a>>>24&255,this.view[t+1]=a>>>16&255,this.view[t+2]=a>>>8&255,this.view[t+3]=255&a,t+=4,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),n&&(this.offset+=8),this},Y.writeLong=Y.writeInt64,Y.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;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);var i=new l(n,r,!1);return t&&(this.offset+=8),i},Y.readLong=Y.readInt64,Y.writeUint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e)),t+=8;var r=this.buffer.byteLength;rt?r:t),t-=8;var i=e.low,a=e.high;return 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,t+=4,this.view[t+3]=a>>>24&255,this.view[t+2]=a>>>16&255,this.view[t+1]=a>>>8&255,this.view[t]=255&a):(this.view[t]=a>>>24&255,this.view[t+1]=a>>>16&255,this.view[t+2]=a>>>8&255,this.view[t+3]=255&a,t+=4,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),n&&(this.offset+=8),this},Y.writeUInt64=Y.writeUint64,Y.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;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);var i=new l(n,r,!0);return t&&(this.offset+=8),i},Y.readUInt64=Y.readUint64),Y.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,Q(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},Y.writeFloat=Y.writeFloat32,Y.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)}var n=K(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),n},Y.readFloat=Y.readFloat32,Y.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,Q(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},Y.writeDouble=Y.writeFloat64,Y.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)}var n=K(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),n},Y.readDouble=Y.readFloat64,W.MAX_VARINT32_BYTES=5,W.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},W.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},W.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},Y.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=W.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},Y.writeVarint32ZigZag=function(e,t){return this.writeVarint32(W.zigZagEncode32(e),t)},Y.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,r=0,i=0;do{if(!this.noAssert&&e>this.limit){var a=Error("Truncated");throw a.truncated=!0,a}n=this.view[e++],r<5&&(i|=(127&n)<<7*r),++r}while(0!=(128&n));return i|=0,t?(this.offset=e,i):{value:i,length:r}},Y.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"===(0,O.default)(t)?t.value=W.zigZagDecode32(t.value):t=W.zigZagDecode32(t),t},l&&(W.MAX_VARINT64_BYTES=10,W.calculateVarint64=function(e){"number"==typeof e?e=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e));var t=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,r=e.shiftRightUnsigned(56).toInt()>>>0;return 0==r?0==n?t<16384?t<128?1:2:t<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:r<128?9:10},W.zigZagEncode64=function(e){return"number"==typeof e?e=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},W.zigZagDecode64=function(e){return"number"==typeof e?e=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(l.ONE).toSigned().negate()).toSigned()},Y.writeVarint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var r=W.calculateVarint64(e),i=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;t+=r;var s=this.buffer.byteLength;switch(st?s: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},Y.writeVarint64ZigZag=function(e,t){return this.writeVarint64(W.zigZagEncode64(e),t)},Y.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");var s=l.fromBits(r|i<<28,i>>>4|a<<24,!1);return t?(this.offset=e,s):{value:s,length:e-n}},Y.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof l?t.value=W.zigZagDecode64(t.value):t=W.zigZagDecode64(t),t}),Y.writeCString=function(e,t){var n,r=void 0===t;r&&(t=this.offset);var i,a=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(i=0;i>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}a=te.calculateUTF16asUTF8(Z(e))[1],t+=a+1;var o=this.buffer.byteLength;return ot?o:t),t-=a+1,te.encodeUTF16toUTF8(Z(e),(0,C.default)(n=function(e){this.view[t++]=e}).call(n,this)),this.view[t++]=0,r?(this.offset=t,this):a},Y.readCString=function(e){var t,n=void 0===e;if(n&&(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 r,i=e,a=-1;return te.decodeUTF8toUTF16((0,C.default)(t=function(){if(0===a)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return a=this.view[e++],0===a?null:a}).call(t,this),r=J(),!0),n?(this.offset=e,r()):{string:r(),length:e-i}},Y.writeIString=function(e,t){var n,r=void 0===t;if(r&&(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 i=t,a=te.calculateUTF16asUTF8(Z(e),this.noAssert)[1];t+=4+a;var o=this.buffer.byteLength;if(ot?o:t),t-=4+a,this.littleEndian?(this.view[t+3]=a>>>24&255,this.view[t+2]=a>>>16&255,this.view[t+1]=a>>>8&255,this.view[t]=255&a):(this.view[t]=a>>>24&255,this.view[t+1]=a>>>16&255,this.view[t+2]=a>>>8&255,this.view[t+3]=255&a),t+=4,te.encodeUTF16toUTF8(Z(e),(0,C.default)(n=function(e){this.view[t++]=e}).call(n,this)),t!==i+4+a)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+a));return r?(this.offset=t,this):t-i},Y.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),i=this.readUTF8String(r,W.METRICS_BYTES,e+=4);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},W.METRICS_CHARS="c",W.METRICS_BYTES="b",Y.writeUTF8String=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+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i=t,a=te.calculateUTF16asUTF8(Z(e))[1];t+=a;var o=this.buffer.byteLength;return ot?o:t),t-=a,te.encodeUTF16toUTF8(Z(e),(0,C.default)(n=function(e){this.view[t++]=e}).call(n,this)),r?(this.offset=t,this):t-i},Y.writeString=Y.writeUTF8String,W.calculateUTF8Chars=function(e){return te.calculateUTF16asUTF8(Z(e))[0]},W.calculateUTF8Bytes=function(e){return te.calculateUTF16asUTF8(Z(e))[1]},W.calculateString=W.calculateUTF8Bytes,Y.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=W.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,a=0,o=n;if(t===W.METRICS_CHARS){var s,l=J();if(te.decodeUTF8((0,C.default)(s=function(){return a>>=0,n<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var u=n+e;if(te.decodeUTF8toUTF16((0,C.default)(i=function(){return n>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i=t,a=te.calculateUTF16asUTF8(Z(e),this.noAssert)[1],o=W.calculateVarint32(a);t+=o+a;var s=this.buffer.byteLength;if(st?s:t),t-=o+a,t+=this.writeVarint32(a,t),te.encodeUTF16toUTF8(Z(e),(0,C.default)(n=function(e){this.view[t++]=e}).call(n,this)),t!==i+a+o)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+a+o));return r?(this.offset=t,this):t-i},Y.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),i=this.readUTF8String(r.value,W.METRICS_BYTES,e+=r.length);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},Y.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 W||(e=W.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;n+=i;var a=this.buffer.byteLength;return an?a:n),n-=i,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=i,r&&(this.offset+=i),this},Y.appendTo=function(e,t){return e.append(this,t),this},Y.assert=function(e){return this.noAssert=!e,this},Y.capacity=function(){return this.buffer.byteLength},Y.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},Y.clone=function(e){var t=new W(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},Y.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=q,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},Y.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 W(0,this.littleEndian,this.noAssert);var n=t-e,r=new W(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},Y.copyTo=function(e,t,n,r){var i,a;if(!this.noAssert&&!W.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)},Y.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},Y.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},Y.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},Y.LE=function(e){return this.littleEndian=void 0===e||!!e,this},Y.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},Y.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 W||(e=W.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;var a,o,s=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},Y.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},Y.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},Y.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)}if(!e&&0===t&&n===this.buffer.byteLength)return this.buffer;if(t===n)return q;var r=new ArrayBuffer(n-t);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(t,n),0),r},Y.toArrayBuffer=Y.toBuffer,Y.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 $=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}();Y.toBase64=function(e,t){var n,r;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},W.fromDebug=function(e,t,n){for(var r,i,a=e.length,o=new W((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,F.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,D.default)(e).call(e,0,(0,B.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){ee.UTF16toUTF8(e,function(e){ee.encodeUTF8(e,t)})},decodeUTF8toUTF16:function(e,t){ee.decodeUTF8(e,function(e){ee.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 ee.UTF16toUTF8(e,function(e){++t,n+=e<128?1:e<2048?2:e<65536?3:4}),[t,n]}},ee);Y.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{te.decodeUTF8toUTF16((0,C.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},ce.DotProto=function(i,o){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?o.STRING_DQ:o.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;o.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;t=n,n=this.source.charAt(this.index)}while("*"!==t||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;o.DELIM.lastIndex=0;var i=o.DELIM.test(this.source.charAt(r++));if(!i)for(;r"),r=this.tn.next(),!o.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=s(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){var a=this._parseMessage(e,i);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);i.type=a.name,i.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!o.TYPE.test(n)&&!o.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(i.type=n,r=this.tn.next(),!o.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=s(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}return e.fields.push(i),i},a._parseMessageOneOf=function(e){var t=this.tn.next();if(!o.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},a._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()},a._parseEnum=function(e){var t={name:"",values:[],options:{}},n=this.tn.next();if(!o.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(!o.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)},n=this.tn.peek();"["===n&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),(0,p.default)(t).push(r)}this.tn.omit(";"),e.enums.push(t)},a._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=l(e)}if(t.push(n),2===t.length)break;if("to"!==this.tn.peek()){t.push(n);break}this.tn.next()}r.push(t)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var t=this.tn.next();if(!o.TYPEREF.test(t))throw Error("illegal extend reference: "+t);var n={ref:t,fields:[]};for(this.tn.skip("{");"}"!==(t=this.tn.next());)if(o.RULE.test(t))this._parseMessageField(n,t);else{if(!o.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},a.toString=function(){return"Parser at line "+this.tn.line},e.Parser=r,e}(ce,ce.Lang),ce.Reflect=function(m){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,k.default)(h.prototype);t.getChildren=function(e){var t;if(e=e||null,null==e)return(0,D.default)(t=this.children).call(t);for(var n=[],r=0,i=this.children.length;r>>0:t;case m.TYPES.int64:case m.TYPES.sint64:case m.TYPES.sfixed64:if(m.Long)try{return l(t,!1)}catch(e){r((0,O.default)(t),e.message)}else r((0,O.default)(t),"requires Long.js");case m.TYPES.uint64:case m.TYPES.fixed64:if(m.Long)try{return l(t,!0)}catch(e){r((0,O.default)(t),e.message)}else r((0,O.default)(t),"requires Long.js");case m.TYPES.bool:return"boolean"!=typeof t&&r((0,O.default)(t),"not a boolean"),t;case m.TYPES.float:case m.TYPES.double:return"number"!=typeof t&&r((0,O.default)(t),"not a number"),t;case m.TYPES.string:return"string"==typeof t||t&&t instanceof String||r((0,O.default)(t),"not a string"),""+t;case m.TYPES.bytes:return W.isByteBuffer(t)?t:W.wrap(t,"base64");case m.TYPES.enum:for(var e=this.resolvedType.getChildren(m.Reflect.Enum.Value),i=0;i>>0;case m.TYPES.sint32:return 0|e.readVarint32ZigZag();case m.TYPES.fixed32:return e.readUint32()>>>0;case m.TYPES.sfixed32:return 0|e.readInt32();case m.TYPES.int64:return e.readVarint64();case m.TYPES.uint64:return e.readVarint64().toUnsigned();case m.TYPES.sint64:return e.readVarint64ZigZag();case m.TYPES.fixed64:return e.readUint64();case m.TYPES.sfixed64:return e.readInt64();case m.TYPES.bool:return!!e.readVarint32();case m.TYPES.enum:return e.readVarint32();case m.TYPES.float:return e.readFloat();case m.TYPES.double:return e.readDouble();case m.TYPES.string:return e.readVString();case m.TYPES.bytes:if(i=e.readVarint32(),e.remaining()>>3;switch(r){case m.WIRE_TYPES.VARINT:for(;n=t.readUint8(),128==(128&n););break;case m.WIRE_TYPES.BITS64:t.offset+=8;break;case m.WIRE_TYPES.LDELIM:n=t.readVarint32(),t.offset+=n;break;case m.WIRE_TYPES.STARTGROUP:v(i,t);break;case m.WIRE_TYPES.ENDGROUP:if(i===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+i+" ("+e+" expected)");case m.WIRE_TYPES.BITS32:t.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+r)}return!0}i.build=function(e){if(this.clazz&&!e)return this.clazz;var t=function(c,o){var s=o.getChildren(c.Reflect.Message.Field),l=o.getChildren(c.Reflect.Message.OneOf),r=function e(t){c.Builder.Message.call(this);for(var n,r=0,i=l.length;r>>3,i===m.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?h[o.name].push(o.decode(i,e)):(0,R.default)(o)?(s=o.decode(i,e),h[o.name].set(s[0],s[1])):(h[o.name]=o.decode(i,e),o.oneof&&(l=h[o.oneof.name],null!==l&&l!==o.name&&(h[l]=null),h[o.oneof.name]=o.name));else switch(i){case m.WIRE_TYPES.VARINT:e.readVarint32();break;case m.WIRE_TYPES.BITS32:e.offset+=4;break;case m.WIRE_TYPES.BITS64:e.offset+=8;break;case m.WIRE_TYPES.LDELIM:var c=e.readVarint32();e.offset+=c;break;case m.WIRE_TYPES.STARTGROUP:for(;v(a,e););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+i)}}for(var d=0,f=this._fields.length;d>>3;if(1===c)o=this.keyElement.decode(u,e,c);else{if(2!==c)throw Error("Unexpected tag in map field key/value submessage");s=this.element.decode(u,e,c)}}return[o,s]}return this.element.decode(t,e,this.id)},o.Message.Field=u;var f=function(e,t,n,r,i,a,o){u.call(this,e,t,n,null,r,i,a,o),this.extension};f.prototype=(0,k.default)(u.prototype),o.Message.ExtensionField=f;var p=function(e,t,n){h.call(this,e,t,n),this.fields=[]};o.Message.OneOf=p;var g=function(e,t,n,r,i){s.call(this,e,t,n,r,i),this.className="Enum",this.object=null};g.getName=function(e,t){for(var n,r=(0,N.default)(e),i=0;i=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+h.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=re.Util.toCamelCase(r));var i=new ae.Message.ExtensionField(this,h,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),a=new ae.Extension(this,this.ptr,t.name,i);i.extension=a,this.ptr.addChild(a),h.addChild(i)},this);else if(!/\.?google\.protobuf\./.test(i.ref))throw Error("extended message "+i.ref+" is not defined")}i=null,h=null}e=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},se.import=function(t,e){var n,r="/";if("string"==typeof e){if(re.Util.IS_NODE&&(e=me(207).resolve(e)),!0===this.files[e])return this.reset();this.files[e]=!0}else if("object"===(0,O.default)(e)){var i,a=e.root;re.Util.IS_NODE&&(a=me(207).resolve(a)),(0<=(0,B.default)(a).call(a,"\\")||0<=(0,B.default)(i=e.file).call(i,"\\"))&&(r="\\");var o=a+r+e.file;if(!0===this.files[o])return this.reset();this.files[o]=!0}if(t.imports&&0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(e,t){var n;if(e){if("string"==typeof e)return T(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function P(e,t){var n;if(e){if("string"==typeof e)return C(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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.x&&(this.minX=e.x),this.maxXe.y&&(this.minY=e.y),this.maxYe.maxX||this.minY>e.maxY||this.maxXi&&!o.warned&&(o.warned=!0,s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit"),s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,l(s))),e}function s(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=s.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?g(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r=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.call(e,t,n):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 i(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 S(this,e,t,n);case"latin1":case"binary":return E(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){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||B(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||B(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||B(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){var i;e=+e,t|=0,r||(i=Math.pow(2,8*n-1),B(this,e,t,n,i-1,-i));var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){var i;e=+e,t|=0,r||(i=Math.pow(2,8*n-1),B(this,e,t,n,i-1,-i));var a=n-1,o=1,s=0;for(this[t+a]=255&e;0<=--a&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||B(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||B(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||B(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||B(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||B(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,i=n%256,a.push(i),a.push(r);return a}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(47))},function(O,e,F){"use strict";(function(e,t,n){var o=F(115);function d(e){var t=this;this.next=null,this.entry=null,this.finish=function(){D(t,e)}}O.exports=y;var s,l=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?t:o.nextTick;y.WritableState=g;var r=Object.create(F(96));r.inherits=F(78);var i={deprecate:F(577)},a=F(258),u=F(157).Buffer,h=n.Uint8Array||function(){};function c(e){return u.from(e)}function f(e){return u.isBuffer(e)||e instanceof h}var p,m=F(259);function v(){}function g(e,t){s=s||F(70),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){E(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}function y(e){if(s=s||F(70),!(p.call(y,this)||this instanceof s))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}function x(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}function w(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}function b(e,t,n,r,i,a){var o;n||(o=w(t,r,i),r!==o&&(n=!0,i="buffer",r=o));var s=t.objectMode?1:r.length;t.length+=s;var l,u=t.length>2&3}},{key:"tempType",set:function(e){this._type|=e<<4},get:function(){return this._type>>4&3}},{key:"through",set:function(e){e?this._type|=16:this._type&=-17},get:function(){return 16&this._type?1:0}}]),e}()),h=u;t.default=h},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.NodeDistance=t.default=void 0;var a=r(n(30)),u=r(n(116)),o=r(n(33)),p=r(n(60)),s=r(n(15)),c=r(n(27)),f=r(n(32)),l=r(n(3)),h=r(n(2)),m=r(n(28)),v=r(n(79)),g=r(n(56)),y=r(n(97)),_=function e(){(0,h.default)(this,e),this.distance=Number.MAX_VALUE,this.node=null};t.NodeDistance=_;var d=function(){function d(e,t,n,r){(0,h.default)(this,d),this.groupId=0,this._type=r,this.nodeVector=e,this.roadVector=t,this.obstructModels=[],this.obstructExtents=[],this.obstructLines=[],this.zones=[],this.zoneIDMap=new y.default,this.vertexLen=[],this.adjList=new y.default,this.nextFloorMap=new y.default,this._needVertex=n,this._roadDiffusion=[],this._nodeMap=new y.default,this._roadMap=new y.default,this._maxNodeId=0,this._maxRoadId=0,this.simplify(),this._init()}return(0,l.default)(d,[{key:"dispose",value:function(){this.nodeVector=null,this.roadVector=null,this.obstructModels=null,this.obstructExtents=null,this.obstructLines=null,this.zones=null,null!=this.zoneIDMap&&(this.zoneIDMap.clear(),this.zoneIDMap=null),null!=this.adjList&&(this.adjList.clear(),this.adjList=null),this.vertexLen=null,null!=this.nextFloorMap&&(this.nextFloorMap.clear(),this.nextFloorMap=null),this._roadDiffusion=null,null!=this._nodeMap&&(this._nodeMap.clear(),this._nodeMap=null),null!=this._roadMap&&(this._roadMap.clear(),this._roadMap=null)}},{key:"initVertexLen",value:function(e){for(var t,n,r=Number.MAX_VALUE,i=0;ithis._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,p.default)(n))for(var a=(0,p.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+d._dist?(g._dist=v+d._dist,g._vPre=[],g._vPre.push(c),l.push(e.nodeVector[w]),(0,b.default)(l).call(l,u)):Math.abs(g._dist-(v+d._dist))<1e-12&&-1!=(0,M.default)(y=g._vPre).call(y,c)&&g._vPre.push(c)))}}}}}return!(si;)o(r,n=t[i++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var l=n(42),u=n(44),h=n(103),r=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(;o=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t){var n;if(e){if("string"==typeof e)return v(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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);ne.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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function A(e,t){var n;if(e){if("string"==typeof e)return I(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}function I(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}}]),a}(b.default),k=N;t.default=k},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.netArea=t.LayerOrder=t.Prop2Alias=t.AliasLayerMap=t.LayerAlias=void 0;var a=r(n(186)),o=r(n(213)),s=r(n(485)),l=r(n(486)),u=r(n(217)),h=r(n(219)),c=r(n(221)),d=r(n(223)),f=r(n(224)),p=r(n(491)),m=r(n(225)),v=r(n(493)),g=r(n(494)),y=r(n(227)),_=r(n(495)),x=r(n(496)),w=["extent","model","label","facility","line","locationMarker","text","textMarker","polygonMarker","gradientPolygonMarker","extrudeMarker","imageMarker","stair","externalModel","heatmap","dynmodel","symbol","domMarker","waterMarker","dynline"];t.LayerAlias=w;var b=new a.default;t.AliasLayerMap=b,b.set("extent",o.default),b.set("externalModel",s.default),b.set("model",l.default),b.set("label",u.default),b.set("facility",h.default),b.set("imageMarker",c.default),b.set("polygonMarker",d.default),b.set("textMarker",f.default),b.set("stair",p.default),b.set("heatmap",m.default),b.set("symbol",v.default),b.set("domMarker",g.default),b.set("dynmodel",y.default),b.set("waterMarker",_.default),b.set("dynline",x.default);var M={extentLayer:"extent",externalModelLayer:"externalModel",labelLayer:"label",modelLayer:"model",poiLayer:"facility",stairLayer:"stair"};t.Prop2Alias=M;var T={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=T;var S="https://www.fengmap.com/";t.netArea=S},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(10)),s=r(n(2)),l=r(n(3)),u=r(n(5)),h=r(n(6)),c=r(n(7)),d=r(n(17)),f=r(n(484));function p(r){var i=m();return function(){var e,t=(0,c.default)(r),n=i?(e=(0,c.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,n)}}function m(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var v=function(e){(0,u.default)(i,e);var r=p(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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function T(e,t){var n;if(e){if("string"==typeof e)return S(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(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)):s.distancen.times?o.stopJump():(e%=n.all,e>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=e/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,t;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(g.default),t=(0,l.default)(e),t.off("frameLoop",this.jumpEvent))}},{key:"boost",value:function(e){var n,r,t,i,a=this;this._renderNode&&!this._isBoosting&&(this._isBoosting=!0,n=(0,u.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,t=this.findParent(g.default),i=(0,l.default)(t),this.boostEvent=function(){var e,t;a._renderNode?(e=(new Date).getTime(),t=Math.sin(e*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,t;this._renderNode&&this.boostEvent&&(this._size=this._origonSize,this._isBoosting=!1,e=this.findParent(g.default),t=(0,l.default)(e),t.off("frameLoop",this.boostEvent),this.setSize())}},{key:"initSprite",value:function(e,t){this._renderNode=new y.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,n;this._renderNode&&(t=this.findParent(g.default),n=t.materialManager.createPoiMaterial(e),this._renderNode.material.dispose(),this._renderNode.material=n)}},{key:"setSize",value:function(){var e=this.findParent(g.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",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.setSize()):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode&&(this._renderNode.parent=this.parent.scene)),this._visible=e,this._visible=e},get:function(){return this._visible}},{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,o.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?_.default.convertGeo2Points(t.gdata.geo):_.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}(m.default),M=b,T=M;t.default=T},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(20)),u=r(n(14)),h=r(n(21)),c=r(n(22)),a=r(n(18)),o=r(n(13)),s=r(n(4)),d=r(n(33)),f=r(n(15)),p=r(n(9)),m=r(n(2)),v=r(n(3)),g=r(n(5)),y=r(n(6)),_=r(n(7)),x=r(n(222));function w(e,t){var n;if(void 0===c.default||null==(0,h.default)(e)){if((0,u.default)(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function b(e,t){var n;if(e){if("string"==typeof e)return M(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function w(e,t){var n;if(e){if("string"==typeof e)return b(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function b(e,t){var n;if(e){if("string"==typeof e)return M(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function b(e,t){var n;if(e){if("string"==typeof e)return M(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function b(e,t){var n;if(e){if("string"==typeof e)return M(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t<0?1:t+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,o=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 o.toUpperCase()}}]),e}();t.FMMathUtils=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(2)),s=r(n(5)),l=r(n(6)),u=r(n(7));function h(r){var i=c();return function(){var e,t=(0,u.default)(r),n=i?(e=(0,u.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,n)}}function c(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var d=function(e){(0,s.default)(i,e);var r=h(i);function i(){var e;(0,o.default)(this,i),e=r.call(this);var t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new fm.InterleavedBuffer(t,5);return e.setIndex([0,1,2,0,2,3]),e.setAttribute("position",new fm.InterleavedBufferAttribute(n,3,0,!1)),e.setAttribute("uv",new fm.InterleavedBufferAttribute(n,2,3,!1)),e}return i}(fm.BufferGeometry),f=d;t.default=f},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var y=r(n(75)),a=r(n(12)),_=r(n(140)),x={};function o(e){this.manager=void 0!==e?e:fm.DefaultLoadingManager}(0,a.default)(o.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,y.default)(function(){e&&e(r),s.manager.itemEnd(o)},0),r;if(void 0===x[o]){var i=/^data:(.*?)(;base64)?,(.*)$/,a=o.match(i);if(a){var l=a[1],u=!!a[2],h=a[3],h=decodeURIComponent(h);u&&(h=atob(h));try{var c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":for(var d=new Uint8Array(h.length),f=0;f=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 ",h);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=c,e.uniforms=a,e.defines={STANDARD:""},e.color=new fm.Color(1,1,1),e.opacity=1;var d,f,p=[];return(0,v.default)(r.diffuseFactor)&&(d=r.diffuseFactor,e.color.fromArray(d),e.opacity=d[3]),void 0!==r.diffuseTexture&&p.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,v.default)(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture&&(f=r.specularGlossinessTexture,p.push(n.assignTexture(e,"glossinessMap",f)),p.push(n.assignTexture(e,"specularMap",f))),g.default.all(p)},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,m.default)(e)?null:(0,m.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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function A(e,t){var n;if(e){if("string"==typeof e)return I(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}function I(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,r;this.parent&&this.parent.parent?(t=this._map.center,n=this.parent.parent.height,r=new fm.Vector3(e.x-t.x,n+e.z,-e.y+t.y),this._renderNode.lookAt(r)):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 T.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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function T(e,t){var n;if(e){if("string"==typeof e)return S(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn.times?o.stopJump():(e%=n.all,e>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=e/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,t;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(p.default),t=(0,l.default)(e),t.off("frameLoop",this.jumpEvent))}},{key:"setSize",value:function(){var e=this.findParent(p.default);(0,l.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:"url",set:function(e){var t=this.findParent(p.default);if(!t)return!1;var n=t.materialManager.createPoiMaterial({imageUrl:e,imageSrc:e,alpha:1});n.userData.size=this._size,this._renderNode.material.dispose(),this._renderNode.material=n,this._url=e},get:function(){return this._url}},{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}(w.default),S=T;t.default=S},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(2)),s=r(n(3)),l=r(n(5)),u=r(n(6)),h=r(n(7)),c=r(n(17)),d=r(n(537)),f=r(n(37)),p=r(n(77)),m=n(67);function v(r){var i=g();return function(){var e,t=(0,h.default)(r),n=i?(e=(0,h.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,n)}}function g(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var y=function(e){(0,l.default)(i,e);var r=v(i);function i(e,t){var n;return(0,o.default)(this,i),n=r.call(this,0,f.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 d.default,r=new fm.MeshBasicMaterial,i=!0;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));var a=this._scene.mapcenter;return this._x&&this._y||(this._x=a.x,this._y=a.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(m.tileMessage.noGroup);n.removeLocation(this),r.addLocation(this),t=r,this.isAlwaysShow&&this.alwaysShow(),this._gid=e.groupID,this._groupId=this._gid}var i=this._scene.mapcenter;this._x=e.x,this._y=e.y,this._renderNode.position.set(this._x-i.x,this._dheight,-this._y+i.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)));var o=e+a,s=e;this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var l=new p.default({angle:s},{angle:o},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(l),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(l),this.rotateAnimater=l}},{key:"moveTo",value:function(t){var e,n,r,i=this;this._isRuning||(e=t.x,n=t.y,r=new p.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}(c.default),_=y;t.default=_},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={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"},a=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(64)),o=r(n(92));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,o.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,a.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};var s=fm.LineMaterial;t.default=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(2)),s=r(n(3)),l=r(n(5)),u=r(n(6)),h=r(n(7)),c=r(n(251));function d(r){var i=f();return function(){var e,t=(0,h.default)(r),n=i?(e=(0,h.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,n)}}function f(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var p=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&&(h=Math.sqrt(u),c=Math.atan2(h,s*l),d=Math.sin(d*c)/h,o=Math.sin(o*c)/h),f=o*l,m=m*d+_*f,v=v*d+x*f,g=g*d+w*f,y=y*d+b*f,d===1-o&&(p=1/Math.sqrt(m*m+v*v+g*g+y*y),m*=p,v*=p,g*=p,y*=p)),e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y}}),(0,a.default)(l.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,o.default)(l.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),u=o(r/2),h=o(i/2),c=s(n/2),d=s(r/2),f=s(i/2);return"XYZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"YXZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"ZXY"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"ZYX"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"YZX"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h-c*d*f):"XZY"===a&&(this._x=c*u*h-l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h+c*d*f),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix: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],c=n[10],d=r+s+c;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(s._Math.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),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,l=t._z,u=t._w;return this._x=n*u+a*o+r*l-i*s,this._y=r*u+a*s+i*o-n*l,this._z=i*u+a*l+n*s-r*o,this._w=a*u-n*o-r*s-i*l,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;var s=1-o*o;if(s<=M.default){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),h=Math.atan2(u,o),c=Math.sin((1-t)*h)/u,d=Math.sin(t*h)/u;return this._w=a*c+this._w*d,this._x=n*c+this._x*d,this._y=r*c+this._y*d,this._z=i*c+this._z*d,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(W,e,Y){"use strict";(function(e,g){var y=Y(115);W.exports=m;var o,r=Y(568);m.ReadableState=p,Y(155).EventEmitter;var _=function(e,t){return e.listeners(t).length},i=Y(258),s=Y(157).Buffer,t=e.Uint8Array||function(){};function l(e){return s.from(e)}function a(e){return s.isBuffer(e)||e instanceof t}var n=Object.create(Y(96));n.inherits=Y(78);var u,h=Y(572),x=void 0,x=h&&h.debuglog?h.debuglog("stream"):function(){},c=Y(573),d=Y(259);n.inherits(m,i);var f=["error","close","destroy","pause","resume"];function w(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 p(e,t){o=o||Y(70),e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new c,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||Y(260).StringDecoder,this.decoder=new u(e.encoding),this.encoding=e.encoding)}function m(e){if(o=o||Y(70),!(this instanceof m))return new m(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function v(e,t,n,r,i){var a,o=e._readableState;return null===t?(o.reading=!1,I(e,o)):(i||(a=M(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 A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=E(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(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,L(e))}function L(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(x("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(R,e):R(e))}function R(e){x("emit readable"),e.emit("readable"),F(e)}function N(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(k,e,t))}function k(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=U(e,t.buffer,t.decoder),n);var n}function U(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 G(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 V(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return x("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?V:L)(this),null;if(e=A(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r,i=t.needReadable;return x("need readable",i),(0===t.length||t.length-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]+Ir[e>>16&255]+Ir[e>>24&255]+"-"+Ir[255&t]+Ir[t>>8&255]+"-"+Ir[t>>16&15|64]+Ir[t>>24&255]+"-"+Ir[63&n|128]+Ir[n>>8&255]+"-"+Ir[n>>16&255]+Ir[n>>24&255]+Ir[255&r]+Ir[r>>8&255]+Ir[r>>16&255]+Ir[r>>24&255];return i.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*Nr.DEG2RAD},radToDeg:function(e){return e*Nr.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),d=o((t-r)/2),f=a((r-t)/2),p=o((r-t)/2);"XYX"===i?e.set(s*h,l*c,l*d,s*u):"YZY"===i?e.set(l*d,s*h,l*c,s*u):"ZXZ"===i?e.set(l*c,l*d,s*h,s*u):"XZX"===i?e.set(s*h,l*p,l*f,s*u):"YXY"===i?e.set(l*f,s*h,l*p,s*u):"ZYZ"===i?e.set(l*p,l*f,s*h,s*u):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function kr(e,t){this.x=e||0,this.y=t||0}function Pr(){this.elements=[1,0,0,0,1,0,0,0,1],0se.default&&(h=Math.sqrt(u),c=Math.atan2(h,s*l),d=Math.sin(d*c)/h,o=Math.sin(o*c)/h),f=o*l,m=m*d+_*f,v=v*d+x*f,g=g*d+w*f,y=y*d+b*f,d===1-o&&(p=1/Math.sqrt(m*m+v*v+g*g+y*y),m*=p,v*=p,g*=p,y*=p)),e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y}}),(0,S.default)(zr.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,qe.default)(zr.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),u=o(r/2),h=o(i/2),c=s(n/2),d=s(r/2),f=s(i/2);return"XYZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"YXZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"ZXY"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"ZYX"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"YZX"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h-c*d*f):"XZY"===a&&(this._x=c*u*h-l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h+c*d*f),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix: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],c=n[10],d=r+s+c;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(Nr.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),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,l=t._z,u=t._w;return this._x=n*u+a*o+r*l-i*s,this._y=r*u+a*s+i*o-n*l,this._z=i*u+a*l+n*s-r*o,this._w=a*u-n*o-r*s-i*l,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;var s=1-o*o;if(s<=se.default){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),h=Math.atan2(u,o),c=Math.sin((1-t)*h)/u,d=Math.sin(t*h)/u;return this._w=a*c+this._w*d,this._x=n*c+this._x*d,this._y=r*c+this._y*d,this._z=i*c+this._z*d,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 Gr=new Hr,Vr=new zr;function Hr(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}(0,qe.default)(Hr.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(Vr.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Vr.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,a=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])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,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,h=s*r+i*n-a*t,c=-i*t-a*n-o*r;return this.x=l*s+c*-i+u*-o-h*-a,this.y=u*s+c*-a+h*-i-l*-o,this.z=h*s+c*-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,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide: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,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this},projectOnVector:function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)},projectOnPlane:function(e){return Gr.copy(this).projectOnVector(e),this.sub(Gr)},reflect:function(e){return this.sub(Gr.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(Nr.clamp(n,-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,r=this.z-e.z;return t*t+n*n+r*r},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){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn: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 jr=new Hr,Wr=new Kr,Yr=new Hr(0,0,0),qr=new Hr(1,1,1),Xr=new Hr,Zr=new Hr,Jr=new Hr;function Kr(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0s)return!1}return!0}(0,qe.default)(Ri.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 Hr),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,yi),yi.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,n=0=-e.constant},intersectsTriangle:function(e){if(this.isEmpty())return!1;this.getCenter(Ei),Ai.subVectors(this.max,Ei),xi.subVectors(e.a,Ei),wi.subVectors(e.b,Ei),bi.subVectors(e.c,Ei),Mi.subVectors(wi,xi),Ti.subVectors(bi,wi),Si.subVectors(xi,bi);var t=[0,-Mi.z,Mi.y,0,-Ti.z,Ti.y,0,-Si.z,Si.y,Mi.z,0,-Mi.x,Ti.z,0,-Ti.x,Si.z,0,-Si.x,-Mi.y,Mi.x,0,-Ti.y,Ti.x,0,-Si.y,Si.x,0];return!!Ni(t,xi,wi,bi,Ai)&&(t=[1,0,0,0,1,0,0,0,1],!!Ni(t,xi,wi,bi,Ai)&&(Ii.crossVectors(Mi,Ti),t=[Ii.x,Ii.y,Ii.z],Ni(t,xi,wi,bi,Ai)))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Hr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=yi.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(yi).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()||(gi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),gi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),gi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),gi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),gi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),gi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),gi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),gi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(gi)),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 ki=new Ri;function Pi(e,t){this.center=void 0!==e?e:new Hr,this.radius=void 0!==t?t:0}(0,qe.default)(Pi.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):ki.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 Ri),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 Ci=new Hr,Di=new Hr,Oi=new Hr,Fi=new Hr,Bi=new Hr,Ui=new Hr,zi=new Hr;function Gi(e,t){this.origin=void 0!==e?e:new Hr,this.direction=void 0!==t?t:new Hr(0,0,-1)}(0,qe.default)(Gi.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 Hr),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,Ci)),this},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Hr),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=Ci.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ci.copy(this.direction).multiplyScalar(t).add(this.origin),Ci.distanceToSquared(e))},distanceSqToSegment:function(e,t,n,r){Di.copy(e).add(t).multiplyScalar(.5),Oi.copy(t).sub(e).normalize(),Fi.copy(this.origin).sub(Di);var i,a,o,s,l=.5*e.distanceTo(t),u=-this.direction.dot(Oi),h=Fi.dot(this.direction),c=-Fi.dot(Oi),d=Fi.lengthSq(),f=Math.abs(1-u*u),p=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){var r,i;return e=Nr.euclideanModulo(e,1),t=Nr.clamp(t,0,1),n=Nr.clamp(n,0,1),0===t?this.r=this.g=this.b=n:(r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r,this.r=sa(i,r,e+1/3),this.g=sa(i,r,e),this.b=sa(i,r,e-1/3)),this},setStyle:function(t){function e(e){void 0!==e&&(0,me.default)(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var r,i=n[1],a=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,(0,w.default)(r[1],10))/255,this.g=Math.min(255,(0,w.default)(r[2],10))/255,this.b=Math.min(255,(0,w.default)(r[3],10))/255,e(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,(0,w.default)(r[1],10))/100,this.g=Math.min(100,(0,w.default)(r[2],10))/100,this.b=Math.min(100,(0,w.default)(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=(0,me.default)(r[1])/360,s=(0,w.default)(r[2],10)/100,l=(0,w.default)(r[3],10)/100;return e(r[5]),this.setHSL(o,s,l)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=n[1],h=u.length;if(3===h)return this.r=(0,w.default)(u.charAt(0)+u.charAt(0),16)/255,this.g=(0,w.default)(u.charAt(1)+u.charAt(1),16)/255,this.b=(0,w.default)(u.charAt(2)+u.charAt(2),16)/255,this;if(6===h)return this.r=(0,w.default)(u.charAt(0)+u.charAt(1),16)/255,this.g=(0,w.default)(u.charAt(2)+u.charAt(3),16)/255,this.b=(0,w.default)(u.charAt(4)+u.charAt(5),16)/255,this}return t&&0t&&(t=e[n]);return t}(0,R.default)(ma.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),(0,qe.default)(ma.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:u,point:Ka.clone(),object:e}}function eo(e,t,n,r,i,a,o,s,l,u,h,c){Ba.fromBufferAttribute(i,u),Ua.fromBufferAttribute(i,h),za.fromBufferAttribute(i,c);var d=e.morphTargetInfluences;if(t.morphTargets&&a&&d){ja.set(0,0,0),Wa.set(0,0,0),Ya.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")},i=new po({type:"CubemapFromEquirect",uniforms:lo(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Xe,blending:we});i.uniforms.tEquirect.value=t;var a=new Qa(new so(5,5,5),i);n.add(a);var o=new _o(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,n),a.geometry.dispose(),a.material.dispose(),this},wo.prototype=(0,T.default)(Or.prototype),wo.prototype.constructor=wo,wo.prototype.isDataTexture=!0;var bo=new Pi,Mo=new Hr;function To(e,t,n,r,i,a){this.planes=[void 0!==e?e:new Wi,void 0!==t?t:new Wi,void 0!==n?n:new Wi,void 0!==r?r:new Wi,void 0!==i?i:new Wi,void 0!==a?a:new Wi]}(0,qe.default)(To.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],g=n[14],y=n[15];return t[0].setComponents(o-r,h-s,p-c,y-m).normalize(),t[1].setComponents(o+r,h+s,p+c,y+m).normalize(),t[2].setComponents(o+i,h+l,p+d,y+v).normalize(),t[3].setComponents(o-i,h-l,p-d,y-v).normalize(),t[4].setComponents(o-a,h-u,p-f,y-g).normalize(),t[5].setComponents(o+a,h+u,p+f,y+g).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),bo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(bo)},intersectsSprite:function(e){return bo.center.set(0,0,0),bo.radius=.7071067811865476,bo.applyMatrix4(e.matrixWorld),this.intersectsSphere(bo)},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 Mh(e){return e.replace(bh,Th)}function Th(e,t){var n=Zl[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Mh(n)}var Sh=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Eh=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function Ah(e){return e.replace(Eh,Lh).replace(Sh,Ih)}function Ih(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Lh(e,t,n,r)}function Lh(e,t,n,r){for(var i="",a=(0,w.default)(t);a<(0,w.default)(n);a++)i+=r.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function Rh(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 Nh(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===H?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===j?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===W&&(t="SHADOWMAP_TYPE_VSM"),t}function kh(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case he:case ce:t="ENVMAP_TYPE_CUBE";break;case it:case at:t="ENVMAP_TYPE_CUBE_UV";break;case de:case fe:t="ENVMAP_TYPE_EQUIREC";break;case rt:t="ENVMAP_TYPE_SPHERE"}return t}function Ph(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ce:case fe:t="ENVMAP_MODE_REFRACTION"}return t}function Ch(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case Z:t="ENVMAP_BLENDING_MULTIPLY";break;case J:t="ENVMAP_BLENDING_MIX";break;case K:t="ENVMAP_BLENDING_ADD"}return t}function Dh(e,t,n){var r,i,a,o,s,l,u,h,c=e.getContext(),d=n.defines,f=n.vertexShader,p=n.fragmentShader,m=Nh(n),v=kh(n),g=Ph(n),y=Ch(n),_=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,We.default)(h)||h.isPointLightShadow||this.type!==W||(c={minFilter:pt,magFilter:pt,format:Pt},h.map=new Br(x.x,x.y,c),(0,We.default)(h).texture.name=u.name+".shadowMap",h.mapPass=new Br(x.x,x.y,c),h.camera.updateProjectionMatrix()),null===(0,We.default)(h)&&(c={minFilter:ut,magFilter:ut,format:Pt},h.map=new Br(x.x,x.y,c),(0,We.default)(h).texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()),g.setRenderTarget((0,We.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){if("object"!==(0,ne.default)(e))return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e;var a=t?Nr.floorPowerOfTwo:Math.floor,o=a(i*e.width),s=a(i*e.height);void 0===h&&(h=d(o,s));var l=n?d(o,s):h;l.width=o,l.height=s;var u=l.getContext("2d");return u.drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),e.src=l.toDataURL("image/png"),e}return e}function M(e){return Nr.isPowerOfTwo(e.width)&&Nr.isPowerOfTwo(e.height)}function m(e){return!x&&(e.wrapS!==st||e.wrapT!==st||e.minFilter!==ut&&e.minFilter!==pt)}function T(e,t){return e.generateMipmaps&&t&&e.minFilter!==ut&&e.minFilter!==pt}function S(e,t,n,r){v.generateMipmap(e);var i=y.get(t);i.__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function E(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+"'")}var r=t;return 6403===t&&(5126===n&&(r=33326),5131===n&&(r=33325),5121===n&&(r=33321)),6407===t&&(5126===n&&(r=34837),5131===n&&(r=34843),5121===n&&(r=32849)),6408===t&&(5126===n&&(r=34836),5131===n&&(r=34842),5121===n&&(r=32856)),33325!==r&&33326!==r&&34842!==r&&34836!==r||i.get("EXT_color_buffer_float"),r}function u(e){return e===ut||e===ht||e===dt?9728:9729}function f(e){var t=e.target;t.removeEventListener("dispose",f),I(t),t.isVideoTexture&&s.delete(t),c.memory.textures--}function A(e){var t=e.target;t.removeEventListener("dispose",A),L(t),c.memory.textures--}function I(e){var t=y.get(e);void 0!==t.__webglInit&&(v.deleteTexture(t.__webglTexture),y.remove(e))}function L(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 R=0;function N(){R=0}function k(){var e=R;return r<=e&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+r),R+=1,e}function P(e,t){var n=y.get(e);if(e.isVideoTexture&&K(e),0e.far||t.push({distance:o,point:pc.clone(),uv:na.getUV(pc,xc,wc,bc,Mc,Tc,Sc,new kr),face:null,object:this}))},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return mi.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var Ic=new Hr,Lc=new Hr;function Rc(){mi.call(this),this._currentLevel=0,this.type="LOD",(0,S.default)(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Nc(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Qa.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Kr,this.bindMatrixInverse=new Kr}Rc.prototype=(0,qe.default)((0,T.default)(mi.prototype),{constructor:Rc,isLOD:!0,copy:function(e){mi.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:M,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}else for(v=0,g=p.length/3-1;ve.far||t.push({distance:M,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}else if(n.isGeometry)for(var w=n.vertices,b=w.length,v=0;ve.far||t.push({distance:M,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Xc=new Hr,Zc=new Hr;function Jc(e,t){qc.call(this,e,t),this.type="LineSegments"}function Kc(e,t){qc.call(this,e,t),this.type="LineLoop"}function Qc(e){da.call(this),this.type="PointsMaterial",this.color=new oa(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}Jc.prototype=(0,qe.default)((0,T.default)(qc.prototype),{constructor:Jc,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)return;a.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:o})}}function ad(e,t,n,r,i,a,o,s,l){Or.call(this,e,t,n,r,i,a,o,s,l),this.format=void 0!==o?o:kt,this.minFilter=void 0!==a?a:pt,this.magFilter=void 0!==i?i:pt,this.generateMipmaps=!1}function od(e,t,n,r,i,a,o,s,l,u,h,c){Or.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 sd(e,t,n,r,i,a,o,s,l){Or.call(this,e,t,n,r,i,a,o,s,l),this.needsUpdate=!0}function ld(e,t,n,r,i,a,o,s,l,u){if(u=void 0!==u?u:Ft,u!==Ft&&u!==Bt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ft&&(n=bt),void 0===n&&u===Bt&&(n=Rt),Or.call(this,null,r,i,a,o,s,u,n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:ut,this.minFilter=void 0!==s?s:ut,this.flipY=!1,this.generateMipmaps=!1}function ud(e){Ca.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)}}),od.prototype=(0,T.default)(Or.prototype),od.prototype.constructor=od,od.prototype.isCompressedTexture=!0,sd.prototype=(0,T.default)(Or.prototype),sd.prototype.constructor=sd,sd.prototype.isCanvasTexture=!0,ld.prototype=(0,T.default)(Or.prototype),ld.prototype.constructor=ld,ld.prototype.isDepthTexture=!0,ud.prototype=(0,T.default)(Ca.prototype),ud.prototype.constructor=ud,hd.prototype=(0,T.default)(ao.prototype),hd.prototype.constructor=hd,cd.prototype=(0,T.default)(Ca.prototype),cd.prototype.constructor=cd,dd.prototype=(0,T.default)(ao.prototype),dd.prototype.constructor=dd,fd.prototype=(0,T.default)(Ca.prototype),fd.prototype.constructor=fd,pd.prototype=(0,T.default)(ao.prototype),pd.prototype.constructor=pd,md.prototype=(0,T.default)(fd.prototype),md.prototype.constructor=md,vd.prototype=(0,T.default)(ao.prototype),vd.prototype.constructor=vd,gd.prototype=(0,T.default)(fd.prototype),gd.prototype.constructor=gd,yd.prototype=(0,T.default)(ao.prototype),yd.prototype.constructor=yd,_d.prototype=(0,T.default)(fd.prototype),_d.prototype.constructor=_d,xd.prototype=(0,T.default)(ao.prototype),xd.prototype.constructor=xd,wd.prototype=(0,T.default)(fd.prototype),wd.prototype.constructor=wd,bd.prototype=(0,T.default)(ao.prototype),bd.prototype.constructor=bd,Md.prototype=(0,T.default)(Ca.prototype),Md.prototype.constructor=Md,Md.prototype.toJSON=function(){var e=Ca.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Td.prototype=(0,T.default)(ao.prototype),Td.prototype.constructor=Td,Sd.prototype=(0,T.default)(Ca.prototype),Sd.prototype.constructor=Sd,Ed.prototype=(0,T.default)(ao.prototype),Ed.prototype.constructor=Ed,Ad.prototype=(0,T.default)(Ca.prototype),Ad.prototype.constructor=Ad;var Id={triangulate:function(e,t,n){n=n||2;var r,i,a,o,s,l,u,h=t&&t.length,c=h?t[0]*n:e.length,d=Ld(e,0,c,n,!0),f=[];if(!d||d.next===d.prev)return f;if(h&&(d=Od(e,t,d,n)),e.length>80*n){r=a=e[0],i=o=e[1];for(var p=n;pa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,c=Vd(s,l,t,n,r),d=Vd(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&&jd(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Yd(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&jd(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Yd(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==e.prev&&f!==e.next&&jd(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Yd(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&jd(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Yd(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function Cd(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!qd(i,a)&&Xd(i,r,r.next,a)&&Jd(i,a)&&Jd(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),ef(r),ef(r.next),r=e=a),r=r.next}while(r!==e);return r}function Dd(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Wd(o,s)){var l=Qd(o,s),o=Rd(o,o.next),l=Rd(l,l.next);return Nd(o,t,n,r,i,a),void Nd(l,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function Od(e,t,n,r){for(var i,a,o,s=[],l=0,u=t.length;l=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&&jd(an.x)&&Jd(r,e)&&(n=r,d=l)),r=r.next;return n}function zd(e,t,n,r){for(var i=e;null===i.z&&(i.z=Vd(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,Gd(i)}function Gd(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 Qd(e,t){var n=new tf(e.i,e.x,e.y),r=new tf(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 $d(e,t,n,r){var i=new tf(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ef(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 tf(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 nf(e,t,n,r){for(var i=0,a=t,o=n-r;ase.default){var h=Math.sqrt(l),c=Math.sqrt(o*o+s*s),d=t.x-a/h,f=t.y+i/h,p=n.x-s/c,m=n.y+o/c,v=((p-d)*s-(m-f)*o)/(i*s-a*o),g=d+i*v-e.x,y=f+a*v-e.y,_=g*g+y*y;if(_<=2)return new kr(g,y);r=Math.sqrt(_/2)}else{var x=!1;i>se.default?o>se.default&&(x=!0):i<-se.default?o<-se.default&&(x=!0):(0,oe.default)(a)===(0,oe.default)(s)&&(x=!0),r=x?(g=-a,y=i,Math.sqrt(l)):(g=i,y=a,Math.sqrt(l/2))}return new kr(g/r,y/r)}for(var F=[],B=0,U=T.length,z=U-1,G=B+1;Ba.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=Gf.arraySlice(r,a,o),this.values=Gf.arraySlice((0,g.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,g.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&&sse.default&&(l.normalize(),r=Math.acos(Nr.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(Nr.clamp(o[0].dot(o[e]),-1,1)),r/=e,0r.length-2?r.length-1:a+1],h=r[a>r.length-3?r.length-1:a+2];return n.set(Tp(o,s.x,l.x,u.x,h.x),Tp(o,s.y,l.y,u.y,h.y)),n},zp.prototype.copy=function(e){mp.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(),s=0===o?0:1-i/o;return a.getPointAt(s)}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;nse.default){if(u<0&&(o=t[a],l=-l,s=t[i],u=-u),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=u*(e.x-o.x)-l*(e.y-o.y);if(0===h)return!0;if(h<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return r}var i=rf.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 jp,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,g=0,y=a.length;gt.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,r,i=this.time+e,a=this._clip.duration,o=this.loop,s=this._loopCount,l=o===Cn;if(0===e)return-1!==s&&l&&1==(1&s)?a-i:i;if(o===kn){-1===s&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(a<=i)i=a;else{if(!(i<0)){this.time=i;break e}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else if(-1===s&&(0<=e?(s=0,this._setEndings(!0,0===this.repetitions,l)):this._setEndings(0===this.repetitions,!0,l)),a<=i||i<0?(t=Math.floor(i/a),i-=a*t,s+=Math.abs(t),n=this.repetitions-s,n<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=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 kr),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 kr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=mv.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 gv=new Hr,yv=new Hr;function _v(e,t){this.start=void 0!==e?e:new Hr,this.end=void 0!==t?t:new Hr}function xv(e){mi.call(this),this.material=e,this.render=function(){}}(0,qe.default)(_v.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 Hr),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 Hr),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 Hr),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){gv.subVectors(e,this.start),yv.subVectors(this.end,this.start);var n=yv.dot(yv),r=yv.dot(gv),i=r/n;return t&&(i=Nr.clamp(i,0,1)),i},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Hr),this.delta(n).multiplyScalar(r).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)}}),xv.prototype=(0,T.default)(mi.prototype),xv.prototype.constructor=xv,xv.prototype.isImmediateRenderObject=!0;var wv=new Hr;function bv(e,t){mi.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var n=new Ca,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,a=1,o=32;i\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:we,depthTest:!1,depthWrite:!1});return r.type="SphericalGaussianBlur",r}function kg(){var e=new kr(1,1),t=new Nf({uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:ig[jn]},outputEncoding:{value:ig[jn]}},vertexShader:Cg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n".concat(Dg(),"\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:we,depthTest:!1,depthWrite:!1});return t.type="EquirectangularToCubeUV",t}function Pg(){var e=new Nf({uniforms:{envMap:{value:null},inputEncoding:{value:ig[jn]},outputEncoding:{value:ig[jn]}},vertexShader:Cg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n".concat(Dg(),"\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:we,depthTest:!1,depthWrite:!1});return e.type="CubemapToCubeUV",e}function Cg(){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 Dg(){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 Og(e,t,n,r,i,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new ha(e,t,n,i,a,o)}_g.prototype={constructor:_g,fromScene:function(e,t,n,r){var i=1>>0||(s.test(n)?16:10))}:o},function(e,t,n){var r=n(391);e.exports=r},function(e,t,n){n(392);var r=n(11);e.exports=r.parseFloat},function(e,t,n){var r=n(8),i=n(393);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(e,t,n){var r=n(19),i=n(134).trim,a=n(109),o=r.parseFloat,s=1/o(a+"-0")!=-Infinity;e.exports=s?function(e){var t=i(String(e)),n=o(t);return 0===n&&"-"==t.charAt(0)?-0:n}:o},function(e,t,n){var r=n(395);e.exports=r},function(e,t,n){n(396);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(50),a=n(16),o=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,h=function(e,t,n){var r=n.charAt(t-1),i=n.charAt(t+1);return l.test(e)&&!u.test(i)||u.test(e)&&!l.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},c=a(function(){return'"\\udf06\\ud834"'!==o("\udf06\ud834")||'"\\udead"'!==o("\udead")});o&&r({target:"JSON",stat:!0,forced:c},{stringify:function(e,t,n){var r=o.apply(null,arguments);return"string"==typeof r?r.replace(s,h):r}})},function(e,t,n){var r=n(198);e.exports=r},function(e,t,n){var r=n(8),i=n(76);r({target:"Array",stat:!0},{isArray:i})},function(e,t,n){var r=n(400);e.exports=r},function(e,t,n){var r=n(401),i=String.prototype;e.exports=function(e){var t=e.repeat;return"string"==typeof e||e===i||e instanceof String&&t===i.repeat?r:t}},function(e,t,n){n(402);var r=n(24);e.exports=r("String").repeat},function(e,t,n){var r=n(8),i=n(403);r({target:"String",proto:!0},{repeat:i})},function(e,t,n){"use strict";var i=n(73),a=n(82);e.exports="".repeat||function(e){var t=String(a(this)),n="",r=i(e);if(r<0||Infinity==r)throw RangeError("Wrong number of repetitions");for(;0>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){var r=n(196);e.exports=r},function(e,t,n){var r=n(406);e.exports=r},function(e,t,n){n(407);var r=n(11),i=r.Object,a=e.exports=function(e,t){return i.defineProperties(e,t)};i.defineProperties.sham&&(a.sham=!0)},function(e,t,n){var r=n(8),i=n(29),a=n(175);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:a})},function(e,t,n){var r=n(199);e.exports=r},function(e,t,n){n(410);var r=n(24);e.exports=r("Array").slice},function(e,t,n){"use strict";var r=n(8),u=n(23),h=n(76),c=n(103),d=n(44),f=n(42),p=n(86),i=n(25),a=n(89),o=n(51),s=a("slice"),l=o("slice",{ACCESSORS:!0,0:0,1:2}),m=i("species"),v=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!s||!l},{slice:function(e,t){var n,r,i,a=f(this),o=d(a.length),s=c(e,o),l=c(void 0===t?o:t,o);if(h(a)&&(n=a.constructor,"function"!=typeof n||n!==Array&&!h(n.prototype)?u(n)&&(n=n[m],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return v.call(a,s,l);for(r=new(void 0===n?Array:n)(g(l-s,0)),i=0;sS||8*(1-_.dot(x.object.quaternion))>S)&&(x.dispatchEvent(w),y.copy(x.object.position),_.copy(x.object.quaternion),R=!1,!0)}),this.dispose=function(){x.domElement.removeEventListener("contextmenu",me,!1),x.domElement.removeEventListener("mousedown",ae,!1),x.domElement.removeEventListener("wheel",he,!1),x.domElement.removeEventListener("touchstart",de,!1),x.domElement.removeEventListener("touchend",pe,!1),x.domElement.removeEventListener("touchmove",fe,!1),x.domElement.removeEventListener("mouseup",se,!1),x.domElement.removeEventListener("mousemove",le,!1),Te.default.PointerEvent&&!Te.default.TouchEvent&&(x.domElement.removeEventListener("pointerdown",ye,!1),x.domElement.removeEventListener("pointermove",_e,!1),x.domElement.removeEventListener("pointerup",xe,!1)),Se.default.removeEventListener("mousemove",oe,!1),Se.default.removeEventListener("mouseup",ue,!1),Te.default.removeEventListener("keydown",ce,!1),this.enterCtrl=void 0,this.domElement=void 0,this.object=void 0};var x=this,w={type:"change"},b={type:"start"},r={type:"end"},M={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4,TOUCH_PAN:5,TOUCH_DOLLY_ROTATE:6},T=M.NONE,S=1e-6,E=new fm.Spherical,A=new fm.Spherical,I=1,L=new fm.Vector3,R=!1,N=new fm.Vector2,k=new fm.Vector2,P=new fm.Vector2,C=new fm.Vector2,D=new fm.Vector2,O=(new fm.Vector2,new fm.Vector2),F=new fm.Vector2,B=new fm.Vector2,U=new fm.Vector2,z=new fm.Vector2,G=new fm.Vector2,V=new fm.Vector2;function H(){return 2*Math.PI/60/60*x.autoRotateSpeed}function i(){return Math.pow(.95,x.zoomSpeed)}function j(e){x.enterCtrl&&!x.enterCtrl.enableMapRotate||(A.theta-=e)}function W(e){x.enterCtrl&&!x.enterCtrl.enableMapIncline||(A.phi-=e)}this.rotateLeft=function(e){j(e)};var a,o,s=(a=new fm.Vector3,function(e,t){a.setFromMatrixColumn(t,0),a.multiplyScalar(-e),L.add(a)}),l=(o=new fm.Vector3,function(e,t){!0===x.screenSpacePanning?o.setFromMatrixColumn(t,1):(o.setFromMatrixColumn(t,0),o.crossVectors(x.object.up,o)),o.multiplyScalar(e),L.add(o)});this.panUp=function(e){var t=new fm.Vector3;t.y=1,t.multiplyScalar(e),L.add(t)};var u,Y=(u=new fm.Vector3,function(e,t){var n,r,i;x.enterCtrl&&!x.enterCtrl.enableMapPan||(n=x.domElement===Se.default?x.domElement.body:x.domElement,x.object.isPerspectiveCamera?(r=x.object.position,u.copy(r).sub(x.target),i=u.length(),i*=Math.tan(x.object.fov/2*Math.PI/180),s(2*e*i/n.clientHeight,x.object.matrix),l(2*t*i/n.clientHeight,x.object.matrix)):x.object.isOrthographicCamera?(s(e*(x.object.right-x.object.left)/x.object.zoom/n.clientWidth,x.object.matrix),l(t*(x.object.top-x.object.bottom)/x.object.zoom/n.clientHeight,x.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),x.enablePan=!1))});function q(e){x.enterCtrl&&!x.enterCtrl.enableMapPinch||(x.object.isPerspectiveCamera?I/=e:x.object.isOrthographicCamera?(x.object.zoom=Math.max(x.minZoom,Math.min(x.maxZoom,x.object.zoom*e)),x.object.updateProjectionMatrix(),I/=e,R=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),x.enableZoom=!1))}function X(e){x.enterCtrl&&!x.enterCtrl.enableMapPinch||(x.object.isPerspectiveCamera?I*=e:x.object.isOrthographicCamera?(x.object.zoom=Math.max(x.minZoom,Math.min(x.maxZoom,x.object.zoom/e)),x.object.updateProjectionMatrix(),R=!0,I*=e):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),x.enableZoom=!1))}function Z(e){N.set(e.clientX,e.clientY)}function J(e){U.set(e.clientX,e.clientY)}function K(e){O.set(e.clientX,e.clientY)}function Q(e){k.set(e.clientX,e.clientY),P.subVectors(k,N).multiplyScalar(x.rotateSpeed);var t=x.domElement===Se.default?x.domElement.body:x.domElement;j(2*Math.PI*P.x/t.clientHeight),W(2*Math.PI*P.y/t.clientHeight),N.copy(k)}function $(e){z.set(e.clientX,e.clientY),G.subVectors(z,U),0s;)n=i(r,t=a[s++]),void 0!==n&&c(o,t,n);return o}})},function(e,t,n){var r=n(50),i=n(131),a=n(132),o=n(35);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){e.exports=n(456)},function(e,t,n){var r=n(457);e.exports=r},function(e,t,n){n(192);var r=n(11);e.exports=r.Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(201)),o=r(n(137)),s={createElement:function(e){return e=e.toLowerCase(),"canvas"===e?wx.createCanvas():"image"===e?wx.createImage():void 0}};(0,a.default)(s.constructor.prototype,o.default.prototype);var l=s;t.default=l},function(e,t,n){"use strict";var r=n(1),o=r(n(13)),s=r(n(15));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,s.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,o.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(461),i=n(203);function a(e){if(r(e))return i(e)}e.exports=a},function(e,t,n){e.exports=n(462)},function(e,t,n){var r=n(198);e.exports=r},function(e,t,n){var r=n(204),i=n(465),a=n(190);function o(e){if(void 0!==a&&i(Object(e)))return r(e)}e.exports=o},function(e,t,n){var r=n(168);e.exports=r},function(e,t,n){e.exports=n(466)},function(e,t,n){n(40),n(57);var r=n(467);e.exports=r},function(e,t,n){var r=n(53),i=n(25),a=n(59),o=i("iterator");e.exports=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||a.hasOwnProperty(r(t))}},function(e,t,n){var i=n(204),a=n(469),o=n(203);function r(e,t){var n;if(e){if("string"==typeof e)return o(e,t);var r=a(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?i(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}e.exports=r},function(e,t,n){e.exports=n(470)},function(e,t,n){var r=n(199);e.exports=r},function(e){function t(){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=t},function(e,t,n){n(183);var r=n(11);e.exports=r.setInterval},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(0)),o=r(n(12)),s=r(n(2)),l=r(n(3)),u=r(n(66)),h=r(n(206)),c=r(n(93)),d=function(){function r(e,t){(0,s.default)(this,r),this.wxInfo=t||{},location&&location.protocol;var n=c.default.replace("FMCloud/","").replace("www.fengmap.com","source.fengmap.com")+"webtheme";this._key=null,this._appName=null,this._mapServerURL="fengmap",this._mapThemeURL=n,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,o.default)(this,e)}return(0,l.default)(r,[{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:"getImage",value:function(){return this._canvas.createImage()}},{key:"key",set:function(e){this._key=e},get:function(){return this._key}},{key:"appName",set:function(e){this._appName=e},get:function(){return this._appName}},{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,a.default)(this._container,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,a.default)(this._container,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,a.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,a.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,a.default)(this._canvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,a.default)(this._canvas,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"tempCanvas",get:function(){return this._tmpCanvas},set:function(e){this._tmpCanvas=e,(0,a.default)(this._tmpCanvas,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,a.default)(this._tmpCanvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,a.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,a.default)(this._tmpCanvas2,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,a.default)(this._tmpCanvas2,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,a.default)(this._tmpCanvas2,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{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",set:function(e){this._compassFg=e},get:function(){return this._compassFg}},{key:"compassBg",set:function(e){this._compassBg=e},get:function(){return this._compassBg}},{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",set:function(e){this._focusAlpha=e},get:function(){return this._focusAlpha}},{key:"viewModeAnimateMode",set:function(e){this._viewModeAnimateMode=e},get:function(){return this._viewModeAnimateMode}},{key:"moveToAnimateMode",set:function(e){this._moveToAnimateMode=e},get:function(){return this._moveToAnimateMode}},{key:"scaleToAnimateMode",set:function(e){this._scaleToAnimateMode=e},get:function(){return this._scaleToAnimateMode}},{key:"viewModeAnimateTime",set:function(e){this._viewModeAnimateTime=e},get:function(){return this._viewModeAnimateTime}},{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}}]),r}(),f=d;t.default=f},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(20)),u=r(n(14)),h=r(n(21)),c=r(n(22)),a=r(n(18)),x=r(n(13)),o=r(n(2)),s=r(n(3)),w=r(n(475)),b=r(n(481)),M=r(n(482)),T=r(n(143));function d(e,t){var n;if(void 0===c.default||null==(0,h.default)(e)){if((0,u.default)(e)||(n=f(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function f(e,t){var n;if(e){if("string"==typeof e)return p(e,t);var r=(0,x.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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);n>16)+(t>>16)+(n>>16);return r<<16|65535&n}function l(e,t){return e<>>32-t}function u(e,t,n,r,i,a){return c(l(c(c(t,e),c(r,a)),i),n)}function d(e,t,n,r,i,a,o){return u(t&n|~t&r,e,t,i,a,o)}function f(e,t,n,r,i,a,o){return u(t&r|n&~r,e,t,i,a,o)}function p(e,t,n,r,i,a,o){return u(t^n^r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return u(n^(t|~r),e,t,i,a,o)}function h(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 g(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 w(e){return unescape(encodeURIComponent(e))}function b(e){return y(w(e))}function M(e){return x(b(e))}function T(e,t){return _(w(e),w(t))}function S(e,t){return x(T(e,t))}function E(e,t,n){return t?(n?T:S)(t,e):(n?b:M)(e)}var A=o;t.default=A},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(9)),s=r(n(27)),l=r(n(2)),u=r(n(3)),h=r(n(5)),c=r(n(6)),d=r(n(7)),f=r(n(17)),p=r(n(37));function m(r){var i=v();return function(){var e,t=(0,d.default)(r),n=i?(e=(0,d.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,c.default)(this,n)}}function v(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var g=function(e){(0,h.default)(i,e);var r=m(i);function i(e,t){var n;return(0,l.default)(this,i),n=r.call(this,t.eid,p.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,s.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(){var e=!0;this._renderNode&&this._renderNode.updateMatrixWorld(!0),this.visible=e}},{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",set:function(e){this._isInitMesh=e},get:function(){return this._isInitMesh}},{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._renderNode.parent=this.parent.scene),this._visible=e},get:function(){return this._visible}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}}]),i}(f.default),y=g;t.default=y},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(10)),s=r(n(2)),l=r(n(3)),u=r(n(5)),h=r(n(6)),c=r(n(7)),d=r(n(17)),f=r(n(214)),p=r(n(94));function m(r){var i=v();return function(){var e,t=(0,c.default)(r),n=i?(e=(0,c.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,n)}}function v(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var g=function(e){(0,u.default)(i,e);var r=m(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this,"externalModelLayer"),n._scene=new fm.Scene,n._scene.userData.type="externalModel",n.alias="externalModel",n._models={},n.initNode(e,t),n._visible=!0,n.initLight(),n.putLight(),n}return(0,l.default)(i,[{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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _(e,t){var n;if(e){if("string"==typeof e)return x(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function v(e,t){var n;if(e){if("string"==typeof e)return g(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 "},a=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(20)),u=r(n(14)),h=r(n(21)),c=r(n(22)),a=r(n(18)),o=r(n(13)),s=r(n(10)),d=r(n(2)),f=r(n(3)),p=r(n(514)),m=r(n(234)),v=r(n(93));function g(e,t){var n;if(void 0===c.default||null==(0,h.default)(e)){if((0,u.default)(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function y(e,t){var n;if(e){if("string"==typeof e)return _(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(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=p[n++],s=t?o.ok:o.fail,l=o.resolve,u=o.reject,h=o.domain;try{s?(t||(d.rejection===ee&&le(c,d),d.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=re(r))?i.call(r,l,u):l(r)):u(e)}catch(e){h&&!a&&h.exit(),u(e)}}d.reactions=[],d.notified=!1,f&&!d.rejection&&oe(c,d)}))},ae=function(e,t,n){var r,i;q?(r=G.createEvent("Event"),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},(i=u["on"+e])?i(r):e===X&&A("Unhandled promise rejection",n)},oe=function(r,i){T.call(u,function(){var e,t=i.value,n=se(i);if(n&&(e=L(function(){Y?V.emit("unhandledRejection",t,r):ae(X,r,t)}),i.rejection=Y||se(i)?ee:$,e.error))throw e.value})},se=function(e){return e.rejection!==$&&!e.parent},le=function(e,t){T.call(u,function(){Y?V.emit("rejectionHandled",e):ae(Z,e,t.value)})},ue=function(t,n,r,i){return function(e){t(n,r,e,i)}},he=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=Q,ie(e,t,!0))},ce=function(n,r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(n===e)throw z("Promise can't be resolved itself");var i=re(e);i?S(function(){var t={done:!1};try{i.call(e,ue(ce,n,t,r),ue(he,n,t,r))}catch(e){he(n,t,e,r)}}):(r.value=e,r.state=K,ie(n,r,!1))}catch(e){he(n,{done:!1},e,r)}}};te&&(U=function(e){y(this,U,D),g(e),r.call(this);var t=O(this);try{e(ue(ce,this,t),ue(he,this,t))}catch(e){he(this,t,e)}},r=function(){F(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=B(this),r=j(M(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Y?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=J&&ie(this,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=ue(ce,e,t),this.reject=ue(he,e,t)},I.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(){return E(U,H.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:te},{Promise:U}),p(U,D,!1,!0),m(D),a=h(D),s({target:D,stat:!0,forced:te},{reject:function(e){var t=j(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:l||te},{resolve:function(e){return E(l&&this===a?U:this,e)}}),s({target:D,stat:!0,forced:ne},{all:function(e){var s=this,t=j(s),l=t.resolve,u=t.reject,n=L(function(){var r=g(s.resolve),i=[],a=0,o=1;w(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=L(function(){var t=g(n.resolve);w(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(19),d=n(80).f,f=n(71),p=n(237).set,m=n(238),v=c.MutationObserver||c.WebKitMutationObserver,g=c.process,y=c.Promise,_="process"==f(g),x=d(c,"queueMicrotask"),w=x&&x.value;w||(r=function(){var e,t;for(_&&(e=g.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=_?function(){g.nextTick(r)}:v&&!m?(s=!0,l=document.createTextNode(""),new v(r).observe(l,{characterData:!0}),function(){l.data=s=!s}):y&&y.resolve?(u=y.resolve(void 0),h=u.then,function(){h.call(u,r)}):function(){p.call(c,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};a&&(a.next=t),i||(i=t,o()),a=t}},function(e,t,n){var r=n(19);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(48),i=n(146),a=n(240),h=n(90);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),i=n(74),a=n(235),o=n(16),s=n(50),l=n(236),u=n(239),h=n(85),c=!!a&&o(function(){a.prototype.finally.call({then:function(){}},function(){})});r({target:"Promise",proto:!0,real:!0,forced:c},{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||h(a.prototype,"finally",s("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=r(n(234)),l=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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function v(e,t){var n;if(e){if("string"==typeof e)return g(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:n}}},{key:"getModelTheme",value:function(e){if(!e)return this._defaultTheme;var t=this._type2theme[e.type];return t||this._defaultTheme}},{key:"getPoiTheme",value:function(e){var t=e.type,n=e.fid,r=this._poiFidTheme[n],r=r||this._poiimagetheme[t];return r=(0,d.default)(r||this._poiimagetheme[0],{}),"rtheme"==this.fileType?r.imageSrc=this.getRThemeTexture(r.imagename):r.imageSrc=this._themeUrl+"/"+this.themeName+"/"+r.imagename,r.imageUrl=this._themeUrl+"/"+this.themeName+"/"+r.imagename,r.imagehead=this._themeUrl+"/"+this.themeName+"/",r}},{key:"getLabelTheme",value:function(e){var t,n,r=e.type,i=e.fid,a=this.storeLabelTypeDic[r];return i&&(n=this._labelFidTheme[i]),a||n?a&&(n=n||(this.storeLabelThemeDic[a.normalid]?this.storeLabelThemeDic[a.normalid]:this._labelStyle)):n=this._labelStyle,n=n||this._labelDefaultTheme,n.fillcolor&&n.alpha&&n.fontsize||(t={fillcolor:"0,0,0",alpha:"1.0",fontsize:"12.0"},n=(0,d.default)(n,t)),n.image?("rtheme"===this.fileType?n.imageSrc=this.getRThemeTexture(n.image):n.imageSrc=this._themeUrl+"/"+this.themeName+"/"+n.image,n.imageUrl=this._themeUrl+"/"+this.themeName+"/"+n.image):n.imageSrc=!1,n}},{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:"themeName",get:function(){return this._themeName}},{key:"data",set:function(e){this._data=e,this.initStoreTheme(),this.initLabelTheme(),this.initPoiTheme(),this.initExteralModelTheme(),this.clearColor=m.default.toColor(this._data.viewtheme.clearcolor),this.clearAlpha=(0,f.default)(this._data.viewtheme.clearalpha)},get:function(){return this._data}},{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",set:function(e){this._floorColor=e},get:function(){return this._floorColor}},{key:"floorOpacity",set:function(e){this._floorOpacity=e},get:function(){return this._floorOpacity}},{key:"selectedColor",get:function(){return this._selectedColor}}]),n}(),_=y;t.default=_},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(20)),u=r(n(14)),h=r(n(21)),c=r(n(22)),a=r(n(18)),o=r(n(13)),s=r(n(12)),d=r(n(15)),f=r(n(9)),p=r(n(2)),m=r(n(3));function v(e,t){var n;if(void 0===c.default||null==(0,h.default)(e)){if((0,u.default)(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function g(e,t){var n;if(e){if("string"==typeof e)return y(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 "},a=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=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}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=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},s=o;t.default=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),o=r(n(9)),u=r(n(10)),h=r(n(12)),c=r(n(2)),d=r(n(3)),f=r(n(5)),s=r(n(6)),l=r(n(7)),p=r(n(46)),m=r(n(111)),v=r(n(144)),g=r(n(77)),y=r(n(37)),_=r(n(149)),x=n(67),w=r(n(150));function b(r){var i=M();return function(){var e,t=(0,l.default)(r),n=i?(e=(0,l.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,s.default)(this,n)}}function M(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var T=function(e){(0,f.default)(l,e);var s=b(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 y(void 0,_),f=n;fm.d&&(m=v),d.length;0m.d&&(m=g),g.max-m.d<=t||(c=g.h/2,d.push(new x(g.x-c,g.y-c,c,e)),d.push(new x(g.x+c,g.y-c,c,e)),d.push(new x(g.x-c,g.y+c,c,e)),d.push(new x(g.x+c,g.y+c,c,e)))}return[m.x,m.y]}function _(e,t){return t.max-e.max}function x(e,t,n,r){this.x=e,this.y=t,this.h=n,this.d=s(e,t,r),this.max=this.d+this.h*Math.SQRT2}function s(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 w(e){for(var t=0,n=0,r=0,i=e[0],a=0,o=i.length,s=o-1;a>1)-1;0<=i;i--)this._down(i)}return(0,s.default)(a,[{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=o||r.h>=o)&&(r.w>=r.h?(a=r.h/r.w,r.w=o,r.h=(0,s.default)(o*a)):(a=r.w/r.h,r.h=o,r.w=(0,s.default)(o*a))),r},getPixXY:function(e,t){var n=(e-this.map_.minX)/(this.map_.maxX-this.map_.minX),r=(this.map_.maxY-t)/(this.map_.maxY-this.map_.minY),i={x:n,y:r};return i.x=i.x*this.options.width,i.y=i.y*this.options.height,i},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?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?e.max:100,data:[]},gradient:e.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};var a=e.canvas,o=a.getContext("2d");a.width=r,a.height=i,a.style.width=r+"rpx",a.style.height=i+"rpx",t.options.ctx=o,t.options.canvas=a},renderShadow:function(e,t,n,r){var i=this,a=i.options.ctx,o=(i.options.radius,i.options.boundVal),s=(0,h.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,l.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,i=r.getImageData(0,0,t,n),a=i.data,o=a.length,s=e.getPalette(),l=e.options.opacity,u=3;u=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(e,t){var n;if(e){if("string"==typeof e)return T(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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:i}}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 a,o=!0,s=!1;return{s:function(){n=(0,l.default)(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(e,t){var n;if(e){if("string"==typeof e)return T(e,t);var r=(0,o.default)(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?(0,a.default)(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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=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}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={Left:0,Center:1,Right:2},a=i;t.default=a},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={MODE_2D:"top",MODE_3D:"3d"},a=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=function e(t,n){(0,a.default)(this,e),this.x=void 0===t?0:t,this.y=void 0===n?0:n},s=o;t.default=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=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){var t={x:(e.x-this._locOrigion.x)/this._locRange.x,y:(e.y-this._locOrigion.y)/this._locRange.y},n={x:t.x*this._mapRange.x,y:t.y*this._mapRange.y},r={x:this._mapOrigion.x+this._mapAxisX.x*n.x+this._mapAxisY.x*n.y,y:this._mapOrigion.y+this._mapAxisX.y*n.x+this._mapAxisY.y*n.y};return r}},{key:"_getVectorLen",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}}]),r}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4)),p=r(n(49)),l=r(n(63)),u=r(n(36)),D=r(n(54)),h=r(n(31)),c=r(n(560)),d=r(n(15)),s=r(n(32)),f=r(n(30)),y=r(n(12)),O=r(n(10)),o=r(n(2)),m=r(n(3)),v=r(n(91)),g=r(n(5)),_=r(n(6)),x=r(n(7)),w=r(n(564)),b=r(n(566));n(567),n(584);var F=r(n(28)),M=r(n(113)),T=r(n(68)),S=r(n(95)),E=r(n(69)),A=r(n(147)),B=r(n(45)),I=r(n(41)),L=r(n(246)),R=r(n(151)),N=r(n(247)),k=r(n(66)),P=r(n(262)),C=n(245),U=n(154),z=n(114),G=n(602),V=n(256);function H(r){var i=j();return function(){var e,t=(0,x.default)(r),n=i?(e=(0,x.default)(this).constructor,(0,a.default)(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,n)}}function j(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var W=function(e){(0,g.default)(r,e);var n=H(r);function r(e){var t;return(0,o.default)(this,r),t=n.call(this),(0,O.default)(e)&&e.scaleLevel&&!e.scale&&(e.scale=(0,O.default)(e).mapScaleLevels[e.scaleLevel]),(0,O.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=k.default.ZH,t.naviMode=T.default.MODULE_SHORTEST,t.naviPriority=S.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,O.default)(this)&&(this.mapServerURL&&this.mapID?(e={key:(0,O.default)(this).MapOptions.key,appName:(0,O.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 P.default({}),n._analyser.initByScene(e),n.callback()})):(this._analyser=new P.default,this._analyser.init((0,O.default)(this))),this._analyser=new P.default,this._analyser.init((0,O.default)(this)),this._naviDescriptionsCalculator=new w.default({map:(0,O.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:"assignInfos",value:function(e){function t(e){var t,n=[];for(t in e){var r={gid:(0,f.default)(t),coords:e[t]};n.push(r)}(0,s.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];var r=t(e);this._startData=r.start,this._endData=r.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){var n=e||this._naviResults;if(!this._isNaviResultsValide(n))return{};var r=(0,y.default)({},t);(0,O.default)(r)||(r.map=this._map,r.analyser=this);var i=new w.default(r),a=i.calculate(n);return{naviDescriptions:a[0],naviDescriptionsData:a[1],naviDistance:a[2],naviGroupsDistance:a[3]}}},{key:"setLineStyle",value:function(e){this._naviLineMarker&&this._naviLineMarker.updateStyle(e),this.lineStyle=e}},{key:"setNaviLanguage",value:function(e){if(!e||"string"!=typeof e)return!1;var t,n=e.toLowerCase();return(n==k.default.ZH||n==k.default.EN)&&(this.naviLanguage!=n&&(this.naviLanguage=n,this._naviDescriptionsCalculator&&(this._naviDescriptionsCalculator.naviLanguage=n),0n.index;g--)g-1>n.index&&(p=r[g],m=r[g-1],p.groupID==m.groupID&&(v+=F.default.distanceOfTwoPoints(p,m)));r[n.index+1]&&r[n.index+1].groupID==n.coord.groupID&&(v+=F.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;rf&&(h[0]=f),h[1]p&&(h[2]=p),h[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,l=new fm.Vector2(s.max.x-s.min.x,s.max.y-s.min.y),u=l.length(),h=new fm.Vector2(r.x-i.x,r.y-i.y),c=h.length();e.mapScale=564*c/u,e.controls.panAdd({x:0,y:e.groupSpace/2,z:0})}},{key:"naviToDoor",set:function(e){this._analyser.naviToDoor=e},get:function(){return this._analyser.naviToDoor}},{key:"locationMarker",set:function(e){e instanceof N.default&&(this._locationMarker=e,(0,O.default)(this).addLocationMarker(this._locationMarker))},get:function(){return this._locationMarker||(this._locationMarker=new N.default((0,O.default)(this),{id:"location",url:this.locationMarkerUrl||"",size:this.locationMarkerSize}),(0,O.default)(this).addLocationMarker(this._locationMarker)),this._locationMarker}},{key:"startMarker",set:function(e){this._startMarker=e},get:function(){return this._startMarker}},{key:"endMarker",set:function(e){this._endMarker=e},get:function(){return this._endMarker}},{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:"nearDist",get:function(){return this._passPtsEpson},set:function(e){this._passPtsEpson=e}},{key:"passingPts",set:function(e){this._passingPts=e},get:function(){return this._passingPts}},{key:"losedPts",get:function(){return this._failedInsertedPts}}]),r}(A.default),Y=W;t.default=Y},function(e,t,n){e.exports=n(561)},function(e,t,n){var r=n(562);e.exports=r},function(e,t,n){n(563);var r=n(11);e.exports=r.Number.isNaN},function(e,t,n){var r=n(8);r({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var w=r(n(229)),s=r(n(216)),u=r(n(10)),o=r(n(30)),b=r(n(31)),a=r(n(12)),l=r(n(2)),h=r(n(3)),c=r(n(565)),d=r(n(66)),f=r(n(41)),p=n(154),m=n(114),v=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:"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,a[o++]=t>>8&255,a[o++]=255&t;return 2===i&&(t=u[e.charCodeAt(l)]<<2|u[e.charCodeAt(l+1)]>>4,a[o++]=255&t),1===i&&(t=u[e.charCodeAt(l)]<<10|u[e.charCodeAt(l+1)]<<4|u[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=255&t),a}function s(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function f(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,f=e[t+c];for(c+=d,a=f&(1<<-h)-1,f>>=-h,h+=s;0>=-h,h+=r;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=1<=o+c?d/l:d*Math.pow(2,1-c),2<=t*l&&(o++,l/=2),h<=o+c?(s=0,o=h):1<=o+c?(s=(t*l-1)*Math.pow(2,i),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));8<=i;e[n+f]=255&s,f+=p,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(){},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(576),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(47))},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;ni.groupId))for(var x=0;xO.default.epsilon()?u.push.apply(u,(0,D.default)(i)):(l=!0,n=o._insertTempNodeToRoad(o._startZoneId,i[0].cross,i[0].road),o._joinTwoNodes(o._startZoneId,o._startNode,n))}),l||(0,d.default)(u).call(u,function(e){var t=o._insertTempNodeToRoad(o._startZoneId,e.cross,e.road);o._joinTwoNodes(o._startZoneId,o._startNode,t)}),s==t.size())return F.default.ROUTE_FAILED_NO_DATA_START}if(r&&null!=this._startModel&&0O.default.epsilon()?u.push.apply(u,(0,D.default)(i)):(l=!0,n=o._insertTempNodeToRoad(o._endZoneId,i[0].cross,i[0].road),o._joinTwoNodes(o._endZoneId,o._endNode,n))}),l||(0,d.default)(u).call(u,function(e){var t=o._insertTempNodeToRoad(o._endZoneId,e.cross,e.road);o._joinTwoNodes(o._endZoneId,o._endNode,t)}),s==t.size())return F.default.ROUTE_FAILED_NO_DATA_END}if(r&&null!=this._endModel&&0c&&(u=h.area,uO.default.distanceOfTwoPoints(g.cross,n.startPoint)?(a.push(g),a.push(v)):(a.push(v),a.push(g))),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,_.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,Q.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new te.default;n.Id=this._newTmpId(),n.point=(0,$.default)({},t);var r=this._zoneIdGraph.get(e);r.nodeVector.push(n);var i=this._zoneIdSimpleDijkstraMap.get(e);return i._naviGraph._nodeMap.put(n.Id,r.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){if(n)return this._insertTmpIsolatedNode(e,t);var r=new te.default;r.Id=this._naviGraph.generateNodeId(),r.point=(0,$.default)({},t);var i=this.zoneIdGraph.get(e),a=i.nodeVector,o=this._insertItemToVector(r,a);return i._nodeMap.put(r.Id,o),r}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;oO.default.epsilon())return null}void 0===r&&(r=ee.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new ne.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);var h=this._zoneIdGraph.get(e);h.roadVector.push(u);var c,d,f,p,m,v=this._zoneIdSimpleDijkstraMap.get(e);return ee.default.NaviRoadEntry_BOTH==r&&(c={nodeId:n.Id,length:u.length},d=v._naviGraph.adjList.get(t.Id),d?d.push(c):(d=[],d.push(c),v._naviGraph.adjList.put(t.Id,d)),c={nodeId:t.Id,length:u.length},d=v._naviGraph.adjList.get(n.Id),d?d.push(c):(d=[],d.push(c),v._naviGraph.adjList.put(n.Id,d))),ee.default.NaviRoadEntry_FORWARD==r&&(f={nodeId:n.Id,length:u.length},m=v._naviGraph.adjList.get(t.Id),m?m.push(f):(m=[],m.push(f),v._naviGraph.adjList(t.Id,m))),ee.default.NaviRoadEntry_BACK==r&&(p={nodeId:t.Id,length:u.length},m=v._naviGraph.adjList.get(n.Id),m?m.push(p):(m=[],m.push(p),v._naviGraph.adjList.put(n.Id,m))),u}},{key:"_isPointInPNTModel",value:function(e){var t=this._calcZoneIdByCoord(e),n=this._zonePNTModelsMap.get(t);if(n)for(var r=0;rO.default.epsilon()?u.push.apply(u,(0,D.default)(i)):(l=!0,n=o._insertTempNodeToRoad(o._startZoneId,i[0].cross,i[0].road),o._joinTwoNodes(o._startZoneId,o._startNode,n))}),l||(0,v.default)(u).call(u,function(e){var t=o._insertTempNodeToRoad(o._startZoneId,e.cross,e.road);o._joinTwoNodes(o._startZoneId,o._startNode,t)}),s==t.size())return F.default.ROUTE_FAILED_NO_DATA_START}if(r){for(var n=null,i=!1,h=0;hO.default.epsilon()?u.push.apply(u,(0,D.default)(i)):(l=!0,n=o._insertTempNodeToRoad(o._endZoneId,i[0].cross,i[0].road),o._joinTwoNodes(o._endZoneId,o._endNode,n))}),l||(0,v.default)(u).call(u,function(e){var t=o._insertTempNodeToRoad(o._endZoneId,e.cross,e.road);o._joinTwoNodes(o._endZoneId,o._endNode,t)}),s==t.size())return F.default.ROUTE_FAILED_NO_DATA_END}if(r){for(var n=null,i=!1,h=0;hO.default.epsilon()?d.push.apply(d,(0,D.default)(i)):(c=!0,n=s._insertTempNodeToRoad(u,i[0].cross,i[0].road),s._joinTwoNodes(u,o,n))}),c||(0,v.default)(d).call(d,function(e){var t=s._insertTempNodeToRoad(u,e.cross,e.road);s._joinTwoNodes(u,o,t)}),h==e.size())return!1}if(r){for(var i=null,f=!1,p=0;pc&&(u=h.area,uO.default.distanceOfTwoPoints(g.cross,n.startPoint)?(a.push(g),a.push(v)):(a.push(v),a.push(g))),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,_.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,K.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new te.default;n.Id=this._newTmpId(),n.point=(0,Q.default)({},t);var r=this._zoneIdGraph.get(e);r.nodeVector.push(n);var i=this._zoneIdDijkstras.get(e);return i._naviGraph._nodeMap.put(n.Id,r.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){if(n)return this._insertTmpIsolatedNode(e,t);var r=new te.default;r.Id=this._naviGraph.generateNodeId(),r.point=(0,Q.default)({},t);var i=this.zoneIdGraph.get(e),a=i.nodeVector,o=this._insertItemToVector(r,a);return i._nodeMap.put(r.Id,o),r}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;oO.default.epsilon())return null}void 0===r&&(r=ee.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new ne.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);var h=this._zoneIdGraph.get(e);h.roadVector.push(u);var c,d,f,p,m,v=this._zoneIdDijkstras.get(e);return ee.default.NaviRoadEntry_BOTH==r&&(c={nodeId:n.Id,length:u.length},d=v._naviGraph.adjList.get(t.Id),d?d.push(c):(d=[],d.push(c),v._naviGraph.adjList.put(t.Id,d)),c={nodeId:t.Id,length:u.length},d=v._naviGraph.adjList.get(n.Id),d?d.push(c):(d=[],d.push(c),v._naviGraph.adjList.put(n.Id,d))),ee.default.NaviRoadEntry_FORWARD==r&&(f={nodeId:n.Id,length:u.length},m=v._naviGraph.adjList.get(t.Id),m?m.push(f):(m=[],m.push(f),v._naviGraph.adjList(t.Id,m))),ee.default.NaviRoadEntry_BACK==r&&(p={nodeId:t.Id,length:u.length},m=v._naviGraph.adjList.get(n.Id),m?m.push(p):(m=[],m.push(p),v._naviGraph.adjList.put(n.Id,m))),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,s.default)(t=this._names).call(t,e)),this._array[n]}},{key:"toArray",value:function(){for(var e=[],t=0;t