@topvisor/ui 1.5.6-competitorSelector.1 → 1.5.6-topSelectorReactive.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.chunks/{app-0qVCkgOO.amd.js → app-CQnQGya1.amd.js} +2 -2
  2. package/.chunks/{app-0qVCkgOO.amd.js.map → app-CQnQGya1.amd.js.map} +1 -1
  3. package/.chunks/{app-0qVCkgOO.esm.js → app-CQnQGya1.esm.js} +2 -2
  4. package/.chunks/{app-0qVCkgOO.esm.js.map → app-CQnQGya1.esm.js.map} +1 -1
  5. package/.chunks/{dialog-CdgC31H2.amd.js → dialog-B7DkbSQZ.amd.js} +2 -2
  6. package/.chunks/{dialog-CdgC31H2.amd.js.map → dialog-B7DkbSQZ.amd.js.map} +1 -1
  7. package/.chunks/{dialog-CdgC31H2.esm.js → dialog-B7DkbSQZ.esm.js} +2 -2
  8. package/.chunks/{dialog-CdgC31H2.esm.js.map → dialog-B7DkbSQZ.esm.js.map} +1 -1
  9. package/.chunks/{dialog_regionSelectorRegions-BFpuUEJM.amd.js → dialog_regionSelectorRegions-DnDFRV42.amd.js} +2 -2
  10. package/.chunks/{dialog_regionSelectorRegions-BFpuUEJM.amd.js.map → dialog_regionSelectorRegions-DnDFRV42.amd.js.map} +1 -1
  11. package/.chunks/{dialog_regionSelectorRegions-BFpuUEJM.esm.js → dialog_regionSelectorRegions-DnDFRV42.esm.js} +3 -3
  12. package/.chunks/{dialog_regionSelectorRegions-BFpuUEJM.esm.js.map → dialog_regionSelectorRegions-DnDFRV42.esm.js.map} +1 -1
  13. package/.chunks/formsExt-kZL0--bf.amd.js +2 -0
  14. package/.chunks/formsExt-kZL0--bf.amd.js.map +1 -0
  15. package/.chunks/{formsExt-Bk_fn1Pg.esm.js → formsExt-kZL0--bf.esm.js} +6 -2
  16. package/.chunks/formsExt-kZL0--bf.esm.js.map +1 -0
  17. package/.chunks/{utils-3uWRvFcX.amd.js → utils-D4nhUVHm.amd.js} +2 -2
  18. package/.chunks/{utils-3uWRvFcX.amd.js.map → utils-D4nhUVHm.amd.js.map} +1 -1
  19. package/.chunks/{utils-3uWRvFcX.esm.js → utils-D4nhUVHm.esm.js} +2 -2
  20. package/.chunks/{utils-3uWRvFcX.esm.js.map → utils-D4nhUVHm.esm.js.map} +1 -1
  21. package/.chunks/{utils-BiOp5DHs.amd.js → utils-DKbnf1Th.amd.js} +2 -2
  22. package/.chunks/utils-DKbnf1Th.amd.js.map +1 -0
  23. package/.chunks/{utils-BiOp5DHs.esm.js → utils-DKbnf1Th.esm.js} +3 -3
  24. package/.chunks/{utils-BiOp5DHs.esm.js.map → utils-DKbnf1Th.esm.js.map} +1 -1
  25. package/autoload-css-manifest.amd.json +2 -2
  26. package/autoload-css-manifest.json +2 -2
  27. package/core/app.amd.js +1 -1
  28. package/core/app.amd.js.map +1 -1
  29. package/core/app.js +2 -2
  30. package/dialog/dialog.amd.js +1 -1
  31. package/dialog/dialog.amd.js.map +1 -1
  32. package/dialog/dialog.js +2 -2
  33. package/formsExt/formsExt.amd.js +1 -1
  34. package/formsExt/formsExt.amd.js.map +1 -1
  35. package/formsExt/formsExt.js +1 -1
  36. package/package.json +1 -1
  37. package/project/project.amd.js +1 -1
  38. package/project/project.amd.js.map +1 -1
  39. package/project/project.js +9 -7
  40. package/project/project.js.map +1 -1
  41. package/schedule/schedule.amd.js +1 -1
  42. package/schedule/schedule.amd.js.map +1 -1
  43. package/schedule/schedule.js +10 -11
  44. package/schedule/schedule.js.map +1 -1
  45. package/utils/searchers.amd.js +1 -1
  46. package/utils/searchers.amd.js.map +1 -1
  47. package/utils/searchers.js +1 -1
  48. package/.chunks/formsExt-Bk_fn1Pg.amd.js +0 -2
  49. package/.chunks/formsExt-Bk_fn1Pg.amd.js.map +0 -1
  50. package/.chunks/formsExt-Bk_fn1Pg.esm.js.map +0 -1
  51. package/.chunks/utils-BiOp5DHs.amd.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.js","names":["$emit","$slots","$i18n","$emit","$i18n","$i18n","$emit","$i18n","$emit","$emit","$emit"],"sources":["../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/compoents/container/container.vue","../../src/components/schedule/schedule/compoents/calendar/utils.ts","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<template>\n\t<div class=\"top-schedule_bodyContainer\">\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","import type { Day, Props } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { useI18n } from '@/core/app';\n\n/**\n * Количество дней в месяце\n */\nexport const COUNT_DAYS_IN_MONTS = 27;\n\n/**\n * Количество дней в неделе\n */\nexport const COUNT_DAYS_IN_WEEK = 7;\n\nexport const genDaysByCalendarMode = (mode: Props['mode']): Day[] => {\n\tconst i18n = useI18n();\n\n\tswitch (mode) {\n\t\tcase 'dayOfMonth': {\n\t\t\tconst days: Day[] = Array.from({ length: COUNT_DAYS_IN_MONTS }, (_, i) => ({\n\t\t\t\tvalue: i + 1,\n\t\t\t\ttitle: String(i + 1),\n\t\t\t}));\n\n\t\t\tdays.push({\n\t\t\t\tvalue: 'LAST_OF_MONTH',\n\t\t\t\ttitle: '',\n\t\t\t\tisIcon: true,\n\t\t\t});\n\n\t\t\treturn days;\n\t\t}\n\n\t\tcase 'dayOfWeek': {\n\t\t\treturn [\n\t\t\t\t{ value: 'MONDAY', title: i18n.Calendar.Dw_1 },\n\t\t\t\t{ value: 'TUESDAY', title: i18n.Calendar.Dw_2 },\n\t\t\t\t{ value: 'WEDNESDAY', title: i18n.Calendar.Dw_3 },\n\t\t\t\t{ value: 'THURSDAY', title: i18n.Calendar.Dw_4 },\n\t\t\t\t{ value: 'FRIDAY', title: i18n.Calendar.Dw_5 },\n\t\t\t\t{ value: 'SATURDAY', title: i18n.Calendar.Dw_6 },\n\t\t\t\t{ value: 'SUNDAY', title: i18n.Calendar.Dw_7 },\n\t\t\t];\n\t\t}\n\t}\n};","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\t...props.times,\n\t\ttime,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index !== times.length - 1\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\t...props.times,\n\t\ttime,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index !== times.length - 1\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EASA,IAAM,IAAQ,GAMR,IAAO,EAAQ,GACf,IAAiB;GACtB,OAAS,EAAK,SAAS;GACvB,QAAU,EAAK,SAAS;GACxB,SAAW;EACZ,GACM,IAAQ,EAAM,SAAS,EAAe,EAAM;yBAKjD,EA0BM,OAAA,EAzBJ,OAAK,EAAA;;0BAAuD,EAAA,YAAO;SAKpE,EAYM,OAZN,GAYM,CAXL,EAEM,OAFN,GAEM,EADF,EAAA,CAAA,CAAK,GAAA,CAAA,GAGT,EAME,GAAA;GALD,OAAM;GACL,YAAY,EAAA;GACZ,uBAAiB,AAAA,EAAA,QAAA,MAAEA,EAAAA,MAAK,sBAAuB,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,GAAO,OAAO;IAExB,IAAM,IAAc;KAAE,GAAG;KAAM,GAAG;IAAM;IAGxC,OAFA,EAAS,IAAI,GAAa,EAAW,CAAI,CAAC,GAEnC;GACR,CAEqB,CAAY;EAClC,GAEM,UAAgB;GACrB,IAAM,IAAa;IAAE,MAAM;IAAG,QAAQ;GAAE;GAMxC,EAAK,gBAAgB,CAJpB,GAAG,EAAM,OACT,CAGoB,CAAY;EAClC;;;eAKC,EA4BM,OA5BN,IA4BM,EAAA,EAAA,EAAA,GA3BL,EA0BM,GAAA,MAAA,EAxBmB,EAAA,QAAhB,GAAM,YAFf,EA0BM,OAAA;IAzBL,OAAM;IAEL,KAAK,EAAW,CAAI;OAErB,EAKE,GAAA;IAJA,MAAM,EAAK;IACX,QAAQ,EAAK;IACb,kBAAW,MAAE,EAAW,GAAK,EAAA,MAAU,EAAM,CAAA;IAC7C,oBAAa,MAAE,EAAW,GAAK,EAAA,QAAY,EAAM,CAAA;;;;;;OAI5C,MAAU,EAAA,MAAM,SAAM,UAM7B,EAME,GAAA;;IAJD,OAAM;IACL,SAAO;IACR,OAAM;IACN,MAAK;UAXuB,EAAA,GAD7B,EAKE,GAAA;;IAHA,UAAK,MAAEC,EAAAA,MAAK,gBAAiB,EAAA,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAK,CAAA;IAChE,OAAM;IACN,MAAK"}
