@opengis/form 0.0.18 → 0.0.20

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 (286) hide show
  1. package/dist/components/behavior.vue.d.ts.map +1 -0
  2. package/dist/{form/src/components → components}/container-views/index.d.ts.map +1 -1
  3. package/dist/components/container-views/vs-container-accordion.vue.d.ts.map +1 -0
  4. package/dist/components/container-views/vs-container-default.vue.d.ts.map +1 -0
  5. package/dist/components/container-views/vs-container-switcher.vue.d.ts.map +1 -0
  6. package/dist/components/form/vs-compact-form.vue.d.ts.map +1 -0
  7. package/dist/components/icons/icon-arrow-top-bottom.vue.d.ts.map +1 -0
  8. package/dist/components/icons/icon-check.vue.d.ts.map +1 -0
  9. package/dist/components/icons/icon-chevron-down.vue.d.ts.map +1 -0
  10. package/dist/components/icons/icon-chevron-top-bottom.vue.d.ts.map +1 -0
  11. package/dist/components/icons/icon-close.vue.d.ts.map +1 -0
  12. package/dist/components/icons/icon-csv.vue.d.ts.map +1 -0
  13. package/dist/components/icons/icon-delete.vue.d.ts.map +1 -0
  14. package/dist/components/icons/icon-download.vue.d.ts.map +1 -0
  15. package/dist/components/icons/icon-export.vue.d.ts.map +1 -0
  16. package/dist/components/icons/icon-file.vue.d.ts.map +1 -0
  17. package/dist/components/icons/icon-geojson.vue.d.ts.map +1 -0
  18. package/dist/components/icons/icon-grip-vertical.vue.d.ts.map +1 -0
  19. package/dist/components/icons/icon-import.vue.d.ts.map +1 -0
  20. package/dist/components/icons/icon-info.vue.d.ts.map +1 -0
  21. package/dist/components/icons/icon-magnifying-glass.vue.d.ts.map +1 -0
  22. package/dist/components/icons/icon-no-data.vue.d.ts.map +1 -0
  23. package/dist/components/icons/icon-pdf.vue.d.ts.map +1 -0
  24. package/dist/components/icons/icon-pen.vue.d.ts.map +1 -0
  25. package/dist/components/icons/icon-plus.vue.d.ts.map +1 -0
  26. package/dist/components/icons/icon-upload.vue.d.ts.map +1 -0
  27. package/dist/components/icons/icon-zip.vue.d.ts.map +1 -0
  28. package/dist/components/icons/index.d.ts.map +1 -0
  29. package/dist/components/inputs/base/vs-input-email.vue.d.ts.map +1 -0
  30. package/dist/components/inputs/base/vs-input-mask.vue.d.ts.map +1 -0
  31. package/dist/components/inputs/base/vs-input-number.vue.d.ts.map +1 -0
  32. package/dist/components/inputs/base/vs-input-static.vue.d.ts.map +1 -0
  33. package/dist/components/inputs/base/vs-input-switcher.vue.d.ts.map +1 -0
  34. package/dist/components/inputs/base/vs-input-text.vue.d.ts.map +1 -0
  35. package/dist/components/inputs/base/vs-input-textarea.vue.d.ts.map +1 -0
  36. package/dist/components/inputs/date/vs-date-text.vue.d.ts.map +1 -0
  37. package/dist/components/inputs/date/vs-input-date.vue.d.ts.map +1 -0
  38. package/dist/components/inputs/date/vs-input-date1.vue.d.ts +13 -0
  39. package/dist/components/inputs/date/vs-input-date1.vue.d.ts.map +1 -0
  40. package/dist/components/inputs/date/vs-input-time.vue.d.ts.map +1 -0
  41. package/dist/components/inputs/file/vs-input-file-list-item.vue.d.ts.map +1 -0
  42. package/dist/components/inputs/file/vs-input-file.vue.d.ts.map +1 -0
  43. package/dist/components/inputs/file-list/vs-input-file-list.vue.d.ts.map +1 -0
  44. package/dist/components/inputs/file-list/vs-widget-file-info.vue.d.ts.map +1 -0
  45. package/dist/components/inputs/file-list/vs-widget-file-item.vue.d.ts.map +1 -0
  46. package/dist/{form/src/components → components}/inputs/index.d.ts +10 -19
  47. package/dist/{form/src/components → components}/inputs/index.d.ts.map +1 -1
  48. package/dist/components/inputs/map/icons/icon-compass.vue.d.ts.map +1 -0
  49. package/dist/components/inputs/map/icons/icon-full-screen.vue.d.ts.map +1 -0
  50. package/dist/components/inputs/map/icons/icon-line.vue.d.ts.map +1 -0
  51. package/dist/components/inputs/map/icons/icon-map-pin.vue.d.ts.map +1 -0
  52. package/dist/components/inputs/map/icons/icon-poligon-rectangle.vue.d.ts.map +1 -0
  53. package/dist/components/inputs/map/icons/icon-poligon.vue.d.ts.map +1 -0
  54. package/dist/components/inputs/map/map-layers.vue.d.ts.map +1 -0
  55. package/dist/components/inputs/map/map-search.vue.d.ts.map +1 -0
  56. package/dist/components/inputs/map/map.d.ts.map +1 -0
  57. package/dist/components/inputs/map/util.d.ts.map +1 -0
  58. package/dist/components/inputs/map/vs-input-map.vue.d.ts +8 -0
  59. package/dist/components/inputs/map/vs-input-map.vue.d.ts.map +1 -0
  60. package/dist/components/inputs/options/checkbox/index.d.ts.map +1 -0
  61. package/dist/components/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts.map +1 -0
  62. package/dist/components/inputs/options/checkbox/vs-checkbox-default.vue.d.ts.map +1 -0
  63. package/dist/components/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts.map +1 -0
  64. package/dist/components/inputs/options/checkbox/vs-input-checkbox.vue.d.ts.map +1 -0
  65. package/dist/components/inputs/options/radio/index.d.ts.map +1 -0
  66. package/dist/components/inputs/options/radio/vs-input-radio-buttons.vue.d.ts.map +1 -0
  67. package/dist/components/inputs/options/radio/vs-input-radio-default.vue.d.ts.map +1 -0
  68. package/dist/components/inputs/options/radio/vs-input-radio.vue.d.ts.map +1 -0
  69. package/dist/components/inputs/table/vs-input-datatable.vue.d.ts.map +1 -0
  70. package/dist/components/inputs/tag/vs-input-tag.vue.d.ts.map +1 -0
  71. package/dist/components/inputs/vs-input-container.vue.d.ts.map +1 -0
  72. package/dist/components/inputs/vs-input-select.vue.d.ts +22 -0
  73. package/dist/components/inputs/vs-input-select.vue.d.ts.map +1 -0
  74. package/dist/components/layouts/index.d.ts.map +1 -0
  75. package/dist/components/layouts/vs-compact-form-layout.vue.d.ts.map +1 -0
  76. package/dist/components/layouts/vs-layout-default.vue.d.ts.map +1 -0
  77. package/dist/components/layouts/vs-layout-horizontal.vue.d.ts.map +1 -0
  78. package/dist/components/layouts/vs-layout-inline.vue.d.ts.map +1 -0
  79. package/dist/components/modal/modal-edit.vue.d.ts.map +1 -0
  80. package/dist/components/ui/vs-calendar.vue.d.ts.map +1 -0
  81. package/dist/components/ui/vs-popover.vue.d.ts.map +1 -0
  82. package/dist/composables/i18n.d.ts +3 -0
  83. package/dist/composables/i18n.d.ts.map +1 -0
  84. package/dist/composables/useForm.d.ts.map +1 -0
  85. package/dist/composables/useLocale.d.ts +2 -0
  86. package/dist/composables/useLocale.d.ts.map +1 -0
  87. package/dist/composables/useStyle.d.ts.map +1 -0
  88. package/dist/index.css +1 -1
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +1292 -1248
  91. package/dist/index.umd.cjs +2 -2
  92. package/dist/plugin/form-plugin.d.ts.map +1 -0
  93. package/dist/schema.d.ts.map +1 -0
  94. package/dist/{form/src/types → types}/form.d.ts +10 -0
  95. package/dist/types/form.d.ts.map +1 -0
  96. package/dist/{form/src/types → types}/rules.d.ts.map +1 -1
  97. package/dist/utils/convertForm.d.ts.map +1 -0
  98. package/dist/utils/dynamicPosition.d.ts.map +1 -0
  99. package/dist/utils/file.api.d.ts.map +1 -0
  100. package/dist/utils/file.preview.d.ts.map +1 -0
  101. package/dist/utils/formConditions.d.ts.map +1 -0
  102. package/dist/utils/formRules.d.ts.map +1 -0
  103. package/dist/utils/index.d.ts.map +1 -0
  104. package/dist/utils/randomId.d.ts.map +1 -0
  105. package/package.json +1 -1
  106. package/dist/core/src/emitter/eventBus.d.ts +0 -6
  107. package/dist/core/src/emitter/eventBus.d.ts.map +0 -1
  108. package/dist/form/src/components/behavior.vue.d.ts.map +0 -1
  109. package/dist/form/src/components/container-views/vs-container-accordion.vue.d.ts.map +0 -1
  110. package/dist/form/src/components/container-views/vs-container-default.vue.d.ts.map +0 -1
  111. package/dist/form/src/components/container-views/vs-container-switcher.vue.d.ts.map +0 -1
  112. package/dist/form/src/components/form/vs-compact-form.vue.d.ts.map +0 -1
  113. package/dist/form/src/components/icons/icon-arrow-top-bottom.vue.d.ts.map +0 -1
  114. package/dist/form/src/components/icons/icon-check.vue.d.ts.map +0 -1
  115. package/dist/form/src/components/icons/icon-chevron-down.vue.d.ts.map +0 -1
  116. package/dist/form/src/components/icons/icon-chevron-top-bottom.vue.d.ts.map +0 -1
  117. package/dist/form/src/components/icons/icon-close.vue.d.ts.map +0 -1
  118. package/dist/form/src/components/icons/icon-csv.vue.d.ts.map +0 -1
  119. package/dist/form/src/components/icons/icon-delete.vue.d.ts.map +0 -1
  120. package/dist/form/src/components/icons/icon-download.vue.d.ts.map +0 -1
  121. package/dist/form/src/components/icons/icon-export.vue.d.ts.map +0 -1
  122. package/dist/form/src/components/icons/icon-file.vue.d.ts.map +0 -1
  123. package/dist/form/src/components/icons/icon-geojson.vue.d.ts.map +0 -1
  124. package/dist/form/src/components/icons/icon-grip-vertical.vue.d.ts.map +0 -1
  125. package/dist/form/src/components/icons/icon-import.vue.d.ts.map +0 -1
  126. package/dist/form/src/components/icons/icon-info.vue.d.ts.map +0 -1
  127. package/dist/form/src/components/icons/icon-magnifying-glass.vue.d.ts.map +0 -1
  128. package/dist/form/src/components/icons/icon-no-data.vue.d.ts.map +0 -1
  129. package/dist/form/src/components/icons/icon-pdf.vue.d.ts.map +0 -1
  130. package/dist/form/src/components/icons/icon-pen.vue.d.ts.map +0 -1
  131. package/dist/form/src/components/icons/icon-plus.vue.d.ts.map +0 -1
  132. package/dist/form/src/components/icons/icon-upload.vue.d.ts.map +0 -1
  133. package/dist/form/src/components/icons/icon-zip.vue.d.ts.map +0 -1
  134. package/dist/form/src/components/icons/index.d.ts.map +0 -1
  135. package/dist/form/src/components/inputs/base/vs-input-email.vue.d.ts.map +0 -1
  136. package/dist/form/src/components/inputs/base/vs-input-mask.vue.d.ts.map +0 -1
  137. package/dist/form/src/components/inputs/base/vs-input-number.vue.d.ts.map +0 -1
  138. package/dist/form/src/components/inputs/base/vs-input-static.vue.d.ts.map +0 -1
  139. package/dist/form/src/components/inputs/base/vs-input-switcher.vue.d.ts.map +0 -1
  140. package/dist/form/src/components/inputs/base/vs-input-text.vue.d.ts.map +0 -1
  141. package/dist/form/src/components/inputs/base/vs-input-textarea.vue.d.ts.map +0 -1
  142. package/dist/form/src/components/inputs/date/vs-date-text.vue.d.ts.map +0 -1
  143. package/dist/form/src/components/inputs/date/vs-input-date.vue.d.ts.map +0 -1
  144. package/dist/form/src/components/inputs/date/vs-input-date1.vue.d.ts +0 -17
  145. package/dist/form/src/components/inputs/date/vs-input-date1.vue.d.ts.map +0 -1
  146. package/dist/form/src/components/inputs/date/vs-input-time.vue.d.ts.map +0 -1
  147. package/dist/form/src/components/inputs/file/vs-input-file-list-item.vue.d.ts.map +0 -1
  148. package/dist/form/src/components/inputs/file/vs-input-file.vue.d.ts.map +0 -1
  149. package/dist/form/src/components/inputs/file-list/vs-input-file-list.vue.d.ts.map +0 -1
  150. package/dist/form/src/components/inputs/file-list/vs-widget-file-info.vue.d.ts.map +0 -1
  151. package/dist/form/src/components/inputs/file-list/vs-widget-file-item.vue.d.ts.map +0 -1
  152. package/dist/form/src/components/inputs/map/icons/icon-compass.vue.d.ts.map +0 -1
  153. package/dist/form/src/components/inputs/map/icons/icon-full-screen.vue.d.ts.map +0 -1
  154. package/dist/form/src/components/inputs/map/icons/icon-line.vue.d.ts.map +0 -1
  155. package/dist/form/src/components/inputs/map/icons/icon-map-pin.vue.d.ts.map +0 -1
  156. package/dist/form/src/components/inputs/map/icons/icon-poligon-rectangle.vue.d.ts.map +0 -1
  157. package/dist/form/src/components/inputs/map/icons/icon-poligon.vue.d.ts.map +0 -1
  158. package/dist/form/src/components/inputs/map/map-layers.vue.d.ts.map +0 -1
  159. package/dist/form/src/components/inputs/map/map-search.vue.d.ts.map +0 -1
  160. package/dist/form/src/components/inputs/map/map.d.ts.map +0 -1
  161. package/dist/form/src/components/inputs/map/util.d.ts.map +0 -1
  162. package/dist/form/src/components/inputs/map/vs-input-map.vue.d.ts +0 -8
  163. package/dist/form/src/components/inputs/map/vs-input-map.vue.d.ts.map +0 -1
  164. package/dist/form/src/components/inputs/options/checkbox/index.d.ts.map +0 -1
  165. package/dist/form/src/components/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts.map +0 -1
  166. package/dist/form/src/components/inputs/options/checkbox/vs-checkbox-default.vue.d.ts.map +0 -1
  167. package/dist/form/src/components/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts.map +0 -1
  168. package/dist/form/src/components/inputs/options/checkbox/vs-input-checkbox.vue.d.ts.map +0 -1
  169. package/dist/form/src/components/inputs/options/radio/index.d.ts.map +0 -1
  170. package/dist/form/src/components/inputs/options/radio/vs-input-radio-buttons.vue.d.ts.map +0 -1
  171. package/dist/form/src/components/inputs/options/radio/vs-input-radio-default.vue.d.ts.map +0 -1
  172. package/dist/form/src/components/inputs/options/radio/vs-input-radio.vue.d.ts.map +0 -1
  173. package/dist/form/src/components/inputs/table/vs-input-datatable.vue.d.ts.map +0 -1
  174. package/dist/form/src/components/inputs/tag/vs-input-tag.vue.d.ts.map +0 -1
  175. package/dist/form/src/components/inputs/vs-input-container.vue.d.ts.map +0 -1
  176. package/dist/form/src/components/inputs/vs-input-select.vue.d.ts +0 -27
  177. package/dist/form/src/components/inputs/vs-input-select.vue.d.ts.map +0 -1
  178. package/dist/form/src/components/layouts/index.d.ts.map +0 -1
  179. package/dist/form/src/components/layouts/vs-compact-form-layout.vue.d.ts.map +0 -1
  180. package/dist/form/src/components/layouts/vs-layout-default.vue.d.ts.map +0 -1
  181. package/dist/form/src/components/layouts/vs-layout-horizontal.vue.d.ts.map +0 -1
  182. package/dist/form/src/components/layouts/vs-layout-inline.vue.d.ts.map +0 -1
  183. package/dist/form/src/components/modal/modal-edit.vue.d.ts.map +0 -1
  184. package/dist/form/src/components/ui/vs-calendar.vue.d.ts.map +0 -1
  185. package/dist/form/src/components/ui/vs-popover.vue.d.ts.map +0 -1
  186. package/dist/form/src/composables/useForm.d.ts.map +0 -1
  187. package/dist/form/src/composables/useStyle.d.ts.map +0 -1
  188. package/dist/form/src/index.d.ts.map +0 -1
  189. package/dist/form/src/plugin/form-plugin.d.ts.map +0 -1
  190. package/dist/form/src/schema.d.ts.map +0 -1
  191. package/dist/form/src/types/form.d.ts.map +0 -1
  192. package/dist/form/src/utils/convertForm.d.ts.map +0 -1
  193. package/dist/form/src/utils/dynamicPosition.d.ts.map +0 -1
  194. package/dist/form/src/utils/file.api.d.ts.map +0 -1
  195. package/dist/form/src/utils/file.preview.d.ts.map +0 -1
  196. package/dist/form/src/utils/formConditions.d.ts.map +0 -1
  197. package/dist/form/src/utils/formRules.d.ts.map +0 -1
  198. package/dist/form/src/utils/index.d.ts.map +0 -1
  199. package/dist/form/src/utils/randomId.d.ts.map +0 -1
  200. /package/dist/{form/src/components → components}/behavior.vue.d.ts +0 -0
  201. /package/dist/{form/src/components → components}/container-views/index.d.ts +0 -0
  202. /package/dist/{form/src/components → components}/container-views/vs-container-accordion.vue.d.ts +0 -0
  203. /package/dist/{form/src/components → components}/container-views/vs-container-default.vue.d.ts +0 -0
  204. /package/dist/{form/src/components → components}/container-views/vs-container-switcher.vue.d.ts +0 -0
  205. /package/dist/{form/src/components → components}/form/vs-compact-form.vue.d.ts +0 -0
  206. /package/dist/{form/src/components → components}/icons/icon-arrow-top-bottom.vue.d.ts +0 -0
  207. /package/dist/{form/src/components → components}/icons/icon-check.vue.d.ts +0 -0
  208. /package/dist/{form/src/components → components}/icons/icon-chevron-down.vue.d.ts +0 -0
  209. /package/dist/{form/src/components → components}/icons/icon-chevron-top-bottom.vue.d.ts +0 -0
  210. /package/dist/{form/src/components → components}/icons/icon-close.vue.d.ts +0 -0
  211. /package/dist/{form/src/components → components}/icons/icon-csv.vue.d.ts +0 -0
  212. /package/dist/{form/src/components → components}/icons/icon-delete.vue.d.ts +0 -0
  213. /package/dist/{form/src/components → components}/icons/icon-download.vue.d.ts +0 -0
  214. /package/dist/{form/src/components → components}/icons/icon-export.vue.d.ts +0 -0
  215. /package/dist/{form/src/components → components}/icons/icon-file.vue.d.ts +0 -0
  216. /package/dist/{form/src/components → components}/icons/icon-geojson.vue.d.ts +0 -0
  217. /package/dist/{form/src/components → components}/icons/icon-grip-vertical.vue.d.ts +0 -0
  218. /package/dist/{form/src/components → components}/icons/icon-import.vue.d.ts +0 -0
  219. /package/dist/{form/src/components → components}/icons/icon-info.vue.d.ts +0 -0
  220. /package/dist/{form/src/components → components}/icons/icon-magnifying-glass.vue.d.ts +0 -0
  221. /package/dist/{form/src/components → components}/icons/icon-no-data.vue.d.ts +0 -0
  222. /package/dist/{form/src/components → components}/icons/icon-pdf.vue.d.ts +0 -0
  223. /package/dist/{form/src/components → components}/icons/icon-pen.vue.d.ts +0 -0
  224. /package/dist/{form/src/components → components}/icons/icon-plus.vue.d.ts +0 -0
  225. /package/dist/{form/src/components → components}/icons/icon-upload.vue.d.ts +0 -0
  226. /package/dist/{form/src/components → components}/icons/icon-zip.vue.d.ts +0 -0
  227. /package/dist/{form/src/components → components}/icons/index.d.ts +0 -0
  228. /package/dist/{form/src/components → components}/inputs/base/vs-input-email.vue.d.ts +0 -0
  229. /package/dist/{form/src/components → components}/inputs/base/vs-input-mask.vue.d.ts +0 -0
  230. /package/dist/{form/src/components → components}/inputs/base/vs-input-number.vue.d.ts +0 -0
  231. /package/dist/{form/src/components → components}/inputs/base/vs-input-static.vue.d.ts +0 -0
  232. /package/dist/{form/src/components → components}/inputs/base/vs-input-switcher.vue.d.ts +0 -0
  233. /package/dist/{form/src/components → components}/inputs/base/vs-input-text.vue.d.ts +0 -0
  234. /package/dist/{form/src/components → components}/inputs/base/vs-input-textarea.vue.d.ts +0 -0
  235. /package/dist/{form/src/components → components}/inputs/date/vs-date-text.vue.d.ts +0 -0
  236. /package/dist/{form/src/components → components}/inputs/date/vs-input-date.vue.d.ts +0 -0
  237. /package/dist/{form/src/components → components}/inputs/date/vs-input-time.vue.d.ts +0 -0
  238. /package/dist/{form/src/components → components}/inputs/file/vs-input-file-list-item.vue.d.ts +0 -0
  239. /package/dist/{form/src/components → components}/inputs/file/vs-input-file.vue.d.ts +0 -0
  240. /package/dist/{form/src/components → components}/inputs/file-list/vs-input-file-list.vue.d.ts +0 -0
  241. /package/dist/{form/src/components → components}/inputs/file-list/vs-widget-file-info.vue.d.ts +0 -0
  242. /package/dist/{form/src/components → components}/inputs/file-list/vs-widget-file-item.vue.d.ts +0 -0
  243. /package/dist/{form/src/components → components}/inputs/map/icons/icon-compass.vue.d.ts +0 -0
  244. /package/dist/{form/src/components → components}/inputs/map/icons/icon-full-screen.vue.d.ts +0 -0
  245. /package/dist/{form/src/components → components}/inputs/map/icons/icon-line.vue.d.ts +0 -0
  246. /package/dist/{form/src/components → components}/inputs/map/icons/icon-map-pin.vue.d.ts +0 -0
  247. /package/dist/{form/src/components → components}/inputs/map/icons/icon-poligon-rectangle.vue.d.ts +0 -0
  248. /package/dist/{form/src/components → components}/inputs/map/icons/icon-poligon.vue.d.ts +0 -0
  249. /package/dist/{form/src/components → components}/inputs/map/map-layers.vue.d.ts +0 -0
  250. /package/dist/{form/src/components → components}/inputs/map/map-search.vue.d.ts +0 -0
  251. /package/dist/{form/src/components → components}/inputs/map/map.d.ts +0 -0
  252. /package/dist/{form/src/components → components}/inputs/map/util.d.ts +0 -0
  253. /package/dist/{form/src/components → components}/inputs/options/checkbox/index.d.ts +0 -0
  254. /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts +0 -0
  255. /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-checkbox-default.vue.d.ts +0 -0
  256. /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts +0 -0
  257. /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-input-checkbox.vue.d.ts +0 -0
  258. /package/dist/{form/src/components → components}/inputs/options/radio/index.d.ts +0 -0
  259. /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio-buttons.vue.d.ts +0 -0
  260. /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio-default.vue.d.ts +0 -0
  261. /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio.vue.d.ts +0 -0
  262. /package/dist/{form/src/components → components}/inputs/table/vs-input-datatable.vue.d.ts +0 -0
  263. /package/dist/{form/src/components → components}/inputs/tag/vs-input-tag.vue.d.ts +0 -0
  264. /package/dist/{form/src/components → components}/inputs/vs-input-container.vue.d.ts +0 -0
  265. /package/dist/{form/src/components → components}/layouts/index.d.ts +0 -0
  266. /package/dist/{form/src/components → components}/layouts/vs-compact-form-layout.vue.d.ts +0 -0
  267. /package/dist/{form/src/components → components}/layouts/vs-layout-default.vue.d.ts +0 -0
  268. /package/dist/{form/src/components → components}/layouts/vs-layout-horizontal.vue.d.ts +0 -0
  269. /package/dist/{form/src/components → components}/layouts/vs-layout-inline.vue.d.ts +0 -0
  270. /package/dist/{form/src/components → components}/modal/modal-edit.vue.d.ts +0 -0
  271. /package/dist/{form/src/components → components}/ui/vs-calendar.vue.d.ts +0 -0
  272. /package/dist/{form/src/components → components}/ui/vs-popover.vue.d.ts +0 -0
  273. /package/dist/{form/src/composables → composables}/useForm.d.ts +0 -0
  274. /package/dist/{form/src/composables → composables}/useStyle.d.ts +0 -0
  275. /package/dist/{form/src/index.d.ts → index.d.ts} +0 -0
  276. /package/dist/{form/src/plugin → plugin}/form-plugin.d.ts +0 -0
  277. /package/dist/{form/src/schema.d.ts → schema.d.ts} +0 -0
  278. /package/dist/{form/src/types → types}/rules.d.ts +0 -0
  279. /package/dist/{form/src/utils → utils}/convertForm.d.ts +0 -0
  280. /package/dist/{form/src/utils → utils}/dynamicPosition.d.ts +0 -0
  281. /package/dist/{form/src/utils → utils}/file.api.d.ts +0 -0
  282. /package/dist/{form/src/utils → utils}/file.preview.d.ts +0 -0
  283. /package/dist/{form/src/utils → utils}/formConditions.d.ts +0 -0
  284. /package/dist/{form/src/utils → utils}/formRules.d.ts +0 -0
  285. /package/dist/{form/src/utils → utils}/index.d.ts +0 -0
  286. /package/dist/{form/src/utils → utils}/randomId.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,92 +1,114 @@
