@vunk/form 2.18.2 → 2.19.0
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/components/_plugin-vue_export-helper.cjs +1 -11
- package/components/api-tables-select/index.cjs +1 -467
- package/components/api-tables-select/index.mjs +56 -413
- package/components/api-tables-select/src/ctx.d.ts +152 -172
- package/components/api-tables-select/src/index.vue.d.ts +394 -983
- package/components/button/index.cjs +1 -112
- package/components/button/index.mjs +57 -85
- package/components/button/src/ctx.d.ts +28 -113
- package/components/button/src/index.vue.d.ts +317 -625
- package/components/card-input-collection/index.cjs +1 -370
- package/components/card-input-collection/index.mjs +175 -277
- package/components/card-input-collection/src/core.vue.d.ts +54 -951
- package/components/card-input-collection/src/ctx.d.ts +19 -49
- package/components/card-input-collection/src/index.vue.d.ts +46 -110
- package/components/cascader/index.cjs +1 -150
- package/components/cascader/index.mjs +88 -116
- package/components/cascader/src/ctx.d.ts +140 -207
- package/components/cascader/src/index.vue.d.ts +315 -522
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.cjs +1 -152
- package/components/checkbox/index.mjs +75 -119
- package/components/checkbox/src/ctx.d.ts +46 -69
- package/components/checkbox/src/index.vue.d.ts +448 -1016
- package/components/cloneDeep.cjs +1 -2106
- package/components/color-picker/index.cjs +1 -80
- package/components/color-picker/index.mjs +46 -69
- package/components/color-picker/src/ctx.d.ts +130 -107
- package/components/color-picker/src/index.vue.d.ts +285 -255
- package/components/date-picker/index.cjs +1 -119
- package/components/date-picker/index.mjs +63 -97
- package/components/date-picker/src/ctx.d.ts +123 -206
- package/components/date-picker/src/index.vue.d.ts +269 -1358
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/date-picker-range/index.cjs +1 -177
- package/components/date-picker-range/index.mjs +62 -113
- package/components/date-picker-range/src/ctx.d.ts +130 -206
- package/components/date-picker-range/src/index.vue.d.ts +861 -448
- package/components/debounce.cjs +1 -0
- package/components/dialog/index.cjs +1 -126
- package/components/dialog/index.mjs +65 -99
- package/components/dialog/src/ctx.d.ts +17 -108
- package/components/dialog/src/index.vue.d.ts +77 -1072
- package/components/dialog-input-collection/index.cjs +1 -624
- package/components/dialog-input-collection/index.mjs +276 -498
- package/components/dialog-input-collection/src/ctx.d.ts +21 -52
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +29 -6371
- package/components/dialog-input-collection/src/index.vue.d.ts +65 -7630
- package/components/dialog-input-collection/src/layout.vue.d.ts +13 -73
- package/components/download-plus/index.cjs +1 -456
- package/components/download-plus/index.mjs +215 -358
- package/components/download-plus/src/api.d.ts +1 -1
- package/components/download-plus/src/ctx.d.ts +21 -52
- package/components/download-plus/src/index.vue.d.ts +437 -1177
- package/components/editable-text/index.cjs +1 -295
- package/components/editable-text/index.mjs +113 -239
- package/components/editable-text/src/ctx.d.ts +24 -50
- package/components/editable-text/src/index.vue.d.ts +59 -3258
- package/components/el-slider/index.cjs +1 -0
- package/components/el-slider/index.d.ts +5 -0
- package/components/el-slider/index.mjs +475 -0
- package/components/el-slider/src/button.d.ts +36 -0
- package/components/el-slider/src/button.vue.d.ts +41 -0
- package/components/el-slider/src/composables/index.cjs +1 -0
- package/components/el-slider/src/composables/index.d.ts +6 -0
- package/components/el-slider/src/composables/index.mjs +9 -0
- package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
- package/components/el-slider/src/composables/use-marks.d.ts +7 -0
- package/components/el-slider/src/composables/use-slide.d.ts +23 -0
- package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
- package/components/el-slider/src/composables/use-stops.d.ts +8 -0
- package/components/el-slider/src/composables/use-watch.d.ts +4 -0
- package/components/el-slider/src/constants.d.ts +14 -0
- package/components/el-slider/src/marker.d.ts +37 -0
- package/components/el-slider/src/slider-core.vue.d.ts +218 -0
- package/components/el-slider/src/slider.d.ts +174 -0
- package/components/esri-input-geojson/index.cjs +2 -1604
- package/components/esri-input-geojson/index.mjs +682 -1290
- package/components/esri-input-geojson/src/append.vue.d.ts +239 -1099
- package/components/esri-input-geojson/src/const.d.ts +1 -1
- package/components/esri-input-geojson/src/ctx.d.ts +66 -161
- package/components/esri-input-geojson/src/default-view.vue.d.ts +8 -132
- package/components/esri-input-geojson/src/index.vue.d.ts +982 -708
- package/components/esri-input-geojson/src/types.d.ts +1 -0
- package/components/esri-input-geojson/src/viewer.vue.d.ts +53 -282
- package/components/fieldset/index.cjs +1 -110
- package/components/fieldset/index.mjs +63 -76
- package/components/fieldset/src/ctx.d.ts +4 -4
- package/components/fieldset/src/index.vue.d.ts +7 -7
- package/components/form/index.cjs +1 -248
- package/components/form/index.mjs +107 -161
- package/components/form/src/ctx.d.ts +15 -64
- package/components/form/src/index.vue.d.ts +374 -2431
- package/components/form-item/index.cjs +1 -294
- package/components/form-item/index.mjs +140 -229
- package/components/form-item/src/core.vue.d.ts +32 -1854
- package/components/form-item/src/ctx.d.ts +19 -51
- package/components/form-item/src/index.vue.d.ts +38 -101
- package/components/form-item-renderer/index.cjs +1 -193
- package/components/form-item-renderer/index.mjs +103 -162
- package/components/form-item-renderer/src/core.vue.d.ts +9 -9
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +24 -74
- package/components/form-item-renderer-template/index.cjs +1 -47
- package/components/form-item-renderer-template/index.mjs +20 -33
- package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
- package/components/forms-provider/index.cjs +1 -99
- package/components/forms-provider/index.mjs +44 -73
- package/components/forms-provider/src/core.d.ts +3 -2
- package/components/forms-provider/src/segment.vue.d.ts +8 -8
- package/components/forms-provider/src/view.vue.d.ts +14 -4
- package/components/index.cjs +1 -399
- package/components/index2.cjs +1 -17
- package/components/information/index.cjs +1 -65
- package/components/information/index.mjs +28 -38
- package/components/information/src/ctx.d.ts +2 -2
- package/components/information/src/index.vue.d.ts +4 -4
- package/components/information-collection/index.cjs +1 -81
- package/components/information-collection/index.mjs +44 -48
- package/components/information-collection/src/ctx.d.ts +29 -65
- package/components/information-collection/src/index.vue.d.ts +64 -136
- package/components/information-renderer/index.cjs +1 -16
- package/components/information-renderer/index.d.ts +9 -9
- package/components/information-renderer/index.mjs +9 -10
- package/components/information-tag/index.cjs +1 -101
- package/components/information-tag/index.mjs +44 -54
- package/components/information-tag/src/ctx.d.ts +6 -21
- package/components/information-tag/src/index.vue.d.ts +23 -51
- package/components/information-templates-default/index.cjs +1 -101
- package/components/information-templates-default/index.mjs +63 -73
- package/components/information-templates-default/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -115
- package/components/input/index.mjs +60 -83
- package/components/input/src/ctx.d.ts +51 -152
- package/components/input/src/index.vue.d.ts +392 -951
- package/components/input-array/index.cjs +1 -310
- package/components/input-array/index.mjs +114 -244
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +1 -901
- package/components/input-array/src/index.vue.d.ts +43 -730
- package/components/input-collection/index.cjs +1 -452
- package/components/input-collection/index.mjs +195 -355
- package/components/input-collection/src/core.vue.d.ts +64 -1026
- package/components/input-collection/src/ctx.d.ts +21 -51
- package/components/input-collection/src/index.vue.d.ts +50 -114
- package/components/input-file/index.cjs +1 -142
- package/components/input-file/index.mjs +68 -100
- package/components/input-file/src/ctx.d.ts +8 -29
- package/components/input-file/src/index.vue.d.ts +444 -74
- package/components/input-file/src/template.vue.d.ts +1 -124
- package/components/input-link/index.cjs +1 -167
- package/components/input-link/index.mjs +60 -83
- package/components/input-link/src/ctx.d.ts +52 -137
- package/components/input-link/src/index.vue.d.ts +833 -311
- package/components/input-number/index.cjs +1 -119
- package/components/input-number/index.mjs +73 -87
- package/components/input-number/src/ctx.d.ts +38 -131
- package/components/input-number/src/index.vue.d.ts +321 -683
- package/components/input-tag/index.cjs +1 -100
- package/components/input-tag/index.mjs +51 -78
- package/components/input-tag/src/ctx.d.ts +43 -145
- package/components/input-tag/src/index.vue.d.ts +324 -778
- package/components/isObject.cjs +1 -165
- package/components/monaco-editor/index.cjs +1 -83
- package/components/monaco-editor/index.mjs +40 -59
- package/components/monaco-editor/src/ctx.d.ts +19 -44
- package/components/monaco-editor/src/index.vue.d.ts +209 -109
- package/components/radio/index.cjs +1 -267
- package/components/radio/index.mjs +110 -209
- package/components/radio/src/ctx.d.ts +27 -91
- package/components/radio/src/index.vue.d.ts +298 -1279
- package/components/radio/src/option.vue.d.ts +29 -881
- package/components/radio/src/wraper.vue.d.ts +64 -196
- package/components/renderer-data/index.cjs +1 -41
- package/components/renderer-data/index.mjs +19 -26
- package/components/renderer-data/src/ctx.d.ts +1 -1
- package/components/renderer-data/src/index.vue.d.ts +2 -2
- package/components/select/index.cjs +1 -311
- package/components/select/index.mjs +156 -214
- package/components/select/src/core.vue.d.ts +638 -1080
- package/components/select/src/ctx.d.ts +140 -223
- package/components/select/src/index.vue.d.ts +334 -610
- package/components/select/src/options.vue.d.ts +1 -1
- package/components/slider/index.cjs +1 -88
- package/components/slider/index.mjs +41 -70
- package/components/slider/src/ctx.d.ts +63 -174
- package/components/slider/src/index.vue.d.ts +151 -420
- package/components/style.css +1 -0
- package/components/switch/index.cjs +1 -88
- package/components/switch/index.mjs +37 -69
- package/components/switch/src/ctx.d.ts +34 -113
- package/components/switch/src/index.vue.d.ts +88 -699
- package/components/switch/src/types.d.ts +2 -2
- package/components/tables-select/index.cjs +1 -263
- package/components/tables-select/index.mjs +102 -172
- package/components/tables-select/src/ctx.d.ts +76 -91
- package/components/tables-select/src/index.vue.d.ts +228 -4969
- package/components/template-instances-provider/index.cjs +1 -31
- package/components/template-instances-provider/index.mjs +18 -22
- package/components/template-instances-provider/src/index.vue.d.ts +2 -2
- package/components/templates-default/index.cjs +1 -235
- package/components/templates-default/index.mjs +152 -211
- package/components/templates-default/src/ctx.d.ts +5 -3
- package/components/templates-default/src/index.vue.d.ts +7298 -157
- package/components/templates-element-plus/index.cjs +1 -112
- package/components/templates-element-plus/index.mjs +49 -91
- package/components/templates-element-plus/src/ctx.d.ts +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +65 -258
- package/components/templates-esri/index.cjs +1 -65
- package/components/templates-esri/index.mjs +29 -39
- package/components/templates-esri/src/ctx.d.ts +1 -1
- package/components/templates-esri/src/index.vue.d.ts +1776 -24
- package/components/templates-layout/index.cjs +1 -137
- package/components/templates-layout/index.mjs +78 -116
- package/components/templates-layout/src/ctx.d.ts +1 -1
- package/components/templates-layout/src/index.vue.d.ts +79 -411
- package/components/templates-variant/index.cjs +1 -70
- package/components/templates-variant/index.mjs +33 -43
- package/components/templates-variant/src/ctx.d.ts +1 -1
- package/components/templates-variant/src/index.vue.d.ts +1238 -24
- package/components/time-picker/index.cjs +1 -104
- package/components/time-picker/index.mjs +57 -87
- package/components/time-picker/src/ctx.d.ts +121 -211
- package/components/time-picker/src/index.vue.d.ts +263 -1368
- package/components/upload/index.cjs +1 -663
- package/components/upload/index.mjs +343 -537
- package/components/upload/src/ctx.d.ts +108 -195
- package/components/upload/src/file.vue.d.ts +197 -776
- package/components/upload/src/index.vue.d.ts +689 -1931
- package/components/upload/src/types.d.ts +1 -1
- package/components/upload/src/wraper.vue.d.ts +232 -407
- package/components/upload-plus/index.cjs +21 -18673
- package/components/upload-plus/index.mjs +4598 -18372
- package/components/upload-plus/src/api.d.ts +2 -2
- package/components/upload-plus/src/ctx.d.ts +24 -51
- package/components/upload-plus/src/index.vue.d.ts +51 -1656
- package/components/use-watch.cjs +1 -0
- package/components/van-cascader/index.cjs +1 -125
- package/components/van-cascader/index.mjs +51 -96
- package/components/van-cascader/src/ctx.d.ts +135 -203
- package/components/van-cascader/src/index.vue.d.ts +312 -985
- package/components/var-datetime-picker/index.cjs +1 -333
- package/components/var-datetime-picker/index.mjs +175 -254
- package/components/var-datetime-picker/src/ctx.d.ts +19 -50
- package/components/var-datetime-picker/src/index.vue.d.ts +688 -1115
- package/components/vditor/index.cjs +1 -86
- package/components/vditor/index.mjs +40 -66
- package/components/vditor/src/ctx.d.ts +16 -45
- package/components/vditor/src/index.vue.d.ts +195 -120
- package/composables/element-plus/index.cjs +1 -23
- package/composables/element-plus/index.mjs +14 -18
- package/composables/index.cjs +1 -161
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +102 -135
- package/composables/useForm.d.ts +2 -2
- package/composables/useRtl.d.ts +18 -0
- package/composables/useSourceManager.d.ts +2 -2
- package/composables/useTemplateInstances.d.ts +3 -3
- package/index.css +1 -562
- package/index.d.ts +0 -3
- package/index.esm.js +23 -48
- package/locale/index.cjs +1 -102
- package/locale/index.mjs +34 -34
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/package.json +14 -85
- package/shared/const/index.cjs +1 -59
- package/shared/const/index.d.ts +1 -1
- package/shared/const/index.mjs +18 -20
- package/shared/element-plus/ctx.d.ts +40 -37
- package/shared/element-plus/index.cjs +1 -211
- package/shared/element-plus/index.mjs +93 -161
- package/shared/element-plus/instances.d.ts +207 -321
- package/shared/form/index.cjs +1 -33
- package/shared/form/index.mjs +23 -25
- package/shared/helper/index.cjs +1 -11
- package/shared/helper/index.mjs +7 -8
- package/shared/index.cjs +1 -8
- package/shared/index.mjs +5 -1
- package/shared/infer-prop/index.cjs +1 -36
- package/shared/infer-prop/index.mjs +22 -28
- package/shared/progress-it/index.cjs +1 -42
- package/shared/progress-it/index.mjs +15 -31
- package/shared/rules/index.cjs +1 -56
- package/shared/rules/index.mjs +19 -18
- package/shared/types/form/index.cjs +1 -2
- package/shared/types/index.cjs +1 -2
- package/shared/types/source/index.cjs +1 -2
- package/shared/types/source-manager/index.cjs +1 -2
- package/shared/upload/index.cjs +1 -774
- package/shared/upload/index.mjs +180 -764
- package/component.d.ts +0 -3
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/card-input-collection/index.css +0 -21
- package/components/cascader/index.css +0 -9
- package/components/checkbox/index.css +0 -30
- package/components/cloneDeep.mjs +0 -2104
- package/components/date-picker-range/index.css +0 -18
- package/components/dialog-input-collection/index.css +0 -21
- package/components/download-plus/index.css +0 -68
- package/components/editable-text/index.css +0 -9
- package/components/esri-input-geojson/index.css +0 -32
- package/components/fieldset/index.css +0 -5
- package/components/form-item/index.css +0 -35
- package/components/index.mjs +0 -378
- package/components/index2.mjs +0 -14
- package/components/information-tag/index.css +0 -6
- package/components/information-templates-default/index.css +0 -16
- package/components/input-array/index.css +0 -14
- package/components/input-collection/index.css +0 -20
- package/components/input-link/index.css +0 -4
- package/components/input-number/index.css +0 -13
- package/components/isObject.mjs +0 -158
- package/components/monaco-editor/index.css +0 -4
- package/components/radio/index.css +0 -40
- package/components/select/index.css +0 -15
- package/components/switch/index.css +0 -10
- package/components/tables-select/index.css +0 -3
- package/components/templates-layout/index.css +0 -3
- package/components/upload/index.css +0 -34
- package/components/upload-plus/index.css +0 -84
- package/components/van-cascader/index.css +0 -6
- package/components/var-datetime-picker/index.css +0 -17
- package/defaults.d.ts +0 -5
|
@@ -1,52 +1,39 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, createCommentVNode, renderSlot, provide, resolveDynamicComponent, normalizeProps, mergeProps, ref, shallowRef, computed, watch, onMounted, nextTick, createElementBlock, toHandlers, withDirectives, createElementVNode, vShow } from
|
|
2
|
-
import { _VkfInputCtx, VkfInput } from
|
|
3
|
-
import { bindPropsFactory, onEmitsFactory } from
|
|
4
|
-
import { ElButton, ElIcon, ElButtonGroup, ElUpload, ElMessage } from
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { VkAsyncTeleport } from
|
|
11
|
-
import
|
|
12
|
-
import { useComputedReadonly } from
|
|
13
|
-
import { useLocale } from
|
|
14
|
-
import { Deferred } from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
EDIT_TYPE2["POINT"] = "point";
|
|
18
|
-
EDIT_TYPE2["POLYGON"] = "polygon";
|
|
19
|
-
EDIT_TYPE2["LINE_STRING"] = "line_string";
|
|
20
|
-
return EDIT_TYPE2;
|
|
21
|
-
})(EDIT_TYPE || {});
|
|
22
|
-
const EDIT_TYPE_OPTIONS = [
|
|
1
|
+
import { defineComponent as F, resolveComponent as h, openBlock as w, createBlock as _, withCtx as v, createVNode as y, createCommentVNode as O, unref as te, renderSlot as A, provide as G, resolveDynamicComponent as Te, normalizeProps as Re, mergeProps as fe, ref as D, shallowRef as k, computed as ne, watch as oe, onMounted as Fe, nextTick as Le, createElementBlock as $e, toHandlers as Be, withDirectives as Ue, createElementVNode as re, vShow as Ge } from "vue";
|
|
2
|
+
import { _VkfInputCtx as T, VkfInput as De } from "@vunk/form/components/input";
|
|
3
|
+
import { bindPropsFactory as Ne, onEmitsFactory as Je } from "@vunk/core/shared/utils-vue";
|
|
4
|
+
import { ElButton as qe, ElIcon as ze, ElButtonGroup as Ze, ElUpload as He, ElMessage as ae } from "element-plus";
|
|
5
|
+
import { k as xe, e as Ye, l as Xe, n as Ke } from "../index.cjs";
|
|
6
|
+
import { _ as Y } from "../_plugin-vue_export-helper.cjs";
|
|
7
|
+
import { VaMapView as ce, VaTdtBasemap as de, VaSketch as Qe, VaGraphicsLayer as We } from "@vuesri/core";
|
|
8
|
+
import je from "@arcgis/core/views/MapView";
|
|
9
|
+
import et from "@arcgis/core/views/SceneView";
|
|
10
|
+
import { VkAsyncTeleport as tt } from "@vunk/core";
|
|
11
|
+
import nt from "@arcgis/core/Graphic";
|
|
12
|
+
import { useComputedReadonly as ot } from "@vunk/form/composables";
|
|
13
|
+
import { useLocale as rt } from "@vunk/form/composables/element-plus";
|
|
14
|
+
import { Deferred as at } from "@vunk/core/shared/utils-promise";
|
|
15
|
+
var lt = /* @__PURE__ */ ((e) => (e.POINT = "point", e.POLYGON = "polygon", e.LINE_STRING = "line_string", e))(lt || {});
|
|
16
|
+
const it = [
|
|
23
17
|
{
|
|
24
|
-
label: "
|
|
25
|
-
value: "point"
|
|
18
|
+
label: "点",
|
|
19
|
+
value: "point",
|
|
26
20
|
availableCreatureTools: ["point"]
|
|
27
21
|
},
|
|
28
22
|
{
|
|
29
|
-
label: "
|
|
30
|
-
value: "line_string"
|
|
23
|
+
label: "线",
|
|
24
|
+
value: "line_string",
|
|
31
25
|
availableCreatureTools: ["polyline"]
|
|
32
26
|
},
|
|
33
27
|
{
|
|
34
|
-
label: "
|
|
35
|
-
value: "polygon"
|
|
28
|
+
label: "面",
|
|
29
|
+
value: "polygon",
|
|
36
30
|
availableCreatureTools: ["polygon", "circle", "rectangle"]
|
|
37
31
|
}
|
|
38
|
-
]
|
|
39
|
-
const EDIT_TYPE_REFLECT = EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
|
|
40
|
-
acc[cur.value] = cur;
|
|
41
|
-
return acc;
|
|
42
|
-
}, {});
|
|
43
|
-
const EMPTY_FEATURE_COLLECTION = {
|
|
32
|
+
], le = it.reduce((e, t) => (e[t.value] = t, e), {}), ut = {
|
|
44
33
|
type: "FeatureCollection",
|
|
45
34
|
features: []
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const props = {
|
|
49
|
-
..._VkfInputCtx.props,
|
|
35
|
+
}, X = {
|
|
36
|
+
...T.props,
|
|
50
37
|
viewComponent: null,
|
|
51
38
|
viewComponentAttrs: null,
|
|
52
39
|
readonly: {
|
|
@@ -78,27 +65,27 @@ const props = {
|
|
|
78
65
|
viewModelActivePointSymbol: null,
|
|
79
66
|
modelValue: {
|
|
80
67
|
type: Object,
|
|
81
|
-
default: () =>
|
|
68
|
+
default: () => ut
|
|
82
69
|
},
|
|
83
70
|
multiple: {
|
|
84
71
|
type: Boolean,
|
|
85
|
-
default:
|
|
72
|
+
default: !0
|
|
86
73
|
},
|
|
87
74
|
skipSave: {
|
|
88
75
|
type: Boolean,
|
|
89
|
-
default:
|
|
76
|
+
default: !1
|
|
90
77
|
},
|
|
91
78
|
showMap: {
|
|
92
79
|
type: Boolean,
|
|
93
|
-
default:
|
|
80
|
+
default: !1
|
|
94
81
|
},
|
|
95
82
|
dialogEdit: {
|
|
96
83
|
type: Boolean,
|
|
97
|
-
default:
|
|
84
|
+
default: !0
|
|
98
85
|
},
|
|
99
86
|
dialogEditFullscreen: {
|
|
100
87
|
type: Boolean,
|
|
101
|
-
default:
|
|
88
|
+
default: !0
|
|
102
89
|
},
|
|
103
90
|
dialogEditTitle: {
|
|
104
91
|
type: String,
|
|
@@ -106,7 +93,7 @@ const props = {
|
|
|
106
93
|
},
|
|
107
94
|
flying: {
|
|
108
95
|
type: Boolean,
|
|
109
|
-
default:
|
|
96
|
+
default: !1
|
|
110
97
|
},
|
|
111
98
|
layerIndex: {
|
|
112
99
|
type: Number,
|
|
@@ -116,44 +103,37 @@ const props = {
|
|
|
116
103
|
type: Object,
|
|
117
104
|
default: void 0
|
|
118
105
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const emits = {
|
|
122
|
-
..._VkfInputCtx.emits,
|
|
106
|
+
}, st = Ne(X), K = {
|
|
107
|
+
...T.emits,
|
|
123
108
|
"update:modelValue": (e) => e,
|
|
124
109
|
"update:flying": null,
|
|
125
110
|
/**
|
|
126
111
|
* 点击地图定位按钮
|
|
127
112
|
*/
|
|
128
|
-
|
|
113
|
+
appendFly: null,
|
|
129
114
|
appendEdit: null
|
|
130
|
-
}
|
|
131
|
-
const createOnEmits = onEmitsFactory(emits);
|
|
132
|
-
|
|
133
|
-
var ctx = /*#__PURE__*/Object.freeze({
|
|
115
|
+
}, ft = Je(K), Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
134
116
|
__proto__: null,
|
|
135
|
-
createBindProps:
|
|
136
|
-
createOnEmits:
|
|
137
|
-
emits:
|
|
138
|
-
props:
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
var _sfc_main$3 = defineComponent({
|
|
117
|
+
createBindProps: st,
|
|
118
|
+
createOnEmits: ft,
|
|
119
|
+
emits: K,
|
|
120
|
+
props: X
|
|
121
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = F({
|
|
142
122
|
components: {
|
|
143
|
-
ElButton,
|
|
144
|
-
ElIcon,
|
|
145
|
-
ElButtonGroup,
|
|
146
|
-
Upload:
|
|
147
|
-
Edit:
|
|
148
|
-
ElUpload,
|
|
149
|
-
MapLocation:
|
|
123
|
+
ElButton: qe,
|
|
124
|
+
ElIcon: ze,
|
|
125
|
+
ElButtonGroup: Ze,
|
|
126
|
+
Upload: xe,
|
|
127
|
+
Edit: Ye,
|
|
128
|
+
ElUpload: He,
|
|
129
|
+
MapLocation: Xe
|
|
150
130
|
},
|
|
151
131
|
props: {
|
|
152
132
|
disabled: Boolean,
|
|
153
133
|
dialog: Boolean,
|
|
154
134
|
upload: {
|
|
155
135
|
type: Boolean,
|
|
156
|
-
default:
|
|
136
|
+
default: !0
|
|
157
137
|
}
|
|
158
138
|
},
|
|
159
139
|
emits: {
|
|
@@ -162,120 +142,88 @@ var _sfc_main$3 = defineComponent({
|
|
|
162
142
|
fly: null
|
|
163
143
|
},
|
|
164
144
|
methods: {
|
|
165
|
-
getFile(
|
|
166
|
-
this.$emit("upload",
|
|
145
|
+
getFile(e) {
|
|
146
|
+
this.$emit("upload", e);
|
|
167
147
|
},
|
|
168
148
|
uploadClick(e) {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
target.click();
|
|
149
|
+
const t = e.target.querySelector("input[type=file]");
|
|
150
|
+
t && t.click();
|
|
172
151
|
}
|
|
173
152
|
}
|
|
174
153
|
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const _component_Edit = resolveComponent("Edit");
|
|
181
|
-
const _component_ElButton = resolveComponent("ElButton");
|
|
182
|
-
const _component_MapLocation = resolveComponent("MapLocation");
|
|
183
|
-
const _component_ElButtonGroup = resolveComponent("ElButtonGroup");
|
|
184
|
-
return openBlock(), createBlock(_component_ElButtonGroup, null, {
|
|
185
|
-
default: withCtx(() => [
|
|
186
|
-
_ctx.upload ? (openBlock(), createBlock(_component_ElUpload, {
|
|
154
|
+
function dt(e, t, o, n, r, a) {
|
|
155
|
+
const l = h("Upload"), i = h("ElIcon"), s = h("ElUpload"), c = h("Edit"), f = h("ElButton"), p = h("MapLocation"), m = h("ElButtonGroup");
|
|
156
|
+
return w(), _(m, null, {
|
|
157
|
+
default: v(() => [
|
|
158
|
+
e.upload ? (w(), _(s, {
|
|
187
159
|
key: 0,
|
|
188
160
|
class: "el-button el-button--default vkf-esri-input-geojson__upload",
|
|
189
161
|
action: "",
|
|
190
162
|
accept: "file",
|
|
191
|
-
multiple:
|
|
192
|
-
"show-file-list":
|
|
193
|
-
"auto-upload":
|
|
194
|
-
"on-change":
|
|
195
|
-
disabled:
|
|
196
|
-
onClick:
|
|
163
|
+
multiple: !1,
|
|
164
|
+
"show-file-list": !1,
|
|
165
|
+
"auto-upload": !1,
|
|
166
|
+
"on-change": e.getFile,
|
|
167
|
+
disabled: e.disabled,
|
|
168
|
+
onClick: e.uploadClick
|
|
197
169
|
}, {
|
|
198
|
-
default:
|
|
199
|
-
|
|
200
|
-
default:
|
|
201
|
-
|
|
170
|
+
default: v(() => [
|
|
171
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
172
|
+
default: v(() => [
|
|
173
|
+
y(l)
|
|
202
174
|
]),
|
|
203
175
|
_: 1
|
|
204
|
-
/* STABLE */
|
|
205
176
|
})
|
|
206
177
|
]),
|
|
207
178
|
_: 1
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
_ctx.dialog ? (openBlock(), createBlock(_component_ElButton, {
|
|
179
|
+
}, 8, ["on-change", "disabled", "onClick"])) : O("", !0),
|
|
180
|
+
e.dialog ? (w(), _(f, {
|
|
211
181
|
key: 1,
|
|
212
|
-
disabled:
|
|
213
|
-
onClick:
|
|
182
|
+
disabled: e.disabled,
|
|
183
|
+
onClick: t[0] || (t[0] = (g) => e.$emit("edit"))
|
|
214
184
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
|
|
217
|
-
default:
|
|
218
|
-
|
|
185
|
+
default: v(() => [
|
|
186
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
187
|
+
default: v(() => [
|
|
188
|
+
y(c)
|
|
219
189
|
]),
|
|
220
190
|
_: 1
|
|
221
|
-
/* STABLE */
|
|
222
191
|
})
|
|
223
192
|
]),
|
|
224
193
|
_: 1
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("fly"))
|
|
194
|
+
}, 8, ["disabled"])) : O("", !0),
|
|
195
|
+
y(f, {
|
|
196
|
+
onClick: t[1] || (t[1] = (g) => e.$emit("fly"))
|
|
229
197
|
}, {
|
|
230
|
-
default:
|
|
231
|
-
|
|
232
|
-
default:
|
|
233
|
-
|
|
198
|
+
default: v(() => [
|
|
199
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
200
|
+
default: v(() => [
|
|
201
|
+
y(p)
|
|
234
202
|
]),
|
|
235
203
|
_: 1
|
|
236
|
-
/* STABLE */
|
|
237
204
|
})
|
|
238
205
|
]),
|
|
239
206
|
_: 1
|
|
240
|
-
/* STABLE */
|
|
241
207
|
})
|
|
242
208
|
]),
|
|
243
209
|
_: 1
|
|
244
|
-
/* STABLE */
|
|
245
210
|
});
|
|
246
211
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
212
|
+
const pt = /* @__PURE__ */ Y(ct, [["render", dt]]), vt = /* @__PURE__ */ F({
|
|
250
213
|
__name: "default-view",
|
|
251
|
-
setup(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return __returned__;
|
|
214
|
+
setup(e) {
|
|
215
|
+
return (t, o) => (w(), _(te(ce), null, {
|
|
216
|
+
default: v(() => [
|
|
217
|
+
y(te(de)),
|
|
218
|
+
A(t.$slots, "default")
|
|
219
|
+
]),
|
|
220
|
+
_: 3
|
|
221
|
+
}));
|
|
260
222
|
}
|
|
261
|
-
})
|
|
262
|
-
|
|
263
|
-
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
264
|
-
return openBlock(), createBlock($setup["VaMapView"], null, {
|
|
265
|
-
default: withCtx(() => [
|
|
266
|
-
createVNode($setup["VaTdtBasemap"]),
|
|
267
|
-
renderSlot(_ctx.$slots, "default")
|
|
268
|
-
]),
|
|
269
|
-
_: 3
|
|
270
|
-
/* FORWARDED */
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
var DefaultView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/esri-input-geojson/src/default-view.vue"]]);
|
|
274
|
-
|
|
275
|
-
var _sfc_main$1 = defineComponent({
|
|
223
|
+
}), yt = F({
|
|
276
224
|
components: {
|
|
277
|
-
VaTdtBasemap,
|
|
278
|
-
VaMapView
|
|
225
|
+
VaTdtBasemap: de,
|
|
226
|
+
VaMapView: ce
|
|
279
227
|
},
|
|
280
228
|
props: {
|
|
281
229
|
view: {
|
|
@@ -284,1313 +232,757 @@ var _sfc_main$1 = defineComponent({
|
|
|
284
232
|
},
|
|
285
233
|
viewComponent: {
|
|
286
234
|
type: [Object, Function],
|
|
287
|
-
default: () =>
|
|
235
|
+
default: () => vt
|
|
288
236
|
},
|
|
289
237
|
viewComponentAttrs: {
|
|
290
238
|
type: Object,
|
|
291
239
|
default: () => ({})
|
|
292
240
|
}
|
|
293
241
|
},
|
|
294
|
-
setup(
|
|
295
|
-
|
|
296
|
-
provide("vaView", props.view);
|
|
297
|
-
if (props.view instanceof MapView) {
|
|
298
|
-
provide("vaMapView", props.view);
|
|
299
|
-
}
|
|
300
|
-
if (props.view instanceof SceneView) {
|
|
301
|
-
provide("vaSceneView", props.view);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return {};
|
|
242
|
+
setup(e) {
|
|
243
|
+
return e.view && (G("vaView", e.view), e.view instanceof je && G("vaMapView", e.view), e.view instanceof et && G("vaSceneView", e.view)), {};
|
|
305
244
|
}
|
|
306
245
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
renderSlot(_ctx.$slots, "default")
|
|
315
|
-
]),
|
|
316
|
-
_: 3
|
|
317
|
-
/* FORWARDED */
|
|
318
|
-
},
|
|
319
|
-
16
|
|
320
|
-
/* FULL_PROPS */
|
|
321
|
-
)) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
246
|
+
function ht(e, t, o, n, r, a) {
|
|
247
|
+
return e.view ? A(e.$slots, "default", { key: 1 }) : (w(), _(Te(e.viewComponent), Re(fe({ key: 0 }, e.viewComponentAttrs)), {
|
|
248
|
+
default: v(() => [
|
|
249
|
+
A(e.$slots, "default")
|
|
250
|
+
]),
|
|
251
|
+
_: 3
|
|
252
|
+
}, 16));
|
|
322
253
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this._array = null;
|
|
327
|
-
return Promise.resolve();
|
|
254
|
+
const mt = /* @__PURE__ */ Y(yt, [["render", ht]]);
|
|
255
|
+
function gt() {
|
|
256
|
+
return this._array = null, Promise.resolve();
|
|
328
257
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this._array = null;
|
|
333
|
-
return Promise.resolve(array ? {done: false, value: array} : {done: true, value: undefined});
|
|
258
|
+
function wt() {
|
|
259
|
+
var e = this._array;
|
|
260
|
+
return this._array = null, Promise.resolve(e ? { done: !1, value: e } : { done: !0, value: void 0 });
|
|
334
261
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return new ArraySource(array instanceof Uint8Array ? array : new Uint8Array(array));
|
|
262
|
+
function R(e) {
|
|
263
|
+
return new Q(e instanceof Uint8Array ? e : new Uint8Array(e));
|
|
338
264
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
this._array = array;
|
|
265
|
+
function Q(e) {
|
|
266
|
+
this._array = e;
|
|
342
267
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return fetch(url).then(function(response) {
|
|
349
|
-
return response.body && response.body.getReader
|
|
350
|
-
? response.body.getReader()
|
|
351
|
-
: response.arrayBuffer().then(array);
|
|
268
|
+
Q.prototype.read = wt;
|
|
269
|
+
Q.prototype.cancel = gt;
|
|
270
|
+
function _t(e) {
|
|
271
|
+
return fetch(e).then(function(t) {
|
|
272
|
+
return t.body && t.body.getReader ? t.body.getReader() : t.arrayBuffer().then(R);
|
|
352
273
|
});
|
|
353
274
|
}
|
|
354
|
-
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
request.onerror = reject;
|
|
361
|
-
request.ontimeout = reject;
|
|
362
|
-
request.open("GET", url, true);
|
|
363
|
-
request.send();
|
|
275
|
+
function bt(e) {
|
|
276
|
+
return new Promise(function(t, o) {
|
|
277
|
+
var n = new XMLHttpRequest();
|
|
278
|
+
n.responseType = "arraybuffer", n.onload = function() {
|
|
279
|
+
t(R(n.response));
|
|
280
|
+
}, n.onerror = o, n.ontimeout = o, n.open("GET", e, !0), n.send();
|
|
364
281
|
});
|
|
365
282
|
}
|
|
366
|
-
|
|
367
|
-
function
|
|
368
|
-
return (typeof fetch === "function" ? fetchPath : requestPath)(path);
|
|
283
|
+
function N(e) {
|
|
284
|
+
return (typeof fetch == "function" ? _t : bt)(e);
|
|
369
285
|
}
|
|
370
|
-
|
|
371
|
-
function
|
|
372
|
-
return typeof source.read === "function" ? source : source.getReader();
|
|
286
|
+
function ie(e) {
|
|
287
|
+
return typeof e.read == "function" ? e : e.getReader();
|
|
373
288
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
function slice_cancel() {
|
|
289
|
+
var W = new Uint8Array(0);
|
|
290
|
+
function kt() {
|
|
378
291
|
return this._source.cancel();
|
|
379
292
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
if (!
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
return that._source.read().then(function(result) {
|
|
393
|
-
that._array = empty;
|
|
394
|
-
that._index = 0;
|
|
395
|
-
return result.done ? (array.length > 0
|
|
396
|
-
? {done: false, value: array}
|
|
397
|
-
: {done: true, value: undefined})
|
|
398
|
-
: {done: false, value: concat$1(array, result.value)};
|
|
293
|
+
function Ct(e, t) {
|
|
294
|
+
if (!e.length)
|
|
295
|
+
return t;
|
|
296
|
+
if (!t.length)
|
|
297
|
+
return e;
|
|
298
|
+
var o = new Uint8Array(e.length + t.length);
|
|
299
|
+
return o.set(e), o.set(t, e.length), o;
|
|
300
|
+
}
|
|
301
|
+
function St() {
|
|
302
|
+
var e = this, t = e._array.subarray(e._index);
|
|
303
|
+
return e._source.read().then(function(o) {
|
|
304
|
+
return e._array = W, e._index = 0, o.done ? t.length > 0 ? { done: !1, value: t } : { done: !0, value: void 0 } : { done: !1, value: Ct(t, o.value) };
|
|
399
305
|
});
|
|
400
306
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
// Otherwise, read chunks repeatedly until the request is fulfilled.
|
|
412
|
-
var array = new Uint8Array(length);
|
|
413
|
-
array.set(this._array.subarray(this._index));
|
|
414
|
-
return (function read() {
|
|
415
|
-
return that._source.read().then(function(result) {
|
|
416
|
-
|
|
417
|
-
// When done, it’s possible the request wasn’t fully fullfilled!
|
|
418
|
-
// If so, the pre-allocated array is too big and needs slicing.
|
|
419
|
-
if (result.done) {
|
|
420
|
-
that._array = empty;
|
|
421
|
-
that._index = 0;
|
|
422
|
-
return index > 0 ? array.subarray(0, index) : null;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// If this chunk fulfills the request, return the resulting array.
|
|
426
|
-
if (index + result.value.length >= length) {
|
|
427
|
-
that._array = result.value;
|
|
428
|
-
that._index = length - index;
|
|
429
|
-
array.set(result.value.subarray(0, length - index), index);
|
|
430
|
-
return array;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// Otherwise copy this chunk into the array, then read the next chunk.
|
|
434
|
-
array.set(result.value, index);
|
|
435
|
-
index += result.value.length;
|
|
436
|
-
return read();
|
|
307
|
+
function Et(e) {
|
|
308
|
+
if ((e |= 0) < 0)
|
|
309
|
+
throw new Error("invalid length");
|
|
310
|
+
var t = this, o = this._array.length - this._index;
|
|
311
|
+
if (this._index + e <= this._array.length)
|
|
312
|
+
return Promise.resolve(this._array.subarray(this._index, this._index += e));
|
|
313
|
+
var n = new Uint8Array(e);
|
|
314
|
+
return n.set(this._array.subarray(this._index)), function r() {
|
|
315
|
+
return t._source.read().then(function(a) {
|
|
316
|
+
return a.done ? (t._array = W, t._index = 0, o > 0 ? n.subarray(0, o) : null) : o + a.value.length >= e ? (t._array = a.value, t._index = e - o, n.set(a.value.subarray(0, e - o), o), n) : (n.set(a.value, o), o += a.value.length, r());
|
|
437
317
|
});
|
|
438
|
-
}
|
|
318
|
+
}();
|
|
439
319
|
}
|
|
440
|
-
|
|
441
|
-
function
|
|
442
|
-
return typeof source.slice === "function" ? source :
|
|
443
|
-
new SliceSource(typeof source.read === "function" ? source
|
|
444
|
-
: source.getReader());
|
|
320
|
+
function pe(e) {
|
|
321
|
+
return typeof e.slice == "function" ? e : new L(typeof e.read == "function" ? e : e.getReader());
|
|
445
322
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
this._source = source;
|
|
449
|
-
this._array = empty;
|
|
450
|
-
this._index = 0;
|
|
323
|
+
function L(e) {
|
|
324
|
+
this._source = e, this._array = W, this._index = 0;
|
|
451
325
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
function dbf_cancel() {
|
|
326
|
+
L.prototype.read = St;
|
|
327
|
+
L.prototype.slice = Et;
|
|
328
|
+
L.prototype.cancel = kt;
|
|
329
|
+
function Vt() {
|
|
458
330
|
return this._source.cancel();
|
|
459
331
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
return /^[nf]$/i.test(value) ? false
|
|
463
|
-
: /^[yt]$/i.test(value) ? true
|
|
464
|
-
: null;
|
|
332
|
+
function Pt(e) {
|
|
333
|
+
return /^[nf]$/i.test(e) ? !1 : /^[yt]$/i.test(e) ? !0 : null;
|
|
465
334
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
return new Date(+value.substring(0, 4), value.substring(4, 6) - 1, +value.substring(6, 8));
|
|
335
|
+
function It(e) {
|
|
336
|
+
return new Date(+e.substring(0, 4), e.substring(4, 6) - 1, +e.substring(6, 8));
|
|
469
337
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return !(value = value.trim()) || isNaN(value = +value) ? null : value;
|
|
338
|
+
function M(e) {
|
|
339
|
+
return !(e = e.trim()) || isNaN(e = +e) ? null : e;
|
|
473
340
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
return value.trim() || null;
|
|
341
|
+
function Mt(e) {
|
|
342
|
+
return e.trim() || null;
|
|
477
343
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
N: readNumber
|
|
344
|
+
var Ot = {
|
|
345
|
+
B: M,
|
|
346
|
+
C: Mt,
|
|
347
|
+
D: It,
|
|
348
|
+
F: M,
|
|
349
|
+
L: Pt,
|
|
350
|
+
M,
|
|
351
|
+
N: M
|
|
487
352
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
return p;
|
|
495
|
-
}, {})} : {done: true, value: undefined};
|
|
353
|
+
function At() {
|
|
354
|
+
var e = this, t = 1;
|
|
355
|
+
return e._source.slice(e._recordLength).then(function(o) {
|
|
356
|
+
return o && o[0] !== 26 ? { done: !1, value: e._fields.reduce(function(n, r) {
|
|
357
|
+
return n[r.name] = Ot[r.type](e._decode(o.subarray(t, t += r.length))), n;
|
|
358
|
+
}, {}) } : { done: !0, value: void 0 };
|
|
496
359
|
});
|
|
497
360
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
return new DataView(array.buffer, array.byteOffset, array.byteLength);
|
|
361
|
+
function C(e) {
|
|
362
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
501
363
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
return source.slice(head.getUint16(8, true) - 32).then(function(array) {
|
|
508
|
-
return new Dbf(source, decoder, head, view(array));
|
|
364
|
+
function Tt(e, t) {
|
|
365
|
+
return e = pe(e), e.slice(32).then(function(o) {
|
|
366
|
+
var n = C(o);
|
|
367
|
+
return e.slice(n.getUint16(8, !0) - 32).then(function(r) {
|
|
368
|
+
return new ve(e, t, n, C(r));
|
|
509
369
|
});
|
|
510
370
|
});
|
|
511
371
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
this._fields = [];
|
|
518
|
-
for (var n = 0; body.getUint8(n) !== 0x0d; n += 32) {
|
|
519
|
-
for (var j = 0; j < 11; ++j) if (body.getUint8(n + j) === 0) break;
|
|
372
|
+
function ve(e, t, o, n) {
|
|
373
|
+
this._source = e, this._decode = t.decode.bind(t), this._recordLength = o.getUint16(10, !0), this._fields = [];
|
|
374
|
+
for (var r = 0; n.getUint8(r) !== 13; r += 32) {
|
|
375
|
+
for (var a = 0; a < 11 && n.getUint8(r + a) !== 0; ++a)
|
|
376
|
+
;
|
|
520
377
|
this._fields.push({
|
|
521
|
-
name: this._decode(new Uint8Array(
|
|
522
|
-
type: String.fromCharCode(
|
|
523
|
-
length:
|
|
378
|
+
name: this._decode(new Uint8Array(n.buffer, n.byteOffset + r, a)),
|
|
379
|
+
type: String.fromCharCode(n.getUint8(r + 11)),
|
|
380
|
+
length: n.getUint8(r + 16)
|
|
524
381
|
});
|
|
525
382
|
}
|
|
526
383
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
function cancel() {
|
|
384
|
+
var ye = ve.prototype;
|
|
385
|
+
ye.read = At;
|
|
386
|
+
ye.cancel = Vt;
|
|
387
|
+
function Rt() {
|
|
533
388
|
return this._source.cancel();
|
|
534
389
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return {type: "MultiPoint", coordinates:
|
|
390
|
+
function J(e) {
|
|
391
|
+
var t = 40, o, n = e.getInt32(36, !0), r = new Array(n);
|
|
392
|
+
for (o = 0; o < n; ++o, t += 16)
|
|
393
|
+
r[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
394
|
+
return { type: "MultiPoint", coordinates: r };
|
|
540
395
|
}
|
|
541
|
-
|
|
542
|
-
function parseNull() {
|
|
396
|
+
function Ft() {
|
|
543
397
|
return null;
|
|
544
398
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
for (
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
function ringContainsSome(ring, hole) {
|
|
582
|
-
var i = -1, n = hole.length, c;
|
|
583
|
-
while (++i < n) {
|
|
584
|
-
if (c = ringContains(ring, hole[i])) {
|
|
585
|
-
return c > 0;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
function ringContains(ring, point) {
|
|
592
|
-
var x = point[0], y = point[1], contains = -1;
|
|
593
|
-
for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
|
|
594
|
-
var pi = ring[i], xi = pi[0], yi = pi[1],
|
|
595
|
-
pj = ring[j], xj = pj[0], yj = pj[1];
|
|
596
|
-
if (segmentContains(pi, pj, point)) {
|
|
399
|
+
function q(e) {
|
|
400
|
+
return { type: "Point", coordinates: [e.getFloat64(4, !0), e.getFloat64(12, !0)] };
|
|
401
|
+
}
|
|
402
|
+
function z(e) {
|
|
403
|
+
var t = 44, o, n = e.getInt32(36, !0), r = e.getInt32(40, !0), a = new Array(n), l = new Array(r), i = [], s = [];
|
|
404
|
+
for (o = 0; o < n; ++o, t += 4)
|
|
405
|
+
a[o] = e.getInt32(t, !0);
|
|
406
|
+
for (o = 0; o < r; ++o, t += 16)
|
|
407
|
+
l[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
408
|
+
return a.forEach(function(c, f) {
|
|
409
|
+
var p = l.slice(c, a[f + 1]);
|
|
410
|
+
Lt(p) ? i.push([p]) : s.push(p);
|
|
411
|
+
}), s.forEach(function(c) {
|
|
412
|
+
i.some(function(f) {
|
|
413
|
+
if ($t(f[0], c))
|
|
414
|
+
return f.push(c), !0;
|
|
415
|
+
}) || i.push([c]);
|
|
416
|
+
}), i.length === 1 ? { type: "Polygon", coordinates: i[0] } : { type: "MultiPolygon", coordinates: i };
|
|
417
|
+
}
|
|
418
|
+
function Lt(e) {
|
|
419
|
+
if ((o = e.length) < 4)
|
|
420
|
+
return !1;
|
|
421
|
+
for (var t = 0, o, n = e[o - 1][1] * e[0][0] - e[o - 1][0] * e[0][1]; ++t < o; )
|
|
422
|
+
n += e[t - 1][1] * e[t][0] - e[t - 1][0] * e[t][1];
|
|
423
|
+
return n >= 0;
|
|
424
|
+
}
|
|
425
|
+
function $t(e, t) {
|
|
426
|
+
for (var o = -1, n = t.length, r; ++o < n; )
|
|
427
|
+
if (r = Bt(e, t[o]))
|
|
428
|
+
return r > 0;
|
|
429
|
+
return !1;
|
|
430
|
+
}
|
|
431
|
+
function Bt(e, t) {
|
|
432
|
+
for (var o = t[0], n = t[1], r = -1, a = 0, l = e.length, i = l - 1; a < l; i = a++) {
|
|
433
|
+
var s = e[a], c = s[0], f = s[1], p = e[i], m = p[0], g = p[1];
|
|
434
|
+
if (Ut(s, p, t))
|
|
597
435
|
return 0;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
var
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
if (array == null) return {done: true, value: undefined};
|
|
636
|
-
var header = view(array);
|
|
637
|
-
|
|
638
|
-
// If the record starts with an invalid shape type (see #36), scan ahead in
|
|
639
|
-
// four-byte increments to find the next valid record, identified by the
|
|
640
|
-
// expected index, a non-empty content length and a valid shape type.
|
|
641
|
-
function skip() {
|
|
642
|
-
return that._source.slice(4).then(function(chunk) {
|
|
643
|
-
if (chunk == null) return {done: true, value: undefined};
|
|
644
|
-
header = view(array = concat(array.slice(4), chunk));
|
|
645
|
-
return header.getInt32(0, false) !== that._index ? skip() : read();
|
|
436
|
+
f > n != g > n && o < (m - c) * (n - f) / (g - f) + c && (r = -r);
|
|
437
|
+
}
|
|
438
|
+
return r;
|
|
439
|
+
}
|
|
440
|
+
function Ut(e, t, o) {
|
|
441
|
+
var n = o[0] - e[0], r = o[1] - e[1];
|
|
442
|
+
if (n === 0 && r === 0)
|
|
443
|
+
return !0;
|
|
444
|
+
var a = t[0] - e[0], l = t[1] - e[1];
|
|
445
|
+
if (a === 0 && l === 0)
|
|
446
|
+
return !1;
|
|
447
|
+
var i = (n * a + r * l) / (a * a + l * l);
|
|
448
|
+
return i < 0 || i > 1 ? !1 : i === 0 || i === 1 ? !0 : i * a === n && i * l === r;
|
|
449
|
+
}
|
|
450
|
+
function Z(e) {
|
|
451
|
+
var t = 44, o, n = e.getInt32(36, !0), r = e.getInt32(40, !0), a = new Array(n), l = new Array(r);
|
|
452
|
+
for (o = 0; o < n; ++o, t += 4)
|
|
453
|
+
a[o] = e.getInt32(t, !0);
|
|
454
|
+
for (o = 0; o < r; ++o, t += 16)
|
|
455
|
+
l[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
456
|
+
return n === 1 ? { type: "LineString", coordinates: l } : { type: "MultiLineString", coordinates: a.map(function(i, s) {
|
|
457
|
+
return l.slice(i, a[s + 1]);
|
|
458
|
+
}) };
|
|
459
|
+
}
|
|
460
|
+
function ue(e, t) {
|
|
461
|
+
var o = new Uint8Array(e.length + t.length);
|
|
462
|
+
return o.set(e, 0), o.set(t, e.length), o;
|
|
463
|
+
}
|
|
464
|
+
function Gt() {
|
|
465
|
+
var e = this;
|
|
466
|
+
return ++e._index, e._source.slice(12).then(function(t) {
|
|
467
|
+
if (t == null)
|
|
468
|
+
return { done: !0, value: void 0 };
|
|
469
|
+
var o = C(t);
|
|
470
|
+
function n() {
|
|
471
|
+
return e._source.slice(4).then(function(a) {
|
|
472
|
+
return a == null ? { done: !0, value: void 0 } : (o = C(t = ue(t.slice(4), a)), o.getInt32(0, !1) !== e._index ? n() : r());
|
|
646
473
|
});
|
|
647
474
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
var length = header.getInt32(4, false) * 2 - 4, type = header.getInt32(8, true);
|
|
653
|
-
return length < 0 || (type && type !== that._type) ? skip() : that._source.slice(length).then(function(chunk) {
|
|
654
|
-
return {done: false, value: type ? that._parse(view(concat(array.slice(8), chunk))) : null};
|
|
475
|
+
function r() {
|
|
476
|
+
var a = o.getInt32(4, !1) * 2 - 4, l = o.getInt32(8, !0);
|
|
477
|
+
return a < 0 || l && l !== e._type ? n() : e._source.slice(a).then(function(i) {
|
|
478
|
+
return { done: !1, value: l ? e._parse(C(ue(t.slice(8), i))) : null };
|
|
655
479
|
});
|
|
656
480
|
}
|
|
657
|
-
|
|
658
|
-
return read();
|
|
481
|
+
return r();
|
|
659
482
|
});
|
|
660
483
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
13:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
484
|
+
var se = {
|
|
485
|
+
0: Ft,
|
|
486
|
+
1: q,
|
|
487
|
+
3: Z,
|
|
488
|
+
5: z,
|
|
489
|
+
8: J,
|
|
490
|
+
11: q,
|
|
491
|
+
// PointZ
|
|
492
|
+
13: Z,
|
|
493
|
+
// PolyLineZ
|
|
494
|
+
15: z,
|
|
495
|
+
// PolygonZ
|
|
496
|
+
18: J,
|
|
497
|
+
// MultiPointZ
|
|
498
|
+
21: q,
|
|
499
|
+
// PointM
|
|
500
|
+
23: Z,
|
|
501
|
+
// PolyLineM
|
|
502
|
+
25: z,
|
|
503
|
+
// PolygonM
|
|
504
|
+
28: J
|
|
505
|
+
// MultiPointM
|
|
676
506
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
return source.slice(100).then(function(array) {
|
|
681
|
-
return new Shp(source, view(array));
|
|
507
|
+
function Dt(e) {
|
|
508
|
+
return e = pe(e), e.slice(100).then(function(t) {
|
|
509
|
+
return new he(e, C(t));
|
|
682
510
|
});
|
|
683
511
|
}
|
|
684
|
-
function
|
|
685
|
-
var
|
|
686
|
-
if (!(
|
|
687
|
-
|
|
688
|
-
this._type =
|
|
689
|
-
this._index = 0;
|
|
690
|
-
this._parse = parsers[type];
|
|
691
|
-
this.bbox = [header.getFloat64(36, true), header.getFloat64(44, true), header.getFloat64(52, true), header.getFloat64(60, true)];
|
|
512
|
+
function he(e, t) {
|
|
513
|
+
var o = t.getInt32(32, !0);
|
|
514
|
+
if (!(o in se))
|
|
515
|
+
throw new Error("unsupported shape type: " + o);
|
|
516
|
+
this._source = e, this._type = o, this._index = 0, this._parse = se[o], this.bbox = [t.getFloat64(36, !0), t.getFloat64(44, !0), t.getFloat64(52, !0), t.getFloat64(60, !0)];
|
|
692
517
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
function shapefile_cancel() {
|
|
518
|
+
var me = he.prototype;
|
|
519
|
+
me.read = Gt;
|
|
520
|
+
me.cancel = Rt;
|
|
521
|
+
function Nt() {
|
|
522
|
+
}
|
|
523
|
+
function Jt() {
|
|
701
524
|
return Promise.all([
|
|
702
525
|
this._dbf && this._dbf.cancel(),
|
|
703
526
|
this._shp.cancel()
|
|
704
|
-
]).then(
|
|
527
|
+
]).then(Nt);
|
|
705
528
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
var that = this;
|
|
529
|
+
function qt() {
|
|
530
|
+
var e = this;
|
|
709
531
|
return Promise.all([
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
]).then(function(
|
|
713
|
-
var
|
|
714
|
-
return
|
|
715
|
-
done:
|
|
532
|
+
e._dbf ? e._dbf.read() : { value: {} },
|
|
533
|
+
e._shp.read()
|
|
534
|
+
]).then(function(t) {
|
|
535
|
+
var o = t[0], n = t[1];
|
|
536
|
+
return n.done ? n : {
|
|
537
|
+
done: !1,
|
|
716
538
|
value: {
|
|
717
539
|
type: "Feature",
|
|
718
|
-
properties:
|
|
719
|
-
geometry:
|
|
540
|
+
properties: o.value,
|
|
541
|
+
geometry: n.value
|
|
720
542
|
}
|
|
721
543
|
};
|
|
722
544
|
});
|
|
723
545
|
}
|
|
724
|
-
|
|
725
|
-
function shapefile(shpSource, dbfSource, decoder) {
|
|
546
|
+
function zt(e, t, o) {
|
|
726
547
|
return Promise.all([
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
]).then(function(
|
|
730
|
-
return new
|
|
548
|
+
Dt(e),
|
|
549
|
+
t && Tt(t, o)
|
|
550
|
+
]).then(function(n) {
|
|
551
|
+
return new ge(n[0], n[1]);
|
|
731
552
|
});
|
|
732
553
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
function open(shp, dbf, options) {
|
|
745
|
-
if (typeof dbf === "string") {
|
|
746
|
-
if (!/\.dbf$/.test(dbf)) dbf += ".dbf";
|
|
747
|
-
dbf = path(dbf);
|
|
748
|
-
} else if (dbf instanceof ArrayBuffer || dbf instanceof Uint8Array) {
|
|
749
|
-
dbf = array(dbf);
|
|
750
|
-
} else if (dbf != null) {
|
|
751
|
-
dbf = stream(dbf);
|
|
752
|
-
}
|
|
753
|
-
if (typeof shp === "string") {
|
|
754
|
-
if (!/\.shp$/.test(shp)) shp += ".shp";
|
|
755
|
-
if (dbf === undefined) dbf = path(shp.substring(0, shp.length - 4) + ".dbf").catch(function() {});
|
|
756
|
-
shp = path(shp);
|
|
757
|
-
} else if (shp instanceof ArrayBuffer || shp instanceof Uint8Array) {
|
|
758
|
-
shp = array(shp);
|
|
759
|
-
} else {
|
|
760
|
-
shp = stream(shp);
|
|
761
|
-
}
|
|
762
|
-
return Promise.all([shp, dbf]).then(function(sources) {
|
|
763
|
-
var shp = sources[0], dbf = sources[1], encoding = "windows-1252";
|
|
764
|
-
return shapefile(shp, dbf, dbf && new TextDecoder(encoding));
|
|
554
|
+
function ge(e, t) {
|
|
555
|
+
this._shp = e, this._dbf = t, this.bbox = e.bbox;
|
|
556
|
+
}
|
|
557
|
+
var we = ge.prototype;
|
|
558
|
+
we.read = qt;
|
|
559
|
+
we.cancel = Jt;
|
|
560
|
+
function Zt(e, t, o) {
|
|
561
|
+
return typeof t == "string" ? (/\.dbf$/.test(t) || (t += ".dbf"), t = N(t)) : t instanceof ArrayBuffer || t instanceof Uint8Array ? t = R(t) : t != null && (t = ie(t)), typeof e == "string" ? (/\.shp$/.test(e) || (e += ".shp"), t === void 0 && (t = N(e.substring(0, e.length - 4) + ".dbf").catch(function() {
|
|
562
|
+
})), e = N(e)) : e instanceof ArrayBuffer || e instanceof Uint8Array ? e = R(e) : e = ie(e), Promise.all([e, t]).then(function(n) {
|
|
563
|
+
var r = n[0], a = n[1], l = "windows-1252";
|
|
564
|
+
return zt(r, a, a && new TextDecoder(l));
|
|
765
565
|
});
|
|
766
566
|
}
|
|
767
|
-
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
type: "FeatureCollection",
|
|
774
|
-
features: []
|
|
775
|
-
};
|
|
776
|
-
reader.onload = function() {
|
|
777
|
-
open(this.result).then((source) => source.read().then(
|
|
778
|
-
function log(result) {
|
|
779
|
-
if (!result.done) {
|
|
780
|
-
data.features.push(result.value);
|
|
781
|
-
source.read().then(log);
|
|
782
|
-
} else {
|
|
783
|
-
if (result.value) {
|
|
784
|
-
data.features.push(result.value);
|
|
785
|
-
}
|
|
786
|
-
resolve(data);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
)).catch(reject);
|
|
790
|
-
};
|
|
791
|
-
});
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
const toGeojson = (file) => {
|
|
795
|
-
const actions = {
|
|
796
|
-
shp: shpToGeojson
|
|
567
|
+
const Ht = (e) => new Promise((t, o) => {
|
|
568
|
+
const n = new FileReader();
|
|
569
|
+
n.readAsArrayBuffer(e);
|
|
570
|
+
const r = {
|
|
571
|
+
type: "FeatureCollection",
|
|
572
|
+
features: []
|
|
797
573
|
};
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
574
|
+
n.onload = function() {
|
|
575
|
+
Zt(this.result).then((a) => a.read().then(
|
|
576
|
+
function l(i) {
|
|
577
|
+
i.done ? (i.value && r.features.push(i.value), t(r)) : (r.features.push(i.value), a.read().then(l));
|
|
578
|
+
}
|
|
579
|
+
)).catch(o);
|
|
580
|
+
};
|
|
581
|
+
}), xt = (e) => {
|
|
582
|
+
const t = {
|
|
583
|
+
shp: Ht
|
|
584
|
+
};
|
|
585
|
+
return new Promise((o, n) => {
|
|
586
|
+
const r = e.name.split(".").pop();
|
|
587
|
+
r && t[r] ? o(t[r](e)) : n(new Error(`Can't resolve the .${r} file`));
|
|
805
588
|
});
|
|
806
589
|
};
|
|
807
|
-
|
|
808
590
|
/* @preserve
|
|
809
591
|
* @terraformer/arcgis - v2.1.1 - MIT
|
|
810
592
|
* Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc.
|
|
811
593
|
* Tue Aug 02 2022 14:23:48 GMT-0700 (Pacific Daylight Time)
|
|
812
594
|
*/
|
|
813
|
-
|
|
814
|
-
*
|
|
815
|
-
|
|
816
|
-
var
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
var
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
return
|
|
851
|
-
}
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
var closeRing = function closeRing(coordinates) {
|
|
868
|
-
if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {
|
|
869
|
-
coordinates.push(coordinates[0]);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
return coordinates;
|
|
873
|
-
}; // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring
|
|
874
|
-
// or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-
|
|
875
|
-
// points-are-in-clockwise-order
|
|
876
|
-
|
|
877
|
-
var ringIsClockwise = function ringIsClockwise(ringToTest) {
|
|
878
|
-
var total = 0;
|
|
879
|
-
var i = 0;
|
|
880
|
-
var rLength = ringToTest.length;
|
|
881
|
-
var pt1 = ringToTest[i];
|
|
882
|
-
var pt2;
|
|
883
|
-
|
|
884
|
-
for (i; i < rLength - 1; i++) {
|
|
885
|
-
pt2 = ringToTest[i + 1];
|
|
886
|
-
total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);
|
|
887
|
-
pt1 = pt2;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
return total >= 0;
|
|
891
|
-
}; // This function ensures that rings are oriented in the right directions
|
|
892
|
-
// from http://jsperf.com/cloning-an-object/2
|
|
893
|
-
|
|
894
|
-
var shallowClone = function shallowClone(obj) {
|
|
895
|
-
var target = {};
|
|
896
|
-
|
|
897
|
-
for (var i in obj) {
|
|
898
|
-
// both arcgis attributes and geojson props are just hardcoded keys
|
|
899
|
-
if (obj.hasOwnProperty(i)) {
|
|
900
|
-
// eslint-disable-line no-prototype-builtins
|
|
901
|
-
target[i] = obj[i];
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
return target;
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.
|
|
909
|
-
* Apache-2.0 */
|
|
910
|
-
|
|
911
|
-
var coordinatesContainCoordinates = function coordinatesContainCoordinates(outer, inner) {
|
|
912
|
-
var intersects = arrayIntersectsArray(outer, inner);
|
|
913
|
-
var contains = coordinatesContainPoint(outer, inner[0]);
|
|
914
|
-
|
|
915
|
-
if (!intersects && contains) {
|
|
916
|
-
return true;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
return false;
|
|
920
|
-
}; // do any polygons in this array contain any other polygons in this array?
|
|
921
|
-
// used for checking for holes in arcgis rings
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
var convertRingsToGeoJSON = function convertRingsToGeoJSON(rings) {
|
|
925
|
-
var outerRings = [];
|
|
926
|
-
var holes = [];
|
|
927
|
-
var x; // iterator
|
|
928
|
-
|
|
929
|
-
var outerRing; // current outer ring being evaluated
|
|
930
|
-
|
|
931
|
-
var hole; // current hole being evaluated
|
|
932
|
-
// for each ring
|
|
933
|
-
|
|
934
|
-
for (var r = 0; r < rings.length; r++) {
|
|
935
|
-
var ring = closeRing(rings[r].slice(0));
|
|
936
|
-
|
|
937
|
-
if (ring.length < 4) {
|
|
938
|
-
continue;
|
|
939
|
-
} // is this ring an outer ring? is it clockwise?
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
if (ringIsClockwise(ring)) {
|
|
943
|
-
var polygon = [ring.slice().reverse()]; // wind outer rings counterclockwise for RFC 7946 compliance
|
|
944
|
-
|
|
945
|
-
outerRings.push(polygon); // push to outer rings
|
|
946
|
-
} else {
|
|
947
|
-
holes.push(ring.slice().reverse()); // wind inner rings clockwise for RFC 7946 compliance
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
var uncontainedHoles = []; // while there are holes left...
|
|
952
|
-
|
|
953
|
-
while (holes.length) {
|
|
954
|
-
// pop a hole off out stack
|
|
955
|
-
hole = holes.pop(); // loop over all outer rings and see if they contain our hole.
|
|
956
|
-
|
|
957
|
-
var contained = false;
|
|
958
|
-
|
|
959
|
-
for (x = outerRings.length - 1; x >= 0; x--) {
|
|
960
|
-
outerRing = outerRings[x][0];
|
|
961
|
-
|
|
962
|
-
if (coordinatesContainCoordinates(outerRing, hole)) {
|
|
963
|
-
// the hole is contained push it into our polygon
|
|
964
|
-
outerRings[x].push(hole);
|
|
965
|
-
contained = true;
|
|
595
|
+
var Yt = function(t, o, n, r) {
|
|
596
|
+
var a = (r[0] - n[0]) * (t[1] - n[1]) - (r[1] - n[1]) * (t[0] - n[0]), l = (o[0] - t[0]) * (t[1] - n[1]) - (o[1] - t[1]) * (t[0] - n[0]), i = (r[1] - n[1]) * (o[0] - t[0]) - (r[0] - n[0]) * (o[1] - t[1]);
|
|
597
|
+
if (i !== 0) {
|
|
598
|
+
var s = a / i, c = l / i;
|
|
599
|
+
if (s >= 0 && s <= 1 && c >= 0 && c <= 1)
|
|
600
|
+
return !0;
|
|
601
|
+
}
|
|
602
|
+
return !1;
|
|
603
|
+
}, Xt = function(t, o) {
|
|
604
|
+
for (var n = !1, r = -1, a = t.length, l = a - 1; ++r < a; l = r)
|
|
605
|
+
(t[r][1] <= o[1] && o[1] < t[l][1] || t[l][1] <= o[1] && o[1] < t[r][1]) && o[0] < (t[l][0] - t[r][0]) * (o[1] - t[r][1]) / (t[l][1] - t[r][1]) + t[r][0] && (n = !n);
|
|
606
|
+
return n;
|
|
607
|
+
}, Kt = function(t, o) {
|
|
608
|
+
for (var n = 0; n < t.length; n++)
|
|
609
|
+
if (t[n] !== o[n])
|
|
610
|
+
return !1;
|
|
611
|
+
return !0;
|
|
612
|
+
}, _e = function(t, o) {
|
|
613
|
+
for (var n = 0; n < t.length - 1; n++)
|
|
614
|
+
for (var r = 0; r < o.length - 1; r++)
|
|
615
|
+
if (Yt(t[n], t[n + 1], o[r], o[r + 1]))
|
|
616
|
+
return !0;
|
|
617
|
+
return !1;
|
|
618
|
+
}, H = function(t) {
|
|
619
|
+
return Kt(t[0], t[t.length - 1]) || t.push(t[0]), t;
|
|
620
|
+
}, x = function(t) {
|
|
621
|
+
var o = 0, n = 0, r = t.length, a = t[n], l;
|
|
622
|
+
for (n; n < r - 1; n++)
|
|
623
|
+
l = t[n + 1], o += (l[0] - a[0]) * (l[1] + a[1]), a = l;
|
|
624
|
+
return o >= 0;
|
|
625
|
+
}, be = function(t) {
|
|
626
|
+
var o = {};
|
|
627
|
+
for (var n in t)
|
|
628
|
+
t.hasOwnProperty(n) && (o[n] = t[n]);
|
|
629
|
+
return o;
|
|
630
|
+
}, Qt = function(t, o) {
|
|
631
|
+
var n = _e(t, o), r = Xt(t, o[0]);
|
|
632
|
+
return !!(!n && r);
|
|
633
|
+
}, Wt = function(t) {
|
|
634
|
+
for (var o = [], n = [], r, a, l, i = 0; i < t.length; i++) {
|
|
635
|
+
var s = H(t[i].slice(0));
|
|
636
|
+
if (!(s.length < 4))
|
|
637
|
+
if (x(s)) {
|
|
638
|
+
var c = [s.slice().reverse()];
|
|
639
|
+
o.push(c);
|
|
640
|
+
} else
|
|
641
|
+
n.push(s.slice().reverse());
|
|
642
|
+
}
|
|
643
|
+
for (var f = []; n.length; ) {
|
|
644
|
+
l = n.pop();
|
|
645
|
+
var p = !1;
|
|
646
|
+
for (r = o.length - 1; r >= 0; r--)
|
|
647
|
+
if (a = o[r][0], Qt(a, l)) {
|
|
648
|
+
o[r].push(l), p = !0;
|
|
966
649
|
break;
|
|
967
650
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
while (uncontainedHoles.length) {
|
|
979
|
-
// pop a hole off out stack
|
|
980
|
-
hole = uncontainedHoles.pop(); // loop over all outer rings and see if any intersect our hole.
|
|
981
|
-
|
|
982
|
-
var intersects = false;
|
|
983
|
-
|
|
984
|
-
for (x = outerRings.length - 1; x >= 0; x--) {
|
|
985
|
-
outerRing = outerRings[x][0];
|
|
986
|
-
|
|
987
|
-
if (arrayIntersectsArray(outerRing, hole)) {
|
|
988
|
-
// the hole is contained push it into our polygon
|
|
989
|
-
outerRings[x].push(hole);
|
|
990
|
-
intersects = true;
|
|
651
|
+
p || f.push(l);
|
|
652
|
+
}
|
|
653
|
+
for (; f.length; ) {
|
|
654
|
+
l = f.pop();
|
|
655
|
+
var m = !1;
|
|
656
|
+
for (r = o.length - 1; r >= 0; r--)
|
|
657
|
+
if (a = o[r][0], _e(a, l)) {
|
|
658
|
+
o[r].push(l), m = !0;
|
|
991
659
|
break;
|
|
992
660
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
return {
|
|
1002
|
-
type: 'Polygon',
|
|
1003
|
-
coordinates: outerRings[0]
|
|
1004
|
-
};
|
|
1005
|
-
} else {
|
|
1006
|
-
return {
|
|
1007
|
-
type: 'MultiPolygon',
|
|
1008
|
-
coordinates: outerRings
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
var getId = function getId(attributes, idAttribute) {
|
|
1014
|
-
var keys = ['OBJECTID', 'FID'];
|
|
1015
|
-
|
|
1016
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1017
|
-
var key = keys[i];
|
|
1018
|
-
|
|
1019
|
-
if (key in attributes && (typeof attributes[key] === 'string' || typeof attributes[key] === 'number')) {
|
|
1020
|
-
return attributes[key];
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
throw Error('No valid id attribute found');
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
var arcgisToGeoJSON = function arcgisToGeoJSON(arcgis, idAttribute) {
|
|
1028
|
-
var geojson = {};
|
|
1029
|
-
|
|
1030
|
-
if (arcgis.features) {
|
|
1031
|
-
geojson.type = 'FeatureCollection';
|
|
1032
|
-
geojson.features = [];
|
|
1033
|
-
|
|
1034
|
-
for (var i = 0; i < arcgis.features.length; i++) {
|
|
1035
|
-
geojson.features.push(arcgisToGeoJSON(arcgis.features[i], idAttribute));
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {
|
|
1040
|
-
geojson.type = 'Point';
|
|
1041
|
-
geojson.coordinates = [arcgis.x, arcgis.y];
|
|
1042
|
-
|
|
1043
|
-
if (typeof arcgis.z === 'number') {
|
|
1044
|
-
geojson.coordinates.push(arcgis.z);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
if (arcgis.points) {
|
|
1049
|
-
geojson.type = 'MultiPoint';
|
|
1050
|
-
geojson.coordinates = arcgis.points.slice(0);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
if (arcgis.paths) {
|
|
1054
|
-
if (arcgis.paths.length === 1) {
|
|
1055
|
-
geojson.type = 'LineString';
|
|
1056
|
-
geojson.coordinates = arcgis.paths[0].slice(0);
|
|
1057
|
-
} else {
|
|
1058
|
-
geojson.type = 'MultiLineString';
|
|
1059
|
-
geojson.coordinates = arcgis.paths.slice(0);
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
if (arcgis.rings) {
|
|
1064
|
-
geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
if (typeof arcgis.xmin === 'number' && typeof arcgis.ymin === 'number' && typeof arcgis.xmax === 'number' && typeof arcgis.ymax === 'number') {
|
|
1068
|
-
geojson.type = 'Polygon';
|
|
1069
|
-
geojson.coordinates = [[[arcgis.xmax, arcgis.ymax], [arcgis.xmin, arcgis.ymax], [arcgis.xmin, arcgis.ymin], [arcgis.xmax, arcgis.ymin], [arcgis.xmax, arcgis.ymax]]];
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
if (arcgis.geometry || arcgis.attributes) {
|
|
1073
|
-
geojson.type = 'Feature';
|
|
1074
|
-
geojson.geometry = arcgis.geometry ? arcgisToGeoJSON(arcgis.geometry) : null;
|
|
1075
|
-
geojson.properties = arcgis.attributes ? shallowClone(arcgis.attributes) : null;
|
|
1076
|
-
|
|
1077
|
-
if (arcgis.attributes) {
|
|
1078
|
-
try {
|
|
1079
|
-
geojson.id = getId(arcgis.attributes, idAttribute);
|
|
1080
|
-
} catch (err) {// don't set an id
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
} // if no valid geometry was encountered
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
if (JSON.stringify(geojson.geometry) === JSON.stringify({})) {
|
|
1087
|
-
geojson.geometry = null;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
if (arcgis.spatialReference && arcgis.spatialReference.wkid && arcgis.spatialReference.wkid !== 4326) {
|
|
1091
|
-
console.warn('Object converted in non-standard crs - ' + JSON.stringify(arcgis.spatialReference));
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
return geojson;
|
|
1095
|
-
};
|
|
1096
|
-
|
|
1097
|
-
/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.
|
|
1098
|
-
* Apache-2.0 */
|
|
1099
|
-
// outer rings are clockwise, holes are counterclockwise
|
|
1100
|
-
// used for converting GeoJSON Polygons to ArcGIS Polygons
|
|
1101
|
-
|
|
1102
|
-
var orientRings = function orientRings(poly) {
|
|
1103
|
-
var output = [];
|
|
1104
|
-
var polygon = poly.slice(0);
|
|
1105
|
-
var outerRing = closeRing(polygon.shift().slice(0));
|
|
1106
|
-
|
|
1107
|
-
if (outerRing.length >= 4) {
|
|
1108
|
-
if (!ringIsClockwise(outerRing)) {
|
|
1109
|
-
outerRing.reverse();
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
output.push(outerRing);
|
|
1113
|
-
|
|
1114
|
-
for (var i = 0; i < polygon.length; i++) {
|
|
1115
|
-
var hole = closeRing(polygon[i].slice(0));
|
|
1116
|
-
|
|
1117
|
-
if (hole.length >= 4) {
|
|
1118
|
-
if (ringIsClockwise(hole)) {
|
|
1119
|
-
hole.reverse();
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
output.push(hole);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
return output;
|
|
1128
|
-
}; // This function flattens holes in multipolygons to one array of polygons
|
|
1129
|
-
// used for converting GeoJSON Polygons to ArcGIS Polygons
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
var flattenMultiPolygonRings = function flattenMultiPolygonRings(rings) {
|
|
1133
|
-
var output = [];
|
|
1134
|
-
|
|
1135
|
-
for (var i = 0; i < rings.length; i++) {
|
|
1136
|
-
var polygon = orientRings(rings[i]);
|
|
1137
|
-
|
|
1138
|
-
for (var x = polygon.length - 1; x >= 0; x--) {
|
|
1139
|
-
var ring = polygon[x].slice(0);
|
|
1140
|
-
output.push(ring);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
return output;
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
var geojsonToArcGIS = function geojsonToArcGIS(geojson, idAttribute) {
|
|
1148
|
-
idAttribute = idAttribute || 'OBJECTID';
|
|
1149
|
-
var spatialReference = {
|
|
1150
|
-
wkid: 4326
|
|
661
|
+
m || o.push([l.reverse()]);
|
|
662
|
+
}
|
|
663
|
+
return o.length === 1 ? {
|
|
664
|
+
type: "Polygon",
|
|
665
|
+
coordinates: o[0]
|
|
666
|
+
} : {
|
|
667
|
+
type: "MultiPolygon",
|
|
668
|
+
coordinates: o
|
|
1151
669
|
};
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
670
|
+
}, jt = function(t, o) {
|
|
671
|
+
for (var n = ["OBJECTID", "FID"], r = 0; r < n.length; r++) {
|
|
672
|
+
var a = n[r];
|
|
673
|
+
if (a in t && (typeof t[a] == "string" || typeof t[a] == "number"))
|
|
674
|
+
return t[a];
|
|
675
|
+
}
|
|
676
|
+
throw Error("No valid id attribute found");
|
|
677
|
+
}, en = function e(t, o) {
|
|
678
|
+
var n = {};
|
|
679
|
+
if (t.features) {
|
|
680
|
+
n.type = "FeatureCollection", n.features = [];
|
|
681
|
+
for (var r = 0; r < t.features.length; r++)
|
|
682
|
+
n.features.push(e(t.features[r], o));
|
|
683
|
+
}
|
|
684
|
+
if (typeof t.x == "number" && typeof t.y == "number" && (n.type = "Point", n.coordinates = [t.x, t.y], typeof t.z == "number" && n.coordinates.push(t.z)), t.points && (n.type = "MultiPoint", n.coordinates = t.points.slice(0)), t.paths && (t.paths.length === 1 ? (n.type = "LineString", n.coordinates = t.paths[0].slice(0)) : (n.type = "MultiLineString", n.coordinates = t.paths.slice(0))), t.rings && (n = Wt(t.rings.slice(0))), typeof t.xmin == "number" && typeof t.ymin == "number" && typeof t.xmax == "number" && typeof t.ymax == "number" && (n.type = "Polygon", n.coordinates = [[[t.xmax, t.ymax], [t.xmin, t.ymax], [t.xmin, t.ymin], [t.xmax, t.ymin], [t.xmax, t.ymax]]]), (t.geometry || t.attributes) && (n.type = "Feature", n.geometry = t.geometry ? e(t.geometry) : null, n.properties = t.attributes ? be(t.attributes) : null, t.attributes))
|
|
685
|
+
try {
|
|
686
|
+
n.id = jt(t.attributes, o);
|
|
687
|
+
} catch {
|
|
688
|
+
}
|
|
689
|
+
return JSON.stringify(n.geometry) === JSON.stringify({}) && (n.geometry = null), t.spatialReference && t.spatialReference.wkid && t.spatialReference.wkid !== 4326 && console.warn("Object converted in non-standard crs - " + JSON.stringify(t.spatialReference)), n;
|
|
690
|
+
}, ke = function(t) {
|
|
691
|
+
var o = [], n = t.slice(0), r = H(n.shift().slice(0));
|
|
692
|
+
if (r.length >= 4) {
|
|
693
|
+
x(r) || r.reverse(), o.push(r);
|
|
694
|
+
for (var a = 0; a < n.length; a++) {
|
|
695
|
+
var l = H(n[a].slice(0));
|
|
696
|
+
l.length >= 4 && (x(l) && l.reverse(), o.push(l));
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return o;
|
|
700
|
+
}, tn = function(t) {
|
|
701
|
+
for (var o = [], n = 0; n < t.length; n++)
|
|
702
|
+
for (var r = ke(t[n]), a = r.length - 1; a >= 0; a--) {
|
|
703
|
+
var l = r[a].slice(0);
|
|
704
|
+
o.push(l);
|
|
705
|
+
}
|
|
706
|
+
return o;
|
|
707
|
+
}, nn = function e(t, o) {
|
|
708
|
+
o = o || "OBJECTID";
|
|
709
|
+
var n = {
|
|
710
|
+
wkid: 4326
|
|
711
|
+
}, r = {}, a;
|
|
712
|
+
switch (t.type) {
|
|
713
|
+
case "Point":
|
|
714
|
+
r.x = t.coordinates[0], r.y = t.coordinates[1], t.coordinates[2] != null && (r.z = t.coordinates[2]), r.spatialReference = n;
|
|
1165
715
|
break;
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
result.points = geojson.coordinates.slice(0);
|
|
1169
|
-
|
|
1170
|
-
if (geojson.coordinates[0][2] != null) {
|
|
1171
|
-
result.hasZ = true;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
result.spatialReference = spatialReference;
|
|
716
|
+
case "MultiPoint":
|
|
717
|
+
r.points = t.coordinates.slice(0), t.coordinates[0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1175
718
|
break;
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
result.paths = [geojson.coordinates.slice(0)];
|
|
1179
|
-
|
|
1180
|
-
if (geojson.coordinates[0][2] != null) {
|
|
1181
|
-
result.hasZ = true;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
result.spatialReference = spatialReference;
|
|
719
|
+
case "LineString":
|
|
720
|
+
r.paths = [t.coordinates.slice(0)], t.coordinates[0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1185
721
|
break;
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
result.paths = geojson.coordinates.slice(0);
|
|
1189
|
-
|
|
1190
|
-
if (geojson.coordinates[0][0][2] != null) {
|
|
1191
|
-
result.hasZ = true;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
result.spatialReference = spatialReference;
|
|
722
|
+
case "MultiLineString":
|
|
723
|
+
r.paths = t.coordinates.slice(0), t.coordinates[0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1195
724
|
break;
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
result.rings = orientRings(geojson.coordinates.slice(0));
|
|
1199
|
-
|
|
1200
|
-
if (geojson.coordinates[0][0][2] != null) {
|
|
1201
|
-
result.hasZ = true;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
result.spatialReference = spatialReference;
|
|
725
|
+
case "Polygon":
|
|
726
|
+
r.rings = ke(t.coordinates.slice(0)), t.coordinates[0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1205
727
|
break;
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));
|
|
1209
|
-
|
|
1210
|
-
if (geojson.coordinates[0][0][0][2] != null) {
|
|
1211
|
-
result.hasZ = true;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
result.spatialReference = spatialReference;
|
|
728
|
+
case "MultiPolygon":
|
|
729
|
+
r.rings = tn(t.coordinates.slice(0)), t.coordinates[0][0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1215
730
|
break;
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
if (geojson.geometry) {
|
|
1219
|
-
result.geometry = geojsonToArcGIS(geojson.geometry, idAttribute);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
result.attributes = geojson.properties ? shallowClone(geojson.properties) : {};
|
|
1223
|
-
|
|
1224
|
-
if (geojson.id) {
|
|
1225
|
-
result.attributes[idAttribute] = geojson.id;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
731
|
+
case "Feature":
|
|
732
|
+
t.geometry && (r.geometry = e(t.geometry, o)), r.attributes = t.properties ? be(t.properties) : {}, t.id && (r.attributes[o] = t.id);
|
|
1228
733
|
break;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
for (i = 0; i < geojson.features.length; i++) {
|
|
1234
|
-
result.push(geojsonToArcGIS(geojson.features[i], idAttribute));
|
|
1235
|
-
}
|
|
1236
|
-
|
|
734
|
+
case "FeatureCollection":
|
|
735
|
+
for (r = [], a = 0; a < t.features.length; a++)
|
|
736
|
+
r.push(e(t.features[a], o));
|
|
1237
737
|
break;
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
for (i = 0; i < geojson.geometries.length; i++) {
|
|
1243
|
-
result.push(geojsonToArcGIS(geojson.geometries[i], idAttribute));
|
|
1244
|
-
}
|
|
1245
|
-
|
|
738
|
+
case "GeometryCollection":
|
|
739
|
+
for (r = [], a = 0; a < t.geometries.length; a++)
|
|
740
|
+
r.push(e(t.geometries[a], o));
|
|
1246
741
|
break;
|
|
1247
742
|
}
|
|
1248
|
-
|
|
1249
|
-
return result;
|
|
743
|
+
return r;
|
|
1250
744
|
};
|
|
1251
|
-
|
|
1252
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
745
|
+
const on = /* @__PURE__ */ F({
|
|
1253
746
|
name: "VkfEsriInputGeojson",
|
|
1254
747
|
components: {
|
|
1255
|
-
VkfInput,
|
|
1256
|
-
VaSketch,
|
|
1257
|
-
ViewerVue,
|
|
1258
|
-
VkAsyncTeleport,
|
|
1259
|
-
DocumentChecked:
|
|
1260
|
-
VaGraphicsLayer
|
|
748
|
+
VkfInput: De,
|
|
749
|
+
VaSketch: Qe,
|
|
750
|
+
ViewerVue: mt,
|
|
751
|
+
VkAsyncTeleport: tt,
|
|
752
|
+
DocumentChecked: Ke,
|
|
753
|
+
VaGraphicsLayer: We
|
|
1261
754
|
},
|
|
1262
|
-
props,
|
|
1263
|
-
emits,
|
|
1264
|
-
setup(
|
|
1265
|
-
emit
|
|
755
|
+
props: X,
|
|
756
|
+
emits: K,
|
|
757
|
+
setup(e, {
|
|
758
|
+
emit: t
|
|
1266
759
|
}) {
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
const shetchPanel = computed(() => {
|
|
1282
|
-
const container = sketchRef.value?.container;
|
|
1283
|
-
return container?.querySelector(".esri-sketch__panel");
|
|
1284
|
-
});
|
|
1285
|
-
const viewDef = new Deferred();
|
|
1286
|
-
const layerRef = shallowRef();
|
|
1287
|
-
const sketchLoad = async e => {
|
|
1288
|
-
await e.sketch.when();
|
|
1289
|
-
sketchRef.value = e.sketch;
|
|
1290
|
-
viewDef.resolve(sketchRef.value.view);
|
|
1291
|
-
};
|
|
1292
|
-
const layerLoad = async ({
|
|
1293
|
-
view,
|
|
1294
|
-
layer
|
|
760
|
+
const o = T.createBindProps(e, ["inputSlots", "readonly", "modelValue"]), n = T.createOnEmits(t, ["update:modelValue"]), {
|
|
761
|
+
tr: r
|
|
762
|
+
} = rt(), a = (u) => {
|
|
763
|
+
const d = r("el.table.emptyText", "暂无数据");
|
|
764
|
+
return !u || !u.features.length ? d : JSON.stringify(u);
|
|
765
|
+
}, l = ot(e), i = D(!e.view), s = k(), c = ne(() => {
|
|
766
|
+
var d;
|
|
767
|
+
const u = (d = s.value) == null ? void 0 : d.container;
|
|
768
|
+
return u == null ? void 0 : u.querySelector(".esri-sketch__panel");
|
|
769
|
+
}), f = new at(), p = k(), m = async (u) => {
|
|
770
|
+
await u.sketch.when(), s.value = u.sketch, f.resolve(s.value.view);
|
|
771
|
+
}, g = async ({
|
|
772
|
+
view: u,
|
|
773
|
+
layer: d
|
|
1295
774
|
}) => {
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
if (Array.isArray(props2.editTypes)) {
|
|
1301
|
-
return props2.editTypes.reduce((pre, cur) => {
|
|
1302
|
-
return pre.concat(EDIT_TYPE_REFLECT[cur].availableCreatureTools);
|
|
1303
|
-
}, []);
|
|
1304
|
-
} else {
|
|
1305
|
-
return EDIT_TYPE_REFLECT[props2.editTypes].availableCreatureTools;
|
|
1306
|
-
}
|
|
1307
|
-
});
|
|
1308
|
-
const sketchValueUpdating = ref(false);
|
|
1309
|
-
const sketchValue = shallowRef([]);
|
|
1310
|
-
watch(() => props2.modelValue, (v, ov) => {
|
|
1311
|
-
if (sketchValueUpdating.value) return;
|
|
1312
|
-
uSketchValue();
|
|
1313
|
-
if (!ov?.features.length) {
|
|
1314
|
-
fly();
|
|
1315
|
-
}
|
|
775
|
+
f.resolve(u), p.value = d;
|
|
776
|
+
}, $ = ne(() => Array.isArray(e.editTypes) ? e.editTypes.reduce((u, d) => u.concat(le[d].availableCreatureTools), []) : le[e.editTypes].availableCreatureTools), B = D(!1), S = k([]);
|
|
777
|
+
oe(() => e.modelValue, (u, d) => {
|
|
778
|
+
B.value || (Ae(), d != null && d.features.length || V());
|
|
1316
779
|
}, {
|
|
1317
|
-
immediate:
|
|
780
|
+
immediate: !0
|
|
1318
781
|
});
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
};
|
|
1325
|
-
const normalMapRef = shallowRef();
|
|
1326
|
-
const dialogMapRef = shallowRef();
|
|
1327
|
-
const mapTo = shallowRef();
|
|
1328
|
-
onMounted(() => {
|
|
1329
|
-
mapTo.value = normalMapRef.value;
|
|
782
|
+
const Ce = (u) => {
|
|
783
|
+
S.value = Array.isArray(u) ? u : u.toArray(), e.skipSave && ee();
|
|
784
|
+
}, U = k(), j = k(), I = k();
|
|
785
|
+
Fe(() => {
|
|
786
|
+
I.value = U.value;
|
|
1330
787
|
});
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
};
|
|
1341
|
-
const doSave = () => {
|
|
1342
|
-
u();
|
|
1343
|
-
ElMessage({
|
|
1344
|
-
message: tr("vkf.esriInputGeojson.saveSuccess", "\u4FDD\u5B58\u6210\u529F"),
|
|
788
|
+
const E = D(!1), Se = (u) => {
|
|
789
|
+
E.value = u;
|
|
790
|
+
}, Ee = async () => {
|
|
791
|
+
I.value = j.value;
|
|
792
|
+
}, Ve = async () => {
|
|
793
|
+
I.value = U.value;
|
|
794
|
+
}, Pe = () => {
|
|
795
|
+
ee(), ae({
|
|
796
|
+
message: r("vkf.esriInputGeojson.saveSuccess", "保存成功"),
|
|
1345
797
|
type: "success"
|
|
1346
|
-
});
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
"disabled": props2.disabled,
|
|
1356
|
-
"onUpload": onUpload,
|
|
1357
|
-
"onEdit": onEdit,
|
|
1358
|
-
"onFly": () => {
|
|
1359
|
-
if (!props2.showMap && !props2.view) {
|
|
1360
|
-
dialogShow.value = true;
|
|
1361
|
-
}
|
|
1362
|
-
emit("appendFly");
|
|
1363
|
-
fly();
|
|
798
|
+
}), E.value = !1, e.view && (i.value = !1);
|
|
799
|
+
}, Ie = () => y(pt, {
|
|
800
|
+
dialog: !l.value && e.dialogEdit,
|
|
801
|
+
upload: !l.value,
|
|
802
|
+
disabled: e.disabled,
|
|
803
|
+
onUpload: Me,
|
|
804
|
+
onEdit: Oe,
|
|
805
|
+
onFly: () => {
|
|
806
|
+
!e.showMap && !e.view && (E.value = !0), t("appendFly"), V();
|
|
1364
807
|
}
|
|
1365
808
|
}, null);
|
|
1366
|
-
async function
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
emit("update:modelValue", res);
|
|
809
|
+
async function Me(u) {
|
|
810
|
+
u.raw && xt(u.raw).then((d) => {
|
|
811
|
+
t("update:modelValue", d);
|
|
1370
812
|
}).then(() => {
|
|
1371
|
-
|
|
1372
|
-
}).then(
|
|
813
|
+
ae.success(r("vkf.esriInputGeojson.uploadSuccess", "上传成功"));
|
|
814
|
+
}).then(V);
|
|
1373
815
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1376
|
-
dialogShow.value = true;
|
|
1377
|
-
} else {
|
|
1378
|
-
sketchIf.value = true;
|
|
1379
|
-
}
|
|
1380
|
-
emit("appendEdit");
|
|
816
|
+
function Oe() {
|
|
817
|
+
e.view ? i.value = !0 : E.value = !0, t("appendEdit");
|
|
1381
818
|
}
|
|
1382
|
-
function
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
});
|
|
1387
|
-
emit("update:modelValue", {
|
|
819
|
+
function ee() {
|
|
820
|
+
B.value = !0;
|
|
821
|
+
const u = S.value.map((d) => en(d));
|
|
822
|
+
t("update:modelValue", {
|
|
1388
823
|
type: "FeatureCollection",
|
|
1389
|
-
features
|
|
1390
|
-
})
|
|
1391
|
-
|
|
1392
|
-
sketchValueUpdating.value = false;
|
|
824
|
+
features: u
|
|
825
|
+
}), Le(() => {
|
|
826
|
+
B.value = !1;
|
|
1393
827
|
});
|
|
1394
828
|
}
|
|
1395
|
-
function
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
if (g.rings) {
|
|
1400
|
-
g.type = "polygon";
|
|
1401
|
-
item.symbol = props2.viewModelActiveFillSymbol;
|
|
1402
|
-
} else if (g.paths) {
|
|
1403
|
-
g.type = "polyline";
|
|
1404
|
-
item.symbol = props2.viewModelActiveLineSymbol;
|
|
1405
|
-
} else if (g.x) {
|
|
1406
|
-
g.type = "point";
|
|
1407
|
-
item.symbol = props2.viewModelActivePointSymbol;
|
|
1408
|
-
}
|
|
1409
|
-
return new Graphic(item);
|
|
829
|
+
function Ae() {
|
|
830
|
+
const d = nn(e.modelValue).map((P) => {
|
|
831
|
+
const b = P.geometry;
|
|
832
|
+
return b.rings ? (b.type = "polygon", P.symbol = e.viewModelActiveFillSymbol) : b.paths ? (b.type = "polyline", P.symbol = e.viewModelActiveLineSymbol) : b.x && (b.type = "point", P.symbol = e.viewModelActivePointSymbol), new nt(P);
|
|
1410
833
|
});
|
|
1411
|
-
|
|
834
|
+
S.value = d;
|
|
1412
835
|
}
|
|
1413
|
-
|
|
1414
|
-
|
|
836
|
+
oe(() => e.flying, (u) => {
|
|
837
|
+
u && V();
|
|
1415
838
|
});
|
|
1416
|
-
async function
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
view.goTo(sketchValue.value).finally(() => {
|
|
1422
|
-
emit("update:flying", false);
|
|
1423
|
-
});
|
|
839
|
+
async function V() {
|
|
840
|
+
const u = await f.promise;
|
|
841
|
+
u && (t("update:flying", !0), await u.when(), u.goTo(S.value).finally(() => {
|
|
842
|
+
t("update:flying", !1);
|
|
843
|
+
}));
|
|
1424
844
|
}
|
|
1425
845
|
return {
|
|
1426
|
-
inputBindProps,
|
|
1427
|
-
inputOnEmits,
|
|
1428
|
-
append,
|
|
1429
|
-
availableCreatureTools
|
|
1430
|
-
sketchValue,
|
|
1431
|
-
handleUpdateSketchValue,
|
|
1432
|
-
sketchRef,
|
|
1433
|
-
sketchLoad,
|
|
1434
|
-
shetchPanel,
|
|
1435
|
-
dialogShow,
|
|
1436
|
-
setDialogShow,
|
|
1437
|
-
normalMapRef,
|
|
1438
|
-
dialogMapRef,
|
|
1439
|
-
dialogOnOpen,
|
|
1440
|
-
dialogOnClose,
|
|
1441
|
-
mapTo,
|
|
1442
|
-
doSave,
|
|
1443
|
-
readonly,
|
|
1444
|
-
layerLoad,
|
|
1445
|
-
sketchIf,
|
|
1446
|
-
fly,
|
|
1447
|
-
layerRef,
|
|
1448
|
-
getInputModelValue,
|
|
1449
|
-
tr
|
|
846
|
+
inputBindProps: o,
|
|
847
|
+
inputOnEmits: n,
|
|
848
|
+
append: Ie,
|
|
849
|
+
availableCreatureTools: $,
|
|
850
|
+
sketchValue: S,
|
|
851
|
+
handleUpdateSketchValue: Ce,
|
|
852
|
+
sketchRef: s,
|
|
853
|
+
sketchLoad: m,
|
|
854
|
+
shetchPanel: c,
|
|
855
|
+
dialogShow: E,
|
|
856
|
+
setDialogShow: Se,
|
|
857
|
+
normalMapRef: U,
|
|
858
|
+
dialogMapRef: j,
|
|
859
|
+
dialogOnOpen: Ee,
|
|
860
|
+
dialogOnClose: Ve,
|
|
861
|
+
mapTo: I,
|
|
862
|
+
doSave: Pe,
|
|
863
|
+
readonly: l,
|
|
864
|
+
layerLoad: g,
|
|
865
|
+
sketchIf: i,
|
|
866
|
+
fly: V,
|
|
867
|
+
layerRef: p,
|
|
868
|
+
getInputModelValue: a,
|
|
869
|
+
tr: r
|
|
1450
870
|
};
|
|
1451
871
|
}
|
|
1452
|
-
})
|
|
1453
|
-
|
|
1454
|
-
const _hoisted_1 = { class: "vkf-form-item" };
|
|
1455
|
-
const _hoisted_2 = {
|
|
872
|
+
}), rn = { class: "vkf-form-item" }, an = {
|
|
1456
873
|
ref: "normalMapRef",
|
|
1457
874
|
class: "vkf-esri-input-geojson__map"
|
|
1458
|
-
}
|
|
1459
|
-
const _hoisted_3 = {
|
|
875
|
+
}, ln = {
|
|
1460
876
|
ref: "dialogMapRef",
|
|
1461
877
|
class: "vkf-esri-input-geojson-dialog__map"
|
|
1462
878
|
};
|
|
1463
|
-
function
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1473
|
-
renderSlot(_ctx.$slots, "custom", {
|
|
1474
|
-
modelValue: _ctx.modelValue,
|
|
1475
|
-
fly: _ctx.fly,
|
|
1476
|
-
setDialogShow: _ctx.setDialogShow,
|
|
1477
|
-
layer: _ctx.layerRef,
|
|
1478
|
-
showMap: _ctx.showMap
|
|
879
|
+
function un(e, t, o, n, r, a) {
|
|
880
|
+
const l = h("VkfInput"), i = h("DocumentChecked"), s = h("ElIcon"), c = h("VkAsyncTeleport"), f = h("VaSketch"), p = h("VaGraphicsLayer"), m = h("ViewerVue"), g = h("ElDialog");
|
|
881
|
+
return w(), $e("div", rn, [
|
|
882
|
+
A(e.$slots, "custom", {
|
|
883
|
+
modelValue: e.modelValue,
|
|
884
|
+
fly: e.fly,
|
|
885
|
+
setDialogShow: e.setDialogShow,
|
|
886
|
+
layer: e.layerRef,
|
|
887
|
+
showMap: e.showMap
|
|
1479
888
|
}, () => [
|
|
1480
|
-
|
|
1481
|
-
readonly:
|
|
1482
|
-
"model-value":
|
|
1483
|
-
},
|
|
889
|
+
y(l, fe({
|
|
890
|
+
readonly: !0,
|
|
891
|
+
"model-value": e.getInputModelValue(e.modelValue)
|
|
892
|
+
}, e.inputBindProps, {
|
|
1484
893
|
"input-slots": {
|
|
1485
|
-
append:
|
|
894
|
+
append: e.append
|
|
1486
895
|
}
|
|
1487
|
-
},
|
|
896
|
+
}, Be(e.inputOnEmits)), null, 16, ["model-value", "input-slots"])
|
|
1488
897
|
]),
|
|
1489
|
-
|
|
1490
|
-
default:
|
|
1491
|
-
|
|
1492
|
-
view:
|
|
1493
|
-
"view-component":
|
|
1494
|
-
"view-component-attrs":
|
|
898
|
+
y(c, { to: e.mapTo }, {
|
|
899
|
+
default: v(() => [
|
|
900
|
+
y(m, {
|
|
901
|
+
view: e.view,
|
|
902
|
+
"view-component": e.viewComponent,
|
|
903
|
+
"view-component-attrs": e.viewComponentAttrs
|
|
1495
904
|
}, {
|
|
1496
|
-
default:
|
|
1497
|
-
|
|
1498
|
-
index:
|
|
1499
|
-
graphics:
|
|
1500
|
-
onLoad:
|
|
905
|
+
default: v(() => [
|
|
906
|
+
y(p, {
|
|
907
|
+
index: e.layerIndex,
|
|
908
|
+
graphics: e.sketchValue,
|
|
909
|
+
onLoad: e.layerLoad
|
|
1501
910
|
}, {
|
|
1502
|
-
default:
|
|
1503
|
-
|
|
911
|
+
default: v(() => [
|
|
912
|
+
e.readonly || !e.sketchIf ? O("", !0) : (w(), _(f, {
|
|
1504
913
|
key: 0,
|
|
1505
|
-
"view-model-active-fill-symbol":
|
|
1506
|
-
"view-model-active-line-symbol":
|
|
1507
|
-
"view-model-active-point-symbol":
|
|
1508
|
-
multiple:
|
|
1509
|
-
"available-creature-tools":
|
|
1510
|
-
"model-value":
|
|
1511
|
-
"visible-elements":
|
|
1512
|
-
"onUpdate:modelValue":
|
|
1513
|
-
onLoad:
|
|
914
|
+
"view-model-active-fill-symbol": e.viewModelActiveFillSymbol,
|
|
915
|
+
"view-model-active-line-symbol": e.viewModelActiveLineSymbol,
|
|
916
|
+
"view-model-active-point-symbol": e.viewModelActivePointSymbol,
|
|
917
|
+
multiple: e.multiple,
|
|
918
|
+
"available-creature-tools": e.availableCreatureTools,
|
|
919
|
+
"model-value": e.sketchValue,
|
|
920
|
+
"visible-elements": e.visibleElements,
|
|
921
|
+
"onUpdate:modelValue": e.handleUpdateSketchValue,
|
|
922
|
+
onLoad: e.sketchLoad
|
|
1514
923
|
}, {
|
|
1515
|
-
default:
|
|
1516
|
-
!
|
|
924
|
+
default: v(() => [
|
|
925
|
+
!e.skipSave && e.shetchPanel ? (w(), _(c, {
|
|
1517
926
|
key: 0,
|
|
1518
|
-
to:
|
|
927
|
+
to: e.shetchPanel
|
|
1519
928
|
}, {
|
|
1520
|
-
default:
|
|
1521
|
-
|
|
929
|
+
default: v(() => [
|
|
930
|
+
y(s, {
|
|
1522
931
|
class: "esri-sketch-ui-save esri-widget--button",
|
|
1523
|
-
onClick:
|
|
932
|
+
onClick: e.doSave
|
|
1524
933
|
}, {
|
|
1525
|
-
default:
|
|
1526
|
-
|
|
934
|
+
default: v(() => [
|
|
935
|
+
y(i)
|
|
1527
936
|
]),
|
|
1528
937
|
_: 1
|
|
1529
|
-
/* STABLE */
|
|
1530
938
|
}, 8, ["onClick"])
|
|
1531
939
|
]),
|
|
1532
940
|
_: 1
|
|
1533
|
-
|
|
1534
|
-
}, 8, ["to"])) : createCommentVNode("v-if", true)
|
|
941
|
+
}, 8, ["to"])) : O("", !0)
|
|
1535
942
|
]),
|
|
1536
943
|
_: 1
|
|
1537
|
-
|
|
1538
|
-
}, 8, ["view-model-active-fill-symbol", "view-model-active-line-symbol", "view-model-active-point-symbol", "multiple", "available-creature-tools", "model-value", "visible-elements", "onUpdate:modelValue", "onLoad"])) : createCommentVNode("v-if", true)
|
|
944
|
+
}, 8, ["view-model-active-fill-symbol", "view-model-active-line-symbol", "view-model-active-point-symbol", "multiple", "available-creature-tools", "model-value", "visible-elements", "onUpdate:modelValue", "onLoad"]))
|
|
1539
945
|
]),
|
|
1540
946
|
_: 1
|
|
1541
|
-
/* STABLE */
|
|
1542
947
|
}, 8, ["index", "graphics", "onLoad"])
|
|
1543
948
|
]),
|
|
1544
949
|
_: 1
|
|
1545
|
-
/* STABLE */
|
|
1546
950
|
}, 8, ["view", "view-component", "view-component-attrs"])
|
|
1547
951
|
]),
|
|
1548
952
|
_: 1
|
|
1549
|
-
/* STABLE */
|
|
1550
953
|
}, 8, ["to"]),
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
_hoisted_2,
|
|
1554
|
-
null,
|
|
1555
|
-
512
|
|
1556
|
-
/* NEED_PATCH */
|
|
1557
|
-
), [
|
|
1558
|
-
[vShow, _ctx.showMap]
|
|
954
|
+
Ue(re("div", an, null, 512), [
|
|
955
|
+
[Ge, e.showMap]
|
|
1559
956
|
]),
|
|
1560
|
-
|
|
1561
|
-
modelValue:
|
|
1562
|
-
"onUpdate:modelValue":
|
|
1563
|
-
title:
|
|
1564
|
-
fullscreen:
|
|
957
|
+
y(g, {
|
|
958
|
+
modelValue: e.dialogShow,
|
|
959
|
+
"onUpdate:modelValue": t[0] || (t[0] = ($) => e.dialogShow = $),
|
|
960
|
+
title: e.dialogEditTitle || e.tr("vkf.esriInputGeojson.dialogEditTitle", "绘制图斑"),
|
|
961
|
+
fullscreen: e.dialogEditFullscreen,
|
|
1565
962
|
"modal-class": "vkf-esri-input-geojson-dialog",
|
|
1566
|
-
"append-to-body":
|
|
1567
|
-
"close-on-click-modal":
|
|
1568
|
-
draggable:
|
|
1569
|
-
onOpen:
|
|
1570
|
-
onClose:
|
|
963
|
+
"append-to-body": !0,
|
|
964
|
+
"close-on-click-modal": !1,
|
|
965
|
+
draggable: !0,
|
|
966
|
+
onOpen: e.dialogOnOpen,
|
|
967
|
+
onClose: e.dialogOnClose
|
|
1571
968
|
}, {
|
|
1572
|
-
default:
|
|
1573
|
-
|
|
1574
|
-
"div",
|
|
1575
|
-
_hoisted_3,
|
|
1576
|
-
null,
|
|
1577
|
-
512
|
|
1578
|
-
/* NEED_PATCH */
|
|
1579
|
-
)
|
|
969
|
+
default: v(() => [
|
|
970
|
+
re("div", ln, null, 512)
|
|
1580
971
|
]),
|
|
1581
972
|
_: 1
|
|
1582
|
-
/* STABLE */
|
|
1583
973
|
}, 8, ["modelValue", "title", "fullscreen", "onOpen", "onClose"])
|
|
1584
974
|
]);
|
|
1585
975
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
976
|
+
const Sn = /* @__PURE__ */ Y(on, [["render", un]]), En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1589
977
|
__proto__: null
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
978
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
979
|
+
export {
|
|
980
|
+
lt as EDIT_TYPE,
|
|
981
|
+
it as EDIT_TYPE_OPTIONS,
|
|
982
|
+
le as EDIT_TYPE_REFLECT,
|
|
983
|
+
ut as EMPTY_FEATURE_COLLECTION,
|
|
984
|
+
Sn as VkfEsriInputGeojson,
|
|
985
|
+
Cn as _VkfEsriInputGeojsonCtx,
|
|
986
|
+
En as __VkfEsriInputGeojson,
|
|
987
|
+
Sn as default
|
|
1594
988
|
};
|
|
1595
|
-
|
|
1596
|
-
export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, EMPTY_FEATURE_COLLECTION, VkfEsriInputGeojson, ctx as _VkfEsriInputGeojsonCtx, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
|