@topvisor/ui 1.4.0-TopGroupSelector.7 → 1.4.0-TopGroupSelector.8

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 (90) hide show
  1. package/.chunks/{core-DVQVVUiP.es.js → core-BL-38XF7.es.js} +4 -4
  2. package/.chunks/{core-DVQVVUiP.es.js.map → core-BL-38XF7.es.js.map} +1 -1
  3. package/.chunks/{core-B9TwJi3h.amd.js → core-BsPx05H9.amd.js} +2 -2
  4. package/.chunks/{core-B9TwJi3h.amd.js.map → core-BsPx05H9.amd.js.map} +1 -1
  5. package/.chunks/{datepicker-bidhcksv.amd.js → datepicker-3coUsFW2.amd.js} +2 -2
  6. package/.chunks/{datepicker-bidhcksv.amd.js.map → datepicker-3coUsFW2.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-CrASsJeF.es.js → datepicker-D1Hw3a3o.es.js} +2 -2
  8. package/.chunks/{datepicker-CrASsJeF.es.js.map → datepicker-D1Hw3a3o.es.js.map} +1 -1
  9. package/.chunks/{dialog_regionSelectorRegions-DJu5Y1WK.es.js → dialog_regionSelectorRegions-1UVhgK2f.es.js} +4 -4
  10. package/.chunks/{dialog_regionSelectorRegions-DJu5Y1WK.es.js.map → dialog_regionSelectorRegions-1UVhgK2f.es.js.map} +1 -1
  11. package/.chunks/{dialog_regionSelectorRegions-Dc-YGZ0l.amd.js → dialog_regionSelectorRegions-CZ8IX7la.amd.js} +2 -2
  12. package/.chunks/{dialog_regionSelectorRegions-Dc-YGZ0l.amd.js.map → dialog_regionSelectorRegions-CZ8IX7la.amd.js.map} +1 -1
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BP6GFkkz.es.js → dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js} +2 -2
  14. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BP6GFkkz.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map} +1 -1
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang--Xstly2G.amd.js → dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js} +2 -2
  16. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang--Xstly2G.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map} +1 -1
  17. package/.chunks/{forms-Cwv0JCi5.es.js → forms-BseC3Ftz.es.js} +5 -5
  18. package/.chunks/{forms-Cwv0JCi5.es.js.map → forms-BseC3Ftz.es.js.map} +1 -1
  19. package/.chunks/{forms--2-YQeWM.amd.js → forms-CUSCBQu3.amd.js} +3 -3
  20. package/.chunks/{forms--2-YQeWM.amd.js.map → forms-CUSCBQu3.amd.js.map} +1 -1
  21. package/.chunks/{notice-BCHrf2v6.es.js → notice-Cl3ZgiHm.es.js} +2 -2
  22. package/.chunks/{notice-BCHrf2v6.es.js.map → notice-Cl3ZgiHm.es.js.map} +1 -1
  23. package/.chunks/{notice-D1KO_E3H.amd.js → notice-DwjipV21.amd.js} +2 -2
  24. package/.chunks/{notice-D1KO_E3H.amd.js.map → notice-DwjipV21.amd.js.map} +1 -1
  25. package/.chunks/{page.vue_vue_type_script_setup_true_lang-DNs0udwC.amd.js → page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js} +2 -2
  26. package/.chunks/{page.vue_vue_type_script_setup_true_lang-DNs0udwC.amd.js.map → page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map} +1 -1
  27. package/.chunks/{page.vue_vue_type_script_setup_true_lang-D_ocBGzt.es.js → page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js} +4 -4
  28. package/.chunks/{page.vue_vue_type_script_setup_true_lang-D_ocBGzt.es.js.map → page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map} +1 -1
  29. package/.chunks/{policy.vue_vue_type_style_index_0_lang-b4Vb3SlQ.es.js → policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js} +4 -4
  30. package/.chunks/{policy.vue_vue_type_style_index_0_lang-b4Vb3SlQ.es.js.map → policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map} +1 -1
  31. package/.chunks/{policy.vue_vue_type_style_index_0_lang-BfL6Mj6K.amd.js → policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js} +2 -2
  32. package/.chunks/{policy.vue_vue_type_style_index_0_lang-BfL6Mj6K.amd.js.map → policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map} +1 -1
  33. package/.chunks/{popup-c8qgGOCv.amd.js → popup-DRuyYFGB.amd.js} +2 -2
  34. package/.chunks/popup-DRuyYFGB.amd.js.map +1 -0
  35. package/.chunks/{popup-DJMBWRtl.es.js → popup-Jw_Yyg3U.es.js} +99 -97
  36. package/.chunks/popup-Jw_Yyg3U.es.js.map +1 -0
  37. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-Bp_-W068.es.js → popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js} +2 -2
  38. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-Bp_-W068.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map} +1 -1
  39. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-D42xEF-j.amd.js → popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js} +2 -2
  40. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-D42xEF-j.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map} +1 -1
  41. package/.chunks/{utils-C6nWu0aQ.amd.js → utils-CzHUG_xz.amd.js} +2 -2
  42. package/.chunks/{utils-C6nWu0aQ.amd.js.map → utils-CzHUG_xz.amd.js.map} +1 -1
  43. package/.chunks/{utils-DHyy_M2n.amd.js → utils-D9nYQabE.amd.js} +2 -2
  44. package/.chunks/{utils-DHyy_M2n.amd.js.map → utils-D9nYQabE.amd.js.map} +1 -1
  45. package/.chunks/{utils-Bu-TI6uw.es.js → utils-Q69SXlnV.es.js} +3 -3
  46. package/.chunks/{utils-Bu-TI6uw.es.js.map → utils-Q69SXlnV.es.js.map} +1 -1
  47. package/.chunks/{utils-cls72V1c.es.js → utils-YrUExsH7.es.js} +2 -2
  48. package/.chunks/{utils-cls72V1c.es.js.map → utils-YrUExsH7.es.js.map} +1 -1
  49. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-HbtV9agA.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js} +2 -2
  50. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-HbtV9agA.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map} +1 -1
  51. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-B3soLr2U.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js} +2 -2
  52. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-B3soLr2U.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map} +1 -1
  53. package/charts/charts.amd.js +1 -1
  54. package/charts/charts.js +1 -1
  55. package/core/app.amd.js +1 -1
  56. package/core/app.js +5 -5
  57. package/dialog/dialog.amd.js +1 -1
  58. package/dialog/dialog.js +2 -2
  59. package/forms/forms.amd.js +1 -1
  60. package/forms/forms.js +1 -1
  61. package/formsExt/formsExt.amd.js +1 -1
  62. package/formsExt/formsExt.js +2 -2
  63. package/layout/layout.amd.js +1 -1
  64. package/layout/layout.js +1 -1
  65. package/package.json +1 -1
  66. package/popup/popup.amd.js +1 -1
  67. package/popup/popup.js +4 -4
  68. package/popup/worker.amd.js +1 -1
  69. package/popup/worker.js +2 -2
  70. package/project/project.amd.js +1 -1
  71. package/project/project.js +7 -7
  72. package/src/components/popup/lib/popup.d.ts +1 -1
  73. package/tabsView/tabsView.amd.js +1 -1
  74. package/tabsView/tabsView.js +2 -2
  75. package/utils/clipboard.amd.js +1 -1
  76. package/utils/clipboard.js +1 -1
  77. package/utils/date.amd.js +1 -1
  78. package/utils/date.js +1 -1
  79. package/utils/device.amd.js +1 -1
  80. package/utils/device.js +1 -1
  81. package/utils/lodash.amd.js +1 -1
  82. package/utils/lodash.js +1 -1
  83. package/utils/price.amd.js +1 -1
  84. package/utils/price.js +1 -1
  85. package/utils/searchers.amd.js +1 -1
  86. package/utils/searchers.js +3 -3
  87. package/utils/string.amd.js +1 -1
  88. package/utils/string.js +1 -1
  89. package/.chunks/popup-DJMBWRtl.es.js.map +0 -1
  90. package/.chunks/popup-c8qgGOCv.amd.js.map +0 -1
