@opengis/surveyor 0.0.8 → 0.0.10

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.
Files changed (68) hide show
  1. package/README.md +4 -3
  2. package/dist/chunks/{AppIcon-CO70tpMX.js → AppIcon-Di5F4Bu_.js} +1 -1
  3. package/dist/chunks/{AppealDetailField-DNRGpnyD.js → AppealDetailField-DNpsGpPY.js} +2 -2
  4. package/dist/chunks/{AppealStatusBadge-Cu-UzdzA.js → AppealStatusBadge-MP1qD952.js} +1 -1
  5. package/dist/chunks/{AppealStatusBadge-BlAaNUSK.js → AppealStatusBadge-z77wwkFD.js} +2 -2
  6. package/dist/chunks/{ApplicationHistorySection-Cwq0-Frd.js → ApplicationHistorySection-DIoFZwH6.js} +4 -4
  7. package/dist/chunks/{BaseModal-SQXvRRNW.js → BaseModal-DP_ilBdg.js} +21 -11
  8. package/dist/chunks/{FormFilePicker-DxPQlxgy.js → FormFilePicker-D5fAUE0Z.js} +2 -2
  9. package/dist/chunks/{MapLayerMenu-AUeTqgEp.js → MapLayerMenu-CI5cbLEC.js} +1 -1
  10. package/dist/chunks/{RegistryForm-wG-c8GKf.js → RegistryForm-DbCxZsr0.js} +1 -1
  11. package/dist/chunks/{RegistryFormModal-R_iZYqGE.js → RegistryFormModal-D_KLGj2d.js} +3 -3
  12. package/dist/chunks/{RegistryToolbar-322DKUXi.js → RegistryToolbar-DvbrASlj.js} +6 -6
  13. package/dist/chunks/{SurveyorTeleport-CnSF0Ptl.js → SurveyorTeleport-D6-KXe_5.js} +1 -1
  14. package/dist/chunks/{UserAccessBadge-DyZDv7Oo.js → UserAccessBadge-B5Q1LvNv.js} +1 -1
  15. package/dist/chunks/{UserTypeBadge-LvnMuKGo.js → UserTypeBadge-CuAMctTK.js} +1 -1
  16. package/dist/chunks/{VerifiedBadge-bk0n-rlC.js → VerifiedBadge-D6L7mCdp.js} +2 -2
  17. package/dist/chunks/{card-CWqi1K-x.js → card--XUb1kFK.js} +4 -4
  18. package/dist/chunks/{card-C3y-j2TA.js → card-BrjnXf1N.js} +6 -6
  19. package/dist/chunks/{card-6z-m7UkM.js → card-BsTSF6aL.js} +10 -10
  20. package/dist/chunks/{card-Dlp8_KhV.js → card-CI7ntIHf.js} +5 -5
  21. package/dist/chunks/{card-DWpAv92l.js → card-Cu8QOSIw.js} +4 -4
  22. package/dist/chunks/{card-X9UVFgdR.js → card-ylC5NYbz.js} +241 -208
  23. package/dist/chunks/certificates-BnseQylH.js +209 -0
  24. package/dist/chunks/certificates-aJ-hvaP-.js +236 -0
  25. package/dist/chunks/{create-CAVC1qXJ.js → create-Bi7-j9Ri.js} +413 -413
  26. package/dist/chunks/{forgot-DoG6vXhq.js → forgot-DnixBqdc.js} +2 -2
  27. package/dist/chunks/{login-BWGylcSU.js → login-BWCQdEkv.js} +2 -2
  28. package/dist/chunks/map-CwsVIW79.js +2872 -0
  29. package/dist/chunks/{map-layers-sT-gTiD_.js → map-layers-BLiEYC4C.js} +5 -5
  30. package/dist/chunks/{organizations-ByVE2f0c.js → organizations-mc6FlSwe.js} +6 -6
  31. package/dist/chunks/{profile-CkwMFh82.js → profile-F7mr0poI.js} +3 -3
  32. package/dist/chunks/{registration-3GLgq-ae.js → registration-BRF4985_.js} +2 -2
  33. package/dist/chunks/{requests-BTpLXrNj.js → requests-7pD2ckdx.js} +4 -4
  34. package/dist/chunks/{requests-rWq8ok3C.js → requests-BCJN-CNx.js} +5 -5
  35. package/dist/chunks/{reset-CP9LsLkC.js → reset-OZCgLi6f.js} +2 -2
  36. package/dist/chunks/{useEntityPath-C5Owtidc.js → useEntityPath-8s0Y1tjA.js} +1 -1
  37. package/dist/chunks/{users-U1P6xCP4.js → users-CAEjpaI1.js} +6 -6
  38. package/dist/index.css +1 -1
  39. package/dist/index.js +40 -40
  40. package/migrations/20261016120000_map_layers.sql +156 -156
  41. package/migrations/20261016150000_password_reset.sql +15 -15
  42. package/migrations/20261016180000_settlement_lookup.sql +16 -16
  43. package/package.json +1 -1
  44. package/server/dictionaries/index.ts +17 -17
  45. package/server/dictionaries/surveyor/map_layer_components.ts +11 -11
  46. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -10
  47. package/server/dictionaries/surveyor/map_layer_types.ts +11 -11
  48. package/server/modules/surveyor/route.ts +4 -2
  49. package/server/modules/surveyor/schema.ts +18 -1
  50. package/server/modules/surveyor/services/applicationTile.ts +36 -8
  51. package/server/modules/surveyor/services/createApplication.ts +2 -3
  52. package/server/modules/surveyor/services/mapLayers.ts +61 -61
  53. package/server/modules/surveyor/services/registerSurveyor.ts +3 -4
  54. package/server/modules/surveyor/services/requestPasswordReset.ts +1 -0
  55. package/server/modules/surveyor/services/resetSurveyorPassword.ts +1 -0
  56. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -52
  57. package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -53
  58. package/server/modules/surveyor/utils/certificateStatus.ts +15 -0
  59. package/server/modules/surveyor/utils/mail.ts +49 -20
  60. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -79
  61. package/server/resources/helpers/settlement_lookup.ts +7 -7
  62. package/server/resources/surveyor-admin/certificates.ts +27 -1
  63. package/server/resources/surveyor-admin/map_layers.ts +69 -69
  64. package/server/resources/surveyor-admin/organization_surveyors.ts +31 -31
  65. package/server/resources/surveyor-admin/organizations.ts +61 -61
  66. package/server/resources/surveyor-user/applications.ts +1 -1
  67. package/dist/chunks/certificates-Cwch72-o.js +0 -425
  68. package/dist/chunks/map-UTBxwT7-.js +0 -2776
@@ -1,19 +1,19 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { a as t, t as n } from "./surveyor-CDkI2Dcp.js";
3
3
  import { s as r, t as i } from "./organizations-DbVDoURw.js";
4
- import { t as a } from "./AppIcon-CO70tpMX.js";
5
- import { t as o } from "./SurveyorTeleport-CnSF0Ptl.js";
4
+ import { t as a } from "./AppIcon-Di5F4Bu_.js";
5
+ import { t as o } from "./SurveyorTeleport-D6-KXe_5.js";
6
6
  import { c as s, t as c, u as l } from "./appealMapLayers-CQMK3rrz.js";
7
- import { a as u, d, i as f, l as p, r as m, s as h, t as g, u as _ } from "./mapLayersApi-CBLcbADa.js";
8
- import { i as v, n as ee } from "./geometry-DyhIVRcw.js";
9
- import { t as y } from "./work_types-Hwme-FEX.js";
10
- import { t as b } from "./MapLayerMenu-AUeTqgEp.js";
11
- import { t as x } from "./FormFilePicker-DxPQlxgy.js";
12
- import { i as te, r as S, s as C } from "./applications-D6pHAQaK.js";
13
- import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as A, createVNode as j, defineComponent as M, nextTick as N, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as ne, onUnmounted as re, openBlock as L, ref as R, renderList as ie, shallowRef as ae, toDisplayString as z, vModelText as B, watch as V, withCtx as H, withDirectives as U, withModifiers as W } from "vue";
14
- import { RouterLink as G, useRouter as oe } from "vue-router";
7
+ import { t as u } from "./work_types-Hwme-FEX.js";
8
+ import { a as d, d as f, i as p, l as m, r as h, s as g, t as _, u as v } from "./mapLayersApi-CBLcbADa.js";
9
+ import { i as y, n as b } from "./geometry-DyhIVRcw.js";
10
+ import { t as x } from "./MapLayerMenu-CI5cbLEC.js";
11
+ import { t as S } from "./FormFilePicker-D5fAUE0Z.js";
12
+ import { i as ee, r as C, s as w } from "./applications-D6pHAQaK.js";
13
+ import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as j, createVNode as M, defineComponent as N, nextTick as P, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as L, onMounted as te, onUnmounted as ne, openBlock as R, ref as z, renderList as re, shallowRef as ie, toDisplayString as B, vModelText as V, watch as H, withCtx as U, withDirectives as W, withModifiers as G } from "vue";
14
+ import { RouterLink as K, useRouter as ae } from "vue-router";
15
15
  //#region cabinet/src/pages/requests/components/FormSearchSelect.vue?vue&type=script&setup=true&lang.ts
