@opengis/gis 0.2.159 → 0.2.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -181
- package/dist/{CardIcon-CBZC4uZr.js → CardIcon-CJb7yqV7.js} +1 -1
- package/dist/{EntityTablePage-DtzKmZjS.js → EntityTablePage-BDWJBRsX.js} +2 -2
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DD6rHsXc.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BSfb8eHZ.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-Bps0H7pO.js → HeaderActions.vue_vue_type_script_setup_true_lang-WHe_VrVa.js} +1 -1
- package/dist/{MapSettings-DAZuj-Uh.js → MapSettings-CfY1C4pP.js} +2 -2
- package/dist/{RastersTablePage-rtGar8d3.js → RastersTablePage-DqNAAgwQ.js} +2 -2
- package/dist/{cartocss-BhjdH88Y.js → cartocss-BtW3JOe4.js} +5 -5
- package/dist/{import-utils-27U4FPhs.js → import-utils-omyzQAkY.js} +1 -1
- package/dist/index-C8Wi_h72.js +13556 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +55 -42
- package/dist/{raster-DXOqDU11.js → raster-C18YvUia.js} +3 -3
- package/dist/{register-DWO-Ok1x.js → register-YfpjSpQO.js} +3 -3
- package/dist/service-CoVcnlm3.js +3471 -0
- package/dist/{vs-datatable-D4QPjAMZ.js → vs-datatable-D6oj_pBG.js} +3 -4
- package/module/cls.json +6 -6
- package/module/gis/card/gis.metadata.table/index.yml +22 -22
- package/module/gis/card/gis.metadata.table/main_info.hbs +20 -20
- package/module/gis/card/gis.metadata.table/metadata_info.hbs +27 -27
- package/module/gis/card/gis.metadata.table/other.hbs +25 -25
- package/module/gis/card/gis.rasters.table/index.yml +11 -11
- package/module/gis/card/gis.rasters.table/main_info.hbs +27 -27
- package/module/gis/card/gis.registers.table/cls.hbs +36 -36
- package/module/gis/card/gis.registers.table/columns.hbs +89 -89
- package/module/gis/card/gis.registers.table/filters.hbs +80 -80
- package/module/gis/card/gis.registers.table/index.yml +23 -23
- package/module/gis/card/gis.registers.table/main_info.hbs +35 -35
- package/module/gis/card/gis.registers.table/source.hbs +45 -45
- package/module/gis/card/gis.services.table/attributes.hbs +91 -91
- package/module/gis/card/gis.services.table/filters.hbs +83 -83
- package/module/gis/card/gis.services.table/index.yml +25 -25
- package/module/gis/card/gis.services.table/main_info.hbs +27 -27
- package/module/gis/card/gis.services.table/source.hbs +25 -25
- package/module/gis/cls/bool.yes_no.json +12 -12
- package/module/gis/cls/encoding.json +14 -14
- package/module/gis/cls/geom_type.json +14 -14
- package/module/gis/cls/gis.column_type.json +34 -34
- package/module/gis/cls/gis.column_view_type.json +26 -26
- package/module/gis/cls/gis.filter_type.json +22 -22
- package/module/gis/cls/language.json +10 -10
- package/module/gis/cls/meta.service_type.json +42 -42
- package/module/gis/cls/ogc.service.json +21 -21
- package/module/gis/cls/service_type.json +42 -42
- package/module/gis/cls/source_type.json +10 -10
- package/module/gis/cls/standarts.json +6 -6
- package/module/gis/cls/topic_category.json +106 -106
- package/module/gis/cls/update_frequency.json +29 -29
- package/module/gis/cls/view.json +21 -21
- package/module/gis/form/feedback.answer.form.json +10 -10
- package/module/gis/form/gis.cartocss.form.json +64 -64
- package/module/gis/form/gis.group_list.form.json +17 -17
- package/module/gis/form/gis.maps.form.json +61 -61
- package/module/gis/form/gis.metadata.form.json +240 -240
- package/module/gis/form/gis.metadata_new.form.json +195 -195
- package/module/gis/form/gis.ogc_service.form.json +51 -51
- package/module/gis/form/gis.rasters.form.json +76 -76
- package/module/gis/form/gis.registers.form.json +124 -124
- package/module/gis/form/gis.registers_column.form.json +84 -84
- package/module/gis/form/gis.registers_filter.form.json +65 -65
- package/module/gis/form/gis.services.form.json +111 -111
- package/module/gis/form/gis.services_attributes.form.json +75 -75
- package/module/gis/form/gis.services_filter.form.json +65 -65
- package/module/gis/menu.json +43 -43
- package/module/gis/select/admin.cls.name.sql +9 -9
- package/module/gis/select/layer_list.sql +7 -7
- package/module/gis/select/layer_list_text.sql +7 -7
- package/module/gis/select/pg.column_name.geometry.sql +12 -12
- package/module/gis/select/pg.columns.parent.sql +6 -6
- package/module/gis/select/pg.table_name.sql +17 -17
- package/module/gis/select/service_id.sql +1 -1
- package/module/gis/select/srid.sql +7 -7
- package/module/gis/table/gis.cartocss.table.json +74 -74
- package/module/gis/table/gis.group_list.table.json +58 -58
- package/module/gis/table/gis.maps.table.json +110 -110
- package/module/gis/table/gis.metadata.table.json +70 -70
- package/module/gis/table/gis.metadata_new.table.json +137 -137
- package/module/gis/table/gis.ogc_service.table.json +100 -100
- package/module/gis/table/gis.rasters.table.json +113 -113
- package/module/gis/table/gis.registers.table.json +143 -143
- package/module/gis/table/gis.services.table.json +120 -120
- package/module/gis/table/site.gis.registers.table.json +88 -88
- package/module/gis/table/site.gis.services.table.json +106 -106
- package/module/gis/templates/ISO19136_2017_gml_template.xml +330 -330
- package/module/gis/tokens.yml +5 -5
- package/module/permissions/form/permissions.users.form.json +151 -151
- package/module/permissions/table/gis.permissions.table.json +97 -97
- package/module/test/cls/bp_build_type.json +37 -37
- package/module/test/cls/doc_status.json +31 -31
- package/module/test/cls/ts.temp_status.json +18 -18
- package/module/test/cls/ts.temp_structure.ts_class.json +49 -49
- package/module/test/cls/ts.temp_type.json +9 -9
- package/module/test/layer/bp.json +59 -59
- package/module/test/layer/bp1.yml +33 -33
- package/module/test/layer/individual.yml +53 -53
- package/module/test/layer/ts.linking_passport.yml +55 -55
- package/module/test/layer/ts.temp_structure.yml +50 -50
- package/module/test/map/addr.yml +21 -21
- package/module/test/map/bp_myo.json +43 -43
- package/module/test/map/bpf.json +43 -43
- package/module/test/map/main.json +39 -39
- package/module/test/map/mbd.json +92 -92
- package/module/test/map/ts.json +53 -53
- package/module/test/select/address_id.json +2 -2
- package/module/test/select/address_id.sql +7 -7
- package/module/test/select/core.user_uid.sql +1 -1
- package/module/test/table/data_address.street.table.json +69 -69
- package/module/test/table/data_bp_myo.bp.table.json +122 -122
- package/package.json +75 -75
- package/plugin.js +55 -55
- package/server/migrations/array_intersect.sql +13 -13
- package/server/migrations/cartocss.sql +27 -27
- package/server/migrations/group_list.sql +74 -74
- package/server/migrations/maps.sql +30 -30
- package/server/migrations/metadata.sql +415 -415
- package/server/migrations/ogc.sql +106 -106
- package/server/migrations/rasters.sql +265 -265
- package/server/migrations/services.sql +247 -247
- package/server/migrations/services_users_rel.sql +22 -22
- package/server/migrations/widgets.sql +20 -20
- package/server/plugins/crons.js +21 -21
- package/server/plugins/mapnik/funcs/checkRasterFile.js +109 -109
- package/server/plugins/mapnik/funcs/mapnik.js +151 -151
- package/server/plugins/mapnik/funcs/rootFolder.mjs +8 -8
- package/server/plugins/mapnik/map.proto +345 -345
- package/server/plugins/vite.js +74 -74
- package/server/routes/gis/cartocss/add.cartocss.js +42 -42
- package/server/routes/gis/cartocss/get.cartocss.js +59 -59
- package/server/routes/gis/checkXML.js +117 -117
- package/server/routes/gis/dashboard.js +29 -29
- package/server/routes/gis/index.mjs +92 -89
- package/server/routes/gis/metadata/editMetadata.js +34 -34
- package/server/routes/gis/metadata/metadataXML.js +13 -13
- package/server/routes/gis/ogc/map.info.point.js +124 -124
- package/server/routes/gis/registers/add.registry.js +35 -35
- package/server/routes/gis/registers/del.registry.js +14 -14
- package/server/routes/gis/registers/funcs/classifiers.js +100 -100
- package/server/routes/gis/registers/funcs/columns.js +3 -3
- package/server/routes/gis/registers/funcs/content.type.js +9 -9
- package/server/routes/gis/registers/funcs/get.info.js +89 -89
- package/server/routes/gis/registers/funcs/handleRegistryRequest.js +146 -146
- package/server/routes/gis/registers/gis.export.js +153 -153
- package/server/routes/gis/registers/gis.registry.js +64 -64
- package/server/routes/gis/registers/gis.registry.list.js +59 -59
- package/server/routes/gis/registers/insert.columns.js +107 -107
- package/server/routes/gis/registers/insert.filters.js +110 -110
- package/server/routes/gis/registers/map.registry.js +79 -79
- package/server/routes/gis/services/add.service.js +64 -64
- package/server/routes/gis/services/create.route.js +96 -0
- package/server/routes/gis/services/del.service.js +12 -12
- package/server/routes/gis/services/get.layer.geom.js +27 -27
- package/server/routes/gis/services/get.service.users.js +74 -74
- package/server/routes/gis/services/get.services.col.js +33 -33
- package/server/routes/gis/services/get.services.js +84 -84
- package/server/routes/gis/services/legend.auto.js +77 -77
- package/server/routes/map/controllers/clearTiles.js +34 -34
- package/server/routes/map/controllers/geojson.js +187 -187
- package/server/routes/map/controllers/gis.convert.js +53 -53
- package/server/routes/map/controllers/jsonData.js +205 -205
- package/server/routes/map/controllers/layerList.js +102 -102
- package/server/routes/map/controllers/map.js +123 -123
- package/server/routes/map/controllers/mapCatalog.js +72 -72
- package/server/routes/map/controllers/mapCatalogAttribute.js +55 -55
- package/server/routes/map/controllers/mapFeatures.js +128 -128
- package/server/routes/map/controllers/mapFormat.js +234 -234
- package/server/routes/map/controllers/mapTiles.js +152 -152
- package/server/routes/map/controllers/maps.js +15 -15
- package/server/routes/map/controllers/marker_icon.js +43 -43
- package/server/routes/map/controllers/parseGeoFile.js +86 -86
- package/server/routes/map/controllers/pointHeight.js +55 -0
- package/server/routes/map/controllers/vtile.js +172 -172
- package/server/routes/map/index.mjs +228 -198
- package/server/routes/map/maps/add.map.js +43 -43
- package/server/routes/map/maps/del.map.js +18 -18
- package/server/routes/map/maps/get.map.js +118 -118
- package/server/routes/map/vtile1.js +179 -179
- package/server/routes/map/widgets/add.widget.js +38 -38
- package/server/routes/map/widgets/del.widget.js +22 -22
- package/server/routes/map/widgets/get.widget.js +40 -40
- package/server/routes/mapnik/controllers/clearTiles.js +106 -106
- package/server/routes/mapnik/controllers/createXml.js +67 -67
- package/server/routes/mapnik/controllers/createXmlMulti.js +76 -76
- package/server/routes/mapnik/controllers/fileSearch.js +38 -38
- package/server/routes/mapnik/controllers/fileStat.js +28 -28
- package/server/routes/mapnik/controllers/mapnikLogger.js +29 -29
- package/server/routes/mapnik/controllers/mapnikStat.js +19 -19
- package/server/routes/mapnik/controllers/pretile.js +144 -144
- package/server/routes/mapnik/controllers/rasterInfo.js +57 -57
- package/server/routes/mapnik/controllers/readDir.js +22 -22
- package/server/routes/mapnik/controllers/rtile.js +167 -167
- package/server/routes/mapnik/controllers/uploadRaster.js +157 -157
- package/server/routes/mapnik/functions/cartoBounds.js +32 -32
- package/server/routes/mapnik/functions/convertBoundToTile.js +27 -27
- package/server/routes/mapnik/functions/uploadXML.js +113 -113
- package/server/routes/mapnik/index.js +40 -40
- package/server/routes/permissions/controllers/catalog.permissions.edit.js +22 -22
- package/server/routes/permissions/controllers/catalog.permissions.js +7 -7
- package/server/routes/permissions/controllers/gis.catalog.js +80 -80
- package/server/routes/permissions/controllers/utils/get.permissions.js +59 -59
- package/server/routes/permissions/index.mjs +18 -18
- package/server/routes/root.mjs +3 -3
- package/utils.js +13 -13
- package/dist/index-BoqiSnZD.js +0 -11606
- package/dist/service-DolI8Dz5.js +0 -2628
package/dist/service-DolI8Dz5.js
DELETED
|
@@ -1,2628 +0,0 @@
|
|
|
1
|
-
import { openBlock as C, createElementBlock as D, createElementVNode as v, defineComponent as ee, ref as S, watch as I, createTextVNode as Gi, createVNode as j, createBlock as M, createCommentVNode as q, defineAsyncComponent as Qi, unref as Te, withCtx as We, withDirectives as qe, vModelText as Ke, normalizeClass as ve, Fragment as Hn, renderList as Vn, toDisplayString as le, getCurrentInstance as qn, onBeforeUnmount as Kn, toRef as Wi, computed as ue, onMounted as Ji, resolveDynamicComponent as Zi } from "vue";
|
|
2
|
-
import { useRoute as Xi, useRouter as el } from "vue-router";
|
|
3
|
-
import { notify as Q } from "@opengis/core";
|
|
4
|
-
import { _ as Re, u as Ie, f as nl, M as il, g as ll, h as rl, i as tl, j as kn, k as ol, l as ul, m as al, s as Cn, n as sl } from "./index-BoqiSnZD.js";
|
|
5
|
-
import { _ as cl, a as fl, b as dl, c as pl } from "./HeaderActions.vue_vue_type_script_setup_true_lang-Bps0H7pO.js";
|
|
6
|
-
import { S as ml, C as hl } from "./CardIcon-CBZC4uZr.js";
|
|
7
|
-
import { _ as zn } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
|
|
8
|
-
import { V as $e } from "./vs-datatable-D4QPjAMZ.js";
|
|
9
|
-
import { _ as ln, m as rn, r as xe } from "./import-utils-27U4FPhs.js";
|
|
10
|
-
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
11
|
-
function Gn(e) {
|
|
12
|
-
return typeof e > "u" || e === null;
|
|
13
|
-
}
|
|
14
|
-
function vl(e) {
|
|
15
|
-
return typeof e == "object" && e !== null;
|
|
16
|
-
}
|
|
17
|
-
function xl(e) {
|
|
18
|
-
return Array.isArray(e) ? e : Gn(e) ? [] : [e];
|
|
19
|
-
}
|
|
20
|
-
function yl(e, n) {
|
|
21
|
-
var i, r, l, o;
|
|
22
|
-
if (n)
|
|
23
|
-
for (o = Object.keys(n), i = 0, r = o.length; i < r; i += 1)
|
|
24
|
-
l = o[i], e[l] = n[l];
|
|
25
|
-
return e;
|
|
26
|
-
}
|
|
27
|
-
function gl(e, n) {
|
|
28
|
-
var i = "", r;
|
|
29
|
-
for (r = 0; r < n; r += 1)
|
|
30
|
-
i += e;
|
|
31
|
-
return i;
|
|
32
|
-
}
|
|
33
|
-
function bl(e) {
|
|
34
|
-
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
35
|
-
}
|
|
36
|
-
var _l = Gn, wl = vl, Al = xl, kl = gl, Cl = bl, Sl = yl, O = {
|
|
37
|
-
isNothing: _l,
|
|
38
|
-
isObject: wl,
|
|
39
|
-
toArray: Al,
|
|
40
|
-
repeat: kl,
|
|
41
|
-
isNegativeZero: Cl,
|
|
42
|
-
extend: Sl
|
|
43
|
-
};
|
|
44
|
-
function Qn(e, n) {
|
|
45
|
-
var i = "", r = e.reason || "(unknown reason)";
|
|
46
|
-
return e.mark ? (e.mark.name && (i += 'in "' + e.mark.name + '" '), i += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (i += `
|
|
47
|
-
|
|
48
|
-
` + e.mark.snippet), r + " " + i) : r;
|
|
49
|
-
}
|
|
50
|
-
function ye(e, n) {
|
|
51
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Qn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
52
|
-
}
|
|
53
|
-
ye.prototype = Object.create(Error.prototype);
|
|
54
|
-
ye.prototype.constructor = ye;
|
|
55
|
-
ye.prototype.toString = function(n) {
|
|
56
|
-
return this.name + ": " + Qn(this, n);
|
|
57
|
-
};
|
|
58
|
-
var $ = ye;
|
|
59
|
-
function ze(e, n, i, r, l) {
|
|
60
|
-
var o = "", t = "", u = Math.floor(l / 2) - 1;
|
|
61
|
-
return r - n > u && (o = " ... ", n = r - u + o.length), i - r > u && (t = " ...", i = r + u - t.length), {
|
|
62
|
-
str: o + e.slice(n, i).replace(/\t/g, "→") + t,
|
|
63
|
-
pos: r - n + o.length
|
|
64
|
-
// relative position
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function Ge(e, n) {
|
|
68
|
-
return O.repeat(" ", n - e.length) + e;
|
|
69
|
-
}
|
|
70
|
-
function El(e, n) {
|
|
71
|
-
if (n = Object.create(n || null), !e.buffer) return null;
|
|
72
|
-
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
73
|
-
for (var i = /\r?\n|\r|\0/g, r = [0], l = [], o, t = -1; o = i.exec(e.buffer); )
|
|
74
|
-
l.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && t < 0 && (t = r.length - 2);
|
|
75
|
-
t < 0 && (t = r.length - 1);
|
|
76
|
-
var u = "", a, s, m = Math.min(e.line + n.linesAfter, l.length).toString().length, d = n.maxLength - (n.indent + m + 3);
|
|
77
|
-
for (a = 1; a <= n.linesBefore && !(t - a < 0); a++)
|
|
78
|
-
s = ze(
|
|
79
|
-
e.buffer,
|
|
80
|
-
r[t - a],
|
|
81
|
-
l[t - a],
|
|
82
|
-
e.position - (r[t] - r[t - a]),
|
|
83
|
-
d
|
|
84
|
-
), u = O.repeat(" ", n.indent) + Ge((e.line - a + 1).toString(), m) + " | " + s.str + `
|
|
85
|
-
` + u;
|
|
86
|
-
for (s = ze(e.buffer, r[t], l[t], e.position, d), u += O.repeat(" ", n.indent) + Ge((e.line + 1).toString(), m) + " | " + s.str + `
|
|
87
|
-
`, u += O.repeat("-", n.indent + m + 3 + s.pos) + `^
|
|
88
|
-
`, a = 1; a <= n.linesAfter && !(t + a >= l.length); a++)
|
|
89
|
-
s = ze(
|
|
90
|
-
e.buffer,
|
|
91
|
-
r[t + a],
|
|
92
|
-
l[t + a],
|
|
93
|
-
e.position - (r[t] - r[t + a]),
|
|
94
|
-
d
|
|
95
|
-
), u += O.repeat(" ", n.indent) + Ge((e.line + a + 1).toString(), m) + " | " + s.str + `
|
|
96
|
-
`;
|
|
97
|
-
return u.replace(/\n$/, "");
|
|
98
|
-
}
|
|
99
|
-
var Fl = El, Tl = [
|
|
100
|
-
"kind",
|
|
101
|
-
"multi",
|
|
102
|
-
"resolve",
|
|
103
|
-
"construct",
|
|
104
|
-
"instanceOf",
|
|
105
|
-
"predicate",
|
|
106
|
-
"represent",
|
|
107
|
-
"representName",
|
|
108
|
-
"defaultStyle",
|
|
109
|
-
"styleAliases"
|
|
110
|
-
], Il = [
|
|
111
|
-
"scalar",
|
|
112
|
-
"sequence",
|
|
113
|
-
"mapping"
|
|
114
|
-
];
|
|
115
|
-
function Ol(e) {
|
|
116
|
-
var n = {};
|
|
117
|
-
return e !== null && Object.keys(e).forEach(function(i) {
|
|
118
|
-
e[i].forEach(function(r) {
|
|
119
|
-
n[String(r)] = i;
|
|
120
|
-
});
|
|
121
|
-
}), n;
|
|
122
|
-
}
|
|
123
|
-
function Ll(e, n) {
|
|
124
|
-
if (n = n || {}, Object.keys(n).forEach(function(i) {
|
|
125
|
-
if (Tl.indexOf(i) === -1)
|
|
126
|
-
throw new $('Unknown option "' + i + '" is met in definition of "' + e + '" YAML type.');
|
|
127
|
-
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
128
|
-
return !0;
|
|
129
|
-
}, this.construct = n.construct || function(i) {
|
|
130
|
-
return i;
|
|
131
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Ol(n.styleAliases || null), Il.indexOf(this.kind) === -1)
|
|
132
|
-
throw new $('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
133
|
-
}
|
|
134
|
-
var N = Ll;
|
|
135
|
-
function Sn(e, n) {
|
|
136
|
-
var i = [];
|
|
137
|
-
return e[n].forEach(function(r) {
|
|
138
|
-
var l = i.length;
|
|
139
|
-
i.forEach(function(o, t) {
|
|
140
|
-
o.tag === r.tag && o.kind === r.kind && o.multi === r.multi && (l = t);
|
|
141
|
-
}), i[l] = r;
|
|
142
|
-
}), i;
|
|
143
|
-
}
|
|
144
|
-
function Nl() {
|
|
145
|
-
var e = {
|
|
146
|
-
scalar: {},
|
|
147
|
-
sequence: {},
|
|
148
|
-
mapping: {},
|
|
149
|
-
fallback: {},
|
|
150
|
-
multi: {
|
|
151
|
-
scalar: [],
|
|
152
|
-
sequence: [],
|
|
153
|
-
mapping: [],
|
|
154
|
-
fallback: []
|
|
155
|
-
}
|
|
156
|
-
}, n, i;
|
|
157
|
-
function r(l) {
|
|
158
|
-
l.multi ? (e.multi[l.kind].push(l), e.multi.fallback.push(l)) : e[l.kind][l.tag] = e.fallback[l.tag] = l;
|
|
159
|
-
}
|
|
160
|
-
for (n = 0, i = arguments.length; n < i; n += 1)
|
|
161
|
-
arguments[n].forEach(r);
|
|
162
|
-
return e;
|
|
163
|
-
}
|
|
164
|
-
function Je(e) {
|
|
165
|
-
return this.extend(e);
|
|
166
|
-
}
|
|
167
|
-
Je.prototype.extend = function(n) {
|
|
168
|
-
var i = [], r = [];
|
|
169
|
-
if (n instanceof N)
|
|
170
|
-
r.push(n);
|
|
171
|
-
else if (Array.isArray(n))
|
|
172
|
-
r = r.concat(n);
|
|
173
|
-
else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
|
|
174
|
-
n.implicit && (i = i.concat(n.implicit)), n.explicit && (r = r.concat(n.explicit));
|
|
175
|
-
else
|
|
176
|
-
throw new $("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
177
|
-
i.forEach(function(o) {
|
|
178
|
-
if (!(o instanceof N))
|
|
179
|
-
throw new $("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
180
|
-
if (o.loadKind && o.loadKind !== "scalar")
|
|
181
|
-
throw new $("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
182
|
-
if (o.multi)
|
|
183
|
-
throw new $("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
184
|
-
}), r.forEach(function(o) {
|
|
185
|
-
if (!(o instanceof N))
|
|
186
|
-
throw new $("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
187
|
-
});
|
|
188
|
-
var l = Object.create(Je.prototype);
|
|
189
|
-
return l.implicit = (this.implicit || []).concat(i), l.explicit = (this.explicit || []).concat(r), l.compiledImplicit = Sn(l, "implicit"), l.compiledExplicit = Sn(l, "explicit"), l.compiledTypeMap = Nl(l.compiledImplicit, l.compiledExplicit), l;
|
|
190
|
-
};
|
|
191
|
-
var Wn = Je, Jn = new N("tag:yaml.org,2002:str", {
|
|
192
|
-
kind: "scalar",
|
|
193
|
-
construct: function(e) {
|
|
194
|
-
return e !== null ? e : "";
|
|
195
|
-
}
|
|
196
|
-
}), Zn = new N("tag:yaml.org,2002:seq", {
|
|
197
|
-
kind: "sequence",
|
|
198
|
-
construct: function(e) {
|
|
199
|
-
return e !== null ? e : [];
|
|
200
|
-
}
|
|
201
|
-
}), Xn = new N("tag:yaml.org,2002:map", {
|
|
202
|
-
kind: "mapping",
|
|
203
|
-
construct: function(e) {
|
|
204
|
-
return e !== null ? e : {};
|
|
205
|
-
}
|
|
206
|
-
}), ei = new Wn({
|
|
207
|
-
explicit: [
|
|
208
|
-
Jn,
|
|
209
|
-
Zn,
|
|
210
|
-
Xn
|
|
211
|
-
]
|
|
212
|
-
});
|
|
213
|
-
function Ml(e) {
|
|
214
|
-
if (e === null) return !0;
|
|
215
|
-
var n = e.length;
|
|
216
|
-
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
217
|
-
}
|
|
218
|
-
function Dl() {
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
function Rl(e) {
|
|
222
|
-
return e === null;
|
|
223
|
-
}
|
|
224
|
-
var ni = new N("tag:yaml.org,2002:null", {
|
|
225
|
-
kind: "scalar",
|
|
226
|
-
resolve: Ml,
|
|
227
|
-
construct: Dl,
|
|
228
|
-
predicate: Rl,
|
|
229
|
-
represent: {
|
|
230
|
-
canonical: function() {
|
|
231
|
-
return "~";
|
|
232
|
-
},
|
|
233
|
-
lowercase: function() {
|
|
234
|
-
return "null";
|
|
235
|
-
},
|
|
236
|
-
uppercase: function() {
|
|
237
|
-
return "NULL";
|
|
238
|
-
},
|
|
239
|
-
camelcase: function() {
|
|
240
|
-
return "Null";
|
|
241
|
-
},
|
|
242
|
-
empty: function() {
|
|
243
|
-
return "";
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
defaultStyle: "lowercase"
|
|
247
|
-
});
|
|
248
|
-
function $l(e) {
|
|
249
|
-
if (e === null) return !1;
|
|
250
|
-
var n = e.length;
|
|
251
|
-
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
252
|
-
}
|
|
253
|
-
function jl(e) {
|
|
254
|
-
return e === "true" || e === "True" || e === "TRUE";
|
|
255
|
-
}
|
|
256
|
-
function Ul(e) {
|
|
257
|
-
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
258
|
-
}
|
|
259
|
-
var ii = new N("tag:yaml.org,2002:bool", {
|
|
260
|
-
kind: "scalar",
|
|
261
|
-
resolve: $l,
|
|
262
|
-
construct: jl,
|
|
263
|
-
predicate: Ul,
|
|
264
|
-
represent: {
|
|
265
|
-
lowercase: function(e) {
|
|
266
|
-
return e ? "true" : "false";
|
|
267
|
-
},
|
|
268
|
-
uppercase: function(e) {
|
|
269
|
-
return e ? "TRUE" : "FALSE";
|
|
270
|
-
},
|
|
271
|
-
camelcase: function(e) {
|
|
272
|
-
return e ? "True" : "False";
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
defaultStyle: "lowercase"
|
|
276
|
-
});
|
|
277
|
-
function Bl(e) {
|
|
278
|
-
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
279
|
-
}
|
|
280
|
-
function Yl(e) {
|
|
281
|
-
return 48 <= e && e <= 55;
|
|
282
|
-
}
|
|
283
|
-
function Pl(e) {
|
|
284
|
-
return 48 <= e && e <= 57;
|
|
285
|
-
}
|
|
286
|
-
function Hl(e) {
|
|
287
|
-
if (e === null) return !1;
|
|
288
|
-
var n = e.length, i = 0, r = !1, l;
|
|
289
|
-
if (!n) return !1;
|
|
290
|
-
if (l = e[i], (l === "-" || l === "+") && (l = e[++i]), l === "0") {
|
|
291
|
-
if (i + 1 === n) return !0;
|
|
292
|
-
if (l = e[++i], l === "b") {
|
|
293
|
-
for (i++; i < n; i++)
|
|
294
|
-
if (l = e[i], l !== "_") {
|
|
295
|
-
if (l !== "0" && l !== "1") return !1;
|
|
296
|
-
r = !0;
|
|
297
|
-
}
|
|
298
|
-
return r && l !== "_";
|
|
299
|
-
}
|
|
300
|
-
if (l === "x") {
|
|
301
|
-
for (i++; i < n; i++)
|
|
302
|
-
if (l = e[i], l !== "_") {
|
|
303
|
-
if (!Bl(e.charCodeAt(i))) return !1;
|
|
304
|
-
r = !0;
|
|
305
|
-
}
|
|
306
|
-
return r && l !== "_";
|
|
307
|
-
}
|
|
308
|
-
if (l === "o") {
|
|
309
|
-
for (i++; i < n; i++)
|
|
310
|
-
if (l = e[i], l !== "_") {
|
|
311
|
-
if (!Yl(e.charCodeAt(i))) return !1;
|
|
312
|
-
r = !0;
|
|
313
|
-
}
|
|
314
|
-
return r && l !== "_";
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
if (l === "_") return !1;
|
|
318
|
-
for (; i < n; i++)
|
|
319
|
-
if (l = e[i], l !== "_") {
|
|
320
|
-
if (!Pl(e.charCodeAt(i)))
|
|
321
|
-
return !1;
|
|
322
|
-
r = !0;
|
|
323
|
-
}
|
|
324
|
-
return !(!r || l === "_");
|
|
325
|
-
}
|
|
326
|
-
function Vl(e) {
|
|
327
|
-
var n = e, i = 1, r;
|
|
328
|
-
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), r = n[0], (r === "-" || r === "+") && (r === "-" && (i = -1), n = n.slice(1), r = n[0]), n === "0") return 0;
|
|
329
|
-
if (r === "0") {
|
|
330
|
-
if (n[1] === "b") return i * parseInt(n.slice(2), 2);
|
|
331
|
-
if (n[1] === "x") return i * parseInt(n.slice(2), 16);
|
|
332
|
-
if (n[1] === "o") return i * parseInt(n.slice(2), 8);
|
|
333
|
-
}
|
|
334
|
-
return i * parseInt(n, 10);
|
|
335
|
-
}
|
|
336
|
-
function ql(e) {
|
|
337
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !O.isNegativeZero(e);
|
|
338
|
-
}
|
|
339
|
-
var li = new N("tag:yaml.org,2002:int", {
|
|
340
|
-
kind: "scalar",
|
|
341
|
-
resolve: Hl,
|
|
342
|
-
construct: Vl,
|
|
343
|
-
predicate: ql,
|
|
344
|
-
represent: {
|
|
345
|
-
binary: function(e) {
|
|
346
|
-
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
347
|
-
},
|
|
348
|
-
octal: function(e) {
|
|
349
|
-
return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
|
|
350
|
-
},
|
|
351
|
-
decimal: function(e) {
|
|
352
|
-
return e.toString(10);
|
|
353
|
-
},
|
|
354
|
-
/* eslint-disable max-len */
|
|
355
|
-
hexadecimal: function(e) {
|
|
356
|
-
return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
defaultStyle: "decimal",
|
|
360
|
-
styleAliases: {
|
|
361
|
-
binary: [2, "bin"],
|
|
362
|
-
octal: [8, "oct"],
|
|
363
|
-
decimal: [10, "dec"],
|
|
364
|
-
hexadecimal: [16, "hex"]
|
|
365
|
-
}
|
|
366
|
-
}), Kl = new RegExp(
|
|
367
|
-
// 2.5e4, 2.5 and integers
|
|
368
|
-
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
369
|
-
);
|
|
370
|
-
function zl(e) {
|
|
371
|
-
return !(e === null || !Kl.test(e) || // Quick hack to not allow integers end with `_`
|
|
372
|
-
// Probably should update regexp & check speed
|
|
373
|
-
e[e.length - 1] === "_");
|
|
374
|
-
}
|
|
375
|
-
function Gl(e) {
|
|
376
|
-
var n, i;
|
|
377
|
-
return n = e.replace(/_/g, "").toLowerCase(), i = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? i === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : i * parseFloat(n, 10);
|
|
378
|
-
}
|
|
379
|
-
var Ql = /^[-+]?[0-9]+e/;
|
|
380
|
-
function Wl(e, n) {
|
|
381
|
-
var i;
|
|
382
|
-
if (isNaN(e))
|
|
383
|
-
switch (n) {
|
|
384
|
-
case "lowercase":
|
|
385
|
-
return ".nan";
|
|
386
|
-
case "uppercase":
|
|
387
|
-
return ".NAN";
|
|
388
|
-
case "camelcase":
|
|
389
|
-
return ".NaN";
|
|
390
|
-
}
|
|
391
|
-
else if (Number.POSITIVE_INFINITY === e)
|
|
392
|
-
switch (n) {
|
|
393
|
-
case "lowercase":
|
|
394
|
-
return ".inf";
|
|
395
|
-
case "uppercase":
|
|
396
|
-
return ".INF";
|
|
397
|
-
case "camelcase":
|
|
398
|
-
return ".Inf";
|
|
399
|
-
}
|
|
400
|
-
else if (Number.NEGATIVE_INFINITY === e)
|
|
401
|
-
switch (n) {
|
|
402
|
-
case "lowercase":
|
|
403
|
-
return "-.inf";
|
|
404
|
-
case "uppercase":
|
|
405
|
-
return "-.INF";
|
|
406
|
-
case "camelcase":
|
|
407
|
-
return "-.Inf";
|
|
408
|
-
}
|
|
409
|
-
else if (O.isNegativeZero(e))
|
|
410
|
-
return "-0.0";
|
|
411
|
-
return i = e.toString(10), Ql.test(i) ? i.replace("e", ".e") : i;
|
|
412
|
-
}
|
|
413
|
-
function Jl(e) {
|
|
414
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || O.isNegativeZero(e));
|
|
415
|
-
}
|
|
416
|
-
var ri = new N("tag:yaml.org,2002:float", {
|
|
417
|
-
kind: "scalar",
|
|
418
|
-
resolve: zl,
|
|
419
|
-
construct: Gl,
|
|
420
|
-
predicate: Jl,
|
|
421
|
-
represent: Wl,
|
|
422
|
-
defaultStyle: "lowercase"
|
|
423
|
-
}), ti = ei.extend({
|
|
424
|
-
implicit: [
|
|
425
|
-
ni,
|
|
426
|
-
ii,
|
|
427
|
-
li,
|
|
428
|
-
ri
|
|
429
|
-
]
|
|
430
|
-
}), oi = ti, ui = new RegExp(
|
|
431
|
-
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
432
|
-
), ai = new RegExp(
|
|
433
|
-
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
434
|
-
);
|
|
435
|
-
function Zl(e) {
|
|
436
|
-
return e === null ? !1 : ui.exec(e) !== null || ai.exec(e) !== null;
|
|
437
|
-
}
|
|
438
|
-
function Xl(e) {
|
|
439
|
-
var n, i, r, l, o, t, u, a = 0, s = null, m, d, y;
|
|
440
|
-
if (n = ui.exec(e), n === null && (n = ai.exec(e)), n === null) throw new Error("Date resolve error");
|
|
441
|
-
if (i = +n[1], r = +n[2] - 1, l = +n[3], !n[4])
|
|
442
|
-
return new Date(Date.UTC(i, r, l));
|
|
443
|
-
if (o = +n[4], t = +n[5], u = +n[6], n[7]) {
|
|
444
|
-
for (a = n[7].slice(0, 3); a.length < 3; )
|
|
445
|
-
a += "0";
|
|
446
|
-
a = +a;
|
|
447
|
-
}
|
|
448
|
-
return n[9] && (m = +n[10], d = +(n[11] || 0), s = (m * 60 + d) * 6e4, n[9] === "-" && (s = -s)), y = new Date(Date.UTC(i, r, l, o, t, u, a)), s && y.setTime(y.getTime() - s), y;
|
|
449
|
-
}
|
|
450
|
-
function er(e) {
|
|
451
|
-
return e.toISOString();
|
|
452
|
-
}
|
|
453
|
-
var si = new N("tag:yaml.org,2002:timestamp", {
|
|
454
|
-
kind: "scalar",
|
|
455
|
-
resolve: Zl,
|
|
456
|
-
construct: Xl,
|
|
457
|
-
instanceOf: Date,
|
|
458
|
-
represent: er
|
|
459
|
-
});
|
|
460
|
-
function nr(e) {
|
|
461
|
-
return e === "<<" || e === null;
|
|
462
|
-
}
|
|
463
|
-
var ci = new N("tag:yaml.org,2002:merge", {
|
|
464
|
-
kind: "scalar",
|
|
465
|
-
resolve: nr
|
|
466
|
-
}), tn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
467
|
-
\r`;
|
|
468
|
-
function ir(e) {
|
|
469
|
-
if (e === null) return !1;
|
|
470
|
-
var n, i, r = 0, l = e.length, o = tn;
|
|
471
|
-
for (i = 0; i < l; i++)
|
|
472
|
-
if (n = o.indexOf(e.charAt(i)), !(n > 64)) {
|
|
473
|
-
if (n < 0) return !1;
|
|
474
|
-
r += 6;
|
|
475
|
-
}
|
|
476
|
-
return r % 8 === 0;
|
|
477
|
-
}
|
|
478
|
-
function lr(e) {
|
|
479
|
-
var n, i, r = e.replace(/[\r\n=]/g, ""), l = r.length, o = tn, t = 0, u = [];
|
|
480
|
-
for (n = 0; n < l; n++)
|
|
481
|
-
n % 4 === 0 && n && (u.push(t >> 16 & 255), u.push(t >> 8 & 255), u.push(t & 255)), t = t << 6 | o.indexOf(r.charAt(n));
|
|
482
|
-
return i = l % 4 * 6, i === 0 ? (u.push(t >> 16 & 255), u.push(t >> 8 & 255), u.push(t & 255)) : i === 18 ? (u.push(t >> 10 & 255), u.push(t >> 2 & 255)) : i === 12 && u.push(t >> 4 & 255), new Uint8Array(u);
|
|
483
|
-
}
|
|
484
|
-
function rr(e) {
|
|
485
|
-
var n = "", i = 0, r, l, o = e.length, t = tn;
|
|
486
|
-
for (r = 0; r < o; r++)
|
|
487
|
-
r % 3 === 0 && r && (n += t[i >> 18 & 63], n += t[i >> 12 & 63], n += t[i >> 6 & 63], n += t[i & 63]), i = (i << 8) + e[r];
|
|
488
|
-
return l = o % 3, l === 0 ? (n += t[i >> 18 & 63], n += t[i >> 12 & 63], n += t[i >> 6 & 63], n += t[i & 63]) : l === 2 ? (n += t[i >> 10 & 63], n += t[i >> 4 & 63], n += t[i << 2 & 63], n += t[64]) : l === 1 && (n += t[i >> 2 & 63], n += t[i << 4 & 63], n += t[64], n += t[64]), n;
|
|
489
|
-
}
|
|
490
|
-
function tr(e) {
|
|
491
|
-
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
492
|
-
}
|
|
493
|
-
var fi = new N("tag:yaml.org,2002:binary", {
|
|
494
|
-
kind: "scalar",
|
|
495
|
-
resolve: ir,
|
|
496
|
-
construct: lr,
|
|
497
|
-
predicate: tr,
|
|
498
|
-
represent: rr
|
|
499
|
-
}), or = Object.prototype.hasOwnProperty, ur = Object.prototype.toString;
|
|
500
|
-
function ar(e) {
|
|
501
|
-
if (e === null) return !0;
|
|
502
|
-
var n = [], i, r, l, o, t, u = e;
|
|
503
|
-
for (i = 0, r = u.length; i < r; i += 1) {
|
|
504
|
-
if (l = u[i], t = !1, ur.call(l) !== "[object Object]") return !1;
|
|
505
|
-
for (o in l)
|
|
506
|
-
if (or.call(l, o))
|
|
507
|
-
if (!t) t = !0;
|
|
508
|
-
else return !1;
|
|
509
|
-
if (!t) return !1;
|
|
510
|
-
if (n.indexOf(o) === -1) n.push(o);
|
|
511
|
-
else return !1;
|
|
512
|
-
}
|
|
513
|
-
return !0;
|
|
514
|
-
}
|
|
515
|
-
function sr(e) {
|
|
516
|
-
return e !== null ? e : [];
|
|
517
|
-
}
|
|
518
|
-
var di = new N("tag:yaml.org,2002:omap", {
|
|
519
|
-
kind: "sequence",
|
|
520
|
-
resolve: ar,
|
|
521
|
-
construct: sr
|
|
522
|
-
}), cr = Object.prototype.toString;
|
|
523
|
-
function fr(e) {
|
|
524
|
-
if (e === null) return !0;
|
|
525
|
-
var n, i, r, l, o, t = e;
|
|
526
|
-
for (o = new Array(t.length), n = 0, i = t.length; n < i; n += 1) {
|
|
527
|
-
if (r = t[n], cr.call(r) !== "[object Object]" || (l = Object.keys(r), l.length !== 1)) return !1;
|
|
528
|
-
o[n] = [l[0], r[l[0]]];
|
|
529
|
-
}
|
|
530
|
-
return !0;
|
|
531
|
-
}
|
|
532
|
-
function dr(e) {
|
|
533
|
-
if (e === null) return [];
|
|
534
|
-
var n, i, r, l, o, t = e;
|
|
535
|
-
for (o = new Array(t.length), n = 0, i = t.length; n < i; n += 1)
|
|
536
|
-
r = t[n], l = Object.keys(r), o[n] = [l[0], r[l[0]]];
|
|
537
|
-
return o;
|
|
538
|
-
}
|
|
539
|
-
var pi = new N("tag:yaml.org,2002:pairs", {
|
|
540
|
-
kind: "sequence",
|
|
541
|
-
resolve: fr,
|
|
542
|
-
construct: dr
|
|
543
|
-
}), pr = Object.prototype.hasOwnProperty;
|
|
544
|
-
function mr(e) {
|
|
545
|
-
if (e === null) return !0;
|
|
546
|
-
var n, i = e;
|
|
547
|
-
for (n in i)
|
|
548
|
-
if (pr.call(i, n) && i[n] !== null)
|
|
549
|
-
return !1;
|
|
550
|
-
return !0;
|
|
551
|
-
}
|
|
552
|
-
function hr(e) {
|
|
553
|
-
return e !== null ? e : {};
|
|
554
|
-
}
|
|
555
|
-
var mi = new N("tag:yaml.org,2002:set", {
|
|
556
|
-
kind: "mapping",
|
|
557
|
-
resolve: mr,
|
|
558
|
-
construct: hr
|
|
559
|
-
}), on = oi.extend({
|
|
560
|
-
implicit: [
|
|
561
|
-
si,
|
|
562
|
-
ci
|
|
563
|
-
],
|
|
564
|
-
explicit: [
|
|
565
|
-
fi,
|
|
566
|
-
di,
|
|
567
|
-
pi,
|
|
568
|
-
mi
|
|
569
|
-
]
|
|
570
|
-
}), X = Object.prototype.hasOwnProperty, Oe = 1, hi = 2, vi = 3, Le = 4, Qe = 1, vr = 2, En = 3, xr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, yr = /[\x85\u2028\u2029]/, gr = /[,\[\]\{\}]/, xi = /^(?:!|!!|![a-z\-]+!)$/i, yi = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
571
|
-
function Fn(e) {
|
|
572
|
-
return Object.prototype.toString.call(e);
|
|
573
|
-
}
|
|
574
|
-
function G(e) {
|
|
575
|
-
return e === 10 || e === 13;
|
|
576
|
-
}
|
|
577
|
-
function re(e) {
|
|
578
|
-
return e === 9 || e === 32;
|
|
579
|
-
}
|
|
580
|
-
function U(e) {
|
|
581
|
-
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
582
|
-
}
|
|
583
|
-
function ce(e) {
|
|
584
|
-
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
585
|
-
}
|
|
586
|
-
function br(e) {
|
|
587
|
-
var n;
|
|
588
|
-
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
589
|
-
}
|
|
590
|
-
function _r(e) {
|
|
591
|
-
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
592
|
-
}
|
|
593
|
-
function wr(e) {
|
|
594
|
-
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
595
|
-
}
|
|
596
|
-
function Tn(e) {
|
|
597
|
-
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
598
|
-
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
599
|
-
}
|
|
600
|
-
function Ar(e) {
|
|
601
|
-
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
602
|
-
(e - 65536 >> 10) + 55296,
|
|
603
|
-
(e - 65536 & 1023) + 56320
|
|
604
|
-
);
|
|
605
|
-
}
|
|
606
|
-
function gi(e, n, i) {
|
|
607
|
-
n === "__proto__" ? Object.defineProperty(e, n, {
|
|
608
|
-
configurable: !0,
|
|
609
|
-
enumerable: !0,
|
|
610
|
-
writable: !0,
|
|
611
|
-
value: i
|
|
612
|
-
}) : e[n] = i;
|
|
613
|
-
}
|
|
614
|
-
var bi = new Array(256), _i = new Array(256);
|
|
615
|
-
for (var ae = 0; ae < 256; ae++)
|
|
616
|
-
bi[ae] = Tn(ae) ? 1 : 0, _i[ae] = Tn(ae);
|
|
617
|
-
function kr(e, n) {
|
|
618
|
-
this.input = e, this.filename = n.filename || null, this.schema = n.schema || on, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
619
|
-
}
|
|
620
|
-
function wi(e, n) {
|
|
621
|
-
var i = {
|
|
622
|
-
name: e.filename,
|
|
623
|
-
buffer: e.input.slice(0, -1),
|
|
624
|
-
// omit trailing \0
|
|
625
|
-
position: e.position,
|
|
626
|
-
line: e.line,
|
|
627
|
-
column: e.position - e.lineStart
|
|
628
|
-
};
|
|
629
|
-
return i.snippet = Fl(i), new $(n, i);
|
|
630
|
-
}
|
|
631
|
-
function _(e, n) {
|
|
632
|
-
throw wi(e, n);
|
|
633
|
-
}
|
|
634
|
-
function Ne(e, n) {
|
|
635
|
-
e.onWarning && e.onWarning.call(null, wi(e, n));
|
|
636
|
-
}
|
|
637
|
-
var In = {
|
|
638
|
-
YAML: function(n, i, r) {
|
|
639
|
-
var l, o, t;
|
|
640
|
-
n.version !== null && _(n, "duplication of %YAML directive"), r.length !== 1 && _(n, "YAML directive accepts exactly one argument"), l = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), l === null && _(n, "ill-formed argument of the YAML directive"), o = parseInt(l[1], 10), t = parseInt(l[2], 10), o !== 1 && _(n, "unacceptable YAML version of the document"), n.version = r[0], n.checkLineBreaks = t < 2, t !== 1 && t !== 2 && Ne(n, "unsupported YAML version of the document");
|
|
641
|
-
},
|
|
642
|
-
TAG: function(n, i, r) {
|
|
643
|
-
var l, o;
|
|
644
|
-
r.length !== 2 && _(n, "TAG directive accepts exactly two arguments"), l = r[0], o = r[1], xi.test(l) || _(n, "ill-formed tag handle (first argument) of the TAG directive"), X.call(n.tagMap, l) && _(n, 'there is a previously declared suffix for "' + l + '" tag handle'), yi.test(o) || _(n, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
645
|
-
try {
|
|
646
|
-
o = decodeURIComponent(o);
|
|
647
|
-
} catch {
|
|
648
|
-
_(n, "tag prefix is malformed: " + o);
|
|
649
|
-
}
|
|
650
|
-
n.tagMap[l] = o;
|
|
651
|
-
}
|
|
652
|
-
};
|
|
653
|
-
function Z(e, n, i, r) {
|
|
654
|
-
var l, o, t, u;
|
|
655
|
-
if (n < i) {
|
|
656
|
-
if (u = e.input.slice(n, i), r)
|
|
657
|
-
for (l = 0, o = u.length; l < o; l += 1)
|
|
658
|
-
t = u.charCodeAt(l), t === 9 || 32 <= t && t <= 1114111 || _(e, "expected valid JSON character");
|
|
659
|
-
else xr.test(u) && _(e, "the stream contains non-printable characters");
|
|
660
|
-
e.result += u;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function On(e, n, i, r) {
|
|
664
|
-
var l, o, t, u;
|
|
665
|
-
for (O.isObject(i) || _(e, "cannot merge mappings; the provided source object is unacceptable"), l = Object.keys(i), t = 0, u = l.length; t < u; t += 1)
|
|
666
|
-
o = l[t], X.call(n, o) || (gi(n, o, i[o]), r[o] = !0);
|
|
667
|
-
}
|
|
668
|
-
function fe(e, n, i, r, l, o, t, u, a) {
|
|
669
|
-
var s, m;
|
|
670
|
-
if (Array.isArray(l))
|
|
671
|
-
for (l = Array.prototype.slice.call(l), s = 0, m = l.length; s < m; s += 1)
|
|
672
|
-
Array.isArray(l[s]) && _(e, "nested arrays are not supported inside keys"), typeof l == "object" && Fn(l[s]) === "[object Object]" && (l[s] = "[object Object]");
|
|
673
|
-
if (typeof l == "object" && Fn(l) === "[object Object]" && (l = "[object Object]"), l = String(l), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
674
|
-
if (Array.isArray(o))
|
|
675
|
-
for (s = 0, m = o.length; s < m; s += 1)
|
|
676
|
-
On(e, n, o[s], i);
|
|
677
|
-
else
|
|
678
|
-
On(e, n, o, i);
|
|
679
|
-
else
|
|
680
|
-
!e.json && !X.call(i, l) && X.call(n, l) && (e.line = t || e.line, e.lineStart = u || e.lineStart, e.position = a || e.position, _(e, "duplicated mapping key")), gi(n, l, o), delete i[l];
|
|
681
|
-
return n;
|
|
682
|
-
}
|
|
683
|
-
function un(e) {
|
|
684
|
-
var n;
|
|
685
|
-
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : _(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
686
|
-
}
|
|
687
|
-
function T(e, n, i) {
|
|
688
|
-
for (var r = 0, l = e.input.charCodeAt(e.position); l !== 0; ) {
|
|
689
|
-
for (; re(l); )
|
|
690
|
-
l === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), l = e.input.charCodeAt(++e.position);
|
|
691
|
-
if (n && l === 35)
|
|
692
|
-
do
|
|
693
|
-
l = e.input.charCodeAt(++e.position);
|
|
694
|
-
while (l !== 10 && l !== 13 && l !== 0);
|
|
695
|
-
if (G(l))
|
|
696
|
-
for (un(e), l = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; l === 32; )
|
|
697
|
-
e.lineIndent++, l = e.input.charCodeAt(++e.position);
|
|
698
|
-
else
|
|
699
|
-
break;
|
|
700
|
-
}
|
|
701
|
-
return i !== -1 && r !== 0 && e.lineIndent < i && Ne(e, "deficient indentation"), r;
|
|
702
|
-
}
|
|
703
|
-
function je(e) {
|
|
704
|
-
var n = e.position, i;
|
|
705
|
-
return i = e.input.charCodeAt(n), !!((i === 45 || i === 46) && i === e.input.charCodeAt(n + 1) && i === e.input.charCodeAt(n + 2) && (n += 3, i = e.input.charCodeAt(n), i === 0 || U(i)));
|
|
706
|
-
}
|
|
707
|
-
function an(e, n) {
|
|
708
|
-
n === 1 ? e.result += " " : n > 1 && (e.result += O.repeat(`
|
|
709
|
-
`, n - 1));
|
|
710
|
-
}
|
|
711
|
-
function Cr(e, n, i) {
|
|
712
|
-
var r, l, o, t, u, a, s, m, d = e.kind, y = e.result, b;
|
|
713
|
-
if (b = e.input.charCodeAt(e.position), U(b) || ce(b) || b === 35 || b === 38 || b === 42 || b === 33 || b === 124 || b === 62 || b === 39 || b === 34 || b === 37 || b === 64 || b === 96 || (b === 63 || b === 45) && (l = e.input.charCodeAt(e.position + 1), U(l) || i && ce(l)))
|
|
714
|
-
return !1;
|
|
715
|
-
for (e.kind = "scalar", e.result = "", o = t = e.position, u = !1; b !== 0; ) {
|
|
716
|
-
if (b === 58) {
|
|
717
|
-
if (l = e.input.charCodeAt(e.position + 1), U(l) || i && ce(l))
|
|
718
|
-
break;
|
|
719
|
-
} else if (b === 35) {
|
|
720
|
-
if (r = e.input.charCodeAt(e.position - 1), U(r))
|
|
721
|
-
break;
|
|
722
|
-
} else {
|
|
723
|
-
if (e.position === e.lineStart && je(e) || i && ce(b))
|
|
724
|
-
break;
|
|
725
|
-
if (G(b))
|
|
726
|
-
if (a = e.line, s = e.lineStart, m = e.lineIndent, T(e, !1, -1), e.lineIndent >= n) {
|
|
727
|
-
u = !0, b = e.input.charCodeAt(e.position);
|
|
728
|
-
continue;
|
|
729
|
-
} else {
|
|
730
|
-
e.position = t, e.line = a, e.lineStart = s, e.lineIndent = m;
|
|
731
|
-
break;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
u && (Z(e, o, t, !1), an(e, e.line - a), o = t = e.position, u = !1), re(b) || (t = e.position + 1), b = e.input.charCodeAt(++e.position);
|
|
735
|
-
}
|
|
736
|
-
return Z(e, o, t, !1), e.result ? !0 : (e.kind = d, e.result = y, !1);
|
|
737
|
-
}
|
|
738
|
-
function Sr(e, n) {
|
|
739
|
-
var i, r, l;
|
|
740
|
-
if (i = e.input.charCodeAt(e.position), i !== 39)
|
|
741
|
-
return !1;
|
|
742
|
-
for (e.kind = "scalar", e.result = "", e.position++, r = l = e.position; (i = e.input.charCodeAt(e.position)) !== 0; )
|
|
743
|
-
if (i === 39)
|
|
744
|
-
if (Z(e, r, e.position, !0), i = e.input.charCodeAt(++e.position), i === 39)
|
|
745
|
-
r = e.position, e.position++, l = e.position;
|
|
746
|
-
else
|
|
747
|
-
return !0;
|
|
748
|
-
else G(i) ? (Z(e, r, l, !0), an(e, T(e, !1, n)), r = l = e.position) : e.position === e.lineStart && je(e) ? _(e, "unexpected end of the document within a single quoted scalar") : (e.position++, l = e.position);
|
|
749
|
-
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
750
|
-
}
|
|
751
|
-
function Er(e, n) {
|
|
752
|
-
var i, r, l, o, t, u;
|
|
753
|
-
if (u = e.input.charCodeAt(e.position), u !== 34)
|
|
754
|
-
return !1;
|
|
755
|
-
for (e.kind = "scalar", e.result = "", e.position++, i = r = e.position; (u = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
756
|
-
if (u === 34)
|
|
757
|
-
return Z(e, i, e.position, !0), e.position++, !0;
|
|
758
|
-
if (u === 92) {
|
|
759
|
-
if (Z(e, i, e.position, !0), u = e.input.charCodeAt(++e.position), G(u))
|
|
760
|
-
T(e, !1, n);
|
|
761
|
-
else if (u < 256 && bi[u])
|
|
762
|
-
e.result += _i[u], e.position++;
|
|
763
|
-
else if ((t = _r(u)) > 0) {
|
|
764
|
-
for (l = t, o = 0; l > 0; l--)
|
|
765
|
-
u = e.input.charCodeAt(++e.position), (t = br(u)) >= 0 ? o = (o << 4) + t : _(e, "expected hexadecimal character");
|
|
766
|
-
e.result += Ar(o), e.position++;
|
|
767
|
-
} else
|
|
768
|
-
_(e, "unknown escape sequence");
|
|
769
|
-
i = r = e.position;
|
|
770
|
-
} else G(u) ? (Z(e, i, r, !0), an(e, T(e, !1, n)), i = r = e.position) : e.position === e.lineStart && je(e) ? _(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
771
|
-
}
|
|
772
|
-
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
773
|
-
}
|
|
774
|
-
function Fr(e, n) {
|
|
775
|
-
var i = !0, r, l, o, t = e.tag, u, a = e.anchor, s, m, d, y, b, p = /* @__PURE__ */ Object.create(null), h, x, w, g;
|
|
776
|
-
if (g = e.input.charCodeAt(e.position), g === 91)
|
|
777
|
-
m = 93, b = !1, u = [];
|
|
778
|
-
else if (g === 123)
|
|
779
|
-
m = 125, b = !0, u = {};
|
|
780
|
-
else
|
|
781
|
-
return !1;
|
|
782
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), g = e.input.charCodeAt(++e.position); g !== 0; ) {
|
|
783
|
-
if (T(e, !0, n), g = e.input.charCodeAt(e.position), g === m)
|
|
784
|
-
return e.position++, e.tag = t, e.anchor = a, e.kind = b ? "mapping" : "sequence", e.result = u, !0;
|
|
785
|
-
i ? g === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries"), x = h = w = null, d = y = !1, g === 63 && (s = e.input.charCodeAt(e.position + 1), U(s) && (d = y = !0, e.position++, T(e, !0, n))), r = e.line, l = e.lineStart, o = e.position, de(e, n, Oe, !1, !0), x = e.tag, h = e.result, T(e, !0, n), g = e.input.charCodeAt(e.position), (y || e.line === r) && g === 58 && (d = !0, g = e.input.charCodeAt(++e.position), T(e, !0, n), de(e, n, Oe, !1, !0), w = e.result), b ? fe(e, u, p, x, h, w, r, l, o) : d ? u.push(fe(e, null, p, x, h, w, r, l, o)) : u.push(h), T(e, !0, n), g = e.input.charCodeAt(e.position), g === 44 ? (i = !0, g = e.input.charCodeAt(++e.position)) : i = !1;
|
|
786
|
-
}
|
|
787
|
-
_(e, "unexpected end of the stream within a flow collection");
|
|
788
|
-
}
|
|
789
|
-
function Tr(e, n) {
|
|
790
|
-
var i, r, l = Qe, o = !1, t = !1, u = n, a = 0, s = !1, m, d;
|
|
791
|
-
if (d = e.input.charCodeAt(e.position), d === 124)
|
|
792
|
-
r = !1;
|
|
793
|
-
else if (d === 62)
|
|
794
|
-
r = !0;
|
|
795
|
-
else
|
|
796
|
-
return !1;
|
|
797
|
-
for (e.kind = "scalar", e.result = ""; d !== 0; )
|
|
798
|
-
if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
|
|
799
|
-
Qe === l ? l = d === 43 ? En : vr : _(e, "repeat of a chomping mode identifier");
|
|
800
|
-
else if ((m = wr(d)) >= 0)
|
|
801
|
-
m === 0 ? _(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : t ? _(e, "repeat of an indentation width identifier") : (u = n + m - 1, t = !0);
|
|
802
|
-
else
|
|
803
|
-
break;
|
|
804
|
-
if (re(d)) {
|
|
805
|
-
do
|
|
806
|
-
d = e.input.charCodeAt(++e.position);
|
|
807
|
-
while (re(d));
|
|
808
|
-
if (d === 35)
|
|
809
|
-
do
|
|
810
|
-
d = e.input.charCodeAt(++e.position);
|
|
811
|
-
while (!G(d) && d !== 0);
|
|
812
|
-
}
|
|
813
|
-
for (; d !== 0; ) {
|
|
814
|
-
for (un(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!t || e.lineIndent < u) && d === 32; )
|
|
815
|
-
e.lineIndent++, d = e.input.charCodeAt(++e.position);
|
|
816
|
-
if (!t && e.lineIndent > u && (u = e.lineIndent), G(d)) {
|
|
817
|
-
a++;
|
|
818
|
-
continue;
|
|
819
|
-
}
|
|
820
|
-
if (e.lineIndent < u) {
|
|
821
|
-
l === En ? e.result += O.repeat(`
|
|
822
|
-
`, o ? 1 + a : a) : l === Qe && o && (e.result += `
|
|
823
|
-
`);
|
|
824
|
-
break;
|
|
825
|
-
}
|
|
826
|
-
for (r ? re(d) ? (s = !0, e.result += O.repeat(`
|
|
827
|
-
`, o ? 1 + a : a)) : s ? (s = !1, e.result += O.repeat(`
|
|
828
|
-
`, a + 1)) : a === 0 ? o && (e.result += " ") : e.result += O.repeat(`
|
|
829
|
-
`, a) : e.result += O.repeat(`
|
|
830
|
-
`, o ? 1 + a : a), o = !0, t = !0, a = 0, i = e.position; !G(d) && d !== 0; )
|
|
831
|
-
d = e.input.charCodeAt(++e.position);
|
|
832
|
-
Z(e, i, e.position, !1);
|
|
833
|
-
}
|
|
834
|
-
return !0;
|
|
835
|
-
}
|
|
836
|
-
function Ln(e, n) {
|
|
837
|
-
var i, r = e.tag, l = e.anchor, o = [], t, u = !1, a;
|
|
838
|
-
if (e.firstTabInLine !== -1) return !1;
|
|
839
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), a = e.input.charCodeAt(e.position); a !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), !(a !== 45 || (t = e.input.charCodeAt(e.position + 1), !U(t)))); ) {
|
|
840
|
-
if (u = !0, e.position++, T(e, !0, -1) && e.lineIndent <= n) {
|
|
841
|
-
o.push(null), a = e.input.charCodeAt(e.position);
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
if (i = e.line, de(e, n, vi, !1, !0), o.push(e.result), T(e, !0, -1), a = e.input.charCodeAt(e.position), (e.line === i || e.lineIndent > n) && a !== 0)
|
|
845
|
-
_(e, "bad indentation of a sequence entry");
|
|
846
|
-
else if (e.lineIndent < n)
|
|
847
|
-
break;
|
|
848
|
-
}
|
|
849
|
-
return u ? (e.tag = r, e.anchor = l, e.kind = "sequence", e.result = o, !0) : !1;
|
|
850
|
-
}
|
|
851
|
-
function Ir(e, n, i) {
|
|
852
|
-
var r, l, o, t, u, a, s = e.tag, m = e.anchor, d = {}, y = /* @__PURE__ */ Object.create(null), b = null, p = null, h = null, x = !1, w = !1, g;
|
|
853
|
-
if (e.firstTabInLine !== -1) return !1;
|
|
854
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), g = e.input.charCodeAt(e.position); g !== 0; ) {
|
|
855
|
-
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (g === 63 || g === 58) && U(r))
|
|
856
|
-
g === 63 ? (x && (fe(e, d, y, b, p, null, t, u, a), b = p = h = null), w = !0, x = !0, l = !0) : x ? (x = !1, l = !0) : _(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, g = r;
|
|
857
|
-
else {
|
|
858
|
-
if (t = e.line, u = e.lineStart, a = e.position, !de(e, i, hi, !1, !0))
|
|
859
|
-
break;
|
|
860
|
-
if (e.line === o) {
|
|
861
|
-
for (g = e.input.charCodeAt(e.position); re(g); )
|
|
862
|
-
g = e.input.charCodeAt(++e.position);
|
|
863
|
-
if (g === 58)
|
|
864
|
-
g = e.input.charCodeAt(++e.position), U(g) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (fe(e, d, y, b, p, null, t, u, a), b = p = h = null), w = !0, x = !1, l = !1, b = e.tag, p = e.result;
|
|
865
|
-
else if (w)
|
|
866
|
-
_(e, "can not read an implicit mapping pair; a colon is missed");
|
|
867
|
-
else
|
|
868
|
-
return e.tag = s, e.anchor = m, !0;
|
|
869
|
-
} else if (w)
|
|
870
|
-
_(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
871
|
-
else
|
|
872
|
-
return e.tag = s, e.anchor = m, !0;
|
|
873
|
-
}
|
|
874
|
-
if ((e.line === o || e.lineIndent > n) && (x && (t = e.line, u = e.lineStart, a = e.position), de(e, n, Le, !0, l) && (x ? p = e.result : h = e.result), x || (fe(e, d, y, b, p, h, t, u, a), b = p = h = null), T(e, !0, -1), g = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && g !== 0)
|
|
875
|
-
_(e, "bad indentation of a mapping entry");
|
|
876
|
-
else if (e.lineIndent < n)
|
|
877
|
-
break;
|
|
878
|
-
}
|
|
879
|
-
return x && fe(e, d, y, b, p, null, t, u, a), w && (e.tag = s, e.anchor = m, e.kind = "mapping", e.result = d), w;
|
|
880
|
-
}
|
|
881
|
-
function Or(e) {
|
|
882
|
-
var n, i = !1, r = !1, l, o, t;
|
|
883
|
-
if (t = e.input.charCodeAt(e.position), t !== 33) return !1;
|
|
884
|
-
if (e.tag !== null && _(e, "duplication of a tag property"), t = e.input.charCodeAt(++e.position), t === 60 ? (i = !0, t = e.input.charCodeAt(++e.position)) : t === 33 ? (r = !0, l = "!!", t = e.input.charCodeAt(++e.position)) : l = "!", n = e.position, i) {
|
|
885
|
-
do
|
|
886
|
-
t = e.input.charCodeAt(++e.position);
|
|
887
|
-
while (t !== 0 && t !== 62);
|
|
888
|
-
e.position < e.length ? (o = e.input.slice(n, e.position), t = e.input.charCodeAt(++e.position)) : _(e, "unexpected end of the stream within a verbatim tag");
|
|
889
|
-
} else {
|
|
890
|
-
for (; t !== 0 && !U(t); )
|
|
891
|
-
t === 33 && (r ? _(e, "tag suffix cannot contain exclamation marks") : (l = e.input.slice(n - 1, e.position + 1), xi.test(l) || _(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), t = e.input.charCodeAt(++e.position);
|
|
892
|
-
o = e.input.slice(n, e.position), gr.test(o) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
893
|
-
}
|
|
894
|
-
o && !yi.test(o) && _(e, "tag name cannot contain such characters: " + o);
|
|
895
|
-
try {
|
|
896
|
-
o = decodeURIComponent(o);
|
|
897
|
-
} catch {
|
|
898
|
-
_(e, "tag name is malformed: " + o);
|
|
899
|
-
}
|
|
900
|
-
return i ? e.tag = o : X.call(e.tagMap, l) ? e.tag = e.tagMap[l] + o : l === "!" ? e.tag = "!" + o : l === "!!" ? e.tag = "tag:yaml.org,2002:" + o : _(e, 'undeclared tag handle "' + l + '"'), !0;
|
|
901
|
-
}
|
|
902
|
-
function Lr(e) {
|
|
903
|
-
var n, i;
|
|
904
|
-
if (i = e.input.charCodeAt(e.position), i !== 38) return !1;
|
|
905
|
-
for (e.anchor !== null && _(e, "duplication of an anchor property"), i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !U(i) && !ce(i); )
|
|
906
|
-
i = e.input.charCodeAt(++e.position);
|
|
907
|
-
return e.position === n && _(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
908
|
-
}
|
|
909
|
-
function Nr(e) {
|
|
910
|
-
var n, i, r;
|
|
911
|
-
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
912
|
-
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !U(r) && !ce(r); )
|
|
913
|
-
r = e.input.charCodeAt(++e.position);
|
|
914
|
-
return e.position === n && _(e, "name of an alias node must contain at least one character"), i = e.input.slice(n, e.position), X.call(e.anchorMap, i) || _(e, 'unidentified alias "' + i + '"'), e.result = e.anchorMap[i], T(e, !0, -1), !0;
|
|
915
|
-
}
|
|
916
|
-
function de(e, n, i, r, l) {
|
|
917
|
-
var o, t, u, a = 1, s = !1, m = !1, d, y, b, p, h, x;
|
|
918
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = t = u = Le === i || vi === i, r && T(e, !0, -1) && (s = !0, e.lineIndent > n ? a = 1 : e.lineIndent === n ? a = 0 : e.lineIndent < n && (a = -1)), a === 1)
|
|
919
|
-
for (; Or(e) || Lr(e); )
|
|
920
|
-
T(e, !0, -1) ? (s = !0, u = o, e.lineIndent > n ? a = 1 : e.lineIndent === n ? a = 0 : e.lineIndent < n && (a = -1)) : u = !1;
|
|
921
|
-
if (u && (u = s || l), (a === 1 || Le === i) && (Oe === i || hi === i ? h = n : h = n + 1, x = e.position - e.lineStart, a === 1 ? u && (Ln(e, x) || Ir(e, x, h)) || Fr(e, h) ? m = !0 : (t && Tr(e, h) || Sr(e, h) || Er(e, h) ? m = !0 : Nr(e) ? (m = !0, (e.tag !== null || e.anchor !== null) && _(e, "alias node should not have any properties")) : Cr(e, h, Oe === i) && (m = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : a === 0 && (m = u && Ln(e, x))), e.tag === null)
|
|
922
|
-
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
923
|
-
else if (e.tag === "?") {
|
|
924
|
-
for (e.result !== null && e.kind !== "scalar" && _(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0, y = e.implicitTypes.length; d < y; d += 1)
|
|
925
|
-
if (p = e.implicitTypes[d], p.resolve(e.result)) {
|
|
926
|
-
e.result = p.construct(e.result), e.tag = p.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
927
|
-
break;
|
|
928
|
-
}
|
|
929
|
-
} else if (e.tag !== "!") {
|
|
930
|
-
if (X.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
931
|
-
p = e.typeMap[e.kind || "fallback"][e.tag];
|
|
932
|
-
else
|
|
933
|
-
for (p = null, b = e.typeMap.multi[e.kind || "fallback"], d = 0, y = b.length; d < y; d += 1)
|
|
934
|
-
if (e.tag.slice(0, b[d].tag.length) === b[d].tag) {
|
|
935
|
-
p = b[d];
|
|
936
|
-
break;
|
|
937
|
-
}
|
|
938
|
-
p || _(e, "unknown tag !<" + e.tag + ">"), e.result !== null && p.kind !== e.kind && _(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + p.kind + '", not "' + e.kind + '"'), p.resolve(e.result, e.tag) ? (e.result = p.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : _(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
939
|
-
}
|
|
940
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || m;
|
|
941
|
-
}
|
|
942
|
-
function Mr(e) {
|
|
943
|
-
var n = e.position, i, r, l, o = !1, t;
|
|
944
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (t = e.input.charCodeAt(e.position)) !== 0 && (T(e, !0, -1), t = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || t !== 37)); ) {
|
|
945
|
-
for (o = !0, t = e.input.charCodeAt(++e.position), i = e.position; t !== 0 && !U(t); )
|
|
946
|
-
t = e.input.charCodeAt(++e.position);
|
|
947
|
-
for (r = e.input.slice(i, e.position), l = [], r.length < 1 && _(e, "directive name must not be less than one character in length"); t !== 0; ) {
|
|
948
|
-
for (; re(t); )
|
|
949
|
-
t = e.input.charCodeAt(++e.position);
|
|
950
|
-
if (t === 35) {
|
|
951
|
-
do
|
|
952
|
-
t = e.input.charCodeAt(++e.position);
|
|
953
|
-
while (t !== 0 && !G(t));
|
|
954
|
-
break;
|
|
955
|
-
}
|
|
956
|
-
if (G(t)) break;
|
|
957
|
-
for (i = e.position; t !== 0 && !U(t); )
|
|
958
|
-
t = e.input.charCodeAt(++e.position);
|
|
959
|
-
l.push(e.input.slice(i, e.position));
|
|
960
|
-
}
|
|
961
|
-
t !== 0 && un(e), X.call(In, r) ? In[r](e, r, l) : Ne(e, 'unknown document directive "' + r + '"');
|
|
962
|
-
}
|
|
963
|
-
if (T(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, T(e, !0, -1)) : o && _(e, "directives end mark is expected"), de(e, e.lineIndent - 1, Le, !1, !0), T(e, !0, -1), e.checkLineBreaks && yr.test(e.input.slice(n, e.position)) && Ne(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && je(e)) {
|
|
964
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3, T(e, !0, -1));
|
|
965
|
-
return;
|
|
966
|
-
}
|
|
967
|
-
if (e.position < e.length - 1)
|
|
968
|
-
_(e, "end of the stream or a document separator is expected");
|
|
969
|
-
else
|
|
970
|
-
return;
|
|
971
|
-
}
|
|
972
|
-
function Ai(e, n) {
|
|
973
|
-
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
974
|
-
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
975
|
-
var i = new kr(e, n), r = e.indexOf("\0");
|
|
976
|
-
for (r !== -1 && (i.position = r, _(i, "null byte is not allowed in input")), i.input += "\0"; i.input.charCodeAt(i.position) === 32; )
|
|
977
|
-
i.lineIndent += 1, i.position += 1;
|
|
978
|
-
for (; i.position < i.length - 1; )
|
|
979
|
-
Mr(i);
|
|
980
|
-
return i.documents;
|
|
981
|
-
}
|
|
982
|
-
function Dr(e, n, i) {
|
|
983
|
-
n !== null && typeof n == "object" && typeof i > "u" && (i = n, n = null);
|
|
984
|
-
var r = Ai(e, i);
|
|
985
|
-
if (typeof n != "function")
|
|
986
|
-
return r;
|
|
987
|
-
for (var l = 0, o = r.length; l < o; l += 1)
|
|
988
|
-
n(r[l]);
|
|
989
|
-
}
|
|
990
|
-
function Rr(e, n) {
|
|
991
|
-
var i = Ai(e, n);
|
|
992
|
-
if (i.length !== 0) {
|
|
993
|
-
if (i.length === 1)
|
|
994
|
-
return i[0];
|
|
995
|
-
throw new $("expected a single document in the stream, but found more");
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
var $r = Dr, jr = Rr, ki = {
|
|
999
|
-
loadAll: $r,
|
|
1000
|
-
load: jr
|
|
1001
|
-
}, Ci = Object.prototype.toString, Si = Object.prototype.hasOwnProperty, sn = 65279, Ur = 9, ge = 10, Br = 13, Yr = 32, Pr = 33, Hr = 34, Ze = 35, Vr = 37, qr = 38, Kr = 39, zr = 42, Ei = 44, Gr = 45, Me = 58, Qr = 61, Wr = 62, Jr = 63, Zr = 64, Fi = 91, Ti = 93, Xr = 96, Ii = 123, et = 124, Oi = 125, R = {};
|
|
1002
|
-
R[0] = "\\0";
|
|
1003
|
-
R[7] = "\\a";
|
|
1004
|
-
R[8] = "\\b";
|
|
1005
|
-
R[9] = "\\t";
|
|
1006
|
-
R[10] = "\\n";
|
|
1007
|
-
R[11] = "\\v";
|
|
1008
|
-
R[12] = "\\f";
|
|
1009
|
-
R[13] = "\\r";
|
|
1010
|
-
R[27] = "\\e";
|
|
1011
|
-
R[34] = '\\"';
|
|
1012
|
-
R[92] = "\\\\";
|
|
1013
|
-
R[133] = "\\N";
|
|
1014
|
-
R[160] = "\\_";
|
|
1015
|
-
R[8232] = "\\L";
|
|
1016
|
-
R[8233] = "\\P";
|
|
1017
|
-
var nt = [
|
|
1018
|
-
"y",
|
|
1019
|
-
"Y",
|
|
1020
|
-
"yes",
|
|
1021
|
-
"Yes",
|
|
1022
|
-
"YES",
|
|
1023
|
-
"on",
|
|
1024
|
-
"On",
|
|
1025
|
-
"ON",
|
|
1026
|
-
"n",
|
|
1027
|
-
"N",
|
|
1028
|
-
"no",
|
|
1029
|
-
"No",
|
|
1030
|
-
"NO",
|
|
1031
|
-
"off",
|
|
1032
|
-
"Off",
|
|
1033
|
-
"OFF"
|
|
1034
|
-
], it = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
1035
|
-
function lt(e, n) {
|
|
1036
|
-
var i, r, l, o, t, u, a;
|
|
1037
|
-
if (n === null) return {};
|
|
1038
|
-
for (i = {}, r = Object.keys(n), l = 0, o = r.length; l < o; l += 1)
|
|
1039
|
-
t = r[l], u = String(n[t]), t.slice(0, 2) === "!!" && (t = "tag:yaml.org,2002:" + t.slice(2)), a = e.compiledTypeMap.fallback[t], a && Si.call(a.styleAliases, u) && (u = a.styleAliases[u]), i[t] = u;
|
|
1040
|
-
return i;
|
|
1041
|
-
}
|
|
1042
|
-
function rt(e) {
|
|
1043
|
-
var n, i, r;
|
|
1044
|
-
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
1045
|
-
i = "x", r = 2;
|
|
1046
|
-
else if (e <= 65535)
|
|
1047
|
-
i = "u", r = 4;
|
|
1048
|
-
else if (e <= 4294967295)
|
|
1049
|
-
i = "U", r = 8;
|
|
1050
|
-
else
|
|
1051
|
-
throw new $("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1052
|
-
return "\\" + i + O.repeat("0", r - n.length) + n;
|
|
1053
|
-
}
|
|
1054
|
-
var tt = 1, be = 2;
|
|
1055
|
-
function ot(e) {
|
|
1056
|
-
this.schema = e.schema || on, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = O.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = lt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? be : tt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1057
|
-
}
|
|
1058
|
-
function Nn(e, n) {
|
|
1059
|
-
for (var i = O.repeat(" ", n), r = 0, l = -1, o = "", t, u = e.length; r < u; )
|
|
1060
|
-
l = e.indexOf(`
|
|
1061
|
-
`, r), l === -1 ? (t = e.slice(r), r = u) : (t = e.slice(r, l + 1), r = l + 1), t.length && t !== `
|
|
1062
|
-
` && (o += i), o += t;
|
|
1063
|
-
return o;
|
|
1064
|
-
}
|
|
1065
|
-
function Xe(e, n) {
|
|
1066
|
-
return `
|
|
1067
|
-
` + O.repeat(" ", e.indent * n);
|
|
1068
|
-
}
|
|
1069
|
-
function ut(e, n) {
|
|
1070
|
-
var i, r, l;
|
|
1071
|
-
for (i = 0, r = e.implicitTypes.length; i < r; i += 1)
|
|
1072
|
-
if (l = e.implicitTypes[i], l.resolve(n))
|
|
1073
|
-
return !0;
|
|
1074
|
-
return !1;
|
|
1075
|
-
}
|
|
1076
|
-
function De(e) {
|
|
1077
|
-
return e === Yr || e === Ur;
|
|
1078
|
-
}
|
|
1079
|
-
function _e(e) {
|
|
1080
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== sn || 65536 <= e && e <= 1114111;
|
|
1081
|
-
}
|
|
1082
|
-
function Mn(e) {
|
|
1083
|
-
return _e(e) && e !== sn && e !== Br && e !== ge;
|
|
1084
|
-
}
|
|
1085
|
-
function Dn(e, n, i) {
|
|
1086
|
-
var r = Mn(e), l = r && !De(e);
|
|
1087
|
-
return (
|
|
1088
|
-
// ns-plain-safe
|
|
1089
|
-
(i ? (
|
|
1090
|
-
// c = flow-in
|
|
1091
|
-
r
|
|
1092
|
-
) : r && e !== Ei && e !== Fi && e !== Ti && e !== Ii && e !== Oi) && e !== Ze && !(n === Me && !l) || Mn(n) && !De(n) && e === Ze || n === Me && l
|
|
1093
|
-
);
|
|
1094
|
-
}
|
|
1095
|
-
function at(e) {
|
|
1096
|
-
return _e(e) && e !== sn && !De(e) && e !== Gr && e !== Jr && e !== Me && e !== Ei && e !== Fi && e !== Ti && e !== Ii && e !== Oi && e !== Ze && e !== qr && e !== zr && e !== Pr && e !== et && e !== Qr && e !== Wr && e !== Kr && e !== Hr && e !== Vr && e !== Zr && e !== Xr;
|
|
1097
|
-
}
|
|
1098
|
-
function st(e) {
|
|
1099
|
-
return !De(e) && e !== Me;
|
|
1100
|
-
}
|
|
1101
|
-
function he(e, n) {
|
|
1102
|
-
var i = e.charCodeAt(n), r;
|
|
1103
|
-
return i >= 55296 && i <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (i - 55296) * 1024 + r - 56320 + 65536 : i;
|
|
1104
|
-
}
|
|
1105
|
-
function Li(e) {
|
|
1106
|
-
var n = /^\n* /;
|
|
1107
|
-
return n.test(e);
|
|
1108
|
-
}
|
|
1109
|
-
var Ni = 1, en = 2, Mi = 3, Di = 4, se = 5;
|
|
1110
|
-
function ct(e, n, i, r, l, o, t, u) {
|
|
1111
|
-
var a, s = 0, m = null, d = !1, y = !1, b = r !== -1, p = -1, h = at(he(e, 0)) && st(he(e, e.length - 1));
|
|
1112
|
-
if (n || t)
|
|
1113
|
-
for (a = 0; a < e.length; s >= 65536 ? a += 2 : a++) {
|
|
1114
|
-
if (s = he(e, a), !_e(s))
|
|
1115
|
-
return se;
|
|
1116
|
-
h = h && Dn(s, m, u), m = s;
|
|
1117
|
-
}
|
|
1118
|
-
else {
|
|
1119
|
-
for (a = 0; a < e.length; s >= 65536 ? a += 2 : a++) {
|
|
1120
|
-
if (s = he(e, a), s === ge)
|
|
1121
|
-
d = !0, b && (y = y || // Foldable line = too long, and not more-indented.
|
|
1122
|
-
a - p - 1 > r && e[p + 1] !== " ", p = a);
|
|
1123
|
-
else if (!_e(s))
|
|
1124
|
-
return se;
|
|
1125
|
-
h = h && Dn(s, m, u), m = s;
|
|
1126
|
-
}
|
|
1127
|
-
y = y || b && a - p - 1 > r && e[p + 1] !== " ";
|
|
1128
|
-
}
|
|
1129
|
-
return !d && !y ? h && !t && !l(e) ? Ni : o === be ? se : en : i > 9 && Li(e) ? se : t ? o === be ? se : en : y ? Di : Mi;
|
|
1130
|
-
}
|
|
1131
|
-
function ft(e, n, i, r, l) {
|
|
1132
|
-
e.dump = (function() {
|
|
1133
|
-
if (n.length === 0)
|
|
1134
|
-
return e.quotingType === be ? '""' : "''";
|
|
1135
|
-
if (!e.noCompatMode && (nt.indexOf(n) !== -1 || it.test(n)))
|
|
1136
|
-
return e.quotingType === be ? '"' + n + '"' : "'" + n + "'";
|
|
1137
|
-
var o = e.indent * Math.max(1, i), t = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), u = r || e.flowLevel > -1 && i >= e.flowLevel;
|
|
1138
|
-
function a(s) {
|
|
1139
|
-
return ut(e, s);
|
|
1140
|
-
}
|
|
1141
|
-
switch (ct(
|
|
1142
|
-
n,
|
|
1143
|
-
u,
|
|
1144
|
-
e.indent,
|
|
1145
|
-
t,
|
|
1146
|
-
a,
|
|
1147
|
-
e.quotingType,
|
|
1148
|
-
e.forceQuotes && !r,
|
|
1149
|
-
l
|
|
1150
|
-
)) {
|
|
1151
|
-
case Ni:
|
|
1152
|
-
return n;
|
|
1153
|
-
case en:
|
|
1154
|
-
return "'" + n.replace(/'/g, "''") + "'";
|
|
1155
|
-
case Mi:
|
|
1156
|
-
return "|" + Rn(n, e.indent) + $n(Nn(n, o));
|
|
1157
|
-
case Di:
|
|
1158
|
-
return ">" + Rn(n, e.indent) + $n(Nn(dt(n, t), o));
|
|
1159
|
-
case se:
|
|
1160
|
-
return '"' + pt(n) + '"';
|
|
1161
|
-
default:
|
|
1162
|
-
throw new $("impossible error: invalid scalar style");
|
|
1163
|
-
}
|
|
1164
|
-
})();
|
|
1165
|
-
}
|
|
1166
|
-
function Rn(e, n) {
|
|
1167
|
-
var i = Li(e) ? String(n) : "", r = e[e.length - 1] === `
|
|
1168
|
-
`, l = r && (e[e.length - 2] === `
|
|
1169
|
-
` || e === `
|
|
1170
|
-
`), o = l ? "+" : r ? "" : "-";
|
|
1171
|
-
return i + o + `
|
|
1172
|
-
`;
|
|
1173
|
-
}
|
|
1174
|
-
function $n(e) {
|
|
1175
|
-
return e[e.length - 1] === `
|
|
1176
|
-
` ? e.slice(0, -1) : e;
|
|
1177
|
-
}
|
|
1178
|
-
function dt(e, n) {
|
|
1179
|
-
for (var i = /(\n+)([^\n]*)/g, r = (function() {
|
|
1180
|
-
var s = e.indexOf(`
|
|
1181
|
-
`);
|
|
1182
|
-
return s = s !== -1 ? s : e.length, i.lastIndex = s, jn(e.slice(0, s), n);
|
|
1183
|
-
})(), l = e[0] === `
|
|
1184
|
-
` || e[0] === " ", o, t; t = i.exec(e); ) {
|
|
1185
|
-
var u = t[1], a = t[2];
|
|
1186
|
-
o = a[0] === " ", r += u + (!l && !o && a !== "" ? `
|
|
1187
|
-
` : "") + jn(a, n), l = o;
|
|
1188
|
-
}
|
|
1189
|
-
return r;
|
|
1190
|
-
}
|
|
1191
|
-
function jn(e, n) {
|
|
1192
|
-
if (e === "" || e[0] === " ") return e;
|
|
1193
|
-
for (var i = / [^ ]/g, r, l = 0, o, t = 0, u = 0, a = ""; r = i.exec(e); )
|
|
1194
|
-
u = r.index, u - l > n && (o = t > l ? t : u, a += `
|
|
1195
|
-
` + e.slice(l, o), l = o + 1), t = u;
|
|
1196
|
-
return a += `
|
|
1197
|
-
`, e.length - l > n && t > l ? a += e.slice(l, t) + `
|
|
1198
|
-
` + e.slice(t + 1) : a += e.slice(l), a.slice(1);
|
|
1199
|
-
}
|
|
1200
|
-
function pt(e) {
|
|
1201
|
-
for (var n = "", i = 0, r, l = 0; l < e.length; i >= 65536 ? l += 2 : l++)
|
|
1202
|
-
i = he(e, l), r = R[i], !r && _e(i) ? (n += e[l], i >= 65536 && (n += e[l + 1])) : n += r || rt(i);
|
|
1203
|
-
return n;
|
|
1204
|
-
}
|
|
1205
|
-
function mt(e, n, i) {
|
|
1206
|
-
var r = "", l = e.tag, o, t, u;
|
|
1207
|
-
for (o = 0, t = i.length; o < t; o += 1)
|
|
1208
|
-
u = i[o], e.replacer && (u = e.replacer.call(i, String(o), u)), (W(e, n, u, !1, !1) || typeof u > "u" && W(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
1209
|
-
e.tag = l, e.dump = "[" + r + "]";
|
|
1210
|
-
}
|
|
1211
|
-
function Un(e, n, i, r) {
|
|
1212
|
-
var l = "", o = e.tag, t, u, a;
|
|
1213
|
-
for (t = 0, u = i.length; t < u; t += 1)
|
|
1214
|
-
a = i[t], e.replacer && (a = e.replacer.call(i, String(t), a)), (W(e, n + 1, a, !0, !0, !1, !0) || typeof a > "u" && W(e, n + 1, null, !0, !0, !1, !0)) && ((!r || l !== "") && (l += Xe(e, n)), e.dump && ge === e.dump.charCodeAt(0) ? l += "-" : l += "- ", l += e.dump);
|
|
1215
|
-
e.tag = o, e.dump = l || "[]";
|
|
1216
|
-
}
|
|
1217
|
-
function ht(e, n, i) {
|
|
1218
|
-
var r = "", l = e.tag, o = Object.keys(i), t, u, a, s, m;
|
|
1219
|
-
for (t = 0, u = o.length; t < u; t += 1)
|
|
1220
|
-
m = "", r !== "" && (m += ", "), e.condenseFlow && (m += '"'), a = o[t], s = i[a], e.replacer && (s = e.replacer.call(i, a, s)), W(e, n, a, !1, !1) && (e.dump.length > 1024 && (m += "? "), m += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), W(e, n, s, !1, !1) && (m += e.dump, r += m));
|
|
1221
|
-
e.tag = l, e.dump = "{" + r + "}";
|
|
1222
|
-
}
|
|
1223
|
-
function vt(e, n, i, r) {
|
|
1224
|
-
var l = "", o = e.tag, t = Object.keys(i), u, a, s, m, d, y;
|
|
1225
|
-
if (e.sortKeys === !0)
|
|
1226
|
-
t.sort();
|
|
1227
|
-
else if (typeof e.sortKeys == "function")
|
|
1228
|
-
t.sort(e.sortKeys);
|
|
1229
|
-
else if (e.sortKeys)
|
|
1230
|
-
throw new $("sortKeys must be a boolean or a function");
|
|
1231
|
-
for (u = 0, a = t.length; u < a; u += 1)
|
|
1232
|
-
y = "", (!r || l !== "") && (y += Xe(e, n)), s = t[u], m = i[s], e.replacer && (m = e.replacer.call(i, s, m)), W(e, n + 1, s, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && ge === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, d && (y += Xe(e, n)), W(e, n + 1, m, !0, d) && (e.dump && ge === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, l += y));
|
|
1233
|
-
e.tag = o, e.dump = l || "{}";
|
|
1234
|
-
}
|
|
1235
|
-
function Bn(e, n, i) {
|
|
1236
|
-
var r, l, o, t, u, a;
|
|
1237
|
-
for (l = i ? e.explicitTypes : e.implicitTypes, o = 0, t = l.length; o < t; o += 1)
|
|
1238
|
-
if (u = l[o], (u.instanceOf || u.predicate) && (!u.instanceOf || typeof n == "object" && n instanceof u.instanceOf) && (!u.predicate || u.predicate(n))) {
|
|
1239
|
-
if (i ? u.multi && u.representName ? e.tag = u.representName(n) : e.tag = u.tag : e.tag = "?", u.represent) {
|
|
1240
|
-
if (a = e.styleMap[u.tag] || u.defaultStyle, Ci.call(u.represent) === "[object Function]")
|
|
1241
|
-
r = u.represent(n, a);
|
|
1242
|
-
else if (Si.call(u.represent, a))
|
|
1243
|
-
r = u.represent[a](n, a);
|
|
1244
|
-
else
|
|
1245
|
-
throw new $("!<" + u.tag + '> tag resolver accepts not "' + a + '" style');
|
|
1246
|
-
e.dump = r;
|
|
1247
|
-
}
|
|
1248
|
-
return !0;
|
|
1249
|
-
}
|
|
1250
|
-
return !1;
|
|
1251
|
-
}
|
|
1252
|
-
function W(e, n, i, r, l, o, t) {
|
|
1253
|
-
e.tag = null, e.dump = i, Bn(e, i, !1) || Bn(e, i, !0);
|
|
1254
|
-
var u = Ci.call(e.dump), a = r, s;
|
|
1255
|
-
r && (r = e.flowLevel < 0 || e.flowLevel > n);
|
|
1256
|
-
var m = u === "[object Object]" || u === "[object Array]", d, y;
|
|
1257
|
-
if (m && (d = e.duplicates.indexOf(i), y = d !== -1), (e.tag !== null && e.tag !== "?" || y || e.indent !== 2 && n > 0) && (l = !1), y && e.usedDuplicates[d])
|
|
1258
|
-
e.dump = "*ref_" + d;
|
|
1259
|
-
else {
|
|
1260
|
-
if (m && y && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), u === "[object Object]")
|
|
1261
|
-
r && Object.keys(e.dump).length !== 0 ? (vt(e, n, e.dump, l), y && (e.dump = "&ref_" + d + e.dump)) : (ht(e, n, e.dump), y && (e.dump = "&ref_" + d + " " + e.dump));
|
|
1262
|
-
else if (u === "[object Array]")
|
|
1263
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !t && n > 0 ? Un(e, n - 1, e.dump, l) : Un(e, n, e.dump, l), y && (e.dump = "&ref_" + d + e.dump)) : (mt(e, n, e.dump), y && (e.dump = "&ref_" + d + " " + e.dump));
|
|
1264
|
-
else if (u === "[object String]")
|
|
1265
|
-
e.tag !== "?" && ft(e, e.dump, n, o, a);
|
|
1266
|
-
else {
|
|
1267
|
-
if (u === "[object Undefined]")
|
|
1268
|
-
return !1;
|
|
1269
|
-
if (e.skipInvalid) return !1;
|
|
1270
|
-
throw new $("unacceptable kind of an object to dump " + u);
|
|
1271
|
-
}
|
|
1272
|
-
e.tag !== null && e.tag !== "?" && (s = encodeURI(
|
|
1273
|
-
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
1274
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ? s = "!" + s : s.slice(0, 18) === "tag:yaml.org,2002:" ? s = "!!" + s.slice(18) : s = "!<" + s + ">", e.dump = s + " " + e.dump);
|
|
1275
|
-
}
|
|
1276
|
-
return !0;
|
|
1277
|
-
}
|
|
1278
|
-
function xt(e, n) {
|
|
1279
|
-
var i = [], r = [], l, o;
|
|
1280
|
-
for (nn(e, i, r), l = 0, o = r.length; l < o; l += 1)
|
|
1281
|
-
n.duplicates.push(i[r[l]]);
|
|
1282
|
-
n.usedDuplicates = new Array(o);
|
|
1283
|
-
}
|
|
1284
|
-
function nn(e, n, i) {
|
|
1285
|
-
var r, l, o;
|
|
1286
|
-
if (e !== null && typeof e == "object")
|
|
1287
|
-
if (l = n.indexOf(e), l !== -1)
|
|
1288
|
-
i.indexOf(l) === -1 && i.push(l);
|
|
1289
|
-
else if (n.push(e), Array.isArray(e))
|
|
1290
|
-
for (l = 0, o = e.length; l < o; l += 1)
|
|
1291
|
-
nn(e[l], n, i);
|
|
1292
|
-
else
|
|
1293
|
-
for (r = Object.keys(e), l = 0, o = r.length; l < o; l += 1)
|
|
1294
|
-
nn(e[r[l]], n, i);
|
|
1295
|
-
}
|
|
1296
|
-
function yt(e, n) {
|
|
1297
|
-
n = n || {};
|
|
1298
|
-
var i = new ot(n);
|
|
1299
|
-
i.noRefs || xt(e, i);
|
|
1300
|
-
var r = e;
|
|
1301
|
-
return i.replacer && (r = i.replacer.call({ "": r }, "", r)), W(i, 0, r, !0, !0) ? i.dump + `
|
|
1302
|
-
` : "";
|
|
1303
|
-
}
|
|
1304
|
-
var gt = yt, bt = {
|
|
1305
|
-
dump: gt
|
|
1306
|
-
};
|
|
1307
|
-
function cn(e, n) {
|
|
1308
|
-
return function() {
|
|
1309
|
-
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
var _t = N, wt = Wn, At = ei, kt = ti, Ct = oi, St = on, Ri = ki.load, Et = ki.loadAll, $i = bt.dump, Ft = $, Tt = {
|
|
1313
|
-
binary: fi,
|
|
1314
|
-
float: ri,
|
|
1315
|
-
map: Xn,
|
|
1316
|
-
null: ni,
|
|
1317
|
-
pairs: pi,
|
|
1318
|
-
set: mi,
|
|
1319
|
-
timestamp: si,
|
|
1320
|
-
bool: ii,
|
|
1321
|
-
int: li,
|
|
1322
|
-
merge: ci,
|
|
1323
|
-
omap: di,
|
|
1324
|
-
seq: Zn,
|
|
1325
|
-
str: Jn
|
|
1326
|
-
}, It = cn("safeLoad", "load"), Ot = cn("safeLoadAll", "loadAll"), Lt = cn("safeDump", "dump"), Yn = {
|
|
1327
|
-
Type: _t,
|
|
1328
|
-
Schema: wt,
|
|
1329
|
-
FAILSAFE_SCHEMA: At,
|
|
1330
|
-
JSON_SCHEMA: kt,
|
|
1331
|
-
CORE_SCHEMA: Ct,
|
|
1332
|
-
DEFAULT_SCHEMA: St,
|
|
1333
|
-
load: Ri,
|
|
1334
|
-
loadAll: Et,
|
|
1335
|
-
dump: $i,
|
|
1336
|
-
YAMLException: Ft,
|
|
1337
|
-
types: Tt,
|
|
1338
|
-
safeLoad: It,
|
|
1339
|
-
safeLoadAll: Ot,
|
|
1340
|
-
safeDump: Lt
|
|
1341
|
-
};
|
|
1342
|
-
const Nt = {}, Mt = {
|
|
1343
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1344
|
-
width: "24",
|
|
1345
|
-
height: "24",
|
|
1346
|
-
viewBox: "0 0 24 24",
|
|
1347
|
-
fill: "none",
|
|
1348
|
-
stroke: "currentColor",
|
|
1349
|
-
"stroke-width": "2",
|
|
1350
|
-
"stroke-linecap": "round",
|
|
1351
|
-
"stroke-linejoin": "round",
|
|
1352
|
-
class: "lucide lucide-layers"
|
|
1353
|
-
};
|
|
1354
|
-
function Dt(e, n) {
|
|
1355
|
-
return C(), D("svg", Mt, [...n[0] || (n[0] = [
|
|
1356
|
-
v("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }, null, -1),
|
|
1357
|
-
v("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }, null, -1),
|
|
1358
|
-
v("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" }, null, -1)
|
|
1359
|
-
])]);
|
|
1360
|
-
}
|
|
1361
|
-
const Rt = /* @__PURE__ */ Re(Nt, [["render", Dt]]), $t = {}, jt = {
|
|
1362
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1363
|
-
width: "24",
|
|
1364
|
-
height: "24",
|
|
1365
|
-
viewBox: "0 0 24 24",
|
|
1366
|
-
fill: "none",
|
|
1367
|
-
stroke: "currentColor",
|
|
1368
|
-
"stroke-width": "2",
|
|
1369
|
-
"stroke-linecap": "round",
|
|
1370
|
-
"stroke-linejoin": "round",
|
|
1371
|
-
class: "lucide lucide-map"
|
|
1372
|
-
};
|
|
1373
|
-
function Ut(e, n) {
|
|
1374
|
-
return C(), D("svg", jt, [...n[0] || (n[0] = [
|
|
1375
|
-
v("path", { d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" }, null, -1),
|
|
1376
|
-
v("path", { d: "M15 5.764v15" }, null, -1),
|
|
1377
|
-
v("path", { d: "M9 3.236v15" }, null, -1)
|
|
1378
|
-
])]);
|
|
1379
|
-
}
|
|
1380
|
-
const Bt = /* @__PURE__ */ Re($t, [["render", Ut]]), Yt = {}, Pt = {
|
|
1381
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1382
|
-
width: "24",
|
|
1383
|
-
height: "24",
|
|
1384
|
-
viewBox: "0 0 24 24",
|
|
1385
|
-
fill: "none",
|
|
1386
|
-
stroke: "currentColor",
|
|
1387
|
-
"stroke-width": "2",
|
|
1388
|
-
"stroke-linecap": "round",
|
|
1389
|
-
"stroke-linejoin": "round",
|
|
1390
|
-
class: "lucide lucide-filter"
|
|
1391
|
-
};
|
|
1392
|
-
function Ht(e, n) {
|
|
1393
|
-
return C(), D("svg", Pt, [...n[0] || (n[0] = [
|
|
1394
|
-
v("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
|
|
1395
|
-
])]);
|
|
1396
|
-
}
|
|
1397
|
-
const Vt = /* @__PURE__ */ Re(Yt, [["render", Ht]]), qt = { class: "flex flex-col flex-1 overflow-hidden" }, Kt = { class: "flex justify-end gap-2" }, zt = ["href"], Gt = { class: "flex flex-col flex-1 overflow-hidden" }, Qt = { class: "bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden mt-3 flex flex-col flex-1" }, Wt = { class: "relative bg-gradient-to-br from-slate-50 to-white flex-1" }, Jt = /* @__PURE__ */ ee({
|
|
1398
|
-
__name: "vs-tab-style",
|
|
1399
|
-
props: {
|
|
1400
|
-
token: {},
|
|
1401
|
-
styleYaml: {},
|
|
1402
|
-
styleText: {}
|
|
1403
|
-
},
|
|
1404
|
-
emits: ["update:style-yaml", "update:style-text", "update"],
|
|
1405
|
-
setup(e, { emit: n }) {
|
|
1406
|
-
const i = e, r = n, l = S("");
|
|
1407
|
-
I(
|
|
1408
|
-
() => i.styleText,
|
|
1409
|
-
(a) => {
|
|
1410
|
-
const s = a ?? "";
|
|
1411
|
-
l.value !== s && (l.value = s);
|
|
1412
|
-
},
|
|
1413
|
-
{ immediate: !0 }
|
|
1414
|
-
), I(l, async (a) => {
|
|
1415
|
-
var m, d;
|
|
1416
|
-
const s = a ?? "";
|
|
1417
|
-
i.styleText !== s && r("update:style-text", s);
|
|
1418
|
-
try {
|
|
1419
|
-
const y = a ? Ri(a) : null;
|
|
1420
|
-
if ((m = y == null ? void 0 : y.colorAttr) != null && m.length && ((d = i.styleYaml) == null ? void 0 : d.colorAttr) !== y.colorAttr) {
|
|
1421
|
-
const b = await o(y.colorAttr);
|
|
1422
|
-
y.colors = b.reduce(
|
|
1423
|
-
(h, x, w) => ({
|
|
1424
|
-
...h,
|
|
1425
|
-
[x.id.toString()]: t[w]
|
|
1426
|
-
}),
|
|
1427
|
-
{}
|
|
1428
|
-
);
|
|
1429
|
-
const p = $i(y);
|
|
1430
|
-
p !== l.value && (l.value = p);
|
|
1431
|
-
}
|
|
1432
|
-
JSON.stringify(y) !== JSON.stringify(i.styleYaml) && r(
|
|
1433
|
-
"update:style-yaml",
|
|
1434
|
-
y && typeof y == "object" ? y : null
|
|
1435
|
-
);
|
|
1436
|
-
} catch {
|
|
1437
|
-
i.styleYaml !== null && r("update:style-yaml", null);
|
|
1438
|
-
}
|
|
1439
|
-
});
|
|
1440
|
-
async function o(a) {
|
|
1441
|
-
return (await fetch(`/api/gis-service/${i.token}/${a}`).then(
|
|
1442
|
-
(m) => m.json()
|
|
1443
|
-
)).rows;
|
|
1444
|
-
}
|
|
1445
|
-
const t = [
|
|
1446
|
-
"#8dd3c7",
|
|
1447
|
-
"#ffffb3",
|
|
1448
|
-
"#bebada",
|
|
1449
|
-
"#fb8072",
|
|
1450
|
-
"#80b1d3",
|
|
1451
|
-
"#fdb462",
|
|
1452
|
-
"#b3de69",
|
|
1453
|
-
"#fccde5",
|
|
1454
|
-
"#d9d9d9",
|
|
1455
|
-
"#bc80bd"
|
|
1456
|
-
], u = async () => {
|
|
1457
|
-
const a = i.styleYaml ? JSON.stringify(i.styleYaml) : i.styleText ? i.styleText : "null";
|
|
1458
|
-
try {
|
|
1459
|
-
await fetch(`/api/gis-service/${i.token}`, {
|
|
1460
|
-
method: "PUT",
|
|
1461
|
-
headers: { "Content-Type": "application/json" },
|
|
1462
|
-
body: JSON.stringify({ style: a })
|
|
1463
|
-
}), r("update"), Q({ type: "success", title: "Успіх", message: "Стилі збережено" });
|
|
1464
|
-
} catch (s) {
|
|
1465
|
-
Q({
|
|
1466
|
-
type: "error",
|
|
1467
|
-
title: "Помилка",
|
|
1468
|
-
message: "Не вдалося зберегти стилі"
|
|
1469
|
-
}), console.log(s);
|
|
1470
|
-
}
|
|
1471
|
-
};
|
|
1472
|
-
return (a, s) => (C(), D("div", qt, [
|
|
1473
|
-
v("div", Kt, [
|
|
1474
|
-
v("a", {
|
|
1475
|
-
target: "_blank",
|
|
1476
|
-
href: "/api/gis-service/" + i.token + "/col",
|
|
1477
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1478
|
-
}, " Атрибути ", 8, zt),
|
|
1479
|
-
v("button", {
|
|
1480
|
-
onClick: u,
|
|
1481
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1482
|
-
}, [...s[1] || (s[1] = [
|
|
1483
|
-
v("svg", {
|
|
1484
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1485
|
-
width: "24",
|
|
1486
|
-
height: "24",
|
|
1487
|
-
viewBox: "0 0 24 24",
|
|
1488
|
-
fill: "none",
|
|
1489
|
-
stroke: "currentColor",
|
|
1490
|
-
"stroke-width": "2",
|
|
1491
|
-
"stroke-linecap": "round",
|
|
1492
|
-
"stroke-linejoin": "round",
|
|
1493
|
-
class: "lucide lucide-save h-3 w-3 mr-1"
|
|
1494
|
-
}, [
|
|
1495
|
-
v("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
|
|
1496
|
-
v("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
|
|
1497
|
-
v("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
|
|
1498
|
-
], -1),
|
|
1499
|
-
Gi(" Зберегти стилі ", -1)
|
|
1500
|
-
])])
|
|
1501
|
-
]),
|
|
1502
|
-
v("div", Gt, [
|
|
1503
|
-
v("div", Qt, [
|
|
1504
|
-
s[2] || (s[2] = v("div", { class: "bg-gradient-to-r from-gray-50 to-gray-100 px-4 py-2 border-b border-gray-200 flex items-center justify-between" }, [
|
|
1505
|
-
v("div", { class: "text-xs text-gray-400" }, "YAML")
|
|
1506
|
-
], -1)),
|
|
1507
|
-
v("div", Wt, [
|
|
1508
|
-
j(zn, {
|
|
1509
|
-
modelValue: l.value,
|
|
1510
|
-
"onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
|
|
1511
|
-
language: "yaml",
|
|
1512
|
-
theme: "vs-light"
|
|
1513
|
-
}, null, 8, ["modelValue"])
|
|
1514
|
-
])
|
|
1515
|
-
])
|
|
1516
|
-
])
|
|
1517
|
-
]));
|
|
1518
|
-
}
|
|
1519
|
-
}), Zt = { class: "flex flex-col flex-1 min-h-0" }, Xt = { class: "flex flex-col flex-1 min-h-0" }, eo = /* @__PURE__ */ ee({
|
|
1520
|
-
__name: "vs-tab-popup",
|
|
1521
|
-
props: {
|
|
1522
|
-
token: {},
|
|
1523
|
-
fields: {},
|
|
1524
|
-
columns: {}
|
|
1525
|
-
},
|
|
1526
|
-
emits: ["update:columns", "save"],
|
|
1527
|
-
setup(e, { emit: n }) {
|
|
1528
|
-
const i = e, r = n, l = S(i.columns || []);
|
|
1529
|
-
I(
|
|
1530
|
-
() => i.columns,
|
|
1531
|
-
(p) => l.value = p || [],
|
|
1532
|
-
{ immediate: !0 }
|
|
1533
|
-
), I(l, (p) => {
|
|
1534
|
-
const h = Ie(i.token);
|
|
1535
|
-
h && (h.popup = p), r("update:columns", p);
|
|
1536
|
-
});
|
|
1537
|
-
const o = S("list"), t = S(!1), u = S([]), a = [
|
|
1538
|
-
{ key: "name", label: "Назва", type: "main" }
|
|
1539
|
-
// { key: "ua", label: "UA" },
|
|
1540
|
-
// { key: "format", label: "Format" },
|
|
1541
|
-
// { key: "meta", label: "Meta" },
|
|
1542
|
-
], s = {
|
|
1543
|
-
name: { type: "text", label: "Назва", disabled: !0, validators: ["required"] },
|
|
1544
|
-
label: { type: "text", label: "Найменування", validators: ["required"] },
|
|
1545
|
-
// format: { type: "text", label: "Format", disabled: true, hidden: true },
|
|
1546
|
-
meta: {
|
|
1547
|
-
type: "radio",
|
|
1548
|
-
label: "Meta",
|
|
1549
|
-
mode: "combo",
|
|
1550
|
-
options: [
|
|
1551
|
-
{ text: "Заголовок", id: "title" },
|
|
1552
|
-
{ text: "Властивість", id: "feature" },
|
|
1553
|
-
{ text: "Бейдж", id: "badge" }
|
|
1554
|
-
]
|
|
1555
|
-
},
|
|
1556
|
-
data: {
|
|
1557
|
-
type: "autocomplete",
|
|
1558
|
-
label: "Класифікатор",
|
|
1559
|
-
data: "admin.cls.name"
|
|
1560
|
-
// conditions: ["meta", "in", ["badge", "select", "tags"]],
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
function m() {
|
|
1564
|
-
u.value = l.value.map((p) => p.name || p.id), t.value = !0;
|
|
1565
|
-
}
|
|
1566
|
-
function d() {
|
|
1567
|
-
var w;
|
|
1568
|
-
const p = [...l.value], h = ((w = i.fields) == null ? void 0 : w.filter((g) => u.value.includes(g.name))) || [], x = rn(p, h, {
|
|
1569
|
-
selectedKeys: u.value,
|
|
1570
|
-
resolveKey: (g) => xe(g)
|
|
1571
|
-
});
|
|
1572
|
-
l.value = x, t.value = !1, u.value = [];
|
|
1573
|
-
}
|
|
1574
|
-
function y() {
|
|
1575
|
-
t.value = !1, u.value = [];
|
|
1576
|
-
}
|
|
1577
|
-
function b() {
|
|
1578
|
-
let p = [];
|
|
1579
|
-
o.value === "all" ? p = i.fields || [] : o.value === "none" ? p = [] : p = l.value, p.filter((h) => !h.label).forEach((h) => h.label = h.ua), r("save", p);
|
|
1580
|
-
}
|
|
1581
|
-
return (p, h) => (C(), D("div", Zt, [
|
|
1582
|
-
v("div", { class: "flex justify-between mb-3 gap-2" }, [
|
|
1583
|
-
v("button", {
|
|
1584
|
-
onClick: m,
|
|
1585
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1586
|
-
}, " Імпорт "),
|
|
1587
|
-
v("button", {
|
|
1588
|
-
onClick: b,
|
|
1589
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1590
|
-
}, " Зберегти попап ")
|
|
1591
|
-
]),
|
|
1592
|
-
v("div", Xt, [
|
|
1593
|
-
o.value === "list" ? (C(), M($e, {
|
|
1594
|
-
key: 0,
|
|
1595
|
-
modelValue: l.value,
|
|
1596
|
-
"onUpdate:modelValue": h[0] || (h[0] = (x) => l.value = x),
|
|
1597
|
-
"columns-scheme": a,
|
|
1598
|
-
"form-scheme": s,
|
|
1599
|
-
"main-col-width": "250px",
|
|
1600
|
-
"add-button": !1
|
|
1601
|
-
}, null, 8, ["modelValue"])) : q("", !0)
|
|
1602
|
-
]),
|
|
1603
|
-
j(ln, {
|
|
1604
|
-
visible: t.value,
|
|
1605
|
-
"onUpdate:visible": h[1] || (h[1] = (x) => t.value = x),
|
|
1606
|
-
selection: u.value,
|
|
1607
|
-
"onUpdate:selection": h[2] || (h[2] = (x) => u.value = x),
|
|
1608
|
-
fields: e.fields,
|
|
1609
|
-
title: "Імпорт полів",
|
|
1610
|
-
"id-prefix": "import-popup",
|
|
1611
|
-
onConfirm: d,
|
|
1612
|
-
onCancel: y
|
|
1613
|
-
}, null, 8, ["visible", "selection", "fields"])
|
|
1614
|
-
]));
|
|
1615
|
-
}
|
|
1616
|
-
}), no = { class: "flex flex-col flex-1 min-h-0" }, io = { class: "flex justify-between mb-3 gap-2" }, lo = { class: "p-4 space-y-4 text-sm" }, ro = { class: "space-y-1" }, to = { class: "space-y-1" }, oo = { class: "flex items-center gap-3" }, uo = { class: "flex justify-end gap-2 p-4 border-t" }, ao = /* @__PURE__ */ ee({
|
|
1617
|
-
__name: "vs-tab-legend",
|
|
1618
|
-
props: {
|
|
1619
|
-
mapInfo: {},
|
|
1620
|
-
token: {},
|
|
1621
|
-
columns: {}
|
|
1622
|
-
},
|
|
1623
|
-
emits: ["update:columns", "save"],
|
|
1624
|
-
setup(e, { emit: n }) {
|
|
1625
|
-
const i = e, r = n, l = S(i.columns || []);
|
|
1626
|
-
I(
|
|
1627
|
-
() => i.columns,
|
|
1628
|
-
(p) => {
|
|
1629
|
-
l.value = p || [];
|
|
1630
|
-
}
|
|
1631
|
-
), I(l, (p) => {
|
|
1632
|
-
r("update:columns", p);
|
|
1633
|
-
});
|
|
1634
|
-
const o = S(!1), t = S({
|
|
1635
|
-
name: "",
|
|
1636
|
-
color: "#2E86DE"
|
|
1637
|
-
}), u = Qi(
|
|
1638
|
-
() => import("@opengis/core").then((p) => p.VsModal)
|
|
1639
|
-
), a = [
|
|
1640
|
-
{ key: "name", label: "Назва" },
|
|
1641
|
-
{ key: "color", label: "Колір", type: "color" }
|
|
1642
|
-
], s = {
|
|
1643
|
-
name: { type: "text", label: "Назва", validators: ["required"] },
|
|
1644
|
-
color: { type: "color", label: "Колір", validators: ["required"] }
|
|
1645
|
-
};
|
|
1646
|
-
function m(p) {
|
|
1647
|
-
p && d(), o.value = p;
|
|
1648
|
-
}
|
|
1649
|
-
function d() {
|
|
1650
|
-
t.value = { name: "", color: "#2E86DE" };
|
|
1651
|
-
}
|
|
1652
|
-
function y() {
|
|
1653
|
-
var w, g;
|
|
1654
|
-
const p = (w = t.value.name) == null ? void 0 : w.trim();
|
|
1655
|
-
if (!p) {
|
|
1656
|
-
Q({
|
|
1657
|
-
type: "warning",
|
|
1658
|
-
title: "Перевірка",
|
|
1659
|
-
message: "Вкажіть назву елементу легенди"
|
|
1660
|
-
});
|
|
1661
|
-
return;
|
|
1662
|
-
}
|
|
1663
|
-
const h = ((g = t.value.color) == null ? void 0 : g.trim()) || "#2E86DE";
|
|
1664
|
-
if (l.value.some(
|
|
1665
|
-
(K) => xe(K) === xe({ name: p })
|
|
1666
|
-
)) {
|
|
1667
|
-
Q({
|
|
1668
|
-
type: "warning",
|
|
1669
|
-
title: "Дубль",
|
|
1670
|
-
message: "Такий елемент легенди вже існує"
|
|
1671
|
-
});
|
|
1672
|
-
return;
|
|
1673
|
-
}
|
|
1674
|
-
l.value = [...l.value, { name: p, color: h }], d(), o.value = !1;
|
|
1675
|
-
}
|
|
1676
|
-
function b() {
|
|
1677
|
-
r("save", l.value);
|
|
1678
|
-
}
|
|
1679
|
-
return (p, h) => (C(), D("div", no, [
|
|
1680
|
-
v("div", io, [
|
|
1681
|
-
v("button", {
|
|
1682
|
-
onClick: h[0] || (h[0] = (x) => o.value = !0),
|
|
1683
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1684
|
-
}, " Додати "),
|
|
1685
|
-
v("button", {
|
|
1686
|
-
onClick: b,
|
|
1687
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1688
|
-
}, " Зберегти легенду ")
|
|
1689
|
-
]),
|
|
1690
|
-
j($e, {
|
|
1691
|
-
modelValue: l.value,
|
|
1692
|
-
"onUpdate:modelValue": h[1] || (h[1] = (x) => l.value = x),
|
|
1693
|
-
"columns-scheme": a,
|
|
1694
|
-
"form-scheme": s,
|
|
1695
|
-
"main-col-width": "250px",
|
|
1696
|
-
"add-button": !1
|
|
1697
|
-
}, null, 8, ["modelValue"]),
|
|
1698
|
-
j(Te(u), {
|
|
1699
|
-
teleport: "#modal",
|
|
1700
|
-
visible: o.value,
|
|
1701
|
-
title: "Новий елемент легенди",
|
|
1702
|
-
"onUpdate:visible": m
|
|
1703
|
-
}, {
|
|
1704
|
-
footer: We(() => [
|
|
1705
|
-
v("div", uo, [
|
|
1706
|
-
v("button", {
|
|
1707
|
-
type: "button",
|
|
1708
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
|
|
1709
|
-
onClick: h[5] || (h[5] = (x) => m(!1))
|
|
1710
|
-
}, " Скасувати "),
|
|
1711
|
-
v("button", {
|
|
1712
|
-
type: "button",
|
|
1713
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
|
|
1714
|
-
onClick: y
|
|
1715
|
-
}, " Додати ")
|
|
1716
|
-
])
|
|
1717
|
-
]),
|
|
1718
|
-
default: We(() => [
|
|
1719
|
-
v("div", lo, [
|
|
1720
|
-
v("div", ro, [
|
|
1721
|
-
h[6] || (h[6] = v("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Назва ", -1)),
|
|
1722
|
-
qe(v("input", {
|
|
1723
|
-
"onUpdate:modelValue": h[2] || (h[2] = (x) => t.value.name = x),
|
|
1724
|
-
type: "text",
|
|
1725
|
-
class: "w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
|
|
1726
|
-
placeholder: "Наприклад, Житлова зона"
|
|
1727
|
-
}, null, 512), [
|
|
1728
|
-
[Ke, t.value.name]
|
|
1729
|
-
])
|
|
1730
|
-
]),
|
|
1731
|
-
v("div", to, [
|
|
1732
|
-
h[7] || (h[7] = v("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Колір ", -1)),
|
|
1733
|
-
v("div", oo, [
|
|
1734
|
-
qe(v("input", {
|
|
1735
|
-
"onUpdate:modelValue": h[3] || (h[3] = (x) => t.value.color = x),
|
|
1736
|
-
type: "color",
|
|
1737
|
-
class: "h-10 w-16 rounded border border-gray-300"
|
|
1738
|
-
}, null, 512), [
|
|
1739
|
-
[Ke, t.value.color]
|
|
1740
|
-
]),
|
|
1741
|
-
qe(v("input", {
|
|
1742
|
-
"onUpdate:modelValue": h[4] || (h[4] = (x) => t.value.color = x),
|
|
1743
|
-
type: "text",
|
|
1744
|
-
class: "flex-1 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
|
|
1745
|
-
placeholder: "#FFFFFF"
|
|
1746
|
-
}, null, 512), [
|
|
1747
|
-
[Ke, t.value.color]
|
|
1748
|
-
])
|
|
1749
|
-
])
|
|
1750
|
-
])
|
|
1751
|
-
])
|
|
1752
|
-
]),
|
|
1753
|
-
_: 1
|
|
1754
|
-
}, 8, ["visible"])
|
|
1755
|
-
]));
|
|
1756
|
-
}
|
|
1757
|
-
}), so = { class: "space-y-3 bg-gradient-to-br from-sky-50 to-blue-50 p-4 rounded-xl border border-sky-100 shadow-sm" }, co = ["onClick"], fo = ["aria-checked", "value"], po = { key: 0 }, mo = /* @__PURE__ */ ee({
|
|
1758
|
-
__name: "view-mode-toggle",
|
|
1759
|
-
props: {
|
|
1760
|
-
modelValue: {},
|
|
1761
|
-
options: {},
|
|
1762
|
-
showHtml: { type: Boolean }
|
|
1763
|
-
},
|
|
1764
|
-
emits: ["update:modelValue"],
|
|
1765
|
-
setup(e, { emit: n }) {
|
|
1766
|
-
const i = e, r = n, l = (t) => r("update:modelValue", t), o = i.options || [
|
|
1767
|
-
{ value: "all", label: "All" },
|
|
1768
|
-
{ value: "list", label: "List" },
|
|
1769
|
-
{ value: "none", label: "None" }
|
|
1770
|
-
];
|
|
1771
|
-
return (t, u) => (C(), D("div", so, [
|
|
1772
|
-
u[1] || (u[1] = v("label", { class: "text-sm font-medium text-gray-600" }, "Режим відображення", -1)),
|
|
1773
|
-
v("div", {
|
|
1774
|
-
role: "radiogroup",
|
|
1775
|
-
class: ve(["grid gap-2", `grid-cols-${Te(o).length}`])
|
|
1776
|
-
}, [
|
|
1777
|
-
(C(!0), D(Hn, null, Vn(Te(o), (a) => (C(), D("div", {
|
|
1778
|
-
key: a.value,
|
|
1779
|
-
onClick: (s) => l(a.value),
|
|
1780
|
-
class: ve(["flex items-center justify-center space-x-2 rounded-lg p-2 border transition-all duration-300 cursor-pointer", [
|
|
1781
|
-
e.modelValue === a.value ? "bg-gradient-to-r from-sky-200 to-blue-200 border-transparent shadow-sm" : "bg-white border-gray-100 hover:border-sky-200 hover:shadow-sm"
|
|
1782
|
-
]])
|
|
1783
|
-
}, [
|
|
1784
|
-
v("button", {
|
|
1785
|
-
type: "button",
|
|
1786
|
-
role: "radio",
|
|
1787
|
-
"aria-checked": e.modelValue === a.value,
|
|
1788
|
-
value: a.value,
|
|
1789
|
-
class: "aspect-square rounded-full border border-primary h-4 w-4 flex items-center justify-center text-sky-500"
|
|
1790
|
-
}, [
|
|
1791
|
-
e.modelValue === a.value ? (C(), D("span", po, [...u[0] || (u[0] = [
|
|
1792
|
-
v("svg", {
|
|
1793
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1794
|
-
viewBox: "0 0 24 24",
|
|
1795
|
-
fill: "none",
|
|
1796
|
-
stroke: "currentColor",
|
|
1797
|
-
"stroke-width": "2",
|
|
1798
|
-
"stroke-linecap": "round",
|
|
1799
|
-
"stroke-linejoin": "round",
|
|
1800
|
-
class: "lucide lucide-circle h-2.5 w-2.5 fill-current text-current"
|
|
1801
|
-
}, [
|
|
1802
|
-
v("circle", {
|
|
1803
|
-
cx: "12",
|
|
1804
|
-
cy: "12",
|
|
1805
|
-
r: "10"
|
|
1806
|
-
})
|
|
1807
|
-
], -1)
|
|
1808
|
-
])])) : q("", !0)
|
|
1809
|
-
], 8, fo),
|
|
1810
|
-
v("label", {
|
|
1811
|
-
class: ve(["text-xs font-medium cursor-pointer", e.modelValue === a.value ? "text-gray-700" : "text-gray-600"])
|
|
1812
|
-
}, le(a.label), 3)
|
|
1813
|
-
], 10, co))), 128))
|
|
1814
|
-
], 2)
|
|
1815
|
-
]));
|
|
1816
|
-
}
|
|
1817
|
-
}), ho = { class: "flex flex-col flex-1 min-h-0" }, vo = { class: "flex flex-col flex-1 min-h-0" }, xo = /* @__PURE__ */ ee({
|
|
1818
|
-
__name: "vs-tab-card",
|
|
1819
|
-
props: {
|
|
1820
|
-
fields: {},
|
|
1821
|
-
columns: {},
|
|
1822
|
-
viewMode: {},
|
|
1823
|
-
html: {}
|
|
1824
|
-
},
|
|
1825
|
-
emits: ["update:columns", "save"],
|
|
1826
|
-
setup(e, { emit: n }) {
|
|
1827
|
-
const i = e, r = n, l = S(i.columns || []);
|
|
1828
|
-
I(
|
|
1829
|
-
() => i.columns,
|
|
1830
|
-
(x) => l.value = x || [],
|
|
1831
|
-
{ immediate: !0 }
|
|
1832
|
-
), I(l, (x) => r("update:columns", x));
|
|
1833
|
-
const o = S(i.viewMode ?? "list");
|
|
1834
|
-
I(
|
|
1835
|
-
() => i.viewMode,
|
|
1836
|
-
(x) => {
|
|
1837
|
-
x && x !== o.value && (o.value = x);
|
|
1838
|
-
}
|
|
1839
|
-
);
|
|
1840
|
-
const t = S(i.html ?? "");
|
|
1841
|
-
I(
|
|
1842
|
-
() => i.html,
|
|
1843
|
-
(x) => {
|
|
1844
|
-
typeof x == "string" && x !== t.value && (t.value = x);
|
|
1845
|
-
},
|
|
1846
|
-
{ immediate: !0 }
|
|
1847
|
-
);
|
|
1848
|
-
const u = S(!1), a = S([]), s = [
|
|
1849
|
-
{ key: "name", label: "Name", type: "main" }
|
|
1850
|
-
// { key: "ua", label: "UA" },
|
|
1851
|
-
// { key: 'format', label: 'Format' },
|
|
1852
|
-
//{ key: 'is_admin', label: 'Admin', options: [{ text: "Так", id: true }, { text: "Ні", id: false }]},
|
|
1853
|
-
/* { key: "meta", label: "Мета" }, */
|
|
1854
|
-
], m = {
|
|
1855
|
-
name: {
|
|
1856
|
-
type: "text",
|
|
1857
|
-
label: "Name",
|
|
1858
|
-
validators: ["required"],
|
|
1859
|
-
disabled: !0
|
|
1860
|
-
},
|
|
1861
|
-
label: { type: "text", label: "Label", validators: ["required"] },
|
|
1862
|
-
format: {
|
|
1863
|
-
type: "radio",
|
|
1864
|
-
label: "Format",
|
|
1865
|
-
mode: "inline",
|
|
1866
|
-
validators: ["required"],
|
|
1867
|
-
options: [
|
|
1868
|
-
{ text: "Text", id: "text" },
|
|
1869
|
-
{ text: "Number", id: "number" },
|
|
1870
|
-
{ text: "Date", id: "date" },
|
|
1871
|
-
{ text: "File", id: "file" },
|
|
1872
|
-
{ text: "Select", id: "select" },
|
|
1873
|
-
{ text: "Tags", id: "tags" }
|
|
1874
|
-
]
|
|
1875
|
-
},
|
|
1876
|
-
is_admin: { type: "Switcher", label: "Тільки для адміністративної частини" },
|
|
1877
|
-
data: {
|
|
1878
|
-
type: "select",
|
|
1879
|
-
label: "Класифікатор",
|
|
1880
|
-
data: "admin.cls.name"
|
|
1881
|
-
// conditions: ['format', 'in', ['select', 'badge', 'tags']],
|
|
1882
|
-
}
|
|
1883
|
-
/* meta: {
|
|
1884
|
-
type: "combobox",
|
|
1885
|
-
label: "Мета",
|
|
1886
|
-
validators: ["required"],
|
|
1887
|
-
mode: "combo",
|
|
1888
|
-
options: [
|
|
1889
|
-
{ text: "Title", id: "title" },
|
|
1890
|
-
{ text: "Features", id: "features" },
|
|
1891
|
-
{ text: "Status", id: "status" },
|
|
1892
|
-
{ text: "Tags", id: "tags" },
|
|
1893
|
-
{ text: "Category", id: "category" },
|
|
1894
|
-
],
|
|
1895
|
-
}, */
|
|
1896
|
-
};
|
|
1897
|
-
function d() {
|
|
1898
|
-
a.value = o.value === "html" ? [] : l.value.map((x) => x.name || x.id), u.value = !0;
|
|
1899
|
-
}
|
|
1900
|
-
function y() {
|
|
1901
|
-
var K;
|
|
1902
|
-
const x = [...l.value], w = ((K = i.fields) == null ? void 0 : K.filter((V) => a.value.includes(V.name)).map((V) => {
|
|
1903
|
-
const { type: pe, format: te, ...B } = V;
|
|
1904
|
-
return {
|
|
1905
|
-
...B,
|
|
1906
|
-
format: te ?? pe ?? "text"
|
|
1907
|
-
};
|
|
1908
|
-
})) || [], g = rn(x, w, {
|
|
1909
|
-
selectedKeys: a.value,
|
|
1910
|
-
resolveKey: (V) => xe(V)
|
|
1911
|
-
});
|
|
1912
|
-
if (l.value = g, o.value === "html" && w.length) {
|
|
1913
|
-
const V = w.map((B) => {
|
|
1914
|
-
const me = B.label ?? "", oe = B.name ?? B.id ?? "";
|
|
1915
|
-
return `<dd>${me}</dd>
|
|
1916
|
-
<dt>{{ ${oe} }}</dt>`;
|
|
1917
|
-
}).join(`
|
|
1918
|
-
`), te = (t.value ?? "").trimEnd();
|
|
1919
|
-
t.value = te ? `${te}
|
|
1920
|
-
${V}` : V;
|
|
1921
|
-
}
|
|
1922
|
-
u.value = !1, a.value = [];
|
|
1923
|
-
}
|
|
1924
|
-
function b() {
|
|
1925
|
-
u.value = !1, a.value = [];
|
|
1926
|
-
}
|
|
1927
|
-
function p() {
|
|
1928
|
-
const x = o.value === "html" ? "html" : "list", w = {
|
|
1929
|
-
card_mode: x
|
|
1930
|
-
};
|
|
1931
|
-
x === "html" ? w.html = t.value : x === "list" && (w.list = l.value), r("save", "card", w);
|
|
1932
|
-
}
|
|
1933
|
-
const h = [
|
|
1934
|
-
{ value: "all", label: "Всі" },
|
|
1935
|
-
{ value: "list", label: "Список" },
|
|
1936
|
-
{ value: "none", label: "Жодне" },
|
|
1937
|
-
{ value: "html", label: "HTML" }
|
|
1938
|
-
];
|
|
1939
|
-
return (x, w) => (C(), D("div", ho, [
|
|
1940
|
-
v("div", { class: "flex justify-between mb-3 gap-2" }, [
|
|
1941
|
-
v("button", {
|
|
1942
|
-
onClick: d,
|
|
1943
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1944
|
-
}, " Імпорт "),
|
|
1945
|
-
v("button", {
|
|
1946
|
-
onClick: p,
|
|
1947
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
1948
|
-
}, " Зберегти ")
|
|
1949
|
-
]),
|
|
1950
|
-
j(mo, {
|
|
1951
|
-
modelValue: o.value,
|
|
1952
|
-
"onUpdate:modelValue": w[0] || (w[0] = (g) => o.value = g),
|
|
1953
|
-
options: h
|
|
1954
|
-
}, null, 8, ["modelValue"]),
|
|
1955
|
-
v("div", vo, [
|
|
1956
|
-
o.value === "list" ? (C(), M($e, {
|
|
1957
|
-
key: 0,
|
|
1958
|
-
modelValue: l.value,
|
|
1959
|
-
"onUpdate:modelValue": w[1] || (w[1] = (g) => l.value = g),
|
|
1960
|
-
"columns-scheme": s,
|
|
1961
|
-
"form-scheme": m,
|
|
1962
|
-
"main-col-width": "250px",
|
|
1963
|
-
"add-button": !1
|
|
1964
|
-
}, null, 8, ["modelValue"])) : o.value === "html" ? (C(), M(zn, {
|
|
1965
|
-
key: 1,
|
|
1966
|
-
modelValue: t.value,
|
|
1967
|
-
"onUpdate:modelValue": w[2] || (w[2] = (g) => t.value = g),
|
|
1968
|
-
language: "html",
|
|
1969
|
-
theme: "vs-light",
|
|
1970
|
-
class: "flex-1 min-h-0"
|
|
1971
|
-
}, null, 8, ["modelValue"])) : q("", !0)
|
|
1972
|
-
]),
|
|
1973
|
-
j(ln, {
|
|
1974
|
-
visible: u.value,
|
|
1975
|
-
"onUpdate:visible": w[3] || (w[3] = (g) => u.value = g),
|
|
1976
|
-
selection: a.value,
|
|
1977
|
-
"onUpdate:selection": w[4] || (w[4] = (g) => a.value = g),
|
|
1978
|
-
fields: e.fields,
|
|
1979
|
-
title: "Імпорт полів для картки",
|
|
1980
|
-
"id-prefix": "import-card",
|
|
1981
|
-
onConfirm: y,
|
|
1982
|
-
onCancel: b
|
|
1983
|
-
}, null, 8, ["visible", "selection", "fields"])
|
|
1984
|
-
]));
|
|
1985
|
-
}
|
|
1986
|
-
}), yo = { class: "flex flex-col flex-1 min-h-0" }, go = /* @__PURE__ */ ee({
|
|
1987
|
-
__name: "vs-tab-filter",
|
|
1988
|
-
props: {
|
|
1989
|
-
fields: {},
|
|
1990
|
-
columns: {}
|
|
1991
|
-
},
|
|
1992
|
-
emits: ["update:columns", "save"],
|
|
1993
|
-
setup(e, { emit: n }) {
|
|
1994
|
-
const i = e, r = n;
|
|
1995
|
-
console.log(i.columns);
|
|
1996
|
-
const l = S(i.columns || []);
|
|
1997
|
-
I(
|
|
1998
|
-
() => i.columns,
|
|
1999
|
-
(p) => l.value = p || [],
|
|
2000
|
-
{ immediate: !0 }
|
|
2001
|
-
), I(l, (p) => r("update:columns", p), { deep: !0, immediate: !0 });
|
|
2002
|
-
const o = S("list"), t = S(!1), u = S([]), a = [
|
|
2003
|
-
{ key: "id", label: "Name" },
|
|
2004
|
-
{ key: "label", label: "UA" }
|
|
2005
|
-
// { key: "type", label: "Тип" },
|
|
2006
|
-
], s = {
|
|
2007
|
-
name: { type: "text", label: "Name", disabled: !0, validators: ["required"] },
|
|
2008
|
-
label: { type: "text", label: "UA", validators: ["required"] },
|
|
2009
|
-
type: {
|
|
2010
|
-
type: "radio",
|
|
2011
|
-
label: "Тип",
|
|
2012
|
-
position: "horizontal",
|
|
2013
|
-
validators: ["required"],
|
|
2014
|
-
options: [
|
|
2015
|
-
{ text: "Check", id: "check" },
|
|
2016
|
-
{ text: "Range", id: "range" },
|
|
2017
|
-
{ text: "Date", id: "date" },
|
|
2018
|
-
{ text: "Text", id: "text" },
|
|
2019
|
-
{ text: "Select", id: "autocomplete" }
|
|
2020
|
-
]
|
|
2021
|
-
},
|
|
2022
|
-
hidden: {
|
|
2023
|
-
label: "Приховати",
|
|
2024
|
-
type: "Switcher"
|
|
2025
|
-
},
|
|
2026
|
-
data: {
|
|
2027
|
-
type: "select",
|
|
2028
|
-
label: "Класифікатор",
|
|
2029
|
-
data: "admin.cls.name",
|
|
2030
|
-
conditions: ["type", "in", ["autocomplete", "select", "check"]],
|
|
2031
|
-
validators: ["required"]
|
|
2032
|
-
}
|
|
2033
|
-
};
|
|
2034
|
-
function m() {
|
|
2035
|
-
u.value = l.value.map((p) => p.name || p.id), t.value = !0;
|
|
2036
|
-
}
|
|
2037
|
-
function d() {
|
|
2038
|
-
var w;
|
|
2039
|
-
const p = [...l.value], h = ((w = i.fields) == null ? void 0 : w.filter((g) => u.value.includes(g.name))) || [], x = rn(p, h, {
|
|
2040
|
-
selectedKeys: u.value,
|
|
2041
|
-
resolveKey: (g) => xe(g)
|
|
2042
|
-
});
|
|
2043
|
-
l.value = x, t.value = !1, u.value = [];
|
|
2044
|
-
}
|
|
2045
|
-
function y() {
|
|
2046
|
-
t.value = !1, u.value = [];
|
|
2047
|
-
}
|
|
2048
|
-
function b() {
|
|
2049
|
-
let p = [];
|
|
2050
|
-
o.value === "all" ? p = i.fields || [] : o.value === "none" ? p = [] : p = l.value, r("save", p);
|
|
2051
|
-
}
|
|
2052
|
-
return (p, h) => (C(), D("div", yo, [
|
|
2053
|
-
v("div", { class: "flex justify-between mb-3 gap-2" }, [
|
|
2054
|
-
v("button", {
|
|
2055
|
-
onClick: m,
|
|
2056
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
2057
|
-
}, " Імпорт "),
|
|
2058
|
-
v("button", {
|
|
2059
|
-
onClick: b,
|
|
2060
|
-
class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
|
|
2061
|
-
}, " Зберегти фільтр ")
|
|
2062
|
-
]),
|
|
2063
|
-
o.value === "list" ? (C(), M($e, {
|
|
2064
|
-
key: 0,
|
|
2065
|
-
modelValue: l.value,
|
|
2066
|
-
"onUpdate:modelValue": h[0] || (h[0] = (x) => l.value = x),
|
|
2067
|
-
"columns-scheme": a,
|
|
2068
|
-
"form-scheme": s,
|
|
2069
|
-
"main-col-width": "250px",
|
|
2070
|
-
"add-button": !1
|
|
2071
|
-
}, null, 8, ["modelValue"])) : q("", !0),
|
|
2072
|
-
j(ln, {
|
|
2073
|
-
visible: t.value,
|
|
2074
|
-
"onUpdate:visible": h[1] || (h[1] = (x) => t.value = x),
|
|
2075
|
-
selection: u.value,
|
|
2076
|
-
"onUpdate:selection": h[2] || (h[2] = (x) => u.value = x),
|
|
2077
|
-
fields: e.fields,
|
|
2078
|
-
title: "Імпорт полів",
|
|
2079
|
-
"id-prefix": "import-filter",
|
|
2080
|
-
onConfirm: d,
|
|
2081
|
-
onCancel: y
|
|
2082
|
-
}, null, 8, ["visible", "selection", "fields"])
|
|
2083
|
-
]));
|
|
2084
|
-
}
|
|
2085
|
-
}), bo = /* @__PURE__ */ ee({
|
|
2086
|
-
__name: "MapDataLayer",
|
|
2087
|
-
props: {
|
|
2088
|
-
id: {},
|
|
2089
|
-
layer: {},
|
|
2090
|
-
styleSpec: {},
|
|
2091
|
-
autoCenter: { type: [Boolean, null] }
|
|
2092
|
-
},
|
|
2093
|
-
setup(e, { expose: n }) {
|
|
2094
|
-
var p, h, x, w;
|
|
2095
|
-
const { map: i, flyTo: r, setZoom: l } = nl(), o = ((h = (p = qn()) == null ? void 0 : p.appContext.config.globalProperties) == null ? void 0 : h.$settings) || null, t = e, u = t.id;
|
|
2096
|
-
String(t.id);
|
|
2097
|
-
const a = `${location.origin}/api/vtile/${t.id}/ua/{z}/{x}/{y}.vmt?all=1`, s = Ie(u, {
|
|
2098
|
-
source: {
|
|
2099
|
-
type: "vector",
|
|
2100
|
-
tiles: [a],
|
|
2101
|
-
minzoom: 0,
|
|
2102
|
-
maxzoom: 14
|
|
2103
|
-
},
|
|
2104
|
-
popup: t.layer.popup,
|
|
2105
|
-
layer: {
|
|
2106
|
-
// id: layerId,
|
|
2107
|
-
// source: sourceId,
|
|
2108
|
-
// 'source-layer': props.id,
|
|
2109
|
-
style: (x = t.layer) == null ? void 0 : x.style
|
|
2110
|
-
/* paint: {
|
|
2111
|
-
'circle-radius': 6,
|
|
2112
|
-
'circle-color': 'red',
|
|
2113
|
-
} */
|
|
2114
|
-
}
|
|
2115
|
-
});
|
|
2116
|
-
n({ layerHandle: s }), (t.autoCenter ?? !0) && r({ center: t.layer.center || ((w = o == null ? void 0 : o.map) == null ? void 0 : w.center) || [30, 50], animate: !1 });
|
|
2117
|
-
let m = null;
|
|
2118
|
-
function d() {
|
|
2119
|
-
if (!(s != null && s.setTiles)) return;
|
|
2120
|
-
const g = a.includes("?") ? "&" : "?", K = `${a}${g}_=${Date.now()}`;
|
|
2121
|
-
s.setTiles([K]);
|
|
2122
|
-
}
|
|
2123
|
-
function y() {
|
|
2124
|
-
m && clearTimeout(m), m = setTimeout(() => {
|
|
2125
|
-
m = null, b().catch((g) => console.error("Failed to update map layer", g));
|
|
2126
|
-
}, 300);
|
|
2127
|
-
}
|
|
2128
|
-
async function b() {
|
|
2129
|
-
i.value && (d(), s.setStyle(t.styleSpec ?? null));
|
|
2130
|
-
}
|
|
2131
|
-
return I(() => t.styleSpec, y, { deep: !0 }), Kn(() => {
|
|
2132
|
-
s.remove();
|
|
2133
|
-
}), (g, K) => null;
|
|
2134
|
-
}
|
|
2135
|
-
}), _o = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, wo = { class: "flex-1 relative overflow-hidden" }, Ao = { class: "absolute top-0 left-0 w-full z-20" }, ko = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, Co = { class: "flex items-start justify-between gap-4" }, So = { class: "flex-1 min-w-0" }, Eo = { class: "flex items-center text-sm text-gray-500 mb-3" }, Fo = { class: "text-gray-900 font-medium truncate max-w-xs" }, To = { class: "flex items-center justify-between gap-4" }, Io = { class: "flex-1 min-w-0" }, Oo = { class: "flex items-center gap-3 mb-1" }, Lo = { class: "text-base font-semibold text-gray-900 truncate" }, No = {
|
|
2136
|
-
key: 0,
|
|
2137
|
-
class: "px-2 py-0.5 bg-green-50 border border-green-200 rounded flex-shrink-0"
|
|
2138
|
-
}, Mo = { class: "text-xs font-medium text-green-700" }, Do = ["title"], Ro = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[115px]" }, $o = { class: "relative w-full h-full" }, jo = { style: { top: "17px", left: "230px", position: "absolute", "z-index": "1" } }, Uo = { class: "absolute top-4 left-4 z-20" }, Bo = { class: "absolute top-[6.5rem] right-2 space-y-1 z-20" }, Yo = { class: "absolute bottom-4 left-4 z-20" }, Po = { class: "flex-1 flex flex-col h-full" }, Ho = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, Vo = { class: "items-center justify-center text-muted-foreground grid w-full grid-cols-6 h-12 p-1 bg-gray-50 rounded-xl shadow-sm" }, qo = ["aria-selected", "onClick"], Ko = { class: "leading-none" }, zo = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, Go = "OpenGIS", Pn = 2, Fe = 5, Qo = 1e3, Wo = /* @__PURE__ */ ee({
|
|
2139
|
-
__name: "service",
|
|
2140
|
-
props: {
|
|
2141
|
-
hideServiceKey: { type: Boolean, default: !1 }
|
|
2142
|
-
},
|
|
2143
|
-
setup(e) {
|
|
2144
|
-
var vn, xn;
|
|
2145
|
-
const i = Wi(e, "hideServiceKey"), r = Xi(), l = el(), { id: o } = r.params, t = S(null), u = S(null), a = S({}), s = S(null), m = ((xn = (vn = qn()) == null ? void 0 : vn.appContext.config.globalProperties) == null ? void 0 : xn.$settings) || null;
|
|
2146
|
-
function d(c) {
|
|
2147
|
-
typeof document > "u" || (document.title = c ? `${c} — Сервіс` : Go);
|
|
2148
|
-
}
|
|
2149
|
-
let y = null;
|
|
2150
|
-
const b = S(!1);
|
|
2151
|
-
function p() {
|
|
2152
|
-
var c;
|
|
2153
|
-
return (c = t.value) == null ? void 0 : c.ctx;
|
|
2154
|
-
}
|
|
2155
|
-
function h(c) {
|
|
2156
|
-
typeof window > "u" || window.dispatchEvent(
|
|
2157
|
-
new CustomEvent(sl, {
|
|
2158
|
-
detail: c
|
|
2159
|
-
})
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
|
-
function x(c) {
|
|
2163
|
-
var L, k, z;
|
|
2164
|
-
const f = (k = (L = p()) == null ? void 0 : L.map) == null ? void 0 : k.value;
|
|
2165
|
-
if (!f || !c) return [];
|
|
2166
|
-
const A = (z = s.value) != null && z.service_id ? String(s.value.service_id) : null;
|
|
2167
|
-
return (f.queryRenderedFeatures(c) || []).filter((F) => {
|
|
2168
|
-
var yn, gn, bn, _n, wn, An;
|
|
2169
|
-
const J = ((yn = F == null ? void 0 : F.properties) == null ? void 0 : yn.id) ?? (F == null ? void 0 : F.id);
|
|
2170
|
-
if (J == null || !(F != null && F.source) || A && String(F.source) !== A) return !1;
|
|
2171
|
-
const H = Ie(F.source) || Ie((gn = F.layer) == null ? void 0 : gn.id);
|
|
2172
|
-
if (!H) return !1;
|
|
2173
|
-
const ie = (_n = (bn = H == null ? void 0 : H.opts) == null ? void 0 : bn.source) == null ? void 0 : _n.type, Ee = (An = (wn = H == null ? void 0 : H.opts) == null ? void 0 : wn.layer) == null ? void 0 : An.type;
|
|
2174
|
-
return ie !== "raster" && Ee !== "raster";
|
|
2175
|
-
});
|
|
2176
|
-
}
|
|
2177
|
-
function w(c) {
|
|
2178
|
-
const f = x(c == null ? void 0 : c.point);
|
|
2179
|
-
h({
|
|
2180
|
-
features: f,
|
|
2181
|
-
externalItems: []
|
|
2182
|
-
});
|
|
2183
|
-
}
|
|
2184
|
-
function g(c) {
|
|
2185
|
-
if (Array.isArray(c)) return g(c[0]);
|
|
2186
|
-
if (typeof c != "string" && typeof c != "number") return null;
|
|
2187
|
-
const f = typeof c == "number" ? c : Number(c.trim());
|
|
2188
|
-
return Number.isFinite(f) ? f : null;
|
|
2189
|
-
}
|
|
2190
|
-
function K(c, f) {
|
|
2191
|
-
return c.toFixed(f);
|
|
2192
|
-
}
|
|
2193
|
-
function V(c, f, A) {
|
|
2194
|
-
const E = 0.5 * 10 ** -A;
|
|
2195
|
-
return Math.abs(c - f) > E;
|
|
2196
|
-
}
|
|
2197
|
-
function pe() {
|
|
2198
|
-
var F, J, H, ie;
|
|
2199
|
-
const c = (J = (F = p()) == null ? void 0 : F.map) == null ? void 0 : J.value;
|
|
2200
|
-
if (!c) return;
|
|
2201
|
-
const f = g(r.query.z), A = g(r.query.x), E = g(r.query.y);
|
|
2202
|
-
if (f == null || A == null || E == null) return;
|
|
2203
|
-
const L = (H = c.getCenter) == null ? void 0 : H.call(c), k = (ie = c.getZoom) == null ? void 0 : ie.call(c);
|
|
2204
|
-
(!L || V(L.lng, A, Fe) || V(L.lat, E, Fe) || V(k ?? 0, f, Pn)) && (b.value = !0, c.jumpTo({ center: [A, E], zoom: f }), b.value = !1);
|
|
2205
|
-
}
|
|
2206
|
-
function te() {
|
|
2207
|
-
var L, k, z, F;
|
|
2208
|
-
if (b.value) return;
|
|
2209
|
-
const c = (k = (L = p()) == null ? void 0 : L.map) == null ? void 0 : k.value;
|
|
2210
|
-
if (!c) return;
|
|
2211
|
-
const f = (z = c.getCenter) == null ? void 0 : z.call(c), A = (F = c.getZoom) == null ? void 0 : F.call(c);
|
|
2212
|
-
if (!f || A == null) return;
|
|
2213
|
-
const E = {
|
|
2214
|
-
...r.query,
|
|
2215
|
-
z: K(A, Pn),
|
|
2216
|
-
x: K(f.lng, Fe),
|
|
2217
|
-
y: K(f.lat, Fe)
|
|
2218
|
-
};
|
|
2219
|
-
r.query.z === E.z && r.query.x === E.x && r.query.y === E.y || l.replace({ query: E });
|
|
2220
|
-
}
|
|
2221
|
-
const B = S(null), me = S(""), oe = S([]), Ue = S([]), we = S([]), Be = S("list"), Ye = S(""), Ae = S([]), ke = S(!0);
|
|
2222
|
-
let ne = null;
|
|
2223
|
-
const Y = ue(
|
|
2224
|
-
() => {
|
|
2225
|
-
var c, f;
|
|
2226
|
-
return ((c = s.value) == null ? void 0 : c.id) ?? ((f = s.value) == null ? void 0 : f.service_id) ?? null;
|
|
2227
|
-
}
|
|
2228
|
-
), fn = ue(() => {
|
|
2229
|
-
const c = (m == null ? void 0 : m.map) || null, f = (c == null ? void 0 : c.boundary) ?? null, A = (c == null ? void 0 : c.katottg) ?? null;
|
|
2230
|
-
return !f && !A ? null : { boundary: f, katottg: A };
|
|
2231
|
-
}), Pe = ue(() => {
|
|
2232
|
-
const c = s.value;
|
|
2233
|
-
if (!c) return "";
|
|
2234
|
-
const f = [];
|
|
2235
|
-
!i.value && c.service_key && f.push(`Сервіс: ${c.service_key}`), c.description && f.push(c.description);
|
|
2236
|
-
const A = c.group_name || c.group_id;
|
|
2237
|
-
return A && f.push(`Група: ${A}`), typeof c.is_public < "u" && f.push(c.is_public ? "Публічний" : "Не публічний"), typeof c.is_active < "u" && f.push(c.is_active ? "Активний" : "Неактивний"), f.join(", ");
|
|
2238
|
-
}), dn = ue(() => {
|
|
2239
|
-
const c = s.value, f = (c == null ? void 0 : c.group_name) || (c == null ? void 0 : c.group_id);
|
|
2240
|
-
return f ? String(f).toUpperCase() : "";
|
|
2241
|
-
}), ji = ue(() => {
|
|
2242
|
-
var A;
|
|
2243
|
-
const c = (A = r.matched[r.matched.length - 1]) == null ? void 0 : A.path;
|
|
2244
|
-
return (typeof c == "string" && c ? c : r.path).replace(/\/:id\??$/, "") || "/";
|
|
2245
|
-
}), Ui = ue(() => {
|
|
2246
|
-
var f;
|
|
2247
|
-
const c = (f = r.meta) == null ? void 0 : f.title;
|
|
2248
|
-
return typeof c == "string" && c.trim() ? c : "Datasets";
|
|
2249
|
-
});
|
|
2250
|
-
function Bi() {
|
|
2251
|
-
l.push(ji.value);
|
|
2252
|
-
}
|
|
2253
|
-
const pn = [
|
|
2254
|
-
{ key: "style", label: "Стиль", icon: ml },
|
|
2255
|
-
{ key: "popup", label: "Попап", icon: Bt },
|
|
2256
|
-
{ key: "filter", label: "Фільтр", icon: Vt },
|
|
2257
|
-
{ key: "legend", label: "Легенда", icon: Rt },
|
|
2258
|
-
{ key: "card", label: "Картка", icon: hl },
|
|
2259
|
-
{ key: "metadata", label: "Метадані", icon: pl }
|
|
2260
|
-
], mn = pn.map((c) => c.key), P = S("style");
|
|
2261
|
-
Ji(async () => {
|
|
2262
|
-
const c = r.query.tab;
|
|
2263
|
-
c && mn.includes(c) && (P.value = c), await Ce(), Yi();
|
|
2264
|
-
});
|
|
2265
|
-
async function Yi() {
|
|
2266
|
-
var E;
|
|
2267
|
-
const c = p();
|
|
2268
|
-
if (!(c != null && c.ready)) return;
|
|
2269
|
-
await c.ready(), pe();
|
|
2270
|
-
const f = (E = c.map) == null ? void 0 : E.value;
|
|
2271
|
-
if (!f) return;
|
|
2272
|
-
const A = () => te();
|
|
2273
|
-
f.on("moveend", A), f.on("zoomend", A), f.on("click", w), y = () => {
|
|
2274
|
-
f.off("moveend", A), f.off("zoomend", A), f.off("click", w);
|
|
2275
|
-
};
|
|
2276
|
-
}
|
|
2277
|
-
I(
|
|
2278
|
-
() => [r.query.z, r.query.x, r.query.y],
|
|
2279
|
-
() => {
|
|
2280
|
-
pe();
|
|
2281
|
-
}
|
|
2282
|
-
), I(P, (c) => {
|
|
2283
|
-
r.query.tab !== c && l.replace({ query: { ...r.query, tab: c } });
|
|
2284
|
-
}), I(
|
|
2285
|
-
() => r.query.tab,
|
|
2286
|
-
(c) => {
|
|
2287
|
-
c && mn.includes(c) && P.value !== c && (P.value = c);
|
|
2288
|
-
}
|
|
2289
|
-
), I(
|
|
2290
|
-
() => {
|
|
2291
|
-
var c;
|
|
2292
|
-
return (c = s.value) == null ? void 0 : c.name;
|
|
2293
|
-
},
|
|
2294
|
-
(c) => d(c),
|
|
2295
|
-
{ immediate: !0 }
|
|
2296
|
-
);
|
|
2297
|
-
function He(c) {
|
|
2298
|
-
if (!c) return null;
|
|
2299
|
-
try {
|
|
2300
|
-
return JSON.parse(JSON.stringify(c));
|
|
2301
|
-
} catch (f) {
|
|
2302
|
-
return console.warn("Failed to clone style", f), null;
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
function Ve(c) {
|
|
2306
|
-
if (!c) return null;
|
|
2307
|
-
if (typeof c == "string")
|
|
2308
|
-
try {
|
|
2309
|
-
return Cn(Yn.load(c) || null);
|
|
2310
|
-
} catch (f) {
|
|
2311
|
-
return console.warn("Failed to parse style yaml", f), null;
|
|
2312
|
-
}
|
|
2313
|
-
return Cn(He(c));
|
|
2314
|
-
}
|
|
2315
|
-
function Pi(c, f) {
|
|
2316
|
-
try {
|
|
2317
|
-
return JSON.stringify(c) === JSON.stringify(f);
|
|
2318
|
-
} catch {
|
|
2319
|
-
return !1;
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
function Hi() {
|
|
2323
|
-
var f;
|
|
2324
|
-
if (!s.value) return;
|
|
2325
|
-
const c = Ve(B.value);
|
|
2326
|
-
Pi(c, ((f = s.value) == null ? void 0 : f.style) ?? null) || (s.value = {
|
|
2327
|
-
...s.value,
|
|
2328
|
-
style: c
|
|
2329
|
-
});
|
|
2330
|
-
}
|
|
2331
|
-
function Vi() {
|
|
2332
|
-
ne && clearTimeout(ne), ne = setTimeout(() => {
|
|
2333
|
-
ne = null, Hi();
|
|
2334
|
-
}, Qo);
|
|
2335
|
-
}
|
|
2336
|
-
const Ce = async () => {
|
|
2337
|
-
try {
|
|
2338
|
-
const c = await fetch(`/api/gis-service/${o}`);
|
|
2339
|
-
if (!c.ok) throw new Error(`${c.status}`);
|
|
2340
|
-
const f = await c.json();
|
|
2341
|
-
a.value = f || {}, u.value = o;
|
|
2342
|
-
const A = Ve(f.style);
|
|
2343
|
-
s.value = f ? { ...f, style: He(A) } : null, B.value = A, me.value = typeof (f == null ? void 0 : f.style) == "string" ? f.style : A ? Yn.dump(A) : "", Ue.value = (f == null ? void 0 : f.popup) || [], Be.value = f.card_mode === "html" ? "html" : "list", we.value = f.card, Ye.value = f.html, oe.value = (f == null ? void 0 : f.legend) || [], Ae.value = (f == null ? void 0 : f.filters) || [];
|
|
2344
|
-
} catch (c) {
|
|
2345
|
-
console.error("Failed to fetch map info", c);
|
|
2346
|
-
}
|
|
2347
|
-
};
|
|
2348
|
-
I(
|
|
2349
|
-
() => {
|
|
2350
|
-
var c;
|
|
2351
|
-
return (c = s.value) == null ? void 0 : c.style;
|
|
2352
|
-
},
|
|
2353
|
-
(c) => {
|
|
2354
|
-
B.value = Ve(c);
|
|
2355
|
-
},
|
|
2356
|
-
{ deep: !0 }
|
|
2357
|
-
), I(
|
|
2358
|
-
() => B.value,
|
|
2359
|
-
() => {
|
|
2360
|
-
Vi();
|
|
2361
|
-
},
|
|
2362
|
-
{ deep: !0 }
|
|
2363
|
-
), Kn(() => {
|
|
2364
|
-
ne && (clearTimeout(ne), ne = null), y == null || y(), y = null;
|
|
2365
|
-
});
|
|
2366
|
-
async function qi(c) {
|
|
2367
|
-
try {
|
|
2368
|
-
const f = await fetch(`/api/gis-clear-vtile/${c}`), { message: A, error: E, code: L } = await f.json();
|
|
2369
|
-
if (L === 200)
|
|
2370
|
-
return Q({ type: "success", title: "Успіх", message: A });
|
|
2371
|
-
Q({ type: "error", title: "Помилка", message: E });
|
|
2372
|
-
} catch (f) {
|
|
2373
|
-
Q({
|
|
2374
|
-
type: "error",
|
|
2375
|
-
title: "Помилка",
|
|
2376
|
-
message: "Не вдалося очистити тайли"
|
|
2377
|
-
}), console.error(f);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
async function Se(c, f) {
|
|
2381
|
-
await hn({ [c]: f }, c);
|
|
2382
|
-
}
|
|
2383
|
-
function Ki() {
|
|
2384
|
-
const c = He(B.value);
|
|
2385
|
-
s.value = s.value ? { ...s.value, style: c } : s.value;
|
|
2386
|
-
}
|
|
2387
|
-
async function hn(c, f) {
|
|
2388
|
-
if (s.value = {
|
|
2389
|
-
...s.value || {},
|
|
2390
|
-
...c
|
|
2391
|
-
}, typeof c.html < "u" && (a.value = {
|
|
2392
|
-
...a.value || {},
|
|
2393
|
-
html: c.html
|
|
2394
|
-
}), !!Y.value)
|
|
2395
|
-
try {
|
|
2396
|
-
if (!(await fetch(`/api/gis-service/${Y.value}`, {
|
|
2397
|
-
method: "PUT",
|
|
2398
|
-
headers: { "Content-Type": "application/json" },
|
|
2399
|
-
body: JSON.stringify(c)
|
|
2400
|
-
})).ok) throw new Error("Save failed");
|
|
2401
|
-
Q({
|
|
2402
|
-
type: "success",
|
|
2403
|
-
title: "Успіх",
|
|
2404
|
-
message: `${f} saved`
|
|
2405
|
-
}), await Ce();
|
|
2406
|
-
} catch (A) {
|
|
2407
|
-
Q({
|
|
2408
|
-
type: "error",
|
|
2409
|
-
title: "Помилка",
|
|
2410
|
-
message: `Failed to save ${f}`
|
|
2411
|
-
}), console.error(A);
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
async function zi(c, f) {
|
|
2415
|
-
if (c !== "card") {
|
|
2416
|
-
await Se(c, f);
|
|
2417
|
-
return;
|
|
2418
|
-
}
|
|
2419
|
-
const A = (f == null ? void 0 : f.card_mode) === "html" ? "html" : "list", E = A === "html" && typeof (f == null ? void 0 : f.html) == "string" ? f.html : "", L = (A === "html" ? [] : null) || (Array.isArray(f == null ? void 0 : f.list) ? f.list : []);
|
|
2420
|
-
we.value = L, Be.value = A, Ye.value = E;
|
|
2421
|
-
const k = {
|
|
2422
|
-
card_mode: A
|
|
2423
|
-
};
|
|
2424
|
-
A === "html" && (k.html = E), A === "list" && (k.card = L), await hn(k, "card");
|
|
2425
|
-
}
|
|
2426
|
-
return (c, f) => {
|
|
2427
|
-
var A, E, L;
|
|
2428
|
-
return C(), D("div", _o, [
|
|
2429
|
-
v("div", wo, [
|
|
2430
|
-
v("div", Ao, [
|
|
2431
|
-
v("div", ko, [
|
|
2432
|
-
v("div", Co, [
|
|
2433
|
-
v("div", So, [
|
|
2434
|
-
v("div", Eo, [
|
|
2435
|
-
v("button", {
|
|
2436
|
-
type: "button",
|
|
2437
|
-
class: "hover:text-gray-700 cursor-pointer transition-colors",
|
|
2438
|
-
onClick: Bi
|
|
2439
|
-
}, le(Ui.value), 1),
|
|
2440
|
-
f[10] || (f[10] = v("svg", {
|
|
2441
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2442
|
-
width: "24",
|
|
2443
|
-
height: "24",
|
|
2444
|
-
viewBox: "0 0 24 24",
|
|
2445
|
-
fill: "none",
|
|
2446
|
-
stroke: "currentColor",
|
|
2447
|
-
"stroke-width": "2",
|
|
2448
|
-
"stroke-linecap": "round",
|
|
2449
|
-
"stroke-linejoin": "round",
|
|
2450
|
-
class: "lucide lucide-chevron-right w-4 h-4 mx-1"
|
|
2451
|
-
}, [
|
|
2452
|
-
v("path", { d: "m9 18 6-6-6-6" })
|
|
2453
|
-
], -1)),
|
|
2454
|
-
v("span", Fo, le(((A = s.value) == null ? void 0 : A.name) || "Dataset"), 1)
|
|
2455
|
-
]),
|
|
2456
|
-
v("div", To, [
|
|
2457
|
-
v("div", Io, [
|
|
2458
|
-
v("div", Oo, [
|
|
2459
|
-
v("h1", Lo, le(((E = s.value) == null ? void 0 : E.name) || "Dataset"), 1),
|
|
2460
|
-
dn.value ? (C(), D("div", No, [
|
|
2461
|
-
v("span", Mo, le(dn.value), 1)
|
|
2462
|
-
])) : q("", !0)
|
|
2463
|
-
]),
|
|
2464
|
-
Pe.value ? (C(), D("p", {
|
|
2465
|
-
key: 0,
|
|
2466
|
-
class: "text-xs text-gray-500 truncate",
|
|
2467
|
-
title: Pe.value
|
|
2468
|
-
}, le(Pe.value), 9, Do)) : q("", !0)
|
|
2469
|
-
])
|
|
2470
|
-
])
|
|
2471
|
-
]),
|
|
2472
|
-
Y.value ? (C(), M(cl, {
|
|
2473
|
-
key: 0,
|
|
2474
|
-
class: "flex-shrink-0",
|
|
2475
|
-
"entity-id": Y.value,
|
|
2476
|
-
"entity-info": { name: (L = s.value) == null ? void 0 : L.name },
|
|
2477
|
-
table: "gis.services.table",
|
|
2478
|
-
"entity-label": "Сервіс",
|
|
2479
|
-
"save-method": "put",
|
|
2480
|
-
"show-xml-item": !1,
|
|
2481
|
-
"clear-tiles-handler": qi,
|
|
2482
|
-
onSaved: Ce
|
|
2483
|
-
}, null, 8, ["entity-id", "entity-info"])) : q("", !0)
|
|
2484
|
-
])
|
|
2485
|
-
])
|
|
2486
|
-
]),
|
|
2487
|
-
v("div", Ro, [
|
|
2488
|
-
v("div", $o, [
|
|
2489
|
-
j(il, {
|
|
2490
|
-
ref_key: "mapViewRef",
|
|
2491
|
-
ref: t
|
|
2492
|
-
}, {
|
|
2493
|
-
default: We(() => {
|
|
2494
|
-
var k, z, F, J, H, ie, Ee;
|
|
2495
|
-
return [
|
|
2496
|
-
(k = s.value) != null && k.service_id ? (C(), M(bo, {
|
|
2497
|
-
key: 0,
|
|
2498
|
-
id: (z = s.value) == null ? void 0 : z.service_id,
|
|
2499
|
-
layer: s.value,
|
|
2500
|
-
"style-spec": ((F = s.value) == null ? void 0 : F.style) || null,
|
|
2501
|
-
autoCenter: !1
|
|
2502
|
-
}, null, 8, ["id", "layer", "style-spec"])) : q("", !0),
|
|
2503
|
-
Y.value ? (C(), M(ll, {
|
|
2504
|
-
key: 1,
|
|
2505
|
-
"layer-id": Y.value,
|
|
2506
|
-
boundary: ((J = s.value) == null ? void 0 : J.boundary) || ((H = fn.value) == null ? void 0 : H.boundary) || null,
|
|
2507
|
-
katottg: ((ie = s.value) == null ? void 0 : ie.katottg) || ((Ee = fn.value) == null ? void 0 : Ee.katottg) || null
|
|
2508
|
-
}, null, 8, ["layer-id", "boundary", "katottg"])) : q("", !0),
|
|
2509
|
-
v("div", jo, [
|
|
2510
|
-
Y.value ? (C(), M(rl, {
|
|
2511
|
-
key: 0,
|
|
2512
|
-
"layer-id": Y.value,
|
|
2513
|
-
filters: Ae.value
|
|
2514
|
-
}, null, 8, ["layer-id", "filters"])) : q("", !0)
|
|
2515
|
-
]),
|
|
2516
|
-
f[11] || (f[11] = v("div", {
|
|
2517
|
-
id: "map-filter-popover-host",
|
|
2518
|
-
class: "map-widget__filter-host"
|
|
2519
|
-
}, null, -1)),
|
|
2520
|
-
v("div", Uo, [
|
|
2521
|
-
j(tl)
|
|
2522
|
-
]),
|
|
2523
|
-
v("div", Bo, [
|
|
2524
|
-
j(kn),
|
|
2525
|
-
a.value.center ? (C(), M(kn, {
|
|
2526
|
-
key: 0,
|
|
2527
|
-
targetCenter: a.value.center,
|
|
2528
|
-
targetLabel: "Ценр даних"
|
|
2529
|
-
}, null, 8, ["targetCenter"])) : q("", !0)
|
|
2530
|
-
]),
|
|
2531
|
-
v("div", Yo, [
|
|
2532
|
-
j(ol, {
|
|
2533
|
-
items: oe.value || null
|
|
2534
|
-
}, null, 8, ["items"])
|
|
2535
|
-
]),
|
|
2536
|
-
j(ul),
|
|
2537
|
-
j(al, {
|
|
2538
|
-
html: a.value.html
|
|
2539
|
-
}, null, 8, ["html"])
|
|
2540
|
-
];
|
|
2541
|
-
}),
|
|
2542
|
-
_: 1
|
|
2543
|
-
}, 512)
|
|
2544
|
-
])
|
|
2545
|
-
]),
|
|
2546
|
-
j(fl, {
|
|
2547
|
-
open: ke.value,
|
|
2548
|
-
onToggle: f[0] || (f[0] = (k) => ke.value = !ke.value),
|
|
2549
|
-
"top-class": "top-4"
|
|
2550
|
-
}, null, 8, ["open"])
|
|
2551
|
-
]),
|
|
2552
|
-
v("div", {
|
|
2553
|
-
class: ve(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", ke.value ? "w-[650px]" : "w-0"])
|
|
2554
|
-
}, [
|
|
2555
|
-
v("div", Po, [
|
|
2556
|
-
v("div", Ho, [
|
|
2557
|
-
v("div", Vo, [
|
|
2558
|
-
(C(), D(Hn, null, Vn(pn, (k) => v("button", {
|
|
2559
|
-
key: k.key,
|
|
2560
|
-
type: "button",
|
|
2561
|
-
role: "tab",
|
|
2562
|
-
"aria-selected": P.value === k.key,
|
|
2563
|
-
class: ve([
|
|
2564
|
-
"whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group",
|
|
2565
|
-
P.value === k.key ? "bg-white shadow-sm text-gray-700" : ""
|
|
2566
|
-
]),
|
|
2567
|
-
onClick: (z) => P.value = k.key
|
|
2568
|
-
}, [
|
|
2569
|
-
(C(), M(Zi(k.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
|
|
2570
|
-
v("span", Ko, le(k.label), 1)
|
|
2571
|
-
], 10, qo)), 64))
|
|
2572
|
-
])
|
|
2573
|
-
]),
|
|
2574
|
-
v("div", zo, [
|
|
2575
|
-
P.value === "style" ? (C(), M(Jt, {
|
|
2576
|
-
key: 0,
|
|
2577
|
-
token: Y.value,
|
|
2578
|
-
"style-text": me.value,
|
|
2579
|
-
"style-yaml": B.value,
|
|
2580
|
-
"onUpdate:styleYaml": f[1] || (f[1] = (k) => B.value = k),
|
|
2581
|
-
"onUpdate:styleText": f[2] || (f[2] = (k) => me.value = k),
|
|
2582
|
-
onUpdate: Ki
|
|
2583
|
-
}, null, 8, ["token", "style-text", "style-yaml"])) : P.value === "legend" ? (C(), M(ao, {
|
|
2584
|
-
key: 1,
|
|
2585
|
-
token: Y.value,
|
|
2586
|
-
columns: oe.value,
|
|
2587
|
-
"onUpdate:columns": f[3] || (f[3] = (k) => oe.value = k),
|
|
2588
|
-
onSave: f[4] || (f[4] = (k) => Se("legend", k))
|
|
2589
|
-
}, null, 8, ["token", "columns"])) : P.value === "popup" ? (C(), M(eo, {
|
|
2590
|
-
key: 2,
|
|
2591
|
-
token: Y.value,
|
|
2592
|
-
columns: Ue.value,
|
|
2593
|
-
fields: a.value.fields,
|
|
2594
|
-
"onUpdate:columns": f[5] || (f[5] = (k) => Ue.value = k),
|
|
2595
|
-
onSave: f[6] || (f[6] = (k) => Se("popup", k))
|
|
2596
|
-
}, null, 8, ["token", "columns", "fields"])) : P.value === "card" ? (C(), M(xo, {
|
|
2597
|
-
key: 3,
|
|
2598
|
-
token: Y.value,
|
|
2599
|
-
columns: we.value,
|
|
2600
|
-
fields: a.value.fields,
|
|
2601
|
-
"view-mode": Be.value,
|
|
2602
|
-
html: Ye.value,
|
|
2603
|
-
"onUpdate:columns": f[7] || (f[7] = (k) => we.value = k),
|
|
2604
|
-
onSave: zi
|
|
2605
|
-
}, null, 8, ["token", "columns", "fields", "view-mode", "html"])) : P.value === "filter" ? (C(), M(go, {
|
|
2606
|
-
key: 4,
|
|
2607
|
-
token: Y.value,
|
|
2608
|
-
fields: a.value.fields,
|
|
2609
|
-
columns: Ae.value,
|
|
2610
|
-
"onUpdate:columns": f[8] || (f[8] = (k) => Ae.value = k),
|
|
2611
|
-
onSave: f[9] || (f[9] = (k) => Se("filters", k))
|
|
2612
|
-
}, null, 8, ["token", "fields", "columns"])) : P.value === "metadata" ? (C(), M(dl, {
|
|
2613
|
-
key: 5,
|
|
2614
|
-
data: s.value,
|
|
2615
|
-
"entity-id": String(Te(o)),
|
|
2616
|
-
"entity-type": "service",
|
|
2617
|
-
onSaved: Ce
|
|
2618
|
-
}, null, 8, ["data", "entity-id"])) : q("", !0)
|
|
2619
|
-
])
|
|
2620
|
-
])
|
|
2621
|
-
], 2)
|
|
2622
|
-
]);
|
|
2623
|
-
};
|
|
2624
|
-
}
|
|
2625
|
-
}), ou = /* @__PURE__ */ Re(Wo, [["__scopeId", "data-v-11408bee"]]);
|
|
2626
|
-
export {
|
|
2627
|
-
ou as default
|
|
2628
|
-
};
|