@@ -4,7 +4,7 @@
4
4
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
5
 
6
6
  import { reactive as N, defineComponent as B, ref as _, computed as H, resolveComponent as z, withDirectives as D, createElementBlock as a, openBlock as l, normalizeClass as E, createElementVNode as M, createBlock as C, createCommentVNode as T, mergeProps as L, Fragment as S, renderList as x, Teleport as j, unref as O, normalizeStyle as V } from "vue";
7
- import { C as h } from "./forms-Cwv0JCi5.es.js";
7
+ import { C as h } from "./forms-BseC3Ftz.es.js";
8
8
  import { genIntHash as A, nl2br as F } from "../utils/string.js";
9
9
  const y = 300, u = N(/* @__PURE__ */ new Map()), J = (e, i, t) => "top-notice_" + A(e + i + JSON.stringify(t)), oe = (e, i = "info", t) => {
10
10
  let d = "";
@@ -188,4 +188,4 @@ export {
188
188
  ne as default,
189
189
  oe as show
190
190
  };
191
- //# sourceMappingURL=notice-BCHrf2v6.es.js.map
191
+ //# sourceMappingURL=notice-Cl3ZgiHm.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-BCHrf2v6.es.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tbuttonsProps?: ItemProps['buttonsProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tbuttonsProps: options?.buttonsProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:buttonsProps=\"item.buttonsProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["transitionDuration","itemById","reactive","genItemId","text","style","options","genIntHash","show","title","id","chunks","itemExists","hightlight","item","_firstId","firstItem","Core","close","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","_e","ui","_ui","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_createBlock","_component_TopButton","_mergeProps","_hoisted_4","_Fragment","_renderList","buttonProps","$i18n","onCloseItem","_Teleport","_unref","_index","TopNoticeItem","_normalizeStyle","$event"],"mappings":";;;AAKO,MAAMA,IAAqB,KAIrBC,IAAWC,EAAS,oBAAI,KAAmB,GAElDC,IAAY,CAACC,GAAyBC,GAA2BC,MAC/D,gBAAgBC,EAAWH,IAAOC,IAAQ,KAAK,UAAUC,CAAO,CAAC,GAoB5DE,KAAO,CAACJ,GAAcC,IAAe,QAAQC,MAAsB;AAC/E,MAAIG,IAAQ;AAEZ,EAAAL,IA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BACFI,GAAW;AAAA,YACb,OAAOA,EAAY;AAAA,YACpB,WAAQA,EAAY;AAAA,YACnB,gCAAOjC,EAAA;AAAA,UAAK;;QAIJI,EAAA,iBAAXmB,EAA6E,OAAA;AAAA;UAAxD,OAAM;AAAA,UAA0B,WAAQnB,EAAA;AAAA,QAAA;QAE7DoB,EAKO,OAAA;AAAA,UAJN,OAAM;AAAA,UACN,iBAAc;AAAA,UACb,OAAOU,EAAAA,MAAM,OAAO;AAAA,UACpB,+BAAalC,EAAA;AAAA,QAAK;;;;;;;;;AC1ItB,UAAMmC,IAAc,CAACvC,MAAe;AACnC,MAAAA,EAAK,UAAA,GAELb,EAAS,OAAOa,EAAK,EAAE;AAAA,IACxB;2BAIC+B,EAkBWS,GAAA,EAlBD,IAAG,UAAM;AAAA,MAClBZ,EAgBM,OAhBNC,GAgBM;AAAA,SAfLC,EAAA,EAAA,GAAAH,EAcEQ,GAAA,MAAAC,EAbwBK,EAAAtD,CAAA,GAAQ,CAAA,CAAzBuD,GAAQ1C,CAAI,YADrB+B,EAcEY,GAAA;AAAA,UAZA,KAAK3C,EAAK;AAAA,UACV,IAAIA,EAAK;AAAA,UACT,OAAOA,EAAK;AAAA,UACZ,MAAMA,EAAK;AAAA,UACX,OAAK4C,EAAE5C,EAAK,KAAK;AAAA,UACjB,aAAaA,EAAK;AAAA,UAClB,cAAcA,EAAK;AAAA,UACnB,UAAUA,EAAK;AAAA,UACf,YAAYA,EAAK;AAAA,UACjB,aAAaA,EAAK;AAAA,UAClB,YAAYA,EAAK;AAAA,UACjB,SAAK,CAAA6C,MAAEN,EAAYvC,CAAI;AAAA,QAAA;;;;;"}
1
+ {"version":3,"file":"notice-Cl3ZgiHm.es.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tbuttonsProps?: ItemProps['buttonsProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tbuttonsProps: options?.buttonsProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:buttonsProps=\"item.buttonsProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["transitionDuration","itemById","reactive","genItemId","text","style","options","genIntHash","show","title","id","chunks","itemExists","hightlight","item","_firstId","firstItem","Core","close","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","_e","ui","_ui","_createElementBlock","_createElementVNode","_hoisted_1","_openBlock","_createBlock","_component_TopButton","_mergeProps","_hoisted_4","_Fragment","_renderList","buttonProps","$i18n","onCloseItem","_Teleport","_unref","_index","TopNoticeItem","_normalizeStyle","$event"],"mappings":";;;AAKO,MAAMA,IAAqB,KAIrBC,IAAWC,EAAS,oBAAI,KAAmB,GAElDC,IAAY,CAACC,GAAyBC,GAA2BC,MAC/D,gBAAgBC,EAAWH,IAAOC,IAAQ,KAAK,UAAUC,CAAO,CAAC,GAoB5DE,KAAO,CAACJ,GAAcC,IAAe,QAAQC,MAAsB;AAC/E,MA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AAA,YACN,MAAK;AAAA,UAAA,oBACFI,GAAW;AAAA,YACb,OAAOA,EAAY;AAAA,YACpB,WAAQA,EAAY;AAAA,YACnB,gCAAOjC,EAAA;AAAA,UAAK;;QAIJI,EAAA,iBAAXmB,EAA6E,OAAA;AAAA;UAAxD,OAAM;AAAA,UAA0B,WAAQnB,EAAA;AAAA,QAAA;QAE7DoB,EAKO,OAAA;AAAA,UAJN,OAAM;AAAA,UACN,iBAAc;AAAA,UACb,OAAOU,EAAAA,MAAM,OAAO;AAAA,UACpB,+BAAalC,EAAA;AAAA,QAAK;;;;;;;;;AC1ItB,UAAMmC,IAAc,CAACvC,MAAe;AACnC,MAAAA,EAAK,UAAA,GAELb,EAAS,OAAOa,EAAK,EAAE;AAAA,IACxB;2BAIC+B,EAkBWS,GAAA,EAlBD,IAAG,UAAM;AAAA,MAClBZ,EAgBM,OAhBNC,GAgBM;AAAA,SAfLC,EAAA,EAAA,GAAAH,EAcEQ,GAAA,MAAAC,EAbwBK,EAAAtD,CAAA,GAAQ,CAAA,CAAzBuD,GAAQ1C,CAAI,YADrB+B,EAcEY,GAAA;AAAA,UAZA,KAAK3C,EAAK;AAAA,UACV,IAAIA,EAAK;AAAA,UACT,OAAOA,EAAK;AAAA,UACZ,MAAMA,EAAK;AAAA,UACX,OAAK4C,EAAE5C,EAAK,KAAK;AAAA,UACjB,aAAaA,EAAK;AAAA,UAClB,cAAcA,EAAK;AAAA,UACnB,UAAUA,EAAK;AAAA,UACf,YAAYA,EAAK;AAAA,UACjB,aAAaA,EAAK;AAAA,UAClB,YAAYA,EAAK;AAAA,UACjB,SAAK,CAAA6C,MAAEN,EAAYvC,CAAI;AAAA,QAAA;;;;;"}
@@ -1,4 +1,4 @@
1
- define(["require","exports","vue","./forms--2-YQeWM.amd","../utils/string.amd","../require/css.amd!../assets/notice.css"],(function(j,T,e,f,v){"use strict";if(typeof e>"u")var e=window.Vue;const h=300,r=e.reactive(new Map),M=(t,i,o)=>"top-notice_"+v.genIntHash(t+i+JSON.stringify(o)),y=(t,i="info",o)=>{let u="";t=String(t);const d=M(t,i,o);if(o?.title)u=o.title;else{const a=t.split(`
1
+ define(["require","exports","vue","./forms-CUSCBQu3.amd","../utils/string.amd","../require/css.amd!../assets/notice.css"],(function(j,T,e,f,v){"use strict";if(typeof e>"u")var e=window.Vue;const h=300,r=e.reactive(new Map),M=(t,i,o)=>"top-notice_"+v.genIntHash(t+i+JSON.stringify(o)),y=(t,i="info",o)=>{let u="";t=String(t);const d=M(t,i,o);if(o?.title)u=o.title;else{const a=t.split(`
2
2
  `);a.length&&(u=String(a.shift()),t=a.join(`
3
3
  `))}const n=r.get(d);if(n){_(n);return}const c={id:d,title:u,text:t,style:i,buttonProps:o?.buttonProps,buttonsProps:o?.buttonsProps,metaText:o?.metaText,isSafeHTML:o?.isSafeHTML,selectToClose:o?.selectToClose,onClose:o?.onClose};if(r.set(c.id,c),r.size>5){const[a,g]=[...r].at(0)||[];g&&B(g)}f.Core.state.isMobile&&$("input").one("click",()=>B(c))},_=t=>{t.hightlight=!0,setTimeout(()=>t.hightlight=!1,h)},B=t=>{t.forceClosed=!0,setTimeout(()=>{t.onClose?.(),r.delete(t.id)},h)},b=t=>{const i="hacking was detected";return t=t.replace(/<script/g,i),t=t.replace(/<img/g,i),t=t.replace(/<iframe/g,i),t=t.replace(/javascript:/g,i),t=t.replace(/<[^>]+ (@|on)\w+=[^>]+>?/g,i),t},L={class:"top-notice_itemTextWrapper"},H=["innerHTML"],P=["innerHTML"],S={key:1,class:"top-notice_itemButtons"},N=["innerHTML"],w=["title"],E=e.defineComponent({__name:"item",props:{id:{},title:{},text:{},style:{},metaText:{},buttonProps:{},buttonsProps:{},isSafeHTML:{type:Boolean},hightlight:{type:Boolean},selectToClose:{type:Boolean,default:!0},forceClosed:{type:Boolean}},emits:["close"],setup(t,{emit:i}){const o=t,u=i,d=e.ref(!1);setTimeout(()=>d.value=!0,10);const n=e.ref(!1),c=e.ref("right"),a=e.computed(()=>{let l=o.title.replace(/ {2}/g,"&nbsp;");return o.isSafeHTML||(l=b(l)),l}),g=e.computed(()=>{let l=v.nl2br(o.text);return l=l.replace(/ {2}/g,"&nbsp;"),o.isSafeHTML||(l=b(l)),l}),m=l=>{n.value=!0,l&&(c.value=l),setTimeout(()=>u("close"),h)},I=l=>{if(!o.selectToClose)return;const{tagName:s}=l.target;s==="A"&&m(),s==="BUTTON"&&m()},z={mounted:l=>{if(!f.Core.state.isMobile||!f.Core.$||!f.Core.$.ui.draggable)return;let s="right";f.Core.$(l).draggable({revert:!1,axis:"x",drag:(p,k)=>{s=k.position.left>0?"right":"left"},stop:(p,k)=>{m(s)}})}};return(l,s)=>{const C=e.resolveComponent("TopButton");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["top-notice_item",{["top-notice_item-"+t.style]:!0,"top-notice_item-hightlight":t.hightlight,"top-notice_item-showed":d.value,"top-notice_item-closed":n.value||t.forceClosed,["top-notice_item-closed_"+c.value]:n.value}]),onClick:I},[e.createElementVNode("div",L,[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-notice_itemTitle",innerHTML:a.value},null,8,H)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"top-notice_itemText",innerHTML:g.value},null,8,P)):e.createCommentVNode("",!0)]),t.buttonProps?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,class:"top-notice_itemButton",size:"s"},t.buttonProps,{title:t.buttonProps.title,innerHTML:t.buttonProps.default,onClick:s[0]||(s[0]=p=>m())}),null,16,["title","innerHTML"])):e.createCommentVNode("",!0),t.buttonsProps?.length?(e.openBlock(),e.createElementBlock("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttonsProps,p=>(e.openBlock(),e.createBlock(C,e.mergeProps({class:"top-notice_itemButton",size:"s"},{ref_for:!0},p,{title:p.title,innerHTML:p.default,onClick:s[1]||(s[1]=k=>m())}),null,16,["title","innerHTML"]))),256))])):e.createCommentVNode("",!0),t.metaText?(e.openBlock(),e.createElementBlock("div",{key:2,class:"top-notice_itemMetaText",innerHTML:t.metaText},null,8,N)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-notice_itemClose","data-top-icon":"",title:l.$i18n.Common.Close,onClick:s[2]||(s[2]=()=>m())},null,8,w)],2)),[[z]])}}}),x={class:"top-notice"},V=e.defineComponent({__name:"notice",setup(t){const i=o=>{o.onClose?.(),r.delete(o.id)};return(o,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),([d,n])=>(e.openBlock(),e.createBlock(E,{key:n.id,id:n.id,title:n.title,text:n.text,style:e.normalizeStyle(n.style),buttonProps:n.buttonProps,buttonsProps:n.buttonsProps,metaText:n.metaText,isSafeHTML:n.isSafeHTML,forceClosed:n.forceClosed,hightlight:n.hightlight,onClose:c=>i(n)},null,8,["id","title","text","style","buttonProps","buttonsProps","metaText","isSafeHTML","forceClosed","hightlight","onClose"]))),128))])]))}});T.default=V,T.show=y,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
4
- //# sourceMappingURL=notice-D1KO_E3H.amd.js.map
4
+ //# sourceMappingURL=notice-DwjipV21.amd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-D1KO_E3H.amd.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tbuttonsProps?: ItemProps['buttonsProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tbuttonsProps: options?.buttonsProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:buttonsProps=\"item.buttonsProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["itemById","vue","utils_string","text","style","options","show","title","chunks","id","_firstId","firstItem","close","forms","item","hightlight","prepareText","showed","closed","closedDirection","res","props","direction","onClick","e","tagName","el","_e","ui","_ui","__props","_hoisted_2","_hoisted_3","_cache","$event","buttonProps","_hoisted_5","_hoisted_6","onCloseItem","_hoisted_1"],"mappings":"yMASOA,EAAAC,EAAA,SAAA,IAAA,GAAA,aAGN,cAAAC,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,CAAA,EAoBMC,EAAA,CAAAH,EAAAC,EAAA,OAAAC,IAAA,UAGNF,EAAA,OAAAA,CAAA,mBAIA,GAAAE,GAAA,MACCE,EAAAF,EAAA,UAAgB;GAIhBG,EAAA,6BAECL,EAAAK,EAAA,KAAA;AAAA,CAAA,+CAWiB,GAAAC,EAClB,MAAAF,EACA,KAAAJ,EACA,MAAAC,EACA,YAAAC,GAAA,YACsB,aAAAA,GAAA,aACC,SAAAA,GAAA,SACJ,WAAAA,GAAA,WACE,cAAAA,GAAA,kCAOtB,iBAAAL,EAAA,KAAA,EAAA,CACC,KAAA,CAAAU,EAAAC,CAAA,EAAA,CAAA,GAAAX,CAAA,EAAA,GAAA,CAAA,GAAA,CAAA,EACAW,GAAA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vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tbuttonsProps?: ItemProps['buttonsProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tselectToClose?: ItemProps['selectToClose'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tbuttonsProps: options?.buttonsProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tselectToClose: options?.selectToClose,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, withDefaults } from 'vue';\n\nimport Core from '@/core/core/core';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tselectToClose: true,\n});\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tif (!props.selectToClose) return;\n\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n\tif (tagName === 'BUTTON') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (_e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div\n\t\t\tv-if=\"buttonsProps?.length\"\n\t\t\tclass=\"top-notice_itemButtons\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tv-for=\"buttonProps in buttonsProps\"\n\t\t\t\tclass=\"top-notice_itemButton\"\n\t\t\t\tsize=\"s\"\n\t\t\t\t:=\"buttonProps\"\n\t\t\t\t:title=\"buttonProps.title\"\n\t\t\t\tv-html=\"buttonProps.default\"\n\t\t\t\t@click=\"close()\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:buttonsProps=\"item.buttonsProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["itemById","vue","utils_string","text","style","options","show","title","chunks","id","_firstId","firstItem","close","forms","item","hightlight","prepareText","showed","closed","closedDirection","res","props","direction","onClick","e","tagName","el","_e","ui","_ui","__props","_hoisted_2","_hoisted_3","_cache","$event","buttonProps","_hoisted_5","_hoisted_6","onCloseItem","_hoisted_1"],"mappings":"yMASOA,EAAAC,EAAA,SAAA,IAAA,GAAA,aAGN,cAAAC,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,CAAA,EAoBMC,EAAA,CAAAH,EAAAC,EAAA,OAAAC,IAAA,UAGNF,EAAA,OAAAA,CAAA,mBAIA,GAAAE,GAAA,MACCE,EAAAF,EAAA,UAAgB;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KAAA,EACM,YAAAA,EAAA,YACC,aAAAA,EAAA,aACC,SAAAA,EAAA,SACJ,WAAAA,EAAA,WACE,YAAAA,EAAA,YACC,WAAAA,EAAA,WACD,QAAAoB,GAAAI,EAAAxB,CAAA,CACM,EAAA,KAAA,EAAA,CAAA,KAAA,QAAA,OAAA,QAAA,cAAA,eAAA,WAAA,aAAA,cAAA,aAAA,SAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang--Xstly2G.amd","./forms--2-YQeWM.amd","./utils-C6nWu0aQ.amd"],(function(b,i,e,s,r,c){"use strict";if(typeof e>"u")var e=window.Vue;const u=["id","data-view-page-active","data-modal","data-position"],m=e.defineComponent({__name:"dialog",props:{id:{},pageActive:{},width:{default:"600px"},height:{default:"auto"},modal:{type:Boolean,default:!0},position:{},historyType:{default:"push"},classes:{}},emits:["open","close"],setup(o){const n=o,t=s.getDialogWorker(n.id);if(!t)throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");return e.provide("dialogWorker",t),e.onMounted(()=>{const l=e.getCurrentInstance(),a=l.parent;if(a?.parent?.type.name!=="DialogWrapper")throw new Error("TopDialog cannot be used in a template, use useTopDialog()");if(Array.isArray(a.subTree.children)&&a.subTree.children.length!==1)throw new Error("TopDialog can has only one root element");t.onMounted(a,l)}),e.watch(t.isOpened,()=>{t.isReady.value=!0},{flush:"post",once:!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(t).idAttr,class:e.normalizeClass(["top-dialog",o.classes]),style:e.normalizeStyle({"--top-dialog-width":o.width,"--top-dialog-height":o.height}),tabindex:"-1","data-view-page-active":e.unref(t).pageActive.value,"data-modal":o.modal,"data-position":o.position},[a[0]||(a[0]=e.createElementVNode("div",{class:"modal-layer modal-layer-header"},null,-1)),e.createElementVNode("div",{class:"modal-layer modal-layer-body",style:e.normalizeStyle({"min-height":o.height+"px"})},null,4),e.renderSlot(l.$slots,"default")],14,u))}}),p={key:0,style:{display:"none"}},h=["data-order","data-view-page"],v={class:"modal-header"},g={class:"top-title"},f={class:"buttons"},y=["title"],k=["title"],w=["data-order","data-view-page"],B={class:"modal-body"},C=e.defineComponent({__name:"page",props:{isLoading:{type:Boolean},name:{},order:{default:0},prevName:{},footerFullWith:{type:Boolean}},setup(o){const n=o,t=c.useTopDialogSelf(),l=e.computed(()=>({active:t.pageActive?.value===n.name,"i-load-data":n.isLoading||t.isLoadingPage.value}));return(a,d)=>{const E=e.resolveDirective("top-scroll-shadow");return e.unref(t).isReady.value?(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-header",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(l.value)},[e.createElementVNode("div",v,[e.createElementVNode("div",g,[e.renderSlot(a.$slots,"header")]),e.createElementVNode("div",f,[e.renderSlot(a.$slots,"headerButtons")]),e.unref(r.Core).state.isMobile&&o.prevName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",title:a.$i18n.Common.Back,"data-top-icon":"",onClick:d[0]||(d[0]=D=>e.unref(t).open(o.prevName))},null,8,y)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"close",title:a.$i18n.Common.Close,"data-top-icon":"","data-action":"top-dialog-close"},null,8,k))])],10,h)],8,["to","disabled"])),(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-body",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(["has_scroll_container",l.value]),style:e.normalizeStyle({"--top-dialog-footer-height":a.$slots.footer?void 0:"0px"})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(a.$slots,"body")])),[[E]]),a.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal-footer",{"modal-footer-fullWith":o.footerFullWith}])},[e.renderSlot(a.$slots,"footer")],2)):e.createCommentVNode("",!0)],14,w)],8,["to","disabled"]))])):e.createCommentVNode("",!0)}}});i._sfc_main=m,i._sfc_main$1=C}));
2
- //# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-DNs0udwC.amd.js.map
1
+ define(["require","exports","vue","./dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd","./forms-CUSCBQu3.amd","./utils-CzHUG_xz.amd"],(function(b,i,e,s,r,c){"use strict";if(typeof e>"u")var e=window.Vue;const u=["id","data-view-page-active","data-modal","data-position"],m=e.defineComponent({__name:"dialog",props:{id:{},pageActive:{},width:{default:"600px"},height:{default:"auto"},modal:{type:Boolean,default:!0},position:{},historyType:{default:"push"},classes:{}},emits:["open","close"],setup(o){const n=o,t=s.getDialogWorker(n.id);if(!t)throw new Error("TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()");return e.provide("dialogWorker",t),e.onMounted(()=>{const l=e.getCurrentInstance(),a=l.parent;if(a?.parent?.type.name!=="DialogWrapper")throw new Error("TopDialog cannot be used in a template, use useTopDialog()");if(Array.isArray(a.subTree.children)&&a.subTree.children.length!==1)throw new Error("TopDialog can has only one root element");t.onMounted(a,l)}),e.watch(t.isOpened,()=>{t.isReady.value=!0},{flush:"post",once:!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(t).idAttr,class:e.normalizeClass(["top-dialog",o.classes]),style:e.normalizeStyle({"--top-dialog-width":o.width,"--top-dialog-height":o.height}),tabindex:"-1","data-view-page-active":e.unref(t).pageActive.value,"data-modal":o.modal,"data-position":o.position},[a[0]||(a[0]=e.createElementVNode("div",{class:"modal-layer modal-layer-header"},null,-1)),e.createElementVNode("div",{class:"modal-layer modal-layer-body",style:e.normalizeStyle({"min-height":o.height+"px"})},null,4),e.renderSlot(l.$slots,"default")],14,u))}}),p={key:0,style:{display:"none"}},h=["data-order","data-view-page"],v={class:"modal-header"},g={class:"top-title"},f={class:"buttons"},y=["title"],k=["title"],w=["data-order","data-view-page"],B={class:"modal-body"},C=e.defineComponent({__name:"page",props:{isLoading:{type:Boolean},name:{},order:{default:0},prevName:{},footerFullWith:{type:Boolean}},setup(o){const n=o,t=c.useTopDialogSelf(),l=e.computed(()=>({active:t.pageActive?.value===n.name,"i-load-data":n.isLoading||t.isLoadingPage.value}));return(a,d)=>{const E=e.resolveDirective("top-scroll-shadow");return e.unref(t).isReady.value?(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-header",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(l.value)},[e.createElementVNode("div",v,[e.createElementVNode("div",g,[e.renderSlot(a.$slots,"header")]),e.createElementVNode("div",f,[e.renderSlot(a.$slots,"headerButtons")]),e.unref(r.Core).state.isMobile&&o.prevName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",title:a.$i18n.Common.Back,"data-top-icon":"",onClick:d[0]||(d[0]=D=>e.unref(t).open(o.prevName))},null,8,y)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"close",title:a.$i18n.Common.Close,"data-top-icon":"","data-action":"top-dialog-close"},null,8,k))])],10,h)],8,["to","disabled"])),(e.openBlock(),e.createBlock(e.Teleport,{to:"#"+e.unref(t).idAttr+" .modal-layer-body",disabled:!e.unref(t).needShowPage(o.name)},[e.createElementVNode("div",{"data-order":o.order,"data-view-page":o.name,class:e.normalizeClass(["has_scroll_container",l.value]),style:e.normalizeStyle({"--top-dialog-footer-height":a.$slots.footer?void 0:"0px"})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(a.$slots,"body")])),[[E]]),a.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal-footer",{"modal-footer-fullWith":o.footerFullWith}])},[e.renderSlot(a.$slots,"footer")],2)):e.createCommentVNode("",!0)],14,w)],8,["to","disabled"]))])):e.createCommentVNode("",!0)}}});i._sfc_main=m,i._sfc_main$1=C}));
2
+ //# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page.vue_vue_type_script_setup_true_lang-DNs0udwC.amd.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n</script>\n\n<template>\n\t<div\n\t\t:id=\"dialog.idAttr\"\n\t\tclass=\"top-dialog\"\n\t\t:class=\"classes\"\n\t\t:style=\"{\n\t\t\t'--top-dialog-width': width,\n\t\t\t'--top-dialog-height': height,\n\t\t}\"\n\t\ttabindex=\"-1\"\n\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t:data-modal=\"modal\"\n\t\t:data-position=\"position\"\n\t>\n\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t<slot name=\"default\"></slot>\n\t</div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["vue","dialog","topDialogBaseComponent","topDialogComponent","__props","_hoisted_1$1","utils","classes","_hoisted_4","_ctx","_hoisted_6","_hoisted_7"],"mappings":"siBAmBC,MAAA,IAAA,MAAA,kFAAA,EAMD,OAAAA,EAAA,QAAA,eAAAC,CAAA,mBAMC,MAAAC,EAAAF,EAAA,mBAAA,EACAG,EAAAD,EAAA,iDAGC,MAAA,IAAA,MAAA,4DAAA,sEAIA,MAAA,IAAA,MAAA,yCAAA,EAGDD,EAAA,UAAAE,EAAAD,CAAA,CAA2D,CAAA,EAG5DF,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ZU-D.amd.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n</script>\n\n<template>\n\t<div\n\t\t:id=\"dialog.idAttr\"\n\t\tclass=\"top-dialog\"\n\t\t:class=\"classes\"\n\t\t:style=\"{\n\t\t\t'--top-dialog-width': width,\n\t\t\t'--top-dialog-height': height,\n\t\t}\"\n\t\ttabindex=\"-1\"\n\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t:data-modal=\"modal\"\n\t\t:data-position=\"position\"\n\t>\n\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t<slot name=\"default\"></slot>\n\t</div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["vue","dialog","topDialogBaseComponent","topDialogComponent","__props","_hoisted_1$1","utils","classes","_hoisted_4","_ctx","_hoisted_6","_hoisted_7"],"mappings":"siBAmBC,MAAA,IAAA,MAAA,kFAAA,EAMD,OAAAA,EAAA,QAAA,eAAAC,CAAA,mBAMC,MAAAC,EAAAF,EAAA,mBAAA,EACAG,EAAAD,EAAA,iDAGC,MAAA,IAAA,MAAA,4DAAA,sEAIA,MAAA,IAAA,MAAA,yCAAA,EAGDD,EAAA,UAAAE,EAAAD,CAAA,CAA2D,CAAA,EAG5DF,EAAA,MAAAC,EAAA,SAAA,IAAA,CACCA,EAAA,QAAA,MAAA,EAAuB,EAAA,cAEhB,KAAA,EACD,CAAA,oDAuBA,GAAAD,EAAA,MAAAC,CAAA,EAAA,gFAdC,qBAAAG,EAAA,oCAA8D,CAAA,oEAK1B,aAAAA,EAAA,gCAE1B,EAAA,4JAIL,MAAAJ,EAAA,eAAA,CAAA,aAAAI,EAAA,OAAA,IAAA,CAAA,CAA4D,EAAA,KAAA,CAAA,kCAE3C,EAAA,GAAAC,CAAA,wXC3D9BJ,EAAAK,EAAA,iBAAA,EAEAC,EAAAP,EAAA,SAAA,KACC,uFAGA,8IAkEMA,EAAA,UAAA,EAAAA,EAAA,YAAAA,EAAA,SAAA,iDAzD6B,SAAA,CAAAA,EAAA,MAAAC,CAAA,EAAA,aAAAG,EAAA,IAAA,CAA+D,EAAA,6BA+B1F,aAAAA,EAAA,MA7BQ,iBAAAA,EAAA,KACI,MAAAJ,EAAA,eAAAO,EAAA,KAAA,CACF,EAAA,+BA0BTP,EAAA,mBAAA,MAAAQ,EAAA,CArBCR,EAAA,WAAAS,EAAA,OAAA,QAAA,CADsB,CAAA,gCAKtBT,EAAA,WAAAS,EAAA,OAAA,eAAA,CAD6B,CAAA,6MAQN,EAAA,KAAA,EAAAC,CAAA,IAAAV,EAAA,UAAA,EAAAA,EAAA,mBAAA,MAAA,oEAOd,cAAA,kBACF,EAAA,KAAA,EAAAW,CAAA,0HAMkB,SAAA,CAAAX,EAAA,MAAAC,CAAA,EAAA,aAAAG,EAAA,IAAA,CAA6D,EAAA,6BAqBxF,aAAAA,EAAA,MAnBQ,iBAAAA,EAAA,8DAGE,MAAAJ,EAAA,eAAA,CAAA,6BAAAS,EAAA,OAAA,OAAA,OAAA,KAAA,CAAA,CACiD,EAAA,+DAI1DT,EAAA,WAAAS,EAAA,OAAA,MAAA,CADoB,CAAA,GAAA,wJAKgB,CAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as v, provide as f, onMounted as w, getCurrentInstance as b, watch as D, createElementBlock as d, openBlock as i, unref as a, normalizeStyle as m, normalizeClass as r, createElementVNode as s, renderSlot as n, computed as C, resolveDirective as $, createCommentVNode as p, createBlock as h, Teleport as g, withDirectives as k } from "vue";
2
- import { g as T } from "./dialogs.vue_vue_type_script_setup_true_lang-BP6GFkkz.es.js";
3
- import { C as A } from "./forms-Cwv0JCi5.es.js";
4
- import { b as B } from "./utils-cls72V1c.es.js";
2
+ import { g as T } from "./dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js";
3
+ import { C as A } from "./forms-BseC3Ftz.es.js";
4
+ import { b as B } from "./utils-YrUExsH7.es.js";
5
5
  const W = ["id", "data-view-page-active", "data-modal", "data-position"], G = /* @__PURE__ */ v({
6
6
  __name: "dialog",
7
7
  props: {
@@ -136,4 +136,4 @@ export {
136
136
  G as _,
137
137
  H as a
138
138
  };
139
- //# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-D_ocBGzt.es.js.map
139
+ //# sourceMappingURL=page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page.vue_vue_type_script_setup_true_lang-D_ocBGzt.es.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n</script>\n\n<template>\n\t<div\n\t\t:id=\"dialog.idAttr\"\n\t\tclass=\"top-dialog\"\n\t\t:class=\"classes\"\n\t\t:style=\"{\n\t\t\t'--top-dialog-width': width,\n\t\t\t'--top-dialog-height': height,\n\t\t}\"\n\t\ttabindex=\"-1\"\n\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t:data-modal=\"modal\"\n\t\t:data-position=\"position\"\n\t>\n\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t<slot name=\"default\"></slot>\n\t</div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["dialog","getDialogWorker","__props","provide","onMounted","topDialogBaseComponent","getCurrentInstance","topDialogComponent","watch","_createElementBlock","_unref","_normalizeClass","_normalizeStyle","_createElementVNode","_renderSlot","_ctx","props","useTopDialogSelf","classes","computed","_openBlock","_hoisted_1","_createBlock","_Teleport","_hoisted_3","_hoisted_4","_hoisted_5","Core","$i18n","_cache","$event","$slots","_withDirectives","_hoisted_9"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,UAAMA,IAASC,EAXDC,EAWuB,EAAE;AACvC,QAAI,CAACF;AACJ,YAAM,IAAI,MAAM,kFAAkF;AAMnG,WAAAG,EAAQ,gBAAgBH,CAAM,GAK9BI,EAAU,MAAM;AACf,YAAMC,IAAyBC,EAAA,GACzBC,IAAqBF,EAAuB;AAElD,UAAIE,GAAoB,QAAQ,KAAK,SAAS;AAC7C,cAAM,IAAI,MAAM,4DAA4D;AAG7E,UAAI,MAAM,QAAQA,EAAmB,QAAQ,QAAQ,KAAKA,EAAmB,QAAQ,SAAS,WAAW;AACxG,cAAM,IAAI,MAAM,yCAAyC;AAG1D,MAAAP,EAAO,UAAUO,GAAoBF,CAAsB;AAAA,IAC5D,CAAC,GAEDG,EAAMR,EAAO,UAAU,MAAM;AAC5B,MAAAA,EAAO,QAAQ,QAAQ;AAAA,IACxB,GAAG;AAAA,MACF,OAAO;AAAA,MACP,MAAM;AAAA,IAAA,CACN,mBAIAS,EAkBM,OAAA;AAAA,MAjBJ,IAAIC,EAAAV,CAAA,EAAO;AAAA,MACZ,OAAKW,EAAA,CAAC,cACET,EAAA,OAAO,CAAA;AAAA,MACd,OAAKU,EAAA;AAAA,8BAA6BV,EAAA;AAAA,+BAAiCA,EAAA;AAAA,MAAA;MAIpE,UAAS;AAAA,MACR,yBAAuBQ,EAAAV,CAAA,EAAO,WAAW;AAAA,MACzC,cAAYE,EAAA;AAAA,MACZ,iBAAeA,EAAA;AAAA,IAAA;sBAEhBW,EAAkD,OAAA,EAA7C,OAAM,iCAAA,GAAgC,MAAA,EAAA;AAAA,M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M,OAAO;AAAA,gBACrB,iBAAc;AAAA,gBACd,eAAY;AAAA,cAAA;;;;cAMhBN,EAsBWC,GAAA;AAAA,UAtBA,IAAE,MAAQb,EAAAV,CAAA,EAAO,SAAM;AAAA,UAA0B,UAAQ,CAAGU,EAAAV,CAAA,EAAO,aAAaE,EAAA,IAAI;AAAA,QAAA;UAC9FW,EAoBM,OAAA;AAAA,YAnBJ,cAAYX,EAAA;AAAA,YACZ,kBAAgBA,EAAA;AAAA,YACjB,OAAKS,EAAA,CAAC,wBACEO,EAAA,KAAO,CAAA;AAAA,YACd,OAAKN,EAAA,EAAA,8BAAiCmB,EAAAA,OAAO,SAAS,SAAS,MAAA,CAAA;AAAA,UAAA;YAEhEC,GAAAZ,EAAA,GAAAX,EAEM,OAFNwB,GAEM;AAAA,cADLnB,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;YAQnBgB,EAAAA,OAAO,eALdtB,EAQM,OAAA;AAAA;cAPL,UAAM,gBAAc;AAAA,yCACqBP,EAAA;AAAA,cAAA;;cAKzCY,EAA2BC,EAAA,QAAA,QAAA;AAAA,YAAA;;;;;;;"}
1
+ {"version":3,"file":"page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js","sources":["../../src/components/dialog/dialog/dialog.vue","../../src/components/dialog/dialog/page/page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, onMounted, provide, watch } from 'vue';\nimport { getDialogWorker } from './dialogs/dialogs.vue';\nimport type { Emits, Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\twidth: '600px',\n\theight: 'auto',\n\tmodal: true,\n\thistoryType: 'push',\n});\n\ndefineEmits<Emits>();\n\ndefineSlots<Slots>();\n\nconst dialog = getDialogWorker(props.id);\nif (!dialog) {\n\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog() / useAsyncTopDialog()');\n}\n\n/**\n * Для useTopDialogSelf()\n */\nprovide('dialogWorker', dialog);\n\n/**\n * Инициализация начального состояния TopDialogHandle\n */\nonMounted(() => {\n\tconst topDialogBaseComponent = getCurrentInstance() as ComponentInternalInstance;\n\tconst topDialogComponent = topDialogBaseComponent.parent;\n\n\tif (topDialogComponent?.parent?.type.name !== 'DialogWrapper') {\n\t\tthrow new Error('TopDialog cannot be used in a template, use useTopDialog()');\n\t}\n\n\tif (Array.isArray(topDialogComponent.subTree.children) && topDialogComponent.subTree.children.length !== 1) {\n\t\tthrow new Error('TopDialog can has only one root element');\n\t}\n\n\tdialog.onMounted(topDialogComponent, topDialogBaseComponent);\n});\n\nwatch(dialog.isOpened, () => {\n\tdialog.isReady.value = true;\n}, {\n\tflush: 'post',\n\tonce: true,\n});\n</script>\n\n<template>\n\t<div\n\t\t:id=\"dialog.idAttr\"\n\t\tclass=\"top-dialog\"\n\t\t:class=\"classes\"\n\t\t:style=\"{\n\t\t\t'--top-dialog-width': width,\n\t\t\t'--top-dialog-height': height,\n\t\t}\"\n\t\ttabindex=\"-1\"\n\t\t:data-view-page-active=\"dialog.pageActive.value\"\n\t\t:data-modal=\"modal\"\n\t\t:data-position=\"position\"\n\t>\n\t\t<div class=\"modal-layer modal-layer-header\"></div>\n\n\t\t<div class=\"modal-layer modal-layer-body\" :style=\"{'min-height': height + 'px'}\"></div>\n\n\t\t<slot name=\"default\"></slot>\n\t</div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Core from '@/core/core/core';\nimport { useTopDialogSelf } from '@/components/dialog/dialog/composables/utils';\nimport type { Props, Slots } from './types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\torder: 0,\n});\n\ndefineSlots<Slots>();\n\nconst dialog = useTopDialogSelf();\n\nconst classes = computed(() => {\n\treturn {\n\t\tactive: dialog.pageActive?.value === props.name,\n\t\t'i-load-data': props.isLoading || dialog.isLoadingPage.value,\n\t};\n});\n</script>\n\n<template>\n\t<div\n\t\tstyle=\"display: none\"\n\t\tv-if=\"dialog.isReady.value\"\n\t>\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-header'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\t:class=\"classes\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<div class=\"top-title\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t<slot name=\"headerButtons\"></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"Core.state.isMobile && prevName\"\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Back\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\t@click=\"dialog.open(prevName)\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t\t\t\tdata-top-icon=\"\"\n\t\t\t\t\t\tdata-action=\"top-dialog-close\"\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\n\t\t<Teleport :to=\"'#' + dialog.idAttr + ' .modal-layer-body'\" :disabled=\"!dialog.needShowPage(name)\">\n\t\t\t<div\n\t\t\t\t:data-order=\"order\"\n\t\t\t\t:data-view-page=\"name\"\n\t\t\t\tclass=\"has_scroll_container\"\n\t\t\t\t:class=\"classes\"\n\t\t\t\t:style=\"{'--top-dialog-footer-height': $slots.footer ? undefined : '0px'}\"\n\t\t\t>\n\t\t\t\t<div class=\"modal-body\" v-top-scroll-shadow>\n\t\t\t\t\t<slot name=\"body\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"modal-footer\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'modal-footer-fullWith': footerFullWith\n\t\t\t\t\t}\"\n\t\t\t\t\tv-if=\"$slots.footer\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Teleport>\n\t</div>\n</template>\n"],"names":["dialog","getDialogWorker","__props","provide","onMounted","topDialogBaseComponent","getCurrentInstance","topDialogComponent","watch","_createElementBlock","_unref","_normalizeClass","_normalizeStyle","_createElementVNode","_renderSlot","_ctx","props","useTopDialogSelf","classes","computed","_openBlock","_hoisted_1","_createBlock","_Teleport","_hoisted_3","_hoisted_4","_hoisted_5","Core","$i18n","_cache","$event","$slots","_withDirectives","_hoisted_9"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,UAAMA,IAASC,EAXDC,EAWuB,EAAE;AACvC,QAAI,CAACF;AACJ,YAAM,IAAI,MAAM,kFAAkF;AAMnG,WAAAG,EAAQ,gBAAgBH,CAAM,GAK9BI,EAAU,MAAM;AACf,YAAMC,IAAyBC,EAAA,GACzBC,IAAqBF,EAAuB;AAElD,UAAIE,GAAoB,QAAQ,KAAK,SAAS;AAC7C,cAAM,IAAI,MAAM,4DAA4D;AAG7E,UAAI,MAAM,QAAQA,EAAmB,QAAQ,QAAQ,KAAKA,EAAmB,QAAQ,SAAS,WAAW;AACxG,cAAM,IAAI,MAAM,yCAAyC;AAG1D,MAAAP,EAAO,UAAUO,GAAoBF,CAAsB;AAAA,IAC5D,CAAC,GAEDG,EAAMR,EAAO,UAAU,MAAM;AAC5B,MAAAA,EAAO,QAAQ,QAAQ;AAAA,IACxB,GAAG;AAAA,MACF,OAAO;AAAA,MACP,MAAM;AAAA,IAAA,CACN,mBAIAS,EAkBM,OAAA;AAAA,MAjBJ,IAAIC,EAAAV,CAAA,EAAO;AAAA,MACZ,OAAKW,EAAA,CAAC,cACET,EAAA,OAAO,CAAA;AAAA,MACd,OAAKU,EAAA;AAAA,8BAA6BV,EAAA;AAAA,+BA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;AAAA,gBACrB,iBAAc;AAAA,gBACb,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEpB,EAAAV,CAAA,EAAO,KAAKE,EAAA,QAAQ;AAAA,cAAA,wBAG7BO,EAMO,OAAA;AAAA;gBAJN,OAAM;AAAA,gBACL,OAAOmB,EAAAA,MAAM,OAAO;AAAA,gBACrB,iBAAc;AAAA,gBACd,eAAY;AAAA,cAAA;;;;cAMhBN,EAsBWC,GAAA;AAAA,UAtBA,IAAE,MAAQb,EAAAV,CAAA,EAAO,SAAM;AAAA,UAA0B,UAAQ,CAAGU,EAAAV,CAAA,EAAO,aAAaE,EAAA,IAAI;AAAA,QAAA;UAC9FW,EAoBM,OAAA;AAAA,YAnBJ,cAAYX,EAAA;AAAA,YACZ,kBAAgBA,EAAA;AAAA,YACjB,OAAKS,EAAA,CAAC,wBACEO,EAAA,KAAO,CAAA;AAAA,YACd,OAAKN,EAAA,EAAA,8BAAiCmB,EAAAA,OAAO,SAAS,SAAS,MAAA,CAAA;AAAA,UAAA;YAEhEC,GAAAZ,EAAA,GAAAX,EAEM,OAFNwB,GAEM;AAAA,cADLnB,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;YAQnBgB,EAAAA,OAAO,eALdtB,EAQM,OAAA;AAAA;cAPL,UAAM,gBAAc;AAAA,yCACqBP,EAAA;AAAA,cAAA;;cAKzCY,EAA2BC,EAAA,QAAA,QAAA;AAAA,YAAA;;;;;;;"}
@@ -4,9 +4,9 @@
4
4
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
5
 
6
6
  import { defineComponent as J, mergeModels as W, useModel as ee, ref as $, onMounted as ae, onUpdated as se, createElementBlock as L, openBlock as g, normalizeClass as ne, createCommentVNode as M, Fragment as F, renderList as z, createBlock as S, mergeProps as R, createSlots as U, withCtx as B, createTextVNode as E, toDisplayString as P, createVNode as te, createElementVNode as re, withModifiers as oe, computed as N, watch as H, toRef as O, resolveComponent as ie, resolveDirective as ue, unref as f, renderSlot as ce, withDirectives as Q, resolveDynamicComponent as fe } from "vue";
7
- import { e as X, b as de, C as Y, d as pe, u as ve, r as me } from "./forms-Cwv0JCi5.es.js";
8
- import { _ as ye, b as Z } from "./popupHint.vue_vue_type_style_index_0_lang-Bp_-W068.es.js";
9
- import { _ as he } from "./widgetInput.vue_vue_type_script_setup_true_lang-HbtV9agA.es.js";
7
+ import { e as X, b as de, C as Y, d as pe, u as ve, r as me } from "./forms-BseC3Ftz.es.js";
8
+ import { _ as ye, b as Z } from "./popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js";
9
+ import { _ as he } from "./widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js";
10
10
  import { invertKeyboardLayout as ge } from "../utils/keyboard.js";
11
11
  import { g as Ae } from "./field-CyyFzM-Y.es.js";
12
12
  const Ie = {
@@ -493,4 +493,4 @@ export {
493
493
  Ke as b,
494
494
  le as c
495
495
  };
496
- //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-b4Vb3SlQ.es.js.map
496
+ //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map