1
- import { defineComponent as A, createElementBlock as u, openBlock as i, createCommentVNode as S, renderSlot as ve, createElementVNode as t, toDisplayString as E, normalizeProps as Ee, guardReactiveProps as Fe, createTextVNode as oe, computed as D, mergeModels as q, useModel as G, withDirectives as K, normalizeClass as B, unref as H, vModelText as ne, vModelCheckbox as Qe, createVNode as j, ref as $, createBlock as X, resolveDynamicComponent as xe, normalizeStyle as fe, withCtx as Me, withModifiers as re, onMounted as ue, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Xe, Fragment as Q, renderList as Y, mergeProps as Ce, reactive as dt, vShow as De, inject as Se, resolveComponent as Pe, Transition as Ye, createApp as ct, h as pt, onUnmounted as et, nextTick as $e, Teleport as ft, provide as Ne } from "vue";
2
- import { notify as pe } from "@opengis/core";
3
- const vt = { class: "w-full relative" }, mt = {
1
+ import { defineComponent as A, ref as k, onMounted as ne, onUnmounted as Fe, createElementBlock as u, openBlock as i, createCommentVNode as B, renderSlot as he, createElementVNode as l, toDisplayString as E, normalizeProps as Oe, guardReactiveProps as De, createTextVNode as oe, computed as O, mergeModels as K, useModel as Z, withDirectives as G, normalizeClass as S, unref as q, vModelText as ie, vModelCheckbox as Xe, createVNode as j, createBlock as X, resolveDynamicComponent as we, normalizeStyle as me, withCtx as Le, withModifiers as re, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Ye, Fragment as Q, renderList as Y, mergeProps as Ve, reactive as dt, vShow as Ue, inject as Be, resolveComponent as Ne, Transition as et, createApp as ct, h as pt, resolveDirective as ft, nextTick as Ce, Teleport as vt, provide as He } from "vue";
2
+ import { notify as ve } from "@opengis/core";
3
+ const mt = { class: "w-full relative" }, ht = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, ht = {
6
+ }, gt = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
- }, gt = {
9
+ }, bt = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, bt = /* @__PURE__ */ A({
12
+ }, yt = /* @__PURE__ */ A({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
16
+ uk: {},
17
+ en: {},
18
+ de: {},
19
+ es: {},
20
+ fr: {},
16
21
  item: { default: () => ({}) },
17
22
  error: { type: [String, Boolean], default: "" },
18
23
  label: { default: "" }
19
24
  },
20
25
  setup(o) {
21
- return (e, l) => (i(), u("div", vt, [
22
- e.ua || e.label ? (i(), u("div", mt, [
23
- t("span", null, E(e.ua || e.label), 1),
24
- e.item?.rules?.includes("required") ? (i(), u("span", ht, "*")) : S("", !0)
25
- ])) : S("", !0),
26
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
27
- e.error ? (i(), u("span", gt, E(e.error), 1)) : S("", !0)
26
+ const e = k("uk"), t = (n) => {
27
+ n.detail.key === "locale" && (e.value = n.detail.newValue);
28
+ };
29
+ return ne(() => {
30
+ e.value = localStorage.locale, window.addEventListener("storage", t);
31
+ }), Fe(() => {
32
+ window.removeEventListener("resize", t);
33
+ }), (n, r) => (i(), u("div", mt, [
34
+ n.ua || n.label ? (i(), u("div", ht, [
35
+ l("span", null, E(n.item[e.value] || n.ua || n.label), 1),
36
+ n.item?.rules?.includes("required") ? (i(), u("span", gt, "*")) : B("", !0)
37
+ ])) : B("", !0),
38
+ he(n.$slots, "default", Oe(De(n.$attrs))),
39
+ n.error ? (i(), u("span", bt, E(n.error), 1)) : B("", !0)
28
40
  ]));
29
41
  }
30
- }), yt = { class: "w-full relative flex flex-row items-center gap-2" }, xt = {
42
+ }), xt = { class: "w-full relative flex flex-row items-center gap-2" }, wt = {
31
43
  key: 0,
32
44
  class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12 max-w-[250px]"
33
- }, wt = {
45
+ }, kt = {
34
46
  key: 0,
35
47
  class: "text-red-500 text-[14px]"
36
- }, kt = {
48
+ }, _t = {
37
49
  key: 1,
38
50
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
39
- }, _t = /* @__PURE__ */ A({
51
+ }, $t = /* @__PURE__ */ A({
40
52
  __name: "vs-layout-horizontal",
41
53
  props: {
42
54
  ua: { default: "" },
55
+ uk: {},
56
+ en: {},
57
+ de: {},
58
+ es: {},
59
+ fr: {},
43
60
  item: { default: () => ({}) },
44
61
  error: { type: [String, Boolean], default: "" },
45
62
  label: { default: "" }
46
63
  },
47
64
  setup(o) {
48
- return (e, l) => (i(), u("div", yt, [
49
- e.item?.type !== "html" ? (i(), u("span", xt, [
65
+ return (e, t) => (i(), u("div", xt, [
66
+ e.item?.type !== "html" ? (i(), u("span", wt, [
50
67
  oe(E(e.ua || e.label) + " ", 1),
51
- e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", wt, "*")) : S("", !0)
52
- ])) : S("", !0),
53
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
54
- e.error ? (i(), u("span", kt, E(e.error), 1)) : S("", !0)
68
+ e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", kt, "*")) : B("", !0)
69
+ ])) : B("", !0),
70
+ he(e.$slots, "default", Oe(De(e.$attrs))),
71
+ e.error ? (i(), u("span", _t, E(e.error), 1)) : B("", !0)
55
72
  ]));
56
73
  }
57
- }), $t = { class: "w-full relative" }, Ct = {
74
+ }), Ct = { class: "w-full relative" }, Vt = {
58
75
  key: 0,
59
76
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
60
- }, Vt = /* @__PURE__ */ A({
77
+ }, Mt = /* @__PURE__ */ A({
61
78
  __name: "vs-layout-inline",
62
79
  props: {
63
80
  ua: { default: "" },
81
+ uk: {},
82
+ en: {},
83
+ de: {},
84
+ es: {},
85
+ fr: {},
64
86
  item: { default: () => ({}) },
65
87
  error: { type: [String, Boolean], default: "" },
66
88
  label: { default: "" }
67
89
  },
68
90
  setup(o) {
69
- return (e, l) => (i(), u("div", $t, [
70
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
71
- e.error ? (i(), u("span", Ct, E(e.error), 1)) : S("", !0)
91
+ return (e, t) => (i(), u("div", Ct, [
92
+ he(e.$slots, "default", Oe(De(e.$attrs))),
93
+ e.error ? (i(), u("span", Vt, E(e.error), 1)) : B("", !0)
72
94
  ]));
73
95
  }
74
- }), Mt = {
75
- default: bt,
76
- horizontal: _t,
77
- inline: Vt
96
+ }), Lt = {
97
+ default: yt,
98
+ horizontal: $t,
99
+ inline: Mt
78
100
  };
79
- function me(o) {
101
+ function ge(o) {
80
102
  return {
81
- inputClass: D(() => {
82
- const l = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
83
- return o?.size === "sm" ? `${l}h-[32px]` : `${l}h-[38px]`;
103
+ inputClass: O(() => {
104
+ const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
105
+ return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
84
106
  })
85
107
  };
86
108
  }
87
- const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
109
+ const St = ["placeholder", "disabled"], qe = /* @__PURE__ */ A({
88
110
  __name: "vs-input-text",
89
- props: /* @__PURE__ */ q({
111
+ props: /* @__PURE__ */ K({
90
112
  style: { default: () => ({}) },
91
113
  customClass: { default: "" },
92
114
  disabled: { type: Boolean, default: !1 },
@@ -100,23 +122,23 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
100
122
  }),
101
123
  emits: ["update:modelValue"],
102
124
  setup(o) {
103
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
104
- return (r, a) => K((i(), u("input", {
125
+ const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
126
+ return (r, a) => G((i(), u("input", {
105
127
  type: "text",
106
128
  "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
107
129
  placeholder: r.placeholder,
108
130
  disabled: r.disabled,
109
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
131
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t), { "!border-red-600": r.error }]]),
110
132
  style: {
111
133
  border: "1px solid #CFD9E0"
112
134
  }
113
- }, null, 10, Lt)), [
114
- [ne, n.value]
135
+ }, null, 10, St)), [
136
+ [ie, n.value]
115
137
  ]);
116
138
  }
117
- }), Bt = ["placeholder"], St = /* @__PURE__ */ A({
139
+ }), Bt = ["placeholder"], jt = /* @__PURE__ */ A({
118
140
  __name: "vs-input-number",
119
- props: /* @__PURE__ */ q({
141
+ props: /* @__PURE__ */ K({
120
142
  style: { default: () => ({}) },
121
143
  customClass: {},
122
144
  disabled: { type: Boolean },
@@ -130,26 +152,26 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
130
152
  }),
131
153
  emits: ["update:modelValue"],
132
154
  setup(o) {
133
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
134
- return (r, a) => K((i(), u("input", {
155
+ const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
156
+ return (r, a) => G((i(), u("input", {
135
157
  type: "number",
136
158
  step: "any",
137
159
  "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
138
160
  placeholder: r.placeholder,
139
- class: B(["py-1.5 px-3 block w-full", [H(l)]]),
161
+ class: S(["py-1.5 px-3 block w-full", [q(t)]]),
140
162
  style: {
141
163
  border: "1px solid #CFD9E0"
142
164
  }
143
165
  }, null, 10, Bt)), [
144
- [ne, n.value]
166
+ [ie, n.value]
145
167
  ]);
146
168
  }
147
169
  }), R = (o, e) => {
148
- const l = o.__vccOpts || o;
170
+ const t = o.__vccOpts || o;
149
171
  for (const [n, r] of e)
150
- l[n] = r;
151
- return l;
152
- }, jt = {}, It = {
172
+ t[n] = r;
173
+ return t;
174
+ }, It = {}, At = {
153
175
  xmlns: "http://www.w3.org/2000/svg",
154
176
  viewBox: "0 0 24 24",
155
177
  fill: "none",
@@ -159,17 +181,17 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
159
181
  "stroke-linejoin": "round",
160
182
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
161
183
  };
162
- function At(o, e) {
163
- return i(), u("svg", It, e[0] || (e[0] = [
164
- t("path", {
184
+ function zt(o, e) {
185
+ return i(), u("svg", At, e[0] || (e[0] = [
186
+ l("path", {
165
187
  stroke: "none",
166
188
  d: "M0 0h24v24H0z",
167
189
  fill: "none"
168
190
  }, null, -1),
169
- t("path", { d: "M5 12l5 5l10 -10" }, null, -1)
191
+ l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
170
192
  ]));
171
193
  }
172
- const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-center gap-[4px]" }, Et = ["value", "id", "disabled"], Ft = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ A({
194
+ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-center gap-[4px]" }, Ot = ["value", "id", "disabled"], Dt = ["for"], Ut = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Tt = /* @__PURE__ */ A({
173
195
  __name: "vs-checkbox-default",
174
196
  props: {
175
197
  value: { default: "" },
@@ -182,45 +204,45 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
182
204
  },
183
205
  emits: ["update:modelValue"],
184
206
  setup(o, { emit: e }) {
185
- const l = e, n = o, r = D({
207
+ const t = e, n = o, r = O({
186
208
  get: () => n.modelValue,
187
- set: (a) => l("update:modelValue", a)
209
+ set: (a) => t("update:modelValue", a)
188
210
  });
189
- return (a, s) => (i(), u("div", Ot, [
190
- K(t("input", {
211
+ return (a, s) => (i(), u("div", Ft, [
212
+ G(l("input", {
191
213
  type: "checkbox",
192
214
  value: a.value,
193
215
  "onUpdate:modelValue": s[0] || (s[0] = (d) => r.value = d),
194
- class: B(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
216
+ class: S(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
195
217
  id: a.id,
196
218
  disabled: a.disabled
197
- }, null, 10, Et), [
198
- [Qe, r.value]
219
+ }, null, 10, Ot), [
220
+ [Xe, r.value]
199
221
  ]),
200
- t("label", {
222
+ l("label", {
201
223
  for: a.id,
202
- class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
224
+ class: S(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
203
225
  }, [
204
- t("div", {
205
- class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
226
+ l("div", {
227
+ class: S(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
206
228
  }, [
207
- j(zt, {
229
+ j(Et, {
208
230
  height: "12",
209
231
  width: "12"
210
232
  })
211
233
  ], 2),
212
- t("span", Dt, [
213
- ve(a.$slots, "default", {}, () => [
234
+ l("span", Ut, [
235
+ he(a.$slots, "default", {}, () => [
214
236
  oe(E(a.label), 1)
215
237
  ])
216
238
  ])
217
- ], 10, Ft)
239
+ ], 10, Dt)
218
240
  ]));
219
241
  }
220
- }), Tt = ["name", "value", "disabled"], Rt = { class: "flex items-center gap-[6px] text-[14px]" }, Pt = {
242
+ }), Rt = ["name", "value", "disabled"], Pt = { class: "flex items-center gap-[6px] text-[14px]" }, Nt = {
221
243
  key: 0,
222
244
  class: "text-[16px]"
223
- }, Nt = ["src"], Ht = /* @__PURE__ */ A({
245
+ }, Ht = ["src"], qt = /* @__PURE__ */ A({
224
246
  __name: "vs-checkbox-buttons",
225
247
  props: {
226
248
  value: { type: [String, Number, Boolean], default: "" },
@@ -234,46 +256,46 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
234
256
  },
235
257
  emits: ["update:modelValue"],
236
258
  setup(o, { emit: e }) {
237
- const l = o, n = e, r = D({
238
- get: () => l.modelValue,
259
+ const t = o, n = e, r = O({
260
+ get: () => t.modelValue,
239
261
  set: (d) => {
240
262
  n("update:modelValue", d);
241
263
  }
242
- }), a = D(() => Array.isArray(r.value) ? r.value.includes(l.value) : r.value === !0 || r.value === l.value), s = D(() => l.style?.size === "xs" ? "p-1.5 text-xs" : l.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
264
+ }), a = O(() => Array.isArray(r.value) ? r.value.includes(t.value) : r.value === !0 || r.value === t.value), s = O(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
243
265
  return (d, p) => (i(), u("label", {
244
- class: B(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [s.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
266
+ class: S(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [s.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
245
267
  }, [
246
- K(t("input", {
268
+ G(l("input", {
247
269
  type: "checkbox",
248
270
  class: "hidden",
249
271
  name: d.id,
250
272
  value: d.value,
251
273
  "onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
252
274
  disabled: d.disabled
253
- }, null, 8, Tt), [
254
- [Qe, r.value]
275
+ }, null, 8, Rt), [
276
+ [Xe, r.value]
255
277
  ]),
256
- t("span", Rt, [
257
- d.icon || d.imgUrl ? (i(), u("span", Pt, [
278
+ l("span", Pt, [
279
+ d.icon || d.imgUrl ? (i(), u("span", Nt, [
258
280
  d.icon ? (i(), u("i", {
259
281
  key: 0,
260
- class: B(d.icon)
261
- }, null, 2)) : S("", !0),
282
+ class: S(d.icon)
283
+ }, null, 2)) : B("", !0),
262
284
  d.imgUrl ? (i(), u("img", {
263
285
  key: 1,
264
286
  src: d.imgUrl,
265
287
  width: "16",
266
288
  height: "16",
267
289
  alt: "icon"
268
- }, null, 8, Nt)) : S("", !0)
269
- ])) : S("", !0),
270
- ve(d.$slots, "default", {}, () => [
290
+ }, null, 8, Ht)) : B("", !0)
291
+ ])) : B("", !0),
292
+ he(d.$slots, "default", {}, () => [
271
293
  oe(E(d.label), 1)
272
294
  ])
273
295
  ])
274
296
  ], 2));
275
297
  }
276
- }), qt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
298
+ }), Gt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
277
299
  __name: "vs-input-checkbox-item",
278
300
  props: {
279
301
  value: { default: "" },
@@ -290,18 +312,18 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
290
312
  },
291
313
  emits: ["update:modelValue"],
292
314
  setup(o, { emit: e }) {
293
- const l = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
294
- get: () => Array.isArray(l.modelValue) ? Array.isArray(l.modelValue) && l.modelValue.includes(l.value) : l.modelValue,
315
+ const t = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = O({
316
+ get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
295
317
  set: (d) => {
296
- if (Array.isArray(l.modelValue)) {
297
- let p = [...l.modelValue];
298
- d ? p.includes(l.value) || p.push(l.value) : p = p.filter((f) => f !== l.value), n("update:modelValue", p);
318
+ if (Array.isArray(t.modelValue)) {
319
+ let p = [...t.modelValue];
320
+ d ? p.includes(t.value) || p.push(t.value) : p = p.filter((f) => f !== t.value), n("update:modelValue", p);
299
321
  } else
300
322
  n("update:modelValue", d);
301
323
  }
302
- }), s = $(`vs-checkbox-${l.view || "default"}`);
303
- return (d, p) => (i(), u("div", qt, [
304
- (i(), X(xe(s.value === "vs-checkbox-buttons" ? H(Ht) : H(Ut)), {
324
+ }), s = k(`vs-checkbox-${t.view || "default"}`);
325
+ return (d, p) => (i(), u("div", Gt, [
326
+ (i(), X(we(s.value === "vs-checkbox-buttons" ? q(qt) : q(Tt)), {
305
327
  value: d.value,
306
328
  label: d.label,
307
329
  info: d.option?.info,
@@ -311,17 +333,17 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
311
333
  id: r,
312
334
  icon: d.icon,
313
335
  imgUrl: d.imgUrl,
314
- style: fe(d.style),
336
+ style: me(d.style),
315
337
  error: d.error
316
338
  }, {
317
- default: Me(() => [
339
+ default: Le(() => [
318
340
  oe(E(d.label), 1)
319
341
  ]),
320
342
  _: 1
321
343
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
322
344
  ]));
323
345
  }
324
- }), Gt = {}, Jt = {
346
+ }), Jt = {}, Kt = {
325
347
  xmlns: "http://www.w3.org/2000/svg",
326
348
  viewBox: "0 0 24 24",
327
349
  fill: "none",
@@ -331,17 +353,17 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
331
353
  "stroke-linejoin": "round",
332
354
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
333
355
  };
334
- function Kt(o, e) {
335
- return i(), u("svg", Jt, e[0] || (e[0] = [
336
- t("path", {
356
+ function Zt(o, e) {
357
+ return i(), u("svg", Kt, e[0] || (e[0] = [
358
+ l("path", {
337
359
  stroke: "none",
338
360
  d: "M0 0h24v24H0z",
339
361
  fill: "none"
340
362
  }, null, -1),
341
- t("path", { d: "M6 9l6 6l6 -6" }, null, -1)
363
+ l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
342
364
  ]));
343
365
  }
344
- const Zt = /* @__PURE__ */ R(Gt, [["render", Kt]]), Wt = {}, Qt = {
366
+ const Wt = /* @__PURE__ */ R(Jt, [["render", Zt]]), Qt = {}, Xt = {
345
367
  xmlns: "http://www.w3.org/2000/svg",
346
368
  width: "24",
347
369
  height: "24",
@@ -352,27 +374,27 @@ const Zt = /* @__PURE__ */ R(Gt, [["render", Kt]]), Wt = {}, Qt = {
352
374
  "stroke-linecap": "round",
353
375
  "stroke-linejoin": "round"
354
376
  };
355
- function Xt(o, e) {
356
- return i(), u("svg", Qt, e[0] || (e[0] = [
357
- t("path", {
377
+ function Yt(o, e) {
378
+ return i(), u("svg", Xt, e[0] || (e[0] = [
379
+ l("path", {
358
380
  stroke: "none",
359
381
  d: "M0 0h24v24H0z",
360
382
  fill: "none"
361
383
  }, null, -1),
362
- t("path", { d: "M12 9h.01" }, null, -1),
363
- t("path", { d: "M11 12h1v4h1" }, null, -1),
364
- t("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
384
+ l("path", { d: "M12 9h.01" }, null, -1),
385
+ l("path", { d: "M11 12h1v4h1" }, null, -1),
386
+ l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
365
387
  ]));
366
388
  }
367
- const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
389
+ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
368
390
  key: 0,
369
391
  class: "flex items-start gap-x-1"
370
- }, tl = {
392
+ }, ll = {
371
393
  key: 0,
372
394
  class: "text-red-500 text-[14px]"
373
- }, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */ A({
395
+ }, ol = ["title"], al = ["disabled"], lt = /* @__PURE__ */ A({
374
396
  __name: "vs-input-switcher",
375
- props: /* @__PURE__ */ q({
397
+ props: /* @__PURE__ */ K({
376
398
  rules: { default: () => [] },
377
399
  view: { default: "checkbox" },
378
400
  label: { default: "" },
@@ -391,15 +413,15 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
391
413
  }),
392
414
  emits: ["update:modelValue"],
393
415
  setup(o) {
394
- const e = o, l = G(o, "modelValue");
395
- return (n, r) => e.view === "checkbox" ? (i(), u("div", el, [
416
+ const e = o, t = Z(o, "modelValue");
417
+ return (n, r) => e.view === "checkbox" ? (i(), u("div", tl, [
396
418
  j(tt, {
397
- modelValue: l.value,
398
- "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
419
+ modelValue: t.value,
420
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
399
421
  label: n.text,
400
422
  error: n.error || ""
401
423
  }, null, 8, ["modelValue", "label", "error"]),
402
- n.rules?.includes("required") ? (i(), u("span", tl, "*")) : S("", !0),
424
+ n.rules?.includes("required") ? (i(), u("span", ll, "*")) : B("", !0),
403
425
  n.i ? (i(), u("button", {
404
426
  key: 1,
405
427
  class: "cursor-pointer",
@@ -407,22 +429,22 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
407
429
  onClick: r[1] || (r[1] = re(() => {
408
430
  }, ["prevent"]))
409
431
  }, [
410
- j(H(Yt), { class: "text-gray-500 w-[14px] h-[14px]" })
411
- ], 8, ll)) : S("", !0)
432
+ j(q(el), { class: "text-gray-500 w-[14px] h-[14px]" })
433
+ ], 8, ol)) : B("", !0)
412
434
  ])) : (i(), u("button", {
413
435
  key: 1,
414
436
  type: "button",
415
- class: B(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [l.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
437
+ class: S(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
416
438
  disabled: n.disabled,
417
- onClick: r[2] || (r[2] = (a) => l.value = !l.value)
439
+ onClick: r[2] || (r[2] = (a) => t.value = !t.value)
418
440
  }, [
419
- t("span", {
441
+ l("span", {
420
442
  "data-state": "checked",
421
- class: B(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [l.value ? "translate-x-4" : "translate-x-0"]])
443
+ class: S(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
422
444
  }, null, 2)
423
- ], 10, ol));
445
+ ], 10, al));
424
446
  }
425
- }), al = ["innerHTML"], qe = /* @__PURE__ */ A({
447
+ }), rl = ["innerHTML"], Ge = /* @__PURE__ */ A({
426
448
  __name: "vs-input-static",
427
449
  props: {
428
450
  text: { default: "" },
@@ -436,14 +458,14 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
436
458
  placeholder: {}
437
459
  },
438
460
  setup(o) {
439
- return (e, l) => (i(), u("div", {
440
- class: B(e.customClass),
461
+ return (e, t) => (i(), u("div", {
462
+ class: S(e.customClass),
441
463
  innerHTML: e.html ? e.html : e.text
442
- }, null, 10, al));
464
+ }, null, 10, rl));
443
465
  }
444
- }), rl = ["placeholder", "disabled", "name"], sl = /* @__PURE__ */ A({
466
+ }), sl = ["placeholder", "disabled", "name"], nl = /* @__PURE__ */ A({
445
467
  __name: "vs-input-mask",
446
- props: /* @__PURE__ */ q({
468
+ props: /* @__PURE__ */ K({
447
469
  name: {},
448
470
  mask: { default: "" },
449
471
  unmask: { type: Boolean, default: !1 },
@@ -459,9 +481,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
459
481
  }),
460
482
  emits: ["update:modelValue"],
461
483
  setup(o) {
462
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"), r = $(null);
484
+ const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue"), r = k(null);
463
485
  let a = null;
464
- return ue(async () => {
486
+ return ne(async () => {
465
487
  if (r.value) {
466
488
  const { default: s } = await import("./index-W-qQIppj.js");
467
489
  a = s(r.value, {
@@ -499,15 +521,15 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
499
521
  placeholder: s.placeholder,
500
522
  disabled: s.disabled,
501
523
  name: s.name,
502
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
524
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t)]]),
503
525
  style: {
504
526
  border: "1px solid #CFD9E0"
505
527
  }
506
- }, null, 10, rl));
528
+ }, null, 10, sl));
507
529
  }
508
- }), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */ A({
530
+ }), il = { class: "relative w-full bg-white rounded-lg" }, ul = ["placeholder", "disabled"], dl = /* @__PURE__ */ A({
509
531
  __name: "vs-input-email",
510
- props: /* @__PURE__ */ q({
532
+ props: /* @__PURE__ */ K({
511
533
  style: { default: () => ({}) },
512
534
  customClass: { default: "" },
513
535
  disabled: { type: Boolean, default: !1 },
@@ -521,26 +543,26 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
521
543
  }),
522
544
  emits: ["update:modelValue"],
523
545
  setup(o) {
524
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
525
- return (r, a) => (i(), u("div", nl, [
546
+ const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
547
+ return (r, a) => (i(), u("div", il, [
526
548
  a[1] || (a[1] = ae('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><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" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
527
- K(t("input", {
549
+ G(l("input", {
528
550
  type: "email",
529
551
  "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
530
552
  placeholder: r.placeholder,
531
553
  disabled: r.disabled,
532
- class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
554
+ class: S(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t), { "!border-red-600": r.error }]]),
533
555
  style: {
534
556
  border: "1px solid #CFD9E0"
535
557
  }
536
- }, null, 10, il), [
537
- [ne, n.value]
558
+ }, null, 10, ul), [
559
+ [ie, n.value]
538
560
  ])
539
561
  ]));
540
562
  }
541
- }), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */ A({
563
+ }), cl = ["value", "disabled"], pl = { class: "text-[13px] text-gray-700" }, fl = /* @__PURE__ */ A({
542
564
  __name: "vs-input-radio-default",
543
- props: /* @__PURE__ */ q({
565
+ props: /* @__PURE__ */ K({
544
566
  style: {},
545
567
  customClass: { default: "" },
546
568
  disabled: { type: Boolean, default: !1 },
@@ -556,36 +578,36 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
556
578
  }),
557
579
  emits: ["update:modelValue"],
558
580
  setup(o) {
559
- const e = G(o, "modelValue");
560
- return (l, n) => (i(), u("label", {
561
- class: B(["flex items-center gap-0", [l.customClass]])
581
+ const e = Z(o, "modelValue");
582
+ return (t, n) => (i(), u("label", {
583
+ class: S(["flex items-center gap-0", [t.customClass]])
562
584
  }, [
563
- K(t("input", {
585
+ G(l("input", {
564
586
  "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
565
587
  type: "radio",
566
- value: l.value,
567
- disabled: l.disabled,
588
+ value: t.value,
589
+ disabled: t.disabled,
568
590
  class: "hidden"
569
- }, null, 8, dl), [
570
- [Xe, e.value]
591
+ }, null, 8, cl), [
592
+ [Ye, e.value]
571
593
  ]),
572
- t("span", {
573
- class: B(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
574
- `border-${l.style?.primaryColor || "blue"}-500`,
575
- l.disabled ? "opacity-50 cursor-not-allowed" : ""
594
+ l("span", {
595
+ class: S(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
596
+ `border-${t.style?.primaryColor || "blue"}-500`,
597
+ t.disabled ? "opacity-50 cursor-not-allowed" : ""
576
598
  ]])
577
599
  }, [
578
- e.value == l.value ? (i(), u("span", {
600
+ e.value == t.value ? (i(), u("span", {
579
601
  key: 0,
580
- class: B(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${l.style?.primaryColor || "blue"}-500`]])
581
- }, null, 2)) : S("", !0)
602
+ class: S(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
603
+ }, null, 2)) : B("", !0)
582
604
  ], 2),
583
- t("span", cl, E(l.text), 1)
605
+ l("span", pl, E(t.text), 1)
584
606
  ], 2));
585
607
  }
586
- }), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */ A({
608
+ }), vl = ["value", "disabled"], ml = { class: "text-[13px] text-gray-700" }, hl = /* @__PURE__ */ A({
587
609
  __name: "vs-input-radio-buttons",
588
- props: /* @__PURE__ */ q({
610
+ props: /* @__PURE__ */ K({
589
611
  style: {},
590
612
  customClass: { default: "" },
591
613
  disabled: { type: Boolean, default: !1 },
@@ -601,31 +623,31 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
601
623
  }),
602
624
  emits: ["update:modelValue"],
603
625
  setup(o) {
604
- const e = G(o, "modelValue");
605
- return (l, n) => (i(), u("label", {
606
- class: B(["flex items-center border rounded-lg px-2 py-1", [
607
- e.value == l.value ? `ring-2 ring-ring ring-${l.style?.primaryColor || "blue"}-500` : "",
608
- l.customClass
626
+ const e = Z(o, "modelValue");
627
+ return (t, n) => (i(), u("label", {
628
+ class: S(["flex items-center border rounded-lg px-2 py-1", [
629
+ e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
630
+ t.customClass
609
631
  ]])
610
632
  }, [
611
- K(t("input", {
633
+ G(l("input", {
612
634
  "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
613
635
  type: "radio",
614
- value: l.value,
615
- disabled: l.disabled,
636
+ value: t.value,
637
+ disabled: t.disabled,
616
638
  class: "hidden"
617
- }, null, 8, fl), [
618
- [Xe, e.value]
639
+ }, null, 8, vl), [
640
+ [Ye, e.value]
619
641
  ]),
620
- t("span", vl, E(l.text), 1)
642
+ l("span", ml, E(t.text), 1)
621
643
  ], 2));
622
644
  }
623
- }), hl = {
624
- "vs-input-radio-default": pl,
625
- "vs-input-radio-buttons": ml
626
- }, Ge = /* @__PURE__ */ A({
645
+ }), gl = {
646
+ "vs-input-radio-default": fl,
647
+ "vs-input-radio-buttons": hl
648
+ }, Je = /* @__PURE__ */ A({
627
649
  __name: "vs-input-radio",
628
- props: /* @__PURE__ */ q({
650
+ props: /* @__PURE__ */ K({
629
651
  options: {},
630
652
  position: { default: "vertical" },
631
653
  view: { default: "default" },
@@ -642,21 +664,21 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
642
664
  }),
643
665
  emits: ["update:modelValue"],
644
666
  setup(o) {
645
- const e = o, l = G(o, "modelValue"), n = D(() => hl[`vs-input-radio-${e.view}`]);
667
+ const e = o, t = Z(o, "modelValue"), n = O(() => gl[`vs-input-radio-${e.view}`]);
646
668
  return (r, a) => (i(), u("div", {
647
- class: B([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
669
+ class: S([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
648
670
  }, [
649
- (i(!0), u(Q, null, Y(r.options, (s) => (i(), X(xe(n.value), Ce({
671
+ (i(!0), u(Q, null, Y(r.options, (s) => (i(), X(we(n.value), Ve({
650
672
  key: s?.id,
651
673
  text: s.text,
652
674
  value: s.id.toString(),
653
- checked: l.value === s.id,
654
- modelValue: l.value,
655
- "onUpdate:modelValue": a[0] || (a[0] = (d) => l.value = d)
675
+ checked: t.value === s.id,
676
+ modelValue: t.value,
677
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => t.value = d)
656
678
  }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
657
679
  ], 2));
658
680
  }
659
- }), gl = /* @__PURE__ */ A({
681
+ }), bl = /* @__PURE__ */ A({
660
682
  __name: "vs-input-checkbox",
661
683
  props: {
662
684
  options: { default: () => [] },
@@ -675,16 +697,16 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
675
697
  },
676
698
  emits: ["update:modelValue"],
677
699
  setup(o, { emit: e }) {
678
- const l = o, n = e, r = $([]), a = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
700
+ const t = o, n = e, r = k([]), a = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
679
701
  try {
680
- const c = await fetch(`/api/suggest/${l.data}`).then((g) => g.json());
702
+ const c = await fetch(`/api/suggest/${t.data}`).then((g) => g.json());
681
703
  r.value = c?.data || c;
682
704
  } catch (c) {
683
705
  console.error(c);
684
706
  }
685
707
  };
686
708
  return se(
687
- () => l.modelValue,
709
+ () => t.modelValue,
688
710
  (c) => {
689
711
  if (typeof c == "boolean" && r.value.length === 1) {
690
712
  const g = s(r.value[0]);
@@ -711,14 +733,14 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
711
733
  n("update:modelValue", c.length === 0 ? null : c);
712
734
  },
713
735
  { deep: !0 }
714
- ), ue(() => {
715
- if (l.data)
736
+ ), ne(() => {
737
+ if (t.data)
716
738
  f().then(() => {
717
- if (typeof l.modelValue == "boolean" && r.value.length === 1) {
739
+ if (typeof t.modelValue == "boolean" && r.value.length === 1) {
718
740
  const c = s(r.value[0]);
719
- a[c] = l.modelValue;
720
- } else if (Array.isArray(l.modelValue)) {
721
- const c = new Set(l.modelValue);
741
+ a[c] = t.modelValue;
742
+ } else if (Array.isArray(t.modelValue)) {
743
+ const c = new Set(t.modelValue);
722
744
  r.value.forEach((g) => {
723
745
  if (!g.disabled) {
724
746
  const v = s(g);
@@ -727,11 +749,11 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
727
749
  });
728
750
  }
729
751
  });
730
- else if (r.value = l.options, typeof l.modelValue == "boolean" && r.value.length === 1) {
752
+ else if (r.value = t.options, typeof t.modelValue == "boolean" && r.value.length === 1) {
731
753
  const c = s(r.value[0]);
732
- a[c] = l.modelValue;
733
- } else if (Array.isArray(l.modelValue)) {
734
- const c = new Set(l.modelValue);
754
+ a[c] = t.modelValue;
755
+ } else if (Array.isArray(t.modelValue)) {
756
+ const c = new Set(t.modelValue);
735
757
  r.value.forEach((g) => {
736
758
  if (!g.disabled) {
737
759
  const v = s(g);
@@ -740,13 +762,13 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
740
762
  });
741
763
  }
742
764
  }), (c, g) => (i(), u("div", {
743
- class: B(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
765
+ class: S(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
744
766
  }, [
745
767
  (i(!0), u(Q, null, Y(r.value, (v) => (i(), X(tt, {
746
768
  modelValue: a[s(v)],
747
769
  "onUpdate:modelValue": (M) => a[s(v)] = M,
748
770
  value: s(v),
749
- class: B(p(c.colSpan)),
771
+ class: S(p(c.colSpan)),
750
772
  disabled: v.disabled,
751
773
  label: d(v),
752
774
  key: s(v),
@@ -757,9 +779,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
757
779
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
758
780
  ], 2));
759
781
  }
760
- }), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-54f9e19c"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ A({
782
+ }), yl = /* @__PURE__ */ R(bl, [["__scopeId", "data-v-54f9e19c"]]), xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ A({
761
783
  __name: "vs-input-date1",
762
- props: /* @__PURE__ */ q({
784
+ props: {
763
785
  style: { default: () => ({}) },
764
786
  customClass: { default: "" },
765
787
  disabled: { type: Boolean, default: !1 },
@@ -767,58 +789,59 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
767
789
  error: {},
768
790
  name: {},
769
791
  placeholder: { default: "" }
770
- }, {
771
- modelValue: { default: "" },
772
- modelModifiers: {}
773
- }),
792
+ },
774
793
  emits: ["update:modelValue"],
775
- setup(o) {
776
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
777
- return (r, a) => K((i(), u("input", {
794
+ setup(o, { emit: e }) {
795
+ const t = o, { inputClass: n } = ge(t.style), r = e, a = O({
796
+ get: () => t.modelValue?.split(" ")[0],
797
+ set: (s) => r("update:modelValue", s)
798
+ });
799
+ return (s, d) => G((i(), u("input", {
778
800
  type: "date",
779
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
780
- placeholder: r.placeholder,
781
- disabled: r.disabled,
782
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
801
+ "onUpdate:modelValue": d[0] || (d[0] = (p) => a.value = p),
802
+ placeholder: s.placeholder,
803
+ disabled: s.disabled,
804
+ ref: "date",
805
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [s.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
783
806
  style: {
784
807
  border: "1px solid #CFD9E0"
785
808
  }
786
- }, null, 10, yl)), [
787
- [ne, n.value]
809
+ }, null, 10, xl)), [
810
+ [ie, a.value]
788
811
  ]);
789
812
  }
790
- }), wl = async (o, e, l, n) => {
813
+ }), kl = async (o, e, t, n) => {
791
814
  try {
792
815
  const r = new FormData();
793
816
  return r.append("unique", "true"), r.append("file", o), (await fetch(
794
- `/file/upload/uploads?id=${e || ""}&form=${l || ""}&table=${n || ""}`,
817
+ `/file/upload/uploads?id=${e || ""}&form=${t || ""}&table=${n || ""}`,
795
818
  {
796
819
  method: "POST",
797
820
  body: r
798
821
  }
799
822
  ).then((s) => s.json()))?.result;
800
823
  } catch (r) {
801
- return pe({
824
+ return ve({
802
825
  type: "error",
803
826
  title: "Помилка!",
804
827
  message: "Сталась помилка під час завантаження файлу",
805
828
  position: "right-bottom"
806
829
  }), console.error("Сталась помилка завантаження файлу", r), null;
807
830
  }
808
- }, kl = async (o) => {
831
+ }, _l = async (o) => {
809
832
  try {
810
833
  return await fetch(`file/delete${o}`), !0;
811
834
  } catch (e) {
812
835
  return console.error(e), !1;
813
836
  }
814
- }, Je = async (o) => {
837
+ }, Ke = async (o) => {
815
838
  try {
816
- const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(l), a = new Blob([r], { type: n }), s = document.createElement("a");
839
+ const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(t), a = new Blob([r], { type: n }), s = document.createElement("a");
817
840
  s.setAttribute("download", o), s.href = window.URL.createObjectURL(a), s.click();
818
841
  } catch (e) {
819
842
  console.error(e.message);
820
843
  }
821
- }, _l = {}, $l = {
844
+ }, $l = {}, Cl = {
822
845
  xmlns: "http://www.w3.org/2000/svg",
823
846
  width: "24",
824
847
  height: "24",
@@ -829,13 +852,13 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
829
852
  "stroke-linecap": "round",
830
853
  "stroke-linejoin": "round"
831
854
  };
832
- function Cl(o, e) {
833
- return i(), u("svg", $l, e[0] || (e[0] = [
834
- t("path", { d: "M5 12h14" }, null, -1),
835
- t("path", { d: "M12 5v14" }, null, -1)
855
+ function Vl(o, e) {
856
+ return i(), u("svg", Cl, e[0] || (e[0] = [
857
+ l("path", { d: "M5 12h14" }, null, -1),
858
+ l("path", { d: "M12 5v14" }, null, -1)
836
859
  ]));
837
860
  }
838
- const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
861
+ const je = /* @__PURE__ */ R($l, [["render", Vl]]), Ml = {}, Ll = {
839
862
  xmlns: "http://www.w3.org/2000/svg",
840
863
  class: "icon icon-tabler icon-tabler-file-text",
841
864
  width: "44",
@@ -847,12 +870,12 @@ const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
847
870
  "stroke-linecap": "round",
848
871
  "stroke-linejoin": "round"
849
872
  };
850
- function Ll(o, e, l, n, r, a) {
851
- return i(), u("svg", Ml, e[0] || (e[0] = [
873
+ function Sl(o, e, t, n, r, a) {
874
+ return i(), u("svg", Ll, e[0] || (e[0] = [
852
875
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
853
876
  ]));
854
877
  }
855
- const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
878
+ const Bl = /* @__PURE__ */ R(Ml, [["render", Sl]]), jl = {}, Il = {
856
879
  xmlns: "http://www.w3.org/2000/svg",
857
880
  class: "icon icon-tabler icon-tabler-table",
858
881
  width: "44",
@@ -864,27 +887,27 @@ const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
864
887
  "stroke-linecap": "round",
865
888
  "stroke-linejoin": "round"
866
889
  };
867
- function Il(o, e, l, n, r, a) {
868
- return i(), u("svg", jl, e[0] || (e[0] = [
869
- t("path", {
890
+ function Al(o, e, t, n, r, a) {
891
+ return i(), u("svg", Il, e[0] || (e[0] = [
892
+ l("path", {
870
893
  stroke: "none",
871
894
  d: "M0 0h24v24H0z",
872
895
  fill: "none"
873
896
  }, null, -1),
874
- t("rect", {
897
+ l("rect", {
875
898
  x: "4",
876
899
  y: "4",
877
900
  width: "16",
878
901
  height: "16",
879
902
  rx: "2"
880
903
  }, null, -1),
881
- t("line", {
904
+ l("line", {
882
905
  x1: "4",
883
906
  y1: "10",
884
907
  x2: "20",
885
908
  y2: "10"
886
909
  }, null, -1),
887
- t("line", {
910
+ l("line", {
888
911
  x1: "10",
889
912
  y1: "4",
890
913
  x2: "10",
@@ -892,7 +915,7 @@ function Il(o, e, l, n, r, a) {
892
915
  }, null, -1)
893
916
  ]));
894
917
  }
895
- const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
918
+ const zl = /* @__PURE__ */ R(jl, [["render", Al]]), El = {}, Fl = {
896
919
  xmlns: "http://www.w3.org/2000/svg",
897
920
  width: "24",
898
921
  height: "24",
@@ -904,12 +927,12 @@ const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
904
927
  "stroke-linejoin": "round",
905
928
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
906
929
  };
907
- function El(o, e, l, n, r, a) {
908
- return i(), u("svg", Ol, e[0] || (e[0] = [
930
+ function Ol(o, e, t, n, r, a) {
931
+ return i(), u("svg", Fl, e[0] || (e[0] = [
909
932
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
910
933
  ]));
911
934
  }
912
- const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
935
+ const Dl = /* @__PURE__ */ R(El, [["render", Ol]]), Ul = {}, Tl = {
913
936
  xmlns: "http://www.w3.org/2000/svg",
914
937
  class: "icon icon-tabler icon-tabler-file-zip",
915
938
  width: "44",
@@ -921,12 +944,12 @@ const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
921
944
  "stroke-linecap": "round",
922
945
  "stroke-linejoin": "round"
923
946
  };
924
- function Tl(o, e, l, n, r, a) {
925
- return i(), u("svg", Ul, e[0] || (e[0] = [
947
+ function Rl(o, e, t, n, r, a) {
948
+ return i(), u("svg", Tl, e[0] || (e[0] = [
926
949
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
927
950
  ]));
928
951
  }
929
- const Rl = /* @__PURE__ */ R(Dl, [["render", Tl]]), Pl = {}, Nl = {
952
+ const Pl = /* @__PURE__ */ R(Ul, [["render", Rl]]), Nl = {}, Hl = {
930
953
  xmlns: "http://www.w3.org/2000/svg",
931
954
  class: "icon icon-tabler icon-tabler-file-code",
932
955
  width: "44",
@@ -938,25 +961,25 @@ const Rl = /* @__PURE__ */ R(Dl, [["render", Tl]]), Pl = {}, Nl = {
938
961
  "stroke-linecap": "round",
939
962
  "stroke-linejoin": "round"
940
963
  };
941
- function Hl(o, e, l, n, r, a) {
942
- return i(), u("svg", Nl, e[0] || (e[0] = [
964
+ function ql(o, e, t, n, r, a) {
965
+ return i(), u("svg", Hl, e[0] || (e[0] = [
943
966
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
944
967
  ]));
945
968
  }
946
- const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
969
+ const Gl = /* @__PURE__ */ R(Nl, [["render", ql]]), Jl = (o) => {
947
970
  if (!o) return "";
948
971
  const e = o?.split(".");
949
972
  return e[e.length - 1];
950
- }, Jl = (o) => {
951
- const e = Gl(o), l = {
973
+ }, Kl = (o) => {
974
+ const e = Jl(o), t = {
952
975
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
953
976
  sheetsFormat: ["xls", "csv", "xlsx"],
954
977
  archivesFormat: ["zip", "rar"],
955
978
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
956
979
  documentsFormat: ["pdf"]
957
980
  };
958
- return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ? Al : l.textsFormat.includes(e) ? ql : l.documentsFormat.includes(e) ? Bl : l.archivesFormat.includes(e) ? Rl : Fl;
959
- }, Kl = {}, Zl = {
981
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? zl : t.textsFormat.includes(e) ? Gl : t.documentsFormat.includes(e) ? Bl : t.archivesFormat.includes(e) ? Pl : Dl;
982
+ }, Zl = {}, Wl = {
960
983
  xmlns: "http://www.w3.org/2000/svg",
961
984
  width: "24",
962
985
  height: "24",
@@ -968,12 +991,12 @@ const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
968
991
  "stroke-linejoin": "round",
969
992
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
970
993
  };
971
- function Wl(o, e) {
972
- return i(), u("svg", Zl, e[0] || (e[0] = [
994
+ function Ql(o, e) {
995
+ return i(), u("svg", Wl, e[0] || (e[0] = [
973
996
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
974
997
  ]));
975
998
  }
976
- const Ie = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
999
+ const Ie = /* @__PURE__ */ R(Zl, [["render", Ql]]), Xl = {}, Yl = {
977
1000
  xmlns: "http://www.w3.org/2000/svg",
978
1001
  width: "24",
979
1002
  height: "24",
@@ -985,21 +1008,21 @@ const Ie = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
985
1008
  "stroke-linejoin": "round",
986
1009
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
987
1010
  };
988
- function Yl(o, e) {
989
- return i(), u("svg", Xl, e[0] || (e[0] = [
990
- t("path", {
1011
+ function eo(o, e) {
1012
+ return i(), u("svg", Yl, e[0] || (e[0] = [
1013
+ l("path", {
991
1014
  stroke: "none",
992
1015
  d: "M0 0h24v24H0z",
993
1016
  fill: "none"
994
1017
  }, null, -1),
995
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
996
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
997
- t("path", { d: "M12 4l0 12" }, null, -1)
1018
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1019
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1020
+ l("path", { d: "M12 4l0 12" }, null, -1)
998
1021
  ]));
999
1022
  }
1000
- const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ A({
1023
+ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, lo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, oo = /* @__PURE__ */ A({
1001
1024
  __name: "vs-input-file-list-item",
1002
- props: /* @__PURE__ */ q({
1025
+ props: /* @__PURE__ */ K({
1003
1026
  format: {},
1004
1027
  multiple: { type: Boolean },
1005
1028
  style: {},
@@ -1017,27 +1040,27 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1017
1040
  }),
1018
1041
  emits: ["update:value", "update:item"],
1019
1042
  setup(o) {
1020
- const e = G(o, "value"), l = G(o, "item"), n = o;
1021
- return (r, a) => (i(), u("div", eo, [
1022
- (i(), X(xe(H(Jl)(l.value)), {
1023
- src: l.value,
1043
+ const e = Z(o, "value"), t = Z(o, "item"), n = o;
1044
+ return (r, a) => (i(), u("div", to, [
1045
+ (i(), X(we(q(Kl)(t.value)), {
1046
+ src: t.value,
1024
1047
  alt: "file",
1025
1048
  class: "w-full h-full object-cover cursor-pointer",
1026
- onClick: a[0] || (a[0] = (s) => H(Je)(l.value))
1049
+ onClick: a[0] || (a[0] = (s) => q(Ke)(t.value))
1027
1050
  }, null, 8, ["src"])),
1028
- t("div", to, [
1029
- t("button", {
1051
+ l("div", lo, [
1052
+ l("button", {
1030
1053
  type: "button",
1031
1054
  onClick: a[1] || (a[1] = (s) => {
1032
- H(kl)(l.value), e.value = n.multiple ? e.value?.filter((d) => d !== l.value) : "";
1055
+ q(_l)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
1033
1056
  }),
1034
1057
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1035
1058
  }, [
1036
1059
  j(Ie, { class: "w-4 h-4" })
1037
1060
  ]),
1038
- t("button", {
1061
+ l("button", {
1039
1062
  type: "button",
1040
- onClick: a[2] || (a[2] = (s) => H(Je)(l.value)),
1063
+ onClick: a[2] || (a[2] = (s) => q(Ke)(t.value)),
1041
1064
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1042
1065
  }, [
1043
1066
  j(ot, { class: "w-4 h-4" })
@@ -1045,12 +1068,12 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1045
1068
  ])
1046
1069
  ]));
1047
1070
  }
1048
- }), Ke = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ao = {
1071
+ }), Ze = /* @__PURE__ */ R(oo, [["__scopeId", "data-v-0ca886b3"]]), ao = { class: "flex items-center gap-x-2" }, ro = {
1049
1072
  key: 1,
1050
1073
  class: "flex items-center flex-wrap gap-2"
1051
- }, ro = /* @__PURE__ */ A({
1074
+ }, so = /* @__PURE__ */ A({
1052
1075
  __name: "vs-input-file",
1053
- props: /* @__PURE__ */ q({
1076
+ props: /* @__PURE__ */ K({
1054
1077
  format: {},
1055
1078
  multiple: { type: Boolean },
1056
1079
  style: {},
@@ -1066,7 +1089,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1066
1089
  }),
1067
1090
  emits: ["update:modelValue"],
1068
1091
  setup(o) {
1069
- const e = o, l = G(o, "modelValue"), n = $(null), r = (s) => Array.isArray(l.value) && l.value[s] || "", a = async (s) => {
1092
+ const e = o, t = Z(o, "modelValue"), n = k(null), r = (s) => Array.isArray(t.value) && t.value[s] || "", a = async (s) => {
1070
1093
  if (e.format) {
1071
1094
  const f = s.target.files?.[0];
1072
1095
  if (!f || !f.name.endsWith(e.format))
@@ -1074,57 +1097,57 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1074
1097
  }
1075
1098
  const d = s.target.files?.[0];
1076
1099
  if (!d) return;
1077
- const p = await wl(d, "1", "form", "table");
1078
- l.value = e.multiple ? [...l.value || [], p?.file_path] : p?.file_path;
1100
+ const p = await kl(d, "1", "form", "table");
1101
+ t.value = e.multiple ? [...t.value || [], p?.file_path] : p?.file_path;
1079
1102
  };
1080
- return (s, d) => (i(), u("div", oo, [
1081
- t("input", {
1103
+ return (s, d) => (i(), u("div", ao, [
1104
+ l("input", {
1082
1105
  class: "hidden",
1083
1106
  ref_key: "fileInput",
1084
1107
  ref: n,
1085
1108
  type: "file",
1086
1109
  onChange: a
1087
1110
  }, null, 544),
1088
- !s.multiple && l.value ? (i(), X(Ke, {
1111
+ !s.multiple && t.value ? (i(), X(Ze, {
1089
1112
  key: 0,
1090
- item: l.value,
1091
- "onUpdate:item": d[0] || (d[0] = (p) => l.value = p),
1092
- value: l.value,
1093
- "onUpdate:value": d[1] || (d[1] = (p) => l.value = p)
1094
- }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ao, [
1095
- (i(!0), u(Q, null, Y(l.value, (p, f) => (i(), X(Ke, {
1113
+ item: t.value,
1114
+ "onUpdate:item": d[0] || (d[0] = (p) => t.value = p),
1115
+ value: t.value,
1116
+ "onUpdate:value": d[1] || (d[1] = (p) => t.value = p)
1117
+ }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ro, [
1118
+ (i(!0), u(Q, null, Y(t.value, (p, f) => (i(), X(Ze, {
1096
1119
  multiple: s.multiple,
1097
1120
  key: f,
1098
- value: l.value,
1099
- "onUpdate:value": d[2] || (d[2] = (c) => l.value = c),
1121
+ value: t.value,
1122
+ "onUpdate:value": d[2] || (d[2] = (c) => t.value = c),
1100
1123
  item: r(f)
1101
1124
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1102
- t("div", {
1125
+ l("div", {
1103
1126
  onClick: d[3] || (d[3] = (p) => !s.disabled && n.value?.click()),
1104
- class: B([
1127
+ class: S([
1105
1128
  "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
1106
1129
  s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1107
1130
  ])
1108
1131
  }, [
1109
1132
  j(je, { class: "w-6 h-6" })
1110
1133
  ], 2)
1111
- ])) : S("", !0),
1112
- s.multiple ? S("", !0) : (i(), u("div", {
1134
+ ])) : B("", !0),
1135
+ s.multiple ? B("", !0) : (i(), u("div", {
1113
1136
  key: 2,
1114
1137
  onClick: d[4] || (d[4] = (p) => n.value?.click()),
1115
- class: B([s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1138
+ class: S([s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1116
1139
  }, [
1117
1140
  j(je, { class: "w-6 h-6" })
1118
1141
  ], 2))
1119
1142
  ]));
1120
1143
  }
1121
- }), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */ A({
1144
+ }), no = { class: "max-w-[55vw]" }, io = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, uo = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, co = { class: "px-[5px]" }, po = { class: "" }, Se = /* @__PURE__ */ A({
1122
1145
  __name: "vs-widget-file-info",
1123
1146
  props: {
1124
1147
  item: { default: null }
1125
1148
  },
1126
1149
  setup(o) {
1127
- const e = o, l = D(() => {
1150
+ const e = o, t = O(() => {
1128
1151
  try {
1129
1152
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1130
1153
  day: "2-digit",
@@ -1143,33 +1166,33 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1143
1166
  }
1144
1167
  return (r, a) => (i(), u(Q, null, [
1145
1168
  a[1] || (a[1] = ae('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
1146
- t("div", so, [
1147
- t("p", no, E(r.item?.uploaded_name), 1),
1148
- t("p", io, [
1149
- t("span", null, E(r.item?.username), 1),
1150
- K(t("span", uo, "|", 512), [
1151
- [De, r.item?.username]
1169
+ l("div", no, [
1170
+ l("p", io, E(r.item?.uploaded_name), 1),
1171
+ l("p", uo, [
1172
+ l("span", null, E(r.item?.username), 1),
1173
+ G(l("span", co, "|", 512), [
1174
+ [Ue, r.item?.username]
1152
1175
  ]),
1153
- t("span", null, E(l.value), 1),
1154
- a[0] || (a[0] = t("span", { class: "px-[5px]" }, "|", -1)),
1155
- t("span", co, E(n(r.item?.size)), 1)
1176
+ l("span", null, E(t.value), 1),
1177
+ a[0] || (a[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1178
+ l("span", po, E(n(r.item?.size)), 1)
1156
1179
  ])
1157
1180
  ])
1158
1181
  ], 64));
1159
1182
  }
1160
- }), po = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, fo = {
1183
+ }), fo = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, vo = {
1161
1184
  key: 0,
1162
1185
  class: "flex w-full gap-x-3 items-center"
1163
- }, vo = {
1186
+ }, mo = {
1164
1187
  key: 1,
1165
1188
  class: "flex gap-x-3 w-full items-center"
1166
- }, mo = {
1189
+ }, ho = {
1167
1190
  key: 2,
1168
1191
  class: "flex gap-x-3 w-full items-center"
1169
- }, ho = ["href"], go = {
1192
+ }, go = ["href"], bo = {
1170
1193
  key: 3,
1171
1194
  class: "flex gap-x-3 w-full items-center"
1172
- }, bo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, yo = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, xo = { class: "inline-block" }, wo = { class: "inline-block" }, ko = /* @__PURE__ */ A({
1195
+ }, yo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, xo = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, wo = { class: "inline-block" }, ko = { class: "inline-block" }, _o = /* @__PURE__ */ A({
1173
1196
  __name: "vs-widget-file-item",
1174
1197
  props: {
1175
1198
  item: { default: null },
@@ -1178,7 +1201,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1178
1201
  },
1179
1202
  emits: ["update", "openModal", "openLightbox"],
1180
1203
  setup(o, { emit: e }) {
1181
- const l = o, n = e;
1204
+ const t = o, n = e;
1182
1205
  function r(c) {
1183
1206
  return ["pdf", "json"].includes(c.ext);
1184
1207
  }
@@ -1192,7 +1215,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1192
1215
  async function d() {
1193
1216
  try {
1194
1217
  await fetch(
1195
- `${l.prefix}/widget/file/${l.item.entity_id}/${l.item.file_id}`
1218
+ `${t.prefix}/widget/file/${t.item.entity_id}/${t.item.file_id}`
1196
1219
  ), n("update");
1197
1220
  } catch (c) {
1198
1221
  console.error(c);
@@ -1209,33 +1232,33 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1209
1232
  });
1210
1233
  }
1211
1234
  function f(c) {
1212
- (l.item.ext === "jpg" || l.item.ext === "png") && n("openLightbox", { item: l.item, index: c });
1235
+ (t.item.ext === "jpg" || t.item.ext === "png") && n("openLightbox", { item: t.item, index: c });
1213
1236
  }
1214
- return (c, g) => (i(), u("div", po, [
1215
- c.item.ext === "jpg" || c.item.ext === "png" ? (i(), u("div", fo, [
1216
- t("div", {
1237
+ return (c, g) => (i(), u("div", fo, [
1238
+ c.item.ext === "jpg" || c.item.ext === "png" ? (i(), u("div", vo, [
1239
+ l("div", {
1217
1240
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1218
1241
  onClick: g[0] || (g[0] = (v) => f(c.index))
1219
1242
  }, [
1220
- j(Be, { item: c.item }, null, 8, ["item"])
1243
+ j(Se, { item: c.item }, null, 8, ["item"])
1221
1244
  ])
1222
- ])) : r(c.item) ? (i(), u("div", vo, [
1223
- j(Be, { item: c.item }, null, 8, ["item"])
1224
- ])) : a(c.item) ? (i(), u("div", mo, [
1225
- t("a", {
1245
+ ])) : r(c.item) ? (i(), u("div", mo, [
1246
+ j(Se, { item: c.item }, null, 8, ["item"])
1247
+ ])) : a(c.item) ? (i(), u("div", ho, [
1248
+ l("a", {
1226
1249
  href: `/api/file-preview?id=${c.item.file_id}`,
1227
1250
  target: "_blank",
1228
1251
  class: "flex gap-x-3 w-full items-center"
1229
1252
  }, [
1230
- j(Be, { item: c.item }, null, 8, ["item"])
1231
- ], 8, ho)
1232
- ])) : (i(), u("div", go, [
1233
- j(Be, { item: c.item }, null, 8, ["item"])
1253
+ j(Se, { item: c.item }, null, 8, ["item"])
1254
+ ], 8, go)
1255
+ ])) : (i(), u("div", bo, [
1256
+ j(Se, { item: c.item }, null, 8, ["item"])
1234
1257
  ])),
1235
- t("div", bo, [
1236
- t("div", yo, [
1237
- t("div", xo, [
1238
- t("button", {
1258
+ l("div", yo, [
1259
+ l("div", xo, [
1260
+ l("div", wo, [
1261
+ l("button", {
1239
1262
  class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
1240
1263
  onClick: g[1] || (g[1] = (v) => s(c.item))
1241
1264
  }, [
@@ -1245,9 +1268,9 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1245
1268
  })
1246
1269
  ])
1247
1270
  ]),
1248
- g[3] || (g[3] = t("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1249
- t("div", wo, [
1250
- t("button", {
1271
+ g[3] || (g[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1272
+ l("div", ko, [
1273
+ l("button", {
1251
1274
  type: "button",
1252
1275
  class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
1253
1276
  onClick: g[2] || (g[2] = (v) => p())
@@ -1262,7 +1285,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1262
1285
  ])
1263
1286
  ]));
1264
1287
  }
1265
- }), _o = {}, $o = {
1288
+ }), $o = {}, Co = {
1266
1289
  xmlns: "http://www.w3.org/2000/svg",
1267
1290
  width: "24",
1268
1291
  height: "24",
@@ -1274,25 +1297,25 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1274
1297
  "stroke-linejoin": "round",
1275
1298
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1276
1299
  };
1277
- function Co(o, e) {
1278
- return i(), u("svg", $o, e[0] || (e[0] = [
1279
- t("path", {
1300
+ function Vo(o, e) {
1301
+ return i(), u("svg", Co, e[0] || (e[0] = [
1302
+ l("path", {
1280
1303
  stroke: "none",
1281
1304
  d: "M0 0h24v24H0z",
1282
1305
  fill: "none"
1283
1306
  }, null, -1),
1284
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1285
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1286
- t("path", { d: "M12 4l0 12" }, null, -1)
1307
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1308
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1309
+ l("path", { d: "M12 4l0 12" }, null, -1)
1287
1310
  ]));
1288
1311
  }
1289
- const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Lo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, So = { class1: "ml-auto" }, jo = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Io = {
1312
+ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, So = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, jo = { class1: "ml-auto" }, Io = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Ao = {
1290
1313
  key: 0,
1291
1314
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1292
- }, Ao = { class: "relative" }, zo = {
1315
+ }, zo = { class: "relative" }, Eo = {
1293
1316
  key: 1,
1294
1317
  class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
1295
- }, Oo = { key: 0 }, Eo = /* @__PURE__ */ A({
1318
+ }, Fo = { key: 0 }, Oo = /* @__PURE__ */ A({
1296
1319
  __name: "vs-input-file-list",
1297
1320
  props: {
1298
1321
  id: { default: "" },
@@ -1307,57 +1330,57 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1307
1330
  },
1308
1331
  emits: ["update"],
1309
1332
  setup(o, { emit: e }) {
1310
- const l = o, n = Se("form"), r = D(() => n.value.formId), a = $(!1), s = $(0), d = e, p = $(!1), f = $({}), c = $([]), g = $(""), v = D(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = D(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1333
+ const t = o, n = Be("form"), r = O(() => n.value.formId), a = k(!1), s = k(0), d = e, p = k(!1), f = k({}), c = k([]), g = k(""), v = O(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = O(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1311
1334
  const h = v.value.findIndex((J) => J === x.item.file_path);
1312
1335
  h !== -1 && (a.value = !0, s.value = h);
1313
- }, F = async () => {
1336
+ }, D = async () => {
1314
1337
  try {
1315
- const x = await fetch(`${l.prefix}/widget/file/${r.value}`).then((h) => h.json());
1338
+ const x = await fetch(`${t.prefix}/widget/file/${r.value}`).then((h) => h.json());
1316
1339
  c.value = x?.rows;
1317
1340
  } catch (x) {
1318
1341
  console.error(x);
1319
1342
  }
1320
- }, U = async (x) => {
1343
+ }, T = async (x) => {
1321
1344
  await Promise.all(
1322
1345
  Array.from(x.target.files).map(async (h) => {
1323
1346
  const J = new FormData();
1324
1347
  J.append("file", h);
1325
1348
  try {
1326
- const C = `${l.prefix}/widget/file/${r.value}`;
1349
+ const C = `${t.prefix}/widget/file/${r.value}`;
1327
1350
  return await fetch(C, { method: "POST", body: J }), d("update", "file-list"), h;
1328
1351
  } catch (C) {
1329
1352
  return console.error(C), null;
1330
1353
  }
1331
1354
  })
1332
- ), await F();
1355
+ ), await D();
1333
1356
  }, P = (x) => {
1334
1357
  const h = { ...x };
1335
1358
  return x.cancel || (h.cancel = () => {
1336
1359
  p.value = !1;
1337
1360
  }), x.updateListOnConfirm && (h.confirm = async () => {
1338
- await x.confirm(), p.value = !1, F();
1361
+ await x.confirm(), p.value = !1, D();
1339
1362
  }), h;
1340
1363
  }, _ = (x) => {
1341
1364
  f.value = P(x), p.value = !0;
1342
1365
  };
1343
1366
  return se(r, (x) => {
1344
- x && F();
1345
- }), ue(() => {
1346
- r.value && F();
1367
+ x && D();
1368
+ }), ne(() => {
1369
+ r.value && D();
1347
1370
  }), (x, h) => {
1348
- const J = Pe("Lightbox"), C = Pe("MessageBox");
1349
- return i(), u("div", Mo, [
1350
- t("div", Lo, [
1351
- t("h2", Bo, " Файлів: " + E(c.value?.length), 1),
1352
- t("div", So, [
1353
- t("label", null, [
1354
- t("input", {
1371
+ const J = Ne("Lightbox"), C = Ne("MessageBox");
1372
+ return i(), u("div", Lo, [
1373
+ l("div", So, [
1374
+ l("h2", Bo, " Файлів: " + E(c.value?.length), 1),
1375
+ l("div", jo, [
1376
+ l("label", null, [
1377
+ l("input", {
1355
1378
  type: "file",
1356
1379
  class: "hidden",
1357
- onChange: h[0] || (h[0] = (m) => U(m))
1380
+ onChange: h[0] || (h[0] = (m) => T(m))
1358
1381
  }, null, 32),
1359
- t("div", jo, [
1360
- j(Vo, {
1382
+ l("div", Io, [
1383
+ j(Mo, {
1361
1384
  height: "16",
1362
1385
  width: "16"
1363
1386
  })
@@ -1365,11 +1388,11 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1365
1388
  ])
1366
1389
  ])
1367
1390
  ]),
1368
- c.value?.length > 4 ? (i(), u("div", Io, [
1369
- t("div", null, [
1370
- t("div", Ao, [
1371
- h[8] || (h[8] = t("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1372
- t("svg", {
1391
+ c.value?.length > 4 ? (i(), u("div", Ao, [
1392
+ l("div", null, [
1393
+ l("div", zo, [
1394
+ h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1395
+ l("svg", {
1373
1396
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
1374
1397
  xmlns: "http://www.w3.org/2000/svg",
1375
1398
  width: "24",
@@ -1381,22 +1404,22 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1381
1404
  "stroke-linecap": "round",
1382
1405
  "stroke-linejoin": "round"
1383
1406
  }, [
1384
- t("circle", {
1407
+ l("circle", {
1385
1408
  cx: "11",
1386
1409
  cy: "11",
1387
1410
  r: "8"
1388
1411
  }),
1389
- t("path", { d: "m21 21-4.3-4.3" })
1412
+ l("path", { d: "m21 21-4.3-4.3" })
1390
1413
  ])
1391
1414
  ], -1)),
1392
- K(t("input", {
1415
+ G(l("input", {
1393
1416
  type: "text",
1394
1417
  "onUpdate:modelValue": h[1] || (h[1] = (m) => g.value = m),
1395
1418
  class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
1396
1419
  placeholder: "Введіть назву файлу"
1397
1420
  }, null, 512), [
1398
1421
  [
1399
- ne,
1422
+ ie,
1400
1423
  g.value,
1401
1424
  void 0,
1402
1425
  { trim: !0 }
@@ -1404,9 +1427,9 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1404
1427
  ])
1405
1428
  ])
1406
1429
  ])
1407
- ])) : S("", !0),
1408
- c.value?.length ? (i(), u("div", zo, [
1409
- (i(!0), u(Q, null, Y(M.value, (m, V) => (i(), X(ko, {
1430
+ ])) : B("", !0),
1431
+ c.value?.length ? (i(), u("div", Eo, [
1432
+ (i(!0), u(Q, null, Y(M.value, (m, V) => (i(), X(_o, {
1410
1433
  key: V,
1411
1434
  prefix: x.prefix,
1412
1435
  item: m,
@@ -1415,10 +1438,10 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1415
1438
  onOpenModal: h[3] || (h[3] = (z) => _(z)),
1416
1439
  onOpenLightbox: h[4] || (h[4] = (z) => I(z))
1417
1440
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1418
- M.value.length ? S("", !0) : (i(), u("div", Oo, h[9] || (h[9] = [
1419
- t("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1441
+ M.value.length ? B("", !0) : (i(), u("div", Fo, h[9] || (h[9] = [
1442
+ l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1420
1443
  ])))
1421
- ])) : S("", !0),
1444
+ ])) : B("", !0),
1422
1445
  j(J, {
1423
1446
  modelValue: a.value,
1424
1447
  "onUpdate:modelValue": h[5] || (h[5] = (m) => a.value = m),
@@ -1426,7 +1449,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1426
1449
  "onUpdate:index": h[6] || (h[6] = (m) => s.value = m),
1427
1450
  images: v.value
1428
1451
  }, null, 8, ["modelValue", "startIndex", "images"]),
1429
- j(C, Ce({
1452
+ j(C, Ve({
1430
1453
  modelValue: p.value,
1431
1454
  "onUpdate:modelValue": h[7] || (h[7] = (m) => p.value = m),
1432
1455
  onConfirm: f.value.confirm
@@ -1434,7 +1457,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1434
1457
  ]);
1435
1458
  };
1436
1459
  }
1437
- }), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, To = /* @__PURE__ */ A({
1460
+ }), Do = { class: "flex items-center justify-between" }, Uo = { class: "text-[16px] text-gray-900 font-medium" }, To = { class: "grid gap-3" }, Ro = /* @__PURE__ */ A({
1438
1461
  __name: "vs-container-switcher",
1439
1462
  props: {
1440
1463
  title: {
@@ -1451,34 +1474,34 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1451
1474
  }
1452
1475
  },
1453
1476
  setup(o) {
1454
- const e = o, l = $(e.isOpen);
1477
+ const e = o, t = k(e.isOpen);
1455
1478
  return se(
1456
1479
  () => e.isOpen,
1457
1480
  (n) => {
1458
- l.value = n;
1481
+ t.value = n;
1459
1482
  }
1460
1483
  ), (n, r) => (i(), u("div", null, [
1461
- t("div", Fo, [
1462
- t("p", Do, E(o.title), 1),
1484
+ l("div", Do, [
1485
+ l("p", Uo, E(o.title), 1),
1463
1486
  j(lt, {
1464
- modelValue: l.value,
1465
- "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
1466
- style: fe(o.style)
1487
+ modelValue: t.value,
1488
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
1489
+ style: me(o.style)
1467
1490
  }, null, 8, ["modelValue", "style"])
1468
1491
  ]),
1469
- j(Ye, { name: "slide-fade" }, {
1470
- default: Me(() => [
1471
- K(t("div", Uo, [
1472
- ve(n.$slots, "default", {}, void 0, !0)
1492
+ j(et, { name: "slide-fade" }, {
1493
+ default: Le(() => [
1494
+ G(l("div", To, [
1495
+ he(n.$slots, "default", {}, void 0, !0)
1473
1496
  ], 512), [
1474
- [De, l.value]
1497
+ [Ue, t.value]
1475
1498
  ])
1476
1499
  ]),
1477
1500
  _: 3
1478
1501
  })
1479
1502
  ]));
1480
1503
  }
1481
- }), Ro = /* @__PURE__ */ R(To, [["__scopeId", "data-v-90320b87"]]), Po = { class: "text-[16px] text-gray-900 font-medium" }, No = { class: "grid gap-3" }, Ho = /* @__PURE__ */ A({
1504
+ }), Po = /* @__PURE__ */ R(Ro, [["__scopeId", "data-v-90320b87"]]), No = { class: "text-[16px] text-gray-900 font-medium" }, Ho = { class: "grid gap-3" }, qo = /* @__PURE__ */ A({
1482
1505
  __name: "vs-container-accordion",
1483
1506
  props: {
1484
1507
  title: {
@@ -1495,36 +1518,36 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1495
1518
  }
1496
1519
  },
1497
1520
  setup(o) {
1498
- const e = o, l = $(e.isOpen);
1521
+ const e = o, t = k(e.isOpen);
1499
1522
  return se(
1500
1523
  () => e.isOpen,
1501
1524
  (n) => {
1502
- l.value = n;
1525
+ t.value = n;
1503
1526
  }
1504
1527
  ), (n, r) => (i(), u("div", null, [
1505
- t("button", {
1528
+ l("button", {
1506
1529
  type: "button",
1507
- onClick: r[0] || (r[0] = (a) => l.value = !l.value),
1530
+ onClick: r[0] || (r[0] = (a) => t.value = !t.value),
1508
1531
  class: "flex items-center gap-2"
1509
1532
  }, [
1510
- j(H(Zt), {
1511
- class: B(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
1533
+ j(q(Wt), {
1534
+ class: S(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1512
1535
  }, null, 8, ["class"]),
1513
- t("span", Po, E(o.title), 1)
1536
+ l("span", No, E(o.title), 1)
1514
1537
  ]),
1515
- j(Ye, { name: "slide-fade" }, {
1516
- default: Me(() => [
1517
- K(t("div", No, [
1518
- ve(n.$slots, "default", {}, void 0, !0)
1538
+ j(et, { name: "slide-fade" }, {
1539
+ default: Le(() => [
1540
+ G(l("div", Ho, [
1541
+ he(n.$slots, "default", {}, void 0, !0)
1519
1542
  ], 512), [
1520
- [De, l.value]
1543
+ [Ue, t.value]
1521
1544
  ])
1522
1545
  ]),
1523
1546
  _: 3
1524
1547
  })
1525
1548
  ]));
1526
1549
  }
1527
- }), qo = /* @__PURE__ */ R(Ho, [["__scopeId", "data-v-590eff11"]]), Go = { class: "flex items-center justify-between" }, Jo = /* @__PURE__ */ A({
1550
+ }), Go = /* @__PURE__ */ R(qo, [["__scopeId", "data-v-590eff11"]]), Jo = { class: "flex items-center justify-between" }, Ko = /* @__PURE__ */ A({
1528
1551
  __name: "vs-container-default",
1529
1552
  props: {
1530
1553
  title: {
@@ -1537,17 +1560,17 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1537
1560
  }
1538
1561
  },
1539
1562
  setup(o) {
1540
- return (e, l) => (i(), u("div", null, [
1541
- t("div", Go, [
1542
- t("p", null, E(o.title), 1)
1563
+ return (e, t) => (i(), u("div", null, [
1564
+ l("div", Jo, [
1565
+ l("p", null, E(o.title), 1)
1543
1566
  ]),
1544
- ve(e.$slots, "default")
1567
+ he(e.$slots, "default")
1545
1568
  ]));
1546
1569
  }
1547
- }), Ko = {
1548
- switcher: Ro,
1549
- accordion: qo,
1550
- default: Jo
1570
+ }), Zo = {
1571
+ switcher: Po,
1572
+ accordion: Go,
1573
+ default: Ko
1551
1574
  }, le = {
1552
1575
  Equal: "==",
1553
1576
  Inequal: "!=",
@@ -1561,37 +1584,37 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1561
1584
  Contain: "*",
1562
1585
  In: "in",
1563
1586
  NotIn: "not_in"
1564
- }, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, ea = (o, e) => o <= e, ta = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, la = (o, e) => String(o).startsWith(String(e)), oa = (o, e) => String(o).endsWith(String(e)), aa = (o, e) => String(o).includes(String(e)), ra = (o, e) => Array.isArray(e) ? e.includes(o) : !1, sa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
1587
+ }, Wo = (o, e) => String(o) === String(e), Qo = (o, e) => String(o) !== String(e), Xo = (o, e) => o > e, Yo = (o, e) => o >= e, ea = (o, e) => o < e, ta = (o, e) => o <= e, la = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, oa = (o, e) => String(o).startsWith(String(e)), aa = (o, e) => String(o).endsWith(String(e)), ra = (o, e) => String(o).includes(String(e)), sa = (o, e) => Array.isArray(e) ? e.includes(o) : !1, na = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
1565
1588
  if (!e) return !0;
1566
1589
  switch (e?.[1]) {
1567
1590
  case le.Equal:
1568
- return Zo(o, e?.[2]);
1569
- case le.Inequal:
1570
1591
  return Wo(o, e?.[2]);
1571
- case le.Higer:
1592
+ case le.Inequal:
1572
1593
  return Qo(o, e?.[2]);
1573
- case le.HigerOrEqual:
1594
+ case le.Higer:
1574
1595
  return Xo(o, e?.[2]);
1575
- case le.Lower:
1596
+ case le.HigerOrEqual:
1576
1597
  return Yo(o, e?.[2]);
1577
- case le.LowerOrEqual:
1598
+ case le.Lower:
1578
1599
  return ea(o, e?.[2]);
1579
- case le.Between:
1600
+ case le.LowerOrEqual:
1580
1601
  return ta(o, e?.[2]);
1581
- case le.StartWith:
1602
+ case le.Between:
1582
1603
  return la(o, e?.[2]);
1583
- case le.EndWith:
1604
+ case le.StartWith:
1584
1605
  return oa(o, e?.[2]);
1585
- case le.Contain:
1606
+ case le.EndWith:
1586
1607
  return aa(o, e?.[2]);
1587
- case le.In:
1608
+ case le.Contain:
1588
1609
  return ra(o, e?.[2]);
1589
- case le.NotIn:
1610
+ case le.In:
1590
1611
  return sa(o, e?.[2]);
1612
+ case le.NotIn:
1613
+ return na(o, e?.[2]);
1591
1614
  default:
1592
1615
  return !0;
1593
1616
  }
1594
- }, na = /* @__PURE__ */ A({
1617
+ }, ia = /* @__PURE__ */ A({
1595
1618
  __name: "vs-input-container",
1596
1619
  props: {
1597
1620
  style: {
@@ -1612,32 +1635,32 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1612
1635
  }
1613
1636
  },
1614
1637
  setup(o) {
1615
- const e = o, l = Se("formValues", { default: {} }), n = Se("form"), r = D(() => e.schema?.filter((s) => {
1638
+ const e = o, t = Be("formValues", { default: {} }), n = Be("form"), r = O(() => e.schema?.filter((s) => {
1616
1639
  const d = s?.conditions;
1617
1640
  if (!d) return !0;
1618
- const p = Array.isArray(d) ? d[0] : d, f = l?.value?.[p];
1641
+ const p = Array.isArray(d) ? d[0] : d, f = t?.value?.[p];
1619
1642
  return at(f, d);
1620
- })), a = D(() => Ko[e.view]);
1621
- return (s, d) => o.schema?.length ? (i(), X(xe(a.value), {
1643
+ })), a = O(() => Zo[e.view]);
1644
+ return (s, d) => o.schema?.length ? (i(), X(we(a.value), {
1622
1645
  key: 0,
1623
1646
  title: o.title,
1624
- style: fe(o.style)
1647
+ style: me(o.style)
1625
1648
  }, {
1626
- default: Me(() => [
1627
- (i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ce({
1649
+ default: Le(() => [
1650
+ (i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ve({
1628
1651
  key: p.name
1629
1652
  }, { ref_for: !0 }, p, {
1630
1653
  item: p,
1631
- modelValue: H(l)[p.name],
1632
- "onUpdate:modelValue": (f) => H(l)[p.name] = f,
1654
+ modelValue: q(t)[p.name],
1655
+ "onUpdate:modelValue": (f) => q(t)[p.name] = f,
1633
1656
  style: o.style,
1634
- error: H(n)?.errors?.[p.name]
1657
+ error: q(n)?.errors?.[p.name]
1635
1658
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1636
1659
  ]),
1637
1660
  _: 1
1638
- }, 8, ["title", "style"])) : S("", !0);
1661
+ }, 8, ["title", "style"])) : B("", !0);
1639
1662
  }
1640
- }), ia = { class: "relative" }, ua = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, da = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, ca = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, pa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, fa = { class: "p-4 mim-h-0 h-full overflow-auto" }, va = /* @__PURE__ */ A({
1663
+ }), ua = { class: "relative" }, da = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, ca = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, pa = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, fa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, va = { class: "p-4 mim-h-0 h-full overflow-auto" }, ma = /* @__PURE__ */ A({
1641
1664
  __name: "modal-edit",
1642
1665
  props: {
1643
1666
  schema: {},
@@ -1648,11 +1671,11 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1648
1671
  },
1649
1672
  emits: ["close", "save", "edit"],
1650
1673
  setup(o, { emit: e }) {
1651
- const l = o, n = e, r = $(l.schema), a = $(l.defaultValue ? JSON.parse(JSON.stringify(l.defaultValue)) : {}), s = $({}), d = $(), p = $(l.mode);
1674
+ const t = o, n = e, r = k(t.schema), a = k(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), s = k({}), d = k(), p = k(t.mode);
1652
1675
  async function f() {
1653
1676
  const g = s.value.validate();
1654
1677
  if (g) {
1655
- pe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1678
+ ve({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1656
1679
  `) });
1657
1680
  return;
1658
1681
  }
@@ -1666,29 +1689,29 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1666
1689
  body: JSON.stringify(a.value)
1667
1690
  });
1668
1691
  if (v.ok)
1669
- await v.json(), pe({
1692
+ await v.json(), ve({
1670
1693
  type: "success",
1671
1694
  title: "Успішно",
1672
1695
  message: `Дані успішно ${p.value === "add" ? "збережено" : "оновлено"}`
1673
1696
  }), n("save", a.value);
1674
1697
  else if (v.status === 400) {
1675
1698
  const M = await v.json().catch(() => ({}));
1676
- pe({
1699
+ ve({
1677
1700
  type: "warning",
1678
1701
  title: "Помилка валідації",
1679
1702
  message: M.message || "Некоректні дані (400)"
1680
1703
  });
1681
- } else v.status === 500 ? pe({
1704
+ } else v.status === 500 ? ve({
1682
1705
  type: "error",
1683
1706
  title: "Серверна помилка",
1684
1707
  message: "Виникла помилка на сервері (500)"
1685
- }) : pe({
1708
+ }) : ve({
1686
1709
  type: "error",
1687
1710
  title: "Помилка",
1688
1711
  message: `Статус: ${v.status}`
1689
1712
  });
1690
1713
  } catch (v) {
1691
- pe({
1714
+ ve({
1692
1715
  type: "error",
1693
1716
  title: "Помилка з’єднання",
1694
1717
  message: v.message || "Не вдалося виконати запит"
@@ -1698,27 +1721,27 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1698
1721
  function c() {
1699
1722
  n("close");
1700
1723
  }
1701
- return ue(async () => {
1702
- if (l.form) {
1703
- const g = await fetch(`/api/template/form/${l.form}`).then((v) => v.json());
1724
+ return ne(async () => {
1725
+ if (t.form) {
1726
+ const g = await fetch(`/api/template/form/${t.form}`).then((v) => v.json());
1704
1727
  r.value = g.schema, d.value = g.token;
1705
- } else if (l.token) {
1706
- d.value = l.token;
1728
+ } else if (t.token) {
1729
+ d.value = t.token;
1707
1730
  const g = await fetch(`/api/form/${d.value}`).then((v) => v.json());
1708
1731
  r.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1709
1732
  }
1710
- }), (g, v) => (i(), u("div", ia, [
1711
- t("div", ua, [
1712
- t("div", da, [
1713
- t("div", ca, [
1714
- t("h3", pa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1715
- t("button", {
1733
+ }), (g, v) => (i(), u("div", ua, [
1734
+ l("div", da, [
1735
+ l("div", ca, [
1736
+ l("div", pa, [
1737
+ l("h3", fa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1738
+ l("button", {
1716
1739
  onClick: c,
1717
1740
  type: "button",
1718
1741
  class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
1719
1742
  }, v[2] || (v[2] = [
1720
- t("span", { class: "sr-only" }, "Close", -1),
1721
- t("svg", {
1743
+ l("span", { class: "sr-only" }, "Close", -1),
1744
+ l("svg", {
1722
1745
  class: "flex-shrink-0 w-4 h-4",
1723
1746
  xmlns: "http://www.w3.org/2000/svg",
1724
1747
  width: "24",
@@ -1730,28 +1753,28 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1730
1753
  "stroke-linecap": "round",
1731
1754
  "stroke-linejoin": "round"
1732
1755
  }, [
1733
- t("path", { d: "M18 6 6 18" }),
1734
- t("path", { d: "m6 6 12 12" })
1756
+ l("path", { d: "M18 6 6 18" }),
1757
+ l("path", { d: "m6 6 12 12" })
1735
1758
  ], -1)
1736
1759
  ]))
1737
1760
  ]),
1738
- t("div", fa, [
1739
- r.value ? (i(), X(Oe, {
1761
+ l("div", va, [
1762
+ r.value ? (i(), X(Ee, {
1740
1763
  key: 0,
1741
1764
  schema: r.value,
1742
1765
  values: a.value,
1743
1766
  "onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
1744
1767
  form: s.value,
1745
1768
  "onUpdate:form": v[1] || (v[1] = (M) => s.value = M)
1746
- }, null, 8, ["schema", "values", "form"])) : S("", !0)
1769
+ }, null, 8, ["schema", "values", "form"])) : B("", !0)
1747
1770
  ]),
1748
- t("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
1749
- t("button", {
1771
+ l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
1772
+ l("button", {
1750
1773
  type: "button",
1751
1774
  onClick: c,
1752
1775
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
1753
1776
  }, " Скасувати "),
1754
- t("button", {
1777
+ l("button", {
1755
1778
  onClick: f,
1756
1779
  type: "button",
1757
1780
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
@@ -1761,20 +1784,20 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1761
1784
  ])
1762
1785
  ]));
1763
1786
  }
1764
- }), Ve = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1765
- const l = document.querySelector("body");
1766
- if (!l) {
1787
+ }), Me = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1788
+ const t = document.querySelector("body");
1789
+ if (!t) {
1767
1790
  console.error('Modal root element with id "#modal" not found!');
1768
1791
  return;
1769
1792
  }
1770
1793
  const n = document.createElement("div");
1771
- l.appendChild(n);
1794
+ t.appendChild(n);
1772
1795
  function r() {
1773
1796
  a.unmount(), n.remove();
1774
1797
  }
1775
1798
  const a = ct({
1776
1799
  render() {
1777
- return pt(va, {
1800
+ return pt(ma, {
1778
1801
  ...o,
1779
1802
  onClose: () => {
1780
1803
  e(null), r();
@@ -1786,31 +1809,30 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1786
1809
  }
1787
1810
  });
1788
1811
  a.mount(n);
1789
- }), ma = ["aria-expanded", "data-focus"], ha = { class: "flex items-center" }, ga = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, ba = ["onClick"], ya = {
1790
- key: 1,
1791
- class: /* @__PURE__ */ B(["flex items-center absolute truncate text-gray-900"])
1792
- }, xa = {
1812
+ }), ha = ["aria-expanded", "data-focus"], ga = { class: "flex items-center" }, ba = { class: "truncate text-gray-900 overflow-hidden" }, ya = ["onClick"], xa = ["title"], wa = {
1793
1813
  key: 2,
1794
- class: "absolute text-gray-500 truncate"
1795
- }, wa = { class: "flex-1 min-w-[2px]" }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled"], Va = {
1814
+ class: "text-gray-500 truncate"
1815
+ }, ka = { class: "flex-1 min-w-[2px]" }, _a = ["placeholder"], $a = { class: "flex items-center shrink-0" }, Ca = ["disabled"], Va = ["disabled"], Ma = {
1796
1816
  key: 0,
1797
1817
  class: "absolute z-10 w-full mt-2 rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
1798
1818
  role: "listbox"
1799
- }, Ma = ["aria-disabled", "onClick"], La = {
1819
+ }, La = ["aria-disabled", "onClick"], Sa = {
1800
1820
  key: 1,
1801
1821
  class: "px-3 py-2 text-center text-gray-500"
1802
- }, Ba = ["disabled"], Sa = /* @__PURE__ */ A({
1822
+ }, Ba = ["disabled"], ja = /* @__PURE__ */ A({
1803
1823
  __name: "vs-input-select",
1804
- props: /* @__PURE__ */ q({
1824
+ props: {
1805
1825
  multiple: { type: Boolean, default: !1 },
1806
1826
  disabled: { type: Boolean, default: !1 },
1807
1827
  mode: {},
1828
+ defaultValue: {},
1808
1829
  search: { type: Boolean, default: !0 },
1809
1830
  placeholder: { default: "Оберіть значення" },
1810
1831
  prefix: { default: "api" },
1811
1832
  host: { default: "" },
1812
1833
  data: {},
1813
1834
  options: { default: () => [] },
1835
+ api: {},
1814
1836
  maxHeight: { default: 400 },
1815
1837
  add: {},
1816
1838
  style: { default: () => ({}) },
@@ -1818,326 +1840,341 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1818
1840
  modelValue: {},
1819
1841
  error: { default: null },
1820
1842
  name: {}
1821
- }, {
1822
- modelValue: {
1823
- default: null
1824
- },
1825
- modelModifiers: {}
1826
- }),
1827
- emits: /* @__PURE__ */ q(["change"], ["update:modelValue"]),
1843
+ },
1844
+ emits: ["change", "update:modelValue"],
1828
1845
  setup(o, { emit: e }) {
1829
- const l = o, n = e, r = D(() => l.multiple), a = D(() => l.disabled);
1830
- me(l.style);
1831
- const s = G(o, "modelValue"), d = $(null), p = $(null), f = $(null), c = $(!1), g = $(!1), v = $(null), M = $([]), I = $(-1), F = $([]), U = $(""), P = $(null), _ = $([]), x = D(() => {
1846
+ const t = o, n = e, r = O(() => t.multiple), a = O(() => t.disabled);
1847
+ ge(t.style);
1848
+ const s = O({
1849
+ get: () => t.modelValue,
1850
+ set: (y) => n("update:modelValue", y)
1851
+ });
1852
+ !s.value && t.defaultValue && (s.value = t.defaultValue);
1853
+ const d = k(null), p = k(null), f = k(null), c = k(!1), g = k(!1), v = k(null), M = k([]), I = k(-1), D = k([]), T = k(""), P = k(null), _ = k([]), x = O(() => {
1832
1854
  if (!_.value.length) return [];
1833
- const k = new Map(M.value.map((w) => [w.id?.toString(), w]));
1834
- return _.value.map((w) => k.get(w?.toString())).filter((w) => !!w);
1835
- }), h = D(() => l.placeholder || "Select..."), J = D(() => r.value ? !_.value.length && U.value === "" : !v.value?.text && U.value === ""), C = D(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (k) => r.value ? _.value.some((w) => w?.toString() === k?.toString()) : s.value?.toString?.() === k?.toString?.(), V = D(() => {
1836
- let k = M.value ?? [];
1837
- if (U.value.trim() !== "") {
1838
- const w = U.value.toLowerCase();
1839
- k = k.filter((O) => O.text?.toLowerCase?.().includes(w));
1855
+ const y = new Map(M.value.map((w) => [w.id?.toString(), w]));
1856
+ return _.value.map((w) => y.get(w?.toString())).filter((w) => !!w);
1857
+ }), h = O(() => t.placeholder || "Select..."), J = O(() => r.value ? !_.value.length && T.value === "" : !v.value?.text && T.value === ""), C = O(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (y) => r.value ? _.value.some((w) => w?.toString() === y?.toString()) : s.value?.toString?.() === y?.toString?.(), V = O(() => {
1858
+ let y = M.value ?? [];
1859
+ if (T.value.trim() !== "") {
1860
+ const w = T.value.toLowerCase();
1861
+ y = y.filter((H) => H.text?.toLowerCase?.().includes(w));
1840
1862
  }
1841
1863
  if (r.value && _.value.length) {
1842
- const w = new Set(_.value.map((O) => O?.toString()));
1843
- k = k.filter((O) => !w.has(O.id?.toString()));
1864
+ const w = new Set(_.value.map((H) => H?.toString()));
1865
+ y = y.filter((H) => !w.has(H.id?.toString()));
1844
1866
  }
1845
- return k;
1846
- }), z = async (k) => {
1847
- if (!l.data || !k) return [];
1867
+ return y;
1868
+ }), z = async (y) => {
1869
+ if (!t.data) return [];
1848
1870
  try {
1849
- const w = `${l.host}/${l.prefix}/suggest/${l.data}?json=1&val=${encodeURIComponent(k)}`;
1850
- return (await fetch(w).then((W) => W.json())).data ?? [];
1871
+ const w = t.api ? t.api : `/suggest/${t.data}`, H = "?json=1", U = y ? `&val=${encodeURIComponent(y)}` : "";
1872
+ return (await fetch(w.concat(H, U)).then((ce) => ce.json())).data ?? [];
1851
1873
  } catch {
1852
1874
  return [];
1853
1875
  }
1854
- }, Z = async () => {
1855
- l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z(U.value));
1856
- }, te = async (k) => {
1857
- if (k == null) return null;
1858
- const w = M.value?.find((W) => W?.id?.toString() === String(k));
1859
- return w || ((await z(String(k)))?.[0] ?? null);
1860
- }, ye = async (k) => {
1861
- const w = new Set(M.value.map((W) => W.id?.toString())), O = k.filter((W) => !w.has(W?.toString()));
1862
- O.length && await O.reduce(async (W, be) => {
1863
- await W;
1864
- const Le = await te(be);
1865
- Le && M.value.push(Le);
1876
+ }, W = async () => {
1877
+ t.options?.length ? M.value = [...t.options] : t.data && (M.value = await z(T.value));
1878
+ }, te = async (y) => {
1879
+ if (y == null) return null;
1880
+ const w = M.value?.find((U) => U?.id?.toString() === String(y));
1881
+ return w || ((await z(String(y)))?.[0] ?? null);
1882
+ }, xe = async (y) => {
1883
+ const w = new Set(M.value.map((U) => U.id?.toString())), H = y.filter((U) => !w.has(U?.toString()));
1884
+ H.length && await H.reduce(async (U, de) => {
1885
+ await U;
1886
+ const ce = await te(de);
1887
+ ce && M.value.push(ce);
1866
1888
  }, Promise.resolve());
1867
- }, we = async () => {
1868
- a.value || (c.value = !0, await Z(), await $e(() => {
1889
+ }, ke = async () => {
1890
+ a.value || (c.value = !0, await W(), await Ce(() => {
1869
1891
  P.value?.focus(), V.value.length ? I.value = 0 : I.value = -1;
1870
1892
  }));
1871
- }, ie = () => {
1893
+ }, ue = () => {
1872
1894
  c.value = !1, I.value = -1;
1873
- }, Ae = async (k) => {
1895
+ }, Ae = async (y) => {
1874
1896
  if (a.value) return;
1875
- !c.value ? await we() : ie();
1876
- }, ke = async () => {
1877
- c.value ? P.value?.focus() : await we();
1897
+ !c.value ? await ke() : ue();
1898
+ }, _e = async () => {
1899
+ c.value ? P.value?.focus() : await ke();
1878
1900
  }, b = () => {
1879
- r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), U.value = "", $e(() => P.value?.focus());
1880
- }, y = (k) => {
1881
- r.value && (_.value = _.value.filter((w) => w?.toString() !== k?.toString()), s.value = [..._.value], n("change", s.value), $e(() => P.value?.focus()));
1882
- }, T = (k) => {
1883
- r.value ? (m(k.id) || (_.value = [..._.value, k.id], s.value = [..._.value], n("change", s.value)), U.value = "", $e(() => {
1901
+ r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), T.value = "", Ce(() => P.value?.focus());
1902
+ }, $ = (y) => {
1903
+ r.value && (_.value = _.value.filter((w) => w?.toString() !== y?.toString()), s.value = [..._.value], n("change", s.value), Ce(() => P.value?.focus()));
1904
+ }, F = (y) => {
1905
+ r.value ? (m(y.id) || (_.value = [..._.value, y.id], s.value = [..._.value], n("change", s.value)), T.value = "", Ce(() => {
1884
1906
  P.value?.focus(), I.value = Math.min(I.value, V.value.length - 1);
1885
- })) : (v.value = k, s.value = k.id, n("change", s.value), U.value = "", ie());
1886
- }, N = (k) => {
1887
- m(k.id) || T(k);
1888
- }, ee = (k, w) => {
1889
- if (!k || !w) return;
1890
- const O = k.offsetTop, W = O + k.offsetHeight, be = w.scrollTop, Le = be + w.clientHeight;
1907
+ })) : (v.value = y, s.value = y.id, n("change", s.value), T.value = "", ue());
1908
+ }, N = (y) => {
1909
+ m(y.id) || F(y);
1910
+ }, ee = (y, w) => {
1911
+ if (!y || !w) return;
1912
+ const H = y.offsetTop, U = H + y.offsetHeight, de = w.scrollTop, ce = de + w.clientHeight;
1891
1913
  let ze = w.scrollTop;
1892
- O < be ? ze = O - 80 : W > Le && (ze = W - w.clientHeight + 4);
1914
+ H < de ? ze = H - 80 : U > ce && (ze = U - w.clientHeight + 4);
1893
1915
  const it = w;
1894
1916
  it.scrollTop = ze;
1895
- }, _e = async (k) => {
1896
- a.value || !c.value && (k.key === "ArrowDown" || k.key === "ArrowUp") && (k.preventDefault(), await we());
1897
- }, de = (k) => {
1917
+ }, $e = async (y) => {
1918
+ a.value || !c.value && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), await ke());
1919
+ }, pe = (y) => {
1898
1920
  if (!c.value) return;
1899
- const { key: w } = k;
1921
+ const { key: w } = y;
1900
1922
  if (w === "ArrowDown")
1901
- k.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(F.value[I.value], f.value));
1923
+ y.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(D.value[I.value], f.value));
1902
1924
  else if (w === "ArrowUp")
1903
- k.preventDefault(), I.value > 0 && (I.value -= 1, ee(F.value[I.value], f.value));
1925
+ y.preventDefault(), I.value > 0 && (I.value -= 1, ee(D.value[I.value], f.value));
1904
1926
  else if (w === "Enter") {
1905
- k.preventDefault();
1906
- const O = V.value[I.value];
1907
- O && T(O);
1908
- } else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ? r.value && U.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(F.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(F.value[I.value], f.value)) : w === "Tab" && ie();
1909
- }, he = () => {
1927
+ y.preventDefault();
1928
+ const H = V.value[I.value];
1929
+ H && F(H);
1930
+ } else w === "Escape" ? (y.preventDefault(), ue()) : w === "Backspace" ? r.value && T.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(D.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(D.value[I.value], f.value)) : w === "Tab" && ue();
1931
+ }, be = () => {
1910
1932
  a.value || (g.value = !0);
1911
- }, ge = () => {
1912
- g.value = !1, U.value = "";
1913
- }, ce = (k) => {
1914
- k.key === "Escape" && c.value && ie();
1915
- }, Ue = (k) => {
1916
- d.value && (d.value.contains(k.target) || ie());
1917
- }, Te = (k) => {
1918
- c.value && f.value && !f.value.contains(k.target) && ie();
1933
+ }, ye = () => {
1934
+ g.value = !1, T.value = "";
1935
+ }, fe = (y) => {
1936
+ y.key === "Escape" && c.value && ue();
1937
+ }, Te = (y) => {
1938
+ d.value && (d.value.contains(y.target) || ue());
1939
+ }, Re = (y) => {
1940
+ c.value && f.value && !f.value.contains(y.target) && ue();
1919
1941
  };
1920
- se(() => l.options, (k) => {
1921
- k?.length && (M.value = [...k]);
1942
+ se(() => t.options, (y) => {
1943
+ y?.length && (M.value = [...y]);
1922
1944
  }, { immediate: !0 });
1923
- const Re = async () => {
1945
+ const Pe = async () => {
1924
1946
  if (r.value)
1925
- Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !l.options?.length && l.data && await ye(_.value);
1947
+ Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !t.options?.length && t.data && await xe(_.value);
1926
1948
  else {
1927
1949
  if (Array.isArray(s.value)) {
1928
- const k = s.value[0] ?? null;
1929
- s.value = k ?? null;
1950
+ const y = s.value[0] ?? null;
1951
+ s.value = y ?? null;
1930
1952
  }
1931
1953
  v.value = await te(s.value);
1932
1954
  }
1933
1955
  };
1934
1956
  se(s, () => {
1935
- Re();
1936
- }), ue(async () => {
1937
- addEventListener("keydown", ce), addEventListener("scroll", Te, !0), document.addEventListener("click", Ue, !0), l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z("")), await Re();
1938
- }), et(() => {
1939
- removeEventListener("keydown", ce), removeEventListener("scroll", Te, !0), document.removeEventListener("click", Ue, !0);
1957
+ Pe();
1958
+ }), ne(async () => {
1959
+ addEventListener("keydown", fe), addEventListener("scroll", Re, !0), document.addEventListener("click", Te, !0), t.options?.length ? M.value = [...t.options] : t.data && (M.value = await z("")), await Pe();
1960
+ }), Fe(() => {
1961
+ removeEventListener("keydown", fe), removeEventListener("scroll", Re, !0), document.removeEventListener("click", Te, !0);
1940
1962
  });
1941
1963
  async function nt() {
1942
- if (!l.add) return;
1943
- const k = await Ve({ form: l.add.form, mode: "add" });
1944
- k && (await fetch(`/api/table/${l.add.token}`, {
1964
+ if (!t.add) return;
1965
+ const y = await Me({ form: t.add.form, mode: "add" });
1966
+ y && (await fetch(`/api/table/${t.add.token}`, {
1945
1967
  method: "POST",
1946
1968
  headers: { "Content-Type": "application/json" },
1947
- body: JSON.stringify(k)
1948
- }).then((w) => w.json()), !l.options?.length && l.data && (M.value = await z(U.value)));
1969
+ body: JSON.stringify(y)
1970
+ }).then((w) => w.json()), !t.options?.length && t.data && (M.value = await z(T.value)));
1949
1971
  }
1950
- return (k, w) => (i(), u("div", {
1951
- class: "flex gap-1 w-full",
1952
- ref_key: "selectRoot",
1953
- ref: d,
1954
- onClick: w[2] || (w[2] = re(() => {
1955
- }, ["stop"]))
1956
- }, [
1957
- t("div", {
1958
- class: B(["relative w-full font-sans", l.customClass])
1972
+ return (y, w) => {
1973
+ const H = ft("tooltip");
1974
+ return i(), u("div", {
1975
+ class: "flex gap-1 w-full",
1976
+ ref_key: "selectRoot",
1977
+ ref: d,
1978
+ onClick: w[2] || (w[2] = re(() => {
1979
+ }, ["stop"]))
1959
1980
  }, [
1960
- w[7] || (w[7] = t("span", {
1961
- id: "react-select-live-region",
1962
- class: "sr-only"
1963
- }, null, -1)),
1964
- w[8] || (w[8] = t("span", {
1965
- "aria-live": "polite",
1966
- "aria-atomic": "false",
1967
- "aria-relevant": "additions text",
1968
- role: "log",
1969
- class: "sr-only"
1970
- }, null, -1)),
1971
- t("div", {
1972
- class: B([
1973
- "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1974
- "border-gray-300 hover:border-gray-400",
1975
- c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
1976
- a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
1977
- ]),
1978
- role: "combobox",
1979
- "aria-expanded": c.value,
1980
- "aria-haspopup": "listbox",
1981
- onKeydown: _e,
1982
- onClick: ke,
1983
- "data-focus": c.value || g.value ? "true" : "false"
1981
+ l("div", {
1982
+ class: S(["relative w-full font-sans", t.customClass])
1984
1983
  }, [
1985
- t("div", {
1986
- class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
1987
- ref_key: "triggerRef",
1988
- ref: p
1984
+ w[7] || (w[7] = l("span", {
1985
+ id: "react-select-live-region",
1986
+ class: "sr-only"
1987
+ }, null, -1)),
1988
+ w[8] || (w[8] = l("span", {
1989
+ "aria-live": "polite",
1990
+ "aria-atomic": "false",
1991
+ "aria-relevant": "additions text",
1992
+ role: "log",
1993
+ class: "sr-only"
1994
+ }, null, -1)),
1995
+ l("div", {
1996
+ class: S([
1997
+ "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1998
+ "border-gray-300 hover:border-gray-400",
1999
+ c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
2000
+ a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
2001
+ ]),
2002
+ role: "combobox",
2003
+ "aria-expanded": c.value,
2004
+ "aria-haspopup": "listbox",
2005
+ onKeydown: $e,
2006
+ onClick: _e,
2007
+ "data-focus": c.value || g.value ? "true" : "false"
1989
2008
  }, [
1990
- r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (O) => (i(), u("div", {
1991
- class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
1992
- key: O.id
2009
+ l("div", {
2010
+ class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
2011
+ ref_key: "triggerRef",
2012
+ ref: p
1993
2013
  }, [
1994
- t("div", ha, [
1995
- O?.color ? (i(), u("span", {
2014
+ r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (U) => (i(), u("div", {
2015
+ class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
2016
+ key: U.id
2017
+ }, [
2018
+ l("div", ga, [
2019
+ U?.color ? (i(), u("span", {
2020
+ key: 0,
2021
+ class: "w-[16px] h-[16px] rounded-md block ml-1.5",
2022
+ style: me({ backgroundColor: U?.color })
2023
+ }, null, 4)) : B("", !0),
2024
+ G((i(), u("div", ba, [
2025
+ oe(E(U.text), 1)
2026
+ ])), [
2027
+ [H, U.text]
2028
+ ])
2029
+ ]),
2030
+ l("div", {
2031
+ role: "button",
2032
+ class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2033
+ onClick: re((de) => $(U.id), ["stop"])
2034
+ }, w[3] || (w[3] = [
2035
+ l("svg", {
2036
+ height: "14",
2037
+ width: "14",
2038
+ viewBox: "0 0 20 20",
2039
+ "aria-hidden": "true",
2040
+ focusable: "false",
2041
+ class: "inline-block fill-current stroke-current leading-none stroke-0"
2042
+ }, [
2043
+ l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2044
+ ], -1)
2045
+ ]), 8, ya)
2046
+ ]))), 128)) : !r.value && !g.value && v.value?.text && T.value === "" ? G((i(), u("div", {
2047
+ key: 1,
2048
+ class: S(["truncate text-gray-900"]),
2049
+ title: v.value.text
2050
+ }, [
2051
+ v.value?.color ? (i(), u("span", {
1996
2052
  key: 0,
1997
- class: "w-[16px] h-[16px] rounded-md block ml-1.5",
1998
- style: fe({ backgroundColor: O?.color })
1999
- }, null, 4)) : S("", !0),
2000
- t("div", ga, E(O.text), 1)
2001
- ]),
2002
- t("div", {
2003
- role: "button",
2004
- class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2005
- onClick: re((W) => y(O.id), ["stop"])
2006
- }, w[3] || (w[3] = [
2007
- t("svg", {
2008
- height: "14",
2009
- width: "14",
2053
+ class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2054
+ style: me({ backgroundColor: v.value?.color })
2055
+ }, null, 4)) : B("", !0),
2056
+ l("span", {
2057
+ class: S({ "pl-5": v.value?.color })
2058
+ }, E(v.value.text), 3)
2059
+ ], 8, xa)), [
2060
+ [H, v.value.text]
2061
+ ]) : B("", !0),
2062
+ J.value ? (i(), u("div", wa, E(h.value), 1)) : B("", !0),
2063
+ l("div", ka, [
2064
+ !a.value && y.search ? G((i(), u("input", {
2065
+ key: 0,
2066
+ ref_key: "inputRef",
2067
+ ref: P,
2068
+ class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2069
+ autocapitalize: "none",
2070
+ autocomplete: "off",
2071
+ autocorrect: "off",
2072
+ spellcheck: "false",
2073
+ type: "text",
2074
+ tabindex: "0",
2075
+ "aria-autocomplete": "list",
2076
+ placeholder: (r.value && _.value.length ? " " : null) || (g.value && !T.value?.length ? v.value?.text : " "),
2077
+ "onUpdate:modelValue": w[0] || (w[0] = (U) => T.value = U),
2078
+ onFocus: be,
2079
+ onBlur: ye,
2080
+ onKeydown: pe
2081
+ }, null, 40, _a)), [
2082
+ [ie, T.value]
2083
+ ]) : B("", !0)
2084
+ ])
2085
+ ], 512),
2086
+ l("div", $a, [
2087
+ C.value ? (i(), u("button", {
2088
+ key: 0,
2089
+ type: "button",
2090
+ class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2091
+ "aria-hidden": "true",
2092
+ disabled: a.value,
2093
+ onClick: re(b, ["stop"])
2094
+ }, w[4] || (w[4] = [
2095
+ l("svg", {
2096
+ height: "20",
2097
+ width: "20",
2010
2098
  viewBox: "0 0 20 20",
2011
- "aria-hidden": "true",
2012
- focusable: "false",
2013
- class: "inline-block fill-current stroke-current leading-none stroke-0"
2099
+ class: "fill-current"
2014
2100
  }, [
2015
- t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2101
+ l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2016
2102
  ], -1)
2017
- ]), 8, ba)
2018
- ]))), 128)) : !r.value && v.value?.text && U.value === "" ? (i(), u("div", ya, [
2019
- v.value?.color ? (i(), u("span", {
2020
- key: 0,
2021
- class: "w-[14px] h-[14px] rounded-md block mr-1 mt-0.5",
2022
- style: fe({ backgroundColor: v.value?.color })
2023
- }, null, 4)) : S("", !0),
2024
- oe(" " + E(v.value.text), 1)
2025
- ])) : S("", !0),
2026
- J.value ? (i(), u("div", xa, E(h.value), 1)) : S("", !0),
2027
- t("div", wa, [
2028
- !a.value && k.search ? K((i(), u("input", {
2029
- key: 0,
2030
- ref_key: "inputRef",
2031
- ref: P,
2032
- class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2033
- autocapitalize: "none",
2034
- autocomplete: "off",
2035
- autocorrect: "off",
2036
- spellcheck: "false",
2037
- type: "text",
2038
- tabindex: "0",
2039
- "aria-autocomplete": "list",
2040
- placeholder: r.value && _.value.length ? "" : void 0,
2041
- "onUpdate:modelValue": w[0] || (w[0] = (O) => U.value = O),
2042
- onFocus: he,
2043
- onBlur: ge,
2044
- onKeydown: de
2045
- }, null, 40, ka)), [
2046
- [ne, U.value]
2047
- ]) : S("", !0)
2103
+ ]), 8, Ca)) : B("", !0),
2104
+ w[6] || (w[6] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2105
+ l("button", {
2106
+ type: "button",
2107
+ class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2108
+ "aria-hidden": "true",
2109
+ disabled: a.value,
2110
+ onClick: w[1] || (w[1] = re((U) => Ae(), ["stop"]))
2111
+ }, w[5] || (w[5] = [
2112
+ l("svg", {
2113
+ height: "20",
2114
+ width: "20",
2115
+ viewBox: "0 0 20 20",
2116
+ class: "fill-current"
2117
+ }, [
2118
+ l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2119
+ ], -1)
2120
+ ]), 8, Va)
2048
2121
  ])
2049
- ], 512),
2050
- t("div", _a, [
2051
- C.value ? (i(), u("button", {
2052
- key: 0,
2053
- type: "button",
2054
- class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2055
- "aria-hidden": "true",
2056
- disabled: a.value,
2057
- onClick: re(b, ["stop"])
2058
- }, w[4] || (w[4] = [
2059
- t("svg", {
2060
- height: "20",
2061
- width: "20",
2062
- viewBox: "0 0 20 20",
2063
- class: "fill-current"
2064
- }, [
2065
- t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2066
- ], -1)
2067
- ]), 8, $a)) : S("", !0),
2068
- w[6] || (w[6] = t("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2069
- t("button", {
2070
- type: "button",
2071
- class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2072
- "aria-hidden": "true",
2073
- disabled: a.value,
2074
- onClick: w[1] || (w[1] = re((O) => Ae(), ["stop"]))
2075
- }, w[5] || (w[5] = [
2076
- t("svg", {
2077
- height: "20",
2078
- width: "20",
2079
- viewBox: "0 0 20 20",
2080
- class: "fill-current"
2081
- }, [
2082
- t("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2083
- ], -1)
2084
- ]), 8, Ca)
2085
- ])
2086
- ], 42, ma),
2087
- c.value ? (i(), u("div", Va, [
2088
- t("div", {
2089
- class: "max-h-[300px] overflow-y-auto py-1",
2090
- ref_key: "listRef",
2091
- ref: f
2092
- }, [
2093
- V.value.length ? (i(!0), u(Q, { key: 0 }, Y(V.value, (O, W) => (i(), u("div", {
2094
- key: O.id,
2095
- ref_for: !0,
2096
- ref: (be) => F.value[W] = be,
2097
- class: B([
2098
- "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2099
- m(O.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2100
- ]),
2101
- "aria-disabled": m(O.id) ? "true" : "false",
2102
- role: "option",
2103
- tabindex: "-1",
2104
- onClick: (be) => N(O)
2122
+ ], 42, ha),
2123
+ c.value ? (i(), u("div", Ma, [
2124
+ l("div", {
2125
+ class: "max-h-[300px] overflow-y-auto py-1",
2126
+ ref_key: "listRef",
2127
+ ref: f
2105
2128
  }, [
2106
- O?.color ? (i(), u("span", {
2107
- key: 0,
2108
- class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2109
- style: fe({ backgroundColor: O?.color })
2110
- }, null, 4)) : S("", !0),
2111
- t("div", {
2112
- class: B([
2113
- "leading-[19px]",
2114
- I.value === O.id ? "text-white" : "",
2115
- // active style like react-select
2116
- (I.value === W, "")
2117
- ])
2118
- }, E(O.text), 3)
2119
- ], 10, Ma))), 128)) : (i(), u("div", La, " No options "))
2120
- ], 512)
2121
- ])) : S("", !0)
2122
- ], 2),
2123
- l.add ? (i(), u("button", {
2124
- key: 0,
2125
- onClick: nt,
2126
- class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
2127
- disabled: a.value,
2128
- type: "button"
2129
- }, [
2130
- j(je, {
2131
- width: "16",
2132
- height: "16"
2133
- }),
2134
- w[9] || (w[9] = t("span", null, "Додати", -1))
2135
- ], 8, Ba)) : S("", !0)
2136
- ], 512));
2129
+ V.value.length ? (i(!0), u(Q, { key: 0 }, Y(V.value, (U, de) => (i(), u("div", {
2130
+ key: U.id,
2131
+ ref_for: !0,
2132
+ ref: (ce) => D.value[de] = ce,
2133
+ class: S([
2134
+ "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2135
+ m(U.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2136
+ ]),
2137
+ "aria-disabled": m(U.id) ? "true" : "false",
2138
+ role: "option",
2139
+ tabindex: "-1",
2140
+ onClick: (ce) => N(U)
2141
+ }, [
2142
+ U?.color ? (i(), u("span", {
2143
+ key: 0,
2144
+ class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2145
+ style: me({ backgroundColor: U?.color })
2146
+ }, null, 4)) : B("", !0),
2147
+ l("div", {
2148
+ class: S([
2149
+ "leading-[19px]",
2150
+ I.value === U.id ? "text-white" : "",
2151
+ // active style like react-select
2152
+ (I.value === de, "")
2153
+ ])
2154
+ }, E(U.text), 3)
2155
+ ], 10, La))), 128)) : (i(), u("div", Sa, " No options "))
2156
+ ], 512)
2157
+ ])) : B("", !0)
2158
+ ], 2),
2159
+ t.add ? (i(), u("button", {
2160
+ key: 0,
2161
+ onClick: nt,
2162
+ class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
2163
+ disabled: a.value,
2164
+ type: "button"
2165
+ }, [
2166
+ j(je, {
2167
+ width: "16",
2168
+ height: "16"
2169
+ }),
2170
+ w[9] || (w[9] = l("span", null, "Додати", -1))
2171
+ ], 8, Ba)) : B("", !0)
2172
+ ], 512);
2173
+ };
2137
2174
  }
2138
- }), ja = ["placeholder", "disabled"], Ia = /* @__PURE__ */ A({
2175
+ }), Ia = ["placeholder", "disabled"], Aa = /* @__PURE__ */ A({
2139
2176
  __name: "vs-input-textarea",
2140
- props: /* @__PURE__ */ q({
2177
+ props: /* @__PURE__ */ K({
2141
2178
  style: { default: () => ({}) },
2142
2179
  customClass: { default: "" },
2143
2180
  disabled: { type: Boolean, default: !1 },
@@ -2151,21 +2188,21 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2151
2188
  }),
2152
2189
  emits: ["update:modelValue"],
2153
2190
  setup(o) {
2154
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
2155
- return (r, a) => K((i(), u("textarea", {
2191
+ const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
2192
+ return (r, a) => G((i(), u("textarea", {
2156
2193
  "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
2157
2194
  placeholder: r.placeholder,
2158
2195
  disabled: r.disabled,
2159
2196
  row: "2",
2160
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [H(l)]]),
2197
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [q(t)]]),
2161
2198
  style: {
2162
2199
  border: "1px solid #CFD9E0"
2163
2200
  }
2164
- }, null, 10, ja)), [
2165
- [ne, n.value]
2201
+ }, null, 10, Ia)), [
2202
+ [ie, n.value]
2166
2203
  ]);
2167
2204
  }
2168
- }), Aa = {}, za = {
2205
+ }), za = {}, Ea = {
2169
2206
  xmlns: "http://www.w3.org/2000/svg",
2170
2207
  viewBox: "0 0 24 24",
2171
2208
  fill: "none",
@@ -2175,18 +2212,18 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2175
2212
  "stroke-linejoin": "round",
2176
2213
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2177
2214
  };
2178
- function Oa(o, e) {
2179
- return i(), u("svg", za, e[0] || (e[0] = [
2180
- t("path", {
2215
+ function Fa(o, e) {
2216
+ return i(), u("svg", Ea, e[0] || (e[0] = [
2217
+ l("path", {
2181
2218
  stroke: "none",
2182
2219
  d: "M0 0h24v24H0z",
2183
2220
  fill: "none"
2184
2221
  }, null, -1),
2185
- t("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
2186
- t("path", { d: "M21 21l-6 -6" }, null, -1)
2222
+ l("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
2223
+ l("path", { d: "M21 21l-6 -6" }, null, -1)
2187
2224
  ]));
2188
2225
  }
2189
- const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
2226
+ const Oa = /* @__PURE__ */ R(za, [["render", Fa]]), Da = {}, Ua = {
2190
2227
  class: "flex-shrink-0 mt-0.5 size-3.5",
2191
2228
  xmlns: "http://www.w3.org/2000/svg",
2192
2229
  viewBox: "0 0 24 24",
@@ -2196,15 +2233,15 @@ const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
2196
2233
  "stroke-linecap": "round",
2197
2234
  "stroke-linejoin": "round"
2198
2235
  };
2199
- function Ua(o, e) {
2200
- return i(), u("svg", Da, e[0] || (e[0] = [
2201
- t("path", { d: "m3 16 4 4 4-4" }, null, -1),
2202
- t("path", { d: "M7 20V4" }, null, -1),
2203
- t("path", { d: "m21 8-4-4-4 4" }, null, -1),
2204
- t("path", { d: "M17 4v16" }, null, -1)
2236
+ function Ta(o, e) {
2237
+ return i(), u("svg", Ua, e[0] || (e[0] = [
2238
+ l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2239
+ l("path", { d: "M7 20V4" }, null, -1),
2240
+ l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2241
+ l("path", { d: "M17 4v16" }, null, -1)
2205
2242
  ]));
2206
2243
  }
2207
- const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
2244
+ const Ra = /* @__PURE__ */ R(Da, [["render", Ta]]), Pa = {}, Na = {
2208
2245
  xmlns: "http://www.w3.org/2000/svg",
2209
2246
  width: "14",
2210
2247
  height: "14",
@@ -2215,19 +2252,19 @@ const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
2215
2252
  "stroke-linecap": "round",
2216
2253
  "stroke-linejoin": "round"
2217
2254
  };
2218
- function Na(o, e) {
2219
- return i(), u("svg", Pa, e[0] || (e[0] = [
2220
- t("path", {
2255
+ function Ha(o, e) {
2256
+ return i(), u("svg", Na, e[0] || (e[0] = [
2257
+ l("path", {
2221
2258
  stroke: "none",
2222
2259
  d: "M0 0h24v24H0z",
2223
2260
  fill: "none"
2224
2261
  }, null, -1),
2225
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2226
- t("path", { d: "M7 9l5 -5l5 5" }, null, -1),
2227
- t("path", { d: "M12 4l0 12" }, null, -1)
2262
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2263
+ l("path", { d: "M7 9l5 -5l5 5" }, null, -1),
2264
+ l("path", { d: "M12 4l0 12" }, null, -1)
2228
2265
  ]));
2229
2266
  }
2230
- const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
2267
+ const qa = /* @__PURE__ */ R(Pa, [["render", Ha]]), Ga = {}, Ja = {
2231
2268
  xmlns: "http://www.w3.org/2000/svg",
2232
2269
  viewBox: "0 0 24 24",
2233
2270
  fill: "none",
@@ -2236,19 +2273,19 @@ const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
2236
2273
  "stroke-linecap": "round",
2237
2274
  "stroke-linejoin": "round"
2238
2275
  };
2239
- function Ja(o, e) {
2240
- return i(), u("svg", Ga, e[0] || (e[0] = [
2241
- t("path", {
2276
+ function Ka(o, e) {
2277
+ return i(), u("svg", Ja, e[0] || (e[0] = [
2278
+ l("path", {
2242
2279
  stroke: "none",
2243
2280
  d: "M0 0h24v24H0z",
2244
2281
  fill: "none"
2245
2282
  }, null, -1),
2246
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2247
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
2248
- t("path", { d: "M12 4l0 12" }, null, -1)
2283
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2284
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
2285
+ l("path", { d: "M12 4l0 12" }, null, -1)
2249
2286
  ]));
2250
2287
  }
2251
- const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
2288
+ const Za = /* @__PURE__ */ R(Ga, [["render", Ka]]), Wa = {}, Qa = {
2252
2289
  xmlns: "http://www.w3.org/2000/svg",
2253
2290
  viewBox: "0 0 24 24",
2254
2291
  fill: "none",
@@ -2257,22 +2294,22 @@ const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
2257
2294
  "stroke-linecap": "round",
2258
2295
  "stroke-linejoin": "round"
2259
2296
  };
2260
- function Qa(o, e) {
2261
- return i(), u("svg", Wa, e[0] || (e[0] = [
2297
+ function Xa(o, e) {
2298
+ return i(), u("svg", Qa, e[0] || (e[0] = [
2262
2299
  ae('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
2263
2300
  ]));
2264
2301
  }
2265
- const Ze = /* @__PURE__ */ R(Za, [["render", Qa]]), Xa = {}, Ya = {
2302
+ const We = /* @__PURE__ */ R(Wa, [["render", Xa]]), Ya = {}, er = {
2266
2303
  viewBox: "0 0 178 90",
2267
2304
  fill: "none",
2268
2305
  xmlns: "http://www.w3.org/2000/svg"
2269
2306
  };
2270
- function er(o, e) {
2271
- return i(), u("svg", Ya, e[0] || (e[0] = [
2307
+ function tr(o, e) {
2308
+ return i(), u("svg", er, e[0] || (e[0] = [
2272
2309
  ae('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
2273
2310
  ]));
2274
2311
  }
2275
- const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
2312
+ const lr = /* @__PURE__ */ R(Ya, [["render", tr]]), or = {}, ar = {
2276
2313
  xmlns: "http://www.w3.org/2000/svg",
2277
2314
  viewBox: "0 0 24 24",
2278
2315
  fill: "none",
@@ -2281,18 +2318,18 @@ const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
2281
2318
  "stroke-linecap": "round",
2282
2319
  "stroke-linejoin": "round"
2283
2320
  };
2284
- function ar(o, e) {
2285
- return i(), u("svg", or, e[0] || (e[0] = [
2286
- t("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2321
+ function rr(o, e) {
2322
+ return i(), u("svg", ar, e[0] || (e[0] = [
2323
+ l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2287
2324
  ]));
2288
2325
  }
2289
- const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, nr = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ir = { class: "relative w-full" }, ur = { class: "table-wrapper flex gap-2" }, dr = { class: "vs-popover inline-block text-slate-700" }, cr = { class: "text-center" }, pr = { class: "" }, fr = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, vr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, mr = { class: "text-sm items-center text-gray-800 flex gap-1" }, hr = { class: "w-full overflow-x-auto" }, gr = { class: "w-full table-auto caption-bottom text-sm" }, br = { class: "[&_tr]:border-b" }, yr = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, xr = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, wr = {
2326
+ const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ir = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ur = { class: "relative w-full" }, dr = { class: "table-wrapper flex gap-2" }, cr = { class: "vs-popover inline-block text-slate-700" }, pr = { class: "text-center" }, fr = { class: "" }, vr = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, mr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, hr = { class: "text-sm items-center text-gray-800 flex gap-1" }, gr = { class: "w-full overflow-x-auto" }, br = { class: "w-full table-auto caption-bottom text-sm" }, yr = { class: "[&_tr]:border-b" }, xr = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, wr = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, kr = {
2290
2327
  key: 0,
2291
2328
  colspan: "100%",
2292
2329
  class: "text-center"
2293
- }, kr = { class: "w-full" }, _r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, $r = ["onDragstart", "onDragover", "onDrop"], Cr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Vr = { class: "flex items-center justify-center" }, Mr = { class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" }, Lr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, Sr = ["onClick"], jr = ["onClick"], Ir = /* @__PURE__ */ A({
2330
+ }, _r = { class: "w-full" }, $r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Cr = ["onDragstart", "onDragover", "onDrop"], Vr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Mr = { class: "flex items-center justify-center" }, Lr = { class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" }, Sr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, jr = ["onClick"], Ir = ["onClick"], Ar = /* @__PURE__ */ A({
2294
2331
  __name: "vs-input-datatable",
2295
- props: /* @__PURE__ */ q({
2332
+ props: /* @__PURE__ */ K({
2296
2333
  colModel: {},
2297
2334
  style: {},
2298
2335
  customClass: {},
@@ -2307,14 +2344,14 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2307
2344
  }),
2308
2345
  emits: ["update:modelValue"],
2309
2346
  setup(o) {
2310
- const e = o, l = G(o, "modelValue"), n = $({}), r = $(""), a = D(() => {
2311
- if (!r.value) return l.value ?? [];
2347
+ const e = o, t = Z(o, "modelValue"), n = k({}), r = k(""), a = O(() => {
2348
+ if (!r.value) return t.value ?? [];
2312
2349
  const C = r.value.toLowerCase();
2313
- return l.value.filter((m) => e.colModel?.some((V) => {
2350
+ return t.value.filter((m) => e.colModel?.some((V) => {
2314
2351
  const z = m[V.key];
2315
2352
  return z ? Array.isArray(z) ? z.join(", ").toLowerCase().includes(C) : String(z).toLowerCase().includes(C) : !1;
2316
2353
  }));
2317
- }), s = $(null), d = $(null), p = $(!1), f = $(null), c = $({ top: 0, left: 0 }), g = (C) => {
2354
+ }), s = k(null), d = k(null), p = k(!1), f = k(null), c = k({ top: 0, left: 0 }), g = (C) => {
2318
2355
  s.value = C;
2319
2356
  }, v = (C) => {
2320
2357
  d.value = C;
@@ -2323,93 +2360,93 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2323
2360
  s.value = null, d.value = null;
2324
2361
  return;
2325
2362
  }
2326
- const m = [...l.value], [V] = m.splice(s.value, 1);
2327
- m.splice(C, 0, V), l.value = m, s.value = null, d.value = null;
2363
+ const m = [...t.value], [V] = m.splice(s.value, 1);
2364
+ m.splice(C, 0, V), t.value = m, s.value = null, d.value = null;
2328
2365
  }, I = (C) => {
2329
2366
  const V = C.currentTarget.getBoundingClientRect();
2330
2367
  c.value = { top: V.bottom + window.scrollY, left: V.left + window.scrollX }, p.value = !p.value;
2331
- }, F = () => {
2368
+ }, D = () => {
2332
2369
  f.value && f.value.click();
2333
- }, U = (C) => {
2370
+ }, T = (C) => {
2334
2371
  const V = C.target.files?.[0];
2335
2372
  if (!V) return;
2336
2373
  const z = new FileReader();
2337
- z.onload = (Z) => {
2374
+ z.onload = (W) => {
2338
2375
  try {
2339
- const te = Z.target?.result;
2376
+ const te = W.target?.result;
2340
2377
  if (typeof te == "string") {
2341
- const ye = JSON.parse(te);
2342
- Array.isArray(ye) && l.value.push(...ye);
2378
+ const xe = JSON.parse(te);
2379
+ Array.isArray(xe) && t.value.push(...xe);
2343
2380
  }
2344
2381
  } catch (te) {
2345
2382
  console.error("Error parsing file:", te);
2346
2383
  }
2347
2384
  }, z.readAsText(V);
2348
2385
  }, P = () => {
2349
- const C = JSON.stringify(l.value, null, 2), m = new Blob([C], { type: "application/json" }), V = URL.createObjectURL(m), z = document.createElement("a");
2386
+ const C = JSON.stringify(t.value, null, 2), m = new Blob([C], { type: "application/json" }), V = URL.createObjectURL(m), z = document.createElement("a");
2350
2387
  z.href = V, z.download = "data.json", z.click(), URL.revokeObjectURL(V);
2351
2388
  };
2352
- ue(async () => {
2389
+ ne(async () => {
2353
2390
  const C = e.colModel?.filter((m) => m.data);
2354
2391
  C?.length && Promise.all(C.map(async (m) => {
2355
2392
  n.value[m.key] = await fetch(`/api/suggest/${m.data}`).then((V) => V.json());
2356
2393
  }));
2357
2394
  });
2358
2395
  async function _() {
2359
- const C = await Ve({
2396
+ const C = await Me({
2360
2397
  schema: e.colModel,
2361
2398
  mode: "add"
2362
2399
  });
2363
- C && (Array.isArray(l.value) ? l.value = [...l.value, C] : l.value = [C]);
2400
+ C && (Array.isArray(t.value) ? t.value = [...t.value, C] : t.value = [C]);
2364
2401
  }
2365
2402
  function x(C, m) {
2366
2403
  return n.value[m.key] && C[m.key] ? n.value[m.key].find((V) => V.id.toString() === C[m.key].toString())?.text ?? C[m.key] : C[m.key] || "-";
2367
2404
  }
2368
2405
  async function h(C, m) {
2369
- const V = await Ve({
2406
+ const V = await Me({
2370
2407
  schema: e.colModel,
2371
2408
  mode: "add",
2372
2409
  defaultValue: C
2373
2410
  });
2374
- V && (l.value = l.value.map((z, Z) => Z === m ? V : z));
2411
+ V && (t.value = t.value.map((z, W) => W === m ? V : z));
2375
2412
  }
2376
2413
  function J(C) {
2377
- l.value = l.value.filter((m, V) => V !== C);
2414
+ t.value = t.value.filter((m, V) => V !== C);
2378
2415
  }
2379
- return (C, m) => (i(), u("div", sr, [
2380
- t("div", nr, [
2381
- t("div", ir, [
2382
- j(Ea, {
2416
+ return (C, m) => (i(), u("div", nr, [
2417
+ l("div", ir, [
2418
+ l("div", ur, [
2419
+ j(Oa, {
2383
2420
  width: "14",
2384
2421
  height: "14",
2385
2422
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
2386
2423
  }),
2387
- K(t("input", {
2424
+ G(l("input", {
2388
2425
  type: "text",
2389
2426
  "onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V),
2390
2427
  placeholder: "Пошук",
2391
2428
  class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
2392
2429
  }, null, 512), [
2393
- [ne, r.value]
2430
+ [ie, r.value]
2394
2431
  ])
2395
2432
  ]),
2396
- t("div", ur, [
2397
- t("input", {
2433
+ l("div", dr, [
2434
+ l("input", {
2398
2435
  ref_key: "fileInput",
2399
2436
  ref: f,
2400
- onChange: U,
2437
+ onChange: T,
2401
2438
  class: "hidden",
2402
2439
  accept: ".json",
2403
2440
  type: "file"
2404
2441
  }, null, 544),
2405
- t("div", dr, [
2406
- t("div", cr, [
2407
- t("div", pr, [
2408
- t("button", {
2442
+ l("div", cr, [
2443
+ l("div", pr, [
2444
+ l("div", fr, [
2445
+ l("button", {
2409
2446
  onClick: I,
2410
2447
  class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2411
2448
  }, [
2412
- j(Ta, {
2449
+ j(Ra, {
2413
2450
  height: "16",
2414
2451
  width: "16"
2415
2452
  })
@@ -2418,56 +2455,56 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2418
2455
  ])
2419
2456
  ])
2420
2457
  ]),
2421
- (i(), X(ft, { to: "body" }, [
2458
+ (i(), X(vt, { to: "body" }, [
2422
2459
  p.value ? (i(), u("div", {
2423
2460
  key: 0,
2424
2461
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2425
- style: fe([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2462
+ style: me([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2426
2463
  }, [
2427
- t("div", fr, [
2428
- t("div", vr, [
2429
- t("button", {
2430
- onClick: F,
2464
+ l("div", vr, [
2465
+ l("div", mr, [
2466
+ l("button", {
2467
+ onClick: D,
2431
2468
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2432
2469
  }, [
2433
- j(Ha, {
2470
+ j(qa, {
2434
2471
  class: "text-black",
2435
2472
  width: "14",
2436
2473
  height: "14"
2437
2474
  }),
2438
- m[1] || (m[1] = oe(" Імпортувати "))
2475
+ m[1] || (m[1] = oe(" Імпортувати ", -1))
2439
2476
  ]),
2440
- t("button", {
2477
+ l("button", {
2441
2478
  onClick: P,
2442
2479
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2443
2480
  }, [
2444
- t("span", mr, [
2445
- j(Ka, {
2481
+ l("span", hr, [
2482
+ j(Za, {
2446
2483
  class: "text-black",
2447
2484
  width: "14",
2448
2485
  height: "14"
2449
2486
  }),
2450
- m[2] || (m[2] = oe(" Експортувати "))
2487
+ m[2] || (m[2] = oe(" Експортувати ", -1))
2451
2488
  ])
2452
2489
  ])
2453
2490
  ])
2454
2491
  ])
2455
- ], 4)) : S("", !0)
2492
+ ], 4)) : B("", !0)
2456
2493
  ])),
2457
- t("button", {
2494
+ l("button", {
2458
2495
  onClick: _,
2459
2496
  class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2460
2497
  }, [
2461
2498
  j(je),
2462
- m[3] || (m[3] = oe(" Додати "))
2499
+ m[3] || (m[3] = oe(" Додати ", -1))
2463
2500
  ])
2464
2501
  ]),
2465
- t("div", hr, [
2466
- t("table", gr, [
2467
- t("thead", br, [
2468
- t("tr", yr, [
2469
- t("th", xr, [
2470
- j(Ze, {
2502
+ l("div", gr, [
2503
+ l("table", br, [
2504
+ l("thead", yr, [
2505
+ l("tr", xr, [
2506
+ l("th", wr, [
2507
+ j(We, {
2471
2508
  width: "24",
2472
2509
  height: "24",
2473
2510
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
@@ -2477,63 +2514,63 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2477
2514
  key: V.key,
2478
2515
  class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
2479
2516
  }, E(V.ua || V.label), 1))), 128)),
2480
- m[4] || (m[4] = t("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2517
+ m[4] || (m[4] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2481
2518
  ])
2482
2519
  ]),
2483
- t("tbody", {
2484
- class: B({ "[&_tr:last-child]:border-0": !d.value })
2520
+ l("tbody", {
2521
+ class: S({ "[&_tr:last-child]:border-0": !d.value })
2485
2522
  }, [
2486
- a.value.length === 0 ? (i(), u("td", wr, [
2487
- t("div", kr, [
2488
- t("div", _r, [
2489
- j(tr, { class: "w-48 mx-auto" }),
2490
- m[5] || (m[5] = t("div", { class: "max-w-sm mx-auto mt-6" }, [
2491
- t("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2492
- t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2523
+ a.value.length === 0 ? (i(), u("td", kr, [
2524
+ l("div", _r, [
2525
+ l("div", $r, [
2526
+ j(lr, { class: "w-48 mx-auto" }),
2527
+ m[5] || (m[5] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2528
+ l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2529
+ l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2493
2530
  ], -1))
2494
2531
  ])
2495
2532
  ])
2496
- ])) : S("", !0),
2533
+ ])) : B("", !0),
2497
2534
  (i(!0), u(Q, null, Y(a.value, (V, z) => (i(), u("tr", {
2498
2535
  key: V.id,
2499
- class: B(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2536
+ class: S(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2500
2537
  "opacity-50": s.value === z,
2501
2538
  "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === z
2502
2539
  }]),
2503
2540
  draggable: "true",
2504
- onDragstart: (Z) => g(z),
2505
- onDragover: re((Z) => v(z), ["prevent"]),
2506
- onDrop: (Z) => M(z)
2541
+ onDragstart: (W) => g(z),
2542
+ onDragover: re((W) => v(z), ["prevent"]),
2543
+ onDrop: (W) => M(z)
2507
2544
  }, [
2508
- t("td", Cr, [
2509
- t("div", Vr, [
2510
- j(Ze, {
2545
+ l("td", Vr, [
2546
+ l("div", Mr, [
2547
+ j(We, {
2511
2548
  width: "24",
2512
2549
  height: "24",
2513
2550
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2514
2551
  })
2515
2552
  ])
2516
2553
  ]),
2517
- (i(!0), u(Q, null, Y(C.colModel, (Z) => (i(), u("td", {
2518
- key: Z.key,
2554
+ (i(!0), u(Q, null, Y(C.colModel, (W) => (i(), u("td", {
2555
+ key: W.key,
2519
2556
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2520
2557
  }, [
2521
- t("div", Mr, E(x(V, Z)), 1)
2558
+ l("div", Lr, E(x(V, W)), 1)
2522
2559
  ]))), 128)),
2523
- t("td", Lr, [
2524
- t("div", Br, [
2525
- t("button", {
2526
- onClick: (Z) => h(V, z),
2560
+ l("td", Sr, [
2561
+ l("div", Br, [
2562
+ l("button", {
2563
+ onClick: (W) => h(V, z),
2527
2564
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2528
2565
  }, [
2529
- j(rr, {
2566
+ j(sr, {
2530
2567
  width: "24",
2531
2568
  height: "24",
2532
2569
  class: "w-3 h-3"
2533
2570
  })
2534
- ], 8, Sr),
2535
- t("button", {
2536
- onClick: (Z) => J(z),
2571
+ ], 8, jr),
2572
+ l("button", {
2573
+ onClick: (W) => J(z),
2537
2574
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2538
2575
  }, [
2539
2576
  j(Ie, {
@@ -2541,16 +2578,16 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2541
2578
  height: "24",
2542
2579
  class: "w-3 h-3"
2543
2580
  })
2544
- ], 8, jr)
2581
+ ], 8, Ir)
2545
2582
  ])
2546
2583
  ])
2547
- ], 42, $r))), 128))
2584
+ ], 42, Cr))), 128))
2548
2585
  ], 2)
2549
2586
  ])
2550
2587
  ])
2551
2588
  ]));
2552
2589
  }
2553
- }), Ar = {
2590
+ }), zr = {
2554
2591
  draw: {
2555
2592
  toolbar: {
2556
2593
  actions: {
@@ -2658,7 +2695,7 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2658
2695
  }
2659
2696
  }
2660
2697
  };
2661
- function zr(o) {
2698
+ function Er(o) {
2662
2699
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
2663
2700
  type: "Feature",
2664
2701
  geometry: {
@@ -2672,7 +2709,7 @@ function zr(o) {
2672
2709
  properties: {}
2673
2710
  } : null : null;
2674
2711
  }
2675
- const Or = {}, Er = {
2712
+ const Fr = {}, Or = {
2676
2713
  xmlns: "http://www.w3.org/2000/svg",
2677
2714
  viewBox: "0 0 24 24",
2678
2715
  stroke: "currentColor",
@@ -2682,18 +2719,18 @@ const Or = {}, Er = {
2682
2719
  "stroke-linejoin": "round",
2683
2720
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2684
2721
  };
2685
- function Fr(o, e) {
2686
- return i(), u("svg", Er, e[0] || (e[0] = [
2687
- t("path", {
2722
+ function Dr(o, e) {
2723
+ return i(), u("svg", Or, e[0] || (e[0] = [
2724
+ l("path", {
2688
2725
  stroke: "none",
2689
2726
  d: "M0 0h24v24H0z",
2690
2727
  fill: "none"
2691
2728
  }, null, -1),
2692
- t("path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" }, null, -1),
2693
- t("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
2729
+ l("path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" }, null, -1),
2730
+ l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
2694
2731
  ]));
2695
2732
  }
2696
- const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
2733
+ const Ur = /* @__PURE__ */ R(Fr, [["render", Dr]]), Tr = {}, Rr = {
2697
2734
  xmlns: "http://www.w3.org/2000/svg",
2698
2735
  viewBox: "0 0 24 24",
2699
2736
  fill: "none",
@@ -2703,19 +2740,19 @@ const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
2703
2740
  "stroke-linejoin": "round",
2704
2741
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2705
2742
  };
2706
- function Rr(o, e) {
2707
- return i(), u("svg", Tr, e[0] || (e[0] = [
2708
- t("path", {
2743
+ function Pr(o, e) {
2744
+ return i(), u("svg", Rr, e[0] || (e[0] = [
2745
+ l("path", {
2709
2746
  stroke: "none",
2710
2747
  d: "M0 0h24v24H0z",
2711
2748
  fill: "none"
2712
2749
  }, null, -1),
2713
- t("path", { d: "M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2714
- t("path", { d: "M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2715
- t("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2750
+ l("path", { d: "M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2751
+ l("path", { d: "M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2752
+ l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2716
2753
  ]));
2717
2754
  }
2718
- const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
2755
+ const Nr = /* @__PURE__ */ R(Tr, [["render", Pr]]), Hr = {}, qr = {
2719
2756
  xmlns: "http://www.w3.org/2000/svg",
2720
2757
  viewBox: "0 0 24 24",
2721
2758
  fill: "none",
@@ -2725,12 +2762,12 @@ const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
2725
2762
  "stroke-linejoin": "round",
2726
2763
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
2727
2764
  };
2728
- function qr(o, e) {
2729
- return i(), u("svg", Hr, e[0] || (e[0] = [
2765
+ function Gr(o, e) {
2766
+ return i(), u("svg", qr, e[0] || (e[0] = [
2730
2767
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
2731
2768
  ]));
2732
2769
  }
2733
- const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
2770
+ const Jr = /* @__PURE__ */ R(Hr, [["render", Gr]]), Kr = {}, Zr = {
2734
2771
  xmlns: "http://www.w3.org/2000/svg",
2735
2772
  viewBox: "0 0 24 24",
2736
2773
  fill: "none",
@@ -2740,12 +2777,12 @@ const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
2740
2777
  "stroke-linejoin": "round",
2741
2778
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
2742
2779
  };
2743
- function Zr(o, e) {
2744
- return i(), u("svg", Kr, e[0] || (e[0] = [
2780
+ function Wr(o, e) {
2781
+ return i(), u("svg", Zr, e[0] || (e[0] = [
2745
2782
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
2746
2783
  ]));
2747
2784
  }
2748
- const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
2785
+ const Qr = /* @__PURE__ */ R(Kr, [["render", Wr]]), Xr = {}, Yr = {
2749
2786
  version: "1.1",
2750
2787
  viewBox: "0 0 14 14",
2751
2788
  xmlns: "http://www.w3.org/2000/svg",
@@ -2753,28 +2790,28 @@ const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
2753
2790
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
2754
2791
  class: "fullscreen-icon"
2755
2792
  };
2756
- function Yr(o, e) {
2757
- return i(), u("svg", Xr, e[0] || (e[0] = [
2758
- t("title", null, null, -1),
2759
- t("desc", null, null, -1),
2760
- t("defs", null, null, -1),
2761
- t("g", {
2793
+ function es(o, e) {
2794
+ return i(), u("svg", Yr, e[0] || (e[0] = [
2795
+ l("title", null, null, -1),
2796
+ l("desc", null, null, -1),
2797
+ l("defs", null, null, -1),
2798
+ l("g", {
2762
2799
  fill: "none",
2763
2800
  "fill-rule": "evenodd",
2764
2801
  id: "Page-1",
2765
2802
  stroke: "none",
2766
2803
  "stroke-width": "1"
2767
2804
  }, [
2768
- t("g", {
2805
+ l("g", {
2769
2806
  fill: "#000000",
2770
2807
  id: "Core",
2771
2808
  transform: "translate(-215.000000, -257.000000)"
2772
2809
  }, [
2773
- t("g", {
2810
+ l("g", {
2774
2811
  id: "fullscreen",
2775
2812
  transform: "translate(215.000000, 257.000000)"
2776
2813
  }, [
2777
- t("path", {
2814
+ l("path", {
2778
2815
  d: "M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",
2779
2816
  id: "Shape"
2780
2817
  })
@@ -2783,10 +2820,10 @@ function Yr(o, e) {
2783
2820
  ], -1)
2784
2821
  ]));
2785
2822
  }
2786
- const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__search" }, ls = { class: "map-search__input" }, os = { class: "flex flex-nowrap relative" }, as = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, rs = { class: "flex items-center w-full" }, ss = { class: "max-w-[90%] truncate" }, ns = {
2823
+ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__search" }, os = { class: "map-search__input" }, as = { class: "flex flex-nowrap relative" }, rs = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, ss = { class: "flex items-center w-full" }, ns = { class: "max-w-[90%] truncate" }, is = {
2787
2824
  key: 0,
2788
2825
  class: "absolute z-[3100] mt-0.5 left-0 right-0"
2789
- }, is = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, us = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, ds = ["onClick"], cs = { class: "flex justify-between items-center w-full" }, ps = { class: "flex items-center" }, fs = {
2826
+ }, us = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, ds = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, cs = ["onClick"], ps = { class: "flex justify-between items-center w-full" }, fs = { class: "flex items-center" }, vs = {
2790
2827
  key: 0,
2791
2828
  class: "flex-shrink-0 w-3.5 h-3.5 text-blue-600",
2792
2829
  width: "24",
@@ -2797,49 +2834,49 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2797
2834
  "stroke-width": "2",
2798
2835
  "stroke-linecap": "round",
2799
2836
  "stroke-linejoin": "round"
2800
- }, vs = { class: "relative w-full" }, ms = { class: "vs-form-text relative bg-white rounded-lg" }, hs = {
2837
+ }, ms = { class: "relative w-full" }, hs = { class: "vs-form-text relative bg-white rounded-lg" }, gs = {
2801
2838
  key: 1,
2802
2839
  class: "absolute left-0 right-0 top-full z-[3200] bg-white border border-gray-200 rounded-b-lg shadow-lg max-h-72 overflow-auto"
2803
- }, gs = { key: 0 }, bs = ["onClick"], ys = {
2840
+ }, bs = { key: 0 }, ys = ["onClick"], xs = {
2804
2841
  key: 1,
2805
2842
  class: "px-3 py-2 text-xs text-gray-500"
2806
- }, xs = {
2843
+ }, ws = {
2807
2844
  key: 2,
2808
2845
  class: "px-3 py-2 text-xs text-gray-400"
2809
- }, ws = /* @__PURE__ */ A({
2846
+ }, ks = /* @__PURE__ */ A({
2810
2847
  __name: "map-search",
2811
2848
  props: {
2812
2849
  placeholder: { default: "50, 30" }
2813
2850
  },
2814
2851
  emits: ["goToCoordinates"],
2815
2852
  setup(o, { emit: e }) {
2816
- const l = e, n = $(!1), r = $("coordinates"), a = $(""), s = $([]), d = $(!1), p = $(!1);
2853
+ const t = e, n = k(!1), r = k("coordinates"), a = k(""), s = k([]), d = k(!1), p = k(!1);
2817
2854
  let f;
2818
2855
  const c = [
2819
2856
  { value: "coordinates", label: "Пошук по кординатам" },
2820
2857
  { value: "atu", label: "АТУ" },
2821
2858
  { value: "address", label: "Адресса" },
2822
2859
  { value: "search_here", label: "Пошук HERE" }
2823
- ], g = D(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
2860
+ ], g = O(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
2824
2861
  function v(_) {
2825
- r.value = _.value, n.value = !1, a.value = "", a.value && F();
2862
+ r.value = _.value, n.value = !1, a.value = "", a.value && D();
2826
2863
  }
2827
2864
  function M(_) {
2828
2865
  _.target.closest(".map-search__input") || (n.value = !1);
2829
2866
  }
2830
- ue(() => document.addEventListener("click", M)), et(() => document.removeEventListener("click", M));
2867
+ ne(() => document.addEventListener("click", M)), Fe(() => document.removeEventListener("click", M));
2831
2868
  async function I(_) {
2832
2869
  let x;
2833
2870
  r.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : r.value === "address" ? x = "/api/suggest/map.address_id" : r.value === "search_here" && (x = "/api/gis-url-proxy");
2834
2871
  const h = new URL(x || "");
2835
2872
  return r.value === "search_here" ? h.searchParams.set("searchtext", _) : (r.value === "atu" || r.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2836
2873
  }
2837
- function F() {
2874
+ function D() {
2838
2875
  if (d.value = !0, p.value = !0, r.value === "coordinates") {
2839
2876
  const _ = a.value.trim().split(",");
2840
2877
  if (_.length === 2) {
2841
2878
  const x = parseFloat(_[0]), h = parseFloat(_[1]);
2842
- !Number.isNaN(x) && !Number.isNaN(h) && l("goToCoordinates", [x, h]);
2879
+ !Number.isNaN(x) && !Number.isNaN(h) && t("goToCoordinates", [x, h]);
2843
2880
  }
2844
2881
  return;
2845
2882
  }
@@ -2859,32 +2896,32 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2859
2896
  }
2860
2897
  }, 300);
2861
2898
  }
2862
- function U() {
2899
+ function T() {
2863
2900
  a.value = "", s.value = [], d.value = !1, p.value = !1;
2864
2901
  }
2865
2902
  function P(_) {
2866
- l("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
2903
+ t("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
2867
2904
  }
2868
- return (_, x) => (i(), u("div", ts, [
2869
- t("div", ls, [
2870
- t("div", os, [
2871
- t("div", as, [
2872
- t("button", {
2905
+ return (_, x) => (i(), u("div", ls, [
2906
+ l("div", os, [
2907
+ l("div", as, [
2908
+ l("div", rs, [
2909
+ l("button", {
2873
2910
  type: "button",
2874
2911
  onClick: x[0] || (x[0] = (h) => n.value = !n.value),
2875
2912
  class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
2876
2913
  }, [
2877
- t("div", rs, [
2878
- t("span", ss, E(g.value), 1)
2914
+ l("div", ss, [
2915
+ l("span", ns, E(g.value), 1)
2879
2916
  ]),
2880
- x[3] || (x[3] = t("svg", {
2917
+ x[3] || (x[3] = l("svg", {
2881
2918
  class: "stroke-gray-500 absolute right-3 translate-y-1/2 bottom-1/2",
2882
2919
  width: "15",
2883
2920
  height: "15",
2884
2921
  viewBox: "0 0 24 24",
2885
2922
  fill: "none"
2886
2923
  }, [
2887
- t("path", {
2924
+ l("path", {
2888
2925
  d: "M6 9l6 6 6-6",
2889
2926
  "stroke-width": "2",
2890
2927
  "stroke-linecap": "round",
@@ -2892,44 +2929,44 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2892
2929
  })
2893
2930
  ], -1))
2894
2931
  ]),
2895
- n.value ? (i(), u("div", ns, [
2896
- t("div", is, [
2897
- t("div", us, [
2898
- (i(), u(Q, null, Y(c, (h) => t("div", {
2932
+ n.value ? (i(), u("div", is, [
2933
+ l("div", us, [
2934
+ l("div", ds, [
2935
+ (i(), u(Q, null, Y(c, (h) => l("div", {
2899
2936
  onClick: (J) => v(h),
2900
2937
  key: h.value,
2901
2938
  class: "form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800 cursor-default"
2902
2939
  }, [
2903
- t("div", cs, [
2904
- t("div", ps, [
2905
- t("div", null, E(h.label), 1)
2940
+ l("div", ps, [
2941
+ l("div", fs, [
2942
+ l("div", null, E(h.label), 1)
2906
2943
  ]),
2907
- h.value === r.value ? (i(), u("svg", fs, x[4] || (x[4] = [
2908
- t("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2909
- ]))) : S("", !0)
2944
+ h.value === r.value ? (i(), u("svg", vs, x[4] || (x[4] = [
2945
+ l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2946
+ ]))) : B("", !0)
2910
2947
  ])
2911
- ], 8, ds)), 64))
2948
+ ], 8, cs)), 64))
2912
2949
  ])
2913
2950
  ])
2914
- ])) : S("", !0)
2951
+ ])) : B("", !0)
2915
2952
  ]),
2916
- t("div", vs, [
2917
- t("div", ms, [
2918
- x[6] || (x[6] = t("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2919
- t("svg", {
2953
+ l("div", ms, [
2954
+ l("div", hs, [
2955
+ x[6] || (x[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2956
+ l("svg", {
2920
2957
  width: "16",
2921
2958
  height: "16",
2922
2959
  viewBox: "0 0 24 24",
2923
2960
  fill: "none",
2924
2961
  stroke: "currentColor"
2925
2962
  }, [
2926
- t("circle", {
2963
+ l("circle", {
2927
2964
  cx: "11",
2928
2965
  cy: "11",
2929
2966
  r: "8",
2930
2967
  "stroke-width": "2"
2931
2968
  }),
2932
- t("line", {
2969
+ l("line", {
2933
2970
  x1: "21",
2934
2971
  y1: "21",
2935
2972
  x2: "16.65",
@@ -2938,24 +2975,24 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2938
2975
  })
2939
2976
  ])
2940
2977
  ], -1)),
2941
- K(t("input", {
2978
+ G(l("input", {
2942
2979
  type: "text",
2943
2980
  "onUpdate:modelValue": x[1] || (x[1] = (h) => a.value = h),
2944
- onInput: F,
2981
+ onInput: D,
2945
2982
  onFocus: x[2] || (x[2] = (h) => d.value = !0),
2946
- placeholder: "Пошук...",
2983
+ placeholder: "lat, lng ex. 50, 30",
2947
2984
  class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
2948
2985
  }, null, 544), [
2949
- [ne, a.value]
2986
+ [ie, a.value]
2950
2987
  ]),
2951
2988
  a.value ? (i(), u("button", {
2952
2989
  key: 0,
2953
- onClick: U,
2990
+ onClick: T,
2954
2991
  class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
2955
2992
  "aria-label": "Очистити",
2956
2993
  type: "button"
2957
2994
  }, x[5] || (x[5] = [
2958
- t("svg", {
2995
+ l("svg", {
2959
2996
  width: "15",
2960
2997
  height: "15",
2961
2998
  viewBox: "0 0 24 24",
@@ -2963,29 +3000,29 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2963
3000
  stroke: "currentColor",
2964
3001
  "stroke-width": "2"
2965
3002
  }, [
2966
- t("path", {
3003
+ l("path", {
2967
3004
  d: "M18 6L6 18M6 6l12 12",
2968
3005
  "stroke-linecap": "round",
2969
3006
  "stroke-linejoin": "round"
2970
3007
  })
2971
3008
  ], -1)
2972
- ]))) : S("", !0),
2973
- d.value && r.value !== "coordinates" ? (i(), u("div", hs, [
2974
- s.value.length ? (i(), u("ul", gs, [
3009
+ ]))) : B("", !0),
3010
+ d.value && r.value !== "coordinates" ? (i(), u("div", gs, [
3011
+ s.value.length ? (i(), u("ul", bs, [
2975
3012
  (i(!0), u(Q, null, Y(s.value, (h) => (i(), u("li", {
2976
3013
  key: h.properties.place_id,
2977
3014
  onClick: (J) => P(h),
2978
3015
  class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
2979
- }, E(h.properties.display_name), 9, bs))), 128))
2980
- ])) : p.value ? (i(), u("div", ys, "Шукаю…")) : (i(), u("div", xs, "Нічого не знайдено"))
2981
- ])) : S("", !0)
3016
+ }, E(h.properties.display_name), 9, ys))), 128))
3017
+ ])) : p.value ? (i(), u("div", xs, "Шукаю…")) : (i(), u("div", ws, "Нічого не знайдено"))
3018
+ ])) : B("", !0)
2982
3019
  ])
2983
3020
  ])
2984
3021
  ])
2985
3022
  ])
2986
3023
  ]));
2987
3024
  }
2988
- }), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */ A({
3025
+ }), _s = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, $s = { class: "flex gap-2" }, Cs = ["onClick", "title"], Vs = ["src"], Ms = /* @__PURE__ */ A({
2989
3026
  __name: "map-layers",
2990
3027
  props: {
2991
3028
  basemaps: {},
@@ -2993,41 +3030,42 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2993
3030
  },
2994
3031
  emits: ["onLayerChange"],
2995
3032
  setup(o, { emit: e }) {
2996
- const n = $(o.defaultLayer ?? ""), r = e;
3033
+ const n = k(o.defaultLayer ?? ""), r = e;
2997
3034
  function a(s) {
2998
3035
  r("onLayerChange", s), n.value = s;
2999
3036
  }
3000
- return (s, d) => (i(), u("div", ks, [
3001
- t("div", _s, [
3037
+ return (s, d) => (i(), u("div", _s, [
3038
+ l("div", $s, [
3002
3039
  (i(!0), u(Q, null, Y(s.basemaps, (p, f) => (i(), u("div", {
3003
3040
  key: f,
3004
- class: B(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3041
+ class: S(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3005
3042
  onClick: (c) => a(f),
3006
3043
  title: f,
3007
3044
  role: "button",
3008
3045
  tabindex: "0"
3009
3046
  }, [
3010
- t("img", {
3047
+ l("img", {
3011
3048
  src: p.preview,
3012
3049
  alt: "",
3013
3050
  class: "w-14 h-14 object-cover"
3014
- }, null, 8, Cs)
3015
- ], 10, $s))), 128))
3051
+ }, null, 8, Vs)
3052
+ ], 10, Cs))), 128))
3016
3053
  ])
3017
3054
  ]));
3018
3055
  }
3019
- }), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" }, Is = { class: "flex flex-col gap-[2px]" }, As = ["aria-pressed"], zs = ["aria-pressed"], Os = ["aria-pressed"], Es = ["aria-pressed"], Fs = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Ds = {
3056
+ }), Ls = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ss = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, js = ["disabled"], Is = { class: "absolute top-4 right-4 z-[1000]" }, As = { class: "flex flex-col gap-[2px]" }, zs = ["aria-pressed"], Es = ["aria-pressed"], Fs = ["aria-pressed"], Os = ["aria-pressed"], Ds = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Us = {
3020
3057
  key: 0,
3021
3058
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3022
- }, Us = { class: "mr-auto" }, Ts = { class: "font-bold" }, Rs = { class: "flex items-center" }, Ps = { class: "text-xs mr-2" }, Ns = {
3059
+ }, Ts = { class: "mr-auto" }, Rs = { class: "font-bold" }, Ps = { class: "flex items-center" }, Ns = { class: "text-xs mr-2" }, Hs = {
3023
3060
  key: 0,
3024
3061
  class: "text-xs"
3025
- }, Hs = {
3062
+ }, qs = {
3026
3063
  key: 1,
3027
3064
  class: "text-xs"
3028
- }, qs = /* @__PURE__ */ A({
3065
+ }, Gs = /* @__PURE__ */ A({
3029
3066
  __name: "vs-input-map",
3030
3067
  props: {
3068
+ tools: {},
3031
3069
  style: {},
3032
3070
  customClass: {},
3033
3071
  disabled: { type: Boolean },
@@ -3038,9 +3076,11 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3038
3076
  },
3039
3077
  emits: ["update:modelValue"],
3040
3078
  setup(o, { emit: e }) {
3041
- const l = o, n = e, r = $(null);
3079
+ const t = o;
3080
+ console.log(t);
3081
+ const n = e, r = k(null);
3042
3082
  let a, s, d;
3043
- const p = $(null), f = $(null), c = $(6), g = $(0), v = $(null), M = {
3083
+ const p = k(null), f = k(null), c = k(6), g = k(0), v = k(null), M = {
3044
3084
  topo100: {
3045
3085
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3046
3086
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3055,52 +3095,52 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3055
3095
  }
3056
3096
  };
3057
3097
  let I;
3058
- const F = $("topo100");
3059
- function U() {
3060
- return new Promise((b, y) => {
3098
+ const D = k("topo100");
3099
+ function T() {
3100
+ return new Promise((b, $) => {
3061
3101
  window.L && window.L.Draw && b(0);
3062
- const T = (ee) => {
3063
- if (Array.from(document.styleSheets).some((he) => he?.href?.includes(ee))) return;
3064
- const de = document.createElement("link");
3065
- de.rel = "stylesheet", de.href = ee, document.head.appendChild(de);
3066
- }, N = (ee) => new Promise((_e, de) => {
3067
- const he = Array.from(document.scripts).find((ce) => ce.src === ee);
3068
- if (he) {
3069
- he.addEventListener("load", () => _e()), he.addEventListener("error", (ce) => de(ce));
3102
+ const F = (ee) => {
3103
+ if (Array.from(document.styleSheets).some((be) => be?.href?.includes(ee))) return;
3104
+ const pe = document.createElement("link");
3105
+ pe.rel = "stylesheet", pe.href = ee, document.head.appendChild(pe);
3106
+ }, N = (ee) => new Promise(($e, pe) => {
3107
+ const be = Array.from(document.scripts).find((fe) => fe.src === ee);
3108
+ if (be) {
3109
+ be.addEventListener("load", () => $e()), be.addEventListener("error", (fe) => pe(fe));
3070
3110
  return;
3071
3111
  }
3072
- const ge = document.createElement("script");
3073
- ge.src = ee, ge.async = !0, ge.onload = () => _e(), ge.onerror = (ce) => de(ce), document.body.appendChild(ge);
3112
+ const ye = document.createElement("script");
3113
+ ye.src = ee, ye.async = !0, ye.onload = () => $e(), ye.onerror = (fe) => pe(fe), document.body.appendChild(ye);
3074
3114
  });
3075
- T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(y);
3115
+ F("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), F("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch($);
3076
3116
  });
3077
3117
  }
3078
3118
  function P() {
3079
3119
  const b = s.toGeoJSON();
3080
- let y = null;
3081
- b?.features?.length && (y = b.features[0].geometry), n("update:modelValue", y), g.value = s.getLayers().length;
3120
+ let $ = null;
3121
+ b?.features?.length && ($ = b.features[0].geometry), n("update:modelValue", $), g.value = s.getLayers().length;
3082
3122
  }
3083
3123
  function _(b = 30) {
3084
- const y = s.getLayers();
3085
- if (!y.length) return;
3086
- const N = L.featureGroup(y).getBounds();
3124
+ const $ = s.getLayers();
3125
+ if (!$.length) return;
3126
+ const N = L.featureGroup($).getBounds();
3087
3127
  N && N.isValid() && a.fitBounds(N, { padding: [b, b] });
3088
3128
  }
3089
3129
  function x() {
3090
3130
  p.value?.click();
3091
3131
  }
3092
- const h = $("");
3132
+ const h = k("");
3093
3133
  function J(b) {
3094
3134
  return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
3095
3135
  }
3096
3136
  function C(b) {
3097
3137
  if (b instanceof L.Circle) {
3098
- const y = b.getRadius();
3099
- return Math.PI * (y * y) / 1e6;
3138
+ const $ = b.getRadius();
3139
+ return Math.PI * ($ * $) / 1e6;
3100
3140
  }
3101
3141
  if (b instanceof L.Polygon || b instanceof L.Rectangle)
3102
3142
  try {
3103
- const y = b.getLatLngs(), T = Array.isArray(y[0]) ? y[0] : y, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(T) : 0;
3143
+ const $ = b.getLatLngs(), F = Array.isArray($[0]) ? $[0] : $, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(F) : 0;
3104
3144
  return N ? N / 1e6 : 0;
3105
3145
  } catch {
3106
3146
  return null;
@@ -3116,39 +3156,41 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3116
3156
  v.value = null, g.value = 0;
3117
3157
  return;
3118
3158
  }
3119
- const y = b[b.length - 1], T = J(y), N = m(y), ee = C(y);
3159
+ const $ = b[b.length - 1], F = J($), N = m($), ee = C($);
3120
3160
  v.value = {
3121
- type: T,
3161
+ type: F,
3122
3162
  center: N,
3123
3163
  areaKm2: ee,
3124
- layer: y
3164
+ layer: $
3125
3165
  }, g.value = b.length;
3126
3166
  }
3127
3167
  function z() {
3128
3168
  const b = v.value?.layer;
3129
3169
  b && (b instanceof L.Circle && b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && a.setView(b.getLatLng(), Math.max(c.value, 14)));
3130
3170
  }
3131
- function Z() {
3171
+ function W() {
3132
3172
  const b = v.value?.layer;
3133
3173
  b && (s.removeLayer(b), P(), V());
3134
3174
  }
3135
- ue(async () => {
3136
- await U(), L.drawLocal = Ar, a = L.map(r.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (y) => {
3137
- const { layer: T } = y;
3138
- s.clearLayers(), s.addLayer(T), P(), V(), _(), h.value = "";
3175
+ ne(async () => {
3176
+ await T(), L.drawLocal = zr, a = L.map(r.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), D.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (F) => {
3177
+ const { layer: N } = F;
3178
+ s.clearLayers(), s.addLayer(N), P(), V(), _(), h.value = "";
3139
3179
  }), a.on(L.Draw.Event.EDITED, () => {
3140
3180
  P(), V(), _();
3141
3181
  }), a.on(L.Draw.Event.DELETED, () => {
3142
3182
  P(), V(), _();
3143
- }), a.on("mousemove", (y) => {
3144
- f.value = y.latlng;
3183
+ });
3184
+ let b = !1;
3185
+ a.on("mousemove", (F) => {
3186
+ b || (a.invalidateSize(), b = !0), f.value = F.latlng;
3145
3187
  }), a.on("zoomend", () => {
3146
3188
  c.value = a.getZoom();
3147
3189
  });
3148
- const b = zr(l.modelValue);
3149
- if (b) {
3150
- const y = [];
3151
- L.geoJSON(b).eachLayer((T) => y.push(T)), y.length && s.addLayer(y[0]), P(), V(), _();
3190
+ const $ = Er(t.modelValue);
3191
+ if ($) {
3192
+ const F = [];
3193
+ L.geoJSON($).eachLayer((N) => F.push(N)), F.length && s.addLayer(F[0]), P(), V(), _();
3152
3194
  }
3153
3195
  });
3154
3196
  function te(b) {
@@ -3173,174 +3215,176 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3173
3215
  d && (d.enable(), h.value = b);
3174
3216
  }
3175
3217
  }
3176
- function ye() {
3177
- const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), T = URL.createObjectURL(y), N = document.createElement("a");
3178
- N.href = T, N.download = "data.geojson", N.click(), URL.revokeObjectURL(T);
3218
+ function xe() {
3219
+ const b = s.toGeoJSON(), $ = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), F = URL.createObjectURL($), N = document.createElement("a");
3220
+ N.href = F, N.download = "data.geojson", N.click(), URL.revokeObjectURL(F);
3179
3221
  }
3180
- function we(b) {
3181
- const y = b.target.files?.[0];
3182
- if (!y) return;
3183
- const T = new FileReader();
3184
- T.onload = () => {
3185
- if (typeof T.result == "string")
3222
+ function ke(b) {
3223
+ const $ = b.target.files?.[0];
3224
+ if (!$) return;
3225
+ const F = new FileReader();
3226
+ F.onload = () => {
3227
+ if (typeof F.result == "string")
3186
3228
  try {
3187
- const N = JSON.parse(T.result);
3229
+ const N = JSON.parse(F.result);
3188
3230
  s.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
3189
3231
  s.addLayer(ee);
3190
3232
  }), P(), V(), _();
3191
3233
  } finally {
3192
3234
  b.target.value = "";
3193
3235
  }
3194
- }, T.readAsText(y);
3236
+ }, F.readAsText($);
3195
3237
  }
3196
- function ie(b) {
3197
- a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = b);
3238
+ function ue(b) {
3239
+ a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), D.value = b);
3198
3240
  }
3199
3241
  function Ae(b) {
3200
- const y = L.latLng(b[0], b[1]);
3201
- a.setView(y, 13);
3242
+ const $ = L.latLng(b[0], b[1]);
3243
+ a.setView($, 13);
3202
3244
  }
3203
3245
  se(
3204
- () => l.modelValue,
3246
+ () => t.modelValue,
3205
3247
  (b) => {
3206
- s.clearLayers(), b && L.geoJSON({ type: "Feature", geometry: b }).eachLayer((y) => {
3207
- s.addLayer(y);
3248
+ s.clearLayers(), b && L.geoJSON({ type: "Feature", geometry: b }).eachLayer(($) => {
3249
+ s.addLayer($);
3208
3250
  }), g.value = s.getLayers().length, V(), _();
3209
3251
  }
3210
3252
  );
3211
- const ke = $(!1);
3212
- return (b, y) => (i(), u("div", {
3213
- class: B(["leaflet-map-wrapper relative w-full h-[600px]", { fullscreen: ke.value }])
3253
+ const _e = k(!1);
3254
+ return (b, $) => (i(), u("div", {
3255
+ class: S(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: _e.value }])
3214
3256
  }, [
3215
- t("div", {
3257
+ l("div", {
3216
3258
  ref_key: "mapContainer",
3217
3259
  ref: r,
3218
3260
  class: "w-full h-full"
3219
3261
  }, null, 512),
3220
- t("div", Ms, [
3221
- j(ws, { onGoToCoordinates: Ae }),
3222
- t("div", Ls, [
3223
- t("div", Bs, [
3224
- t("button", {
3262
+ l("div", Ls, [
3263
+ j(ks, { onGoToCoordinates: Ae }),
3264
+ l("div", Ss, [
3265
+ l("div", Bs, [
3266
+ l("button", {
3225
3267
  type: "button",
3226
3268
  class: "vs-btn-row",
3227
3269
  onClick: x
3228
- }, "Імпорт"),
3229
- t("button", {
3270
+ }, "Import"),
3271
+ l("button", {
3230
3272
  type: "button",
3231
3273
  class: "vs-btn-row",
3232
- onClick: ye,
3274
+ onClick: xe,
3233
3275
  disabled: g.value === 0
3234
- }, "Експорт ", 8, Ss)
3276
+ }, "Export ", 8, js)
3235
3277
  ]),
3236
- t("input", {
3278
+ l("input", {
3237
3279
  ref_key: "importRef",
3238
3280
  ref: p,
3239
3281
  type: "file",
3240
- onChange: we,
3282
+ onChange: ke,
3241
3283
  accept: ".json,.geojson",
3242
3284
  class: "hidden"
3243
3285
  }, null, 544)
3244
3286
  ])
3245
3287
  ]),
3246
- t("div", js, [
3247
- t("div", Is, [
3248
- t("button", {
3249
- class: B(["vs-btn", { "vs-active": h.value === "marker" }]),
3288
+ l("div", Is, [
3289
+ l("div", As, [
3290
+ l("button", {
3291
+ class: S(["vs-btn", { "vs-active": h.value === "marker" }]),
3250
3292
  "aria-pressed": h.value === "marker",
3251
3293
  title: "Point (P)",
3252
3294
  "aria-label": "Draw point",
3253
- onClick: y[0] || (y[0] = (T) => te("marker"))
3295
+ onClick: $[0] || ($[0] = (F) => te("marker"))
3254
3296
  }, [
3255
- j(Dr)
3256
- ], 10, As),
3257
- t("button", {
3258
- class: B(["vs-btn", { "vs-active": h.value === "polyline" }]),
3297
+ j(Ur)
3298
+ ], 10, zs),
3299
+ l("button", {
3300
+ class: S(["vs-btn", { "vs-active": h.value === "polyline" }]),
3259
3301
  "aria-pressed": h.value === "polyline",
3260
3302
  title: "Line (L)",
3261
3303
  "aria-label": "Draw polyline",
3262
- onClick: y[1] || (y[1] = (T) => te("polyline"))
3304
+ onClick: $[1] || ($[1] = (F) => te("polyline"))
3263
3305
  }, [
3264
- j(Pr)
3265
- ], 10, zs),
3266
- t("button", {
3267
- class: B(["vs-btn", { "vs-active": h.value === "polygon" }]),
3306
+ j(Nr)
3307
+ ], 10, Es),
3308
+ l("button", {
3309
+ class: S(["vs-btn", { "vs-active": h.value === "polygon" }]),
3268
3310
  "aria-pressed": h.value === "polygon",
3269
3311
  title: "Polygon (G)",
3270
3312
  "aria-label": "Draw polygon",
3271
- onClick: y[2] || (y[2] = (T) => te("polygon"))
3313
+ onClick: $[2] || ($[2] = (F) => te("polygon"))
3272
3314
  }, [
3273
- j(Gr)
3274
- ], 10, Os),
3275
- t("button", {
3276
- class: B(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3315
+ j(Jr)
3316
+ ], 10, Fs),
3317
+ l("button", {
3318
+ class: S(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3277
3319
  "aria-pressed": h.value === "rectangle",
3278
3320
  title: "Rectangle (R)",
3279
3321
  "aria-label": "Draw rectangle",
3280
- onClick: y[3] || (y[3] = (T) => te("rectangle"))
3322
+ onClick: $[3] || ($[3] = (F) => te("rectangle"))
3281
3323
  }, [
3282
- j(Wr)
3283
- ], 10, Es),
3284
- t("button", {
3285
- class: "vs-btn",
3286
- onClick: y[4] || (y[4] = (T) => ke.value = !ke.value)
3324
+ j(Qr)
3325
+ ], 10, Os),
3326
+ l("button", {
3327
+ class: "vs-btn mt-5",
3328
+ onClick: $[4] || ($[4] = (F) => _e.value = !_e.value),
3329
+ title: "Full Screen",
3330
+ "aria-label": "Full Screen"
3287
3331
  }, [
3288
- j(es, { style: { width: "12px", height: "12px" } })
3332
+ j(ts, { style: { width: "12px", height: "12px" } })
3289
3333
  ])
3290
3334
  ])
3291
3335
  ]),
3292
- t("div", {
3293
- class: B(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3336
+ l("div", {
3337
+ class: S(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3294
3338
  }, [
3295
- j(Vs, {
3339
+ j(Ms, {
3296
3340
  basemaps: M,
3297
3341
  "default-layer": "topo100",
3298
- onOnLayerChange: ie
3342
+ onOnLayerChange: ue
3299
3343
  })
3300
3344
  ], 2),
3301
- t("div", Fs, [
3302
- v.value ? (i(), u("div", Ds, [
3303
- t("div", Us, [
3304
- y[7] || (y[7] = oe(" Тип: ")),
3305
- t("span", Ts, E(v.value.type), 1)
3345
+ l("div", Ds, [
3346
+ v.value ? (i(), u("div", Us, [
3347
+ l("div", Ts, [
3348
+ $[7] || ($[7] = oe(" Тип: ", -1)),
3349
+ l("span", Rs, E(v.value.type), 1)
3306
3350
  ]),
3307
- t("div", Rs, [
3308
- t("div", Ps, [
3309
- y[8] || (y[8] = oe(" Центр: ")),
3310
- t("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
3351
+ l("div", Ps, [
3352
+ l("div", Ns, [
3353
+ $[8] || ($[8] = oe(" Центр: ", -1)),
3354
+ l("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
3311
3355
  ]),
3312
- v.value.areaKm2 !== null ? (i(), u("div", Ns, [
3313
- y[9] || (y[9] = oe(" Площа: ")),
3314
- t("b", null, E(v.value.areaKm2.toFixed(1)) + "км²", 1)
3315
- ])) : (i(), u("div", Hs, y[10] || (y[10] = [
3316
- oe(" Площа: "),
3317
- t("b", null, "—", -1)
3356
+ v.value.areaKm2 !== null ? (i(), u("div", Hs, [
3357
+ $[9] || ($[9] = oe(" Площа: ", -1)),
3358
+ l("b", null, E(v.value.areaKm2.toFixed(1)) + "км²", 1)
3359
+ ])) : (i(), u("div", qs, $[10] || ($[10] = [
3360
+ oe(" Площа: ", -1),
3361
+ l("b", null, "—", -1)
3318
3362
  ]))),
3319
- t("button", {
3363
+ l("button", {
3320
3364
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3321
3365
  title: "Наблизити",
3322
- onClick: y[5] || (y[5] = (T) => z())
3323
- }, y[11] || (y[11] = [
3324
- ae('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-d73d6cfa><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-d73d6cfa></path><path d="M7 10l6 0" data-v-d73d6cfa></path><path d="M10 7l0 6" data-v-d73d6cfa></path><path d="M21 21l-6 -6" data-v-d73d6cfa></path></svg>', 1)
3366
+ onClick: $[5] || ($[5] = (F) => z())
3367
+ }, $[11] || ($[11] = [
3368
+ ae('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-55d330eb><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-55d330eb></path><path d="M7 10l6 0" data-v-55d330eb></path><path d="M10 7l0 6" data-v-55d330eb></path><path d="M21 21l-6 -6" data-v-55d330eb></path></svg>', 1)
3325
3369
  ])),
3326
- t("button", {
3370
+ l("button", {
3327
3371
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3328
3372
  title: "Видалити",
3329
- onClick: y[6] || (y[6] = (T) => Z())
3373
+ onClick: $[6] || ($[6] = (F) => W())
3330
3374
  }, [
3331
3375
  j(Ie, { class: "w-3 h-3" })
3332
3376
  ])
3333
3377
  ])
3334
- ])) : S("", !0)
3378
+ ])) : B("", !0)
3335
3379
  ])
3336
3380
  ], 2));
3337
3381
  }
3338
- }), Gs = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-d73d6cfa"]]), Js = ["data-focus"], Ks = { class: "flex items-center" }, Zs = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Ws = ["onClick", "aria-label"], Qs = {
3382
+ }), Js = /* @__PURE__ */ R(Gs, [["__scopeId", "data-v-55d330eb"]]), Ks = ["data-focus"], Zs = { class: "flex items-center" }, Ws = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Qs = ["onClick", "aria-label"], Xs = {
3339
3383
  key: 0,
3340
3384
  class: "absolute text-gray-500 truncate pl-2"
3341
- }, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */ A({
3385
+ }, Ys = { class: "flex-1 min-w-[2px]" }, en = ["placeholder"], tn = { class: "flex items-center shrink-0" }, ln = ["disabled"], on = /* @__PURE__ */ A({
3342
3386
  __name: "vs-input-tag",
3343
- props: /* @__PURE__ */ q({
3387
+ props: /* @__PURE__ */ K({
3344
3388
  unique: { type: Boolean, default: !0 },
3345
3389
  style: { default: () => ({}) },
3346
3390
  customClass: { default: "" },
@@ -3353,18 +3397,18 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3353
3397
  modelValue: { default: [] },
3354
3398
  modelModifiers: {}
3355
3399
  }),
3356
- emits: /* @__PURE__ */ q(["update:modelValue"], ["update:modelValue"]),
3400
+ emits: /* @__PURE__ */ K(["update:modelValue"], ["update:modelValue"]),
3357
3401
  setup(o, { emit: e }) {
3358
- const l = o, n = e;
3359
- me(l.style);
3360
- const r = $(null), a = $(null), s = $(null), d = $(!1), p = $(""), f = G(o, "modelValue"), c = D(() => l.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !l.disabled && f.value?.length > 0), M = D(() => l.disabled), I = async () => {
3361
- M.value || await $e(() => s.value?.focus());
3362
- }, F = (C) => {
3402
+ const t = o, n = e;
3403
+ ge(t.style);
3404
+ const r = k(null), a = k(null), s = k(null), d = k(!1), p = k(""), f = Z(o, "modelValue"), c = O(() => t.placeholder || "Add tag…"), g = O(() => f.value?.length === 0 && p.value === ""), v = O(() => !t.disabled && f.value?.length > 0), M = O(() => t.disabled), I = async () => {
3405
+ M.value || await Ce(() => s.value?.focus());
3406
+ }, D = (C) => {
3363
3407
  const m = C.trim();
3364
- m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : l.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3365
- }, U = () => {
3408
+ m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : t.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3409
+ }, T = () => {
3366
3410
  const C = p.value;
3367
- C.trim() !== "" && F(C), p.value = "";
3411
+ C.trim() !== "" && D(C), p.value = "";
3368
3412
  }, P = (C) => {
3369
3413
  const m = f.value.slice();
3370
3414
  m.splice(C, 1), n("update:modelValue", m);
@@ -3376,7 +3420,7 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3376
3420
  d.value = !1;
3377
3421
  }, J = (C) => {
3378
3422
  const { key: m } = C;
3379
- m === "Enter" ? (C.preventDefault(), U()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3423
+ m === "Enter" ? (C.preventDefault(), T()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3380
3424
  };
3381
3425
  return (C, m) => (i(), u("div", {
3382
3426
  class: "flex gap-1 w-full",
@@ -3385,13 +3429,13 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3385
3429
  onClick: m[1] || (m[1] = re(() => {
3386
3430
  }, ["stop"]))
3387
3431
  }, [
3388
- t("div", {
3389
- class: B(["relative w-full font-sans", l.customClass]),
3432
+ l("div", {
3433
+ class: S(["relative w-full font-sans", t.customClass]),
3390
3434
  role: "group",
3391
3435
  "aria-label": "Tag input"
3392
3436
  }, [
3393
- t("div", {
3394
- class: B([
3437
+ l("div", {
3438
+ class: S([
3395
3439
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
3396
3440
  "border-gray-300 hover:border-gray-400",
3397
3441
  d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
@@ -3400,7 +3444,7 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3400
3444
  "data-focus": d.value ? "true" : "false",
3401
3445
  onClick: I
3402
3446
  }, [
3403
- t("div", {
3447
+ l("div", {
3404
3448
  class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
3405
3449
  ref_key: "chipsRef",
3406
3450
  ref: a
@@ -3409,16 +3453,16 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3409
3453
  key: z,
3410
3454
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3411
3455
  }, [
3412
- t("div", Ks, [
3413
- t("div", Zs, E(V), 1)
3456
+ l("div", Zs, [
3457
+ l("div", Ws, E(V), 1)
3414
3458
  ]),
3415
- t("div", {
3459
+ l("div", {
3416
3460
  role: "button",
3417
3461
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3418
- onClick: re((Z) => P(z), ["stop"]),
3462
+ onClick: re((W) => P(z), ["stop"]),
3419
3463
  "aria-label": `Remove ${V}`
3420
3464
  }, m[2] || (m[2] = [
3421
- t("svg", {
3465
+ l("svg", {
3422
3466
  height: "14",
3423
3467
  width: "14",
3424
3468
  viewBox: "0 0 20 20",
@@ -3426,13 +3470,13 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3426
3470
  focusable: "false",
3427
3471
  class: "inline-block fill-current stroke-current leading-none stroke-0"
3428
3472
  }, [
3429
- t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3473
+ l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3430
3474
  ], -1)
3431
- ]), 8, Ws)
3475
+ ]), 8, Qs)
3432
3476
  ]))), 128)),
3433
- g.value ? (i(), u("div", Qs, E(c.value), 1)) : S("", !0),
3434
- t("div", Xs, [
3435
- M.value ? S("", !0) : K((i(), u("input", {
3477
+ g.value ? (i(), u("div", Xs, E(c.value), 1)) : B("", !0),
3478
+ l("div", Ys, [
3479
+ M.value ? B("", !0) : G((i(), u("input", {
3436
3480
  key: 0,
3437
3481
  ref_key: "inputRef",
3438
3482
  ref: s,
@@ -3449,12 +3493,12 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3449
3493
  onBlur: h,
3450
3494
  onKeydown: J,
3451
3495
  placeholder: f.value && f.value.length ? "" : void 0
3452
- }, null, 40, Ys)), [
3453
- [ne, p.value]
3496
+ }, null, 40, en)), [
3497
+ [ie, p.value]
3454
3498
  ])
3455
3499
  ])
3456
3500
  ], 512),
3457
- t("div", en, [
3501
+ l("div", tn, [
3458
3502
  v.value ? (i(), u("button", {
3459
3503
  key: 0,
3460
3504
  type: "button",
@@ -3463,42 +3507,42 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3463
3507
  disabled: M.value,
3464
3508
  onClick: re(_, ["stop"])
3465
3509
  }, m[3] || (m[3] = [
3466
- t("svg", {
3510
+ l("svg", {
3467
3511
  height: "20",
3468
3512
  width: "20",
3469
3513
  viewBox: "0 0 20 20",
3470
3514
  class: "fill-current"
3471
3515
  }, [
3472
- t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3516
+ l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3473
3517
  ], -1)
3474
- ]), 8, tn)) : S("", !0)
3518
+ ]), 8, ln)) : B("", !0)
3475
3519
  ])
3476
- ], 10, Js)
3520
+ ], 10, Ks)
3477
3521
  ], 2)
3478
3522
  ], 512));
3479
3523
  }
3480
- }), on = {
3481
- VsInputText: He,
3482
- VsInputRadio: Ge,
3483
- "vs-input-text": He,
3484
- "vs-input-textarea": Ia,
3485
- "vs-input-mask": sl,
3486
- "vs-input-number": St,
3487
- "vs-input-radio": Ge,
3488
- "vs-input-select": Sa,
3524
+ }), an = {
3525
+ VsInputText: qe,
3526
+ VsInputRadio: Je,
3527
+ "vs-input-text": qe,
3528
+ "vs-input-textarea": Aa,
3529
+ "vs-input-mask": nl,
3530
+ "vs-input-number": jt,
3531
+ "vs-input-radio": Je,
3532
+ "vs-input-select": ja,
3489
3533
  "vs-input-switcher": lt,
3490
- "vs-input-static": qe,
3491
- "vs-input-container": na,
3492
- "vs-input-date": xl,
3493
- "vs-input-checkbox": bl,
3494
- "vs-input-file": ro,
3495
- "vs-input-html": qe,
3496
- "vs-input-email": ul,
3497
- "vs-input-datatable": Ir,
3498
- "vs-input-map": Gs,
3499
- "vs-input-file-list": Eo,
3500
- "vs-input-tag": ln
3501
- }, an = /* @__PURE__ */ A({
3534
+ "vs-input-static": Ge,
3535
+ "vs-input-container": ia,
3536
+ "vs-input-date": wl,
3537
+ "vs-input-checkbox": yl,
3538
+ "vs-input-file": so,
3539
+ "vs-input-html": Ge,
3540
+ "vs-input-email": dl,
3541
+ "vs-input-datatable": Ar,
3542
+ "vs-input-map": Js,
3543
+ "vs-input-file-list": Oo,
3544
+ "vs-input-tag": on
3545
+ }, rn = /* @__PURE__ */ A({
3502
3546
  __name: "behavior",
3503
3547
  props: {
3504
3548
  api: {},
@@ -3508,19 +3552,19 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3508
3552
  value: {}
3509
3553
  },
3510
3554
  setup(o) {
3511
- const e = o, l = Se("values");
3555
+ const e = o, t = Be("values");
3512
3556
  async function n() {
3513
3557
  try {
3514
3558
  if (!e.api) return;
3515
3559
  const r = e.api.replace("{{value}}", e.value), a = await fetch(r);
3516
3560
  if (!a.ok) {
3517
- pe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3561
+ ve({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3518
3562
  return;
3519
3563
  }
3520
3564
  const s = await a.json();
3521
- if (!e.set || !l) return;
3565
+ if (!e.set || !t) return;
3522
3566
  for (const [d, p] of Object.entries(e.set))
3523
- l.value[d] = s.result[p];
3567
+ t.value[d] = s.result[p];
3524
3568
  } catch (r) {
3525
3569
  console.error(e.error, r);
3526
3570
  }
@@ -3530,9 +3574,9 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3530
3574
  class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
3531
3575
  }, E(r.button), 1));
3532
3576
  }
3533
- }), rn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3577
+ }), sn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3534
3578
  __name: "vs-compact-form-layout",
3535
- props: /* @__PURE__ */ q({
3579
+ props: /* @__PURE__ */ K({
3536
3580
  item: { default: {} },
3537
3581
  layout: { default: "default" },
3538
3582
  style: { default: {} },
@@ -3544,30 +3588,30 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3544
3588
  }),
3545
3589
  emits: ["update:modelValue"],
3546
3590
  setup(o) {
3547
- const e = o, l = G(o, "modelValue"), n = D(() => Mt[`${e.layout}`]), r = D(() => on?.[`vs-input-${e.item.type}`]), a = D(() => {
3548
- const d = H(r);
3591
+ const e = o, t = Z(o, "modelValue"), n = O(() => Lt[`${e.layout}`]), r = O(() => an?.[`vs-input-${e.item.type}`]), a = O(() => {
3592
+ const d = q(r);
3549
3593
  if (!d) return /* @__PURE__ */ new Set();
3550
3594
  const p = d.props ?? d.__vccOpts?.props;
3551
3595
  if (!p) return /* @__PURE__ */ new Set();
3552
3596
  const f = Array.isArray(p) ? p : Object.keys(p);
3553
3597
  return new Set(f);
3554
- }), s = D(() => {
3598
+ }), s = O(() => {
3555
3599
  const d = e.item ?? {}, p = a.value;
3556
3600
  return p.size ? Object.fromEntries(Object.entries(d).filter(([f]) => p.has(f))) : {};
3557
3601
  });
3558
- return (d, p) => (i(), X(xe(n.value), {
3602
+ return (d, p) => (i(), X(we(n.value), {
3559
3603
  ua: e.item.ua,
3560
3604
  error: e.error || "",
3561
3605
  item: d.item,
3562
3606
  label: e.item.label
3563
3607
  }, {
3564
- default: Me(() => [
3565
- t("div", rn, [
3566
- (i(), X(xe(r.value), Ce(s.value, {
3567
- modelValue: l.value,
3568
- "onUpdate:modelValue": p[0] || (p[0] = (f) => l.value = f)
3608
+ default: Le(() => [
3609
+ l("div", sn, [
3610
+ (i(), X(we(r.value), Ve(s.value, {
3611
+ modelValue: t.value,
3612
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => t.value = f)
3569
3613
  }), null, 16, ["modelValue"])),
3570
- d.item.behavior ? (i(), X(an, Ce({ key: 0 }, d.item.behavior, { value: l.value }), null, 16, ["value"])) : S("", !0)
3614
+ d.item.behavior ? (i(), X(rn, Ve({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : B("", !0)
3571
3615
  ])
3572
3616
  ]),
3573
3617
  _: 1
@@ -3576,23 +3620,23 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3576
3620
  }), st = {
3577
3621
  required: "Це поле є обов’язковим",
3578
3622
  email: "Неправильний email"
3579
- }, sn = (o) => o ? !1 : st.required, nn = (o) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) && o ? st.email : !1, un = (o, e) => {
3580
- const l = e.pattern ?? e.regexp;
3581
- return !(typeof l == "string" ? new RegExp(l) : l).test(o) && o ? e.message : !1;
3582
- }, dn = (o, e) => !1, cn = (o, e) => {
3623
+ }, nn = (o) => o ? !1 : st.required, un = (o) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) && o ? st.email : !1, dn = (o, e) => {
3624
+ const t = e.pattern ?? e.regexp;
3625
+ return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
3626
+ }, cn = (o, e) => !1, pn = (o, e) => {
3583
3627
  switch (typeof e == "string" ? e : e.type) {
3584
3628
  case "required":
3585
- return sn(o);
3586
- case "email":
3587
3629
  return nn(o);
3630
+ case "email":
3631
+ return un(o);
3588
3632
  case "regexp":
3589
- return un(o, e);
3633
+ return dn(o, e);
3590
3634
  case "custom":
3591
- return dn();
3635
+ return cn();
3592
3636
  default:
3593
3637
  return !1;
3594
3638
  }
3595
- }, pn = {
3639
+ }, fn = {
3596
3640
  autocomplete: "select",
3597
3641
  combobox: "select",
3598
3642
  datepicker: "date",
@@ -3604,51 +3648,51 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3604
3648
  file: "file"
3605
3649
  // mask: 'text',
3606
3650
  };
3607
- function We(o) {
3651
+ function Qe(o) {
3608
3652
  const e = o.toLowerCase();
3609
- return pn[e] || e;
3653
+ return fn[e] || e;
3610
3654
  }
3611
- function fn(o) {
3655
+ function vn(o) {
3612
3656
  if (Array.isArray(o)) {
3613
- const l = [];
3657
+ const t = [];
3614
3658
  return o.forEach((n) => {
3615
3659
  const r = { ...n };
3616
- r.name = (n.name || n.id || n.key || "").toString(), r.type = We(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), l.push(r);
3617
- }), l;
3660
+ r.name = (n.name || n.id || n.key || "").toString(), r.type = Qe(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), t.push(r);
3661
+ }), t;
3618
3662
  }
3619
3663
  const e = [];
3620
- return Object.entries(o).forEach((l) => {
3664
+ return Object.entries(o).forEach((t) => {
3621
3665
  const n = {
3622
- name: l[0],
3623
- ...l[1],
3624
- type: We(l[1].type),
3625
- label: l[1].label || l[1].ua,
3626
- rules: l[1].rules || l[1].validators
3666
+ name: t[0],
3667
+ ...t[1],
3668
+ type: Qe(t[1].type),
3669
+ label: t[1].label || t[1].ua,
3670
+ rules: t[1].rules || t[1].validators
3627
3671
  };
3628
- l[1].type.includes("list") && (n.multiple = !0), l[1].data && (n.api = `/api/suggest/${l[1].data}`), e.push(n);
3672
+ t[1].type.includes("list") && (n.multiple = !0), t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
3629
3673
  }), e;
3630
3674
  }
3631
- function vn(o, e) {
3632
- const l = fn(e), n = $({});
3675
+ function mn(o, e) {
3676
+ const t = vn(e), n = k({});
3633
3677
  function r(p) {
3634
3678
  const f = p?.conditions;
3635
3679
  if (!f) return !0;
3636
3680
  const c = Array.isArray(f) ? f[0] : f, g = o?.value?.[c];
3637
3681
  return at(g, f);
3638
3682
  }
3639
- const a = (p = l, f = !0) => (p.forEach((c) => {
3683
+ const a = (p = t, f = !0) => (p.forEach((c) => {
3640
3684
  if (c.rules) {
3641
3685
  if (!r(c)) {
3642
3686
  delete n.value[c.name];
3643
3687
  return;
3644
3688
  }
3645
3689
  c.rules.forEach((g) => {
3646
- const v = cn(o.value[c.name], g);
3690
+ const v = pn(o.value[c.name], g);
3647
3691
  v ? n.value[c.name] = v : delete n.value[c.name];
3648
3692
  });
3649
3693
  }
3650
3694
  c.schema && a(c.schema, !1);
3651
- }), f && Object.values(n.value).some(Boolean) ? n.value : null), s = D(() => l?.filter((p) => r(p)));
3695
+ }), f && Object.values(n.value).some(Boolean) ? n.value : null), s = O(() => t?.filter((p) => r(p)));
3652
3696
  return {
3653
3697
  errors: n,
3654
3698
  validate: a,
@@ -3658,9 +3702,9 @@ function vn(o, e) {
3658
3702
  visibleSchema: s
3659
3703
  };
3660
3704
  }
3661
- const Oe = /* @__PURE__ */ A({
3705
+ const Ee = /* @__PURE__ */ A({
3662
3706
  __name: "vs-compact-form",
3663
- props: /* @__PURE__ */ q({
3707
+ props: /* @__PURE__ */ K({
3664
3708
  schema: { default: () => [] },
3665
3709
  style: { default: () => ({}) },
3666
3710
  modelValue: {},
@@ -3672,74 +3716,74 @@ const Oe = /* @__PURE__ */ A({
3672
3716
  values: { default: () => ({}) },
3673
3717
  valuesModifiers: {}
3674
3718
  }),
3675
- emits: /* @__PURE__ */ q(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3676
- setup(o, { expose: e, emit: l }) {
3677
- const n = l, r = o, a = G(o, "form"), s = G(o, "values"), {
3719
+ emits: /* @__PURE__ */ K(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3720
+ setup(o, { expose: e, emit: t }) {
3721
+ const n = t, r = o, a = Z(o, "form"), s = Z(o, "values"), {
3678
3722
  errors: d,
3679
3723
  validate: p,
3680
3724
  reset: f,
3681
3725
  visibleSchema: c
3682
- } = vn(s, r.schema), g = () => {
3726
+ } = mn(s, r.schema), g = () => {
3683
3727
  n("update:modelValue", s.value), p(), n("handle-submit", s.value);
3684
3728
  };
3685
3729
  e({
3686
3730
  validate: p,
3687
3731
  reset: f,
3688
3732
  errors: d
3689
- }), ue(() => {
3733
+ }), ne(() => {
3690
3734
  r.modelValue && (s.value = r.modelValue), a.value.value = s.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = r.formId;
3691
3735
  });
3692
3736
  function v(M, I) {
3693
3737
  if (M === I) return !0;
3694
3738
  if (typeof M != "object" || typeof I != "object" || !M || !I) return !1;
3695
- const F = Object.keys(M), U = Object.keys(I);
3696
- return F.length !== U.length ? !1 : F.every((P) => M[P] === I[P]);
3739
+ const D = Object.keys(M), T = Object.keys(I);
3740
+ return D.length !== T.length ? !1 : D.every((P) => M[P] === I[P]);
3697
3741
  }
3698
- return Ne("form", a), Ne("values", s), (M, I) => (i(), u("form", {
3742
+ return He("form", a), He("values", s), (M, I) => (i(), u("form", {
3699
3743
  onSubmit: re(g, ["prevent"]),
3700
- class: B(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3744
+ class: S(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3701
3745
  }, [
3702
- (i(!0), u(Q, null, Y(H(c), (F) => (i(), X(rt, {
3703
- key: F.name,
3704
- class: B(M.layout === "horizontal" ? "col-span-12" : `col-span-${F.col || 12} `),
3705
- style: fe(M.style),
3706
- item: F,
3746
+ (i(!0), u(Q, null, Y(q(c), (D) => (i(), X(rt, {
3747
+ key: D.name,
3748
+ class: S(M.layout === "horizontal" ? "col-span-12" : `col-span-${D.col || 12} `),
3749
+ style: me(M.style),
3750
+ item: D,
3707
3751
  layout: M.layout,
3708
- "model-value": s.value[F.name],
3709
- "onUpdate:modelValue": (U) => {
3710
- const P = s.value[F.name];
3711
- v(P, U) || (s.value[F.name] = U);
3752
+ "model-value": s.value[D.name],
3753
+ "onUpdate:modelValue": (T) => {
3754
+ const P = s.value[D.name];
3755
+ v(P, T) || (s.value[D.name] = T);
3712
3756
  },
3713
- error: H(d)[F.name]
3757
+ error: q(d)[D.name]
3714
3758
  }, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
3715
3759
  ], 34));
3716
3760
  }
3717
3761
  });
3718
- Oe.install = function(e) {
3719
- e.component("VForm", Oe), Object.assign(e.config.globalProperties, {
3720
- $form: Ve
3721
- }), e.provide("form", Ve), window.v3plugin || (window.v3plugin = {}), window.v3plugin.$form = e.config.globalProperties.$form;
3762
+ Ee.install = function(e) {
3763
+ e.component("VForm", Ee), Object.assign(e.config.globalProperties, {
3764
+ $form: Me
3765
+ }), e.provide("form", Me), window.v3plugin || (window.v3plugin = {});
3722
3766
  };
3723
3767
  export {
3724
- va as ModalEdit,
3725
- Oe as VForm,
3726
- bl as VsInputCheckbox,
3727
- na as VsInputContainer,
3728
- xl as VsInputDate,
3729
- ul as VsInputEmail,
3730
- ro as VsInputFile,
3731
- Eo as VsInputFileList,
3732
- sl as VsInputMask,
3733
- St as VsInputNumber,
3734
- Ge as VsInputRadio,
3735
- Sa as VsInputSelect,
3736
- qe as VsInputStatic,
3768
+ ma as ModalEdit,
3769
+ Ee as VForm,
3770
+ yl as VsInputCheckbox,
3771
+ ia as VsInputContainer,
3772
+ wl as VsInputDate,
3773
+ dl as VsInputEmail,
3774
+ so as VsInputFile,
3775
+ Oo as VsInputFileList,
3776
+ nl as VsInputMask,
3777
+ jt as VsInputNumber,
3778
+ Je as VsInputRadio,
3779
+ ja as VsInputSelect,
3780
+ Ge as VsInputStatic,
3737
3781
  lt as VsInputSwitcher,
3738
- ln as VsInputTag,
3739
- He as VsInputText,
3740
- Ia as VsInputTextarea,
3741
- Oe as default,
3742
- on as inputs,
3743
- Ir as vsInputDatatable,
3744
- Gs as vsInputMap
3782
+ on as VsInputTag,
3783
+ qe as VsInputText,
3784
+ Aa as VsInputTextarea,
3785
+ Ee as default,
3786
+ an as inputs,
3787
+ Ar as vsInputDatatable,
3788
+ Js as vsInputMap
3745
3789
  };