16
- var K = /*@__PURE__*/ M({
16
+ var q = /*@__PURE__*/ N({
17
17
  __name: "FormSearchSelect",
18
18
  props: {
19
19
  label: {
@@ -52,7 +52,7 @@ var K = /*@__PURE__*/ M({
52
52
  emits: ["update:modelValue"],
53
53
  setup(e, { expose: t, emit: n }) {
54
54
  t();
55
- let r = e, i = n, s = R(!1), c = R(""), l = R(null), u = R(null), d = R(null), f = R(null), p = T(() => r.options.filter((e) => e.toLowerCase().includes(c.value.trim().toLowerCase()))), m = T(() => f.value ? r.openAbove ? {
55
+ let r = e, i = n, s = z(!1), c = z(""), l = z(null), u = z(null), d = z(null), f = z(null), p = E(() => r.options.filter((e) => e.toLowerCase().includes(c.value.trim().toLowerCase()))), m = E(() => f.value ? r.openAbove ? {
56
56
  left: `${f.value.left}px`,
57
57
  width: `${f.value.width}px`,
58
58
  bottom: `${window.innerHeight - f.value.top + 4}px`
@@ -73,19 +73,19 @@ var K = /*@__PURE__*/ M({
73
73
  function v() {
74
74
  r.disabled || (s.value = !s.value);
75
75
  }
76
- function ee(e) {
76
+ function y(e) {
77
77
  i("update:modelValue", e), s.value = !1;
78
78
  }
79
- function y(e) {
79
+ function b(e) {
80
80
  let t = e.target;
81
81
  l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
82
82
  }
83
- V(s, async (e) => {
84
- _(), e && (c.value = "", h(), g(), await N(), d.value?.focus());
85
- }), ne(() => document.addEventListener("mousedown", y)), I(() => {
86
- document.removeEventListener("mousedown", y), _();
83
+ H(s, async (e) => {
84
+ _(), e && (c.value = "", h(), g(), await P(), d.value?.focus());
85
+ }), te(() => document.addEventListener("mousedown", b)), L(() => {
86
+ document.removeEventListener("mousedown", b), _();
87
87
  });
88
- let b = {
88
+ let x = {
89
89
  props: r,
90
90
  emit: i,
91
91
  open: s,
@@ -100,61 +100,61 @@ var K = /*@__PURE__*/ M({
100
100
  bindPositionListeners: g,
101
101
  unbindPositionListeners: _,
102
102
  toggle: v,
103
- select: ee,
104
- onDocumentClick: y,
103
+ select: y,
104
+ onDocumentClick: b,
105
105
  AppIcon: a,
106
106
  SurveyorTeleport: o
107
107
  };
108
- return Object.defineProperty(b, "__isScriptSetup", {
108
+ return Object.defineProperty(x, "__isScriptSetup", {
109
109
  enumerable: !1,
110
110
  value: !0
111
- }), b;
111
+ }), x;
112
112
  }
113
- }), se = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, ce = {
113
+ }), oe = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, se = {
114
114
  key: 0,
115
115
  class: "text-red-400"
116
- }, le = {
116
+ }, ce = {
117
117
  ref: "rootRef",
118
118
  class: "relative"
119
- }, ue = ["disabled"], de = { class: "border-b border-gray-100 p-2" }, q = { class: "relative" }, fe = { class: "max-h-48 overflow-y-auto" }, pe = {
119
+ }, le = ["disabled"], ue = { class: "border-b border-gray-100 p-2" }, J = { class: "relative" }, de = { class: "max-h-48 overflow-y-auto" }, fe = {
120
120
  key: 0,
121
121
  class: "px-3 py-3 text-center text-xs text-gray-400"
122
- }, me = ["onClick"];
123
- function J(e, t, n, r, i, a) {
124
- return L(), O("div", null, [k("label", se, [A(z(n.label) + " ", 1), n.required ? (L(), O("span", ce, "*")) : D("", !0)]), k("div", le, [k("button", {
122
+ }, pe = ["onClick"];
123
+ function Y(e, t, n, r, i, a) {
124
+ return R(), k("div", null, [A("label", oe, [j(B(n.label) + " ", 1), n.required ? (R(), k("span", se, "*")) : O("", !0)]), A("div", ce, [A("button", {
125
125
  type: "button",
126
126
  disabled: n.disabled,
127
- class: P(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
127
+ class: F(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
128
128
  onClick: r.toggle
129
- }, [k("span", { class: P(n.modelValue ? "text-gray-900" : "text-gray-400") }, z(n.modelValue || n.placeholder), 3), j(r.AppIcon, {
129
+ }, [A("span", { class: F(n.modelValue ? "text-gray-900" : "text-gray-400") }, B(n.modelValue || n.placeholder), 3), M(r.AppIcon, {
130
130
  name: "chevron-down",
131
- class: P(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
132
- }, null, 8, ["class"])], 10, ue), j(r.SurveyorTeleport, null, {
133
- default: H(() => [r.open ? (L(), O("div", {
131
+ class: F(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
132
+ }, null, 8, ["class"])], 10, le), M(r.SurveyorTeleport, null, {
133
+ default: U(() => [r.open ? (R(), k("div", {
134
134
  key: 0,
135
135
  ref: "panelRef",
136
136
  class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
137
- style: F(r.dropdownStyle),
138
- onMousedown: t[1] ||= W(() => {}, ["stop"])
139
- }, [k("div", de, [k("div", q, [j(r.AppIcon, {
137
+ style: I(r.dropdownStyle),
138
+ onMousedown: t[1] ||= G(() => {}, ["stop"])
139
+ }, [A("div", ue, [A("div", J, [M(r.AppIcon, {
140
140
  name: "search",
141
141
  class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
142
- }), U(k("input", {
142
+ }), W(A("input", {
143
143
  ref: "inputRef",
144
144
  "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
145
145
  type: "text",
146
146
  placeholder: "Пошук...",
147
147
  class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
148
- }, null, 512), [[B, r.query]])])]), k("div", fe, [r.filtered.length === 0 ? (L(), O("p", pe, "Нічого не знайдено")) : D("", !0), (L(!0), O(w, null, ie(r.filtered, (e) => (L(), O("button", {
148
+ }, null, 512), [[V, r.query]])])]), A("div", de, [r.filtered.length === 0 ? (R(), k("p", fe, "Нічого не знайдено")) : O("", !0), (R(!0), k(T, null, re(r.filtered, (e) => (R(), k("button", {
149
149
  key: e,
150
150
  type: "button",
151
- class: P(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
151
+ class: F(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
152
152
  onClick: (t) => r.select(e)
153
- }, z(e), 11, me))), 128))])], 36)) : D("", !0)]),
153
+ }, B(e), 11, pe))), 128))])], 36)) : O("", !0)]),
154
154
  _: 1
155
155
  })], 512)]);
156
156
  }
157
- var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSearchSelect.vue"]]), ge = /*@__PURE__*/ M({
157
+ var me = /*#__PURE__*/ e(q, [["render", Y], ["__file", "D:/softpro/surveyor/cabinet/src/pages/requests/components/FormSearchSelect.vue"]]), he = /*@__PURE__*/ N({
158
158
  __name: "FormSuggestSelect",
159
159
  props: {
160
160
  label: {
@@ -202,10 +202,10 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
202
202
  ],
203
203
  setup(e, { expose: t, emit: n }) {
204
204
  t();
205
- let r = e, i = n, s = R(!1), c = R(""), l = R(null), u = R(null), d = R(null), f = R(null), p = T(() => {
205
+ let r = e, i = n, s = z(!1), c = z(""), l = z(null), u = z(null), d = z(null), f = z(null), p = E(() => {
206
206
  let e = c.value.trim().toLowerCase();
207
207
  return e ? r.options.filter((t) => t.text.toLowerCase().includes(e)) : r.options;
208
- }), m = T(() => f.value ? {
208
+ }), m = E(() => f.value ? {
209
209
  left: `${f.value.left}px`,
210
210
  width: `${f.value.width}px`,
211
211
  top: `${f.value.bottom + 4}px`
@@ -222,22 +222,22 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
222
222
  function v() {
223
223
  r.disabled || (s.value = !s.value);
224
224
  }
225
- function ee(e) {
225
+ function y(e) {
226
226
  i("update:modelValue", e.id), i("update:displayValue", e.text), i("select", e), s.value = !1;
227
227
  }
228
- function y(e) {
228
+ function b(e) {
229
229
  let t = e.target;
230
230
  l.value?.contains(t) || u.value?.contains(t) || (s.value = !1);
231
231
  }
232
- let b;
233
- V(c, (e) => {
234
- s.value && (clearTimeout(b), b = setTimeout(() => i("search", e.trim()), 280));
235
- }), V(s, async (e) => {
236
- _(), e && (c.value = "", h(), g(), i("search", ""), await N(), d.value?.focus());
237
- }), ne(() => document.addEventListener("mousedown", y)), I(() => {
238
- document.removeEventListener("mousedown", y), _(), clearTimeout(b);
232
+ let x;
233
+ H(c, (e) => {
234
+ s.value && (clearTimeout(x), x = setTimeout(() => i("search", e.trim()), 280));
235
+ }), H(s, async (e) => {
236
+ _(), e && (c.value = "", h(), g(), i("search", ""), await P(), d.value?.focus());
237
+ }), te(() => document.addEventListener("mousedown", b)), L(() => {
238
+ document.removeEventListener("mousedown", b), _(), clearTimeout(x);
239
239
  });
240
- let x = {
240
+ let S = {
241
241
  props: r,
242
242
  emit: i,
243
243
  open: s,
@@ -252,70 +252,70 @@ var he = /*#__PURE__*/ e(K, [["render", J], ["__file", "C:/softpro/surveyor/cabi
252
252
  bindPositionListeners: g,
253
253
  unbindPositionListeners: _,
254
254
  toggle: v,
255
- select: ee,
256
- onDocumentClick: y,
255
+ select: y,
256
+ onDocumentClick: b,
257
257
  get searchTimer() {
258
- return b;
258
+ return x;
259
259
  },
260
260
  set searchTimer(e) {
261
- b = e;
261
+ x = e;
262
262
  },
263
263
  AppIcon: a,
264
264
  SurveyorTeleport: o
265
265
  };
266
- return Object.defineProperty(x, "__isScriptSetup", {
266
+ return Object.defineProperty(S, "__isScriptSetup", {
267
267
  enumerable: !1,
268
268
  value: !0
269
- }), x;
269
+ }), S;
270
270
  }
271
- }), _e = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, ve = {
271
+ }), ge = { class: "mb-1.5 block text-xs font-medium text-gray-700" }, _e = {
272
272
  key: 0,
273
273
  class: "text-red-400"
274
- }, ye = {
274
+ }, ve = {
275
275
  ref: "rootRef",
276
276
  class: "relative"
277
- }, be = ["disabled"], Y = { class: "border-b border-gray-100 p-2" }, xe = { class: "relative" }, Se = { class: "max-h-48 overflow-y-auto" }, Ce = {
277
+ }, ye = ["disabled"], X = { class: "border-b border-gray-100 p-2" }, be = { class: "relative" }, xe = { class: "max-h-48 overflow-y-auto" }, Se = {
278
278
  key: 0,
279
279
  class: "px-3 py-3 text-center text-xs text-gray-400"
280
- }, X = {
280
+ }, Ce = {
281
281
  key: 1,
282
282
  class: "px-3 py-3 text-center text-xs text-gray-400"
283
283
  }, we = ["onClick"];
284
284
  function Te(e, t, n, r, i, a) {
285
- return L(), O("div", null, [k("label", _e, [A(z(n.label) + " ", 1), n.required ? (L(), O("span", ve, "*")) : D("", !0)]), k("div", ye, [k("button", {
285
+ return R(), k("div", null, [A("label", ge, [j(B(n.label) + " ", 1), n.required ? (R(), k("span", _e, "*")) : O("", !0)]), A("div", ve, [A("button", {
286
286
  type: "button",
287
287
  disabled: n.disabled,
288
- class: P(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
288
+ class: F(["flex w-full items-center justify-between rounded-xl border px-3.5 py-2.5 text-left text-sm transition-all", n.disabled ? "cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400" : r.open ? "border-[#2663EB] bg-white text-gray-900 ring-2 ring-[#2663EB]/15" : "border-gray-200 bg-white text-gray-900 hover:border-gray-300"]),
289
289
  onClick: r.toggle
290
- }, [k("span", { class: P(n.displayValue ? "text-gray-900" : "text-gray-400") }, z(n.displayValue || n.placeholder), 3), j(r.AppIcon, {
290
+ }, [A("span", { class: F(n.displayValue ? "text-gray-900" : "text-gray-400") }, B(n.displayValue || n.placeholder), 3), M(r.AppIcon, {
291
291
  name: "chevron-down",
292
- class: P(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
293
- }, null, 8, ["class"])], 10, be), j(r.SurveyorTeleport, null, {
294
- default: H(() => [r.open ? (L(), O("div", {
292
+ class: F(["h-[15px] w-[15px] shrink-0 text-gray-400 transition-transform", r.open ? "rotate-180" : ""])
293
+ }, null, 8, ["class"])], 10, ye), M(r.SurveyorTeleport, null, {
294
+ default: U(() => [r.open ? (R(), k("div", {
295
295
  key: 0,
296
296
  ref: "panelRef",
297
297
  class: "fixed z-[100] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",
298
- style: F(r.dropdownStyle),
299
- onMousedown: t[1] ||= W(() => {}, ["stop"])
300
- }, [k("div", Y, [k("div", xe, [j(r.AppIcon, {
298
+ style: I(r.dropdownStyle),
299
+ onMousedown: t[1] ||= G(() => {}, ["stop"])
300
+ }, [A("div", X, [A("div", be, [M(r.AppIcon, {
301
301
  name: "search",
302
302
  class: "absolute left-2.5 top-1/2 h-[13px] w-[13px] -translate-y-1/2 text-gray-400"
303
- }), U(k("input", {
303
+ }), W(A("input", {
304
304
  ref: "inputRef",
305
305
  "onUpdate:modelValue": t[0] ||= (e) => r.query = e,
306
306
  type: "text",
307
307
  placeholder: "Пошук...",
308
308
  class: "w-full rounded-lg border border-gray-200 py-1.5 pl-8 pr-3 text-xs outline-none focus:border-[#2663EB]"
309
- }, null, 512), [[B, r.query]])])]), k("div", Se, [n.loading && r.filtered.length === 0 ? (L(), O("p", Ce, "Завантаження…")) : r.filtered.length === 0 ? (L(), O("p", X, "Нічого не знайдено")) : D("", !0), (L(!0), O(w, null, ie(r.filtered, (e) => (L(), O("button", {
309
+ }, null, 512), [[V, r.query]])])]), A("div", xe, [n.loading && r.filtered.length === 0 ? (R(), k("p", Se, "Завантаження…")) : r.filtered.length === 0 ? (R(), k("p", Ce, "Нічого не знайдено")) : O("", !0), (R(!0), k(T, null, re(r.filtered, (e) => (R(), k("button", {
310
310
  key: e.id,
311
311
  type: "button",
312
- class: P(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e.id ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
312
+ class: F(["w-full px-3.5 py-2.5 text-left text-sm transition-colors hover:bg-gray-50", n.modelValue === e.id ? "bg-[#EFF4FE] font-medium text-[#2663EB]" : "text-gray-700"]),
313
313
  onClick: (t) => r.select(e)
314
- }, z(e.text), 11, we))), 128))])], 36)) : D("", !0)]),
314
+ }, B(e.text), 11, we))), 128))])], 36)) : O("", !0)]),
315
315
  _: 1
316
316
  })], 512)]);
317
317
  }
318
- var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/FormSuggestSelect.vue"]]), Z = "draft-polygon", De = "draft-polygon-fill", Oe = "draft-polygon-line", Q = "draft-vertices", ke = "draft-vertices-layer", $ = "draft-vertices-hit", Ae = 12, je = 17, Me = 13, Ne = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>", Pe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 20h9\"/><path d=\"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z\"/></svg>", Fe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/><path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/><path d=\"M10 11v6\"/><path d=\"M14 11v6\"/></svg>", Ie = /*@__PURE__*/ M({
318
+ var Ee = /*#__PURE__*/ e(he, [["render", Te], ["__file", "D:/softpro/surveyor/cabinet/src/pages/requests/components/FormSuggestSelect.vue"]]), Z = "draft-polygon", De = "draft-polygon-fill", Oe = "draft-polygon-line", Q = "draft-vertices", ke = "draft-vertices-layer", $ = "draft-vertices-hit", Ae = 12, je = 17, Me = 13, Ne = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>", Pe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 20h9\"/><path d=\"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z\"/></svg>", Fe = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\"/><path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/><path d=\"M10 11v6\"/><path d=\"M14 11v6\"/></svg>", Ie = /*@__PURE__*/ N({
319
319
  __name: "ApplicationCreateMap",
320
320
  props: {
321
321
  points: {
@@ -338,22 +338,22 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
338
338
  ],
339
339
  setup(e, { expose: t, emit: n }) {
340
340
  t();
341
- let r = e, i = n, a = [24.0297, 49.8397], o = R(null), y = ae(null), x = ae(null), te = R(""), S = R(!1), C = null, w = R(c), E = R([]), D = R(s), O = R([]), k = null, A = null, j = !1, M = !1, N = !1, P = !1, F = null, I = null, L = !1, ie = T(() => S.value ? "Перетягніть вершину. Клік по лінії додає точку, права кнопка на вершині видаляє її" : r.geometry ? "Геометрію імпортовано. Олівець — редагувати, кошик — видалити, клік — намалювати наново" : r.points.length > 0 ? "Клік додає точку. Олівець — редагувати контур, кошик — видалити" : "Клікніть на карті, щоб окреслити контур (мінімум 3 точки)");
342
- function z() {
341
+ let r = e, i = n, a = [24.0297, 49.8397], o = z(null), u = ie(null), S = ie(null), ee = z(""), C = z(!1), w = null, T = z(c), D = z([]), O = z(s), k = z([]), A = null, j = null, M = !1, N = !1, P = !1, F = !1, I = null, L = null, R = !1, re = E(() => C.value ? "Перетягніть вершину. Клік по лінії додає точку, права кнопка на вершині видаляє її" : r.geometry ? "Геометрію імпортовано. Олівець — редагувати, кошик — видалити, клік — намалювати наново" : r.points.length > 0 ? "Клік додає точку. Олівець — редагувати контур, кошик — видалити" : "Клікніть на карті, щоб окреслити контур (мінімум 3 точки)");
342
+ function B() {
343
343
  return !!r.geometry || r.points.length > 0;
344
344
  }
345
- function B(e) {
346
- return w.value.find((t) => t.id === e) ?? w.value[0] ?? c[0];
347
- }
348
- async function H() {
349
- let e = await g("application-form");
350
- w.value = e.baseLayers, D.value = e.defaultBaseId, E.value = e.overlays.filter((e) => e.kind !== "applications"), O.value = E.value.filter((e) => e.defaultVisible).map((e) => e.id);
345
+ function V(e) {
346
+ return T.value.find((t) => t.id === e) ?? T.value[0] ?? c[0];
351
347
  }
352
- function U(e) {
353
- let t = O.value;
354
- O.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
348
+ async function U() {
349
+ let e = await _("application-form");
350
+ T.value = e.baseLayers, O.value = e.defaultBaseId, D.value = e.overlays.filter((e) => e.kind !== "applications"), k.value = D.value.filter((e) => e.defaultVisible).map((e) => e.id);
355
351
  }
356
352
  function W(e) {
353
+ let t = k.value;
354
+ k.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
355
+ }
356
+ function G(e) {
357
357
  let t = [];
358
358
  for (let n of e) {
359
359
  if (!Array.isArray(n) || n.length < 2) continue;
@@ -366,33 +366,33 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
366
366
  }
367
367
  return t;
368
368
  }
369
- function G() {
370
- return A || (r.geometry ? W(r.geometry.coordinates[0] ?? []) : r.points);
369
+ function K() {
370
+ return j || (r.geometry ? G(r.geometry.coordinates[0] ?? []) : r.points);
371
371
  }
372
- function oe(e) {
372
+ function ae(e) {
373
373
  let t = e.map(([e, t]) => [e, t]);
374
374
  if (t.length === 0) return t;
375
375
  let [n, r] = t[0], [i, a] = t[t.length - 1];
376
376
  return (n !== i || r !== a) && t.push([n, r]), t;
377
377
  }
378
- function K(e) {
378
+ function q(e) {
379
379
  let t = r.geometry;
380
380
  if (t && e.length >= 3) {
381
- N = !0, i("update:geometry", {
381
+ P = !0, i("update:geometry", {
382
382
  type: "Polygon",
383
- coordinates: [oe(e), ...t.coordinates.slice(1)]
383
+ coordinates: [ae(e), ...t.coordinates.slice(1)]
384
384
  });
385
385
  return;
386
386
  }
387
387
  t && i("update:geometry", null), i("update:points", e);
388
388
  }
389
- function se() {
390
- S.value = !1, i("update:points", []), r.geometry && i("update:geometry", null);
389
+ function oe() {
390
+ C.value = !1, i("update:points", []), r.geometry && i("update:geometry", null);
391
391
  }
392
- function ce() {
393
- z() && (S.value = !S.value);
392
+ function se() {
393
+ B() && (C.value = !C.value);
394
394
  }
395
- function le(e, t) {
395
+ function ce(e, t) {
396
396
  let n = [];
397
397
  return e.length >= 2 && n.push({
398
398
  type: "Feature",
@@ -405,17 +405,17 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
405
405
  type: "Feature",
406
406
  geometry: {
407
407
  type: "Polygon",
408
- coordinates: [oe(e), ...t]
408
+ coordinates: [ae(e), ...t]
409
409
  },
410
410
  properties: {}
411
411
  }), n;
412
412
  }
413
- function ue() {
414
- if (A) {
413
+ function le() {
414
+ if (j) {
415
415
  let e = r.geometry?.coordinates.slice(1) ?? [];
416
416
  return {
417
417
  type: "FeatureCollection",
418
- features: le(A, e)
418
+ features: ce(j, e)
419
419
  };
420
420
  }
421
421
  return r.geometry ? {
@@ -427,13 +427,13 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
427
427
  }]
428
428
  } : {
429
429
  type: "FeatureCollection",
430
- features: le(r.points, [])
430
+ features: ce(r.points, [])
431
431
  };
432
432
  }
433
- function de() {
433
+ function ue() {
434
434
  return {
435
435
  type: "FeatureCollection",
436
- features: (!S.value && r.geometry ? [] : G()).map(([e, t], n) => ({
436
+ features: (!C.value && r.geometry ? [] : K()).map(([e, t], n) => ({
437
437
  type: "Feature",
438
438
  geometry: {
439
439
  type: "Point",
@@ -443,53 +443,53 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
443
443
  }))
444
444
  };
445
445
  }
446
- function q(e) {
447
- e.getSource(Z)?.setData(ue()), e.getSource(Q)?.setData(de());
446
+ function J(e) {
447
+ e.getSource(Z)?.setData(le()), e.getSource(Q)?.setData(ue());
448
448
  }
449
- function fe(e) {
449
+ function de(e) {
450
450
  let t = e.features?.[0]?.properties?.index, n = typeof t == "number" ? t : Number(t);
451
451
  return Number.isInteger(n) && n >= 0 ? n : null;
452
452
  }
453
- function pe(e) {
454
- if (!S.value) return;
453
+ function fe(e) {
454
+ if (!C.value) return;
455
455
  let t = e.originalEvent;
456
456
  if (t && "button" in t && t.button !== 0) return;
457
- let n = fe(e), r = y.value, i = G();
458
- n == null || !r || n >= i.length || (e.preventDefault(), k = n, j = !1, A = i.map(([e, t]) => [e, t]), M = !0, r.dragPan.disable(), r.getCanvas().style.cursor = "grabbing", window.addEventListener("mouseup", J));
457
+ let n = de(e), r = u.value, i = K();
458
+ n == null || !r || n >= i.length || (e.preventDefault(), A = n, M = !1, j = i.map(([e, t]) => [e, t]), N = !0, r.dragPan.disable(), r.getCanvas().style.cursor = "grabbing", window.addEventListener("mouseup", Y));
459
459
  }
460
- function me(e) {
461
- if (k == null || !A) return;
462
- let { lng: t, lat: n } = e.lngLat, r = A[k];
460
+ function pe(e) {
461
+ if (A == null || !j) return;
462
+ let { lng: t, lat: n } = e.lngLat, r = j[A];
463
463
  if (r[0] === t && r[1] === n) return;
464
- j = !0, A[k] = [t, n];
465
- let i = y.value;
466
- i && q(i);
464
+ M = !0, j[A] = [t, n];
465
+ let i = u.value;
466
+ i && J(i);
467
467
  }
468
- function J() {
469
- if (window.removeEventListener("mouseup", J), k == null || L) {
470
- k = null, A = null, j = !1;
468
+ function Y() {
469
+ if (window.removeEventListener("mouseup", Y), A == null || R) {
470
+ A = null, j = null, M = !1;
471
471
  return;
472
472
  }
473
- let e = y.value;
473
+ let e = u.value;
474
474
  e?.dragPan.enable();
475
- let t = A, n = j;
476
- k = null, A = null, j = !1, e && (e.getCanvas().style.cursor = "", n || q(e)), t && n && K(t), window.setTimeout(() => {
477
- M = !1;
475
+ let t = j, n = M;
476
+ A = null, j = null, M = !1, e && (e.getCanvas().style.cursor = "", n || J(e)), t && n && q(t), window.setTimeout(() => {
477
+ N = !1;
478
478
  }, 0);
479
479
  }
480
- function he(e) {
481
- if (!S.value) return;
480
+ function me(e) {
481
+ if (!C.value) return;
482
482
  e.preventDefault();
483
- let t = fe(e);
484
- t != null && K(G().filter((e, n) => n !== t));
483
+ let t = de(e);
484
+ t != null && q(K().filter((e, n) => n !== t));
485
485
  }
486
- function ge(e, t, n) {
486
+ function he(e, t, n) {
487
487
  let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
488
488
  if (a === 0) return Math.hypot(e.x - t.x, e.y - t.y);
489
489
  let o = Math.max(0, Math.min(1, ((e.x - t.x) * r + (e.y - t.y) * i) / a));
490
490
  return Math.hypot(e.x - (t.x + o * r), e.y - (t.y + o * i));
491
491
  }
492
- function _e(e, t, n, r) {
492
+ function ge(e, t, n, r) {
493
493
  let i = e.project([n, r]);
494
494
  for (let n of t) {
495
495
  let t = e.project(n);
@@ -497,27 +497,27 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
497
497
  }
498
498
  let a = Ae, o = -1, s = t.length >= 3 ? t.length : t.length - 1;
499
499
  for (let n = 0; n < s; n += 1) {
500
- let r = ge(i, e.project(t[n]), e.project(t[(n + 1) % t.length]));
500
+ let r = he(i, e.project(t[n]), e.project(t[(n + 1) % t.length]));
501
501
  r <= a && (a = r, o = n);
502
502
  }
503
503
  if (o < 0) return null;
504
504
  let c = t.map(([e, t]) => [e, t]);
505
505
  return c.splice(o + 1, 0, [n, r]), c;
506
506
  }
507
- function ve(e) {
508
- P || (P = !0, e.on("mousedown", $, (e) => pe(e)), e.on("contextmenu", $, (e) => he(e)), e.on("mousemove", (e) => me(e)), e.on("mouseenter", $, () => {
509
- let e = y.value;
510
- e && S.value && k == null && (e.getCanvas().style.cursor = "grab");
507
+ function _e(e) {
508
+ F || (F = !0, e.on("mousedown", $, (e) => fe(e)), e.on("contextmenu", $, (e) => me(e)), e.on("mousemove", (e) => pe(e)), e.on("mouseenter", $, () => {
509
+ let e = u.value;
510
+ e && C.value && A == null && (e.getCanvas().style.cursor = "grab");
511
511
  }), e.on("mouseleave", $, () => {
512
- if (k != null) return;
513
- let e = y.value;
512
+ if (A != null) return;
513
+ let e = u.value;
514
514
  e && (e.getCanvas().style.cursor = "");
515
515
  }));
516
516
  }
517
- function ye(e) {
517
+ function ve(e) {
518
518
  e.getSource(Z) || (e.addSource(Z, {
519
519
  type: "geojson",
520
- data: ue()
520
+ data: le()
521
521
  }), e.addLayer({
522
522
  id: De,
523
523
  type: "fill",
@@ -541,16 +541,16 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
541
541
  }
542
542
  })), e.getSource(Q) || (e.addSource(Q, {
543
543
  type: "geojson",
544
- data: de()
544
+ data: ue()
545
545
  }), e.addLayer({
546
546
  id: ke,
547
547
  type: "circle",
548
548
  source: Q,
549
549
  paint: {
550
- "circle-radius": S.value ? 7 : 5,
550
+ "circle-radius": C.value ? 7 : 5,
551
551
  "circle-color": "#ffffff",
552
552
  "circle-stroke-color": "#2663EB",
553
- "circle-stroke-width": S.value ? 3 : 2
553
+ "circle-stroke-width": C.value ? 3 : 2
554
554
  }
555
555
  }), e.addLayer({
556
556
  id: $,
@@ -561,30 +561,30 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
561
561
  "circle-color": "#000000",
562
562
  "circle-opacity": 0
563
563
  }
564
- })), ve(e), q(e);
564
+ })), _e(e), J(e);
565
565
  }
566
- function be(e) {
567
- if (M) {
568
- M = !1;
566
+ function ye(e) {
567
+ if (N) {
568
+ N = !1;
569
569
  return;
570
570
  }
571
- if (S.value) {
572
- let t = y.value, n = G();
571
+ if (C.value) {
572
+ let t = u.value, n = K();
573
573
  if (!t || n.length < 2) return;
574
- let r = _e(t, n, e.lngLat.lng, e.lngLat.lat);
575
- r && K(r);
574
+ let r = ge(t, n, e.lngLat.lng, e.lngLat.lat);
575
+ r && q(r);
576
576
  return;
577
577
  }
578
578
  let t = [e.lngLat.lng, e.lngLat.lat];
579
579
  i("update:points", r.geometry ? [t] : [...r.points, t]);
580
580
  }
581
- function Y(e, t, n) {
581
+ function X(e, t, n) {
582
582
  let r = document.createElement("button");
583
583
  return r.type = "button", r.title = e, r.setAttribute("aria-label", e), r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "center", r.style.color = "#334155", r.innerHTML = t, r.addEventListener("click", (e) => {
584
584
  e.preventDefault(), e.stopPropagation(), !r.disabled && n();
585
585
  }), r;
586
586
  }
587
- function xe(e) {
587
+ function be(e) {
588
588
  let t = document.createElement("div");
589
589
  t.className = "maplibregl-ctrl maplibregl-ctrl-group";
590
590
  for (let n of e) t.appendChild(n);
@@ -597,7 +597,7 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
597
597
  }
598
598
  };
599
599
  }
600
- function Se(e) {
600
+ function xe(e) {
601
601
  e.flyTo({
602
602
  center: a,
603
603
  zoom: Me,
@@ -607,28 +607,28 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
607
607
  essential: !0
608
608
  });
609
609
  }
610
- function Ce(e) {
610
+ function Se(e) {
611
611
  let t = o.value?.querySelector(".maplibregl-ctrl-compass");
612
612
  if (!t) return;
613
613
  let n = "Повернути початковий вигляд";
614
614
  t.title = n, t.setAttribute("aria-label", n), t.addEventListener("click", (t) => {
615
- t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), Se(e);
615
+ t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), xe(e);
616
616
  }, !0);
617
617
  }
618
- function X() {
619
- let e = z();
620
- if (F) {
621
- let t = e && S.value;
622
- F.disabled = !e, F.style.opacity = e ? "1" : "0.4", F.style.backgroundColor = t ? "#2663EB" : "", F.style.color = t ? "#ffffff" : "#334155";
618
+ function Ce() {
619
+ let e = B();
620
+ if (I) {
621
+ let t = e && C.value;
622
+ I.disabled = !e, I.style.opacity = e ? "1" : "0.4", I.style.backgroundColor = t ? "#2663EB" : "", I.style.color = t ? "#ffffff" : "#334155";
623
623
  let n = t ? "Завершити редагування" : "Редагувати контур";
624
- F.title = n, F.setAttribute("aria-label", n), F.setAttribute("aria-pressed", t ? "true" : "false");
624
+ I.title = n, I.setAttribute("aria-label", n), I.setAttribute("aria-pressed", t ? "true" : "false");
625
625
  }
626
- I && (I.disabled = !e, I.style.opacity = e ? "1" : "0.4");
626
+ L && (L.disabled = !e, L.style.opacity = e ? "1" : "0.4");
627
627
  }
628
628
  function we(e) {
629
- let t = v(r.geometry);
629
+ let t = y(r.geometry);
630
630
  if (!t) return !1;
631
- let [[n, i], [a, o]] = ee(t);
631
+ let [[n, i], [a, o]] = b(t);
632
632
  if (![
633
633
  n,
634
634
  i,
@@ -652,12 +652,12 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
652
652
  }), !0);
653
653
  }
654
654
  function Te(e) {
655
- if (!L && y.value === e && r.geometry) {
655
+ if (!R && u.value === e && r.geometry) {
656
656
  if (!e.getSource(Z)) {
657
657
  e.once("load", () => Te(e));
658
658
  return;
659
659
  }
660
- q(e), we(e) || requestAnimationFrame(() => we(e));
660
+ J(e), we(e) || requestAnimationFrame(() => we(e));
661
661
  }
662
662
  }
663
663
  function Ee() {
@@ -666,11 +666,11 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
666
666
  }
667
667
  function Ie(e) {
668
668
  let t = r.addressPoint;
669
- if (!t || !C) {
670
- x.value?.remove(), x.value = null;
669
+ if (!t || !w) {
670
+ S.value?.remove(), S.value = null;
671
671
  return;
672
672
  }
673
- x.value ? x.value.setLngLat(t) : x.value = new C.Marker({
673
+ S.value ? S.value.setLngLat(t) : S.value = new w.Marker({
674
674
  element: Ee(),
675
675
  anchor: "bottom"
676
676
  }).setLngLat(t).addTo(e), e.flyTo({
@@ -679,54 +679,54 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
679
679
  essential: !0
680
680
  });
681
681
  }
682
- ne(async () => {
682
+ te(async () => {
683
683
  let e;
684
684
  try {
685
- let [t] = await Promise.all([d(), H()]);
685
+ let [t] = await Promise.all([f(), U()]);
686
686
  e = t;
687
687
  } catch (e) {
688
- console.error(e), te.value = p;
688
+ console.error(e), ee.value = m;
689
689
  return;
690
690
  }
691
- if (L || !o.value) return;
692
- C = e;
691
+ if (R || !o.value) return;
692
+ w = e;
693
693
  let t = new e.Map({
694
694
  container: o.value,
695
- style: l(B(D.value)),
695
+ style: l(V(O.value)),
696
696
  center: a,
697
697
  zoom: Me,
698
698
  attributionControl: !1,
699
- locale: _
699
+ locale: v
700
700
  });
701
- t.addControl(new e.NavigationControl({ showCompass: !0 }), "top-left"), Ce(t), t.addControl(xe([Y("Імпортувати геометрію", Ne, () => i("import"))]), "top-left"), F = Y("Редагувати контур", Pe, ce), I = Y("Видалити контур", Fe, se), t.addControl(xe([F, I]), "top-left"), X(), t.on("load", () => {
702
- ye(t), h(t, E.value, O.value, De), Ie(t);
703
- }), t.on("click", (e) => be(e)), y.value = t;
704
- }), re(() => {
705
- L = !0, window.removeEventListener("mouseup", J), x.value?.remove(), x.value = null, y.value?.remove(), y.value = null, F = null, I = null;
706
- }), V(() => [r.points, r.geometry], () => {
707
- S.value && !z() && (S.value = !1);
708
- let e = y.value;
709
- e?.getSource(Z) && q(e), X();
710
- }, { deep: !0 }), V(S, () => {
711
- let e = y.value;
712
- e?.getLayer(ke) && (e.setPaintProperty(ke, "circle-radius", S.value ? 7 : 5), e.setPaintProperty(ke, "circle-stroke-width", S.value ? 3 : 2), q(e)), e && (S.value ? e.doubleClickZoom.disable() : e.doubleClickZoom.enable(), S.value || (e.getCanvas().style.cursor = "")), X();
713
- }), V(() => r.geometry, () => {
714
- if (N) {
715
- N = !1;
701
+ t.addControl(new e.NavigationControl({ showCompass: !0 }), "top-left"), Se(t), t.addControl(be([X("Імпортувати геометрію", Ne, () => i("import"))]), "top-left"), I = X("Редагувати контур", Pe, se), L = X("Видалити контур", Fe, oe), t.addControl(be([I, L]), "top-left"), Ce(), t.on("load", () => {
702
+ ve(t), g(t, D.value, k.value, De), Ie(t);
703
+ }), t.on("click", (e) => ye(e)), u.value = t;
704
+ }), ne(() => {
705
+ R = !0, window.removeEventListener("mouseup", Y), S.value?.remove(), S.value = null, u.value?.remove(), u.value = null, I = null, L = null;
706
+ }), H(() => [r.points, r.geometry], () => {
707
+ C.value && !B() && (C.value = !1);
708
+ let e = u.value;
709
+ e?.getSource(Z) && J(e), Ce();
710
+ }, { deep: !0 }), H(C, () => {
711
+ let e = u.value;
712
+ e?.getLayer(ke) && (e.setPaintProperty(ke, "circle-radius", C.value ? 7 : 5), e.setPaintProperty(ke, "circle-stroke-width", C.value ? 3 : 2), J(e)), e && (C.value ? e.doubleClickZoom.disable() : e.doubleClickZoom.enable(), C.value || (e.getCanvas().style.cursor = "")), Ce();
713
+ }), H(() => r.geometry, () => {
714
+ if (P) {
715
+ P = !1;
716
716
  return;
717
717
  }
718
- let e = y.value;
718
+ let e = u.value;
719
719
  e && r.geometry && Te(e);
720
- }, { flush: "post" }), V(D, () => {
721
- let e = y.value;
720
+ }, { flush: "post" }), H(O, () => {
721
+ let e = u.value;
722
722
  if (!e) return;
723
- let t = () => u(e, B(D.value), f(e, E.value, [De]));
723
+ let t = () => d(e, V(O.value), p(e, D.value, [De]));
724
724
  e.isStyleLoaded() ? t() : e.once("load", t);
725
- }), V(O, () => {
726
- let e = y.value;
727
- e?.isStyleLoaded() && m(e, E.value, O.value);
728
- }), V(() => r.addressPoint, () => {
729
- let e = y.value;
725
+ }), H(k, () => {
726
+ let e = u.value;
727
+ e?.isStyleLoaded() && h(e, D.value, k.value);
728
+ }), H(() => r.addressPoint, () => {
729
+ let e = u.value;
730
730
  e?.isStyleLoaded() && Ie(e);
731
731
  });
732
732
  let Le = {
@@ -746,109 +746,109 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
746
746
  EDIT_ICON: Pe,
747
747
  DELETE_ICON: Fe,
748
748
  mapHost: o,
749
- mapRef: y,
750
- addressMarker: x,
751
- mapLoadError: te,
752
- editing: S,
749
+ mapRef: u,
750
+ addressMarker: S,
751
+ mapLoadError: ee,
752
+ editing: C,
753
753
  get maplibre() {
754
- return C;
754
+ return w;
755
755
  },
756
756
  set maplibre(e) {
757
- C = e;
757
+ w = e;
758
758
  },
759
- baseLayers: w,
760
- overlayLayers: E,
761
- activeBaseId: D,
762
- activeOverlayIds: O,
759
+ baseLayers: T,
760
+ overlayLayers: D,
761
+ activeBaseId: O,
762
+ activeOverlayIds: k,
763
763
  get dragIndex() {
764
- return k;
764
+ return A;
765
765
  },
766
766
  set dragIndex(e) {
767
- k = e;
767
+ A = e;
768
768
  },
769
769
  get dragPoints() {
770
- return A;
770
+ return j;
771
771
  },
772
772
  set dragPoints(e) {
773
- A = e;
773
+ j = e;
774
774
  },
775
775
  get dragMoved() {
776
- return j;
776
+ return M;
777
777
  },
778
778
  set dragMoved(e) {
779
- j = e;
779
+ M = e;
780
780
  },
781
781
  get suppressClick() {
782
- return M;
782
+ return N;
783
783
  },
784
784
  set suppressClick(e) {
785
- M = e;
785
+ N = e;
786
786
  },
787
787
  get skipGeometryFocus() {
788
- return N;
788
+ return P;
789
789
  },
790
790
  set skipGeometryFocus(e) {
791
- N = e;
791
+ P = e;
792
792
  },
793
793
  get vertexHandlersBound() {
794
- return P;
794
+ return F;
795
795
  },
796
796
  set vertexHandlersBound(e) {
797
- P = e;
797
+ F = e;
798
798
  },
799
799
  get editButton() {
800
- return F;
800
+ return I;
801
801
  },
802
802
  set editButton(e) {
803
- F = e;
803
+ I = e;
804
804
  },
805
805
  get deleteButton() {
806
- return I;
806
+ return L;
807
807
  },
808
808
  set deleteButton(e) {
809
- I = e;
809
+ L = e;
810
810
  },
811
811
  get disposed() {
812
- return L;
812
+ return R;
813
813
  },
814
814
  set disposed(e) {
815
- L = e;
815
+ R = e;
816
816
  },
817
- hint: ie,
818
- hasContour: z,
819
- baseLayer: B,
820
- loadLayerSettings: H,
821
- toggleOverlay: U,
822
- ringVertices: W,
823
- contourPoints: G,
824
- closeRing: oe,
825
- commitContour: K,
826
- clearContour: se,
827
- toggleEditing: ce,
828
- draftFeatures: le,
829
- draftGeoJson: ue,
830
- verticesGeoJson: de,
831
- refreshSources: q,
832
- vertexIndex: fe,
833
- beginVertexDrag: pe,
834
- moveVertex: me,
835
- endVertexDrag: J,
836
- onVertexContextMenu: he,
837
- pointSegmentDistance: ge,
838
- insertOnNearestSegment: _e,
839
- bindVertexHandlers: ve,
840
- ensureLayers: ye,
841
- onMapClick: be,
842
- iconButton: Y,
843
- controlGroup: xe,
844
- resetInitialView: Se,
845
- bindInitialViewButton: Ce,
846
- syncContourButtons: X,
817
+ hint: re,
818
+ hasContour: B,
819
+ baseLayer: V,
820
+ loadLayerSettings: U,
821
+ toggleOverlay: W,
822
+ ringVertices: G,
823
+ contourPoints: K,
824
+ closeRing: ae,
825
+ commitContour: q,
826
+ clearContour: oe,
827
+ toggleEditing: se,
828
+ draftFeatures: ce,
829
+ draftGeoJson: le,
830
+ verticesGeoJson: ue,
831
+ refreshSources: J,
832
+ vertexIndex: de,
833
+ beginVertexDrag: fe,
834
+ moveVertex: pe,
835
+ endVertexDrag: Y,
836
+ onVertexContextMenu: me,
837
+ pointSegmentDistance: he,
838
+ insertOnNearestSegment: ge,
839
+ bindVertexHandlers: _e,
840
+ ensureLayers: ve,
841
+ onMapClick: ye,
842
+ iconButton: X,
843
+ controlGroup: be,
844
+ resetInitialView: xe,
845
+ bindInitialViewButton: Se,
846
+ syncContourButtons: Ce,
847
847
  focusImportedGeometry: we,
848
848
  showImportedGeometry: Te,
849
849
  addressMarkerElement: Ee,
850
850
  syncAddressPoint: Ie,
851
- MapLayerMenu: b
851
+ MapLayerMenu: x
852
852
  };
853
853
  return Object.defineProperty(Le, "__isScriptSetup", {
854
854
  enumerable: !1,
@@ -863,9 +863,9 @@ var Ee = /*#__PURE__*/ e(ge, [["render", Te], ["__file", "C:/softpro/surveyor/ca
863
863
  class: "absolute inset-0 z-[20] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
864
864
  }, Be = { class: "absolute bottom-3 left-3 z-[10] max-w-[calc(100%-1.5rem)] rounded-lg border border-gray-100 bg-white/90 px-2.5 py-1.5 text-xs text-gray-500 shadow backdrop-blur-sm" };
865
865
  function Ve(e, t, n, r, i, a) {
866
- return L(), O("div", Le, [
867
- k("div", Re, null, 512),
868
- r.mapLoadError ? D("", !0) : (L(), E(r.MapLayerMenu, {
866
+ return R(), k("div", Le, [
867
+ A("div", Re, null, 512),
868
+ r.mapLoadError ? O("", !0) : (R(), D(r.MapLayerMenu, {
869
869
  key: 0,
870
870
  placement: "end",
871
871
  "base-id": r.activeBaseId,
@@ -880,16 +880,16 @@ function Ve(e, t, n, r, i, a) {
880
880
  "base-layers",
881
881
  "overlays"
882
882
  ])),
883
- r.mapLoadError ? (L(), O("p", ze, z(r.mapLoadError), 1)) : D("", !0),
884
- k("div", Be, z(r.hint), 1)
883
+ r.mapLoadError ? (R(), k("p", ze, B(r.mapLoadError), 1)) : O("", !0),
884
+ A("div", Be, B(r.hint), 1)
885
885
  ]);
886
886
  }
887
- var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Ue = /*@__PURE__*/ M({
887
+ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "D:/softpro/surveyor/cabinet/src/pages/requests/components/ApplicationCreateMap.vue"]]), Ue = /*@__PURE__*/ N({
888
888
  __name: "GeometryImportDialog",
889
889
  emits: ["close", "imported"],
890
890
  setup(e, { expose: t, emit: n }) {
891
891
  t();
892
- let r = n, i = R(null), s = R(!1), c = R("");
892
+ let r = n, i = z(null), s = z(!1), c = z("");
893
893
  function l(e) {
894
894
  i.value = e, c.value = "";
895
895
  }
@@ -897,7 +897,7 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
897
897
  if (i.value && !s.value) {
898
898
  c.value = "", s.value = !0;
899
899
  try {
900
- let e = await C(i.value);
900
+ let e = await w(i.value);
901
901
  r("imported", e);
902
902
  } catch (e) {
903
903
  c.value = e instanceof Error ? e.message : "Не вдалося імпортувати геометрію";
@@ -915,7 +915,7 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
915
915
  submit: u,
916
916
  AppIcon: a,
917
917
  SurveyorTeleport: o,
918
- FormFilePicker: x
918
+ FormFilePicker: S
919
919
  };
920
920
  return Object.defineProperty(d, "__isScriptSetup", {
921
921
  enumerable: !1,
@@ -931,49 +931,49 @@ var He = /*#__PURE__*/ e(Ie, [["render", Ve], ["__file", "C:/softpro/surveyor/ca
931
931
  class: "rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
932
932
  }, Ye = { class: "flex items-center justify-end gap-2" }, Xe = ["disabled"];
933
933
  function Ze(e, t, n, r, i, a) {
934
- return L(), E(r.SurveyorTeleport, null, {
935
- default: H(() => [k("div", {
934
+ return R(), D(r.SurveyorTeleport, null, {
935
+ default: U(() => [A("div", {
936
936
  class: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm",
937
- onMousedown: t[2] ||= W((e) => r.emit("close"), ["self"])
938
- }, [k("div", We, [k("div", Ge, [k("div", Ke, [k("div", qe, [j(r.AppIcon, {
937
+ onMousedown: t[2] ||= G((e) => r.emit("close"), ["self"])
938
+ }, [A("div", We, [A("div", Ge, [A("div", Ke, [A("div", qe, [M(r.AppIcon, {
939
939
  name: "upload",
940
940
  class: "h-[17px] w-[17px] text-[#2663EB]"
941
- })]), t[3] ||= k("div", null, [k("h2", {
941
+ })]), t[3] ||= A("div", null, [A("h2", {
942
942
  id: "geometry-import-title",
943
943
  class: "text-base font-semibold text-gray-900"
944
- }, "Імпорт геометрії"), k("p", { class: "mt-0.5 text-xs text-gray-500" }, "ZIP (Shapefile) або GeoJSON")], -1)]), k("button", {
944
+ }, "Імпорт геометрії"), A("p", { class: "mt-0.5 text-xs text-gray-500" }, "ZIP (Shapefile) або GeoJSON")], -1)]), A("button", {
945
945
  type: "button",
946
946
  class: "rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",
947
947
  "aria-label": "Закрити",
948
948
  onClick: t[0] ||= (e) => r.emit("close")
949
- }, [j(r.AppIcon, {
949
+ }, [M(r.AppIcon, {
950
950
  name: "x",
951
951
  class: "h-[17px] w-[17px]"
952
- })])]), k("form", {
952
+ })])]), A("form", {
953
953
  class: "space-y-4 px-6 py-5",
954
- onSubmit: W(r.submit, ["prevent"])
954
+ onSubmit: G(r.submit, ["prevent"])
955
955
  }, [
956
- j(r.FormFilePicker, {
956
+ M(r.FormFilePicker, {
957
957
  "file-name": r.file?.name,
958
958
  accept: ".zip,.geojson,.json,application/geo+json,application/zip",
959
959
  "button-label": "Завантажити файл",
960
960
  onChange: r.onFileChange
961
961
  }, null, 8, ["file-name"]),
962
- r.error ? (L(), O("p", Je, z(r.error), 1)) : D("", !0),
963
- k("div", Ye, [k("button", {
962
+ r.error ? (R(), k("p", Je, B(r.error), 1)) : O("", !0),
963
+ A("div", Ye, [A("button", {
964
964
  type: "button",
965
965
  class: "rounded-xl bg-gray-100 px-4 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200",
966
966
  onClick: t[1] ||= (e) => r.emit("close")
967
- }, " Скасувати "), k("button", {
967
+ }, " Скасувати "), A("button", {
968
968
  type: "submit",
969
969
  class: "rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] disabled:cursor-not-allowed disabled:opacity-40",
970
970
  disabled: !r.file || r.importing
971
- }, z(r.importing ? "Імпортування…" : "Імпортувати"), 9, Xe)])
971
+ }, B(r.importing ? "Імпортування…" : "Імпортувати"), 9, Xe)])
972
972
  ], 32)])], 32)]),
973
973
  _: 1
974
974
  });
975
975
  }
976
- var Qe = /*#__PURE__*/ e(Ue, [["render", Ze], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/components/GeometryImportDialog.vue"]]), $e = "public_applications", et = $e;
976
+ var Qe = /*#__PURE__*/ e(Ue, [["render", Ze], ["__file", "D:/softpro/surveyor/cabinet/src/pages/requests/components/GeometryImportDialog.vue"]]), $e = "public_applications", et = $e;
977
977
  async function tt(e, r, i) {
978
978
  let a = new URLSearchParams();
979
979
  if (a.set("limit", String(i?.limit ?? 20)), i?.search && a.set("search", i.search), i?.filter) for (let [e, t] of Object.entries(i.filter)) a.set(`filter[${e}]`, String(t));
@@ -983,93 +983,93 @@ async function tt(e, r, i) {
983
983
  }
984
984
  //#endregion
985
985
  //#region cabinet/src/pages/requests/create.vue?vue&type=script&setup=true&lang.ts
986
- var nt = /*@__PURE__*/ M({
986
+ var nt = /*@__PURE__*/ N({
987
987
  __name: "create",
988
988
  setup(e, { expose: t }) {
989
989
  t();
990
- let n = oe(), o = R(""), s = R(""), c = R(""), l = R(""), u = R([]), d = R([]), f = R(!1), p = R(!1), m = R(!1), h = R(""), g = R(""), _ = R(""), v = R(""), ee = R(""), b = R(""), x = R([]), C = R(null), w = R(!1), E = R(null), D = R(!1), O = R(""), k = T(() => r.value.find((e) => e.id === i.value)?.name ?? ""), A = y.items.map((e) => e.name);
991
- V(o, () => {
992
- c.value = "", l.value = "", d.value = [], E.value = null;
993
- }), V(_, (e) => {
994
- g.value = y.items.find((t) => t.name === e)?.code ?? "";
995
- }), V(x, (e) => {
996
- e.length > 0 && (C.value = null);
990
+ let n = ae(), o = z(""), s = z(""), c = z(""), l = z(""), d = z([]), f = z([]), p = z(!1), m = z(!1), h = z(!1), g = z(""), _ = z(""), v = z(""), y = z(""), b = z(""), x = z(""), S = z([]), w = z(null), T = z(!1), D = z(null), O = z(!1), k = z(""), A = E(() => r.value.find((e) => e.id === i.value)?.name ?? ""), j = u.items.map((e) => e.name);
991
+ H(o, () => {
992
+ c.value = "", l.value = "", f.value = [], D.value = null;
993
+ }), H(v, (e) => {
994
+ _.value = u.items.find((t) => t.name === e)?.code ?? "";
995
+ }), H(S, (e) => {
996
+ e.length > 0 && (w.value = null);
997
997
  });
998
- let j = T(() => {
999
- let e = !!o.value, t = m.value ? h.value.trim().length > 0 : !!c.value, n = !!C.value || x.value.length >= 3;
1000
- return !!(g.value && e && t && n);
998
+ let M = E(() => {
999
+ let e = !!o.value, t = h.value ? g.value.trim().length > 0 : !!c.value, n = !!w.value || S.value.length >= 3;
1000
+ return !!(_.value && e && t && n);
1001
1001
  });
1002
- function M(e) {
1003
- C.value = e, x.value = [], w.value = !1;
1002
+ function N(e) {
1003
+ w.value = e, S.value = [], T.value = !1;
1004
1004
  }
1005
- async function N(e) {
1006
- f.value = !0;
1005
+ async function P(e) {
1006
+ p.value = !0;
1007
1007
  try {
1008
- u.value = await tt($e, "settlement_id", {
1008
+ d.value = await tt($e, "settlement_id", {
1009
1009
  search: e,
1010
1010
  filter: { level: 5 }
1011
1011
  });
1012
1012
  } catch {
1013
- u.value = [];
1013
+ d.value = [];
1014
1014
  } finally {
1015
- f.value = !1;
1015
+ p.value = !1;
1016
1016
  }
1017
1017
  }
1018
- async function P(e) {
1018
+ async function F(e) {
1019
1019
  if (!o.value) {
1020
- d.value = [];
1020
+ f.value = [];
1021
1021
  return;
1022
1022
  }
1023
- p.value = !0;
1023
+ m.value = !0;
1024
1024
  try {
1025
- d.value = await tt(et, "address_id", {
1025
+ f.value = await tt(et, "address_id", {
1026
1026
  search: e,
1027
1027
  filter: { settlement_id: o.value }
1028
1028
  });
1029
1029
  } catch {
1030
- d.value = [];
1030
+ f.value = [];
1031
1031
  } finally {
1032
- p.value = !1;
1032
+ m.value = !1;
1033
1033
  }
1034
1034
  }
1035
- function F(e) {
1035
+ function I(e) {
1036
1036
  if (!e) return null;
1037
1037
  let t = e.coordinates, n = e.type === "Point" ? t : e.type === "MultiPoint" && Array.isArray(t) ? t[0] : null;
1038
1038
  if (!Array.isArray(n) || n.length < 2) return null;
1039
1039
  let r = Number(n[0]), i = Number(n[1]);
1040
1040
  return !Number.isFinite(r) || !Number.isFinite(i) ? null : [r, i];
1041
1041
  }
1042
- function I(e) {
1043
- E.value = F(e.geom);
1042
+ function L(e) {
1043
+ D.value = I(e.geom);
1044
1044
  }
1045
- function ne() {
1046
- m.value = !m.value, c.value = "", l.value = "", d.value = [], h.value = "", E.value = null;
1045
+ function te() {
1046
+ h.value = !h.value, c.value = "", l.value = "", f.value = [], g.value = "", D.value = null;
1047
1047
  }
1048
- async function re() {
1049
- if (O.value = "", !i.value) {
1050
- O.value = "Оберіть організацію в шапці кабінету";
1048
+ async function ne() {
1049
+ if (k.value = "", !i.value) {
1050
+ k.value = "Оберіть організацію в шапці кабінету";
1051
1051
  return;
1052
1052
  }
1053
- if (!j.value) {
1054
- O.value = "Заповніть обовʼязкові поля та окресліть територію на карті або імпортуйте геометрію";
1053
+ if (!M.value) {
1054
+ k.value = "Заповніть обовʼязкові поля та окресліть територію на карті або імпортуйте геометрію";
1055
1055
  return;
1056
1056
  }
1057
- let e = C.value ?? S(x.value);
1057
+ let e = w.value ?? C(S.value);
1058
1058
  if (!e) {
1059
- O.value = "Некоректний контур території";
1059
+ k.value = "Некоректний контур території";
1060
1060
  return;
1061
1061
  }
1062
- D.value = !0;
1062
+ O.value = !0;
1063
1063
  try {
1064
- let t = await te({
1064
+ let t = await ee({
1065
1065
  organization_id: i.value,
1066
- work_type: g.value,
1066
+ work_type: _.value,
1067
1067
  settlement_id: o.value,
1068
- is_found_address_id: !m.value,
1069
- ...m.value ? { location: h.value.trim() } : { address_id: c.value },
1070
- description: v.value.trim() || void 0,
1071
- execution_basis: ee.value.trim() || void 0,
1072
- notes: b.value.trim() || void 0,
1068
+ is_found_address_id: !h.value,
1069
+ ...h.value ? { location: g.value.trim() } : { address_id: c.value },
1070
+ description: y.value.trim() || void 0,
1071
+ execution_basis: b.value.trim() || void 0,
1072
+ notes: x.value.trim() || void 0,
1073
1073
  geom: e
1074
1074
  });
1075
1075
  await n.push({
@@ -1080,57 +1080,57 @@ var nt = /*@__PURE__*/ M({
1080
1080
  }
1081
1081
  });
1082
1082
  } catch (e) {
1083
- O.value = e instanceof Error ? e.message : "Не вдалося відправити звернення";
1083
+ k.value = e instanceof Error ? e.message : "Не вдалося відправити звернення";
1084
1084
  } finally {
1085
- D.value = !1;
1085
+ O.value = !1;
1086
1086
  }
1087
1087
  }
1088
- let L = {
1088
+ let R = {
1089
1089
  router: n,
1090
1090
  settlementId: o,
1091
1091
  settlementLabel: s,
1092
1092
  addressId: c,
1093
1093
  addressLabel: l,
1094
- settlementOptions: u,
1095
- addressOptions: d,
1096
- settlementLoading: f,
1097
- addressLoading: p,
1098
- manualAddress: m,
1099
- manualValue: h,
1100
- workTypeCode: g,
1101
- workTypeLabel: _,
1102
- description: v,
1103
- basis: ee,
1104
- notes: b,
1105
- mapPoints: x,
1106
- importedGeom: C,
1107
- importOpen: w,
1108
- addressPoint: E,
1109
- submitting: D,
1110
- error: O,
1111
- orgName: k,
1112
- workTypeOptions: A,
1113
- canSubmit: j,
1114
- onGeometryImported: M,
1115
- loadSettlements: N,
1116
- loadAddresses: P,
1117
- pointFromGeom: F,
1118
- onAddressSelect: I,
1119
- toggleManualAddress: ne,
1120
- submit: re,
1094
+ settlementOptions: d,
1095
+ addressOptions: f,
1096
+ settlementLoading: p,
1097
+ addressLoading: m,
1098
+ manualAddress: h,
1099
+ manualValue: g,
1100
+ workTypeCode: _,
1101
+ workTypeLabel: v,
1102
+ description: y,
1103
+ basis: b,
1104
+ notes: x,
1105
+ mapPoints: S,
1106
+ importedGeom: w,
1107
+ importOpen: T,
1108
+ addressPoint: D,
1109
+ submitting: O,
1110
+ error: k,
1111
+ orgName: A,
1112
+ workTypeOptions: j,
1113
+ canSubmit: M,
1114
+ onGeometryImported: N,
1115
+ loadSettlements: P,
1116
+ loadAddresses: F,
1117
+ pointFromGeom: I,
1118
+ onAddressSelect: L,
1119
+ toggleManualAddress: te,
1120
+ submit: ne,
1121
1121
  get RouterLink() {
1122
- return G;
1122
+ return K;
1123
1123
  },
1124
1124
  AppIcon: a,
1125
- FormSearchSelect: he,
1125
+ FormSearchSelect: me,
1126
1126
  FormSuggestSelect: Ee,
1127
1127
  ApplicationCreateMap: He,
1128
1128
  GeometryImportDialog: Qe
1129
1129
  };
1130
- return Object.defineProperty(L, "__isScriptSetup", {
1130
+ return Object.defineProperty(R, "__isScriptSetup", {
1131
1131
  enumerable: !1,
1132
1132
  value: !0
1133
- }), L;
1133
+ }), R;
1134
1134
  }
1135
1135
  }), rt = { class: "min-h-[calc(100vh-3.5rem)] bg-gray-50" }, it = { class: "border-b border-gray-200 bg-white py-4" }, at = { class: "mx-auto max-w-[1400px] px-6" }, ot = { class: "mb-3 flex items-center gap-1.5 text-xs text-gray-400" }, st = { class: "flex items-start justify-between gap-4" }, ct = {
1136
1136
  key: 0,
@@ -1140,35 +1140,35 @@ var nt = /*@__PURE__*/ M({
1140
1140
  class: "mb-3 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"
1141
1141
  }, kt = { class: "flex items-center gap-3" }, At = ["disabled"];
1142
1142
  function jt(e, t, n, r, i, a) {
1143
- return L(), O("div", rt, [
1144
- k("div", it, [k("div", at, [k("nav", ot, [
1145
- j(r.RouterLink, {
1143
+ return R(), k("div", rt, [
1144
+ A("div", it, [A("div", at, [A("nav", ot, [
1145
+ M(r.RouterLink, {
1146
1146
  to: "/requests",
1147
1147
  class: "flex items-center gap-1 transition-colors hover:text-gray-700"
1148
1148
  }, {
1149
- default: H(() => [j(r.AppIcon, {
1149
+ default: U(() => [M(r.AppIcon, {
1150
1150
  name: "home",
1151
1151
  class: "h-3 w-3"
1152
- }), t[13] ||= k("span", null, "Звернення", -1)]),
1152
+ }), t[13] ||= A("span", null, "Звернення", -1)]),
1153
1153
  _: 1
1154
1154
  }),
1155
- j(r.AppIcon, {
1155
+ M(r.AppIcon, {
1156
1156
  name: "chevron-right",
1157
1157
  class: "h-3 w-3"
1158
1158
  }),
1159
- t[14] ||= k("span", { class: "font-medium text-gray-700" }, "Нове звернення", -1)
1160
- ]), k("div", st, [t[15] ||= k("div", null, [k("h1", { class: "text-lg font-semibold text-gray-900" }, "Нове звернення"), k("p", { class: "mt-0.5 text-sm text-gray-500" }, "Заповніть дані для створення заявки")], -1), r.orgName ? (L(), O("div", ct, [j(r.AppIcon, {
1159
+ t[14] ||= A("span", { class: "font-medium text-gray-700" }, "Нове звернення", -1)
1160
+ ]), A("div", st, [t[15] ||= A("div", null, [A("h1", { class: "text-lg font-semibold text-gray-900" }, "Нове звернення"), A("p", { class: "mt-0.5 text-sm text-gray-500" }, "Заповніть дані для створення заявки")], -1), r.orgName ? (R(), k("div", ct, [M(r.AppIcon, {
1161
1161
  name: "building-2",
1162
1162
  class: "h-3.5 w-3.5 text-[#2663EB]"
1163
- }), k("span", lt, z(r.orgName), 1)])) : D("", !0)])])]),
1164
- k("form", {
1163
+ }), A("span", lt, B(r.orgName), 1)])) : O("", !0)])])]),
1164
+ A("form", {
1165
1165
  class: "mx-auto max-w-[1400px] px-6 py-5",
1166
- onSubmit: W(r.submit, ["prevent"])
1167
- }, [k("div", ut, [k("div", dt, [k("div", ft, [k("div", pt, [j(r.AppIcon, {
1166
+ onSubmit: G(r.submit, ["prevent"])
1167
+ }, [A("div", ut, [A("div", dt, [A("div", ft, [A("div", pt, [M(r.AppIcon, {
1168
1168
  name: "map-pin",
1169
1169
  class: "h-3.5 w-3.5 text-gray-400"
1170
- }), t[16] ||= k("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Адреса об'єкта", -1)]), k("div", mt, [
1171
- j(r.FormSuggestSelect, {
1170
+ }), t[16] ||= A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Адреса об'єкта", -1)]), A("div", mt, [
1171
+ M(r.FormSuggestSelect, {
1172
1172
  modelValue: r.settlementId,
1173
1173
  "onUpdate:modelValue": t[0] ||= (e) => r.settlementId = e,
1174
1174
  "display-value": r.settlementLabel,
@@ -1185,10 +1185,10 @@ function jt(e, t, n, r, i, a) {
1185
1185
  "options",
1186
1186
  "loading"
1187
1187
  ]),
1188
- k("label", ht, [
1189
- t[17] ||= A(" Код населеного пункту (КАТОТТГ) ", -1),
1190
- t[18] ||= k("span", { class: "text-red-400" }, "*", -1),
1191
- k("input", {
1188
+ A("label", ht, [
1189
+ t[17] ||= j(" Код населеного пункту (КАТОТТГ) ", -1),
1190
+ t[18] ||= A("span", { class: "text-red-400" }, "*", -1),
1191
+ A("input", {
1192
1192
  value: r.settlementId,
1193
1193
  type: "text",
1194
1194
  readonly: "",
@@ -1197,20 +1197,20 @@ function jt(e, t, n, r, i, a) {
1197
1197
  placeholder: "Заповнюється після вибору населеного пункту"
1198
1198
  }, null, 8, gt)
1199
1199
  ]),
1200
- k("button", {
1200
+ A("button", {
1201
1201
  type: "button",
1202
- class: P(["flex w-full cursor-pointer select-none items-center justify-between gap-3 rounded-xl border px-4 py-3 text-left transition-all", r.manualAddress ? "border-[#2663EB]/30 bg-[#EFF4FE]" : "border-gray-200 bg-white hover:border-gray-300"]),
1202
+ class: F(["flex w-full cursor-pointer select-none items-center justify-between gap-3 rounded-xl border px-4 py-3 text-left transition-all", r.manualAddress ? "border-[#2663EB]/30 bg-[#EFF4FE]" : "border-gray-200 bg-white hover:border-gray-300"]),
1203
1203
  onClick: r.toggleManualAddress
1204
- }, [k("div", _t, [k("div", { class: P(["flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-200"]) }, [j(r.AppIcon, {
1204
+ }, [A("div", _t, [A("div", { class: F(["flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-200"]) }, [M(r.AppIcon, {
1205
1205
  name: "map-pin",
1206
- class: P(["h-3.5 w-3.5", r.manualAddress ? "text-white" : "text-gray-500"])
1207
- }, null, 8, ["class"])], 2), k("div", vt, [k("p", { class: P(["text-xs font-semibold", r.manualAddress ? "text-[#2663EB]" : "text-gray-700"]) }, "Адресу не знайдено", 2), t[19] ||= k("p", { class: "truncate text-xs leading-snug text-gray-400" }, "Вказати адресу вручну у полі «Місцезнаходження»", -1)])]), k("div", { class: P(["relative h-5 w-9 shrink-0 rounded-full transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-300"]) }, [k("span", { class: P(["absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition-all", r.manualAddress ? "left-[18px]" : "left-0.5"]) }, null, 2)], 2)], 2),
1208
- r.manualAddress ? (L(), O("div", yt, [t[20] ||= k("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [A(" Місцезнаходження "), k("span", { class: "text-red-400" }, "*")], -1), U(k("input", {
1206
+ class: F(["h-3.5 w-3.5", r.manualAddress ? "text-white" : "text-gray-500"])
1207
+ }, null, 8, ["class"])], 2), A("div", vt, [A("p", { class: F(["text-xs font-semibold", r.manualAddress ? "text-[#2663EB]" : "text-gray-700"]) }, "Адресу не знайдено", 2), t[19] ||= A("p", { class: "truncate text-xs leading-snug text-gray-400" }, "Вказати адресу вручну у полі «Місцезнаходження»", -1)])]), A("div", { class: F(["relative h-5 w-9 shrink-0 rounded-full transition-colors", r.manualAddress ? "bg-[#2663EB]" : "bg-gray-300"]) }, [A("span", { class: F(["absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition-all", r.manualAddress ? "left-[18px]" : "left-0.5"]) }, null, 2)], 2)], 2),
1208
+ r.manualAddress ? (R(), k("div", yt, [t[20] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [j(" Місцезнаходження "), A("span", { class: "text-red-400" }, "*")], -1), W(A("input", {
1209
1209
  "onUpdate:modelValue": t[2] ||= (e) => r.manualValue = e,
1210
1210
  type: "text",
1211
1211
  placeholder: "Введіть адресу вручну...",
1212
1212
  class: "w-full rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
1213
- }, null, 512), [[B, r.manualValue]])])) : (L(), E(r.FormSuggestSelect, {
1213
+ }, null, 512), [[V, r.manualValue]])])) : (R(), D(r.FormSuggestSelect, {
1214
1214
  key: 1,
1215
1215
  modelValue: r.addressId,
1216
1216
  "onUpdate:modelValue": t[3] ||= (e) => r.addressId = e,
@@ -1232,36 +1232,36 @@ function jt(e, t, n, r, i, a) {
1232
1232
  "disabled",
1233
1233
  "placeholder"
1234
1234
  ]))
1235
- ])]), k("div", bt, [t[24] ||= k("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [k("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Деталі заявки")], -1), k("div", xt, [
1236
- j(r.FormSearchSelect, {
1235
+ ])]), A("div", bt, [t[24] ||= A("div", { class: "border-b border-gray-100 bg-gray-50/60 px-5 py-3" }, [A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, "Деталі заявки")], -1), A("div", xt, [
1236
+ M(r.FormSearchSelect, {
1237
1237
  modelValue: r.workTypeLabel,
1238
1238
  "onUpdate:modelValue": t[5] ||= (e) => r.workTypeLabel = e,
1239
1239
  label: "Вид робіт",
1240
1240
  required: "",
1241
1241
  options: r.workTypeOptions
1242
1242
  }, null, 8, ["modelValue", "options"]),
1243
- k("div", null, [t[21] ||= k("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Опис запиту", -1), U(k("textarea", {
1243
+ A("div", null, [t[21] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Опис запиту", -1), W(A("textarea", {
1244
1244
  "onUpdate:modelValue": t[6] ||= (e) => r.description = e,
1245
1245
  rows: "3",
1246
1246
  placeholder: "Опишіть запит...",
1247
1247
  class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
1248
- }, null, 512), [[B, r.description]])]),
1249
- k("div", null, [t[22] ||= k("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [A(" Підстава виконання робіт "), k("span", { class: "ml-1 font-normal text-gray-400" }, "(у складі якої документації розробляється, які вихідні дані)")], -1), U(k("textarea", {
1248
+ }, null, 512), [[V, r.description]])]),
1249
+ A("div", null, [t[22] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, [j(" Підстава виконання робіт "), A("span", { class: "ml-1 font-normal text-gray-400" }, "(у складі якої документації розробляється, які вихідні дані)")], -1), W(A("textarea", {
1250
1250
  "onUpdate:modelValue": t[7] ||= (e) => r.basis = e,
1251
1251
  rows: "3",
1252
1252
  placeholder: "Вкажіть підставу...",
1253
1253
  class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
1254
- }, null, 512), [[B, r.basis]])]),
1255
- k("div", null, [t[23] ||= k("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Примітки", -1), U(k("textarea", {
1254
+ }, null, 512), [[V, r.basis]])]),
1255
+ A("div", null, [t[23] ||= A("label", { class: "mb-1.5 block text-xs font-medium text-gray-700" }, "Примітки", -1), W(A("textarea", {
1256
1256
  "onUpdate:modelValue": t[8] ||= (e) => r.notes = e,
1257
1257
  rows: "2",
1258
1258
  placeholder: "Додаткові примітки...",
1259
1259
  class: "w-full resize-none rounded-xl border border-gray-200 px-3.5 py-2.5 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-400 focus:border-[#2663EB] focus:ring-2 focus:ring-[#2663EB]/15"
1260
- }, null, 512), [[B, r.notes]])])
1261
- ])])]), k("div", St, [k("div", Ct, [k("div", wt, [j(r.AppIcon, {
1260
+ }, null, 512), [[V, r.notes]])])
1261
+ ])])]), A("div", St, [A("div", Ct, [A("div", wt, [M(r.AppIcon, {
1262
1262
  name: "map-pin",
1263
1263
  class: "h-3.5 w-3.5 text-gray-400"
1264
- }), t[25] ||= k("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, [A(" Карта "), k("span", { class: "text-red-400" }, "*")], -1)]), k("div", Tt, [j(r.ApplicationCreateMap, {
1264
+ }), t[25] ||= A("h3", { class: "text-xs font-semibold uppercase tracking-wider text-gray-500" }, [j(" Карта "), A("span", { class: "text-red-400" }, "*")], -1)]), A("div", Tt, [M(r.ApplicationCreateMap, {
1265
1265
  points: r.mapPoints,
1266
1266
  "onUpdate:points": t[9] ||= (e) => r.mapPoints = e,
1267
1267
  geometry: r.importedGeom,
@@ -1272,35 +1272,35 @@ function jt(e, t, n, r, i, a) {
1272
1272
  "points",
1273
1273
  "geometry",
1274
1274
  "address-point"
1275
- ])])]), k("div", Et, [
1276
- k("div", Dt, [j(r.AppIcon, {
1275
+ ])])]), A("div", Et, [
1276
+ A("div", Dt, [M(r.AppIcon, {
1277
1277
  name: "alert-circle",
1278
1278
  class: "h-[13px] w-[13px]"
1279
- }), t[26] ||= k("span", null, [
1280
- A("Поля із "),
1281
- k("span", { class: "font-medium text-red-400" }, "*"),
1282
- A(" обов'язкові")
1279
+ }), t[26] ||= A("span", null, [
1280
+ j("Поля із "),
1281
+ A("span", { class: "font-medium text-red-400" }, "*"),
1282
+ j(" обов'язкові")
1283
1283
  ], -1)]),
1284
- r.error ? (L(), O("p", Ot, z(r.error), 1)) : D("", !0),
1285
- k("div", kt, [j(r.RouterLink, {
1284
+ r.error ? (R(), k("p", Ot, B(r.error), 1)) : O("", !0),
1285
+ A("div", kt, [M(r.RouterLink, {
1286
1286
  to: "/requests",
1287
1287
  class: "flex-1 rounded-xl bg-gray-100 px-4 py-2.5 text-center text-sm font-medium text-gray-600 transition-colors hover:bg-gray-200"
1288
1288
  }, {
1289
- default: H(() => [...t[27] ||= [A(" Скасувати ", -1)]]),
1289
+ default: U(() => [...t[27] ||= [j(" Скасувати ", -1)]]),
1290
1290
  _: 1
1291
- }), k("button", {
1291
+ }), A("button", {
1292
1292
  type: "submit",
1293
1293
  class: "flex-1 rounded-xl bg-[#2663EB] px-4 py-2.5 text-sm font-medium text-white transition-all hover:bg-[#1d52cc] active:scale-95 disabled:cursor-not-allowed disabled:opacity-40",
1294
1294
  disabled: !r.canSubmit || r.submitting
1295
- }, z(r.submitting ? "Відправлення…" : "Відправити"), 9, At)])
1295
+ }, B(r.submitting ? "Відправлення…" : "Відправити"), 9, At)])
1296
1296
  ])])])], 32),
1297
- r.importOpen ? (L(), E(r.GeometryImportDialog, {
1297
+ r.importOpen ? (R(), D(r.GeometryImportDialog, {
1298
1298
  key: 0,
1299
1299
  onClose: t[12] ||= (e) => r.importOpen = !1,
1300
1300
  onImported: r.onGeometryImported
1301
- })) : D("", !0)
1301
+ })) : O("", !0)
1302
1302
  ]);
1303
1303
  }
1304
- var Mt = /*#__PURE__*/ e(nt, [["render", jt], ["__file", "C:/softpro/surveyor/cabinet/src/pages/requests/create.vue"]]);
1304
+ var Mt = /*#__PURE__*/ e(nt, [["render", jt], ["__file", "D:/softpro/surveyor/cabinet/src/pages/requests/create.vue"]]);
1305
1305
  //#endregion
1306
1306
  export { Mt as default };