@vtx/cs-map 1.0.38 → 1.0.39
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/lib/_util/EventEmitter.js +79 -0
- package/lib/_util/EventEmitter.js.map +1 -0
- package/lib/_util/Provider.js +12 -0
- package/lib/_util/Provider.js.map +1 -0
- package/lib/_util/filterSpecialCharacters.js +90 -0
- package/lib/_util/filterSpecialCharacters.js.map +1 -0
- package/lib/_util/generateRandomPosition.js +24 -0
- package/lib/_util/generateRandomPosition.js.map +1 -0
- package/lib/_util/getBBoxFromGeojson.js +65 -0
- package/lib/_util/getBBoxFromGeojson.js.map +1 -0
- package/lib/_util/getComponentProps.js +14 -0
- package/lib/_util/getComponentProps.js.map +1 -0
- package/lib/_util/getCookie.js +24 -0
- package/lib/_util/getCookie.js.map +1 -0
- package/lib/_util/getDefaultMapInfo.js +33 -0
- package/lib/_util/getDefaultMapInfo.js.map +1 -0
- package/lib/_util/getSystemInfo.js +26 -0
- package/lib/_util/getSystemInfo.js.map +1 -0
- package/lib/_util/getToken.js +13 -0
- package/lib/_util/getToken.js.map +1 -0
- package/lib/_util/getUrlParam.js +15 -0
- package/lib/_util/getUrlParam.js.map +1 -0
- package/lib/_util/http.js +186 -0
- package/lib/_util/http.js.map +1 -0
- package/lib/_util/isFunction.js +10 -0
- package/lib/_util/isFunction.js.map +1 -0
- package/lib/_util/isObject.js +10 -0
- package/lib/_util/isObject.js.map +1 -0
- package/lib/_util/layer.js +134 -0
- package/lib/_util/layer.js.map +1 -0
- package/lib/_util/mapTool.js +187 -0
- package/lib/_util/mapTool.js.map +1 -0
- package/lib/_util/setCookie.js +15 -0
- package/lib/_util/setCookie.js.map +1 -0
- package/lib/_util/transformRgb.js +33 -0
- package/lib/_util/transformRgb.js.map +1 -0
- package/lib/_util/useColSize.js +28 -0
- package/lib/_util/useColSize.js.map +1 -0
- package/lib/_util/useInterval.js +19 -0
- package/lib/_util/useInterval.js.map +1 -0
- package/lib/_util/useProps.js +14 -0
- package/lib/_util/useProps.js.map +1 -0
- package/lib/_util/useSet.js +44 -0
- package/lib/_util/useSet.js.map +1 -0
- package/lib/assets/base-img-1.png +0 -0
- package/lib/assets/base-img-2.png +0 -0
- package/lib/assets/base-img-3.png +0 -0
- package/lib/assets/base-img-4.png +0 -0
- package/lib/assets/base-img-5.png +0 -0
- package/lib/assets/base-img.png +0 -0
- package/lib/assets/bz.png +0 -0
- package/lib/assets/colors.png +0 -0
- package/lib/assets/colors1.png +0 -0
- package/lib/assets/ll.png +0 -0
- package/lib/assets/people.gif +0 -0
- package/lib/assets/sw.png +0 -0
- package/lib/assets/water.png +0 -0
- package/lib/assets/yl.png +0 -0
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js +56 -0
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +1 -0
- package/lib/cesium-tiles-layer/index.js +73 -0
- package/lib/cesium-tiles-layer/index.js.map +1 -0
- package/lib/cesium-tiles-layer/style/css.js +4 -0
- package/lib/cesium-tiles-layer/style/css.js.map +1 -0
- package/lib/cesium-tiles-layer/style/index.css +0 -0
- package/lib/cesium-tiles-layer/style/index.js +4 -0
- package/lib/cesium-tiles-layer/style/index.js.map +1 -0
- package/lib/cesium-tiles-layer/style/index.less +0 -0
- package/lib/circle/circle.js +67 -0
- package/lib/circle/circle.js.map +1 -0
- package/lib/circle/index.js +49 -0
- package/lib/circle/index.js.map +1 -0
- package/lib/circle/style/css.js +2 -0
- package/lib/circle/style/css.js.map +1 -0
- package/lib/circle/style/index.js +2 -0
- package/lib/circle/style/index.js.map +1 -0
- package/lib/config.js +12 -0
- package/lib/config.js.map +1 -0
- package/lib/demand-layer/DemandLayer.js +409 -0
- package/lib/demand-layer/DemandLayer.js.map +1 -0
- package/lib/demand-layer/index.js +104 -0
- package/lib/demand-layer/index.js.map +1 -0
- package/lib/demand-layer/style/css.js +4 -0
- package/lib/demand-layer/style/css.js.map +1 -0
- package/lib/demand-layer/style/index.css +0 -0
- package/lib/demand-layer/style/index.js +4 -0
- package/lib/demand-layer/style/index.js.map +1 -0
- package/lib/demand-layer/style/index.less +0 -0
- package/lib/events/index.js +27 -0
- package/lib/events/index.js.map +1 -0
- package/lib/feature-layer/FeatureLayer.js +458 -0
- package/lib/feature-layer/FeatureLayer.js.map +1 -0
- package/lib/feature-layer/createFeatureCollection.js +127 -0
- package/lib/feature-layer/createFeatureCollection.js.map +1 -0
- package/lib/feature-layer/index.js +115 -0
- package/lib/feature-layer/index.js.map +1 -0
- package/lib/feature-layer/style/css.js +4 -0
- package/lib/feature-layer/style/css.js.map +1 -0
- package/lib/feature-layer/style/index.css +0 -0
- package/lib/feature-layer/style/index.js +4 -0
- package/lib/feature-layer/style/index.js.map +1 -0
- package/lib/feature-layer/style/index.less +0 -0
- package/lib/fly-line-layer/FlyLineLayer.js +259 -0
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -0
- package/lib/fly-line-layer/index.js +90 -0
- package/lib/fly-line-layer/index.js.map +1 -0
- package/lib/fly-line-layer/lineFlowMaterialProperty.js +89 -0
- package/lib/fly-line-layer/lineFlowMaterialProperty.js.map +1 -0
- package/lib/fly-line-layer/style/css.js +4 -0
- package/lib/fly-line-layer/style/css.js.map +1 -0
- package/lib/fly-line-layer/style/index.css +0 -0
- package/lib/fly-line-layer/style/index.js +4 -0
- package/lib/fly-line-layer/style/index.js.map +1 -0
- package/lib/fly-line-layer/style/index.less +0 -0
- package/lib/gif-dom-layer/GifDomLayer.js +104 -0
- package/lib/gif-dom-layer/GifDomLayer.js.map +1 -0
- package/lib/gif-dom-layer/index.js +44 -0
- package/lib/gif-dom-layer/index.js.map +1 -0
- package/lib/gif-dom-layer/style/css.js +4 -0
- package/lib/gif-dom-layer/style/css.js.map +1 -0
- package/lib/gif-dom-layer/style/index.css +0 -0
- package/lib/gif-dom-layer/style/index.js +4 -0
- package/lib/gif-dom-layer/style/index.js.map +1 -0
- package/lib/gif-dom-layer/style/index.less +0 -0
- package/lib/gradation-line-layer/GradationLineLayer.js +103 -0
- package/lib/gradation-line-layer/GradationLineLayer.js.map +1 -0
- package/lib/gradation-line-layer/index.js +83 -0
- package/lib/gradation-line-layer/index.js.map +1 -0
- package/lib/gradation-line-layer/style/css.js +4 -0
- package/lib/gradation-line-layer/style/css.js.map +1 -0
- package/lib/gradation-line-layer/style/index.css +0 -0
- package/lib/gradation-line-layer/style/index.js +4 -0
- package/lib/gradation-line-layer/style/index.js.map +1 -0
- package/lib/gradation-line-layer/style/index.less +0 -0
- package/lib/group-layer/GroupLayer.js +131 -0
- package/lib/group-layer/GroupLayer.js.map +1 -0
- package/lib/group-layer/index.js +71 -0
- package/lib/group-layer/index.js.map +1 -0
- package/lib/group-layer/style/css.js +4 -0
- package/lib/group-layer/style/css.js.map +1 -0
- package/lib/group-layer/style/index.css +0 -0
- package/lib/group-layer/style/index.js +4 -0
- package/lib/group-layer/style/index.js.map +1 -0
- package/lib/group-layer/style/index.less +0 -0
- package/lib/heatmap-layer/CesiumHeatmap.js +445 -0
- package/lib/heatmap-layer/CesiumHeatmap.js.map +1 -0
- package/lib/heatmap-layer/HeatmapLayer.js +157 -0
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -0
- package/lib/heatmap-layer/heatmap.js +610 -0
- package/lib/heatmap-layer/heatmap.js.map +1 -0
- package/lib/heatmap-layer/index.js +90 -0
- package/lib/heatmap-layer/index.js.map +1 -0
- package/lib/heatmap-layer/style/css.js +4 -0
- package/lib/heatmap-layer/style/css.js.map +1 -0
- package/lib/heatmap-layer/style/index.css +0 -0
- package/lib/heatmap-layer/style/index.js +4 -0
- package/lib/heatmap-layer/style/index.js.map +1 -0
- package/lib/heatmap-layer/style/index.less +0 -0
- package/lib/highlight-layer/HighlightLayer.js +261 -0
- package/lib/highlight-layer/HighlightLayer.js.map +1 -0
- package/lib/highlight-layer/index.js +25 -0
- package/lib/highlight-layer/index.js.map +1 -0
- package/lib/highlight-layer/style/css.js +4 -0
- package/lib/highlight-layer/style/css.js.map +1 -0
- package/lib/highlight-layer/style/index.css +0 -0
- package/lib/highlight-layer/style/index.js +4 -0
- package/lib/highlight-layer/style/index.js.map +1 -0
- package/lib/highlight-layer/style/index.less +0 -0
- package/lib/image-layer/ImageLayer.js +244 -0
- package/lib/image-layer/ImageLayer.js.map +1 -0
- package/lib/image-layer/index.js +134 -0
- package/lib/image-layer/index.js.map +1 -0
- package/lib/image-layer/style/css.js +4 -0
- package/lib/image-layer/style/css.js.map +1 -0
- package/lib/image-layer/style/index.css +0 -0
- package/lib/image-layer/style/index.js +4 -0
- package/lib/image-layer/style/index.js.map +1 -0
- package/lib/image-layer/style/index.less +0 -0
- package/lib/index.js +147 -0
- package/lib/index.js.map +1 -0
- package/lib/label/Label.js +74 -0
- package/lib/label/Label.js.map +1 -0
- package/lib/label/index.js +51 -0
- package/lib/label/index.js.map +1 -0
- package/lib/label/style/css.js +2 -0
- package/lib/label/style/css.js.map +1 -0
- package/lib/label/style/index.js +2 -0
- package/lib/label/style/index.js.map +1 -0
- package/lib/legend/index.js +208 -0
- package/lib/legend/index.js.map +1 -0
- package/lib/legend/style/css.js +8 -0
- package/lib/legend/style/css.js.map +1 -0
- package/lib/legend/style/index.css +60 -0
- package/lib/legend/style/index.js +8 -0
- package/lib/legend/style/index.js.map +1 -0
- package/lib/legend/style/index.less +63 -0
- package/lib/line-flow-layer/LineFlowLayer.js +104 -0
- package/lib/line-flow-layer/LineFlowLayer.js.map +1 -0
- package/lib/line-flow-layer/index.js +34 -0
- package/lib/line-flow-layer/index.js.map +1 -0
- package/lib/line-flow-layer/style/css.js +4 -0
- package/lib/line-flow-layer/style/css.js.map +1 -0
- package/lib/line-flow-layer/style/index.css +0 -0
- package/lib/line-flow-layer/style/index.js +4 -0
- package/lib/line-flow-layer/style/index.js.map +1 -0
- package/lib/line-flow-layer/style/index.less +0 -0
- package/lib/map/InfoTool/index.css +55 -0
- package/lib/map/InfoTool/index.js +246 -0
- package/lib/map/InfoTool/index.js.map +1 -0
- package/lib/map/InfoTool/index.less +46 -0
- package/lib/map/InfoTool/util.js +112 -0
- package/lib/map/InfoTool/util.js.map +1 -0
- package/lib/map/InfoWindow.js +72 -0
- package/lib/map/InfoWindow.js.map +1 -0
- package/lib/map/Layers.js +286 -0
- package/lib/map/Layers.js.map +1 -0
- package/lib/map/Popup.js +301 -0
- package/lib/map/Popup.js.map +1 -0
- package/lib/map/base/imagery/amap/AmapImageryProvider.js +46 -0
- package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +46 -0
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +146 -0
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +377 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +121 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +48 -0
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/google/GoogleImageryProvider.js +41 -0
- package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js +38 -0
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js +59 -0
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +46 -0
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/transform/CoordTransform.js +173 -0
- package/lib/map/base/imagery/transform/CoordTransform.js.map +1 -0
- package/lib/map/base/index.js +204 -0
- package/lib/map/base/index.js.map +1 -0
- package/lib/map/hooks/useGetMapFeatureInfoByText.js +209 -0
- package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +1 -0
- package/lib/map/index.js +843 -0
- package/lib/map/index.js.map +1 -0
- package/lib/map/material/AroundPoint.js +65 -0
- package/lib/map/material/AroundPoint.js.map +1 -0
- package/lib/map/material/CircleRippleMaterialProperty.js +87 -0
- package/lib/map/material/CircleRippleMaterialProperty.js.map +1 -0
- package/lib/map/material/ODLineLayer.js +91 -0
- package/lib/map/material/ODLineLayer.js.map +1 -0
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js +100 -0
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +1 -0
- package/lib/map/material/PolylineTrailMaterialProperty.js +101 -0
- package/lib/map/material/PolylineTrailMaterialProperty.js.map +1 -0
- package/lib/map/material/TilesBuilding.js +207 -0
- package/lib/map/material/TilesBuilding.js.map +1 -0
- package/lib/map/material/assets/colors1.png +0 -0
- package/lib/map/material/assets/colors2.png +0 -0
- package/lib/map/material/index.js +16 -0
- package/lib/map/material/index.js.map +1 -0
- package/lib/map/style/css.js +4 -0
- package/lib/map/style/css.js.map +1 -0
- package/lib/map/style/index.css +155 -0
- package/lib/map/style/index.js +4 -0
- package/lib/map/style/index.js.map +1 -0
- package/lib/map/style/index.less +149 -0
- package/lib/marker/Marker.js +112 -0
- package/lib/marker/Marker.js.map +1 -0
- package/lib/marker/index.js +49 -0
- package/lib/marker/index.js.map +1 -0
- package/lib/marker/style/css.js +2 -0
- package/lib/marker/style/css.js.map +1 -0
- package/lib/marker/style/index.js +2 -0
- package/lib/marker/style/index.js.map +1 -0
- package/lib/point/Point.js +69 -0
- package/lib/point/Point.js.map +1 -0
- package/lib/point/index.js +49 -0
- package/lib/point/index.js.map +1 -0
- package/lib/point/style/css.js +2 -0
- package/lib/point/style/css.js.map +1 -0
- package/lib/point/style/index.js +2 -0
- package/lib/point/style/index.js.map +1 -0
- package/lib/polygon/Polygon.js +67 -0
- package/lib/polygon/Polygon.js.map +1 -0
- package/lib/polygon/index.js +49 -0
- package/lib/polygon/index.js.map +1 -0
- package/lib/polygon/style/css.js +2 -0
- package/lib/polygon/style/css.js.map +1 -0
- package/lib/polygon/style/index.js +2 -0
- package/lib/polygon/style/index.js.map +1 -0
- package/lib/polyline/Polyline.js +68 -0
- package/lib/polyline/Polyline.js.map +1 -0
- package/lib/polyline/index.js +49 -0
- package/lib/polyline/index.js.map +1 -0
- package/lib/polyline/style/css.js +2 -0
- package/lib/polyline/style/css.js.map +1 -0
- package/lib/polyline/style/index.js +2 -0
- package/lib/polyline/style/index.js.map +1 -0
- package/lib/renderer/index.js +268 -0
- package/lib/renderer/index.js.map +1 -0
- package/lib/renderer/style/css.js +4 -0
- package/lib/renderer/style/css.js.map +1 -0
- package/lib/renderer/style/index.css +0 -0
- package/lib/renderer/style/index.js +4 -0
- package/lib/renderer/style/index.js.map +1 -0
- package/lib/renderer/style/index.less +0 -0
- package/lib/style/index.css +0 -0
- package/lib/style/index.less +2 -0
- package/lib/style/themes/compact.css +0 -0
- package/lib/style/themes/compact.less +1 -0
- package/lib/style/themes/dark.css +0 -0
- package/lib/style/themes/dark.less +9 -0
- package/lib/style/themes/default.css +0 -0
- package/lib/style/themes/default.less +7 -0
- package/lib/style/themes/index.css +0 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/themes/variable.css +0 -0
- package/lib/style/themes/variable.less +5 -0
- package/lib/tools/assets/footer.png +0 -0
- package/lib/tools/assets/layer.png +0 -0
- package/lib/tools/assets/search.png +0 -0
- package/lib/tools/base-map-switch/index.js +103 -0
- package/lib/tools/base-map-switch/index.js.map +1 -0
- package/lib/tools/dimension-switch/index.js +38 -0
- package/lib/tools/dimension-switch/index.js.map +1 -0
- package/lib/tools/index.js +49 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/layer-control/index.js +171 -0
- package/lib/tools/layer-control/index.js.map +1 -0
- package/lib/tools/map-search/Select/index.js +55 -0
- package/lib/tools/map-search/Select/index.js.map +1 -0
- package/lib/tools/map-search/Select/style/css.js +4 -0
- package/lib/tools/map-search/Select/style/css.js.map +1 -0
- package/lib/tools/map-search/Select/style/index.css +45 -0
- package/lib/tools/map-search/Select/style/index.js +4 -0
- package/lib/tools/map-search/Select/style/index.js.map +1 -0
- package/lib/tools/map-search/Select/style/index.less +47 -0
- package/lib/tools/map-search/index.js +204 -0
- package/lib/tools/map-search/index.js.map +1 -0
- package/lib/tools/style/css.js +8 -0
- package/lib/tools/style/css.js.map +1 -0
- package/lib/tools/style/index.css +208 -0
- package/lib/tools/style/index.js +8 -0
- package/lib/tools/style/index.js.map +1 -0
- package/lib/tools/style/index.less +225 -0
- package/lib/tools/tools-item/index.js +66 -0
- package/lib/tools/tools-item/index.js.map +1 -0
- package/lib/trail-polyline-layer/TrailPolylineLayer.js +81 -0
- package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +1 -0
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js +30 -0
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +1 -0
- package/lib/trail-polyline-layer/index.js +28 -0
- package/lib/trail-polyline-layer/index.js.map +1 -0
- package/lib/trail-polyline-layer/style/css.js +4 -0
- package/lib/trail-polyline-layer/style/css.js.map +1 -0
- package/lib/trail-polyline-layer/style/index.css +0 -0
- package/lib/trail-polyline-layer/style/index.js +4 -0
- package/lib/trail-polyline-layer/style/index.js.map +1 -0
- package/lib/trail-polyline-layer/style/index.less +0 -0
- package/lib/use-props/style/css.js +2 -0
- package/lib/use-props/style/css.js.map +1 -0
- package/lib/use-props/style/index.js +2 -0
- package/lib/use-props/style/index.js.map +1 -0
- package/lib/water-surface-layer/WaterSurfaceLayer.js +86 -0
- package/lib/water-surface-layer/WaterSurfaceLayer.js.map +1 -0
- package/lib/water-surface-layer/index.js +28 -0
- package/lib/water-surface-layer/index.js.map +1 -0
- package/lib/water-surface-layer/style/css.js +4 -0
- package/lib/water-surface-layer/style/css.js.map +1 -0
- package/lib/water-surface-layer/style/index.css +0 -0
- package/lib/water-surface-layer/style/index.js +4 -0
- package/lib/water-surface-layer/style/index.js.map +1 -0
- package/lib/water-surface-layer/style/index.less +0 -0
- package/lib/weather/Weather.js +174 -0
- package/lib/weather/Weather.js.map +1 -0
- package/lib/weather/index.js +36 -0
- package/lib/weather/index.js.map +1 -0
- package/lib/weather/style/css.js +8 -0
- package/lib/weather/style/css.js.map +1 -0
- package/lib/weather/style/index.css +60 -0
- package/lib/weather/style/index.js +8 -0
- package/lib/weather/style/index.js.map +1 -0
- package/lib/weather/style/index.less +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
// 发布订阅模式
|
|
14
|
+
var EventEmitter = /*#__PURE__*/function () {
|
|
15
|
+
function EventEmitter() {
|
|
16
|
+
_classCallCheck(this, EventEmitter);
|
|
17
|
+
// 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}
|
|
18
|
+
this.events = {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 订阅事件方法
|
|
22
|
+
_createClass(EventEmitter, [{
|
|
23
|
+
key: "on",
|
|
24
|
+
value: function on(eventName, callback) {
|
|
25
|
+
this.events[eventName] = this.events[eventName] || [];
|
|
26
|
+
this.events[eventName].push(callback);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 触发事件方法
|
|
30
|
+
}, {
|
|
31
|
+
key: "emit",
|
|
32
|
+
value: function emit(eventName) {
|
|
33
|
+
var _this = this;
|
|
34
|
+
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
35
|
+
rest[_key - 1] = arguments[_key];
|
|
36
|
+
}
|
|
37
|
+
if (this.events[eventName]) {
|
|
38
|
+
this.events[eventName].forEach(function (f) {
|
|
39
|
+
return f.apply(_this, rest);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 移除订阅事件
|
|
45
|
+
}, {
|
|
46
|
+
key: "un",
|
|
47
|
+
value: function un(eventName, callback) {
|
|
48
|
+
if (this.events[eventName]) {
|
|
49
|
+
this.events[eventName] = this.events[eventName].filter(function (f) {
|
|
50
|
+
return f !== callback;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 只执行一次订阅的事件
|
|
56
|
+
}, {
|
|
57
|
+
key: "once",
|
|
58
|
+
value: function once(eventName, callback) {
|
|
59
|
+
var _this2 = this;
|
|
60
|
+
//创建临时方法
|
|
61
|
+
var fn = function fn() {
|
|
62
|
+
for (var _len2 = arguments.length, rest = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
63
|
+
rest[_key2] = arguments[_key2];
|
|
64
|
+
}
|
|
65
|
+
// 执行原有的callback
|
|
66
|
+
callback.apply(_this2, rest);
|
|
67
|
+
|
|
68
|
+
// 执行移除事件,删除临时方法
|
|
69
|
+
_this2.un(eventName, fn);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// 执行订阅事件,绑定临时方法
|
|
73
|
+
this.on(eventName, fn);
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
76
|
+
return EventEmitter;
|
|
77
|
+
}();
|
|
78
|
+
var _default = exports["default"] = EventEmitter;
|
|
79
|
+
//# sourceMappingURL=EventEmitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventEmitter.js","names":["EventEmitter","_classCallCheck","events","_createClass","key","value","on","eventName","callback","push","emit","_this","_len","arguments","length","rest","Array","_key","forEach","f","apply","un","filter","once","_this2","fn","_len2","_key2","_default","exports"],"sources":["_util/EventEmitter.js"],"sourcesContent":["// 发布订阅模式\nclass EventEmitter {\n constructor() {\n // 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}\n this.events = {};\n }\n\n // 订阅事件方法\n on(eventName, callback) {\n this.events[eventName] = this.events[eventName] || [];\n this.events[eventName].push(callback);\n }\n\n // 触发事件方法\n emit(eventName, ...rest) {\n if (this.events[eventName]) {\n this.events[eventName].forEach(f => f.apply(this, rest))\n }\n }\n\n // 移除订阅事件\n un(eventName, callback) {\n if (this.events[eventName]) {\n this.events[eventName] = this.events[eventName].filter(f => f !== callback)\n }\n }\n\n // 只执行一次订阅的事件\n once(eventName, callback) {\n //创建临时方法\n const fn = (...rest) => {\n\n // 执行原有的callback\n callback.apply(this, rest)\n\n // 执行移除事件,删除临时方法\n this.un(eventName, fn)\n }\n\n // 执行订阅事件,绑定临时方法\n this.on(eventName, fn);\n }\n}\n\nexport default EventEmitter;\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,IACMA,YAAY;EAChB,SAAAA,aAAA,EAAc;IAAAC,eAAA,OAAAD,YAAA;IACZ;IACA,IAAI,CAACE,MAAM,GAAG,CAAC,CAAC;EAClB;;EAEA;EAAAC,YAAA,CAAAH,YAAA;IAAAI,GAAA;IAAAC,KAAA,EACA,SAAAC,GAAGC,SAAS,EAAEC,QAAQ,EAAE;MACtB,IAAI,CAACN,MAAM,CAACK,SAAS,CAAC,GAAG,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,IAAI,EAAE;MACrD,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC;IACvC;;IAEA;EAAA;IAAAJ,GAAA;IAAAC,KAAA,EACA,SAAAK,KAAKH,SAAS,EAAW;MAAA,IAAAI,KAAA;MAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAANC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;QAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;MAAA;MACrB,IAAI,IAAI,CAACf,MAAM,CAACK,SAAS,CAAC,EAAE;QAC1B,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACW,OAAO,CAAC,UAAAC,CAAC;UAAA,OAAIA,CAAC,CAACC,KAAK,CAACT,KAAI,EAAEI,IAAI,CAAC;QAAA,EAAC;MAC1D;IACF;;IAEA;EAAA;IAAAX,GAAA;IAAAC,KAAA,EACA,SAAAgB,GAAGd,SAAS,EAAEC,QAAQ,EAAE;MACtB,IAAI,IAAI,CAACN,MAAM,CAACK,SAAS,CAAC,EAAE;QAC1B,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,GAAG,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACe,MAAM,CAAC,UAAAH,CAAC;UAAA,OAAIA,CAAC,KAAKX,QAAQ;QAAA,EAAC;MAC7E;IACF;;IAEA;EAAA;IAAAJ,GAAA;IAAAC,KAAA,EACA,SAAAkB,KAAKhB,SAAS,EAAEC,QAAQ,EAAE;MAAA,IAAAgB,MAAA;MACxB;MACA,IAAMC,EAAE,GAAG,SAALA,EAAEA,CAAA,EAAgB;QAAA,SAAAC,KAAA,GAAAb,SAAA,CAAAC,MAAA,EAATC,IAAI,OAAAC,KAAA,CAAAU,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;UAAJZ,IAAI,CAAAY,KAAA,IAAAd,SAAA,CAAAc,KAAA;QAAA;QAEjB;QACAnB,QAAQ,CAACY,KAAK,CAACI,MAAI,EAAET,IAAI,CAAC;;QAE1B;QACAS,MAAI,CAACH,EAAE,CAACd,SAAS,EAAEkB,EAAE,CAAC;MACxB,CAAC;;MAED;MACA,IAAI,CAACnB,EAAE,CAACC,SAAS,EAAEkB,EAAE,CAAC;IACxB;EAAC;EAAA,OAAAzB,YAAA;AAAA;AAAA,IAAA4B,QAAA,GAAAC,OAAA,cAGY7B,YAAY"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Context = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var Context = exports.Context = /*#__PURE__*/_react["default"].createContext({});
|
|
10
|
+
var Provider = Context.Provider;
|
|
11
|
+
var _default = exports["default"] = Provider;
|
|
12
|
+
//# sourceMappingURL=Provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Provider.js","names":["_react","_interopRequireDefault","require","obj","__esModule","Context","exports","React","createContext","Provider","_default"],"sources":["_util/Provider.js"],"sourcesContent":["import React from 'react';\nconst Context = React.createContext({});\nconst Provider = Context.Provider;\nexport { Context };\nexport default Provider;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAC1B,IAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAGE,iBAAK,CAACC,aAAa,CAAC,CAAC,CAAC,CAAC;AACvC,IAAMC,QAAQ,GAAGJ,OAAO,CAACI,QAAQ;AAAC,IAAAC,QAAA,GAAAJ,OAAA,cAEnBG,QAAQ"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = filterSpecialCharacters;
|
|
7
|
+
var _lodash = _interopRequireDefault(require("lodash.difference"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function isNotEmpty(value) {
|
|
16
|
+
return Array.isArray(value) && value.length > 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 过滤特殊字符
|
|
21
|
+
* @param {String} value 值
|
|
22
|
+
* @param {Object} option
|
|
23
|
+
* @param {Array} [option.include] 新增
|
|
24
|
+
* @param {Array} [option.exclude] 排除
|
|
25
|
+
*/
|
|
26
|
+
function filterSpecialCharacters(value) {
|
|
27
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
28
|
+
_ref$include = _ref.include,
|
|
29
|
+
include = _ref$include === void 0 ? [] : _ref$include,
|
|
30
|
+
_ref$exclude = _ref.exclude,
|
|
31
|
+
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
32
|
+
// 特殊符号,- _ 排除
|
|
33
|
+
var specialCharacter = [
|
|
34
|
+
// 小括号
|
|
35
|
+
'(', ')', '(', ')',
|
|
36
|
+
// 中括号
|
|
37
|
+
'\\[', '\\]', '[', ']',
|
|
38
|
+
// 大括号
|
|
39
|
+
'{', '}', '{', '}',
|
|
40
|
+
// 方头括号
|
|
41
|
+
'【', '】',
|
|
42
|
+
// 尖括号
|
|
43
|
+
'<', '>',
|
|
44
|
+
// 书名号
|
|
45
|
+
'《', '》',
|
|
46
|
+
// 斜杠
|
|
47
|
+
'/',
|
|
48
|
+
// 反斜杠
|
|
49
|
+
'\\\\',
|
|
50
|
+
// 逗号
|
|
51
|
+
',', ',',
|
|
52
|
+
// 句号
|
|
53
|
+
'.', '。',
|
|
54
|
+
// 冒号
|
|
55
|
+
':', ':',
|
|
56
|
+
// 分号
|
|
57
|
+
';', ';',
|
|
58
|
+
// 顿号
|
|
59
|
+
'、',
|
|
60
|
+
// 破折号
|
|
61
|
+
'——',
|
|
62
|
+
// 感叹号
|
|
63
|
+
'!', '!',
|
|
64
|
+
// 问号
|
|
65
|
+
'?', '?',
|
|
66
|
+
// 加减等于
|
|
67
|
+
'+', '=',
|
|
68
|
+
// 单引号
|
|
69
|
+
"'", '‘', '’',
|
|
70
|
+
// 双引号
|
|
71
|
+
'"', '“', '”',
|
|
72
|
+
// 金钱
|
|
73
|
+
'$', '¥',
|
|
74
|
+
// 百分号
|
|
75
|
+
'%', '%',
|
|
76
|
+
// 其它
|
|
77
|
+
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
78
|
+
|
|
79
|
+
// 新增
|
|
80
|
+
if (isNotEmpty(include)) {
|
|
81
|
+
specialCharacter = Array.from(new Set([].concat(_toConsumableArray(specialCharacter), _toConsumableArray(include))));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 移除
|
|
85
|
+
if (isNotEmpty(exclude)) {
|
|
86
|
+
specialCharacter = (0, _lodash["default"])(specialCharacter, exclude);
|
|
87
|
+
}
|
|
88
|
+
return value.replace(new RegExp("[".concat(specialCharacter.join(''), "]"), 'g'), '');
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=filterSpecialCharacters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterSpecialCharacters.js","names":["_lodash","_interopRequireDefault","require","obj","__esModule","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","isNotEmpty","value","filterSpecialCharacters","_ref","arguments","undefined","_ref$include","include","_ref$exclude","exclude","specialCharacter","Set","concat","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,CAAAF,CAAA,EAAAC,MAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,KAAA,aAAAL,CAAA,iBAAAH,CAAA,CAAAS,WAAA,EAAAN,CAAA,GAAAH,CAAA,CAAAS,WAAA,CAAAC,IAAA,MAAAP,CAAA,cAAAA,CAAA,mBAAAQ,KAAA,CAAAC,IAAA,CAAAZ,CAAA,OAAAG,CAAA,+DAAAU,IAAA,CAAAV,CAAA,UAAAD,iBAAA,CAAAF,CAAA,EAAAC,MAAA;AAAA,SAAAL,iBAAAkB,IAAA,eAAAC,MAAA,oBAAAD,IAAA,CAAAC,MAAA,CAAAC,QAAA,aAAAF,IAAA,+BAAAH,KAAA,CAAAC,IAAA,CAAAE,IAAA;AAAA,SAAAnB,mBAAAD,GAAA,QAAAiB,KAAA,CAAAM,OAAA,CAAAvB,GAAA,UAAAQ,iBAAA,CAAAR,GAAA;AAAA,SAAAQ,kBAAAR,GAAA,EAAAwB,GAAA,QAAAA,GAAA,YAAAA,GAAA,GAAAxB,GAAA,CAAAyB,MAAA,EAAAD,GAAA,GAAAxB,GAAA,CAAAyB,MAAA,WAAAC,CAAA,MAAAC,IAAA,OAAAV,KAAA,CAAAO,GAAA,GAAAE,CAAA,GAAAF,GAAA,EAAAE,CAAA,IAAAC,IAAA,CAAAD,CAAA,IAAA1B,GAAA,CAAA0B,CAAA,UAAAC,IAAA;AAE3C,SAASC,UAAUA,CAACC,KAAK,EAAE;EACvB,OAAOZ,KAAK,CAACM,OAAO,CAACM,KAAK,CAAC,IAAIA,KAAK,CAACJ,MAAM,GAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASK,uBAAuBA,CAACD,KAAK,EAAuC;EAAA,IAAAE,IAAA,GAAAC,SAAA,CAAAP,MAAA,QAAAO,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAJ,CAAC,CAAC;IAAAE,YAAA,GAAAH,IAAA,CAAjCI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,YAAA,GAAAL,IAAA,CAAEM,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAC/E;EACA,IAAIE,gBAAgB,GAAG;EACnB;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,MAAM;EACN;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,IAAI;EACJ;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,CACN;;EAED;EACA,IAAIV,UAAU,CAACO,OAAO,CAAC,EAAE;IACrBG,gBAAgB,GAAGrB,KAAK,CAACC,IAAI,CAAC,IAAIqB,GAAG,IAAAC,MAAA,CAAAzC,kBAAA,CAAKuC,gBAAgB,GAAAvC,kBAAA,CAAKoC,OAAO,EAAC,CAAC,CAAC;EAC7E;;EAEA;EACA,IAAIP,UAAU,CAACS,OAAO,CAAC,EAAE;IACrBC,gBAAgB,GAAG,IAAAG,kBAAU,EAACH,gBAAgB,EAAED,OAAO,CAAC;EAC5D;EAEA,OAAOR,KAAK,CAACa,OAAO,CAAC,IAAIC,MAAM,KAAAH,MAAA,CAAKF,gBAAgB,CAACM,IAAI,CAAC,EAAE,CAAC,QAAK,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 产生随机点
|
|
9
|
+
* @param {*} position:中心点坐标
|
|
10
|
+
* @param {*} num:随机点数量
|
|
11
|
+
* @return {*}
|
|
12
|
+
*/
|
|
13
|
+
function generateRandomPosition(position, num) {
|
|
14
|
+
var list = [];
|
|
15
|
+
for (var i = 0; i < num; i++) {
|
|
16
|
+
// random产生的随机数范围是0-1,需要加上正负模拟
|
|
17
|
+
var lon = position[0] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);
|
|
18
|
+
var lat = position[1] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);
|
|
19
|
+
list.push([lon, lat]);
|
|
20
|
+
}
|
|
21
|
+
return list;
|
|
22
|
+
}
|
|
23
|
+
var _default = exports["default"] = generateRandomPosition;
|
|
24
|
+
//# sourceMappingURL=generateRandomPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateRandomPosition.js","names":["generateRandomPosition","position","num","list","i","lon","Math","random","lat","push","_default","exports"],"sources":["_util/generateRandomPosition.js"],"sourcesContent":["/**\n * @description: 产生随机点\n * @param {*} position:中心点坐标\n * @param {*} num:随机点数量\n * @return {*}\n */\nfunction generateRandomPosition(position, num) {\n let list = []\n for (let i = 0; i < num; i++) {\n // random产生的随机数范围是0-1,需要加上正负模拟\n let lon = position[0] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);\n let lat = position[1] + Math.random() * 0.04 * (i % 2 === 0 ? 1 : -1);\n list.push([lon, lat])\n }\n return list\n}\n\nexport default generateRandomPosition;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsBA,CAACC,QAAQ,EAAEC,GAAG,EAAE;EAC3C,IAAIC,IAAI,GAAG,EAAE;EACb,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,GAAG,EAAEE,CAAC,EAAE,EAAE;IAC1B;IACA,IAAIC,GAAG,GAAGJ,QAAQ,CAAC,CAAC,CAAC,GAAGK,IAAI,CAACC,MAAM,CAAC,CAAC,GAAG,IAAI,IAAIH,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAII,GAAG,GAAGP,QAAQ,CAAC,CAAC,CAAC,GAAGK,IAAI,CAACC,MAAM,CAAC,CAAC,GAAG,IAAI,IAAIH,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrED,IAAI,CAACM,IAAI,CAAC,CAACJ,GAAG,EAAEG,GAAG,CAAC,CAAC;EACzB;EACA,OAAOL,IAAI;AACf;AAAC,IAAAO,QAAA,GAAAC,OAAA,cAEcX,sBAAsB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBox = exports["default"] = exports.computeMinMax = void 0;
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
/**
|
|
14
|
+
* 兼容最小最大值
|
|
15
|
+
* @param minCoordinate
|
|
16
|
+
* @param maxCoordinate
|
|
17
|
+
* @param gutter
|
|
18
|
+
* @returns {[*,*,*,*]}
|
|
19
|
+
*/
|
|
20
|
+
var computeMinMax = exports.computeMinMax = function computeMinMax(minCoordinate, maxCoordinate) {
|
|
21
|
+
var gutter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.035;
|
|
22
|
+
maxCoordinate[0] = maxCoordinate[0] + gutter;
|
|
23
|
+
minCoordinate[0] = minCoordinate[0] - gutter;
|
|
24
|
+
maxCoordinate[1] = maxCoordinate[1] + gutter;
|
|
25
|
+
minCoordinate[1] = minCoordinate[1] - gutter;
|
|
26
|
+
return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 获取边界
|
|
31
|
+
* @param coordinates
|
|
32
|
+
* @returns {[*,*,*,*]}
|
|
33
|
+
*/
|
|
34
|
+
var getBox = exports.getBox = function getBox(coordinates, gutter) {
|
|
35
|
+
var minCoordinate = [];
|
|
36
|
+
var maxCoordinate = [];
|
|
37
|
+
coordinates.forEach(function (c, index) {
|
|
38
|
+
var i = index % 2;
|
|
39
|
+
if (i === 0) {
|
|
40
|
+
if (minCoordinate[0] === undefined || c < minCoordinate[0]) {
|
|
41
|
+
minCoordinate[0] = c;
|
|
42
|
+
}
|
|
43
|
+
if (maxCoordinate[0] === undefined || c > maxCoordinate[0]) {
|
|
44
|
+
maxCoordinate[0] = c;
|
|
45
|
+
}
|
|
46
|
+
} else if (i === 1) {
|
|
47
|
+
if (minCoordinate[1] === undefined || c < minCoordinate[1]) {
|
|
48
|
+
minCoordinate[1] = c;
|
|
49
|
+
}
|
|
50
|
+
if (maxCoordinate[1] === undefined || c > maxCoordinate[1]) {
|
|
51
|
+
maxCoordinate[1] = c;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return computeMinMax(minCoordinate, maxCoordinate, gutter);
|
|
56
|
+
};
|
|
57
|
+
var _default = exports["default"] = function _default(geoJson) {
|
|
58
|
+
var coordinates = [];
|
|
59
|
+
geoJson.features.map(function (feature) {
|
|
60
|
+
var c = feature.geometry.coordinates.flat(Infinity);
|
|
61
|
+
coordinates.push.apply(coordinates, _toConsumableArray(c));
|
|
62
|
+
});
|
|
63
|
+
return getBox(coordinates, 0.035);
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=getBBoxFromGeojson.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBBoxFromGeojson.js","names":["computeMinMax","exports","minCoordinate","maxCoordinate","gutter","arguments","length","undefined","getBox","coordinates","forEach","c","index","i","_default","geoJson","features","map","feature","geometry","flat","Infinity","push","apply","_toConsumableArray"],"sources":["_util/getBBoxFromGeojson.js"],"sourcesContent":["/**\n * 兼容最小最大值\n * @param minCoordinate\n * @param maxCoordinate\n * @param gutter\n * @returns {[*,*,*,*]}\n */\nexport const computeMinMax = (minCoordinate, maxCoordinate, gutter = 0.035) => {\n maxCoordinate[0] = maxCoordinate[0] + gutter;\n minCoordinate[0] = minCoordinate[0] - gutter;\n\n maxCoordinate[1] = maxCoordinate[1] + gutter;\n minCoordinate[1] = minCoordinate[1] - gutter;\n\n return [minCoordinate[0], minCoordinate[1], maxCoordinate[0], maxCoordinate[1]]\n}\n\n/**\n * 获取边界\n * @param coordinates\n * @returns {[*,*,*,*]}\n */\nexport const getBox = (coordinates, gutter) => {\n let minCoordinate = [];\n let maxCoordinate = [];\n\n coordinates.forEach((c, index) => {\n let i = index%2;\n if (i === 0) {\n if (minCoordinate[0] === undefined || c < minCoordinate[0]) {\n minCoordinate[0] = c;\n }\n\n if (maxCoordinate[0] === undefined || c > maxCoordinate[0]) {\n maxCoordinate[0] = c;\n }\n } else if (i === 1) {\n if (minCoordinate[1] === undefined || c < minCoordinate[1]) {\n minCoordinate[1] = c;\n }\n\n if (maxCoordinate[1] === undefined || c > maxCoordinate[1]) {\n maxCoordinate[1] = c;\n }\n }\n })\n\n return computeMinMax(minCoordinate, maxCoordinate, gutter)\n}\n\nexport default (geoJson) => {\n const coordinates = [];\n\n geoJson.features.map(feature => {\n let c = feature.geometry.coordinates.flat(Infinity);\n coordinates.push(...c)\n });\n\n return getBox(coordinates, 0.035)\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAIE,aAAa,EAAEC,aAAa,EAAqB;EAAA,IAAnBC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EACtEF,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGC,MAAM;EAC5CF,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGE,MAAM;EAE5CD,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGC,MAAM;EAC5CF,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGE,MAAM;EAE5C,OAAO,CAACF,aAAa,CAAC,CAAC,CAAC,EAAEA,aAAa,CAAC,CAAC,CAAC,EAAEC,aAAa,CAAC,CAAC,CAAC,EAAEA,aAAa,CAAC,CAAC,CAAC,CAAC;AACnF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACO,IAAMK,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,SAATA,MAAMA,CAAIC,WAAW,EAAEL,MAAM,EAAK;EAC3C,IAAIF,aAAa,GAAG,EAAE;EACtB,IAAIC,aAAa,GAAG,EAAE;EAEtBM,WAAW,CAACC,OAAO,CAAC,UAACC,CAAC,EAAEC,KAAK,EAAK;IAC9B,IAAIC,CAAC,GAAGD,KAAK,GAAC,CAAC;IACf,IAAIC,CAAC,KAAK,CAAC,EAAE;MACT,IAAIX,aAAa,CAAC,CAAC,CAAC,KAAKK,SAAS,IAAII,CAAC,GAAGT,aAAa,CAAC,CAAC,CAAC,EAAE;QACxDA,aAAa,CAAC,CAAC,CAAC,GAAGS,CAAC;MACxB;MAEA,IAAIR,aAAa,CAAC,CAAC,CAAC,KAAKI,SAAS,IAAII,CAAC,GAAGR,aAAa,CAAC,CAAC,CAAC,EAAE;QACxDA,aAAa,CAAC,CAAC,CAAC,GAAGQ,CAAC;MACxB;IACJ,CAAC,MAAM,IAAIE,CAAC,KAAK,CAAC,EAAE;MAChB,IAAIX,aAAa,CAAC,CAAC,CAAC,KAAKK,SAAS,IAAII,CAAC,GAAGT,aAAa,CAAC,CAAC,CAAC,EAAE;QACxDA,aAAa,CAAC,CAAC,CAAC,GAAGS,CAAC;MACxB;MAEA,IAAIR,aAAa,CAAC,CAAC,CAAC,KAAKI,SAAS,IAAII,CAAC,GAAGR,aAAa,CAAC,CAAC,CAAC,EAAE;QACxDA,aAAa,CAAC,CAAC,CAAC,GAAGQ,CAAC;MACxB;IACJ;EACJ,CAAC,CAAC;EAEF,OAAOX,aAAa,CAACE,aAAa,EAAEC,aAAa,EAAEC,MAAM,CAAC;AAC9D,CAAC;AAAA,IAAAU,QAAA,GAAAb,OAAA,cAEc,SAAAa,SAACC,OAAO,EAAK;EACxB,IAAMN,WAAW,GAAG,EAAE;EAEtBM,OAAO,CAACC,QAAQ,CAACC,GAAG,CAAC,UAAAC,OAAO,EAAI;IAC5B,IAAIP,CAAC,GAAGO,OAAO,CAACC,QAAQ,CAACV,WAAW,CAACW,IAAI,CAACC,QAAQ,CAAC;IACnDZ,WAAW,CAACa,IAAI,CAAAC,KAAA,CAAhBd,WAAW,EAAAe,kBAAA,CAASb,CAAC,EAAC;EAC1B,CAAC,CAAC;EAEF,OAAOH,MAAM,CAACC,WAAW,EAAE,KAAK,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = getComponentProps;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function getComponentProps(prop) {
|
|
9
|
+
if (prop && _typeof(prop) === 'object') {
|
|
10
|
+
return prop;
|
|
11
|
+
}
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getComponentProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop","_typeof"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiBA,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAIC,OAAA,CAAOD,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @name cookie取值
|
|
9
|
+
* @param c_name 要取得的字段名
|
|
10
|
+
* @returns {string} 返回字段对应的值, 若字段不存在则返回空
|
|
11
|
+
*/
|
|
12
|
+
var _default = exports["default"] = function _default(c_name) {
|
|
13
|
+
if (document.cookie.length > 0) {
|
|
14
|
+
var c_start = document.cookie.indexOf("".concat(c_name, "="));
|
|
15
|
+
if (c_start !== -1) {
|
|
16
|
+
c_start = c_start + c_name.length + 1;
|
|
17
|
+
var c_end = document.cookie.indexOf(';', c_start);
|
|
18
|
+
if (c_end == -1) c_end = document.cookie.length;
|
|
19
|
+
return unescape(document.cookie.substring(c_start, c_end));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return '';
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=getCookie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCookie.js","names":["_default","exports","c_name","document","cookie","length","c_start","indexOf","concat","c_end","unescape","substring"],"sources":["_util/getCookie.js"],"sourcesContent":["/**\n * @name cookie取值\n * @param c_name 要取得的字段名\n * @returns {string} 返回字段对应的值, 若字段不存在则返回空\n */\nexport default c_name => {\n if (document.cookie.length > 0) {\n let c_start = document.cookie.indexOf(`${c_name}=`);\n if (c_start !== -1) {\n c_start = c_start + c_name.length + 1;\n let c_end = document.cookie.indexOf(';', c_start);\n if (c_end == -1) c_end = document.cookie.length;\n return unescape(document.cookie.substring(c_start, c_end));\n }\n }\n return '';\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAJA,IAAAA,QAAA,GAAAC,OAAA,cAKe,SAAAD,SAAAE,MAAM,EAAI;EACrB,IAAIC,QAAQ,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5B,IAAIC,OAAO,GAAGH,QAAQ,CAACC,MAAM,CAACG,OAAO,IAAAC,MAAA,CAAIN,MAAM,MAAG,CAAC;IACnD,IAAII,OAAO,KAAK,CAAC,CAAC,EAAE;MAChBA,OAAO,GAAGA,OAAO,GAAGJ,MAAM,CAACG,MAAM,GAAG,CAAC;MACrC,IAAII,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACG,OAAO,CAAC,GAAG,EAAED,OAAO,CAAC;MACjD,IAAIG,KAAK,IAAI,CAAC,CAAC,EAAEA,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACC,MAAM;MAC/C,OAAOK,QAAQ,CAACP,QAAQ,CAACC,MAAM,CAACO,SAAS,CAACL,OAAO,EAAEG,KAAK,CAAC,CAAC;IAC9D;EACJ;EACA,OAAO,EAAE;AACb,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
var _default = exports["default"] = function _default() {
|
|
14
|
+
var _systemInfo;
|
|
15
|
+
var systemInfo = window.sessionStorage.getItem('systemInfo');
|
|
16
|
+
systemInfo = systemInfo && JSON.parse(systemInfo) || {};
|
|
17
|
+
var val = _objectSpread(_objectSpread({}, systemInfo), {}, {
|
|
18
|
+
longitude: systemInfo.longitude,
|
|
19
|
+
latitude: systemInfo.latitude,
|
|
20
|
+
mapType: 'wgs84'
|
|
21
|
+
});
|
|
22
|
+
if ((_systemInfo = systemInfo) !== null && _systemInfo !== void 0 && _systemInfo.mapDefJson) {
|
|
23
|
+
var mapDefJson = JSON.parse(systemInfo.mapDefJson);
|
|
24
|
+
var defaultMap = mapDefJson.find(function (v) {
|
|
25
|
+
return v.defaultMap;
|
|
26
|
+
}) || {};
|
|
27
|
+
val = _objectSpread(_objectSpread(_objectSpread({}, val), defaultMap), {}, {
|
|
28
|
+
mapType: defaultMap.coordinate || 'wgs84'
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return val;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=getDefaultMapInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefaultMapInfo.js","names":["_default","_systemInfo","systemInfo","window","sessionStorage","getItem","JSON","parse","val","_objectSpread","longitude","latitude","mapType","mapDefJson","defaultMap","find","v","coordinate"],"sources":["_util/getDefaultMapInfo.js"],"sourcesContent":["export default () => {\n let systemInfo = window.sessionStorage.getItem('systemInfo');\n systemInfo = (systemInfo && JSON.parse(systemInfo)) || {};\n\n let val = {\n ...systemInfo,\n longitude: systemInfo.longitude,\n latitude: systemInfo.latitude,\n mapType: 'wgs84',\n };\n if (systemInfo?.mapDefJson) {\n let mapDefJson = JSON.parse(systemInfo.mapDefJson);\n let defaultMap = mapDefJson.find(v => v.defaultMap) || {};\n val = {\n ...val,\n ...defaultMap,\n mapType: defaultMap.coordinate || 'wgs84',\n };\n }\n\n return val;\n};\n"],"mappings":";;;;;;;;;;;;oCAAe,SAAAA,SAAA,EAAM;EAAA,IAAAC,WAAA;EACjB,IAAIC,UAAU,GAAGC,MAAM,CAACC,cAAc,CAACC,OAAO,CAAC,YAAY,CAAC;EAC5DH,UAAU,GAAIA,UAAU,IAAII,IAAI,CAACC,KAAK,CAACL,UAAU,CAAC,IAAK,CAAC,CAAC;EAEzD,IAAIM,GAAG,GAAAC,aAAA,CAAAA,aAAA,KACAP,UAAU;IACbQ,SAAS,EAAER,UAAU,CAACQ,SAAS;IAC/BC,QAAQ,EAAET,UAAU,CAACS,QAAQ;IAC7BC,OAAO,EAAE;EAAO,EACnB;EACD,KAAAX,WAAA,GAAIC,UAAU,cAAAD,WAAA,eAAVA,WAAA,CAAYY,UAAU,EAAE;IACxB,IAAIA,UAAU,GAAGP,IAAI,CAACC,KAAK,CAACL,UAAU,CAACW,UAAU,CAAC;IAClD,IAAIC,UAAU,GAAGD,UAAU,CAACE,IAAI,CAAC,UAAAC,CAAC;MAAA,OAAIA,CAAC,CAACF,UAAU;IAAA,EAAC,IAAI,CAAC,CAAC;IACzDN,GAAG,GAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACID,GAAG,GACHM,UAAU;MACbF,OAAO,EAAEE,UAAU,CAACG,UAAU,IAAI;IAAO,EAC5C;EACL;EAEA,OAAOT,GAAG;AACd,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
var _default = exports["default"] = function _default(key) {
|
|
14
|
+
var systemInfo = localStorage.getItem('systemInfo');
|
|
15
|
+
var system = {};
|
|
16
|
+
if (systemInfo && systemInfo !== '[object Object]') {
|
|
17
|
+
system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));
|
|
18
|
+
system = _objectSpread(_objectSpread({}, system), {}, {
|
|
19
|
+
access_token: system.token
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (key) {
|
|
23
|
+
return system[key];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=getSystemInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSystemInfo.js","names":["_default","key","systemInfo","localStorage","getItem","system","JSON","parse","decodeURIComponent","_objectSpread","access_token","token"],"sources":["_util/getSystemInfo.js"],"sourcesContent":["export default key => {\n const systemInfo = localStorage.getItem('systemInfo');\n let system = {};\n if (systemInfo && systemInfo !== '[object Object]') {\n system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));\n system = {\n ...system,\n access_token: system.token,\n };\n }\n if (key) {\n return system[key];\n }\n};\n"],"mappings":";;;;;;;;;;;;oCAAe,SAAAA,SAAAC,GAAG,EAAI;EAClB,IAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,YAAY,CAAC;EACrD,IAAIC,MAAM,GAAG,CAAC,CAAC;EACf,IAAIH,UAAU,IAAIA,UAAU,KAAK,iBAAiB,EAAE;IAChDG,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACA,kBAAkB,CAACN,UAAU,CAAC,CAAC,CAAC;IACvEG,MAAM,GAAAI,aAAA,CAAAA,aAAA,KACCJ,MAAM;MACTK,YAAY,EAAEL,MAAM,CAACM;IAAK,EAC7B;EACL;EACA,IAAIV,GAAG,EAAE;IACL,OAAOI,MAAM,CAACJ,GAAG,CAAC;EACtB;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _getCookie = _interopRequireDefault(require("./getCookie"));
|
|
8
|
+
var _utils = require("@vtx/utils");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
var _default = exports["default"] = function _default() {
|
|
11
|
+
return (0, _utils.getUrlParam)('token') || (0, _utils.getUrlParam)('access_token') || (0, _getCookie["default"])('token') || localStorage.getItem('token') || localStorage.getItem('access_token') || sessionStorage.getItem('token') || sessionStorage.getItem('access_token');
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=getToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getToken.js","names":["_getCookie","_interopRequireDefault","require","_utils","obj","__esModule","_default","exports","getUrlParam","getCookie","localStorage","getItem","sessionStorage"],"sources":["_util/getToken.js"],"sourcesContent":["import getCookie from './getCookie';\nimport { getUrlParam } from '@vtx/utils';\n\nexport default () => {\n return (\n getUrlParam('token') ||\n getUrlParam('access_token') ||\n getCookie('token') ||\n localStorage.getItem('token') ||\n localStorage.getItem('access_token') ||\n sessionStorage.getItem('token') ||\n sessionStorage.getItem('access_token')\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAyC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,IAAAE,QAAA,GAAAC,OAAA,cAE1B,SAAAD,SAAA,EAAM;EACjB,OACI,IAAAE,kBAAW,EAAC,OAAO,CAAC,IACpB,IAAAA,kBAAW,EAAC,cAAc,CAAC,IAC3B,IAAAC,qBAAS,EAAC,OAAO,CAAC,IAClBC,YAAY,CAACC,OAAO,CAAC,OAAO,CAAC,IAC7BD,YAAY,CAACC,OAAO,CAAC,cAAc,CAAC,IACpCC,cAAc,CAACD,OAAO,CAAC,OAAO,CAAC,IAC/BC,cAAc,CAACD,OAAO,CAAC,cAAc,CAAC;AAE9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _querystring = _interopRequireDefault(require("querystring"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var getUrlParam = function getUrlParam(key) {
|
|
10
|
+
var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
|
|
11
|
+
var params = _querystring["default"].parse(href.split('?')[1]);
|
|
12
|
+
return key ? params[key] : params;
|
|
13
|
+
};
|
|
14
|
+
var _default = exports["default"] = getUrlParam;
|
|
15
|
+
//# sourceMappingURL=getUrlParam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUrlParam.js","names":["_querystring","_interopRequireDefault","require","obj","__esModule","getUrlParam","key","href","arguments","length","undefined","window","location","params","qs","parse","split","_default","exports"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\n\nconst getUrlParam = (key, href = window.location.href) => {\n const params = qs.parse(href.split('?')[1]);\n return key ? params[key] : params;\n};\n\nexport default getUrlParam;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6B,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAE7B,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAG,EAAkC;EAAA,IAAhCC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,MAAM,CAACC,QAAQ,CAACL,IAAI;EACjD,IAAMM,MAAM,GAAGC,uBAAE,CAACC,KAAK,CAACR,IAAI,CAACS,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;EAC3C,OAAOV,GAAG,GAAGO,MAAM,CAACP,GAAG,CAAC,GAAGO,MAAM;AACrC,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,cAEab,WAAW"}
|