1
+ {"version":3,"file":"schedule.js","names":["$emit","$slots","$i18n","$emit","$i18n","$i18n","$emit","$i18n","$emit","$emit","$emit"],"sources":["../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/schedule.vue","../../src/components/schedule/schedule/compoents/container/container.vue","../../src/components/schedule/schedule/compoents/calendar/utils.ts","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/calendar/calendar.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/selector/selector.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/email/email.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/reportSend/reportSend.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelector/timeSelector.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue","../../src/components/schedule/schedule/compoents/timeSelectors/timeSelectors.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport TopSelect from '@/components/forms/select/select.vue';\nimport type { Props, Emits, TriggerType } from '@/components/schedule/schedule/types';\nimport { useI18n } from '@/core/plugins/i18n';\n\ndefineOptions({\n\tname: 'TopSchedule',\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttriggerType: 'onDemand',\n});\n\ndefineEmits<Emits>();\n\nconst i18n = useI18n();\nconst labelByStyling = {\n\t'track': i18n.Projects.Checks,\n\t'report': i18n.Projects.Reports,\n\t'neutral': '',\n};\nconst title = props.title ?? labelByStyling[props.styling];\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-schedule': true,\n\t\t\t[`top-schedule-style_${styling}`]: true,\n\t\t}\"\n\t>\n\t\t<div class=\"top-schedule_header\">\n\t\t\t<div class=\"top-schedule_headerTitle\">\n\t\t\t\t{{ title }}\n\t\t\t</div>\n\n\t\t\t<TopSelect\n\t\t\t\tclass=\"top-schedule_headerTriggerType\"\n\t\t\t\t:modelValue=\"triggerType\"\n\t\t\t\t@update:modelValue=\"$emit('update:triggerType', $event as TriggerType)\"\n\t\t\t\t:options=\"triggerTypeOptions\"\n\t\t\t\tsize=\"s\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"triggerType !== 'onDemand' && $slots.body\"\n\t\t\tclass=\"top-schedule_body\"\n\t\t>\n\t\t\t<slot name=\"body\"></slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<template>\n\t<div class=\"top-schedule_bodyContainer\">\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","import type { Day, Props } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { useI18n } from '@/core/app';\n\n/**\n * Количество дней в месяце\n */\nexport const COUNT_DAYS_IN_MONTS = 27;\n\n/**\n * Количество дней в неделе\n */\nexport const COUNT_DAYS_IN_WEEK = 7;\n\nexport const genDaysByCalendarMode = (mode: Props['mode']): Day[] => {\n\tconst i18n = useI18n();\n\n\tswitch (mode) {\n\t\tcase 'dayOfMonth': {\n\t\t\tconst days: Day[] = Array.from({ length: COUNT_DAYS_IN_MONTS }, (_, i) => ({\n\t\t\t\tvalue: i + 1,\n\t\t\t\ttitle: String(i + 1),\n\t\t\t}));\n\n\t\t\tdays.push({\n\t\t\t\tvalue: 'LAST_OF_MONTH',\n\t\t\t\ttitle: '',\n\t\t\t\tisIcon: true,\n\t\t\t});\n\n\t\t\treturn days;\n\t\t}\n\n\t\tcase 'dayOfWeek': {\n\t\t\treturn [\n\t\t\t\t{ value: 'MONDAY', title: i18n.Calendar.Dw_1 },\n\t\t\t\t{ value: 'TUESDAY', title: i18n.Calendar.Dw_2 },\n\t\t\t\t{ value: 'WEDNESDAY', title: i18n.Calendar.Dw_3 },\n\t\t\t\t{ value: 'THURSDAY', title: i18n.Calendar.Dw_4 },\n\t\t\t\t{ value: 'FRIDAY', title: i18n.Calendar.Dw_5 },\n\t\t\t\t{ value: 'SATURDAY', title: i18n.Calendar.Dw_6 },\n\t\t\t\t{ value: 'SUNDAY', title: i18n.Calendar.Dw_7 },\n\t\t\t];\n\t\t}\n\t}\n};","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/calendar/types';\nimport { COUNT_DAYS_IN_MONTS, COUNT_DAYS_IN_WEEK, genDaysByCalendarMode } from '@/components/schedule/schedule/compoents/calendar/utils';\nimport { numberEnding } from '@/core/utils/string';\nimport { computed } from 'vue';\nimport { useI18n } from '@/core/app';\n\nconst i18n = useI18n();\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst selectedDays = computed<Props['modelValue']>({\n\tget: () => props.modelValue,\n\tset: value => emit('update:modelValue', value),\n});\n\nconst days = computed(() => genDaysByCalendarMode(props.mode));\n\nconst selectedCountLabel = computed(() => {\n\tconst daysCount = selectedDays.value.length;\n\tlet postfix = '';\n\n\tswitch (props.mode) {\n\t\tcase 'dayOfWeek': {\n\t\t\tif (daysCount === COUNT_DAYS_IN_WEEK) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_week;\n\n\t\t\tbreak;\n\t\t}\n\t\tcase 'dayOfMonth': {\n\t\t\t// плюс \"последний день месяца\"\n\t\t\tif (daysCount === COUNT_DAYS_IN_MONTS + 1) return i18n.Common.Every_day;\n\n\t\t\tpostfix = i18n.Common.a_month;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn `${daysCount} ${numberEnding(\n\t\tdaysCount,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_0,\n\t\ti18n.Common.time_a_2,\n\t)} ${postfix}`;\n});\n\nconst isClearAction = computed(() => selectedDays.value.length > 1);\n\nconst toggleAllDays = () => {\n\tselectedDays.value = isClearAction.value ? [] : days.value.map(day => day.value);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleCalendar\">\n\t\t<div class=\"top-scheduleCalendar_header\">\n\t\t\t<slot name=\"header\"></slot>\n\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleCalendar_headerButton\"\n\t\t\t\t@click=\"toggleAllDays\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t{{ isClearAction ? $i18n.Common.Clear : $i18n.Common.Select_all}}\n\t\t\t</TopButton>\n\t\t</div>\n\n\t\t<div class=\"top-scheduleCalendar_calendar\">\n\t\t\t<label\n\t\t\t\tclass=\"top-scheduleCalendar_calendarDay\"\n\t\t\t\tv-for=\"day in days\"\n\t\t\t\t:key=\"day.value\"\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayRadio\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:value=\"day.value\"\n\t\t\t\t\tv-model=\"selectedDays\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\n\t\t\t\t<span\n\t\t\t\t\tclass=\"top-scheduleCalendar_calendarDayTitle\"\n\t\t\t\t\t:data-top-icon=\"day.isIcon ? day.title : undefined\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"!day.isIcon\">\n\t\t\t\t\t\t{{ day.title }}\n\t\t\t\t\t</template>\n\t\t\t\t</span>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-scheduleCalendar_selectedCount': true,\n\t\t\t\t'top-error': !selectedDays.length\n\t\t\t}\"\n\t\t>\n\t\t\t{{ selectedCountLabel }}\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\nimport Core from '@/core/core/core';\nimport { isEmail } from '@/core/utils/check';\nimport { useI18n } from '@/core/plugins/i18n';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/selector/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n});\n\nconst emit = defineEmits<Emits>();\nconst i18n = useI18n();\nconst $ = Core.$;\n\nconst elRootRef = ref<HTMLElement>();\nconst elInputRef = ref<InstanceType<typeof TopInput>>();\nlet elInput: HTMLInputElement | null = null;\nconst autocompleteCache: Record<string, string[]> = {};\n\nconst filterEmails = (emails: string[]) => emails.filter(email => !props.emails.includes(email));\n\nconst submit = (value: unknown = props.modelValue) => {\n\tconst email = String(value).trim();\n\tif (!email) return;\n\tif (!isEmail(email)) {\n\t\tvoid Core.notice(i18n.Common.Enter_valid_email_notice, 'error');\n\n\t\treturn;\n\t}\n\n\temit('submit', email);\n};\n\nconst initAutocomplete = async () => {\n\tawait nextTick();\n\n\telInput = elInputRef.value?.$el.querySelector('input') ?? null;\n\tif (!elInput) return;\n\n\tif (!$?.ui?.autocomplete) {\n\t\tconsole.info('Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete');\n\n\t\treturn;\n\t}\n\n\t$(elInput).autocomplete({\n\t\tappendTo: elRootRef.value,\n\t\tminLength: 0,\n\t\tsource: async (request: { term: string }, response: (items: Array<{ label: string, value: string }>) => void) => {\n\t\t\tconst term = request.term;\n\t\t\tif (!(term in autocompleteCache)) {\n\t\t\t\tautocompleteCache[term] = await props.getEmailSuggestions(term);\n\t\t\t}\n\n\t\t\tresponse(filterEmails(autocompleteCache[term]).map(email => ({\n\t\t\t\tlabel: email,\n\t\t\t\tvalue: email,\n\t\t\t})));\n\t\t},\n\t\tselect: (event: Event, ui: { item?: { value: string } }) => {\n\t\t\tif (!ui.item || !elInput) return;\n\n\t\t\tevent.preventDefault();\n\t\t\tsubmit(ui.item.value);\n\t\t\temit('update:modelValue', '');\n\n\t\t\t$(elInput).trigger('focus');\n\t\t},\n\t});\n\n\t$(elInput).attr('autocomplete', 'disabled');\n\t$(elInput).on('focus.scheduleEmailSelector', () => {\n\t\tif (!elInput) return;\n\n\t\t$(elInput).trigger('input');\n\t});\n};\n\nonMounted(() => {\n\tvoid initAutocomplete();\n});\n\nonBeforeUnmount(() => {\n\tif (!$?.ui?.autocomplete || !elInput) return;\n\n\t$(elInput).off('focus.scheduleEmailSelector');\n\t$(elInput).autocomplete('destroy');\n});\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-scheduleEmailSelector\"\n\t\tref=\"elRootRef\"\n\t>\n\t\t<TopInput\n\t\t\tref=\"elInputRef\"\n\t\t\t:modelValue\n\t\t\t@update:modelValue=\"$emit('update:modelValue', $event)\"\n\t\t\t@keydown.enter.prevent=\"submit()\"\n\t\t\t:title=\"$i18n.Common.Enter_email\"\n\t\t\ttype=\"email\"\n\t\t\tsize=\"l\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\tclass=\"top-scheduleEmailSelector_submit\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t\t@click.prevent=\"submit()\"\n\t\t\t/>\n\t\t</TopInput>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/email/types';\nimport ScheduleEmailSelector from '@/components/schedule/schedule/compoents/email/selector/selector.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\temails: () => [],\n\tgetEmailSuggestions: () => [],\n\tmaxEmailsCount: -1,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = ref('');\n\nconst addEmail = (email: string) => {\n\tconst preparedEmail = email.trim();\n\tif (!preparedEmail || props.emails.includes(preparedEmail)) {\n\t\tvalue.value = '';\n\n\t\treturn;\n\t}\n\n\temit('add:email', preparedEmail);\n\n\tvalue.value = '';\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleEmail\">\n\t\t<div class=\"top-scheduleEmail_title\">\n\t\t\t{{ $i18n.Projects.Reports_send_to_address }} E-mail:\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!(maxEmailsCount && emails.length === maxEmailsCount)\"\n\t\t\tclass=\"top-scheduleEmail_selector\"\n\t\t>\n\t\t\t<ScheduleEmailSelector\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:getEmailSuggestions=\"getEmailSuggestions\"\n\t\t\t\t:emails=\"emails\"\n\t\t\t\t@submit=\"addEmail\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"emails.length\"\n\t\t\tclass=\"top-scheduleEmail_emails\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleEmail_emailsItem\"\n\t\t\t\tv-for=\"email in emails\"\n\t\t\t\t:key=\"email\"\n\t\t\t>\n\t\t\t\t{{ email }}\n\n\t\t\t\t<TopButton\n\t\t\t\t\t@click=\"$emit('remove:email', email)\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Emits, Props, ReportChannelSource } from '@/components/schedule/schedule/compoents/reportSend/types';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tconnectors: () => [],\n});\ndefineEmits<Emits>();\n\nconst hasChannel = (source: ReportChannelSource) => props.channels.some(channel => channel.source === source);\n\nconst sourceIconBySource: Record<ReportChannelSource, string> = {\n\tinformer: '',\n\ttelegram: '',\n};\n</script>\n\n<template>\n\t<div class=\"top-scheduleReportSend\">\n\t\t<div class=\"top-scheduleReportSend_title\">\n\t\t\t{{ $i18n.Projects.Reports_send }}\n\t\t</div>\n\n\t\t<div class=\"top-scheduleReportSend_channels\">\n\t\t\t<div\n\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\tv-for=\"channel in channels\"\n\t\t\t\t:key=\"`${channel.source}-${channel.id}`\"\n\t\t\t>\n\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[channel.source]\"\n\t\t\t\t\t></div>\n\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfoLabel\">\n\t\t\t\t\t\t{{ channel.label }}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<TopButton\n\t\t\t\t\t\tv-if=\"channel.settingLink\"\n\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoSettings\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t:href=\"channel.settingLink\"\n\t\t\t\t\t\ticon=\"\"\n\t\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t></TopButton>\n\t\t\t\t</div>\n\n\t\t\t\t<TopSwitcher\n\t\t\t\t\t:modelValue=\"channel.selected\"\n\t\t\t\t\t@update:modelValue=\"$emit('update:channelSelected', {\n\t\t\t\t\t\tid: channel.id,\n\t\t\t\t\t\tsource: channel.source,\n\t\t\t\t\t\tselected: $event as boolean,\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<template\n\t\t\t\tv-for=\"connector in connectors\"\n\t\t\t\t:key=\"connector.source\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!hasChannel(connector.source)\"\n\t\t\t\t\tclass=\"top-scheduleReportSend_channel\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"top-scheduleReportSend_channelInfo\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoIcon\"\n\t\t\t\t\t\t\t:data-top-icon=\"sourceIconBySource[connector.source]\"\n\t\t\t\t\t\t></div>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"top-scheduleReportSend_channelInfoLabel top-scheduleReportSend_channelInfoLink\"\n\t\t\t\t\t\t\t:href=\"connector.connectLink\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ connector.connectLabel }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport type { Props, Emits, Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\n\ndefineProps<Props>();\ndefineEmits<Emits>();\n\nconst hourOptions = Array.from({ length: 24 }, (_, value) => ({\n\tvalue,\n\ttitle: String(value).padStart(2, '0'),\n}));\nconst minuteOptions = [\n\t{\n\t\tvalue: 0,\n\t\ttitle: '00',\n\t},\n\t{\n\t\tvalue: 15,\n\t\ttitle: '15',\n\t},\n\t{\n\t\tvalue: 30,\n\t\ttitle: '30',\n\t},\n\t{\n\t\tvalue: 45,\n\t\ttitle: '45',\n\t},\n];\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelector\">\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_hour\"\n\t\t\t:modelValue=\"hour\"\n\t\t\t:options=\"hourOptions\"\n\t\t\t@update:modelValue=\"$emit('update:hour', $event as Time['hour'])\"\n\t\t/>\n\n\t\t<TopSelect\n\t\t\tclass=\"top-scheduleTimeSelector_minute\"\n\t\t\t:modelValue=\"minute\"\n\t\t\t:options=\"minuteOptions\"\n\t\t\t@update:modelValue=\"$emit('update:minute', $event as Time['minute'])\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\ttime,\n\t\t...props.times,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n","<script setup lang=\"ts\">\nimport { toRaw } from 'vue';\nimport type { Props, Emits } from '@/components/schedule/schedule/compoents/timeSelectors/types';\nimport type { Time } from '@/components/schedule/schedule/compoents/timeSelector/types';\nimport TimeSelector from '@/components/schedule/schedule/compoents/timeSelector/timeSelector.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\nconst timeKeys = new WeakMap<Time, number>();\nlet nextTimeKey = 0;\n\nconst getTimeKey = (rawOrProxyTime: Time) => {\n\t// time может быть proxy или обычным объектом\n\tconst time = toRaw(rawOrProxyTime);\n\n\tconst existingKey = timeKeys.get(time);\n\tif (existingKey !== undefined) return existingKey;\n\n\tconst key = nextTimeKey++;\n\ttimeKeys.set(time, key);\n\n\treturn key;\n};\n\nconst updateTime = (index: number, patch: Partial<Props['times'][number]>) => {\n\tconst updatedTimes = props.times.map((time, i) => {\n\t\tif (i !== index) return time;\n\n\t\tconst updatedTime = { ...time, ...patch };\n\t\ttimeKeys.set(updatedTime, getTimeKey(time));\n\n\t\treturn updatedTime;\n\t});\n\n\temit('update:times', updatedTimes);\n};\n\nconst addTime = () => {\n\tconst time: Time = { hour: 0, minute: 0 };\n\tconst updatedTimes = [\n\t\ttime,\n\t\t...props.times,\n\t];\n\n\temit('update:times', updatedTimes);\n};\n\n</script>\n\n<template>\n\t<div class=\"top-scheduleTimeSelectors\">\n\t\t<div\n\t\t\tclass=\"top-scheduleTimeSelectors_item\"\n\t\t\tv-for=\"(time, index) in times\"\n\t\t\t:key=\"getTimeKey(time)\"\n\t\t>\n\t\t\t<TimeSelector\n\t\t\t\t:hour=\"time.hour\"\n\t\t\t\t:minute=\"time.minute\"\n\t\t\t\t@update:hour=\"updateTime(index, { hour: $event as Time['hour'] })\"\n\t\t\t\t@update:minute=\"updateTime(index, { minute: $event as Time['minute'] })\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-if=\"index\"\n\t\t\t\t@click=\"$emit('update:times', times.filter((_, i) => i !== index))\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\n\t\t\t<TopButton\n\t\t\t\tv-else\n\t\t\t\tclass=\"top-scheduleTimeSelectors_itemAdd\"\n\t\t\t\t@click=\"addTime\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\ticon=\"\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n@import \"./style.css\";\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EASA,IAAM,IAAQ,GAMR,IAAO,EAAQ,GACf,IAAiB;GACtB,OAAS,EAAK,SAAS;GACvB,QAAU,EAAK,SAAS;GACxB,SAAW;EACZ,GACM,IAAQ,EAAM,SAAS,EAAe,EAAM;yBAKjD,EA0BM,OAAA,EAzBJ,OAAK,EAAA;;0BAAuD,EAAA,YAAO;SAKpE,EAYM,OAZN,GAYM,CAXL,EAEM,OAFN,GAEM,EADF,EAAA,CAAA,CAAK,GAAA,CAAA,GAGT,EAME,GAAA;GALD,OAAM;GACL,YAAY,EAAA;GACZ,uBAAiB,AAAA,EAAA,QAAA,MAAEA,EAAAA,MAAK,sBAAuB,CAAM;GACrD,SAAS,EAAA;GACV,MAAK;4CAKA,EAAA,gBAAW,cAAmBC,EAAAA,OAAO,QAAA,EAAA,GAD5C,EAKM,OALN,GAKM,CADL,EAAyB,EAAA,QAAA,MAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,CAAA;;kBEjDtB,OAAM,6BAA4B;;aAAvC,EAEM,OAFN,GAEM,CADL,EAAa,EAAA,QAAA,SAAA,CAAA,CAAA;;6CCWF,KAAyB,MAA+B;CACpE,IAAM,IAAO,EAAQ;CAErB,QAAQ,GAAR;EACC,KAAK,cAAc;GAClB,IAAM,IAAc,MAAM,KAAK,E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AAI;OAErB,EAKE,GAAA;IAJA,MAAM,EAAK;IACX,QAAQ,EAAK;IACb,kBAAW,MAAE,EAAW,GAAK,EAAA,MAAU,EAAM,CAAA;IAC7C,oBAAa,MAAE,EAAW,GAAK,EAAA,QAAY,EAAM,CAAA;;;;;;OAI5C,KAAA,EAAA,GADP,EAKE,GAAA;;IAHA,UAAK,MAAEC,EAAAA,MAAK,gBAAiB,EAAA,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAK,CAAA;IAChE,OAAM;IACN,MAAK;qCAGN,EAME,GAAA;;IAJD,OAAM;IACL,SAAO;IACR,OAAM;IACN,MAAK"}
@@ -1,2 +1,2 @@
1
- define([`require`,`exports`,`../.chunks/app-0qVCkgOO.amd`],function(e,t){"use strict";if(n===void 0)var n=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.searchersNames=t.prepareVolumeType=t.getSearcherGIcon=t.getLangLabel=t.getDeviceGIcon=t.genVolumeLabel=void 0,t.searchersNames={0:`Yandex`,20:`Yandex.com`,21:`Yandex.com.tr`,1:`Google`,4:`YouTube`,5:`Bing`,7:`Seznam`,8:`AppStore`,9:`GooglePlay`,101:`VK`,102:`Facebook`,103:`Twitter`},t.getSearcherGIcon=e=>{let t=``;switch(typeof e==`string`&&(e=Number(e)),e){case 0:t=``;break;case 20:case 21:t=``;break;case 1:t=``;break;case 2:t=``;break;case 3:t=``;break;case 4:t=``;break;case 5:t=``;break;case 6:t=``;break;case 7:t=``;break;case 8:t=``;break;case 9:t=``;break;case null:t=``;break}return t},t.getDeviceGIcon=e=>{let t=``;switch(typeof e==`string`&&(e=Number(e)),e%10){case 0:t=``;break;case 1:t=``;break;case 2:t=``;break}return t},t.getLangLabel=(e,t)=>{switch(typeof e==`string`&&(e=Number(e)),e*1){case 1:case 4:case 5:case 6:case 8:case 9:return t}return``},t.genVolumeLabel=(e,t,n)=>{switch(t*1){case 0:switch(n*1){case 2:e=`"${e}"`;break;case 3:e=`"!${e}"`;break;case 5:e=`"[${e}]"`;break;case 6:e=`"[!${e}]"`;break}break;case 1:e=`[${e}]`;break}return e},t.prepareVolumeType=(e,t)=>{switch(t===null&&(t=6),e){case 1:t=3;break;case 2:t=2;break;case 5:t>1&&(t=1);break;default:[1,2,3,5,6].includes(t)||(t=3)}return t}});
1
+ define([`require`,`exports`,`../.chunks/app-CQnQGya1.amd`],function(e,t){"use strict";if(n===void 0)var n=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.searchersNames=t.prepareVolumeType=t.getSearcherGIcon=t.getLangLabel=t.getDeviceGIcon=t.genVolumeLabel=void 0,t.searchersNames={0:`Yandex`,20:`Yandex.com`,21:`Yandex.com.tr`,1:`Google`,4:`YouTube`,5:`Bing`,7:`Seznam`,8:`AppStore`,9:`GooglePlay`,101:`VK`,102:`Facebook`,103:`Twitter`},t.getSearcherGIcon=e=>{let t=``;switch(typeof e==`string`&&(e=Number(e)),e){case 0:t=``;break;case 20:case 21:t=``;break;case 1:t=``;break;case 2:t=``;break;case 3:t=``;break;case 4:t=``;break;case 5:t=``;break;case 6:t=``;break;case 7:t=``;break;case 8:t=``;break;case 9:t=``;break;case null:t=``;break}return t},t.getDeviceGIcon=e=>{let t=``;switch(typeof e==`string`&&(e=Number(e)),e%10){case 0:t=``;break;case 1:t=``;break;case 2:t=``;break}return t},t.getLangLabel=(e,t)=>{switch(typeof e==`string`&&(e=Number(e)),e*1){case 1:case 4:case 5:case 6:case 8:case 9:return t}return``},t.genVolumeLabel=(e,t,n)=>{switch(t*1){case 0:switch(n*1){case 2:e=`"${e}"`;break;case 3:e=`"!${e}"`;break;case 5:e=`"[${e}]"`;break;case 6:e=`"[!${e}]"`;break}break;case 1:e=`[${e}]`;break}return e},t.prepareVolumeType=(e,t)=>{switch(t===null&&(t=6),e){case 1:t=3;break;case 2:t=2;break;case 5:t>1&&(t=1);break;default:[1,2,3,5,6].includes(t)||(t=3)}return t}});
2
2
  //# sourceMappingURL=searchers.amd.js.map
@@ -1 +1 @@
1
- {"version":3,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AA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,EAAA,CACA,IAAA,GACA,IAAA,GAEJ,IAAO,GACT,IAAA,GAEO,IAAA,GAMsC,IAAoB,GAA0C,OAAA,CAC3G,CAEM,MAAA,EACJ,EDJC,EAAQ,gBCID,EAAa,EAArB,IAAA,CACC,OAAK,EAAA,EAAL,CACS,IAAU,GAElB,OAAA,EAAA,EAAA,CACI,IAAA,GACe,EAAA,IAAA,EAAA,GAEnB,MACI,IAAA,GACe,EAAA,KAAA,EAAA,GAEnB,MACI,IAAA,GACgB,EAAA,KAAA,EAAA,IAEpB,MACF,IAAA,GACA,EAAA,MAAA,EAAA,IAEI,KACc,CAElB,MACF,IAAA,GAEO,EAAA,IAAA,EAAA,GAM+C,KAItD,CACM,OAAA,CACJ,EDzCC,EAAQ,mBCyCI,EAAA,IAAA,CAEb,OAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CACI,IAAA,GACS,EAAA,EAEb,MACI,IAAA,GACgB,EAAa,EAEjC,MAEA,IAAA,GAAM,EAAA,IAAA,EAAA,GAAG,MAAG,QAAA,CAAG,EAAG,EAAsB,EAC1C,EAEO,CACR,CAAA,CAAA,SAAA,CAAA,IAAA,EAAA,EDjEQ,CACA,OAAO,CACX,CAOJ,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/app-0qVCkgOO.esm.js\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.searchersNames = exports.prepareVolumeType = exports.getSearcherGIcon = exports.getLangLabel = exports.getDeviceGIcon = exports.genVolumeLabel = void 0;\n //#region src/core/utils/searchers.ts\n var e = {\n 0: \"Yandex\",\n 20: \"Yandex.com\",\n 21: \"Yandex.com.tr\",\n 1: \"Google\",\n 4: \"YouTube\",\n 5: \"Bing\",\n 7: \"Seznam\",\n 8: \"AppStore\",\n 9: \"GooglePlay\",\n 101: \"VK\",\n 102: \"Facebook\",\n 103: \"Twitter\"\n }, t = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e) {\n case 0:\n t = \"\";\n break;\n case 20:\n case 21:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n case 3:\n t = \"\";\n break;\n case 4:\n t = \"\";\n break;\n case 5:\n t = \"\";\n break;\n case 6:\n t = \"\";\n break;\n case 7:\n t = \"\";\n break;\n case 8:\n t = \"\";\n break;\n case 9:\n t = \"\";\n break;\n case null:\n t = \"\";\n break;\n }\n return t;\n }, n = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e % 10) {\n case 0:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n }\n return t;\n }, r = (e, t) => {\n switch (typeof e == \"string\" && (e = Number(e)), e * 1) {\n case 1:\n case 4:\n case 5:\n case 6:\n case 8:\n case 9: return t;\n }\n return \"\";\n }, i = (e, t, n) => {\n switch (t * 1) {\n case 0:\n switch (n * 1) {\n case 2:\n e = `\"${e}\"`;\n break;\n case 3:\n e = `\"!${e}\"`;\n break;\n case 5:\n e = `\"[${e}]\"`;\n break;\n case 6:\n e = `\"[!${e}]\"`;\n break;\n }\n break;\n case 1:\n e = `[${e}]`;\n break;\n }\n return e;\n }, a = (e, t) => {\n switch (t === null && (t = 6), e) {\n case 1:\n t = 3;\n break;\n case 2:\n t = 2;\n break;\n case 5:\n t > 1 && (t = 1);\n break;\n default: [\n 1,\n 2,\n 3,\n 5,\n 6\n ].includes(t) || (t = 3);\n }\n return t;\n };\n exports.searchersNames = e;\n exports.getSearcherGIcon = t;\n exports.getDeviceGIcon = n;\n exports.getLangLabel = r;\n exports.genVolumeLabel = i;\n exports.prepareVolumeType = a;\n});\n//# sourceMappingURL=searchers.js.map\n","import { useI18nLang } from '@/core/app';\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"]}
1
+ {"version":3,"sources":["utils/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EAAA,OAAA,CAAA,GAAA,EAAA,EAAA,CACA,IAAA,GACA,IAAA,GAEJ,IAAO,GACT,IAAA,GAEO,IAAA,GAMsC,IAAoB,GAA0C,OAAA,CAC3G,CAEM,MAAA,EACJ,EDJC,EAAQ,gBCID,EAAa,EAArB,IAAA,CACC,OAAK,EAAA,EAAL,CACS,IAAU,GAElB,OAAA,EAAA,EAAA,CACI,IAAA,GACe,EAAA,IAAA,EAAA,GAEnB,MACI,IAAA,GACe,EAAA,KAAA,EAAA,GAEnB,MACI,IAAA,GACgB,EAAA,KAAA,EAAA,IAEpB,MACF,IAAA,GACA,EAAA,MAAA,EAAA,IAEI,KACc,CAElB,MACF,IAAA,GAEO,EAAA,IAAA,EAAA,GAM+C,KAItD,CACM,OAAA,CACJ,EDzCC,EAAQ,mBCyCI,EAAA,IAAA,CAEb,OAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CACI,IAAA,GACS,EAAA,EAEb,MACI,IAAA,GACgB,EAAa,EAEjC,MAEA,IAAA,GAAM,EAAA,IAAA,EAAA,GAAG,MAAG,QAAA,CAAG,EAAG,EAAsB,EAC1C,EAEO,CACR,CAAA,CAAA,SAAA,CAAA,IAAA,EAAA,EDjEQ,CACA,OAAO,CACX,CAOJ,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/app-CQnQGya1.esm.js\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.searchersNames = exports.prepareVolumeType = exports.getSearcherGIcon = exports.getLangLabel = exports.getDeviceGIcon = exports.genVolumeLabel = void 0;\n //#region src/core/utils/searchers.ts\n var e = {\n 0: \"Yandex\",\n 20: \"Yandex.com\",\n 21: \"Yandex.com.tr\",\n 1: \"Google\",\n 4: \"YouTube\",\n 5: \"Bing\",\n 7: \"Seznam\",\n 8: \"AppStore\",\n 9: \"GooglePlay\",\n 101: \"VK\",\n 102: \"Facebook\",\n 103: \"Twitter\"\n }, t = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e) {\n case 0:\n t = \"\";\n break;\n case 20:\n case 21:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n case 3:\n t = \"\";\n break;\n case 4:\n t = \"\";\n break;\n case 5:\n t = \"\";\n break;\n case 6:\n t = \"\";\n break;\n case 7:\n t = \"\";\n break;\n case 8:\n t = \"\";\n break;\n case 9:\n t = \"\";\n break;\n case null:\n t = \"\";\n break;\n }\n return t;\n }, n = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e % 10) {\n case 0:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n }\n return t;\n }, r = (e, t) => {\n switch (typeof e == \"string\" && (e = Number(e)), e * 1) {\n case 1:\n case 4:\n case 5:\n case 6:\n case 8:\n case 9: return t;\n }\n return \"\";\n }, i = (e, t, n) => {\n switch (t * 1) {\n case 0:\n switch (n * 1) {\n case 2:\n e = `\"${e}\"`;\n break;\n case 3:\n e = `\"!${e}\"`;\n break;\n case 5:\n e = `\"[${e}]\"`;\n break;\n case 6:\n e = `\"[!${e}]\"`;\n break;\n }\n break;\n case 1:\n e = `[${e}]`;\n break;\n }\n return e;\n }, a = (e, t) => {\n switch (t === null && (t = 6), e) {\n case 1:\n t = 3;\n break;\n case 2:\n t = 2;\n break;\n case 5:\n t > 1 && (t = 1);\n break;\n default: [\n 1,\n 2,\n 3,\n 5,\n 6\n ].includes(t) || (t = 3);\n }\n return t;\n };\n exports.searchersNames = e;\n exports.getSearcherGIcon = t;\n exports.getDeviceGIcon = n;\n exports.getLangLabel = r;\n exports.genVolumeLabel = i;\n exports.prepareVolumeType = a;\n});\n//# sourceMappingURL=searchers.js.map\n","import { useI18nLang } from '@/core/app';\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import "../.chunks/app-0qVCkgOO.esm.js";
1
+ import "../.chunks/app-CQnQGya1.esm.js";
2
2
  //#region src/core/utils/searchers.ts
3
3
  var e = {
4
4
  0: "Yandex",
@@ -1,2 +0,0 @@
1
- define([`require`,`exports`,`./forms-BiKUURH4.amd`,`./field-DEusYVqS.amd`,`../utils/keyboard.amd`,`./popup-KKfSSrM6.amd`,`vue`,`./api-D5wIZnrK.amd`,`../require/css.amd!../assets/formsExt.css`],function(e,t,n,r,i,a,o){"use strict";if(s===void 0)var s=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.u=t.t=t.s=t.r=t.o=t.n=t.l=t.i=t.d=t.c=t.a=void 0;var c={key:0,class:`top-menu_selectAll`},l=(0,o.defineComponent)({__name:`menu`,props:(0,o.mergeModels)({modelValue:{},items:{},isMultiple:{type:Boolean},canBeEmptyMultiple:{type:Boolean},styling:{default:`default`},selectAllItem:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=(0,o.useModel)(e,`modelValue`),i=(0,o.ref)();!t.isMultiple&&typeof r.value!=`string`&&typeof r.value!=`number`&&console.warn(`Type check failed for prop "modelValue". Expected String: `+typeof r.value),t.isMultiple&&!Array.isArray(r.value)&&console.warn(`Type check failed for prop "modelValue". Expected Array: `+typeof r.value),t.isMultiple&&!t.canBeEmptyMultiple&&Array.isArray(r.value)&&!r.value.length&&t.items[0]&&(r.value=[t.items[0]?.href??t.items[0]?.value]);let a=e=>Array.isArray(r.value)?r.value.includes(e.value):e.value===r.value,s=(e,n=!1)=>{if(Array.isArray(r.value)){let i=r.value.slice();if(n){i.length||(i=t.items.map(e=>e.value));let n=i.indexOf(e.value);n===-1?i.push(e.value):i.splice(n,1)}else i=i.length===1&&i[0]===e.value?[]:[e.value];!t.canBeEmptyMultiple&&!i.length&&(i=[e.value]),r.value=i;return}r.value=e.value},l=e=>{if(i.value.scrollWidth<=i.value.offsetWidth||e.shiftKey||Math.abs(e.deltaY)<50)return;e.preventDefault();let t=e.deltaY>0?30:-30;i.value.scrollLeft=i.value.scrollLeft+t},u=(e=!0)=>{let t=i.value.querySelector(`.top-active`);if(!t)return;let r=t.offsetLeft-i.value.offsetLeft-24,a=t.offsetLeft-i.value.offsetLeft+t.clientWidth+24,o=i.value.scrollLeft,s=i.value.clientWidth+i.value.scrollLeft,c;r<o&&(c=r),a>s&&(c=a-i.value.clientWidth),c!==void 0&&((0,n.G)()?n.O.$?.(i.value).animate({scrollLeft:c},e?200:0):i.value.scrollTo({left:c,behavior:e?`smooth`:`auto`}))},d=()=>{if(Array.isArray(r.value)){if(r.value.length===t.items.length){r.value=[t.items[0].href??t.items[0].value];return}r.value=t.items.map(e=>e.href??e.value)}};return(0,o.onMounted)(()=>u(!1)),(0,o.onUpdated)(()=>u(!0)),(t,u)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`el`,ref:i,class:(0,o.normalizeClass)({"top-menu":!0,[`top-style_`+e.styling]:!0}),onWheel:l},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.items,e=>((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({ref_for:!0},e,{class:`top-menu_item`,color:`theme`,onClick:t=>s(e,t.ctrlKey||t.metaKey),isActive:a(e)}),(0,o.createSlots)({_:2},[e.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.content),1)]),key:`0`}:void 0]),1040,[`onClick`,`isActive`]))),256)),Array.isArray(r.value)&&e.selectAllItem?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,c,[(0,o.createVNode)(n.h,(0,o.mergeProps)(e.selectAllItem,{class:`top-menu_item`,color:`theme`,styling:``,onClick:u[0]||=e=>d(),isActive:r.value.length===e.items.length}),(0,o.createSlots)({_:2},[e.selectAllItem.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.selectAllItem.content),1)]),key:`0`}:void 0]),1040,[`isActive`])])):(0,o.createCommentVNode)(``,!0)],34))}}),u={class:`top-selector2_itemMulti top-ellipsis`},d=(0,o.defineComponent)({__name:`itemMulti`,props:{id:{},name:{}},emits:[`delete`],setup(e){return(t,n)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createTextVNode)((0,o.toDisplayString)(e.name)+` `,1),(0,o.createElementVNode)(`span`,{class:`top-selector2_itemMultiDelete`,"data-top-icon":``,onClick:n[0]||=n=>t.$emit(`delete`,{id:e.id,name:e.name}),onMousedown:n[1]||=(0,o.withModifiers)(()=>{},[`stop`])},null,32)]))}}),f=new Map,p=new Map,m=new Map,h=e=>(m.has(e)||m.set(e,(0,o.ref)(0)),m.get(e)),g=e=>{h(e).value++},_=e=>{f.get(e)?.clear(),g(e)},v=(e,t)=>{f.get(e)?.forEach(e=>t(e))},y=(e,t)=>{p.get(e)?.forEach(e=>t(e))},b=(e,t,n)=>{y(e,e=>{let r=!1;if(Array.isArray(e.value))e.value.filter(e=>e.id===t).forEach(e=>{Object.assign(e,n),r=!0});else{if(e.value.id!==t)return;Object.assign(e.value,n),r=!0}r&&(0,o.triggerRef)(e)})},x=e=>{let t=window.mo?.user?.id;return JSON.stringify(e.params)+`:`+e.url+`:`+t},S=(e,t)=>{let n=f.get(t)?.get(e);if(n)return n.result=n.result.map(e=>({...e})),n},C=(e,t,n)=>{f.has(t)||f.set(t,new Map),f.get(t)?.set(e,n)},w=(e,t)=>{p.has(e)||p.set(e,new Set),p.get(e)?.add(t),(0,o.onUnmounted)(()=>p.get(e)?.delete(t))},T=(e,t,n)=>{v(e,e=>{let r=e.result.find(e=>e.id===t);r&&Object.assign(r,n)}),b(e,t,n),g(e)},E=(e,t)=>{v(e,e=>{let n=e.result.findIndex(e=>e.id===t);n!==-1&&(e.result.splice(n,1),e.nextOffset&&e.nextOffset--)}),b(e,t,{name:`--`}),g(e)},D=(e,t,r,i,a)=>{let s=(0,o.ref)([]),c=(0,o.ref)(!1),l=(0,o.ref)(0),u=``,d;e&&!e.params.limit&&(e.params.limit=100),e&&w(e.path,a);let f=()=>{if(!e)return;e.params.offset=0;let t=S(x(e),e.path);if(!t){s.value=[],d=void 0;return}s.value=t.result,d=t.nextOffset};e&&i&&(0,o.watch)(h(e.path),()=>{f()});let p=async()=>{if(!e)return;let t=i?x(e):void 0;if(t){let n=S(t,e.path);if(n)return e.abortByFingerprint(),n}let n=await e.call();if(n.errors)return;if(!Array.isArray(n.result)){console.warn("Array expected in `res.result`");return}let r=n.result.findIndex(e=>e.id===void 0||e.name===void 0);if(r!==-1){console.warn(`В result[${r}] нет id или name`);return}return t&&C(t,e.path,n),n},m=async n=>{if(!e)return;if(n){if(!d||c.value)return;e.params.offset=d}else e.params.offset=0;t?.(e,u),c.value=!0;let r=await p();c.value=!1,l.value++,r&&(d=r.nextOffset,n?s.value=s.value.concat(r.result):s.value=r.result)},g=(0,n.P)(()=>m(!1),200);return{apiRequest:e,items:s,isLoading:c,countLoading:l,load:m,setSearchTextAndLoad:(t,n=!0)=>{if(e){if(t.length<r){e.abortByFingerprint(),s.value=[];return}t===u&&s.value.length||(u=t,n?g():m(!1))}}}},O=0,k=null,A=(e,t,n=!0)=>n&&t.id===null?Array.isArray(e)?e.some(e=>e.id===t.id&&e.name===t.name):t.name===e.name:Array.isArray(e)?e.some(e=>e.id===t.id):t.id===e.id,j=(e,t,n)=>{let i=e.params.filters??[];i=i.filter(e=>e.name!==n),t&&i.push((0,r.t)(n,`CONTAINS`,[t])),e.changeParams({filters:i})},M=(e,t,r,a,s,c,l,u,d,f,p,m,h,g)=>{let _=(0,o.ref)(``),v={id:0,name:(0,n.E)().Common.All},y=()=>{_.value=``},b=()=>!(!g.apiRequest||_.value.length>=h),x=(0,o.computed)(()=>{let e=[];return!s&&c.value&&(typeof c.value==`string`&&(v.name=c.value),e.push(v)),r.value?.forEach(t=>e.push({...t})),e}),S=(0,o.ref)([]),C=()=>{S.value=w()},w=()=>{let t=_.value.toLowerCase(),n=(0,i.invertKeyboardLayout)(t),r=[],o,c=[],m=()=>{c.at(-1)?.listItemProps?.type===`delimiter`&&c.pop(),c.length&&=(o&&r.push(o),r.push(...c),0)},h=e=>{let r=p.value?.includes(`id`),i=e.name.toLowerCase(),a=p.value?.filter(e=>e!==`id`).map(t=>typeof e[t]==`string`||typeof e[t]==`number`?e[t]:``).join(`☼`).toLowerCase();(r&&e.id===Number(t)||a?.includes(t)||a?.includes(n))&&(i===t||i===n?c.unshift(e):c.push(e))};for(let e of x.value)switch(e.listItemProps?.type){case`title`:m(),o=e;break;case`delimiter`:if(c.length){let t=c.length;c.at(-1)?.listItemProps?.type===`delimiter`&&t--,c[t]=e}break;default:h(e)}if(m(),r.push(...g.items.value),l.value&&_.value&&(!d.value||d.value(t))&&(u.value||!r.find(e=>e.name.toLowerCase()===t))){let e={id:null,name:_.value};f.value&&(e.listItemProps={closeByClick:!1}),r.push(e)}return s&&(r=r.filter(t=>!A(e.value,t))),a&&(r=a(r)),r},T=n=>{n.listItemProps?.type===`title`||n.listItemProps?.type===`delimiter`||n.id===null&&(t(`appendItem`,n),f.value)||(s&&Array.isArray(e.value)?A(e.value,n)||(e.value=[...e.value,n]):e.value=n,setTimeout(()=>{y()}))};if(g.apiRequest){let t=[r,g.items];s&&t.push(e),(0,o.watch)(t,()=>{C()},{deep:2})}else(0,o.watch)([e,r,_],()=>{C()},{immediate:!0,deep:2});return{searchText:_,resetSearch:y,genIsShort:b,itemsForShow:S,selectItem:T,selectNextItem:()=>{if(Array.isArray(e.value))return;let t=S.value.filter(e=>![`title`,`delimiter`].includes(e.listItemProps?.type??``));e.value={...t[(t.findIndex(t=>t.id===e.value.id)+1)%t.length]}},deleteItemByItem:async t=>{Array.isArray(e.value)&&(e.value=e.value.filter(e=>e.id!==t.id||e.name!==t.name))}}},N={key:0,class:`top-selector2_activeItems`},P={key:1,class:`top-selector2_activeName top-ellipsis`},F={key:2,class:`top-selector2_placeholder top-ellipsis`},I={class:`top-selector2_searchWidget`},L=(0,o.defineComponent)({__name:`selector2`,props:(0,o.mergeModels)({modelValue:{},items:{default:()=>[]},title:{},disabled:{type:Boolean},icon:{},modificator:{},size:{default:`s`},isError:{type:Boolean},openByFocusInput:{type:Boolean,default:void 0},searchType:{default:`popup`},searchFields:{default:()=>[`id`,`name`]},placeholder:{},hasCloserBtn:{type:Boolean},prepareItemsBeforeRender:{},api:{},apiSetSearchParams:{},minLength:{default:0},useCache:{type:Boolean},appendSearchToResult:{type:Boolean},appendSearchAllowDuplicate:{type:Boolean},appendSearchToResultCond:{},appendWithoutSelect:{type:Boolean},multiselect:{type:Boolean},useAllItem:{type:[Boolean,String]},addChanger:{type:Boolean},buttonProps:{},selectedAsPlaceholder:{type:Boolean},openerShortcut:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:(0,o.mergeModels)([`appendItem`,`open`],[`update:modelValue`]),setup(e,{expose:t,emit:r}){let i=e,s=(0,o.useModel)(e,`modelValue`),c=r;t({resetCache:(e=!1)=>{u.apiRequest&&(e&&_(u.apiRequest.path),u.items.value=[],u.countLoading.value=0,u.apiRequest.params.offset=0,requestAnimationFrame(()=>{f.itemsForShow.value=[]}),h()?.elPopup&&u.setSearchTextAndLoad(f.searchText.value))},updateCacheItemById:(e,t)=>{u.apiRequest&&T(u.apiRequest.path,e,t)},deleteCacheItemById:e=>{u.apiRequest&&E(u.apiRequest.path,e)}});let l=(0,o.computed)(()=>i.searchType===`inline`&&i.multiselect||i.searchType===`inline`&&n.O.state.isMobile?`popup`:i.searchType),u=D(i.api,i.apiSetSearchParams,i.minLength,i.useCache,s),f=M(s,c,(0,o.toRef)(i,`items`),i.prepareItemsBeforeRender,i.multiselect,(0,o.toRef)(i,`useAllItem`),(0,o.toRef)(i,`appendSearchToResult`),(0,o.toRef)(i,`appendSearchAllowDuplicate`),(0,o.toRef)(i,`appendSearchToResultCond`),(0,o.toRef)(i,`appendWithoutSelect`),(0,o.toRef)(i,`searchFields`),l,i.minLength,u),p=(0,o.computed)(()=>i.buttonProps?`TopButton`:l.value===`inline`?`TopInput`:`div`),m=(0,o.ref)(null),h=()=>m.value?.popup;u.apiRequest&&(0,o.watch)(f.searchText,()=>{u.setSearchTextAndLoad(f.searchText.value)});let g=(0,o.computed)(()=>Array.isArray(s.value)||i.multiselect||!i.selectedAsPlaceholder&&l.value!==`inline`?i.placeholder:s.value?.name||i.placeholder),v=e=>{let t=!1;switch(e.key){case`Delete`:case`Backspace`:Array.isArray(s.value)&&(e.preventDefault(),e.stopPropagation(),s.value.pop());break;case`ArrowUp`:case`ArrowRight`:case`ArrowDown`:case`ArrowLeft`:case`Enter`:case` `:t=!0;break;case`Escape`:l.value===`inline`&&f.resetSearch();break}let n=e.key.length===1&&!e.ctrlKey&&!e.metaKey;(l.value===`popup`||l.value===`inline`)&&n&&(t=!0),h()?.elPopup&&(t=!1),t&&(l.value===`popup`&&(e.preventDefault(),e.stopPropagation(),n&&(f.searchText.value||(f.searchText.value=e.key))),e.currentTarget?.click())},y=e=>{e.preventDefault(),f.selectNextItem()},b=()=>{u.apiRequest&&u.setSearchTextAndLoad(f.searchText.value,!1),c(`open`)},x=()=>{l.value===`popup`&&f.searchText.value&&f.resetSearch()},S=e=>{let t=e.target;t.scrollTop/(t.scrollHeight-t.offsetHeight)>.8&&u.load(!0)};return(t,r)=>{let i=(0,o.resolveComponent)(`TopButton`),c=(0,o.resolveComponent)(`TopLoadbar`),h=(0,o.resolveDirective)(`top-focus`),_=(0,o.resolveDirective)(`top-shortcut`);return(0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.s),{ref_key:`popupRef`,ref:m,onOpen:r[3]||=e=>b(),onClose:r[4]||=e=>x(),onScrollContentList:r[5]||=e=>(0,o.unref)(u)?S(e):void 0,notch:!1,transitionDuration:0,openByFocusInput:l.value===`inline`&&(e.openByFocusInput??!0),disabled:l.value===`inline`&&(0,o.unref)(f).genIsShort()},(0,o.createSlots)({opener:(0,o.withCtx)(()=>[(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(p.value),(0,o.mergeProps)(e.buttonProps,{class:{"top-selector2":!0,"top-selector2-multiselect":e.multiselect,[`top-selector2-`+e.modificator]:!!e.modificator,"top-as-input":!e.buttonProps&&l.value!==`inline`,"top-as-selector":!0,[`top-size_`+e.size]:!0,"top-disabled":e.disabled,"top-forms-focusable":!e.disabled,"top-error":e.isError},icon:e.icon,tabindex:`0`,onKeydown:v,onBlur:r[0]||=e=>l.value===`inline`&&(0,o.unref)(f).resetSearch(),placeholder:g.value,title:e.title,captionType:l.value===`inline`&&e.title!==void 0?`top`:void 0,modelValue:(0,o.unref)(f).searchText.value,"onUpdate:modelValue":r[1]||=e=>(0,o.unref)(f).searchText.value=e}),{default:(0,o.withCtx)(()=>[e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,N,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.value,e=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:e.id??void 0,id:e.id,name:e.name,onDelete:(0,o.unref)(f).deleteItemByItem},null,8,[`id`,`name`,`onDelete`]))),128))])):(0,o.createCommentVNode)(``,!0),l.value!==`inline`&&!e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,P,(0,o.toDisplayString)(Array.isArray(s.value)?``:s.value.name),1)):(0,o.createCommentVNode)(``,!0),e.multiselect&&!s.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,F,(0,o.toDisplayString)(g.value),1)):(0,o.createCommentVNode)(``,!0),e.addChanger&&!e.buttonProps&&!e.multiselect&&(0,o.unref)(f).itemsForShow.value.length>1&&!e.disabled?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,{key:3,class:`top-changer top-changer-selector`,"data-top-popup-disabled":`true`,onClick:y})):(0,o.createCommentVNode)(``,!0)]),_:1},16,[`class`,`icon`,`placeholder`,`title`,`captionType`,`modelValue`])),[[h,e.isError,void 0,{onupdate:!0}],[_,e.openerShortcut]])]),contentList:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(f).itemsForShow.value,r=>((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),(0,o.mergeProps)({key:r.id??void 0,class:{"top-active":!Array.isArray(s.value)&&!e.multiselect&&s.value.id===r.id&&s.value.name===r.name,"top-selector2_item-all":r.id===(0,o.unref)(0),"top-selector2_item-new":r.id===(0,o.unref)(null)},closeByClick:!e.multiselect||(0,o.unref)(n.O).state.isMobile},{ref_for:!0},r.listItemProps,{onClick:e=>(0,o.unref)(f).selectItem(r)}),(0,o.createSlots)({default:(0,o.withCtx)(()=>[t.$slots.item?(0,o.renderSlot)(t.$slots,`item`,{key:0,item:r}):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(r.name),1)],64))]),_:2},[t.$slots.actions?{name:`actions`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`actions`,{item:r})]),key:`0`}:void 0]),1040,[`class`,`closeByClick`,`onClick`]))),128)),!(0,o.unref)(f).itemsForShow.value.length&&!(0,o.unref)(f).genIsShort()?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),{key:0,type:`regular`},{default:(0,o.withCtx)(()=>[!(0,o.unref)(u).isLoading.value||(0,o.unref)(u).countLoading.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.No_results),1)],64)):((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(n.t),{key:1,type:`circles`}))]),_:1})):(0,o.createCommentVNode)(``,!0),(0,o.unref)(u).countLoading.value&&(0,o.unref)(u).isLoading.value&&l.value===`inline`?((0,o.openBlock)(),(0,o.createBlock)(c,{key:1})):(0,o.createCommentVNode)(``,!0)]),_:2},[l.value===`popup`?{name:`widget`,fn:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,I,[(0,o.withDirectives)((0,o.createVNode)((0,o.unref)(a.a),{title:`Поиск`,icon:``,modelValue:(0,o.unref)(f).searchText.value,"onUpdate:modelValue":r[2]||=e=>(0,o.unref)(f).searchText.value=e,isLoading:!!(0,o.unref)(u).countLoading.value&&(0,o.unref)(u).isLoading.value,placeholder:g.value},null,8,[`modelValue`,`isLoading`,`placeholder`]),[[h,s.value,void 0,{onupdate:!0}]]),e.hasCloserBtn&&!t.$core.state.isMobile?((0,o.openBlock)(),(0,o.createBlock)(i,{key:0,class:`closer`,color:`theme`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.Cancel),1)]),_:1})):(0,o.createCommentVNode)(``,!0)])]),key:`0`}:void 0]),1032,[`openByFocusInput`,`disabled`])}}}),R={class:`top-editArea_footer`},z=(0,o.defineComponent)({__name:`editArea`,props:{defaultValue:{default:``},title:{},cancelText:{default:`Cancel`},submitText:{default:`Send`},closeText:{default:`Close`},isFocused:{type:Boolean},forceShowCloseBtn:{type:Boolean},attachToKeyboard:{type:Boolean},modelValue:{},name:{},placeholder:{},styling:{},rows:{},minHeight:{},expandable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},isError:{type:Boolean},hint:{},maxLength:{}},emits:[`submit`,`close`,`clickOnTitle`],setup(e,{emit:t}){let r=e,i=t,a=(0,o.ref)(r.defaultValue),s=(0,o.ref)(r.isFocused),c=(0,o.computed)(()=>a.value!==r.defaultValue),l=e=>{i(`submit`,e),a.value=r.defaultValue},u=()=>{if(r.forceShowCloseBtn&&!c.value){i(`close`);return}a.value=r.defaultValue},d=()=>{r.attachToKeyboard&&i(`clickOnTitle`)};return(t,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-editArea":!0,"top-editArea-attachedToKeyboard":e.attachToKeyboard})},[e.title||t.$slots.caption?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`top-editArea_caption`,onClick:r[0]||=e=>d()},[(0,o.renderSlot)(t.$slots,`caption`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.title),1)])])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)({"top-editArea_form":!0,"top-forms-focusable":!0,"top-as-input":!0,"top-error":e.isError,"top-focus":s.value})},[(0,o.createVNode)(n.r,{modelValue:a.value,"onUpdate:modelValue":r[1]||=e=>a.value=e,name:e.name,placeholder:e.placeholder,rows:e.rows,minHeight:e.minHeight,expandable:e.expandable,disabled:e.disabled,readonly:e.readonly,isError:e.isError,hint:e.hint,class:`top-editArea_element`,onFocus:r[2]||=()=>s.value=!0,onBlur:r[3]||=()=>s.value=!1,onKeyup:[(0,o.withKeys)(u,[`esc`]),r[4]||=(0,o.withKeys)((0,o.withModifiers)(e=>l(a.value),[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`name`,`placeholder`,`rows`,`minHeight`,`expandable`,`disabled`,`readonly`,`isError`,`hint`]),(0,o.createElementVNode)(`div`,R,[c.value||e.forceShowCloseBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:0,icon:t.$core.state.isMobile?``:``,class:`top-editArea_button`,color:`theme`,styling:`soft`,onClick:u},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.cancelText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0),c.value?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:1,class:`top-editArea_button`,icon:t.$core.state.isMobile?``:``,onClick:r[5]||=e=>l(a.value)},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.submitText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0)])],2)],2))}}),B={class:`top-editInput`},V=(0,o.defineComponent)({__name:`editInput`,props:{modelValue:{},alwaysShowSubmitBtn:{type:Boolean},input:{},button:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=(0,o.ref)(r.modelValue);(0,o.watch)(()=>r.modelValue,()=>{i.value=r.modelValue});let a=t,s=()=>{a(`update:modelValue`,i.value)};return(t,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,B,[(0,o.createVNode)(n.c,(0,o.mergeProps)(e.input,{onKeydownCapture:r[0]||=(0,o.withKeys)((0,o.withModifiers)(t=>i.value=e.modelValue,[`stop`]),[`esc`]),onKeydown:(0,o.withKeys)((0,o.withModifiers)(s,[`stop`]),[`enter`]),modelValue:i.value,"onUpdate:modelValue":r[1]||=e=>i.value=e}),(0,o.createSlots)({_:2},[t.$slots.caption?{name:`caption`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`caption`)]),key:`0`}:void 0]),1040,[`onKeydown`,`modelValue`]),i.value!==e.modelValue||e.alwaysShowSubmitBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({key:0,icon:``,styling:`soft`},e.button,{onClick:s}),null,16)):(0,o.createCommentVNode)(``,!0)]))}}),H=(0,o.defineComponent)({__name:`optionGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{default:`s`},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`),r=e,i=(0,o.ref)(null);(0,o.watch)(t,()=>{let e=r.items.map(e=>e.value);Array.isArray(t.value)?t.value.find(t=>!e.includes(t))&&(t.value=t.value.filter(t=>e.includes(t))):e.includes(t.value)||(t.value=e[0]??``),i.value?.querySelector(`.radioGroup_item-selected`)?.scrollIntoView()},{immediate:!0});let a=`optionGroup-`+Math.random();return(r,s)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`elRef`,ref:i,class:(0,o.normalizeClass)({"top-optionGroup":!0,[`top-optionGroup-showIndicator_`+Number(e.showIndicator)]:!0,"top-scrollBarXHidding":!0,[`top-size_`+e.size]:!!e.size,"top-error":e.isError})},[Array.isArray(t.value)?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.f,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":t.value.includes(r.value),"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[0]||=e=>t.value=e,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256)):((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.a,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":r.value===t.value,"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[1]||=e=>t.value=e,name:a,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256))],2))}}),U=(0,o.defineComponent)({__name:`radioGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`);return(e,n)=>((0,o.openBlock)(),(0,o.createBlock)(H,{class:`top-radioGroup`,modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,items:e.$props.items,size:e.$props.size,showIndicator:e.$props.showIndicator,isError:e.$props.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),W=(0,o.defineComponent)({__name:`checkboxGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`);return(e,n)=>((0,o.openBlock)(),(0,o.createBlock)(H,{class:`top-checkboxGroup`,modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,items:e.$props.items,size:e.$props.size,showIndicator:e.$props.showIndicator,isError:e.$props.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),G=[`data-top-icon`],K={class:`top-info_text`},q={key:0,class:`top-info_value`},J=(0,o.defineComponent)({__name:`info`,props:{icon:{},styling:{default:`default`},size:{default:`default`}},setup(e){return(t,n)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-info":!0,[`top-size_`+e.size]:!0,[`top-info-styling_`+e.styling]:!0}),"data-top-icon":e.icon},[(0,o.createElementVNode)(`div`,K,[(0,o.renderSlot)(t.$slots,`default`)]),t.$slots.additional?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,q,[(0,o.renderSlot)(t.$slots,`additional`)])):(0,o.createCommentVNode)(``,!0)],10,G))}}),Y={key:0,class:`top-policy`},X={class:`top-policy_title`},Z=[`innerHTML`],Q=(0,o.defineComponent)({__name:`policy`,props:{title:{},description:{},acceptText:{}},emits:[`accept`],setup(e,{emit:t}){let r=t,i=(0,o.ref)(!0),a=()=>{i.value=!1,r(`accept`)};return(t,r)=>i.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,Y,[(0,o.createElementVNode)(`div`,X,(0,o.toDisplayString)(e.title),1),(0,o.createElementVNode)(`div`,{class:`top-policy_description`,innerHTML:e.description},null,8,Z),(0,o.createVNode)((0,o.unref)(n.h),{size:`m`,onClick:a},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.acceptText),1)]),_:1})])):(0,o.createCommentVNode)(``,!0)}});t.d=l,t.c=O,t.l=k,t.u=j,t.s=L,t.o=z,t.a=V,t.i=U,t.r=W,t.n=J,t.t=Q});
2
- //# sourceMappingURL=formsExt-Bk_fn1Pg.amd.js.map