zh-mapbox 0.0.113 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ RegisterMapBoxModel(THREE,GLTFLoader)
27
27
 
28
28
  ```
29
29
 
30
-
30
+ **注意:0.0.122及以上版本必须先初始化数据(initData())**
31
31
 
32
32
  #### 方法概览
33
33
 
@@ -35,46 +35,54 @@ RegisterMapBoxModel(THREE,GLTFLoader)
35
35
 
36
36
  ### Map
37
37
 
38
- | 方法名 | 参数 | 描述 |
39
- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------------------------------- |
40
- | **RegisterMapBoxMethod**<br />(mapboxgl,defaultSource?:string[]) | mapboxgl<br />defaultSource:默认不进行删除或查找的源 | 注册方法 |
41
- | **removeAllLayerAndSource**<br />(defaultSource?:string[]) | defaultSource:默认不进行删除的源 | 删除所有图层和源 |
42
- | **getAllLayerAndSource**<br />(defaultSource?:string[])-(0.0.24) | defaultSource:默认不获取的源 | 获取所有图层和源 |
43
- | **findCustomLayer**<br />(type?:string[]\|string,defaultSource?:string[]) | type:查找类型<br />defaultSource:默认不查找的源 | 查找自定义的图层 |
44
- | **MapTooltip**<br />(layerName:string\|string[],<br />options:Popup.options) | layerName:图层名称<br />options:继承mapbox Popup的参数 | (实例)地图提示框 |
45
- | **MapPopup**<br />(layerName:string\|string[],<br />options:Popup.options) | layerName:图层名称<br />options:继承mapbox Popup的参数 | (实例)地图弹出框 |
46
- | **MapLine** | - | (实例)地图绘制线 |
47
- | **MapCustom** | - | (实例)地图其他绘制(默认symbol) |
48
- | **MapCircle** | - | (实例)地图绘制圆 |
49
- | **MapEvent**-(0.0.24) | layerName?:图层名称 | (实例) 自定义事件 |
50
- | **MapMarker**(options)-(0.0.24) | options:marker参数 | (实例)绘制marker |
51
- | **MapMoreCustom**-(0.0.24) | - | (实例)多图层方法 |
52
- | **fitBoundsGeoJson**<br />(geojson:any,<br />options:Camera.options) | geojson<br />options:相机相关参数 | 聚焦到geojson |
53
- | **fitBoundsPosition**<br />(position:array<array<number>>,<br />options:Camera.options) | position:四至位置<br />options:相机相关参数 | 聚焦到四至位置 |
54
- | **getInvertMask**<br />(geojson:any,<br />options:{id:string,layerConfig:any})<br />:layer | options.id:遮罩id<br />options.layerConfig:<br />图层layer样式配置 | 获取geojson反向区域 |
55
- | **loadImages**<br />(urls:{key:string\|{url:string,...args}}):Promise<{key:value}> | urls:图片对象集合<br />key:图片名称 ->图片地址 | 加载多张图片 |
56
- | **loadAddImages**<br />(url:{key:string\|{url:string,...args}}) | urls:图片对象集合<br />key:图片名称 ->图片地址 | 加载多张图片同时加载到地图上 |
57
- | **removeLayerSource**<br />(options:{name:string\|array,<br />layers?:array,<br />sources?:array}) -(0.0.24) | name: 图层和源id<br />(图层和源相同)<br />layers?图层id<br />sources?源id | 移除图层和源 |
58
- | **removeLayerEvent**<br />(event:object,clear)-(0.0.24) | event: 移除的事件对象<br />clear:清除对象 true -(0.0.73) | 移除图层定义的事件 |
59
- | **findCustomIcon**-(0.0.24) | - | 查找自定义的图标 |
60
- | **setStyle**(style,option,callback?)-(0.0.24) | style<br />options{<br />save<br />是否保存图片、源、图层<br />source?:['composite']<br>不保存的源和图层}<br />callback?保存操作后回调 | 设置地图样式(同地图原来设置) |
61
- | **removeEvents**<br />(events?:string[])-(0.0.24) | events:<br />['click', 'mousemove', 'mouseout'] | 删除事件 |
62
- | **removePopup**<br />(type:popup\|tooltip)-(0.0.24) | type:弹窗类型 | 移除弹窗 |
63
- | **getCustomLayer**()-(0.0.54) | - | 获取type:custom的图层 |
64
- | **getLayerIndex**(id) -(0.0.66) | 图层id | 根据图层id获取层级 |
65
- | **getLayerId**(index,after)-(0.0.66) | index:图层层级<br />after:之后的层级数 | 根据层级获取图层id |
66
- | **getMinLayerId**()-(0.0.66) | - | 获取最小层级id |
67
- | **getMaxLayerId**()-(0.0.66) | - | 获取最大层级id |
68
- | **getAllLayerId**()-(0.0.71) | - | 获取所有图层id |
69
- | **getAllLayer**()-(0.0.71) | - | 获取所有图层 |
70
- | **getLineLayer**()-(0.0.71) | - | 获取线图层 |
71
- | **AnimateLine**(name,options)-(0.0.73) | name:图层id<br />options?:{<br />dash?:变化的数组<br />step?:段数<br />} | 线动画 |
72
- | **setPaint**(id,options)-(0.0.108) | id:图层id<br/>options:{<br/>key:属性名<br/>value:属性值<br/>} | 修改paint |
73
- | **setLayout**(id,options)-(0.0.108) | id:图层id<br/>options:{<br/>key:属性名<br/>value:属性值<br/>} | 修改layout |
74
- | **customStyle**(options)-(0.0.108) | options:{<br/>key:string,<br/>value:[color,opacity]} | 修改地图style |
75
- | **clearData**()-(0.0.108) | - | 清除数据(初始化时调用) |
76
- | **getTileByPosition**(position,zoom?)-(0.0.108) | position:[lng,lat]<br/>zoom?:number | 根据经纬度获取瓦片 |
77
- | **getPositionByTile**(range)-(0.0.108) | range:[x,y,z] | 根据瓦片获取经纬度四至 |
38
+ | 方法名 | 参数 | 描述 |
39
+ | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------------------------------------- |
40
+ | **RegisterMapBoxMethod**<br />(mapboxgl,defaultSource?:string[]) | mapboxgl<br />defaultSource:默认不进行删除或查找的源 | 注册方法 |
41
+ | **removeAllLayerAndSource**<br />(defaultSource?:string[]) | defaultSource:默认不进行删除的源 | 删除所有图层和源 |
42
+ | **getAllLayerAndSource**<br />(defaultSource?:string[])-(0.0.24) | defaultSource:默认不获取的源 | 获取所有图层和源 |
43
+ | **findCustomLayer**<br />(type?:string[]\|string,defaultSource?:string[]) | type:查找类型<br />defaultSource:默认不查找的源 | 查找自定义的图层 |
44
+ | **MapTooltip**<br />(layerName:string\|string[],<br />options:Popup.options) | layerName:图层名称<br />options:继承mapbox Popup的参数 | (实例)地图提示框 |
45
+ | **MapPopup**<br />(layerName:string\|string[],<br />options:Popup.options) | layerName:图层名称<br />options:继承mapbox Popup的参数 | (实例)地图弹出框 |
46
+ | **MapLine** | - | (实例)地图绘制线 |
47
+ | **MapCustom** | - | (实例)地图其他绘制(默认symbol) |
48
+ | **MapCircle** | - | (实例)地图绘制圆 |
49
+ | **MapEvent**-(0.0.24) | layerName?:图层名称 | (实例) 自定义事件 |
50
+ | **MapMarker**(options)-(0.0.24) | options:marker参数 | (实例)绘制marker |
51
+ | **MapMoreCustom**-(0.0.24) | - | (实例)多图层方法 |
52
+ | **fitBoundsGeoJson**<br />(geojson:any,<br />options:Camera.options) | geojson<br />options:相机相关参数 | 聚焦到geojson |
53
+ | **fitBoundsPosition**<br />(position:array<array<number>>,<br />options:Camera.options) | position:四至位置<br />options:相机相关参数 | 聚焦到四至位置 |
54
+ | **getInvertMask**<br />(geojson:any,<br />options:{id:string,layerConfig:any})<br />:layer | options.id:遮罩id<br />options.layerConfig:<br />图层layer样式配置 | 获取geojson反向区域 |
55
+ | **loadImages**<br />(urls:{key:string\|{url:string,...args}}):Promise<{key:value}> | urls:图片对象集合<br />key:图片名称 ->图片地址 | 加载多张图片 |
56
+ | **loadAddImages**<br />(url:{key:string\|{url:string,...args}}) | urls:图片对象集合<br />key:图片名称 ->图片地址 | 加载多张图片同时加载到地图上 |
57
+ | **removeLayerSource**<br />(options:{name:string\|array,<br />layers?:array,<br />sources?:array}) -(0.0.24) | name: 图层和源id<br />(图层和源相同)<br />layers?图层id<br />sources?源id | 移除图层和源 |
58
+ | **removeLayerEvent**<br />(event:object,clear)-(0.0.24) | event: 移除的事件对象<br />clear:清除对象 true -(0.0.73) | 移除图层定义的事件 |
59
+ | **findCustomIcon**-(0.0.24) | - | 查找自定义的图标 |
60
+ | **setStyle**(style,option,callback?)-(0.0.24) | style<br />options{<br />save<br />是否保存图片、源、图层<br />source?:['composite']<br>不保存的源和图层}<br />callback?保存操作后回调 | 设置地图样式(同地图原来设置) |
61
+ | **removeEvents**<br />(events?:string[])-(0.0.24) | events:<br />['click', 'mousemove', 'mouseout'] | 删除事件 |
62
+ | **removePopup**<br />(type:popup\|tooltip)-(0.0.24) | type:弹窗类型 | 移除弹窗 |
63
+ | **getCustomLayer**()-(0.0.54) | - | 获取type:custom的图层 |
64
+ | **getLayerIndex**(id) -(0.0.66) | 图层id | 根据图层id获取层级 |
65
+ | **getLayerId**(index,after)-(0.0.66) | index:图层层级<br />after:之后的层级数 | 根据层级获取图层id |
66
+ | **getMinLayerId**()-(0.0.66) | - | 获取最小层级id |
67
+ | **getMaxLayerId**()-(0.0.66) | - | 获取最大层级id |
68
+ | **getAllLayerId**()-(0.0.71) | - | 获取所有图层id |
69
+ | **getAllLayer**()-(0.0.71) | - | 获取所有图层 |
70
+ | **getLineLayer**()-(0.0.71) | - | 获取线图层 |
71
+ | **AnimateLine**(name,options)-(0.0.73) | name:图层id<br />options?:{<br />dash?:变化的数组<br />step?:段数<br />} | 线动画 |
72
+ | **setPaint**(id,options)-(0.0.108) | id:图层id<br/>options:{<br/>key:属性名<br/>value:属性值<br/>} | 修改paint |
73
+ | **setLayout**(id,options)-(0.0.108) | id:图层id<br/>options:{<br/>key:属性名<br/>value:属性值<br/>} | 修改layout |
74
+ | **customStyle**(options)-(0.0.108) | options:{<br/>key:string,<br/>value:[color,opacity]} | 修改地图style |
75
+ | **clearData**()-(0.0.108) | - | 清除数据(初始化时调用 0.0.122版本之前) |
76
+ | **initData**()-(0.1.0) | - | 初始化数据(必须初始化) |
77
+ | **getTileByPosition**(position,zoom?)-(0.0.108) | position:[lng,lat]<br/>zoom?:number | 根据经纬度获取瓦片 |
78
+ | **getPositionByTile**(range)-(0.0.108) | range:[x,y,z] | 根据瓦片获取经纬度四至 |
79
+ | **getTilesByBounds**(zoom,options)-(0.0.114) | zoom:层级<br />options:{<br />expand:number 扩散瓦片数量<br />reversal:boolean 反转排列方式<br />} | 根据层级获取当前视口瓦片 |
80
+ | **loadSpriteGraph**(sprite)-(0.0.114) | sprite:{<br />image:string 图片地址<br />json:string\|object json数据<br />} | 加载精灵图 |
81
+ | **MapClusterMarker**(options)-(0.0.114) | options: marker参数 | 聚合marker |
82
+ | **MapSourceEvent**(name,options)-(0.0.114) | name:source<br />options:{<br />once:true 执行一次<br />sourceLayer: 图层源 vector时必传<br />filter:过滤<br />} | 获取source源信息 |
83
+ | **TileByGeoJson**(options)-(0.1.0) | options:{<br />maxZoom:18 最大层级<br />minZoom:0 最小层级<br />expand:0 扩展瓦片数<br />isGCJ:false 是否GCJ坐标<br />replaceUrl:Function 替换url<br />isJudgement:false 是否判断瓦片<br />judgementBox:Function 四至判断方法<br />judgementPoint:Function 坐标判断方法<br />} | 裁剪区域 |
84
+ | **MapMenu**(options)-(0.1.0) | options:{<br />move:false 菜单是否跟随移动<br />className:string <br />} | 右键菜单 |
85
+ | **MapMeasure**(options)-(0.1.1) | options:{...} | 地图测量 |
78
86
 
79
87
  ### Map.Style
80
88
 
@@ -194,6 +202,106 @@ layerConfig:{
194
202
  | **animate**() | - | 开始动画 |
195
203
  | **destroy**() | - | 销毁动画 |
196
204
 
205
+ **MapClusterMarker**
206
+
207
+ | 方法名 | 参数 | 描述 |
208
+ | ----------------------------------------- | --------------------------------------------------------- | ---------- |
209
+ | **draw**( sourceName,<br />htmlCallback ) | sourceName:源名称<br />htmlCallback ({lngLat,properties}) | 绘制marker |
210
+ | **destroy**() | - | 销毁 |
211
+ | **visible**(show) | show:boolean | 显示隐藏 |
212
+
213
+ **MapSourceEvent**
214
+
215
+ | 方法名 | 参数 | 描述 |
216
+ | -------------------- | --------------------- | -------- |
217
+ | **open**(callback) | callback 结果返回方法 | 开启事件 |
218
+ | **destroy**() | - | 销毁事件 |
219
+
220
+ **TileByGeoJson**
221
+
222
+ | 方法名 | 参数 | 描述 |
223
+ | --------------------- | ------------------------------------ | ---- |
224
+ | **draw**(json,url,id) | json:边界json<br />url:地址<br />id | 绘制 |
225
+ | **destroy**() | | 销毁 |
226
+
227
+ **MapMenu**
228
+
229
+ | 方法名 | 参数 | 描述 |
230
+ | ----------------------------- | -------------------------- | ------------ |
231
+ | **init**(element,callback) | element:dom元素或者字符串 | 初始化 |
232
+ | **visible**(show) | show :boolean | 显示隐藏菜单 |
233
+ | **updateXY**(xy) | xy:{x:number,y:number} | 更新坐标 |
234
+ | **destroy**() | | 销毁 |
235
+
236
+ **MapMeasure**
237
+
238
+ options:
239
+
240
+ ```js
241
+ {
242
+ type: 'line' | 'circle' | 'polygon' | 'rect' | 'sector', //测量类型 line
243
+ fixed: number, //保留小数位 2
244
+ dash: boolean,//是否启用虚线 true
245
+ units: { //单位
246
+ line: [string, string],//[km,m]
247
+ circle: [string, string], //[km²,m²]
248
+ polygon: [string, string],//[km²,m²]
249
+ rect: [string, string], //[km²,m²]
250
+ sector: [string, string]//[km²,m²]
251
+ },
252
+ className: string,//元素类名
253
+ pointProps: { //点属性
254
+ color: string, //颜色
255
+ radius: number,//大小
256
+ strokeWidth: number, //描边宽度
257
+ strokeColor: string//描边颜色
258
+ },
259
+ lineProps: { //线属性
260
+ color: string, //颜色
261
+ width: number, //宽度
262
+ dasharray: [number, number] //虚线大小
263
+ },
264
+ fillProps: { //填充属性
265
+ color: string //颜色
266
+ }
267
+ }
268
+ ```
269
+
270
+ | 方法名 | 参数 | 描述 |
271
+ | ------------------- | --------------------- | -------- |
272
+ | **draw**(callback?) | callback 绘制完成回调 | 开启绘制 |
273
+ | **off**() | | 停止监听 |
274
+ | **remove**() | | 清除绘制 |
275
+ | **visible**(show) | show:boolean | 显示隐藏 |
276
+ | **destroy**() | | 销毁 |
277
+
278
+
279
+
280
+ #### 公共方法
281
+
282
+ | 方法名 | 参数 | 描述 |
283
+ | -------------------------------- | ---------------------------------------------------- | ------------------------------- |
284
+ | **isValidNumber**(number) | number | 判断数字是否为有效数字 |
285
+ | **deepClone**(data) | data | 深度克隆 |
286
+ | **hexToRgba**(color,pure) | color:十六进制颜色<br />pure:false 是否返回数组格式 | hex颜色转rgba颜色 |
287
+ | **isGeoJSON**(data) | data | 浅判断是否为geojson格式 |
288
+ | **isNumber**(number) | number | 判断是否为数字 字符串类型也为真 |
289
+ | **judgeSizeLngLat**(point,isLng) | point:经纬度数字<br />isLng:true 是否经度在前 | 反转经纬度 |
290
+ | **object2Geojson** | | 对象转geojson |
291
+ | **resversalGeojson** | | 反转geojson |
292
+ | **reversalLngLat** | | 反转多维经纬度 |
293
+ | **mergeGeoJson** | | 合并geojson |
294
+ | **getPositionType** | | 判断多维数组类型 |
295
+ | **getArrayDepth** | | 获取多维数组深度 |
296
+ | **latFromMercatorY** | | 墨卡托转纬度 |
297
+ | **lngFromMercatorX** | | 墨卡托转经度 |
298
+ | **outOfChina** | | 判断点是否在国内 |
299
+ | **gcj02ToWgs84** | | gcj02转wgs84 |
300
+ | **wgs84ToGcj02** | | wgs84转gcj02 |
301
+ | **getSymbolRipple** | | 动态canvas点 |
302
+ | **transformGeojson** | | 自定义转换geojson |
303
+ | **transformLngLat** | | 自定义转换position |
304
+
197
305
 
198
306
 
199
307
  #### 使用
package/dist/index.d.ts CHANGED
@@ -77,6 +77,12 @@ export declare function isNumber(value: any): boolean;
77
77
  */
78
78
  export declare function isValidNumber(value: number): boolean;
79
79
 
80
+ /**
81
+ * 深克隆
82
+ * @param data
83
+ */
84
+ export declare function deepClone(data: any): any;
85
+
80
86
  /**
81
87
  * 创建一组地图图层
82
88
  */
@@ -164,6 +170,32 @@ export declare function gcj02ToWgs84(lng, lat): [number, number];
164
170
  */
165
171
  export declare function wgs84ToGcj02(lng, lat): [number, number];
166
172
 
173
+ /**
174
+ * 墨卡托转纬度
175
+ * @param y
176
+ */
177
+ export declare function latFromMercatorY(y: number): number;
178
+
179
+ /**
180
+ * 墨卡托转经度
181
+ * @param x
182
+ */
183
+ export declare function lngFromMercatorX(x: number): number;
184
+
185
+ /**
186
+ * 转换geojson坐标
187
+ * @param geojson
188
+ * @param func
189
+ */
190
+ export declare function transformGeojson(geojson: any, func: Function): any;
191
+
192
+ /**
193
+ * 转换数组坐标
194
+ * @param position
195
+ * @param func
196
+ */
197
+ export declare function transformLngLat(position: any, func: Function): any;
198
+
167
199
  declare module 'mapbox-gl' {
168
200
  interface Map {
169
201
  /**
@@ -413,6 +445,47 @@ declare module 'mapbox-gl' {
413
445
  * @param options.reversal 是否反转
414
446
  */
415
447
  getTilesByBounds(zoom?: number, options?: { expand?: number, reversal?: boolean }): [number, number, number][];
448
+
449
+ /**
450
+ * 加载精灵图
451
+ * @param sprite
452
+ */
453
+ loadSpriteGraph(sprite: { image: string, json: string | object }): Promise<any>;
454
+
455
+ /**
456
+ * 聚合marker
457
+ * @param options marker参数
458
+ * @constructor
459
+ */
460
+ MapClusterMarker(options?: any): any;
461
+
462
+ /**
463
+ * 获取source图层
464
+ * @param sourceName
465
+ * @param options
466
+ * @constructor
467
+ */
468
+ MapSourceEvent(sourceName: string, options?: { once?: boolean, sourceLayer?: string, filter?: Array<any>, validate?: boolean })
469
+
470
+ /**
471
+ * 裁剪区域
472
+ * @param options
473
+ * @constructor
474
+ */
475
+ TileByGeoJson(options?: { maxZoom?: number, minZoom?: number, expand?: number, isGCJ?: boolean, replaceUrl?: Function, isJudgement?: boolean, judgementBox?: Function, judgementPoint?: Function })
476
+
477
+ /**
478
+ * 右键菜单
479
+ * @param options
480
+ * @constructor
481
+ */
482
+ MapMenu(options?: { move?: boolean, className?: string }): any;
483
+
484
+ /**
485
+ * 地图测量
486
+ * @constructor
487
+ */
488
+ MapMeasure(options?: { type?: 'line' | 'circle' | 'polygon' | 'rect' | 'sector', fixed?: number, dash?: boolean, units?: { line?: [string, string], circle?: [string, string], polygon?: [string, string], rect?: [string, string], sector?: [string, string] }, className?: string, pointProps?: { color?: string, radius?: number, strokeWidth?: number, strokeColor?: string }, lineProps?: { color?: string, width?: number, dasharray?: [number, number] }, fillProps?: { color?: string } }): any;
416
489
  }
417
490
  }
418
491
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(w="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",u=w.asyncIterator||"@@asyncIterator",l=w.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function p(e,r,n,o){var i,s,u,l;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),o=new k(o||[]),a(r,"_invoke",{value:(i=e,s=n,u=o,l=h,function(e,r){if(l===d)throw new Error("Generator is already running");if(l===m){if("throw"===e)throw r;return{value:t,done:!0}}for(u.method=e,u.arg=r;;){var n=u.delegate;if(n&&(n=function e(r,n){var o=n.method,i=r.iterator[o];return i===t?(n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v):"throw"===(o=f(i,r.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,v):(i=o.arg)?i.done?(n[r.resultName]=i.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,u),n)){if(n===v)continue;return n}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(l===h)throw l=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);if(l=d,"normal"===(n=f(i,s,u)).type){if(l=u.done?m:y,n.arg===v)continue;return{value:n.arg,done:u.done}}"throw"===n.type&&(l=m,u.method="throw",u.arg=n.arg)}})}),r}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h="suspendedStart",y="suspendedYield",d="executing",m="completed",v={};function g(){}function b(){}function L(){}var w,A,E=(c(w={},s,(function(){return this})),(A=(A=Object.getPrototypeOf)&&A(A(P([]))))&&A!==o&&i.call(A,s)&&(w=A),L.prototype=g.prototype=Object.create(w));function M(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var r;a(this,"_invoke",{value:function(o,a){function s(){return new t((function(r,s){!function r(o,a,s,u){var l;if("throw"!==(o=f(e[o],e,a)).type)return(a=(l=o.arg).value)&&"object"==n(a)&&i.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(a).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}));u(o.arg)}(o,a,r,s)}))}return r=r?r.then(s,s):s()}})}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r,o=e[s];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=o}throw new TypeError(n(e)+" is not iterable")}return a(E,"constructor",{value:b.prototype=L,configurable:!0}),a(L,"constructor",{value:b,configurable:!0}),b.displayName=c(L,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,L):(e.__proto__=L,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},r.awrap=function(e){return{__await:e}},M(x.prototype),c(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new x(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},M(E),c(E,l,"Generator"),c(E,s,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,C(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),i=0;i<o.length;i++)r=o[i],0<=t.indexOf(r)||(n[r]=e[r]);return n}function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>K,RegisterMapBoxMethod:()=>function(e,n){if(e&&e.Map){oe=e,-1===(window.mapboxgl=oe).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(a=oe.Map.prototype._setupPainter,oe.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},a.apply(this),this._canvas.getContext=e});var a,s,u=e.Map,l=function(e,n){var a=[],s=[];n&&Array.isArray(n)&&0<n.length&&n.every((function(e){return"string"==typeof e}))&&(s=n),a=s;var u=e.prototype.setStyle,l={layers:[],sources:[]},c=[],p={},f=[],h=!1,v=null,g={};return{clearData:function(){a=s,l={layers:[],sources:[]},c=[],p={},h=!(f=[]),v=null,g={}},setPaint:function(e,t){fe(this,e,t,"setPaintProperty")},setLayout:function(e,t){fe(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?pe(this,t,n):Array.isArray(n)&&(ae(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),pe(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===e&&(e=a),void 0===t&&(t=!0);for(var r,n=this.getStyle(),i=n.layers,s=n.sources,u={layers:[],sources:[]},l=0;l<i.length;)"background"===i[l].type||e.includes(i[l].source)||(r=i[l].id,this.getLayer(r)&&(u.layers.push(o(i[l])),t||this.removeLayer(r))),l++;var c,p=[];for(c in s)p.push(c);for(var f=0;f<p.length;){var h=p[f];e.includes(h)||this.isSourceLoaded(h)&&(u.sources.push({name:h,source:o(s[h])}),t||this.removeSource(h)),f++}return u},removeAllCustomLayer:function(){var e=this;c.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)}))},removeAllLayerAndSource:function(e){return void 0===e&&(e=a),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){void 0===t&&(t=a);for(var r=this.getStyle().layers,n=[],o=0;o<r.length;)"background"===r[o].type||t.includes(r[o].source)||n.push(r[o]),o++;if(e){if("string"==typeof e)return n.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return n.filter((function(t){return e.includes(t.type)}))}return n},MapTooltip:function(e,t){return new k(this,e,t)},MapPopup:function(e,t){return new S(this,e,t)},addLayer:function(e,t){var n;return this._lazyInitEmptyStyle(),"custom"===e.type&&c.push({layer:e,beforeId:t}),t?-1!==(n=f.findIndex((function(e){return e.id===t})))&&f.splice(n,0,{type:e.type,id:e.id}):f.push({type:e.type,id:e.id}),this.style.addLayer(e,t),this.fire("layerdata",r({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),n=c.findIndex((function(t){return t.layer.id===e}));return-1!==n&&c.splice(n,1),n=f.findIndex((function(t){return t.id===e})),-1!==n&&f.splice(n,1),this.style.removeLayer(e),this.fire("layerdata",r({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=f.findIndex((function(t){return t.id===e})),o=f.findIndex((function(e){return e.id===t}));return-1!==n&&-1!==o&&(r=f.splice(n,1)[0],o<0?o=0:o>f.length&&(o=f.length),f.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new T(this)},MapCustom:function(){return new j(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=J(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,n,o){var i,a,s,u;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(i=void 0===(i=(n=null!=n?n:{}).padding)?40:i,a=void 0===(a=n.animate)||a,s=void 0===(s=n.maxZoom)?15:s,u=void 0===(u=n.essential)||u,n=t(n,re),this.fitBounds(e,r({linear:!1,padding:i,animate:a,essential:u,maxZoom:s},n),o))},getInvertMask:function(e,t){var n;if(i(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return n=[],e.forEach((function(e){n.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,r({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(n)}}}},e)},fitMap:function(){for(var e={},t=!1,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=void 0===(s=o[0])?null:s,u=void 0===(u=o[1])?null:u;s?i(s)?(t=!1,v=s,u&&!i(u)&&"object"==typeof u&&(g=u)):"object"==typeof s&&(t=!0,e=s):v&&(t=!0),t&&v&&this.fitBoundsGeoJson(v,r({},g,e))},loadImages:function(e){var r=this;return new Promise((function(n){var o={};if(e&&0!==Object.keys(e).length)for(var i in e){var a,s,u=e[i];"string"==typeof u?r.loadImage(u,l(i)):"object"==typeof u&&(u.url?(a=u.url,s=t(u,ne),r.loadImage(a,l(i,s))):u.layer&&u.layer.render&&"function"==typeof u.layer.render&&l(i,u.config||{})(null,u.layer))}else n(o);function l(t,r){return function(i,a){o[t]={data:r,url:i?null:a},Object.keys(o).length===Object.keys(e).length&&n(o)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(n){t.loadImages(e).then((function(e){for(var o in e){var i=e[o],a=r({},null==i?void 0:i.data,{type:"custom"});t.hasImage(o)||t.addImage(o,i.url,a)}n()}))}))},MapCircle:function(){return new Y(this)},MapEvent:function(e){return new U(this,e)},MapMoreCustom:function(){return new X(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,o=null!=(o=e.sources)?o:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==o?void 0:o.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),o.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(Object.keys(e).includes("destroy")&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new ee(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=[];return c.map((function(r){e.getLayer(r.layer.id)&&t.push(r.layer)})),t},setStyle:function(e,t,r){var n,o,i,a=this;return null!=t&&t.save&&(i=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,i=null!=(n=i=void 0===i?[]:i)?n:[],p=this.findCustomIcon(),Array.isArray(i)&&0!==i.length?o||(i=Array.from(new Set([].concat(i,["composite","mapbox://mapbox.satellite"])))):i=["composite","mapbox://mapbox.satellite"],l=this.getAllLayerAndSource(i),this.once("style.load",(function(n){var o,i=[];for(o in p)i.push(o),a.style.imageManager.images[o]=p[o];var s=[];l.sources.map((function(e){var t=l.layers.filter((function(t){return t.source===e.name}));s.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(s),s.map((function(e){a.getSource(e.name)||a.addSource(e.name,e.source),e.layer.map((function(e){a.getLayer(e.id)||a.addLayer(e)}))})),c.forEach((function(e){a.getLayer(e.layer.id)||a.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:i,layerSource:l})}))),u.call(this,e,t)},getLayerIndex:function(e){if(e){var t=f.findIndex((function(t){return t.id===e}));if(-1!==t)return t}return 0===f.length?0:f.length-1},getLayerId:function(e,t){return e+=t=void 0===t?0:t,t=Number(e),isNaN(t)||e<0&&e>=f.length?"":null!=(e=null==(t=f)||null==(t=t[e])?void 0:t.id)?e:void 0},getMinLayerId:function(){var e;return null!=(e=null==(e=f)||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e;return null!=(e=null==(e=f)||null==(e=e[f.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return f.map((function(e){return e.id}))},getAllLayer:function(){return f},getLineLayer:function(){return f.map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new te(this,e,t)},addHeader:function(e,t){var n;t&&"function"==typeof t&&!h&&(n=this._requestManager.transformRequest,this._requestManager.transformRequest=function(o,i){return i=n.call(this,o,i),(o=t(o))&&"boolean"==typeof o?(h=!0,r({headers:e},i)):i})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=oe.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,o;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(o=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),o<0)||t<0||e<=o||e<=t?[]:(r=m(t/e),n=d(o/e),o=d((o+1)/e),[n,m((t+1)/e),o,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(o=e)?o:this.getZoom(),Math.floor(e)),o=this.getBounds().toArray(),i=(e=this.getTileByPosition(o[0],n))[0],a=e[1],s=(e=this.getTileByPosition(o[1],n))[0],u=e[1];if(u-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(y(i-=r)&&y(s)&&y(u)&&y(a)))return[];var l=[];if(t)for(var c=u;c<=a;c++)for(var p=i;p<=s;p++)l.push([p,c,n]);else for(var f=i;f<=s;f++)for(var h=u;h<=a;h++)l.push([f,h,n]);var d=Math.pow(2,n);return l.forEach((function(e){e[0]<0&&(e[0]=e[0]+d)})),l.filter((function(e){return 0<=e[1]}))}}}(u,n);for(s in new Event("layerdata"),l)u.prototype[s]=l[s];var c,p=oe.Style,f=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,o=e.prototype.queryRenderedFeatures,i=e.prototype.addLayer,a=e.prototype.removeLayer,s={};return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,o=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=o._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var i=o._availableImages.slice(r),a=0;a<i.length;a++)o.imageManager.images[i[a]].type="custom";o.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){var r=e.interactive;s[e.id]=void 0===r||r,i.call(this,e,t)},removeLayer:function(e){s[e]&&delete s[e],a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=o.call(this,e,t,r);if(0<n.length)for(var i=0;i<n.length;i++){var a=s[n[i].layer.id];n[i].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))}}}(p);for(c in f)p.prototype[c]=f[c];var h=(e=oe.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=h.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(oe&&e&&t){(ie=e).GLTFLoader=t,window.THREE=ie;var r,n=oe.Map,o={initGLTF:function(e,t,r){return new _(e,t,r)}};for(r in o)n.prototype[r]=o[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>o,gcj02ToWgs84:()=>function(e,t){var r,n,o,i,a;return A(e,t)?[e,t]:(r=L(e-105,t-35),n=w(e-105,t-35),o=t/180*v,i=Math.sin(o),i=1-b*i*i,a=Math.sqrt(i),r=180*r/(g*(1-b)/(i*a)*v),[2*e-(e+(n=180*n/(g/a*Math.cos(o)*v))),2*t-(t+r)])},getArrayDepth:()=>p,getPositionType:()=>c,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,o=void 0===(t=e.color)?"#f00":t,i=e.custom,a=f(o,!0),s=!1;return i&&"function"==typeof i&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,u,l=this.context;return s?l=i({width:this.width,height:this.height,duration:n,color:o,context:l}):(e=performance.now()%n/n,t=r/2*.2,u=r/2*e,l.clearRect(0,0,this.width,this.height),l.beginPath(),l.arc(this.width/2,this.height/2,u,0,2*Math.PI),l.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",l.lineWidth=2,l.stroke(),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.fill(),l.beginPath(),l.arc(this.width/2,this.height/2,t,0,2*Math.PI),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.lineWidth=2+4*(1-e),l.fill()),this.data=l.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>f,isGeoJSON:()=>i,isNumber:()=>h,isValidNumber:()=>y,judgeSizeLngLat:()=>s,latFromMercatorY:()=>m,lngFromMercatorX:()=>d,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var a=0;a<n.length;a++)Array.isArray(n[a])?t.push.apply(t,n[a]):n[a]&&"object"==typeof n[a]&&t.push(n[a]);for(var s,u=0;u<t.length;u++){var l=t[u];i(l)&&(l=l.features,(s=e.features).push.apply(s,l))}return e},object2Geojson:()=>function(e,t,r){var n=o(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var i=[],a=function(e){var o=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return l(e,r);if(r=e[r[0]])return[u(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return l(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(o,t);0<a.length&&a.map((function(t){var a=c(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a))||s)&&(s={type:"Feature"},"Feature"!==a?(s.properties=o,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),i.push(s))}))},s=0;s<n.length;s++)a(s);return e.features=i,e},outOfChina:()=>A,resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),i(e)){for(var n={type:"FeatureCollection",features:[]},o=e.features,u=0;u<o.length;u++){var l,c=o[u],p={};for(l in c)"geometry"!==l&&"properties"!==l&&"type"!==l&&(p[l]=c[l]);var f=c.geometry.coordinates,h=c.geometry.type,y={type:h,coordinates:null};y.coordinates=("Point"===h?s:a)(f,t),n.features.push(r({type:"Feature",geometry:y,properties:c.properties},p))}return n}return null},reversalLngLat:()=>a,wgs84ToGcj02:()=>function(e,t){var r,n,o,i,a;return A(e=+e,t=+t)?[e,t]:(r=L(e-105,t-35),n=w(e-105,t-35),o=t/180*v,i=Math.sin(o),i=1-b*i*i,a=Math.sqrt(i),r=180*r/(g*(1-b)/(i*a)*v),[e+(n=180*n/(g/a*Math.cos(o)*v)),t+r])}});var o=function e(t){var r,n,o="object"!=(o=typeof(r=t))?o:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===o)n=[];else{if("Object"!==o)return t;n={}}if("Array"===o)for(var i=0,a=t.length;i<a;i++)n.push(e(t[i]));else if("Object"===o)for(var s in t)n[s]=e(t[s]);return n};function i(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function a(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?h(e[0])?s(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var o=t[n];h(o[0])?r.push(s(o)):r.push(e(o))}return r}(e):[]}function s(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function u(e){return"string"==typeof e?JSON.parse(e):e}function l(e,t,r){var n=[],i=2===(r=void 0===r?[]:r).length;return function e(t,a){var s;t&&a.length&&(s=a.shift(),t.hasOwnProperty(s))&&(t=t[s],Array.isArray(t)?0!==a.length||i?t.forEach((function(t){i?n.push([t[r[0]],t[r[1]]]):e(t,o(a))})):t&&(s=u(t),n.push(s)):"object"==typeof t?0===a.length?n.push(i?[t[r[0]],t[r[1]]]:t):e(t,a):0===a.length&&t&&(s=u(t),n.push(s)))}(e,t),n}function c(e){if(Array.isArray(e)){var t=p(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:var r=(n=e[0])[0],n=n[n.length-1];return r[0]===n[0]&&r[1]===n[1]?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature"}return null}function p(e){return Array.isArray(e)?Array.isArray(e[0])?1+p(e[0]):1:0}function f(e,t){void 0===t&&(t=!1);var r,n,o=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o))?(r=parseInt(o[1],16),n=parseInt(o[2],16),o=parseInt(o[3],16),t?[r,n,o,1]:"rgba("+r+","+n+","+o+",1)"):e}function h(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function y(e){return isFinite(e)&&!isNaN(e)}function d(e){return 360*e-180}function m(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var v=Math.PI,g=6378245,b=.006693421622965943;function L(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*v)+20*Math.sin(2*e*v))/3)+2*(20*Math.sin(t*v)+40*Math.sin(t/3*v))/3+2*(160*Math.sin(t/12*v)+320*Math.sin(t*v/30))/3}function w(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*v)+20*Math.sin(2*e*v))/3)+2*(20*Math.sin(e*v)+40*Math.sin(e/3*v))/3+2*(150*Math.sin(e/12*v)+300*Math.sin(e/30*v))/3}function A(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}function E(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function M(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){E(i,n,o,a,s,"next",e)}function s(e){E(i,n,o,a,s,"throw",e)}a(void 0)}))}}var x=e(687),N=e.n(x),C=["customName"],k=function(){function e(e,n,o){var i=this,a=(this._mouseEnter=function(){var e=M(N().mark((function e(t){var r,n,o,a,s,u,l,c;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,o=i.map.queryRenderedFeatures(r),u=null!=(u=o[0])?u:{},a=u.properties,s=u.geometry,u.source,u=u.layer,i.layerName.includes(u.id)){e.next=8;break}return null!=(u=i.popup)&&u.remove(),e.abrupt("return");case 8:if(u=s.coordinates,l=[n.lng,n.lat],"mouseenter"===i.mouseType&&(l=i._getPosition(u)),0<(null==(c=l)?void 0:c.length))return e.next=14,i.htmlCallBack(a,l,{lngLat:n,geometry:s,point:r,features:o,feature:o[0]});e.next=16;break;case 14:c=e.sent,i.popup.setLngLat(l).setHTML(c).addTo(i.map);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){i.popup.remove()},this.map=e,"string"==typeof n?this.layerName=[n]:Array.isArray(n)&&(this.layerName=n),e=null!=(n=e.tooltipClass)?n:"commonTooltip",void 0!==(a=(n=null!=o?o:{}).customName)&&a);n=t(n,C),a=a?"":e+" ",this.className=a,null!=o&&o.className&&(a+=o.className),this.fullName=a,this.popup=new mapboxgl.Popup(r({},n,{className:a,closeButton:null!=(e=null==o?void 0:o.closeButton)&&e,closeOnClick:null!=(n=null==o?void 0:o.closeOnClick)&&n,anchor:null!=(a=null==o?void 0:o.anchor)?a:"left",type:"tooltip"}))}var n=e.prototype;return n.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},n.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},n.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},n._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),P=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],S=function(){function e(e,n,o){var i=this,a=(this._closeOtherPopup=function(){var e;i.closeOther&&null!=(e=i.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(i.noCloseLayerName)&&0<i.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(i.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=M(N().mark((function e(t){var r,n,o,a,s,u,l,c,p,f,h,y;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(i._closeOtherPopup(),r=t.point,n=t.lngLat,o=i.map.queryRenderedFeatures(r),l=null!=(l=o[0])?l:{},a=l.properties,s=l.geometry,l.source,l=l.layer,i.layerName.includes(l.id)){e.next=8;break}return e.abrupt("return");case 8:if(i.customClick){e.next=28;break}return c=s.coordinates,p=s.type,e.next=12,null==(l=i.componentCallBack)?void 0:l.call(i,{properties:a,lngLat:n,coordinates:c,point:r,features:o,feature:o[0]});case 12:if(e.t1=u=e.sent,e.t0=null!==e.t1,!e.t0){e.next=16;break}e.t0=void 0!==u;case 16:e.t0?(e.t2=u,e.next=21):e.next=20;break;case 20:e.t2={};case 21:h=e.t2,f=h.component,h=h.instance,y=n,"Point"===p&&(y=c),i.vueInstance=h,f&&(i.popup.setOffset(i.offset),i.popup.setLngLat(y).setDOMContent(f).addTo(i.map));case 28:"function"==typeof i.callBack&&i.callBack({lngLat:n,properties:a,geometry:s,point:r});case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof n?this.layerName=[n]:Array.isArray(n)&&(this.layerName=n),void 0!==(s=(n=o||{}).destroyComponent)&&s),s=void 0!==(s=n.customClick)&&s,u=void 0!==(u=n.popupClose)&&u,l=void 0===(l=n.closeOther)||l,c=void 0===(c=n.noCloseLayerName)?[]:c,p=void 0!==(p=n.customName)&&p,f=void 0===(f=n.offset)?[0,0]:f,h=n.closeClick;n=t(n,P),e=null!=(e=e.popupClass)?e:"commonPopup",p=p?"":e+" ",this.className=p,null!=o&&o.className&&(p+=o.className),this.fullName=p,this.noCloseLayerName=c,this.noCloseLayerName=[],this.customClick=s,this.popupCloseSign=u,this.closeOther=l,this.offset=f="number"==typeof f?[f,f]:f,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(r({},n,{offset:f,className:p,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(o=null==n?void 0:n.closeOnClick)&&o,anchor:null!=(c=null==n?void 0:n.anchor)?c:"bottom",focusAfterOpen:null!=(s=null==n?void 0:n.focusAfterOpen)&&s,type:"popup",sourceName:this.layerName})),h&&"function"==typeof h&&(this.popup._closeClick=h),null!=(u=this.popup)&&u.on("close",(function(e){"function"==typeof i.closeCallback&&i.closeCallback(e),i.popupCloseSign&&null!=(e=i.vueInstance)&&e.popupClose&&"function"==typeof i.vueInstance.popupClose&&i.vueInstance.popupClose(),i.vueInstance&&a&&null!=(e=i.vueInstance)&&e.$destroy()})))}var n=e.prototype;return n.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},n.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},n.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},n.close=function(){var e;null!=(e=this.popup)&&e._onClose()},n.closeBack=function(e){this.closeCallback=e},n.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),_=function(){function e(e,t,r){var n=this,o=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(o=t.scale)?1:o),i=void 0===(i=t.height)?0:i,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,u=void 0===(u=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:u,l=void 0===(l=t.DirectionalLight)?[]:l,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=o,this.height=i,this.rotate=a,this.properties=s,this.AmbientLight=u,this.DirectionalLight=l,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,i),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:o*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,o=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,i=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,i)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=o.properties,e.scene.children[t].lngLat=o.lngLat;o.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),o=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),i=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(o),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=i.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),T=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,n){"vector"===this.sourceType?this.map.addSource(e,r({},t,n.sourceConfig)):this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=n.beforeId||null,this.map.addLayer(r({id:e,type:"line",source:e},n.layerConfig),t),n.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(r({id:this.lineName,type:"line",source:e},n.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.lineName&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),j=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var o=r.sliceNum;if(!o||o<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var i=0,a=0;a<e.features.length;a+=o){var s={type:"FeatureCollection",features:[]},u=e.features.slice(a,o);s.features=[].concat(u),u=t+"-"+i,this.sourceName.push(u),this._addSourceLayer(u,s,r),i++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,n){"vector"===this.sourceType?this.map.addSource(e,r({},t,n.sourceConfig)):this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=n.beforeId||null,this.map.addLayer(r({id:e,type:this.type,source:e},n.layerConfig),t)},e}(),I={centimeters:100*(x=6371008.8),centimetres:100*x,degrees:x/111325,feet:3.28084*x,inches:39.37*x,kilometers:x/1e3,kilometres:x/1e3,meters:x,metres:x,miles:x/1609.344,millimeters:1e3*x,millimetres:1e3*x,nauticalmiles:x/1852,radians:1,yards:1.0936*x};function O(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function R(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(G(e[0])&&G(e[1]))return O({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}function F(e,t,r){void 0===r&&(r={});for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}return O({type:"Polygon",coordinates:e},t,r)}function B(e){return e%(2*Math.PI)*180/Math.PI}function H(e){return e%360*Math.PI/180}function G(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function q(e,t,r){if(null!==e)for(var n,o,i,a=0,s=e.type,u="FeatureCollection"===s,l="Feature"===s,c=u?e.features.length:1,p=0;p<c;p++)for(var f,h,y=(h=!!(f=u?e.features[p].geometry:l?e.geometry:e)&&"GeometryCollection"===f.type)?f.geometries.length:1,d=0;d<y;d++){var m=0,v=0,g=h?f.geometries[d]:f;if(null!==g){var b=g.coordinates,L=g.type,w=!r||"Polygon"!==L&&"MultiPolygon"!==L?0:1;switch(L){case null:break;case"Point":if(!1===t(b,a,p,m,v))return!1;a++,m++;break;case"LineString":case"MultiPoint":for(n=0;n<b.length;n++){if(!1===t(b[n],a,p,m,v))return!1;a++,"MultiPoint"===L&&m++}"LineString"===L&&m++;break;case"Polygon":case"MultiLineString":for(n=0;n<b.length;n++){for(o=0;o<b[n].length-w;o++){if(!1===t(b[n][o],a,p,m,v))return!1;a++}"MultiLineString"===L&&m++,"Polygon"===L&&v++}"Polygon"===L&&m++;break;case"MultiPolygon":for(n=0;n<b.length;n++){for(o=v=0;o<b[n].length;o++){for(i=0;i<b[n][o].length-w;i++){if(!1===t(b[n][o][i],a,p,m,v))return!1;a++}v++}m++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===q(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function D(e){var t=[1/0,1/0,-1/0,-1/0];return q(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const z=D.default=D,J=function(e){e=z(e);var t=void 0,r=(void 0===t&&(t={}),Number(e[0])),n=Number(e[1]),o=Number(e[2]),i=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return F([[a,[o,n],[o,i],[r,i],a]],t.properties,{bbox:e,id:t.id})};function Z(e,t,r,n){void 0===n&&(n={});var o=H((e=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e))[0]),i=(e=H(e[1]),r=H(r),t=function(e,t){var r=I[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return R([B(o+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(i))),B(i)],n.properties)}const V=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,o=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),i=[],a=0;a<n;a++)i.push(Z(e,t,-360*a/n,r).geometry.coordinates);return i.push(i[0]),F([i],o)};var Y=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,o=null!=r?r:{},i=void 0===(n=o.radius)?0:n,a=void 0===(n=o.steps)?64:n,s=o.endRadius,u=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var l=e.features,c=0;c<l.length;c++){var p,f,h,y,d,m=l[c].geometry.coordinates;"number"==typeof m[0]&&"number"==typeof m[1]&&(m[0]<m[1]&&(p=[m[1],m[0]],m[0]=p[0],m[1]=p[1]),p=!1,f=0<(f=(p="string"==typeof i||p)?l[c].properties[i]:i)?f:0,h={steps:a,units:"kilometers",properties:l[c].properties},y=V(m,f,h),s?(d=!1,d=0<(d=(d="string"==typeof s||d)?l[c].properties[s]:s)?d:0,m=V(m,s,h),u.push(f===d?y:f<d?this._getRingJson(m.geometry.coordinates[0],y.geometry.coordinates[0],y.properties):this._getRingJson(y.geometry.coordinates[0],m.geometry.coordinates[0],y.properties))):u.push(y))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:u},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,n){this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=(null!=n?n:{}).beforeId,this.map.addLayer(r({id:e,type:"fill",source:e},n.layerConfig),t),n.lineConfig&&(this.lineName=e+"-line",this.map.addLayer(r({id:this.lineName,type:"line",source:e},n.lineConfig),t))},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.lineName&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),U=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,o=function(t){var n,o;r.event.push(t),0<(null==(o=r.name)?void 0:o.length)?null!=(o=r.name)&&o.forEach((function(n){function o(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var i;r[t]=o,null!=(i=r.map)&&i.on(t,n,o)})):(r[t]=o=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,o))};for(n in e)o(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,o;r.event.includes(e)&&(o=r[e],null!=(n=r.map))&&n.off(e,t,o)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,o=r[t];null!=(n=r.map)&&n.off(t,e,o)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),$=["id","type"],W=["id","type","beforeId"],X=function(){function e(e){this.map=e,this.sourceName=[]}var n=e.prototype;return n.draw=function(e,n){var o,a,s,u,l=this;return i(e)||"vector"===e.type?(o=(a=null!=(a=n.sourceConfig)?a:{}).id,u=void 0===(u=a.type)?"geojson":u,a=t(a,$),s=o,"vector"===e.type?this.map.addSource(o,r({},a,e)):this.map.addSource(o,r({type:u,data:e},a)),u=null!=(o=n.layerConfig)?o:{},e=[],Array.isArray(u)?e=u:"object"==typeof u&&e.push(u),e.forEach((function(e){var n=e.id,o=e.type,i=e.beforeId;e=t(e,W),l.map.addLayer(r({id:n,type:o,source:s},e),i)})),this.sourceName=[s].concat(e.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},n.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},n.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),K=function(){function e(t,n,o){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var i={layer:null,tooltip:null,popup:null};return n&&"object"==typeof n&&(i=r({},i,n)),this.name=t,this.layers=i,this.prop=null!=o?o:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ee=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(i(e))for(var n,o=null!=(n=this.options)?n:{},a=0,s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Q(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=s()).done;){var u,l,c=c.value;"Point"===c.geometry.type&&(u=o,t&&"function"==typeof t&&1===(null==(l=t({lngLat:c.geometry.coordinates,properties:c.properties,index:a}))?void 0:l.nodeType)&&(u=r({},u,{element:l})),l=new mapboxgl.Marker(u).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(l),this.properties.push(c.properties),a++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var n=0;n<this.markers.length;n++)!function(n){["dragstart","drag","dragend"].forEach((function(o){e[o]&&"function"==typeof e[o]&&t.markers[n].on(o,(function(i){e[o](r({},i,{properties:t.properties[n]}))}))}))}(n)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),te=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),re=["padding","animate","maxZoom","essential"],ne=["url"],oe=null,ie=null,ae=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},se=["line-color","line-opacity"],ue=["fill-color","fill-opacity"],le=["background-color","background-opacity"],ce=["text-color","text-opacity"],pe=function(e,t,r,n){if(r&&(ae(r)||Array.isArray(r))){var o=e.getLayer(t);if(o){var i=[];switch(o.type){case"line":i=se;break;case"fill":i=ue;break;case"background":i=le;break;case"symbol":i=ce}0<i.length&&(e.setPaintProperty(t,i[0],r),null!==n)&&e.setPaintProperty(t,i[1],n)}}},fe=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var o in r)null!==r[o]&&void 0!==r[o]&&e[n](t,o,r[o])}})(),n;function e(n){var o=r[n];return void 0!==o||(o=r[n]={exports:{}},t[n](o,o.exports,e)),o.exports}var t,r,n}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(x="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",l=x.asyncIterator||"@@asyncIterator",u=x.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function h(e,r,n,i){var o,s,l,u;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),i=new k(i||[]),a(r,"_invoke",{value:(o=e,s=n,l=i,u=f,function(e,r){if(u===m)throw new Error("Generator is already running");if(u===d){if("throw"===e)throw r;return{value:t,done:!0}}for(l.method=e,l.arg=r;;){var n=l.delegate;if(n&&(n=function e(r,n){var i=n.method,o=r.iterator[i];return o===t?(n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v):"throw"===(i=p(o,r.iterator,n.arg)).type?(n.method="throw",n.arg=i.arg,n.delegate=null,v):(o=i.arg)?o.done?(n[r.resultName]=o.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,l),n)){if(n===v)continue;return n}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===f)throw u=d,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);if(u=m,"normal"===(n=p(o,s,l)).type){if(u=l.done?d:y,n.arg===v)continue;return{value:n.arg,done:l.done}}"throw"===n.type&&(u=d,l.method="throw",l.arg=n.arg)}})}),r}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var f="suspendedStart",y="suspendedYield",m="executing",d="completed",v={};function g(){}function b(){}function L(){}var x,w,_=(c(x={},s,(function(){return this})),(w=(w=Object.getPrototypeOf)&&w(w(C([]))))&&w!==i&&o.call(w,s)&&(x=w),L.prototype=g.prototype=Object.create(x));function P(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){var r;a(this,"_invoke",{value:function(i,a){function s(){return new t((function(r,s){!function r(i,a,s,l){var u;if("throw"!==(i=p(e[i],e,a)).type)return(a=(u=i.arg).value)&&"object"==n(a)&&o.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(a).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}));l(i.arg)}(i,a,r,s)}))}return r=r?r.then(s,s):s()}})}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function C(e){if(e||""===e){var r,i=e[s];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(i=function n(){for(;++r<e.length;)if(o.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=i}throw new TypeError(n(e)+" is not iterable")}return a(_,"constructor",{value:b.prototype=L,configurable:!0}),a(L,"constructor",{value:b,configurable:!0}),b.displayName=c(L,u,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,L):(e.__proto__=L,c(e,u,"GeneratorFunction")),e.prototype=Object.create(_),e},r.awrap=function(e){return{__await:e}},P(E.prototype),c(E.prototype,l,(function(){return this})),r.AsyncIterator=E,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new E(h(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(_),c(_,u,"Generator"),c(_,s,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=C,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}var a=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(r=i.completion).type&&(n=r.arg,A(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,l,"next",e)}function l(e){t(a,i,o,s,l,"throw",e)}s(void 0)}))}}function i(e,t){if(null==e)return{};for(var r,n={},i=Object.keys(e),o=0;o<i.length;o++)r=i[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>$,RegisterMapBoxMethod:()=>function(e,t){if(e&&e.Map){Xe=e,-1===(window.mapboxgl=Xe).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(n=Xe.Map.prototype._setupPainter,Xe.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},n.apply(this),this._canvas.getContext=e});var n,a,c=e.Map,h=function(e,t){var n=e.prototype.setStyle,a=e.prototype.addControl;return{initData:function(){var e;this[$e]||(this[$e]={},e=[],tt(this,{source:e=t&&Array.isArray(t)&&0<t.length&&t.every((function(e){return"string"==typeof e}))?t:e,defaultSources:e,layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{},measure:{line:0,circle:0,polygon:0}}))},clearData:function(){tt(this,{source:rt(this,"defaultSources"),layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{}})},setPaint:function(e,t){et(this,e,t,"setPaintProperty")},setLayout:function(e,t){et(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?Qe(this,t,n):Array.isArray(n)&&(Ye(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),Qe(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===t&&(t=!0),null==e&&(e=rt(this,"source"));for(var r,n=this.getStyle(),i=n.layers,o=n.sources,a={layers:[],sources:[]},s=0;s<i.length;)"background"===i[s].type||e.includes(i[s].source)||(r=i[s].id,this.getLayer(r)&&(a.layers.push(l(i[s])),t||this.removeLayer(r))),s++;var u,c=[];for(u in o)c.push(u);for(var h=0;h<c.length;){var p=c[h];e.includes(p)||this.isSourceLoaded(p)&&(a.sources.push({name:p,source:l(o[p])}),t||this.removeSource(p)),h++}return a},removeAllCustomLayer:function(){var e=this,t=rt(this,"customLayer");t.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)})),t.length=0},removeAllLayerAndSource:function(e){return null==e&&(e=rt(this,"source")),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){null==t&&(t=rt(this,"source"));for(var r=this.getStyle().layers,n=[],i=0;i<r.length;)"background"===r[i].type||t.includes(r[i].source)||n.push(r[i]),i++;if(e){if("string"==typeof e)return n.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return n.filter((function(t){return e.includes(t.type)}))}return n},MapTooltip:function(e,t){return new _(this,e,t)},MapPopup:function(e,t){return new E(this,e,t)},addLayer:function(e,t){this._lazyInitEmptyStyle();var r=rt(this,"layerIndex"),n=rt(this,"customLayer");return"custom"===e.type&&n.push({layer:e,beforeId:t}),t?-1!==(n=r.findIndex((function(e){return e.id===t})))&&r.splice(n,0,{type:e.type,id:e.id}):r.push({type:e.type,id:e.id}),this.style.addLayer(e,t),this.fire("layerdata",o({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),r=rt(this,"customLayer"),n=rt(this,"layerIndex"),i=r.findIndex((function(t){return t.layer.id===e}));return-1!==i&&r.splice(i,1),r=n.findIndex((function(t){return t.id===e})),-1!==r&&n.splice(r,1),this.style.removeLayer(e),this.fire("layerdata",o({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=rt(this,"layerIndex"),i=n.findIndex((function(t){return t.id===e})),o=n.findIndex((function(e){return e.id===t}));return-1!==i&&-1!==o&&(r=n.splice(i,1)[0],o<0?o=0:o>n.length&&(o=n.length),n.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new A(this)},MapCustom:function(){return new k(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=z(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,t,r){var n,a,s,l;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(n=void 0===(n=(t=null!=t?t:{}).padding)?40:n,a=void 0===(a=t.animate)||a,s=void 0===(s=t.maxZoom)?15:s,l=void 0===(l=t.essential)||l,t=i(t,ze),this.fitBounds(e,o({linear:!1,padding:n,animate:a,essential:l,maxZoom:s},t),r))},getInvertMask:function(e,t){var r;if(u(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return r=[],e.forEach((function(e){r.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,o({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(r)}}}},e)},fitMap:function(){for(var e={},t=!1,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=void 0===(a=n[0])?null:a,s=void 0===(s=n[1])?null:s,l=rt(this,"bounds"),c=rt(this,"cameraOptions");a?u(a)?(t=!1,l=a,s&&!u(s)&&"object"==typeof s&&(c=s)):"object"==typeof a&&(t=!0,e=a):l&&(t=!0),t&&l&&this.fitBoundsGeoJson(l,o({},c,e))},loadImages:function(e){var t=this;return new Promise((function(r){var n={};if(e&&0!==Object.keys(e).length)for(var o in e){var a,s,l=e[o];"string"==typeof l?t.loadImage(l,u(o)):"object"==typeof l&&(l.url?(a=l.url,s=i(l,qe),t.loadImage(a,u(o,s))):l.layer&&l.layer.render&&"function"==typeof l.layer.render&&u(o,l.config||{})(null,l.layer))}else r(n);function u(t,i){return function(o,a){n[t]={data:i,url:o?null:a},Object.keys(n).length===Object.keys(e).length&&r(n)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(r){t.loadImages(e).then((function(e){for(var n in e){var i=e[n],a=o({},null==i?void 0:i.data,{type:"custom"});t.hasImage(n)||t.addImage(n,i.url,a)}r()}))}))},MapCircle:function(){return new Y(this)},MapEvent:function(e){return new W(this,e)},MapMoreCustom:function(){return new K(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,i=null!=(i=e.sources)?i:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==i?void 0:i.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),i.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(Object.keys(e).includes("destroy")&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new ie(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=rt(this,"customLayer"),r=[];return t.map((function(t){e.getLayer(t.layer.id)&&r.push(t.layer)})),r},setStyle:function(e,t,r){var i,o,a,s,l,u,c=this;return null!=t&&t.save&&(a=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,a=null!=(i=a=void 0===a?[]:a)?i:[],rt(this,"images"),s=rt(this,"layerSource"),l=rt(this,"customLayer"),u=this.findCustomIcon(),Array.isArray(a)&&0!==a.length?o||(a=Array.from(new Set([].concat(a,["composite","mapbox://mapbox.satellite"])))):a=["composite","mapbox://mapbox.satellite"],s=this.getAllLayerAndSource(a),this.once("style.load",(function(n){var i,o=[];for(i in u)o.push(i),c.style.imageManager.images[i]=u[i];var a=[];s.sources.map((function(e){var t=s.layers.filter((function(t){return t.source===e.name}));a.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(a),a.map((function(e){c.getSource(e.name)||c.addSource(e.name,e.source),e.layer.map((function(e){c.getLayer(e.id)||c.addLayer(e)}))})),l.forEach((function(e){c.getLayer(e.layer.id)||c.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:o,layerSource:s})}))),n.call(this,e,t)},getLayerIndex:function(e){var t=rt(this,"layerIndex");if(e){var r=t.findIndex((function(t){return t.id===e}));if(-1!==r)return r}return 0===t.length?0:t.length-1},getLayerId:function(e,t){void 0===t&&(t=0);var r=rt(this,"layerIndex");return e+=t,t=Number(e),isNaN(t)||e<0&&e>=r.length?"":null!=(r=null==r||null==(t=r[e])?void 0:t.id)?r:void 0},getMinLayerId:function(){var e=rt(this,"layerIndex");return null!=(e=null==e||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e=rt(this,"layerIndex");return null!=(e=null==e||null==(e=e[e.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return rt(this,"layerIndex").map((function(e){return e.id}))},getAllLayer:function(){return rt(this,"layerIndex")},getLineLayer:function(){return rt(this,"layerIndex").map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new oe(this,e,t)},addHeader:function(e,t){var r,n=rt(this,"showHeader");t&&"function"==typeof t&&!n&&(r=this._requestManager.transformRequest,this._requestManager.transformRequest=function(i,a){return a=r.call(this,i,a),(i=t(i))&&"boolean"==typeof i?(n=!0,o({headers:e},a)):a})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=Xe.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,i;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(i=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),i<0)||t<0||e<=i||e<=t?[]:(r=L(t/e),n=b(i/e),i=b((i+1)/e),[n,L((t+1)/e),i,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(i=e)?i:this.getZoom(),Math.floor(e)),i=this.getBounds().toArray(),o=(e=this.getTileByPosition(i[0],n))[0],a=e[1],s=(e=this.getTileByPosition(i[1],n))[0],l=e[1];if(l-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(g(o-=r)&&g(s)&&g(l)&&g(a)))return[];var u=[];if(t)for(var c=l;c<=a;c++)for(var h=o;h<=s;h++)u.push([h,c,n]);else for(var p=o;p<=s;p++)for(var f=l;f<=a;f++)u.push([p,f,n]);var y=Math.pow(2,n);return u.forEach((function(e){e[0]<0&&(e[0]=e[0]+y)})),u.filter((function(e){return 0<=e[1]}))},loadSpriteGraph:function(e){var t=this;return new Promise(function(){var n=r(s().mark((function n(i){var o,a,l,u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e)return o=[],"object"==typeof e&&e.image&&e.json?o=[e]:Array.isArray(e)&&e.every((function(e){return"object"==typeof e&&e.image&&e.json}))&&(o=e),a={},l=function(){var e=r(s().mark((function e(){var t,r,n,i,l,u,c,h,p,f,y,m,d,v,g,b,L;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(t<o.length){if(r=o[t].image,n=o[t].json,i={},"string"==typeof n)return e.next=8,fetch(n).then((function(e){return e.json()}));e.next=12}else e.next=20;break;case 8:l=e.sent,i="object"==typeof l?l:{},e.next=13;break;case 12:"object"==typeof n&&(i=n);case 13:return e.next=15,function(){return le.apply(this,arguments)}(r);case 15:for(c in u=e.sent,i)b=i[c],h=b.width,p=b.height,f=b.x,y=b.y,m=b.sdf,d=b.pixelRatio,v=b.stretchX,g=b.stretchY,b=b.content,L=new ae({width:h,height:p}),ae.copy(u,L,{x:f,y},{x:0,y:0},{width:h,height:p}),a[c]={data:L,pixelRatio:d,sdf:m,stretchX:v,stretchY:g,content:b};case 17:t++,e.next=1;break;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.next=7,l();n.next=9;break;case 7:for(u in a)t.style.addImage(u,a[u]);i();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},MapClusterMarker:function(e){return new ce(this,e)},MapSourceEvent:function(e,t){return new pe(this,e,t)},TileByGeoJson:function(e){return new _e(this,e)},MapMenu:function(e){return new ke(this,e)},MapMeasure:function(e){return new Ue(this,e,$e)},addControl:function(e,t){return this.initData(),a.call(this,e,t)}}}(c,t);for(a in new Event("layerdata"),h)c.prototype[a]=h[a];var p,f=Xe.Style,y=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,i=e.prototype.queryRenderedFeatures,o=e.prototype.addLayer,a=e.prototype.removeLayer;return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,i=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=i._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var o=i._availableImages.slice(r),a=0;a<o.length;a++)i.imageManager.images[o[a]].type="custom";i.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){for(var r=void 0===(r=e.interactive)||r,n=(null!=this&&null!=(n=this[$e])&&n.layerObject||tt(this,{layerObject:{}}),this),i=["layerObject",e.id],a=n[$e],s=0;s<i.length-1;s++){var l=i[s];a[l]||(a[l]={}),a=a[l]}a[i[i.length-1]]=r,o.call(this,e,t)},removeLayer:function(e){var t=["layerObject",e];if(t.reduce((function(e,t){return e[t]}),this[$e])){for(var r=this[$e],n=0;n<t.length-1;n++)r=r[t[n]];r&&t[t.length-1]in r&&delete r[t[t.length-1]]}a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=i.call(this,e,t,r);if(0<n.length)for(var o=0;o<n.length;o++){var a=rt(this,["layerObject",n[o].layer.id]);n[o].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))}}}(f);for(p in y)f.prototype[p]=y[p];var m=(e=Xe.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=m.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(Xe&&e&&t){(Je=e).GLTFLoader=t,window.THREE=Je;var r,n=Xe.Map,i={initGLTF:function(e,t,r){return new M(e,t,r)}};for(r in i)n.prototype[r]=i[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>l,gcj02ToWgs84:()=>be,getArrayDepth:()=>m,getPositionType:()=>y,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,i=void 0===(t=e.color)?"#f00":t,o=e.custom,a=d(i,!0),s=!1;return o&&"function"==typeof o&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,l,u=this.context;return s?u=o({width:this.width,height:this.height,duration:n,color:i,context:u}):(e=performance.now()%n/n,t=r/2*.2,l=r/2*e,u.clearRect(0,0,this.width,this.height),u.beginPath(),u.arc(this.width/2,this.height/2,l,0,2*Math.PI),u.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",u.lineWidth=2,u.stroke(),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.fill(),u.beginPath(),u.arc(this.width/2,this.height/2,t,0,2*Math.PI),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.lineWidth=2+4*(1-e),u.fill()),this.data=u.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>d,isGeoJSON:()=>u,isNumber:()=>v,isValidNumber:()=>g,judgeSizeLngLat:()=>h,latFromMercatorY:()=>L,lngFromMercatorX:()=>b,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var o=0;o<n.length;o++)Array.isArray(n[o])?t.push.apply(t,n[o]):n[o]&&"object"==typeof n[o]&&t.push(n[o]);for(var a,s=0;s<t.length;s++){var l=t[s];u(l)&&(l=l.features,(a=e.features).push.apply(a,l))}return e},object2Geojson:()=>function(e,t,r){var n=l(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var i=[],o=function(e){var o=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return f(e,r);if(r=e[r[0]])return[p(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return f(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(o,t);0<a.length&&a.map((function(t){var a=y(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a))||s)&&(s={type:"Feature"},"Feature"!==a?(s.properties=o,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),i.push(s))}))},a=0;a<n.length;a++)o(a);return e.features=i,e},outOfChina:()=>ge,resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),u(e)){for(var r={type:"FeatureCollection",features:[]},n=e.features,i=0;i<n.length;i++){var a,s=n[i],l={};for(a in s)"geometry"!==a&&"properties"!==a&&"type"!==a&&(l[a]=s[a]);var p=s.geometry.coordinates,f=s.geometry.type,y={type:f,coordinates:null};y.coordinates=("Point"===f?h:c)(p,t),r.features.push(o({type:"Feature",geometry:y,properties:s.properties},l))}return r}return null},reversalLngLat:()=>c,transformGeojson:()=>function(e,t){return u(e)&&"function"==typeof t?((e=l(e)).features.forEach((function(e){var r=e.geometry;e.geometry.coordinates=x(r.coordinates,t)})),e):null},transformLngLat:()=>x,wgs84ToGcj02:()=>function(e,t){var r,n,i,o,a;return ge(e=+e,t=+t)?[e,t]:(r=de(e-105,t-35),n=ve(e-105,t-35),i=t/180*fe,o=Math.sin(i),o=1-me*o*o,a=Math.sqrt(o),r=180*r/(ye*(1-me)/(o*a)*fe),[e+(n=180*n/(ye/a*Math.cos(i)*fe)),t+r])}});var a=e(687),s=e.n(a),l=function e(t){var r,n,i="object"!=(i=typeof(r=t))?i:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===i)n=[];else{if("Object"!==i)return t;n={}}if("Array"===i)for(var o=0,a=t.length;o<a;o++)n.push(e(t[o]));else if("Object"===i)for(var s in t)n[s]=e(t[s]);return n};function u(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function c(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?v(e[0])?h(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];v(i[0])?r.push(h(i)):r.push(e(i))}return r}(e):[]}function h(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function p(e){return"string"==typeof e?JSON.parse(e):e}function f(e,t,r){var n=[],i=2===(r=void 0===r?[]:r).length;return function e(t,o){var a;t&&o.length&&(a=o.shift(),t.hasOwnProperty(a))&&(t=t[a],Array.isArray(t)?0!==o.length||i?t.forEach((function(t){i?n.push([t[r[0]],t[r[1]]]):e(t,l(o))})):t&&(a=p(t),n.push(a)):"object"==typeof t?0===o.length?n.push(i?[t[r[0]],t[r[1]]]:t):e(t,o):0===o.length&&t&&(a=p(t),n.push(a)))}(e,t),n}function y(e){if(Array.isArray(e)){var t=m(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:var r=(n=e[0])[0],n=n[n.length-1];return r[0]===n[0]&&r[1]===n[1]?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature"}return null}function m(e){return Array.isArray(e)?Array.isArray(e[0])?1+m(e[0]):1:0}function d(e,t){void 0===t&&(t=!1);var r,n,i=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i))?(r=parseInt(i[1],16),n=parseInt(i[2],16),i=parseInt(i[3],16),t?[r,n,i,1]:"rgba("+r+","+n+","+i+",1)"):e}function v(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function g(e){return isFinite(e)&&!isNaN(e)}function b(e){return 360*e-180}function L(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function x(e,t){return e&&"function"==typeof t&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?v(e[0])?t(e):function e(t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i];v(o[0])?n.push(r(o)):n.push(e(o,r))}return n}(e,t):[]}var w=["customName"],_=function(){function e(e,t,n){var a=this,l=(this._mouseEnter=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),u=null!=(u=i[0])?u:{},o=u.properties,l=u.geometry,u.source,u=u.layer,a.layerName.includes(u.id)){e.next=8;break}return null!=(u=a.popup)&&u.remove(),e.abrupt("return");case 8:if(u=l.coordinates,c=[n.lng,n.lat],"mouseenter"===a.mouseType&&(c=a._getPosition(u)),!(0<(null==(f=c)?void 0:f.length))){e.next=18;break}for(p in h={},o)if("string"==typeof o[p])try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return e.next=16,a.htmlCallBack(h,c,{lngLat:n,geometry:l,point:r,features:i,feature:i[0]});case 16:f=e.sent,a.popup.setLngLat(c).setHTML(f).addTo(a.map);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){a.popup.remove()},this.map=e,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),e=null!=(t=e.tooltipClass)?t:"commonTooltip",void 0!==(l=(t=null!=n?n:{}).customName)&&l);t=i(t,w),l=l?"":e+" ",this.className=l,null!=n&&n.className&&(l+=n.className),this.fullName=l,this.popup=new mapboxgl.Popup(o({},t,{className:l,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(t=null==n?void 0:n.closeOnClick)&&t,anchor:null!=(l=null==n?void 0:n.anchor)?l:"left",type:"tooltip"}))}var t=e.prototype;return t.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},t._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),P=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],E=function(){function e(e,t,n){var a=this,l=(this._closeOtherPopup=function(){var e;a.closeOther&&null!=(e=a.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(a.noCloseLayerName)&&0<a.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(a.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f,y,m,d,v;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(a._closeOtherPopup(),r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),c=null!=(c=i[0])?c:{},o=c.properties,l=c.geometry,c.source,c=c.layer,a.layerName.includes(c.id)){e.next=8;break}return e.abrupt("return");case 8:if(a.customClick){e.next=30;break}for(p in h={},o)if("string"==typeof o[p])try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return f=l.coordinates,y=l.type,e.next=14,null==(c=a.componentCallBack)?void 0:c.call(a,{properties:h,lngLat:n,coordinates:f,point:r,features:i,feature:i[0]});case 14:if(e.t1=u=e.sent,e.t0=null!==e.t1,!e.t0){e.next=18;break}e.t0=void 0!==u;case 18:e.t0?(e.t2=u,e.next=23):e.next=22;break;case 22:e.t2={};case 23:d=e.t2,m=d.component,d=d.instance,v=n,"Point"===y&&(v=f),a.vueInstance=d,m&&(a.popup.setOffset(a.offset),a.popup.setLngLat(v).setDOMContent(m).addTo(a.map));case 30:"function"==typeof a.callBack&&a.callBack({lngLat:n,properties:o,geometry:l,point:r});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),void 0!==(u=(t=n||{}).destroyComponent)&&u),u=void 0!==(u=t.customClick)&&u,c=void 0!==(c=t.popupClose)&&c,h=void 0===(h=t.closeOther)||h,p=void 0===(p=t.noCloseLayerName)?[]:p,f=void 0!==(f=t.customName)&&f,y=void 0===(y=t.offset)?[0,0]:y,m=t.closeClick;t=i(t,P),e=null!=(e=e.popupClass)?e:"commonPopup",f=f?"":e+" ",this.className=f,null!=n&&n.className&&(f+=n.className),this.fullName=f,this.noCloseLayerName=p,this.noCloseLayerName=[],this.customClick=u,this.popupCloseSign=c,this.closeOther=h,this.offset=y="number"==typeof y?[y,y]:y,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(o({},t,{offset:y,className:f,closeButton:null!=(e=null==t?void 0:t.closeButton)&&e,closeOnClick:null!=(n=null==t?void 0:t.closeOnClick)&&n,anchor:null!=(p=null==t?void 0:t.anchor)?p:"bottom",focusAfterOpen:null!=(u=null==t?void 0:t.focusAfterOpen)&&u,type:"popup",sourceName:this.layerName})),m&&"function"==typeof m&&(this.popup._closeClick=m),null!=(c=this.popup)&&c.on("close",(function(e){"function"==typeof a.closeCallback&&a.closeCallback(e),a.popupCloseSign&&null!=(e=a.vueInstance)&&e.popupClose&&"function"==typeof a.vueInstance.popupClose&&a.vueInstance.popupClose(),a.vueInstance&&l&&null!=(e=a.vueInstance)&&e.$destroy()})))}var t=e.prototype;return t.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},t.close=function(){var e;null!=(e=this.popup)&&e._onClose()},t.closeBack=function(e){this.closeCallback=e},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),M=function(){function e(e,t,r){var n=this,i=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(i=t.scale)?1:i),o=void 0===(o=t.height)?0:o,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,l=void 0===(l=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:l,u=void 0===(u=t.DirectionalLight)?[]:u,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=i,this.height=o,this.rotate=a,this.properties=s,this.AmbientLight=l,this.DirectionalLight=u,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,o),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:i*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,i=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,o=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,o)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=i.properties,e.scene.children[t].lngLat=i.lngLat;i.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),i=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),o=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(i),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=o.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),A=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._clearSource(),this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),t=r.beforeId||null,this.map.addLayer(o({id:e,type:"line",source:e},r.layerConfig),t),r.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-highlight")&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),k=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var i=r.sliceNum;if(!i||i<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var o=0,a=0;a<e.features.length;a+=i){var s={type:"FeatureCollection",features:[]},l=e.features.slice(a,i);s.features=[].concat(l),l=t+"-"+o,this.sourceName.push(l),this._addSourceLayer(l,s,r),o++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),t=r.beforeId||null,this.map.addLayer(o({id:e,type:this.type,source:e},r.layerConfig),t)},e}(),C={centimeters:100*(a=6371008.8),centimetres:100*a,degrees:a/111325,feet:3.28084*a,inches:39.37*a,kilometers:a/1e3,kilometres:a/1e3,meters:a,metres:a,miles:a/1609.344,millimeters:1e3*a,millimetres:1e3*a,nauticalmiles:a/1852,radians:1,yards:1.0936*a};function S(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function N(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(F(e[0])&&F(e[1]))return S({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}function T(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return S({type:"Polygon",coordinates:e},t,r)}function I(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:e},t,r)}function R(e,t){var r={type:"FeatureCollection"};return(t=void 0===t?{}:t).id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function j(e){return e%(2*Math.PI)*180/Math.PI}function O(e){return e%360*Math.PI/180}function F(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function D(e,t,r){if(null!==e)for(var n,i,o,a=0,s=e.type,l="FeatureCollection"===s,u="Feature"===s,c=l?e.features.length:1,h=0;h<c;h++)for(var p,f,y=(f=!!(p=l?e.features[h].geometry:u?e.geometry:e)&&"GeometryCollection"===p.type)?p.geometries.length:1,m=0;m<y;m++){var d=0,v=0,g=f?p.geometries[m]:p;if(null!==g){var b=g.coordinates,L=g.type,x=!r||"Polygon"!==L&&"MultiPolygon"!==L?0:1;switch(L){case null:break;case"Point":if(!1===t(b,a,h,d,v))return!1;a++,d++;break;case"LineString":case"MultiPoint":for(n=0;n<b.length;n++){if(!1===t(b[n],a,h,d,v))return!1;a++,"MultiPoint"===L&&d++}"LineString"===L&&d++;break;case"Polygon":case"MultiLineString":for(n=0;n<b.length;n++){for(i=0;i<b[n].length-x;i++){if(!1===t(b[n][i],a,h,d,v))return!1;a++}"MultiLineString"===L&&d++,"Polygon"===L&&v++}"Polygon"===L&&d++;break;case"MultiPolygon":for(n=0;n<b.length;n++){for(i=v=0;i<b[n].length;i++){for(o=0;o<b[n][i].length-x;o++){if(!1===t(b[n][i][o],a,h,d,v))return!1;a++}v++}d++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===D(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function B(e,t){for(var r,n,i,o,a,s,l,u,c,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,y=p?e.features.length:1,m=0;m<y;m++){for(a=p?e.features[m].geometry:f?e.geometry:e,l=p?e.features[m].properties:f?e.properties:{},u=p?e.features[m].bbox:f?e.bbox:void 0,c=p?e.features[m].id:f?e.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,n=0;n<o;n++)if(null===(i=s?a.geometries[n]:a)){if(!1===t(null,h,l,u,c))return}else switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,h,l,u,c))return;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===t(i.geometries[r],h,l,u,c))return;break;default:throw new Error("Unknown Geometry Type")}h++}}function G(e){var t=[1/0,1/0,-1/0,-1/0];return D(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const H=G.default=G;function U(e,t){void 0===t&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return T([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}const z=function(e){return U(H(e))};function q(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function X(e,t,r,n){void 0===n&&(n={});var i=O((e=q(e))[0]),o=(e=O(e[1]),r=O(r),t=function(e,t){var r=C[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return N([j(i+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(o))),j(o)],n.properties)}const J=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,i=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),o=[],a=0;a<n;a++)o.push(X(e,t,-360*a/n,r).geometry.coordinates);return o.push(o[0]),T([o],i)};var Y=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,i=null!=r?r:{},o=void 0===(n=i.radius)?0:n,a=void 0===(n=i.steps)?64:n,s=i.endRadius,l=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var u=e.features,c=0;c<u.length;c++){var h,p,f,y,m,d=u[c].geometry.coordinates;"number"==typeof d[0]&&"number"==typeof d[1]&&(d[0]<d[1]&&(h=[d[1],d[0]],d[0]=h[0],d[1]=h[1]),h=!1,p=0<(p=(h="string"==typeof o||h)?u[c].properties[o]:o)?p:0,f={steps:a,units:"kilometers",properties:u[c].properties},y=J(d,p,f),s?(m=!1,m=0<(m=(m="string"==typeof s||m)?u[c].properties[s]:s)?m:0,d=J(d,s,f),l.push(p===m?y:p<m?this._getRingJson(d.geometry.coordinates[0],y.geometry.coordinates[0],y.properties):this._getRingJson(y.geometry.coordinates[0],d.geometry.coordinates[0],y.properties))):l.push(y))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:l},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,r){this.lineName=e+"-line",r.lineConfig&&null!=(n=this.map)&&n.getLayer(this.lineName)&&this.map.removeLayer(this.lineName),null!=(n=this.map)&&n.getLayer(e)&&this.map.removeLayer(e),null!=(n=this.map)&&n.getSource(e)&&this.map.removeSource(e),this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig));var n=(null!=r?r:{}).beforeId;this.map.addLayer(o({id:e,type:"fill",source:e},r.layerConfig),n),r.lineConfig&&this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig),n)},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&(null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")})),this.lineName)&&this.map.getLayer(this.lineName)&&this.map.setLayoutProperty(this.lineName,"visibility",e?"visible":"none")},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-line")&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),W=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,i=function(t){var n,i;r.event.push(t),0<(null==(i=r.name)?void 0:i.length)?null!=(i=r.name)&&i.forEach((function(n){function i(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var o;r[t]=i,null!=(o=r.map)&&o.on(t,n,i)})):(r[t]=i=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,i))};for(n in e)i(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,i;r.event.includes(e)&&(i=r[e],null!=(n=r.map))&&n.off(e,t,i)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,i=r[t];null!=(n=r.map)&&n.off(t,e,i)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),V=["id","type"],Z=["id","type","beforeId"],K=function(){function e(e){this.map=e,this.sourceName=[]}var t=e.prototype;return t.draw=function(e,t){var r,n,a,s,l,c=this;return u(e)||"vector"===e.type?(r=(a=null!=(a=t.sourceConfig)?a:{}).id,n=void 0===(n=a.type)?"geojson":n,a=i(a,V),s=r,t=null!=(t=t.layerConfig)?t:{},l=[],Array.isArray(t)?l=t:"object"==typeof t&&l.push(t),l.forEach((function(e){var t;(e=e.id)&&null!=(t=c.map)&&t.getLayer(e)&&c.map.removeLayer(e)})),null!=(t=this.map)&&t.getSource(s)&&this.map.removeSource(s),"vector"===e.type?this.map.addSource(r,o({},a,e)):this.map.addSource(r,o({type:n,data:e},a)),l.forEach((function(e){var t=e.id,r=e.type,n=e.beforeId;e=i(e,Z),c.map.addLayer(o({id:t,type:r,source:s},e),n)})),this.sourceName=[s].concat(l.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},t.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),$=function(){function e(t,r,n){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var i={layer:null,tooltip:null,popup:null};return r&&"object"==typeof r&&(i=o({},i,r)),this.name=t,this.layers=i,this.prop=null!=n?n:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ee,te,re,ne,ie=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(u(e))for(var r,n=null!=(r=this.options)?r:{},i=0,a=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Q(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=a()).done;){var s,l,c=c.value;"Point"===c.geometry.type&&(s=n,t&&"function"==typeof t&&1===(null==(l=t({lngLat:c.geometry.coordinates,properties:c.properties,index:i}))?void 0:l.nodeType)&&(s=o({},s,{element:l})),l=new mapboxgl.Marker(s).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(l),this.properties.push(c.properties),i++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var r=0;r<this.markers.length;r++)!function(r){["dragstart","drag","dragend"].forEach((function(n){e[n]&&"function"==typeof e[n]&&t.markers[r].on(n,(function(i){e[n](o({},i,{properties:t.properties[r]}))}))}))}(r)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),oe=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),ae=(a={},function(){function e(e,t){this.width=void 0,this.height=void 0,this.data=void 0;var r=this,n=e.width;if(e=e.height,t){if(t instanceof Uint8ClampedArray)t=new Uint8Array(t.buffer);else if(t.length!==n*e*4)throw new RangeError("mismatched image size")}else t=new Uint8Array(n*e*4);r.width=n,r.height=e,r.data=t}var t=e.prototype;return t.resize=function(t){var r,n,i;r=this,n=(t=new e(t)).width,i=t.height,n===r.width&&i===r.height||(se(r,t,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,n),height:Math.min(r.height,i)},4),r.width=n,r.height=i,r.data=t.data)},t.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},t.clone=function(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))},e.copy=function(e,t,r,n,i){se(e,t,r,n,i,4)},e}());function se(e,t,r,n,i,o){if(0!==i.width&&0!==i.height){if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var a=e.data,s=t.data;if(a===s)throw new RangeError("image is the same");for(var l=0;l<i.height;l++)for(var u=((r.y+l)*e.width+r.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<i.width*o;h++)s[c+h]=a[u+h]}}function le(){return(le=r(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=0),e.next=3,new Promise((function(e){var n=new Image;n.src=t,n.crossOrigin="Anonymous",n.onload=function(){var t=n.width,i=n.height,o=(ee=ee||window.document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");(t>ee.width||i>ee.height)&&(ee.width=t,ee.height=i),o.clearRect(-r,-r,t+2*r,i+2*r),o.drawImage(n,0,0,t,i),e(o.getImageData(-r,-r,t+2*r,i+2*r))}}));case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}te=ae,void 0===ne&&(ne={}),(re="RGBAImage")?a[re]?console.error(re+" is already registered."):(Object.defineProperty(te,"_classRegistryKey",{value:re,writeable:!1}),a[re]={klass:te,omit:ne.omit||[]}):console.error("Can't register a class without a name.");var ce=function(){function e(e,t){this.map=e,this.options=null!=t?t:{key:"id"},this.markers={},this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t){var r=this,n={};this.mapEvent=function(){if(r.map.getSource(e)&&r.map.isSourceLoaded(e)){for(var i,a={},s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?ue(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.map.querySourceFeatures(e));!(h=s()).done;){var l,u,c,h,p=(h=h.value).geometry.coordinates;(h=h.properties).cluster||(l=h[r.options.key],(c=r.markers[l])?(u=c.getLngLat().toArray())[0]===p[0]&&u[1]===p[1]||c.setLngLat(p):(u=null,u="function"==typeof t?t({properties:h,lngLat:p}):document.createElement("div"),c=r.markers[l]=new mapboxgl.Marker(o({},r.options,{element:u})).setLngLat(p)),a[l]=c,n[l])||c.addTo(r.map)}for(i in n)a[i]||n[i].remove();n=a}},this.map.on("render",this.mapEvent)},t.destroy=function(){for(var e in this.markers)null!=(e=this.markers[e])&&e.remove();this.markers={},this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){if("boolean"==typeof e)for(var t in this.markers)this.markers[t]&&this.markers.hasOwnProperty(t)&&(this.markers[t].getElement().style.display=e?"block":"none")},e}(),he=["once"],pe=function(){function e(e,t,r){this.map=e,this.options=null!=r?r:{},this.sourceName=t,r=void 0===(t=(e=(this.mapEvent=null)!=r?r:{}).once)||t,t=i(e,he),this.once=r,this.other=t}var t=e.prototype;return t.open=function(e){var t=this;this.sourceName&&(this.mapEvent=function(){var r;t.map.getSource(t.sourceName)&&t.map.isSourceLoaded(t.sourceName)&&"function"==typeof e&&(r=t.map.querySourceFeatures(t.sourceName,t.other),e(r),t.once)&&t.destroy()},this.map.on("render",this.mapEvent))},t.destroy=function(){var e;null!=(e=this.map)&&e.off("render",this.mapEvent),this.mapEvent=null},e}(),fe=Math.PI,ye=6378245,me=.006693421622965943;function de(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*fe)+20*Math.sin(2*e*fe))/3)+2*(20*Math.sin(t*fe)+40*Math.sin(t/3*fe))/3+2*(160*Math.sin(t/12*fe)+320*Math.sin(t*fe/30))/3}function ve(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*fe)+20*Math.sin(2*e*fe))/3)+2*(20*Math.sin(e*fe)+40*Math.sin(e/3*fe))/3+2*(150*Math.sin(e/12*fe)+300*Math.sin(e/30*fe))/3}function ge(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}function be(e,t){var r,n,i,o,a;return ge(e,t)?[e,t]:(o=de(e-105,t-35),a=ve(e-105,t-35),r=t/180*fe,n=Math.sin(r),n=1-me*n*n,i=Math.sqrt(n),o=180*o/(ye*(1-me)/(n*i)*fe),[2*e-(e+(a=180*a/(ye/i*Math.cos(r)*fe))),2*t-(t+o)])}function Le(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=q(e),i=(e="Feature"===(e=t).type?e.geometry:e).type,o=(t=t.bbox,e.coordinates);if(t&&0==(e=n,t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]))return!1;"Polygon"===i&&(o=[o]);for(var a=!1,s=0;s<o.length&&!a;s++)if(xe(n,o[s][0],r.ignoreBoundary)){for(var l=!1,u=1;u<o[s].length&&!l;)xe(n,o[s][u],!r.ignoreBoundary)&&(l=!0),u++;l||(a=!0)}return a}function xe(e,t,r){for(var n=!1,i=0,o=(t=t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]?t.slice(0,t.length-1):t).length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],l=t[o][0],u=t[o][1];if(e[1]*(a-l)+s*(l-e[0])+u*(e[0]-a)==0&&(a-e[0])*(l-e[0])<=0&&(s-e[1])*(u-e[1])<=0)return!r;s>e[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(n=!n)}return n}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var _e=function(){function e(e,t){this.map=e,this.options=null!=t?t:{}}var t=e.prototype;return t.draw=function(e,t,r){var n;e&&t&&u(e)&&r&&(this.id=r,n=z(e).bbox,this.destroy(),this.map.addLayer(function(e,t,r){function n(e){if("FeatureCollection"===y.type){for(var t=0;t<y.features.length;t++)if(Le(e,y.features[t]))return!0;return!1}if("Feature"===y.type)return Le(e,y.geometry)}var i,o=r.bbox,a=r.isGCJ,s=r.replaceUrl,l=null!=(i=r.isJudgement)&&i,u=r.judgementBox,c=r.judgementPoint,h=null!=(i=r.maxZoom)?i:18,p=null!=(i=r.minZoom)?i:0,f=null!=(i=r.expand)?i:0,y=null!=(i=r.json)?i:{},m=document.createElement("canvas");return{id:e,type:"custom",onAdd:function(e,t){var r=this,n=(this.map=e,this.tileCache={},this.gridCache={},this.showTiles=[],e=t.createShader(t.VERTEX_SHADER),t.shaderSource(e,"\nuniform mat4 u_matrix;\nattribute vec3 a_pos;\nattribute vec2 a_uv;\nvarying vec2 v_uv;\nvoid main() {\n v_uv = a_uv;\n gl_Position = u_matrix * vec4(a_pos, 1.0);\n}"),t.compileShader(e),t.createShader(t.FRAGMENT_SHADER));t.shaderSource(n,"\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D u_sampler;\nvoid main() {\n gl_FragColor = texture2D(u_sampler, v_uv);\n}"),t.compileShader(n),this.program=t.createProgram(),t.attachShader(this.program,e),t.attachShader(this.program,n),t.linkProgram(this.program),this.map.on("move",(function(e){r.updateLayer(t)})),this.updateLayer(t)},updateLayer:function(e){var t=this;if(!(this.map.getZoom()<p||this.map.getZoom()>h)){for(var r=parseInt(this.map.getZoom()+1.4),n=[(n=this.map.getBounds().toArray())[0][0],n[0][1],n[1][0],n[1][1]],i=Math.min(n[2],o[2]),a=Math.min(n[3],o[3]),s=Math.max(n[0],o[0]),l=(n=Math.max(n[1],o[1]),s=this.map.getTileByPosition([s,n],r),n=this.map.getTileByPosition([i,a],r),i=s[0]-f,n[0]+f),u=n[1]-f,c=s[1]+f,y=[],m=i;m<=l;m++)for(var d=u;d<=c;d++){var v={x:m,y:d,z:r};y.push(v),this.addGridCache(v,0,0),m===l&&this.addGridCache(v,1,0),d===c&&this.addGridCache(v,0,1),m===l&&d===c&&this.addGridCache(v,1,1)}a=this.map.getCenter();var g=this.map.getTileByPosition([a.lng,a.lat],r);y.sort((function(e,r){return t.tileDistance(e,g)-t.tileDistance(r,g)})),this.showTiles=[];for(var b=0,L=y;b<L.length;b++){var x,w=L[b];this.tileCache[this.createTileKey(w)]?this.showTiles.push(this.tileCache[this.createTileKey(w)]):(x=this.createTile(e,w),this.showTiles.push(x),this.tileCache[this.createTileKey(w)]=x)}}},tileDistance:function(e,t){return Math.sqrt(Math.pow(e.x-t[0],2)+Math.pow(e.y-t[1],2))},addGridCache:function(e,t,r){var n,i=this.createTileKey(e.x+t,e.y+r,e.z);this.gridCache[i]||(r=(t=this.map.getPositionByTile([e.x+t,e.y+r,e.z]))[0],e=t[1],n=t[2],t=t[3],void 0!==e&&void 0!==t&&void 0!==n&&void 0!==r&&(a?(e=be(r,t),this.gridCache[i]={lng:e[0],lat:e[1]}):this.gridCache[i]={lng:r,lat:t}))},createTileKey:function(e,t,r){return e instanceof Object?e.z+"/"+e.x+"/"+e.y:r+"/"+e+"/"+t},createTile:function(e,r){var i,o,a,u,h,p,f,y,d=this,v=s&&"function"==typeof s?s(t,r):t.replace("{z}",r.z).replace("{x}",r.x).replace("{y}",r.y),g={xyz:r},b=this.gridCache[this.createTileKey(r)],L=this.gridCache[this.createTileKey(r.x+1,r.y,r.z)],x=this.gridCache[this.createTileKey(r.x,r.y+1,r.z)];return r=this.gridCache[this.createTileKey(r.x+1,r.y+1,r.z)],x&&L&&x&&r&&(x=mapboxgl.MercatorCoordinate.fromLngLat(x),i=mapboxgl.MercatorCoordinate.fromLngLat(r),L=mapboxgl.MercatorCoordinate.fromLngLat(L),o=mapboxgl.MercatorCoordinate.fromLngLat(b),a=b.lat,u=b.lng,b=r.lat,r=r.lng,h=(r-u)/256,p=(a-b)/256,f=this.getAllIn(u,b,r,a),b=new Float32Array([x.x,x.y,x.z,0,0,i.x,i.y,i.z,1,0,L.x,L.y,L.z,1,1,x.x,x.y,x.z,0,0,L.x,L.y,L.z,1,1,o.x,o.y,o.z,0,1]),g.aPos=e.getAttribLocation(this.program,"a_pos"),g.aUv=e.getAttribLocation(this.program,"a_uv"),g.uSamplerLoc=e.getUniformLocation(this.program,"u_sampler"),g.texture=e.createTexture(),(y=new Image).src=v,y.crossOrigin="anonymous",y.onload=function(){m.width=y.width,m.height=y.height;var t=m.getContext("2d");if(t.drawImage(y,0,0),l&&!f){for(var r=t.getImageData(0,0,m.width,m.height),i=r.data.length,o=0;o<i;o+=4){var s=(v=Math.floor(o/4))%256,v=Math.floor(v/256),b=n([s=u+s*h,v=a-v*p]);c&&"function"==typeof c&&(b=null==(s=c(s,v))||s),r.data[o+3]=b?255:0}t.putImageData(r,0,0)}e.bindTexture(e.TEXTURE_2D,g.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,m),g.isLoad=!0,d.map.triggerRepaint()},g.buffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,g.buffer),e.bufferData(e.ARRAY_BUFFER,b,e.STATIC_DRAW)),g},getAllIn:function(e,t,r,i){var o;return u&&"function"==typeof u?null==(o=u(e,t,r,i))||o:[[e,i],[e,t],[r,t],[r,i],[(e+r)/2,i],[r,(t+i)/2],[(e+r)/2,t],[e,(t+i)/2],[(e+r)/2,(t+i)/2]].every(n)},render:function(e,t){e.useProgram(this.program),e.uniformMatrix4fv(e.getUniformLocation(this.program,"u_matrix"),!1,t);for(var r=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?we(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?we(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.showTiles);!(n=r()).done;){var n=n.value;n.isLoad&&(e.bindTexture(e.TEXTURE_2D,n.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(n.aPos),e.enableVertexAttribArray(n.aUv),e.vertexAttribPointer(n.aPos,3,e.FLOAT,!1,20,0),e.vertexAttribPointer(n.aUv,2,e.FLOAT,!1,20,12),e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.drawArrays(e.TRIANGLES,0,6))}}}}(r,t,o({},this.options,{bbox:n,isGCJ:null!=(r=this.options.isGCJ)&&r,json:e}))))},t.destroy=function(){this.map.getLayer(this.id)&&this.map.removeLayer(this.id),this.map.getSource(this.id)&&this.map.removeSource(this.id)},e}();function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e){return e=function(e,t){if("object"!==Pe(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!==Pe(r=r.call(e,"string")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===Pe(e)?e:String(e)}function Me(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ee(n.key),n)}}function Ae(e,t,r){t&&Me(e.prototype,t),r&&Me(e,r),Object.defineProperty(e,"prototype",{writable:!1})}var ke=function(){function e(e,t){this.map=e,this._contextMenu=null,this._moveMenu=null,this._context=null,t=(e=(this._position=null)!=t?t:{}).move,e=void 0===(e=e.className)?"mapMenu":e,this._move=void 0!==t&&t,this._className=e}var t=e.prototype;return t.init=function(e,t){var r,n=this;this.map&&!this._context&&((r=document.createElement("div")).className=this._className,r.style.display="none",r.style.position="absolute",this.map.getCanvas().offsetParent.appendChild(r),e instanceof Element?r.appendChild(e):"string"==typeof e&&(r.innerHTML=e),this._context=r,this._contextMenu=function(e){var r;n._position=e.lngLat,t&&"function"==typeof t?(r=n.map.queryRenderedFeatures(e.point),"boolean"==typeof(r=void 0===(r=(null!=(r=t(o({},e,{features:r})))?r:{}).show)||r)&&(n.visible(r),n.updateXY(e.point))):(n.visible(!0),n.updateXY(e.point))},this.map.on("contextmenu",this._contextMenu),this._move)&&(this._moveMenu=function(e){var t;n._context&&"none"!==n._context.style.display&&n._position&&(t=n.map.project([n._position.lng,n._position.lat]),n.updateXY(t))},this.map.on("move",this._moveMenu),window.addEventListener("resize",this._moveMenu))},t.visible=function(e){this._context&&(this._context.style.display=e?"block":"none")},t.updateXY=function(e){var t,r,n,i,o;this._context&&e&&(t=isNaN(Number(e.x))?0:Number(e.x),e=isNaN(Number(e.y))?0:Number(e.y),this._move||(r=(n=this._context).offsetWidth,n=n.offsetHeight,(o=(i=this.map.getCanvas()).offsetWidth)<t+r&&(t=o-r),(o=i.offsetHeight)<e+n&&(e=o-n)),this._context.style.top=e+"px",this._context.style.left=t+"px")},t.destroy=function(){this.map&&(this.map.off("contextmenu",this._contextMenu),this._contextMenu=null,this._context&&(this._context.remove(),this._context=null),this._move)&&(this.map.off("move",this._moveMenu),window.removeEventListener("resize",this._moveMenu),this._moveMenu=null)},Ae(e,[{key:"show",get:function(){var e;return null!=(e=this._context&&"none"!==this._context.style.display)&&e}}]),e}();const Ce=function(e,t,r){void 0===r&&(r={}),e=q(e);var n=O((t=q(t))[1]-e[1]),i=O(t[0]-e[0]);return e=O(e[1]),t=O(t[1]),n=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(i/2),2)*Math.cos(e)*Math.cos(t),function(e,t){var r=C[t=void 0===t?"kilometers":t];if(r)return e*r;throw new Error(t+" units is invalid")}(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)),r.units)};function Se(e,t){return void 0===t&&(t={}),function(e,t,r){var n,i=r,o=!1;return n=function(e,n,a,s,l){i=!1===o&&void 0===r?e:t(i,e,n,a,s,l),o=!0},function(e,t){B(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(S(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(S({type:a,coordinates:u},n),r,l))return!1}}))}(e,(function(e,t,r){var i=0;if(e.geometry){var o,a,s,l,u=e.geometry.type;if("Point"!==u&&"MultiPoint"!==u)return l=s=a=0,!1!==D(e,(function(u,c,h,p,f){if(void 0===o||a<t||s<p||l<f)o=u,a=t,s=p,l=f,i=0;else{if(p=I([o,u],e.properties),!1===n(p,t,r,f,i))return!1;i++,o=u}}))&&void 0}})),i}(e,(function(e,r){return r=r.geometry.coordinates,e+Ce(r[0],r[1],t)}),0)}function Ne(e,t,r){var n,i;return!0===(r=void 0===r?{}:r).final?(Ne(t,e)+180)%360:(r=q(e),e=q(t),t=O(r[0]),n=O(e[0]),r=O(r[1]),e=O(e[1]),i=Math.sin(n-t)*Math.cos(e),r=Math.cos(r)*Math.sin(e)-Math.sin(r)*Math.cos(e)*Math.cos(n-t),j(Math.atan2(i,r)))}const Te=function(e,t){return X(e,Ce(e,t)/2,Ne(e,t))};var Ie=6378137;function Re(e){var t=0;if(e&&0<e.length){t+=Math.abs(je(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(je(e[r]))}return t}function je(e){var t,r,n,i,o,a,s=0,l=e.length;if(2<l){for(a=0;a<l;a++)o=a===l-2?(n=l-2,i=l-1,0):a===l-1?(n=l-1,i=0,1):(i=(n=a)+1,a+2),t=e[n],r=e[i],s+=(Oe(e[o][0])-Oe(t[0]))*Math.sin(Oe(r[1]));s=s*Ie*Ie/2}return s}function Oe(e){return e*Math.PI/180}const Fe=function(e,t){void 0===t&&(t={});var r=0,n=0,i=0;return D(e,(function(e){r+=e[0],n+=e[1],i++}),!0),N([r/i,n/i],t.properties)};function De(e){return(e%=360)<0&&(e+=360),e}function Be(e){return(e%=360)<0&&(e+=360),e}const Ge=function(e,t,r,n,i){if(!(s=i=i||{})||s.constructor!==Object)throw new Error("options is invalid");var o,a,s=i.properties;if(!e)throw new Error("center is required");if(null==r)throw new Error("bearing1 is required");if(null==n)throw new Error("bearing2 is required");if(!t)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");return Be(r)===Be(n)?J(e,t,i):(o=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),e=function(e,t,r,n,i){var o=(i=void 0===i?{}:i).steps||64,a=(r=De(r),n=De(n),Array.isArray(e)||"Feature"!==e.type?{}:e.properties);if(r===n)return I(J(e,t,i).geometry.coordinates[0],a);for(var s=r,l=r<n?n:n+360,u=s,c=[],h=0;u<l;)c.push(X(e,t,u,i).geometry.coordinates),u=s+360*++h/o;return l<u&&c.push(X(e,t,l,i).geometry.coordinates),I(c,a)}(e,t,r,n,i),a=[[o]],D(e,(function(e){a[0].push(e)})),a[0].push(o),T(a,s))};var He="zh_measure_",Ue=function(){function e(e,t,r){var n=this,i=(this._click=function(e){var t,r=e.originalEvent.target.ariaLabel;n.isOpen&&"measure"!==r&&(n.isDraw||(n.isDraw=!0,n.positions.push(n.currentPosition),n.texts.push(n.currentText)),t=e.lngLat.toArray(),r=function(){n.currentPosition.push(t),n._drawPoint(),n._drawLine(),n._measureDistance(t)},0<n.currentPosition.length?"line"===n.type||"polygon"===n.type?(e=n.currentPosition[n.currentPosition.length-1],t[0]!==e[0]||t[1]!==e[1]?r():"polygon"===n.type?2<n.currentPosition.length?(n._createTextRemove(n.index),e=[].concat(n.currentPosition,[n.currentPosition[0]]),n._updateLine(e,n.index),e=Fe(T([e])),n._measureArea(e.geometry.coordinates),n._callback()):1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._callback()):(n._createTextRemove(n.index),1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index)),n._callback())):"sector"===n.type&&(e=n.currentPosition[n.currentPosition.length-1],t[0]===e[0]&&t[1]===e[1]||1!==n.currentPosition.length||r()):r())},this._move=function(e){n.isOpen&&n.isDraw&&0<n.currentPosition.length&&(e=e.lngLat.toArray(),"line"===n.type?n._drawMoveLine(e):"circle"===n.type?(n._drawCircle(e),n._drawMoveLine(e)):"polygon"===n.type?(1<n.currentPosition.length&&n._drawPolygon(e),n._drawMoveLine(e)):"rect"===n.type?(n._drawRect(e),n._drawMoveLine(e)):"sector"===n.type&&(1<n.currentPosition.length?n._drawSector(e):n._drawMoveLine(e)))},this._dblclick=function(e){if(n.isOpen&&n.isDraw&&("circle"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeCircle(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawCircle(t,!1),n._drawLine(),r=Te(N(t),N(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),!("polygon"===n.type&&0<n.currentPosition.length&&n.currentPosition.length<3))){if("rect"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeRect(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawRect(t,!1),r=Te(N(t),N(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),"sector"===n.type){var t=e.lngLat.toArray(),r=n.currentPosition[n.currentPosition.length-1];if(2!==n.currentPosition.length||t[0]===r[0]&&t[1]===r[1]){if(1!==n.currentPosition.length)return;n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeSector(n.index)}else n._drawSector(t,!1),e=Fe(n.map.getSource(n.moveSectorName)._data),n._measureArea(e.geometry.coordinates),n._createTextRemove(n.index),n._callback()}null!=(r=n.moveLineLayers[n.index])&&r.destroy(),n.moveLineLayers.splice(n.index,1),n.isDraw=!1,n.currentPosition=[],n.currentText=[],n.index++}},this.map=e,e=null!=(e=(t=null!=(e=t)?e:{}).point)?e:{},this.fixed=null!=(a=t.fixed)?a:2,this.dash=null==(a=t.dash)||a,this.type=null!=(a=t.type)?a:"line",["line","circle","polygon","rect","sector"].includes(this.type)||(this.type="line"),this.units={line:["km","m"],circle:["km²","m²"],polygon:["km²","m²"],rect:["km²","m²"],sector:["km²","m²"]},t.units);if(i)for(var o in this.units)i[o]&&Array.isArray(i[o])&&i[o].all((function(e){return"string"==typeof e}))&&(this.units[o][0]=i[o][0],this.units[o][1]=i[o][1]);this.className=null!=(a=t.className)?a:"",this.pointProps={color:null!=(a=e.color)?a:"rgb(255,255,255)",radius:null!=(a=e.radius)?a:4,strokeWidth:null!=(a=e.strokeWidth)?a:2,strokeColor:null!=(a=e.strokeColor)?a:"#00ccff"};var a=null!=(e=t.line)?e:{};this.lineProps={color:null!=(e=a.color)?e:"#00ccff",width:null!=(e=a.width)?e:2,dasharray:null!=(e=a.dasharray)?e:[5,5]},e=null!=(a=t.fill)?a:{},this.fillProps={color:null!=(t=e.color)?t:"rgba(0,230,255,0.1)"},this._custom=r,this.isOpen=!1,this._init()}var t=e.prototype;return t._init=function(){var e;this.positions=[],this.currentPosition=[],this.index=null!=(e=null==(e=this.map[this._custom])||null==(e=e.measure)?void 0:e[this.type])?e:0,this.isDraw=!1,this.pointLayers=[],this.lineLayers=[],this.moveLineLayers=[],this.moveCircleLayers=[],this.movePolygonLayers=[],this.moveRectLayers=[],this.moveSectorLayers=[],this.texts=[],this.currentText=[]},t.draw=function(e){e&&"function"==typeof e&&(this.callback=e),this.isOpen||(this.isOpen=!0,this.map.on("click",this._click),this.map.on("mousemove",this._move),this.map.on("dblclick",this._dblclick))},t._callback=function(){this.callback&&"function"==typeof this.callback&&this.callback()},t._drawPoint=function(){var e,t=this,r=R(this.currentPosition.map((function(e,r){return N(e,{pointIndex:r,lineIndex:t.index})})));this.pointLayer?this.map.getSource(this.pointName).setData(r):((e=this.map.MapCustom()).draw(r,this.pointName,{layerConfig:{type:"circle",paint:{"circle-color":this.pointProps.color,"circle-radius":this.pointProps.radius,"circle-stroke-width":this.pointProps.strokeWidth,"circle-stroke-color":this.pointProps.strokeColor}}}),this.pointLayers.push(e))},t._drawLine=function(){var e,t=R([I(1<this.currentPosition.length?this.currentPosition:[this.currentPosition[0],this.currentPosition[0]],{lineIndex:this.index})]);this.lineLayer?(this.map.getSource(this.lineName).setData(t),this.map.moveLayer(this.lineName,this.pointName)):((e=this.map.MapLine()).draw(t,this.lineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width}},beforeId:this.pointName}),this.lineLayers.push(e))},t._drawMoveLine=function(e){var t=R([I([this.currentPosition[this.currentPosition.length-1],e],{lineIndex:this.index})]);"polygon"===this.type&&1<this.currentPosition.length&&(t=R([I([this.currentPosition[0],e,this.currentPosition[this.currentPosition.length-1]],{lineIndex:this.index})])),this.moveLineLayer?this.map.getSource(this.moveLineName).setData(t):((e=this.map.MapLine()).draw(t,this.moveLineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveLineLayers.push(e))},t._drawCircle=function(e,t){void 0===t&&(t=!0);var r,n=this.currentPosition[0],i=R([N(n,{circleIndex:this.index})]);e=Se(R([I([n,e],{circleIndex:this.index})]),{units:"kilometers"}),this.moveCircleLayer?(r={steps:64,units:"kilometers",properties:{circleIndex:this.index}},n=R([J(n,e,r)]),this.map.getSource(this.moveCircleName).setData(n),t||this.map.setPaintProperty(this.moveCircleLayer.lineName,"line-dasharray",[])):((r=this.map.MapCircle()).draw(i,this.moveCircleName,{endRadius:e,layerConfig:{paint:{"fill-color":this.fillProps.color}},lineConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveCircleLayers.push(r))},t._drawPolygon=function(e){var t;e=R([T([[].concat(this.currentPosition,[e,this.currentPosition[0]])],{polygonIndex:this.index})]),this.movePolygonLayer?this.map.getSource(this.movePolygonName).setData(e):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.movePolygonName,type:"geojson",data:e},layerConfig:[{id:this.movePolygonName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.moveLineName}]}),this.movePolygonLayers.push(t))},t._drawRect=function(e,t){void 0===t&&(t=!0),e=R([U(H(I([this.currentPosition[0],e])),{properties:{rectIndex:this.index}})]),this.moveRectLayer?(this.map.getSource(this.moveRectName).setData(e),t||this.map.setPaintProperty(this.moveRectName+"-line","line-dasharray",[])):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.moveRectName,type:"geojson",data:e},layerConfig:[{id:this.moveRectName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveRectName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveRectLayers.push(t))},t._drawSector=function(e,t){void 0===t&&(t=!0);var r=Se(I(this.currentPosition,{units:"kilometers"})),n=Ne(this.currentPosition[0],this.currentPosition[1]);e=Ne(this.currentPosition[0],e),r=R([Ge(this.currentPosition[0],r,n,e,{units:"kilometers",properties:{sectorIndex:this.index}})]),this.moveSectorLayer?(this.map.getSource(this.moveSectorName).setData(r),t||this.map.setPaintProperty(this.moveSectorName+"-line","line-dasharray",[])):((n=this.map.MapMoreCustom()).draw(r,{sourceConfig:{id:this.moveSectorName,type:"geojson",data:r},layerConfig:[{id:this.moveSectorName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveSectorName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveSectorLayers.push(n))},t._removeRect=function(e){var t=this.moveRectLayers[e];t&&(t.destroy(),this.moveRectLayers[e]=null)},t._removeSector=function(e){var t=this.moveSectorLayers[e];t&&(t.destroy(),this.moveSectorLayers[e]=null)},t._createText=function(e,t,r){var n,i=this,o=(void 0===e&&(e="起点"),void 0===r&&(r=!0),document.createElement("div"));return((o.style.background="#ffffff",o.style.cursor="default",o.style.padding="0 5px",o.style.borderRadius="3px",o.style.display="flex",o.style.alignItems="center",o.className=this.className?this.className+" measure-box":"measure-box",o.ariaLabel="measure",n=document.createElement("span")).className="measure-text",n.innerHTML=e,n.ariaLabel="measure",o.appendChild(n),r&&((e=document.createElement("span")).className="measure-close",e.style.paddingLeft="5px",e.innerHTML="x",e.ariaLabel="measure",e.addEventListener("click",(function(e){i.isDraw||(e=e.target.parentNode._marker)&&i._removeGroup(e)})),o.appendChild(e)),n=new mapboxgl.Marker({element:o,offset:[10,0],anchor:"left"})).pointIndex=t,n.lineIndex=this.index,n.showBtn=r,this.currentText.push(n),o._marker=n},t._createTextRemove=function(e){for(var t=this,r=document.createElement("div"),n=(r.className="measure-remove",r.style.width="15px",r.style.height="14px",r.style.marginLeft="5px",r.ariaLabel="measure",r.style.backgroundImage='url(\'data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M10,3.4 c-0.8,0-1.5,0.5-1.8,1.2H5l-1,1v1h12v-1l-1-1h-3.2C11.5,3.9,10.8,3.4,10,3.4z M5,8v7c0,1,1,2,2,2h6c1,0,2-1,2-2V8h-2v5.5h-1.5V8h-3 v5.5H7V8H5z"/>%3C/svg>\')',r.style.backgroundSize="100% 100%",r.addEventListener("click",(function(e){t.isDraw||(e=e.target.parentNode._marker)&&t._removeGroupLine(e)})),this.texts[e]),i=null,o=n.length-1;0<=o;o--)if(n[o].showBtn){i=o;break}(null!==i?n[i]:n[n.length-1]).getElement().appendChild(r)},t._measureDistance=function(e){var t,r="起点";1<this.currentPosition.length&&(t=R([I(this.currentPosition,{lineIndex:this.index})]),r=this._calcLength(t)),this._createText(r,this.currentPosition.length-1,"circle"!==this.type&&"rect"!==this.type&&"sector"!==this.type).setLngLat(e).addTo(this.map)},t._measureArea=function(e){var t,r,n;["circle","polygon","rect","sector"].includes(this.type)&&(r=null,"circle"===this.type?(n=Se(R([I(this.currentPosition)]),{units:"kilometers"}),t={steps:64,units:"kilometers",properties:{circleIndex:this.index}},r=J(this.currentPosition[0],n,t)):"polygon"===this.type?r=T([[].concat(this.currentPosition,[this.currentPosition[0]])]):"rect"===this.type?r=U(H(I(this.currentPosition)),{properties:{rectIndex:this.index}}):"sector"===this.type&&(r=this.map.getSource(this.moveSectorName)._data.features[0]),null!==r)&&(n=this._calcArea(r),this._createText(n,this.currentPosition.length,!1).setLngLat(e).addTo(this.map))},t._calcLength=function(e){return 1e3<(e=Se(e,{units:"meters"}))?(e/1e3).toFixed(this.fixed)+this.units.line[0]:e.toFixed(0)+this.units.line[1]},t._calcArea=function(e){return e=function(e){return t=function(e,t){return e+function(e){var t,r=0;switch(e.type){case"Polygon":return Re(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)r+=Re(e.coordinates[t]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},r=0,B(e,(function(e,n,i,o,a){r=t(r,e)})),r;var t,r}(e),1e6<e?(e/1e6).toFixed(this.fixed)+this.units[this.type][0]:e.toFixed(0)+this.units[this.type][1]},t._removeGroup=function(e){var t,r,n,i=e.lineIndex,o=e.pointIndex;e.remove(),this.texts[i].splice(o,1),this.positions[i].splice(o,1),e=this.positions[i],this._updateLine(e,i),this._updatePoint(e,i),this._updateText(e,i),"polygon"===this.type?(this._updatePolygon(e,i),n=[].concat(e,[e[0]]),this._updateLine(n,i),e.length<3?(this._removeMarker(i),this._removePoint(i),this._removeLine(i)):e.length===o&&this._createTextRemove(i),2<e.length&&(n=T([n]),t=Fe(n),0<(r=this.texts[i]).length)&&(r=r[r.length-1],n=this._calcArea(n),this._updateMarkerText(r,n),r.setLngLat(t.geometry.coordinates).addTo(this.map))):"line"===this.type&&(e.length<2?this._removeMarker(i):e.length===o&&this._createTextRemove(i))},t._removeGroupLine=function(e){e=e.lineIndex,this._removeMarker(e),this._removePoint(e),this._removeLine(e),"circle"===this.type?this._removeCircle(e):"polygon"===this.type?this._removePolygon(e):"rect"===this.type?this._removeRect(e):"sector"===this.type&&this._removeSector(e)},t._removeMarker=function(e){this.texts[e].forEach((function(e){e.remove()})),this.texts[e]=[]},t._updateLine=function(e,t){var r=He+"_"+this.type+"_"+t+"_line";e.length<2?this._removeLine(t):(e=R([I(e,{lineIndex:t})]),this.map.getSource(r).setData(e))},t._updatePolygon=function(e,t){var r=He+"_"+this.type+"_"+t+"_polygon_move";e.length<3?this._removePolygon(t):(t=R([T([[].concat(e,[e[0]])])]),this.map.getSource(r).setData(t))},t._removePolygon=function(e){var t=this.movePolygonLayers[e];t&&(t.destroy(),this.movePolygonLayers[e]=null)},t._removeLine=function(e){var t=this.lineLayers[e];t&&(t.destroy(),this.lineLayers[e]=null),this.currentPosition=[]},t._removeCircle=function(e){var t=this.moveCircleLayers[e];t&&(t.destroy(),this.moveCircleLayers[e]=null)},t._updatePoint=function(e,t){var r=He+"_"+this.type+"_"+t+"_point";e.length<2?this._removePoint(t):(e=R(e.map((function(e,r){return N(e,{pointIndex:r,lineIndex:t})}))),this.map.getSource(r).setData(e))},t._removePoint=function(e){var t=this.pointLayers[e];t&&(t.destroy(),this.pointLayers[e]=null)},t._updateText=function(e,t){var r=this,n=this.texts[t];e.forEach((function(t,i){var o,a="起点";0!==i&&(o=R([I(e.slice(0,i+1))]),a=r._calcLength(o)),n[i]&&(n[i].pointIndex=i,r._updateMarkerText(n[i],a))}))},t._updateMarkerText=function(e,t){e.getElement().childNodes[0].innerHTML=t},t.off=function(){this.isDraw||(this.map.off("click",this._click),this.map.off("mousemove",this._move),this.map.off("dblclick",this._dblclick))},t.remove=function(){this.isDraw||(this.pointLayers.forEach((function(e){null!=e&&e.destroy()})),this.lineLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveLineLayers.forEach((function(e){null!=e&&e.destroy()})),this.texts.forEach((function(e){null!=e&&e.forEach((function(e){e.remove()}))})),this.moveCircleLayers.forEach((function(e){null!=e&&e.destroy()})),this.movePolygonLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveRectLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveSectorLayers.forEach((function(e){null!=e&&e.destroy()})),this._init())},t.visible=function(e){"boolean"!=typeof e||this.isDraw||(this.pointLayers.forEach((function(t){null!=t&&t.visible(e)})),this.lineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveLineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.texts.forEach((function(t){null!=t&&t.forEach((function(t){t.getElement().style.display=e?"flex":"none"}))})),this.moveCircleLayers.forEach((function(t){null!=t&&t.visible(e)})),this.movePolygonLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveRectLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveSectorLayers.forEach((function(t){null!=t&&t.visible(e)})))},t.destroy=function(){this.isOpen=!1,this.isDraw=!1,this.remove(),this.off()},Ae(e,[{key:"pointName",get:function(){return He+"_"+this.type+"_"+this.index+"_point"}},{key:"lineName",get:function(){return He+"_"+this.type+"_"+this.index+"_line"}},{key:"moveLineName",get:function(){return He+"_"+this.type+"_"+this.index+"_line_move"}},{key:"moveCircleName",get:function(){return He+"_"+this.type+"_"+this.index+"_circle_move"}},{key:"movePolygonName",get:function(){return He+"_"+this.type+"_"+this.index+"_polygon_move"}},{key:"moveRectName",get:function(){return He+"_"+this.type+"_"+this.index+"_rect_move"}},{key:"moveSectorName",get:function(){return He+"_"+this.type+"_"+this.index+"_sector_move"}},{key:"pointLayer",get:function(){return this.pointLayers[this.index]}},{key:"lineLayer",get:function(){return this.lineLayers[this.index]}},{key:"moveLineLayer",get:function(){return this.moveLineLayers[this.index]}},{key:"moveCircleLayer",get:function(){return this.moveCircleLayers[this.index]}},{key:"movePolygonLayer",get:function(){return this.movePolygonLayers[this.index]}},{key:"moveRectLayer",get:function(){return this.moveRectLayers[this.index]}},{key:"moveSectorLayer",get:function(){return this.moveSectorLayers[this.index]}}]),e}(),ze=["padding","animate","maxZoom","essential"],qe=["url"],Xe=null,Je=null,Ye=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},We=["line-color","line-opacity"],Ve=["fill-color","fill-opacity"],Ze=["background-color","background-opacity"],Ke=["text-color","text-opacity"],$e="zh_custom",Qe=function(e,t,r,n){if(r&&(Ye(r)||Array.isArray(r))){var i=e.getLayer(t);if(i){var o=[];switch(i.type){case"line":o=We;break;case"fill":o=Ve;break;case"background":o=Ze;break;case"symbol":o=Ke}0<o.length&&(e.setPaintProperty(t,o[0],r),null!==n)&&e.setPaintProperty(t,o[1],n)}}},et=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var i in r)null!==r[i]&&void 0!==r[i]&&e[n](t,i,r[i])};function tt(e,t){if(e&&(void 0!==e[$e]&&null!==e[$e]||(e[$e]={}),t)&&"object"==typeof t){var r,n=l(t);for(r in n)e[$e][r]=n[r]}}function rt(e,t){var r=[];return"string"==typeof t?r=t.split(".").filter(Boolean):Array.isArray(t)&&(r=t),0===r.length?null:r.reduce((function(e,t){return e[t]}),e[$e])}})(),n;function e(n){var i=r[n];return void 0!==i||(i=r[n]={exports:{}},t[n](i,i.exports,e)),i.exports}var t,r,n}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zh-mapbox",
3
- "version": "0.0.113",
3
+ "version": "0.1.3",
4
4
  "description": "mapbox的常用方法",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -17,8 +17,19 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
+ "@turf/area": "^6.5.0",
21
+ "@turf/bbox": "^6.5.0",
22
+ "@turf/bbox-polygon": "^6.5.0",
23
+ "@turf/boolean-point-in-polygon": "^6.5.0",
24
+ "@turf/centroid": "^6.5.0",
20
25
  "@turf/circle": "^6.5.0",
21
- "@turf/envelope": "^6.5.0"
26
+ "@turf/distance": "^6.5.0",
27
+ "@turf/envelope": "^6.5.0",
28
+ "@turf/helpers": "^6.5.0",
29
+ "@turf/length": "^6.5.0",
30
+ "@turf/midpoint": "^6.5.0",
31
+ "@turf/sector": "^6.5.0",
32
+ "@turf/bearing": "^6.5.0"
22
33
  },
23
34
  "devDependencies": {
24
35
  "@babel/cli": "^7.23.0",
@@ -32,10 +43,8 @@
32
43
  "babel-loader": "^9.1.3",
33
44
  "core-js": "^3.33.0",
34
45
  "eslint": "^8.51.0",
35
- "javascript-obfuscator": "^4.1.1",
36
46
  "uglifyjs-webpack-plugin": "^2.2.0",
37
47
  "webpack": "^5.88.2",
38
- "webpack-cli": "^5.1.4",
39
- "webpack-obfuscator": "^3.5.1"
48
+ "webpack-cli": "^5.1.4"
40
49
  }
41
50
  }