@stachelock/ui 0.2.14 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddDeleteButtonGroup.vue_vue_type_script_setup_true_lang-CFS3lVF-.js +128 -0
- package/dist/AddDeleteButtonGroup.vue_vue_type_script_setup_true_lang-CFS3lVF-.js.map +1 -0
- package/dist/AlertModal.vue_vue_type_script_setup_true_lang-CxwewAVy.js +194 -0
- package/dist/AlertModal.vue_vue_type_script_setup_true_lang-CxwewAVy.js.map +1 -0
- package/dist/BackgroundGradientWrapper.vue_vue_type_script_setup_true_lang-B570pdYL.js +34 -0
- package/dist/BackgroundGradientWrapper.vue_vue_type_script_setup_true_lang-B570pdYL.js.map +1 -0
- package/dist/BarChart.vue_vue_type_script_setup_true_lang-Dnuzd7vZ.js +67 -0
- package/dist/BarChart.vue_vue_type_script_setup_true_lang-Dnuzd7vZ.js.map +1 -0
- package/dist/Bars3Icon-BdOqcGcY.js +22 -0
- package/dist/Bars3Icon-BdOqcGcY.js.map +1 -0
- package/dist/BaseModal.vue_vue_type_script_setup_true_lang-Cr_GAD6Q.js +235 -0
- package/dist/BaseModal.vue_vue_type_script_setup_true_lang-Cr_GAD6Q.js.map +1 -0
- package/dist/CalendarHeader.vue_vue_type_script_setup_true_lang-DRwe4rw8.js +328 -0
- package/dist/CalendarHeader.vue_vue_type_script_setup_true_lang-DRwe4rw8.js.map +1 -0
- package/dist/CardWrapper.vue_vue_type_script_setup_true_lang-D59QBAi9.js +13 -0
- package/dist/CardWrapper.vue_vue_type_script_setup_true_lang-D59QBAi9.js.map +1 -0
- package/dist/CheckIcon-BGlsmVwT.js +20 -0
- package/dist/CheckIcon-BGlsmVwT.js.map +1 -0
- package/dist/{CheckboxInput.vue_vue_type_script_setup_true_lang-tYAo46wK.js → CheckboxInput.vue_vue_type_script_setup_true_lang-B8wJVkPP.js} +52 -51
- package/dist/CheckboxInput.vue_vue_type_script_setup_true_lang-B8wJVkPP.js.map +1 -0
- package/dist/ChevronRightIcon-DkUqw988.js +20 -0
- package/dist/ChevronRightIcon-DkUqw988.js.map +1 -0
- package/dist/ChevronUpDownIcon-Bq_fsgrb.js +20 -0
- package/dist/ChevronUpDownIcon-Bq_fsgrb.js.map +1 -0
- package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-ClGP5YU0.js +1315 -0
- package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-ClGP5YU0.js.map +1 -0
- package/dist/ComingSoon.vue_vue_type_script_setup_true_lang-C5GU-yiK.js +60 -0
- package/dist/ComingSoon.vue_vue_type_script_setup_true_lang-C5GU-yiK.js.map +1 -0
- package/dist/{DashboardLayout.vue_vue_type_script_setup_true_lang-Cg83utkU.js → DashboardLayout.vue_vue_type_script_setup_true_lang-DV-XVWqh.js} +23 -22
- package/dist/DashboardLayout.vue_vue_type_script_setup_true_lang-DV-XVWqh.js.map +1 -0
- package/dist/DatepickerInput.vue_vue_type_style_index_0_lang-BdkGLw0H.js +688 -0
- package/dist/DatepickerInput.vue_vue_type_style_index_0_lang-BdkGLw0H.js.map +1 -0
- package/dist/DayCalendar.vue_vue_type_script_setup_true_lang-BV9vYYuX.js +238 -0
- package/dist/DayCalendar.vue_vue_type_script_setup_true_lang-BV9vYYuX.js.map +1 -0
- package/dist/DisclosureWrapper.vue_vue_type_script_setup_true_lang-B-Mr_vdx.js +138 -0
- package/dist/DisclosureWrapper.vue_vue_type_script_setup_true_lang-B-Mr_vdx.js.map +1 -0
- package/dist/DynamicForm.vue_vue_type_script_setup_true_lang-DRDP86Yc.js +253 -0
- package/dist/DynamicForm.vue_vue_type_script_setup_true_lang-DRDP86Yc.js.map +1 -0
- package/dist/{DynamicFormField.vue_vue_type_script_setup_true_lang-DvT03FIS.js → DynamicFormField.vue_vue_type_script_setup_true_lang-Ct8b80dM.js} +25 -41
- package/dist/DynamicFormField.vue_vue_type_script_setup_true_lang-Ct8b80dM.js.map +1 -0
- package/dist/EmailInput.vue_vue_type_script_setup_true_lang-Dhfgs2Jn.js +122 -0
- package/dist/EmailInput.vue_vue_type_script_setup_true_lang-Dhfgs2Jn.js.map +1 -0
- package/dist/EmptyInput.vue_vue_type_script_setup_true_lang-BDxgc5Bs.js +32 -0
- package/dist/EmptyInput.vue_vue_type_script_setup_true_lang-BDxgc5Bs.js.map +1 -0
- package/dist/EmptyState.vue_vue_type_script_setup_true_lang-B_XAq5Sr.js +74 -0
- package/dist/EmptyState.vue_vue_type_script_setup_true_lang-B_XAq5Sr.js.map +1 -0
- package/dist/{EventCard.vue_vue_type_script_setup_true_lang-YV1lfgUY.js → EventCard.vue_vue_type_script_setup_true_lang-j1mtKShZ.js} +56 -77
- package/dist/EventCard.vue_vue_type_script_setup_true_lang-j1mtKShZ.js.map +1 -0
- package/dist/{EventsList.vue_vue_type_script_setup_true_lang-Cn_WOpZi.js → EventsList.vue_vue_type_script_setup_true_lang-D3q9wJ4E.js} +9 -9
- package/dist/{EventsList.vue_vue_type_script_setup_true_lang-Cn_WOpZi.js.map → EventsList.vue_vue_type_script_setup_true_lang-D3q9wJ4E.js.map} +1 -1
- package/dist/ExclamationCircleIcon-DjxYk45_.js +22 -0
- package/dist/ExclamationCircleIcon-DjxYk45_.js.map +1 -0
- package/dist/ExclamationCircleIcon-DmL8Wwjo.js +36 -0
- package/dist/ExclamationCircleIcon-DmL8Wwjo.js.map +1 -0
- package/dist/ExclamationTriangleIcon-BNKYmV_J.js +22 -0
- package/dist/ExclamationTriangleIcon-BNKYmV_J.js.map +1 -0
- package/dist/FileDropzoneInput.vue_vue_type_script_setup_true_lang-CclXceTb.js +211 -0
- package/dist/FileDropzoneInput.vue_vue_type_script_setup_true_lang-CclXceTb.js.map +1 -0
- package/dist/FormErrorWrapper.vue_vue_type_script_setup_true_lang-BQOlG_ab.js +63 -0
- package/dist/FormErrorWrapper.vue_vue_type_script_setup_true_lang-BQOlG_ab.js.map +1 -0
- package/dist/FunnelChart.vue_vue_type_script_setup_true_lang-B8QYlJ-s.js +67 -0
- package/dist/FunnelChart.vue_vue_type_script_setup_true_lang-B8QYlJ-s.js.map +1 -0
- package/dist/HiddenInput.vue_vue_type_script_setup_true_lang-DYdvWmVE.js +22 -0
- package/dist/HiddenInput.vue_vue_type_script_setup_true_lang-DYdvWmVE.js.map +1 -0
- package/dist/InformationCircleIcon-B322GNIt.js +40 -0
- package/dist/InformationCircleIcon-B322GNIt.js.map +1 -0
- package/dist/InlineTabs.vue_vue_type_script_setup_true_lang-DhkX5sWS.js +93 -0
- package/dist/InlineTabs.vue_vue_type_script_setup_true_lang-DhkX5sWS.js.map +1 -0
- package/dist/LineChart.vue_vue_type_script_setup_true_lang-DszQ-a5L.js +66 -0
- package/dist/LineChart.vue_vue_type_script_setup_true_lang-DszQ-a5L.js.map +1 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CwOOShcM.js +36 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CwOOShcM.js.map +1 -0
- package/dist/MapPinIcon-CSTDUZnD.js +27 -0
- package/dist/MapPinIcon-CSTDUZnD.js.map +1 -0
- package/dist/MonthCalendar.vue_vue_type_style_index_0_lang-CnX3Ih0W.js +193 -0
- package/dist/MonthCalendar.vue_vue_type_style_index_0_lang-CnX3Ih0W.js.map +1 -0
- package/dist/NotificationToast.vue_vue_type_script_setup_true_lang-Cm5RsC7C.js +162 -0
- package/dist/NotificationToast.vue_vue_type_script_setup_true_lang-Cm5RsC7C.js.map +1 -0
- package/dist/PieChart.vue_vue_type_script_setup_true_lang-DJRcsty7.js +69 -0
- package/dist/PieChart.vue_vue_type_script_setup_true_lang-DJRcsty7.js.map +1 -0
- package/dist/{XMarkIcon-C4wILUsz.js → PlusIcon-aDFVlB90.js} +5 -5
- package/dist/PlusIcon-aDFVlB90.js.map +1 -0
- package/dist/ProfileHeaderAvatar.vue_vue_type_script_setup_true_lang-Cri9BiBy.js +130 -0
- package/dist/ProfileHeaderAvatar.vue_vue_type_script_setup_true_lang-Cri9BiBy.js.map +1 -0
- package/dist/ProjectLogo.vue_vue_type_script_setup_true_lang-CtroDq7L.js +108 -0
- package/dist/ProjectLogo.vue_vue_type_script_setup_true_lang-CtroDq7L.js.map +1 -0
- package/dist/SelectInput.vue_vue_type_script_setup_true_lang--yUL7bcx.js +303 -0
- package/dist/SelectInput.vue_vue_type_script_setup_true_lang--yUL7bcx.js.map +1 -0
- package/dist/SelectTextInput.vue_vue_type_script_setup_true_lang-B2Gw_se2.js +339 -0
- package/dist/SelectTextInput.vue_vue_type_script_setup_true_lang-B2Gw_se2.js.map +1 -0
- package/dist/{SidebarLayout.vue_vue_type_script_setup_true_lang-CzLbBcNS.js → SidebarLayout.vue_vue_type_script_setup_true_lang-BD2PF5xp.js} +25 -24
- package/dist/SidebarLayout.vue_vue_type_script_setup_true_lang-BD2PF5xp.js.map +1 -0
- package/dist/SparklineChart.vue_vue_type_script_setup_true_lang-DDTcpEjy.js +78 -0
- package/dist/SparklineChart.vue_vue_type_script_setup_true_lang-DDTcpEjy.js.map +1 -0
- package/dist/StatCard.vue_vue_type_script_setup_true_lang-DTOT0-WB.js +111 -0
- package/dist/StatCard.vue_vue_type_script_setup_true_lang-DTOT0-WB.js.map +1 -0
- package/dist/StepperPanels.vue_vue_type_script_setup_true_lang-BtHrfqFI.js +119 -0
- package/dist/StepperPanels.vue_vue_type_script_setup_true_lang-BtHrfqFI.js.map +1 -0
- package/dist/{SwitchInput.vue_vue_type_script_setup_true_lang-BFr2SByh.js → SwitchInput.vue_vue_type_script_setup_true_lang-D6M1qwP1.js} +63 -58
- package/dist/SwitchInput.vue_vue_type_script_setup_true_lang-D6M1qwP1.js.map +1 -0
- package/dist/SwitchInputGroup.vue_vue_type_script_setup_true_lang-BNKKEAMq.js +183 -0
- package/dist/SwitchInputGroup.vue_vue_type_script_setup_true_lang-BNKKEAMq.js.map +1 -0
- package/dist/TabGroup.vue_vue_type_script_setup_true_lang-DrhDwLL3.js +125 -0
- package/dist/TabGroup.vue_vue_type_script_setup_true_lang-DrhDwLL3.js.map +1 -0
- package/dist/TabGroupUnderline.vue_vue_type_script_setup_true_lang-Di33js6c.js +129 -0
- package/dist/TabGroupUnderline.vue_vue_type_script_setup_true_lang-Di33js6c.js.map +1 -0
- package/dist/TabsInPills.vue_vue_type_script_setup_true_lang-CMxaK0Kw.js +85 -0
- package/dist/TabsInPills.vue_vue_type_script_setup_true_lang-CMxaK0Kw.js.map +1 -0
- package/dist/{TagifyInput.vue_vue_type_script_setup_true_lang-DRR6jt_8.js → TagifyInput.vue_vue_type_script_setup_true_lang-CAK6ZIiz.js} +53 -63
- package/dist/TagifyInput.vue_vue_type_script_setup_true_lang-CAK6ZIiz.js.map +1 -0
- package/dist/{TextAreaInput.vue_vue_type_script_setup_true_lang-CbR651TU.js → TextAreaInput.vue_vue_type_script_setup_true_lang-BMpc-5ln.js} +47 -35
- package/dist/TextAreaInput.vue_vue_type_script_setup_true_lang-BMpc-5ln.js.map +1 -0
- package/dist/{UiAvatar.vue_vue_type_script_setup_true_lang-CDNjUA1L.js → UiAvatar.vue_vue_type_script_setup_true_lang-Ci7VLRZx.js} +34 -34
- package/dist/UiAvatar.vue_vue_type_script_setup_true_lang-Ci7VLRZx.js.map +1 -0
- package/dist/UiBadge.vue_vue_type_script_setup_true_lang-CV8WVEXL.js +88 -0
- package/dist/UiBadge.vue_vue_type_script_setup_true_lang-CV8WVEXL.js.map +1 -0
- package/dist/UiButtonGroup.vue_vue_type_script_setup_true_lang-BKyznfxi.js +108 -0
- package/dist/UiButtonGroup.vue_vue_type_script_setup_true_lang-BKyznfxi.js.map +1 -0
- package/dist/UiCheckbox.vue_vue_type_script_setup_true_lang-B5fPB7PH.js +96 -0
- package/dist/UiCheckbox.vue_vue_type_script_setup_true_lang-B5fPB7PH.js.map +1 -0
- package/dist/{UiLoading.vue_vue_type_script_setup_true_lang-KbLKA4SA.js → UiLoading.vue_vue_type_script_setup_true_lang-DldleD-3.js} +48 -43
- package/dist/UiLoading.vue_vue_type_script_setup_true_lang-DldleD-3.js.map +1 -0
- package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-CMAyvJMk.js +489 -0
- package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-CMAyvJMk.js.map +1 -0
- package/dist/UiMenu.vue_vue_type_script_setup_true_lang-aJddpshR.js +330 -0
- package/dist/UiMenu.vue_vue_type_script_setup_true_lang-aJddpshR.js.map +1 -0
- package/dist/UiModal.vue_vue_type_script_setup_true_lang-CFgLuifQ.js +214 -0
- package/dist/UiModal.vue_vue_type_script_setup_true_lang-CFgLuifQ.js.map +1 -0
- package/dist/UiNavLink.vue_vue_type_script_setup_true_lang-C23h6Do0.js +83 -0
- package/dist/UiNavLink.vue_vue_type_script_setup_true_lang-C23h6Do0.js.map +1 -0
- package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-BioTMORv.js +69 -0
- package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-BioTMORv.js.map +1 -0
- package/dist/{UiTable.vue_vue_type_script_setup_true_lang-hI1_xamh.js → UiTable.vue_vue_type_script_setup_true_lang-BuOCaPzi.js} +45 -44
- package/dist/UiTable.vue_vue_type_script_setup_true_lang-BuOCaPzi.js.map +1 -0
- package/dist/XMarkIcon-Cwy3T6p8.js +22 -0
- package/dist/XMarkIcon-Cwy3T6p8.js.map +1 -0
- package/dist/XMarkIcon-DNvCkiOy.js +16 -0
- package/dist/XMarkIcon-DNvCkiOy.js.map +1 -0
- package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-C01PTLg8.js +89 -0
- package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-C01PTLg8.js.map +1 -0
- package/dist/active-element-history-BTBNVIJN.js +17 -0
- package/dist/active-element-history-BTBNVIJN.js.map +1 -0
- package/dist/calculate-active-index-Dim3sT-5.js +55 -0
- package/dist/calculate-active-index-Dim3sT-5.js.map +1 -0
- package/dist/calendar-DyIP7WGv.js +575 -0
- package/dist/calendar-DyIP7WGv.js.map +1 -0
- package/dist/calendars/CalendarDashboard.js +7 -7
- package/dist/calendars/CalendarHeader.js +1 -1
- package/dist/calendars/DayCalendar.js +1 -1
- package/dist/calendars/EventCard.js +1 -1
- package/dist/calendars/EventsList.js +1 -1
- package/dist/calendars/MonthCalendar.js +1 -1
- package/dist/calendars/WeekCalendar.js +376 -2
- package/dist/calendars/WeekCalendar.js.map +1 -1
- package/dist/calendars/YearCalendar.js +1 -1
- package/dist/charts/BarChart.d.ts +3 -0
- package/dist/charts/BarChart.js +5 -0
- package/dist/charts/BarChart.js.map +1 -0
- package/dist/charts/BaseChart.d.ts +3 -0
- package/dist/charts/BaseChart.js +135 -0
- package/dist/charts/BaseChart.js.map +1 -0
- package/dist/charts/FunnelChart.d.ts +3 -0
- package/dist/charts/FunnelChart.js +5 -0
- package/dist/charts/FunnelChart.js.map +1 -0
- package/dist/charts/LineChart.d.ts +3 -0
- package/dist/charts/LineChart.js +5 -0
- package/dist/charts/LineChart.js.map +1 -0
- package/dist/charts/PieChart.d.ts +3 -0
- package/dist/charts/PieChart.js +5 -0
- package/dist/charts/PieChart.js.map +1 -0
- package/dist/charts/SparklineChart.d.ts +3 -0
- package/dist/charts/SparklineChart.js +5 -0
- package/dist/charts/SparklineChart.js.map +1 -0
- package/dist/charts/StatCard.d.ts +3 -0
- package/dist/charts/StatCard.js +5 -0
- package/dist/charts/StatCard.js.map +1 -0
- package/dist/charts/chartTheme.d.ts +3 -0
- package/dist/charts/chartTheme.js +254 -0
- package/dist/charts/chartTheme.js.map +1 -0
- package/dist/charts/index.d.ts +1 -0
- package/dist/charts/index.js +33 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Badge.js +2 -39
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Banner.d.ts +3 -0
- package/dist/components/Banner.js +476 -0
- package/dist/components/Banner.js.map +1 -0
- package/dist/components/Breadcrumb.js +269 -2
- package/dist/components/Breadcrumb.js.map +1 -1
- package/dist/components/Button.js +132 -105
- package/dist/components/Button.js.map +1 -1
- package/dist/components/ButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup.js +5 -0
- package/dist/components/ButtonGroup.js.map +1 -0
- package/dist/components/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox.js +5 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/CloudinaryImage.d.ts +3 -0
- package/dist/components/CloudinaryImage.js +175 -0
- package/dist/components/CloudinaryImage.js.map +1 -0
- package/dist/components/Loading.js +1 -1
- package/dist/components/LoadingDots.js +3 -3
- package/dist/components/LoadingDots.js.map +1 -1
- package/dist/components/LottieAnimation.d.ts +3 -0
- package/dist/components/LottieAnimation.js +5 -0
- package/dist/components/LottieAnimation.js.map +1 -0
- package/dist/components/Menu.d.ts +3 -0
- package/dist/components/Menu.js +5 -0
- package/dist/components/Menu.js.map +1 -0
- package/dist/components/Modal.js +1 -1
- package/dist/components/NavLink.js +1 -1
- package/dist/components/ProgressBar.js +1 -1
- package/dist/components/RadialProgressBar.js +1 -1
- package/dist/components/Table.js +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.js +33 -0
- package/dist/composables/index.js.map +1 -0
- package/dist/composables/useCalendar.d.ts +3 -0
- package/dist/composables/useCalendar.js +32 -0
- package/dist/composables/useCalendar.js.map +1 -0
- package/dist/composables/useFormValidation.d.ts +3 -0
- package/dist/composables/useFormValidation.js +110 -0
- package/dist/composables/useFormValidation.js.map +1 -0
- package/dist/composables/useMap.d.ts +3 -0
- package/dist/composables/useMap.js +10 -0
- package/dist/composables/useMap.js.map +1 -0
- package/dist/composables/useModal.d.ts +3 -0
- package/dist/composables/useModal.js +75 -0
- package/dist/composables/useModal.js.map +1 -0
- package/dist/composables/useNotifications.d.ts +3 -0
- package/dist/composables/useNotifications.js +77 -0
- package/dist/composables/useNotifications.js.map +1 -0
- package/dist/composables/useTabs.d.ts +1 -0
- package/dist/composables/useTabs.js +259 -0
- package/dist/composables/useTabs.js.map +1 -0
- package/dist/composables/useTheme.d.ts +3 -0
- package/dist/composables/useTheme.js +119 -0
- package/dist/composables/useTheme.js.map +1 -0
- package/dist/{description-CBd3BJ9O.js → description-C7cRw0tq.js} +2 -2
- package/dist/{description-CBd3BJ9O.js.map → description-C7cRw0tq.js.map} +1 -1
- package/dist/{dialog-U1KNiPzc.js → dialog-B2WA4G25.js} +141 -135
- package/dist/dialog-B2WA4G25.js.map +1 -0
- package/dist/empty-state/ComingSoon.d.ts +3 -0
- package/dist/empty-state/ComingSoon.js +5 -0
- package/dist/empty-state/ComingSoon.js.map +1 -0
- package/dist/empty-state/EmptyState.d.ts +3 -0
- package/dist/empty-state/EmptyState.js +5 -0
- package/dist/empty-state/EmptyState.js.map +1 -0
- package/dist/empty-state/index.d.ts +1 -0
- package/dist/empty-state/index.js +7 -0
- package/dist/empty-state/index.js.map +1 -0
- package/dist/env-BZfPsfnF.js +29 -0
- package/dist/env-BZfPsfnF.js.map +1 -0
- package/dist/form-f8yP4kN-.js +35 -0
- package/dist/form-f8yP4kN-.js.map +1 -0
- package/dist/forms/DynamicForm.js +1 -1
- package/dist/forms/DynamicFormField.js +1 -1
- package/dist/forms/FormFieldWrapper.js +72 -92
- package/dist/forms/FormFieldWrapper.js.map +1 -1
- package/dist/hidden-BSRluD1y.js +15 -0
- package/dist/hidden-BSRluD1y.js.map +1 -0
- package/dist/index-Dca39bYA.js +2167 -0
- package/dist/index-Dca39bYA.js.map +1 -0
- package/dist/index.js +1257 -274
- package/dist/index.js.map +1 -1
- package/dist/inputs/AddDeleteButtonGroup.d.ts +3 -0
- package/dist/inputs/AddDeleteButtonGroup.js +5 -0
- package/dist/inputs/AddDeleteButtonGroup.js.map +1 -0
- package/dist/inputs/CheckboxInput.js +1 -1
- package/dist/inputs/ComboboxInput.js +1 -1
- package/dist/inputs/DatepickerInput.d.ts +3 -0
- package/dist/inputs/DatepickerInput.js +5 -0
- package/dist/inputs/DatepickerInput.js.map +1 -0
- package/dist/inputs/EmailInput.d.ts +3 -0
- package/dist/inputs/EmailInput.js +5 -0
- package/dist/inputs/EmailInput.js.map +1 -0
- package/dist/inputs/EmptyInput.d.ts +3 -0
- package/dist/inputs/EmptyInput.js +5 -0
- package/dist/inputs/EmptyInput.js.map +1 -0
- package/dist/inputs/FileDropzoneInput.d.ts +3 -0
- package/dist/inputs/FileDropzoneInput.js +5 -0
- package/dist/inputs/FileDropzoneInput.js.map +1 -0
- package/dist/inputs/HiddenInput.d.ts +3 -0
- package/dist/inputs/HiddenInput.js +5 -0
- package/dist/inputs/HiddenInput.js.map +1 -0
- package/dist/inputs/PhoneInput.d.ts +3 -0
- package/dist/inputs/PhoneInput.js +3783 -0
- package/dist/inputs/PhoneInput.js.map +1 -0
- package/dist/inputs/RichTextInput.d.ts +3 -0
- package/dist/inputs/RichTextInput.js +17492 -0
- package/dist/inputs/RichTextInput.js.map +1 -0
- package/dist/inputs/SelectInput.js +1 -1
- package/dist/inputs/SelectTextInput.d.ts +3 -0
- package/dist/inputs/SelectTextInput.js +5 -0
- package/dist/inputs/SelectTextInput.js.map +1 -0
- package/dist/inputs/SwitchInput.js +1 -1
- package/dist/inputs/SwitchInputGroup.d.ts +3 -0
- package/dist/inputs/SwitchInputGroup.js +5 -0
- package/dist/inputs/SwitchInputGroup.js.map +1 -0
- package/dist/inputs/TagifyInput.js +1 -1
- package/dist/inputs/TextAreaInput.js +1 -1
- package/dist/inputs/TextInput.d.ts +3 -0
- package/dist/{components → inputs}/TextInput.js +17 -17
- package/dist/inputs/TextInput.js.map +1 -0
- package/dist/keyboard-Dd_2-cFu.js +5 -0
- package/dist/keyboard-Dd_2-cFu.js.map +1 -0
- package/dist/layouts/DashboardLayout.js +1 -1
- package/dist/layouts/ProfileHeaderAvatar.d.ts +3 -0
- package/dist/layouts/ProfileHeaderAvatar.js +5 -0
- package/dist/layouts/ProfileHeaderAvatar.js.map +1 -0
- package/dist/layouts/ProjectLogo.d.ts +3 -0
- package/dist/layouts/ProjectLogo.js +5 -0
- package/dist/layouts/ProjectLogo.js.map +1 -0
- package/dist/layouts/SidebarLayout.js +1 -1
- package/dist/listbox-p2_4hUSD.js +257 -0
- package/dist/listbox-p2_4hUSD.js.map +1 -0
- package/dist/loading/ContentSkeleton.d.ts +3 -0
- package/dist/loading/ContentSkeleton.js +96 -0
- package/dist/loading/ContentSkeleton.js.map +1 -0
- package/dist/loading/SmartLoadingIndicator.d.ts +3 -0
- package/dist/loading/SmartLoadingIndicator.js +230 -0
- package/dist/loading/SmartLoadingIndicator.js.map +1 -0
- package/dist/loading/index.d.ts +1 -0
- package/dist/loading/index.js +7 -0
- package/dist/loading/index.js.map +1 -0
- package/dist/mapThemes-DFE9fZm3.js +675 -0
- package/dist/mapThemes-DFE9fZm3.js.map +1 -0
- package/dist/maps/GoogleMap.d.ts +3 -0
- package/dist/maps/GoogleMap.js +170 -0
- package/dist/maps/GoogleMap.js.map +1 -0
- package/dist/maps/UiInfoWindow.d.ts +3 -0
- package/dist/maps/UiInfoWindow.js +286 -0
- package/dist/maps/UiInfoWindow.js.map +1 -0
- package/dist/maps/UiMap.d.ts +3 -0
- package/dist/maps/UiMap.js +591 -0
- package/dist/maps/UiMap.js.map +1 -0
- package/dist/maps/UiMapAll.d.ts +3 -0
- package/dist/maps/UiMapAll.js +5 -0
- package/dist/maps/UiMapAll.js.map +1 -0
- package/dist/maps/UiMapMarker.d.ts +3 -0
- package/dist/maps/UiMapMarker.js +237 -0
- package/dist/maps/UiMapMarker.js.map +1 -0
- package/dist/maps/index.d.ts +1 -0
- package/dist/maps/index.js +13 -0
- package/dist/maps/index.js.map +1 -0
- package/dist/micro-task-D-oTY33s.js +9 -0
- package/dist/micro-task-D-oTY33s.js.map +1 -0
- package/dist/modals/AlertModal.d.ts +3 -0
- package/dist/modals/AlertModal.js +5 -0
- package/dist/modals/AlertModal.js.map +1 -0
- package/dist/modals/BaseModal.d.ts +3 -0
- package/dist/modals/BaseModal.js +5 -0
- package/dist/modals/BaseModal.js.map +1 -0
- package/dist/modals/ImageCropperModal.d.ts +3 -0
- package/dist/modals/ImageCropperModal.js +1804 -0
- package/dist/modals/ImageCropperModal.js.map +1 -0
- package/dist/notifications/NotificationContainer.d.ts +3 -0
- package/dist/notifications/NotificationContainer.js +25 -0
- package/dist/notifications/NotificationContainer.js.map +1 -0
- package/dist/notifications/NotificationToast.d.ts +3 -0
- package/dist/notifications/NotificationToast.js +5 -0
- package/dist/notifications/NotificationToast.js.map +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +7 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/open-closed-JTEvYTg2.js +19 -0
- package/dist/open-closed-JTEvYTg2.js.map +1 -0
- package/dist/render-QUUPyNjX.js +101 -0
- package/dist/render-QUUPyNjX.js.map +1 -0
- package/dist/src/components/CloudinaryImage.d.ts +144 -0
- package/dist/src/components/CloudinaryImage.d.ts.map +1 -0
- package/dist/src/components/LottieAnimation.d.ts +65 -0
- package/dist/src/components/LottieAnimation.d.ts.map +1 -0
- package/dist/src/components/ThemeDebugModal.d.ts +20 -0
- package/dist/src/components/ThemeDebugModal.d.ts.map +1 -0
- package/dist/src/components/UiAvatar.d.ts.map +1 -1
- package/dist/src/components/UiBadge.d.ts +22 -12
- package/dist/src/components/UiBadge.d.ts.map +1 -1
- package/dist/src/components/UiBanner.d.ts +166 -0
- package/dist/src/components/UiBanner.d.ts.map +1 -0
- package/dist/src/components/UiBreadcrumb.d.ts +240 -1
- package/dist/src/components/UiBreadcrumb.d.ts.map +1 -1
- package/dist/src/components/UiButton.d.ts +5 -4
- package/dist/src/components/UiButton.d.ts.map +1 -1
- package/dist/src/components/UiButtonGroup.d.ts +78 -0
- package/dist/src/components/UiButtonGroup.d.ts.map +1 -0
- package/dist/src/components/UiCheckbox.d.ts +55 -0
- package/dist/src/components/UiCheckbox.d.ts.map +1 -0
- package/dist/src/components/UiLoading.d.ts +2 -2
- package/dist/src/components/UiLoading.d.ts.map +1 -1
- package/dist/src/components/UiMenu.d.ts +67 -0
- package/dist/src/components/UiMenu.d.ts.map +1 -0
- package/dist/src/components/UiModal.d.ts +1 -1
- package/dist/src/components/UiModal.d.ts.map +1 -1
- package/dist/src/components/UiNavLink.d.ts +1 -1
- package/dist/src/components/UiProgressBar.d.ts +43 -31
- package/dist/src/components/UiProgressBar.d.ts.map +1 -1
- package/dist/src/components/UiRadialProgressBar.d.ts +46 -39
- package/dist/src/components/UiRadialProgressBar.d.ts.map +1 -1
- package/dist/src/components/UiTable.d.ts.map +1 -1
- package/dist/src/components/UiTransition.d.ts +1 -1
- package/dist/src/components/calendars/CalendarHeader.d.ts +66 -19
- package/dist/src/components/calendars/CalendarHeader.d.ts.map +1 -1
- package/dist/src/components/calendars/DayCalendar.d.ts +11 -4
- package/dist/src/components/calendars/DayCalendar.d.ts.map +1 -1
- package/dist/src/components/calendars/MonthCalendar.d.ts +33 -22
- package/dist/src/components/calendars/MonthCalendar.d.ts.map +1 -1
- package/dist/src/components/calendars/WeekCalendar.d.ts.map +1 -1
- package/dist/src/components/calendars/YearCalendar.d.ts +41 -6
- package/dist/src/components/calendars/YearCalendar.d.ts.map +1 -1
- package/dist/src/components/charts/BarChart.d.ts +64 -0
- package/dist/src/components/charts/BarChart.d.ts.map +1 -0
- package/dist/src/components/charts/BaseChart.d.ts +81 -0
- package/dist/src/components/charts/BaseChart.d.ts.map +1 -0
- package/dist/src/components/charts/FunnelChart.d.ts +55 -0
- package/dist/src/components/charts/FunnelChart.d.ts.map +1 -0
- package/dist/src/components/charts/LineChart.d.ts +60 -0
- package/dist/src/components/charts/LineChart.d.ts.map +1 -0
- package/dist/src/components/charts/PieChart.d.ts +59 -0
- package/dist/src/components/charts/PieChart.d.ts.map +1 -0
- package/dist/src/components/charts/SparklineChart.d.ts +46 -0
- package/dist/src/components/charts/SparklineChart.d.ts.map +1 -0
- package/dist/src/components/charts/StatCard.d.ts +37 -0
- package/dist/src/components/charts/StatCard.d.ts.map +1 -0
- package/dist/src/components/charts/chartTheme.d.ts +166 -0
- package/dist/src/components/charts/chartTheme.d.ts.map +1 -0
- package/dist/src/components/charts/index.d.ts +9 -0
- package/dist/src/components/charts/index.d.ts.map +1 -0
- package/dist/src/components/empty-state/ComingSoon.d.ts +50 -0
- package/dist/src/components/empty-state/ComingSoon.d.ts.map +1 -0
- package/dist/src/components/empty-state/EmptyState.d.ts +49 -0
- package/dist/src/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/src/components/empty-state/index.d.ts +3 -0
- package/dist/src/components/empty-state/index.d.ts.map +1 -0
- package/dist/src/components/forms/DynamicForm.d.ts +29 -2
- package/dist/src/components/forms/DynamicForm.d.ts.map +1 -1
- package/dist/src/components/forms/DynamicFormField.d.ts.map +1 -1
- package/dist/src/components/forms/FormFieldWrapper.d.ts +2 -2
- package/dist/src/components/forms/FormFieldWrapper.d.ts.map +1 -1
- package/dist/src/components/index.d.ts +16 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/inputs/AddDeleteButtonGroup.d.ts +49 -0
- package/dist/src/components/inputs/AddDeleteButtonGroup.d.ts.map +1 -0
- package/dist/src/components/inputs/CheckboxInput.d.ts +1 -1
- package/dist/src/components/inputs/CheckboxInput.d.ts.map +1 -1
- package/dist/src/components/inputs/ComboboxInput.d.ts.map +1 -1
- package/dist/src/components/inputs/DatepickerInput.d.ts +852 -0
- package/dist/src/components/inputs/DatepickerInput.d.ts.map +1 -0
- package/dist/src/components/inputs/EmailInput.d.ts +99 -0
- package/dist/src/components/inputs/EmailInput.d.ts.map +1 -0
- package/dist/src/components/inputs/EmptyInput.d.ts +36 -0
- package/dist/src/components/inputs/EmptyInput.d.ts.map +1 -0
- package/dist/src/components/inputs/FileDropzoneInput.d.ts +91 -0
- package/dist/src/components/inputs/FileDropzoneInput.d.ts.map +1 -0
- package/dist/src/components/inputs/HiddenInput.d.ts +30 -0
- package/dist/src/components/inputs/HiddenInput.d.ts.map +1 -0
- package/dist/src/components/inputs/PhoneInput.d.ts +211 -0
- package/dist/src/components/inputs/PhoneInput.d.ts.map +1 -0
- package/dist/src/components/inputs/RichTextInput.d.ts +102 -0
- package/dist/src/components/inputs/RichTextInput.d.ts.map +1 -0
- package/dist/src/components/inputs/SelectInput.d.ts.map +1 -1
- package/dist/src/components/inputs/SelectTextInput.d.ts +222 -0
- package/dist/src/components/inputs/SelectTextInput.d.ts.map +1 -0
- package/dist/src/components/inputs/SwitchInput.d.ts +1 -1
- package/dist/src/components/inputs/SwitchInput.d.ts.map +1 -1
- package/dist/src/components/inputs/SwitchInputGroup.d.ts +93 -0
- package/dist/src/components/inputs/SwitchInputGroup.d.ts.map +1 -0
- package/dist/src/components/inputs/TagifyInput.d.ts +6 -6
- package/dist/src/components/inputs/TextAreaInput.d.ts.map +1 -1
- package/dist/src/components/{UiTextInput.d.ts → inputs/TextInput.d.ts} +7 -7
- package/dist/src/components/inputs/TextInput.d.ts.map +1 -0
- package/dist/src/components/inputs/index.d.ts +11 -0
- package/dist/src/components/inputs/index.d.ts.map +1 -1
- package/dist/src/components/layouts/CardLayout.d.ts +144 -0
- package/dist/src/components/layouts/CardLayout.d.ts.map +1 -0
- package/dist/src/components/layouts/DashboardLayout.d.ts.map +1 -1
- package/dist/src/components/layouts/InfoCard.d.ts +43 -0
- package/dist/src/components/layouts/InfoCard.d.ts.map +1 -0
- package/dist/src/components/layouts/ProfileHeaderAvatar.d.ts +85 -0
- package/dist/src/components/layouts/ProfileHeaderAvatar.d.ts.map +1 -0
- package/dist/src/components/layouts/ProjectLogo.d.ts +67 -0
- package/dist/src/components/layouts/ProjectLogo.d.ts.map +1 -0
- package/dist/src/components/layouts/PropsTable.d.ts +38 -0
- package/dist/src/components/layouts/PropsTable.d.ts.map +1 -0
- package/dist/src/components/layouts/ShowcaseCard.d.ts +53 -0
- package/dist/src/components/layouts/ShowcaseCard.d.ts.map +1 -0
- package/dist/src/components/layouts/ShowcaseLayout.d.ts +58 -0
- package/dist/src/components/layouts/ShowcaseLayout.d.ts.map +1 -0
- package/dist/src/components/layouts/SidebarLayout.d.ts.map +1 -1
- package/dist/src/components/layouts/StateDisplay.d.ts +32 -0
- package/dist/src/components/layouts/StateDisplay.d.ts.map +1 -0
- package/dist/src/components/layouts/index.d.ts +8 -0
- package/dist/src/components/layouts/index.d.ts.map +1 -1
- package/dist/src/components/loading/ContentSkeleton.d.ts +53 -0
- package/dist/src/components/loading/ContentSkeleton.d.ts.map +1 -0
- package/dist/src/components/loading/SmartLoadingIndicator.d.ts +88 -0
- package/dist/src/components/loading/SmartLoadingIndicator.d.ts.map +1 -0
- package/dist/src/components/loading/index.d.ts +3 -0
- package/dist/src/components/loading/index.d.ts.map +1 -0
- package/dist/src/components/maps/GoogleMap.d.ts +224 -0
- package/dist/src/components/maps/GoogleMap.d.ts.map +1 -0
- package/dist/src/components/maps/UiInfoWindow.d.ts +223 -0
- package/dist/src/components/maps/UiInfoWindow.d.ts.map +1 -0
- package/dist/src/components/maps/UiMap.d.ts +609 -0
- package/dist/src/components/maps/UiMap.d.ts.map +1 -0
- package/dist/src/components/maps/UiMapAll.d.ts +676 -0
- package/dist/src/components/maps/UiMapAll.d.ts.map +1 -0
- package/dist/src/components/maps/UiMapMarker.d.ts +223 -0
- package/dist/src/components/maps/UiMapMarker.d.ts.map +1 -0
- package/dist/src/components/maps/index.d.ts +6 -0
- package/dist/src/components/maps/index.d.ts.map +1 -0
- package/dist/src/components/modals/AlertModal.d.ts +156 -0
- package/dist/src/components/modals/AlertModal.d.ts.map +1 -0
- package/dist/src/components/modals/BaseModal.d.ts +127 -0
- package/dist/src/components/modals/BaseModal.d.ts.map +1 -0
- package/dist/src/components/modals/ImageCropperModal.d.ts +99 -0
- package/dist/src/components/modals/ImageCropperModal.d.ts.map +1 -0
- package/dist/src/components/modals/index.d.ts +4 -0
- package/dist/src/components/modals/index.d.ts.map +1 -0
- package/dist/src/components/notifications/NotificationContainer.d.ts +3 -0
- package/dist/src/components/notifications/NotificationContainer.d.ts.map +1 -0
- package/dist/src/components/notifications/NotificationToast.d.ts +22 -0
- package/dist/src/components/notifications/NotificationToast.d.ts.map +1 -0
- package/dist/src/components/notifications/index.d.ts +3 -0
- package/dist/src/components/notifications/index.d.ts.map +1 -0
- package/dist/src/components/stepper/StepperPanels.d.ts +22 -0
- package/dist/src/components/stepper/StepperPanels.d.ts.map +1 -0
- package/dist/src/components/stepper/index.d.ts +2 -0
- package/dist/src/components/stepper/index.d.ts.map +1 -0
- package/dist/src/components/tabs/InlineTabs.d.ts +48 -0
- package/dist/src/components/tabs/InlineTabs.d.ts.map +1 -0
- package/dist/src/components/tabs/TabGroup.d.ts +55 -0
- package/dist/src/components/tabs/TabGroup.d.ts.map +1 -0
- package/dist/src/components/tabs/TabGroupUnderline.d.ts +56 -0
- package/dist/src/components/tabs/TabGroupUnderline.d.ts.map +1 -0
- package/dist/src/components/tabs/TabsInPills.d.ts +44 -0
- package/dist/src/components/tabs/TabsInPills.d.ts.map +1 -0
- package/dist/src/components/tabs/index.d.ts +5 -0
- package/dist/src/components/tabs/index.d.ts.map +1 -0
- package/dist/src/components/wrappers/BackgroundGradientWrapper.d.ts +64 -0
- package/dist/src/components/wrappers/BackgroundGradientWrapper.d.ts.map +1 -0
- package/dist/src/components/wrappers/CardWrapper.d.ts +10 -0
- package/dist/src/components/wrappers/CardWrapper.d.ts.map +1 -0
- package/dist/src/components/wrappers/DisclosureWrapper.d.ts +37 -0
- package/dist/src/components/wrappers/DisclosureWrapper.d.ts.map +1 -0
- package/dist/src/components/wrappers/FormErrorWrapper.d.ts +40 -0
- package/dist/src/components/{UiTextInput.d.ts.map → wrappers/FormErrorWrapper.d.ts.map} +1 -1
- package/dist/src/components/wrappers/index.d.ts +5 -0
- package/dist/src/components/wrappers/index.d.ts.map +1 -0
- package/dist/src/composables/index.d.ts +7 -0
- package/dist/src/composables/index.d.ts.map +1 -1
- package/dist/src/composables/useCalendar.d.ts +76 -20
- package/dist/src/composables/useCalendar.d.ts.map +1 -1
- package/dist/src/composables/useEventSegments.d.ts +74 -0
- package/dist/src/composables/useEventSegments.d.ts.map +1 -0
- package/dist/src/composables/useFormValidation.d.ts +47 -0
- package/dist/src/composables/useFormValidation.d.ts.map +1 -1
- package/dist/src/composables/useMap.d.ts +93 -0
- package/dist/src/composables/useMap.d.ts.map +1 -0
- package/dist/src/composables/useModal.d.ts +42 -2
- package/dist/src/composables/useModal.d.ts.map +1 -1
- package/dist/src/composables/useNotifications.d.ts +142 -0
- package/dist/src/composables/useNotifications.d.ts.map +1 -0
- package/dist/src/composables/useSimpleTabs.d.ts +45 -0
- package/dist/src/composables/useSimpleTabs.d.ts.map +1 -0
- package/dist/src/composables/useStringTransform.d.ts +107 -0
- package/dist/src/composables/useStringTransform.d.ts.map +1 -0
- package/dist/src/composables/useTabs.d.ts +48 -0
- package/dist/src/composables/useTabs.d.ts.map +1 -0
- package/dist/src/composables/useTheme.d.ts +37 -0
- package/dist/src/composables/useTheme.d.ts.map +1 -0
- package/dist/src/dev.d.ts +3 -0
- package/dist/src/dev.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/plugin/configure.d.ts +110 -0
- package/dist/src/plugin/configure.d.ts.map +1 -1
- package/dist/src/types/calendars.d.ts +74 -0
- package/dist/src/types/calendars.d.ts.map +1 -1
- package/dist/src/types/core.d.ts +679 -0
- package/dist/src/types/core.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/inputs.d.ts +147 -0
- package/dist/src/types/inputs.d.ts.map +1 -1
- package/dist/src/types/layouts.d.ts +25 -0
- package/dist/src/types/layouts.d.ts.map +1 -1
- package/dist/src/types/maps.d.ts +432 -0
- package/dist/src/types/maps.d.ts.map +1 -0
- package/dist/src/types/tabs.d.ts +75 -0
- package/dist/src/types/tabs.d.ts.map +1 -0
- package/dist/src/types/ui.d.ts +2 -3
- package/dist/src/types/ui.d.ts.map +1 -1
- package/dist/src/utils/calendar.d.ts +97 -5
- package/dist/src/utils/calendar.d.ts.map +1 -1
- package/dist/src/utils/countryCodes.d.ts +27 -0
- package/dist/src/utils/countryCodes.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/mapThemes.d.ts +90 -0
- package/dist/src/utils/mapThemes.d.ts.map +1 -0
- package/dist/src/utils/phone.d.ts +73 -0
- package/dist/src/utils/phone.d.ts.map +1 -0
- package/dist/src/utils/transitions.d.ts +55 -0
- package/dist/src/utils/transitions.d.ts.map +1 -0
- package/dist/src/views/components/index.d.ts +15 -0
- package/dist/src/views/components/index.d.ts.map +1 -0
- package/dist/src/views/examples/index.d.ts +5 -0
- package/dist/src/views/examples/index.d.ts.map +1 -0
- package/dist/src/views/forms/index.d.ts +3 -0
- package/dist/src/views/forms/index.d.ts.map +1 -0
- package/dist/src/views/index.d.ts +23 -0
- package/dist/src/views/index.d.ts.map +1 -0
- package/dist/src/views/inputs/index.d.ts +13 -0
- package/dist/src/views/inputs/index.d.ts.map +1 -0
- package/dist/src/views/layouts/index.d.ts +5 -0
- package/dist/src/views/layouts/index.d.ts.map +1 -0
- package/dist/stepper/StepperPanels.d.ts +3 -0
- package/dist/stepper/StepperPanels.js +5 -0
- package/dist/stepper/StepperPanels.js.map +1 -0
- package/dist/stepper/index.d.ts +1 -0
- package/dist/stepper/index.js +5 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tabs/InlineTabs.d.ts +3 -0
- package/dist/tabs/InlineTabs.js +5 -0
- package/dist/tabs/InlineTabs.js.map +1 -0
- package/dist/tabs/TabGroup.d.ts +3 -0
- package/dist/tabs/TabGroup.js +5 -0
- package/dist/tabs/TabGroup.js.map +1 -0
- package/dist/tabs/TabGroupUnderline.d.ts +3 -0
- package/dist/tabs/TabGroupUnderline.js +5 -0
- package/dist/tabs/TabGroupUnderline.js.map +1 -0
- package/dist/tabs/TabsInPills.d.ts +3 -0
- package/dist/tabs/TabsInPills.js +5 -0
- package/dist/tabs/TabsInPills.js.map +1 -0
- package/dist/tabs/index.d.ts +1 -0
- package/dist/tabs/index.js +11 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs-Da32Mbhf.js +202 -0
- package/dist/tabs-Da32Mbhf.js.map +1 -0
- package/dist/transition-_rPfnoET.js +191 -0
- package/dist/transition-_rPfnoET.js.map +1 -0
- package/dist/use-outside-click-DNDV36Sc.js +151 -0
- package/dist/use-outside-click-DNDV36Sc.js.map +1 -0
- package/dist/use-resolve-button-type-h6n-lm9q.js +20 -0
- package/dist/use-resolve-button-type-h6n-lm9q.js.map +1 -0
- package/dist/use-text-value-DKnkjK00.js +44 -0
- package/dist/use-text-value-DKnkjK00.js.map +1 -0
- package/dist/use-tree-walker-BHCORE7u.js +16 -0
- package/dist/use-tree-walker-BHCORE7u.js.map +1 -0
- package/dist/useEventSegments-B-r_8zCW.js +97 -0
- package/dist/useEventSegments-B-r_8zCW.js.map +1 -0
- package/dist/useMap-BaZEIoWM.js +525 -0
- package/dist/useMap-BaZEIoWM.js.map +1 -0
- package/dist/useSimpleTabs-CSgkChEU.js +103 -0
- package/dist/useSimpleTabs-CSgkChEU.js.map +1 -0
- package/dist/useStringTransform-CSr7nZWg.js +140 -0
- package/dist/useStringTransform-CSr7nZWg.js.map +1 -0
- package/dist/vue-datepicker-CEn0-fJj.js +4871 -0
- package/dist/vue-datepicker-CEn0-fJj.js.map +1 -0
- package/dist/vue-router-BPbyZ7xA.js +145 -0
- package/dist/vue-router-BPbyZ7xA.js.map +1 -0
- package/dist/vue3-lottie.es-C_MDkNwR.js +7976 -0
- package/dist/vue3-lottie.es-C_MDkNwR.js.map +1 -0
- package/dist/wrappers/BackgroundGradientWrapper.d.ts +3 -0
- package/dist/wrappers/BackgroundGradientWrapper.js +5 -0
- package/dist/wrappers/BackgroundGradientWrapper.js.map +1 -0
- package/dist/wrappers/CardWrapper.d.ts +3 -0
- package/dist/wrappers/CardWrapper.js +5 -0
- package/dist/wrappers/CardWrapper.js.map +1 -0
- package/dist/wrappers/DisclosureWrapper.d.ts +3 -0
- package/dist/wrappers/DisclosureWrapper.js +5 -0
- package/dist/wrappers/DisclosureWrapper.js.map +1 -0
- package/dist/wrappers/FormErrorWrapper.d.ts +3 -0
- package/dist/wrappers/FormErrorWrapper.js +5 -0
- package/dist/wrappers/FormErrorWrapper.js.map +1 -0
- package/dist/wrappers/index.d.ts +1 -0
- package/dist/wrappers/index.js +11 -0
- package/dist/wrappers/index.js.map +1 -0
- package/package.json +38 -6
- package/scripts/build-css.cjs +1 -1
- package/scripts/generate-config.cjs +1 -0
- package/scripts/generateRecursiveIndex.cjs +4 -1
- package/tailwind.config.js +1 -1
- package/dist/CalendarHeader.vue_vue_type_script_setup_true_lang-Cirr0hMB.js +0 -70
- package/dist/CalendarHeader.vue_vue_type_script_setup_true_lang-Cirr0hMB.js.map +0 -1
- package/dist/CheckboxInput.vue_vue_type_script_setup_true_lang-tYAo46wK.js.map +0 -1
- package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-LE2kDHpU.js +0 -1300
- package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-LE2kDHpU.js.map +0 -1
- package/dist/DashboardLayout.vue_vue_type_script_setup_true_lang-Cg83utkU.js.map +0 -1
- package/dist/DayCalendar.vue_vue_type_script_setup_true_lang-xE5bCa3O.js +0 -123
- package/dist/DayCalendar.vue_vue_type_script_setup_true_lang-xE5bCa3O.js.map +0 -1
- package/dist/DynamicForm.vue_vue_type_script_setup_true_lang-BpfPAZiT.js +0 -217
- package/dist/DynamicForm.vue_vue_type_script_setup_true_lang-BpfPAZiT.js.map +0 -1
- package/dist/DynamicFormField.vue_vue_type_script_setup_true_lang-DvT03FIS.js.map +0 -1
- package/dist/EventCard.vue_vue_type_script_setup_true_lang-YV1lfgUY.js.map +0 -1
- package/dist/MonthCalendar.vue_vue_type_script_setup_true_lang-B9Bs0z8j.js +0 -66
- package/dist/MonthCalendar.vue_vue_type_script_setup_true_lang-B9Bs0z8j.js.map +0 -1
- package/dist/SelectInput.vue_vue_type_script_setup_true_lang-BPjHLHdM.js +0 -522
- package/dist/SelectInput.vue_vue_type_script_setup_true_lang-BPjHLHdM.js.map +0 -1
- package/dist/SidebarLayout.vue_vue_type_script_setup_true_lang-CzLbBcNS.js.map +0 -1
- package/dist/SwitchInput.vue_vue_type_script_setup_true_lang-BFr2SByh.js.map +0 -1
- package/dist/TagifyInput.vue_vue_type_script_setup_true_lang-DRR6jt_8.js.map +0 -1
- package/dist/TextAreaInput.vue_vue_type_script_setup_true_lang-CbR651TU.js.map +0 -1
- package/dist/UiAvatar.vue_vue_type_script_setup_true_lang-CDNjUA1L.js.map +0 -1
- package/dist/UiBreadcrumb.vue_vue_type_script_setup_true_lang-quGuN9v4.js +0 -82
- package/dist/UiBreadcrumb.vue_vue_type_script_setup_true_lang-quGuN9v4.js.map +0 -1
- package/dist/UiLoading.vue_vue_type_script_setup_true_lang-KbLKA4SA.js.map +0 -1
- package/dist/UiModal.vue_vue_type_script_setup_true_lang-SAo39zpS.js +0 -163
- package/dist/UiModal.vue_vue_type_script_setup_true_lang-SAo39zpS.js.map +0 -1
- package/dist/UiNavLink.vue_vue_type_script_setup_true_lang-Bz5oiCCk.js +0 -222
- package/dist/UiNavLink.vue_vue_type_script_setup_true_lang-Bz5oiCCk.js.map +0 -1
- package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-D4-B3A7K.js +0 -51
- package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-D4-B3A7K.js.map +0 -1
- package/dist/UiTable.vue_vue_type_script_setup_true_lang-hI1_xamh.js.map +0 -1
- package/dist/WeekCalendar.vue_vue_type_script_setup_true_lang-DAFQiRI9.js +0 -154
- package/dist/WeekCalendar.vue_vue_type_script_setup_true_lang-DAFQiRI9.js.map +0 -1
- package/dist/XMarkIcon-C4wILUsz.js.map +0 -1
- package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-BfJkvmpN.js +0 -29
- package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-BfJkvmpN.js.map +0 -1
- package/dist/calculate-active-index-CksdUwZY.js +0 -87
- package/dist/calculate-active-index-CksdUwZY.js.map +0 -1
- package/dist/calendar-905Ofszh.js +0 -77
- package/dist/calendar-905Ofszh.js.map +0 -1
- package/dist/components/TextInput.d.ts +0 -3
- package/dist/components/TextInput.js.map +0 -1
- package/dist/dialog-U1KNiPzc.js.map +0 -1
- package/dist/form-DQKuKVqJ.js +0 -51
- package/dist/form-DQKuKVqJ.js.map +0 -1
- package/dist/keyboard-DJD8TwH4.js +0 -113
- package/dist/keyboard-DJD8TwH4.js.map +0 -1
- package/dist/open-closed-DgcU-HDT.js +0 -179
- package/dist/open-closed-DgcU-HDT.js.map +0 -1
- package/dist/transition-CuxxW9dY.js +0 -209
- package/dist/transition-CuxxW9dY.js.map +0 -1
|
@@ -0,0 +1,1804 @@
|
|
|
1
|
+
import { createElementBlock as Z, openBlock as y, createElementVNode as z, createBlock as x, renderSlot as q, resolveComponent as D, createVNode as f, withCtx as A, Fragment as $t, renderList as Pt, resolveDynamicComponent as lt, withDirectives as te, vShow as ee, mergeProps as ie, createCommentVNode as Bt, withModifiers as ye, defineComponent as ze, shallowRef as xe, ref as It, computed as ft, unref as S, createTextVNode as pt, toDisplayString as _t } from "vue";
|
|
2
|
+
import Yt from "../components/Button.js";
|
|
3
|
+
import { r as Re } from "../XMarkIcon-Cwy3T6p8.js";
|
|
4
|
+
import { a as Ae, r as Me } from "../PlusIcon-aDFVlB90.js";
|
|
5
|
+
import { S as Se, h as Xt } from "../transition-_rPfnoET.js";
|
|
6
|
+
import { Y as Ce, G as Ee, V as Te } from "../dialog-B2WA4G25.js";
|
|
7
|
+
import { _ as We } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
function ke(t, e) {
|
|
9
|
+
return y(), Z("svg", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
fill: "none",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
"stroke-width": "1.5",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
"data-slot": "icon"
|
|
17
|
+
}, [
|
|
18
|
+
z("path", {
|
|
19
|
+
"stroke-linecap": "round",
|
|
20
|
+
"stroke-linejoin": "round",
|
|
21
|
+
d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
|
|
22
|
+
})
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
function Oe(t, e) {
|
|
26
|
+
return y(), Z("svg", {
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
fill: "none",
|
|
29
|
+
viewBox: "0 0 24 24",
|
|
30
|
+
"stroke-width": "1.5",
|
|
31
|
+
stroke: "currentColor",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
"data-slot": "icon"
|
|
34
|
+
}, [
|
|
35
|
+
z("path", {
|
|
36
|
+
"stroke-linecap": "round",
|
|
37
|
+
"stroke-linejoin": "round",
|
|
38
|
+
d: "M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"
|
|
39
|
+
})
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
function je(t, e) {
|
|
43
|
+
return y(), Z("svg", {
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
fill: "none",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
"stroke-width": "1.5",
|
|
48
|
+
stroke: "currentColor",
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
"data-slot": "icon"
|
|
51
|
+
}, [
|
|
52
|
+
z("path", {
|
|
53
|
+
"stroke-linecap": "round",
|
|
54
|
+
"stroke-linejoin": "round",
|
|
55
|
+
d: "m15 15 6-6m0 0-6-6m6 6H9a6 6 0 0 0 0 12h3"
|
|
56
|
+
})
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
function De(t, e) {
|
|
60
|
+
return y(), Z("svg", {
|
|
61
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
62
|
+
fill: "none",
|
|
63
|
+
viewBox: "0 0 24 24",
|
|
64
|
+
"stroke-width": "1.5",
|
|
65
|
+
stroke: "currentColor",
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
"data-slot": "icon"
|
|
68
|
+
}, [
|
|
69
|
+
z("path", {
|
|
70
|
+
"stroke-linecap": "round",
|
|
71
|
+
"stroke-linejoin": "round",
|
|
72
|
+
d: "M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"
|
|
73
|
+
})
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
function He(t, e) {
|
|
77
|
+
return y(), Z("svg", {
|
|
78
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
79
|
+
fill: "none",
|
|
80
|
+
viewBox: "0 0 24 24",
|
|
81
|
+
"stroke-width": "1.5",
|
|
82
|
+
stroke: "currentColor",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
"data-slot": "icon"
|
|
85
|
+
}, [
|
|
86
|
+
z("path", {
|
|
87
|
+
"stroke-linecap": "round",
|
|
88
|
+
"stroke-linejoin": "round",
|
|
89
|
+
d: "M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"
|
|
90
|
+
})
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
function Le(t, e) {
|
|
94
|
+
return y(), Z("svg", {
|
|
95
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
96
|
+
fill: "none",
|
|
97
|
+
viewBox: "0 0 24 24",
|
|
98
|
+
"stroke-width": "1.5",
|
|
99
|
+
stroke: "currentColor",
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
"data-slot": "icon"
|
|
102
|
+
}, [
|
|
103
|
+
z("path", {
|
|
104
|
+
"stroke-linecap": "round",
|
|
105
|
+
"stroke-linejoin": "round",
|
|
106
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
107
|
+
})
|
|
108
|
+
]);
|
|
109
|
+
}
|
|
110
|
+
function $e(t, e) {
|
|
111
|
+
return y(), Z("svg", {
|
|
112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
+
fill: "none",
|
|
114
|
+
viewBox: "0 0 24 24",
|
|
115
|
+
"stroke-width": "1.5",
|
|
116
|
+
stroke: "currentColor",
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
"data-slot": "icon"
|
|
119
|
+
}, [
|
|
120
|
+
z("path", {
|
|
121
|
+
"stroke-linecap": "round",
|
|
122
|
+
"stroke-linejoin": "round",
|
|
123
|
+
d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
|
|
124
|
+
})
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
function Ft(t, e) {
|
|
128
|
+
var i = Object.keys(t);
|
|
129
|
+
if (Object.getOwnPropertySymbols) {
|
|
130
|
+
var s = Object.getOwnPropertySymbols(t);
|
|
131
|
+
e && (s = s.filter(function(o) {
|
|
132
|
+
return Object.getOwnPropertyDescriptor(t, o).enumerable;
|
|
133
|
+
})), i.push.apply(i, s);
|
|
134
|
+
}
|
|
135
|
+
return i;
|
|
136
|
+
}
|
|
137
|
+
function b(t) {
|
|
138
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
139
|
+
var i = arguments[e] != null ? arguments[e] : {};
|
|
140
|
+
e % 2 ? Ft(Object(i), !0).forEach(function(s) {
|
|
141
|
+
j(t, s, i[s]);
|
|
142
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Ft(Object(i)).forEach(function(s) {
|
|
143
|
+
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(i, s));
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return t;
|
|
147
|
+
}
|
|
148
|
+
function j(t, e, i) {
|
|
149
|
+
return e in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
150
|
+
}
|
|
151
|
+
function Pe(t, e) {
|
|
152
|
+
if (t == null) return {};
|
|
153
|
+
var i, s, o = function(a, h) {
|
|
154
|
+
if (a == null) return {};
|
|
155
|
+
var r, l, c = {}, u = Object.keys(a);
|
|
156
|
+
for (l = 0; l < u.length; l++) r = u[l], h.indexOf(r) >= 0 || (c[r] = a[r]);
|
|
157
|
+
return c;
|
|
158
|
+
}(t, e);
|
|
159
|
+
if (Object.getOwnPropertySymbols) {
|
|
160
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
161
|
+
for (s = 0; s < n.length; s++) i = n[s], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (o[i] = t[i]);
|
|
162
|
+
}
|
|
163
|
+
return o;
|
|
164
|
+
}
|
|
165
|
+
function V(t) {
|
|
166
|
+
return function(e) {
|
|
167
|
+
if (Array.isArray(e)) return vt(e);
|
|
168
|
+
}(t) || function(e) {
|
|
169
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
170
|
+
}(t) || function(e, i) {
|
|
171
|
+
if (e) {
|
|
172
|
+
if (typeof e == "string") return vt(e, i);
|
|
173
|
+
var s = Object.prototype.toString.call(e).slice(8, -1);
|
|
174
|
+
if (s === "Object" && e.constructor && (s = e.constructor.name), s === "Map" || s === "Set") return Array.from(e);
|
|
175
|
+
if (s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)) return vt(e, i);
|
|
176
|
+
}
|
|
177
|
+
}(t) || function() {
|
|
178
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
179
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
180
|
+
}();
|
|
181
|
+
}
|
|
182
|
+
function vt(t, e) {
|
|
183
|
+
(e == null || e > t.length) && (e = t.length);
|
|
184
|
+
for (var i = 0, s = new Array(e); i < e; i++) s[i] = t[i];
|
|
185
|
+
return s;
|
|
186
|
+
}
|
|
187
|
+
var Ut, Be, nt, R = (Ut = function(t) {
|
|
188
|
+
/*!
|
|
189
|
+
Copyright (c) 2018 Jed Watson.
|
|
190
|
+
Licensed under the MIT License (MIT), see
|
|
191
|
+
http://jedwatson.github.io/classnames
|
|
192
|
+
*/
|
|
193
|
+
(function() {
|
|
194
|
+
var e = {}.hasOwnProperty;
|
|
195
|
+
function i() {
|
|
196
|
+
for (var s = [], o = 0; o < arguments.length; o++) {
|
|
197
|
+
var n = arguments[o];
|
|
198
|
+
if (n) {
|
|
199
|
+
var a = typeof n;
|
|
200
|
+
if (a === "string" || a === "number") s.push(n);
|
|
201
|
+
else if (Array.isArray(n)) {
|
|
202
|
+
if (n.length) {
|
|
203
|
+
var h = i.apply(null, n);
|
|
204
|
+
h && s.push(h);
|
|
205
|
+
}
|
|
206
|
+
} else if (a === "object") if (n.toString === Object.prototype.toString) for (var r in n) e.call(n, r) && n[r] && s.push(r);
|
|
207
|
+
else s.push(n.toString());
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return s.join(" ");
|
|
211
|
+
}
|
|
212
|
+
t.exports ? (i.default = i, t.exports = i) : window.classNames = i;
|
|
213
|
+
})();
|
|
214
|
+
}, Ut(nt = { path: Be, exports: {}, require: function(t, e) {
|
|
215
|
+
return function() {
|
|
216
|
+
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
217
|
+
}(e == null && nt.path);
|
|
218
|
+
} }, nt.exports), nt.exports), L = function(t) {
|
|
219
|
+
return function(e, i) {
|
|
220
|
+
if (!e) return t;
|
|
221
|
+
var s;
|
|
222
|
+
typeof e == "string" ? s = e : i = e;
|
|
223
|
+
var o = t;
|
|
224
|
+
return s && (o += "__" + s), o + (i ? Object.keys(i).reduce(function(n, a) {
|
|
225
|
+
var h = i[a];
|
|
226
|
+
return h && (n += " " + (typeof h == "boolean" ? o + "--" + a : o + "--" + a + "_" + h)), n;
|
|
227
|
+
}, "") : "");
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
function At(t, e, i) {
|
|
231
|
+
var s, o, n, a, h;
|
|
232
|
+
function r() {
|
|
233
|
+
var c = Date.now() - a;
|
|
234
|
+
c < e && c >= 0 ? s = setTimeout(r, e - c) : (s = null, i || (h = t.apply(n, o), n = o = null));
|
|
235
|
+
}
|
|
236
|
+
e == null && (e = 100);
|
|
237
|
+
var l = function() {
|
|
238
|
+
n = this, o = arguments, a = Date.now();
|
|
239
|
+
var c = i && !s;
|
|
240
|
+
return s || (s = setTimeout(r, e)), c && (h = t.apply(n, o), n = o = null), h;
|
|
241
|
+
};
|
|
242
|
+
return l.clear = function() {
|
|
243
|
+
s && (clearTimeout(s), s = null);
|
|
244
|
+
}, l.flush = function() {
|
|
245
|
+
s && (h = t.apply(n, o), n = o = null, clearTimeout(s), s = null);
|
|
246
|
+
}, l;
|
|
247
|
+
}
|
|
248
|
+
At.debounce = At;
|
|
249
|
+
var Mt = At, g = function() {
|
|
250
|
+
return g = Object.assign || function(t) {
|
|
251
|
+
for (var e, i = 1, s = arguments.length; i < s; i++) for (var o in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
252
|
+
return t;
|
|
253
|
+
}, g.apply(this, arguments);
|
|
254
|
+
};
|
|
255
|
+
/*! *****************************************************************************
|
|
256
|
+
Copyright (c) Microsoft Corporation.
|
|
257
|
+
|
|
258
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
259
|
+
purpose with or without fee is hereby granted.
|
|
260
|
+
|
|
261
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
262
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
263
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
264
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
265
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
266
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
267
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
268
|
+
***************************************************************************** */
|
|
269
|
+
function ne(t, e) {
|
|
270
|
+
var i, s;
|
|
271
|
+
return t && e ? (i = "" + t + e[0].toUpperCase() + e.slice(1), s = t + "-" + e) : (i = t || e, s = t || e), { name: i, classname: s };
|
|
272
|
+
}
|
|
273
|
+
function se(t) {
|
|
274
|
+
return /^blob:/.test(t);
|
|
275
|
+
}
|
|
276
|
+
function Nt(t) {
|
|
277
|
+
return se(t) || function(e) {
|
|
278
|
+
return /^data:/.test(e);
|
|
279
|
+
}(t);
|
|
280
|
+
}
|
|
281
|
+
function G(t) {
|
|
282
|
+
return !!(t && t.constructor && t.call && t.apply);
|
|
283
|
+
}
|
|
284
|
+
function M(t) {
|
|
285
|
+
return t === void 0;
|
|
286
|
+
}
|
|
287
|
+
function ht(t) {
|
|
288
|
+
return typeof t == "object" && t !== null;
|
|
289
|
+
}
|
|
290
|
+
function St(t, e, i) {
|
|
291
|
+
var s = {};
|
|
292
|
+
return ht(t) ? (Object.keys(e).forEach(function(o) {
|
|
293
|
+
M(t[o]) ? s[o] = e[o] : ht(e[o]) ? ht(t[o]) ? s[o] = St(t[o], e[o], i[o]) : s[o] = t[o] ? e[o] : i[o] : e[o] === !0 || e[o] === !1 ? s[o] = !!t[o] : s[o] = t[o];
|
|
294
|
+
}), s) : t ? e : i;
|
|
295
|
+
}
|
|
296
|
+
function st(t) {
|
|
297
|
+
var e = Number(t);
|
|
298
|
+
return Number.isNaN(e) ? t : e;
|
|
299
|
+
}
|
|
300
|
+
function Vt(t) {
|
|
301
|
+
return typeof (t == "number" || /* @__PURE__ */ function(e) {
|
|
302
|
+
return typeof e == "object" && e !== null;
|
|
303
|
+
}(t) && toString.call(t) == "[object Number]") && !oe(t);
|
|
304
|
+
}
|
|
305
|
+
function oe(t) {
|
|
306
|
+
return t != t;
|
|
307
|
+
}
|
|
308
|
+
function re(t, e) {
|
|
309
|
+
return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
|
|
310
|
+
}
|
|
311
|
+
var tt = function(t, e) {
|
|
312
|
+
t === void 0 && (t = {}), e === void 0 && (e = {}), this.type = "manipulateImage", this.move = t, this.scale = e;
|
|
313
|
+
}, Ie = function(t, e) {
|
|
314
|
+
e === void 0 && (e = {}), this.type = "resize", this.directions = t, this.params = e;
|
|
315
|
+
}, Wt = function(t) {
|
|
316
|
+
this.type = "move", this.directions = t;
|
|
317
|
+
}, _e = function() {
|
|
318
|
+
function t(e, i, s, o, n) {
|
|
319
|
+
this.type = "drag", this.nativeEvent = e, this.position = s, this.previousPosition = o, this.element = i, this.anchor = n;
|
|
320
|
+
}
|
|
321
|
+
return t.prototype.shift = function() {
|
|
322
|
+
var e = this, i = e.element, s = e.anchor, o = e.position;
|
|
323
|
+
if (i) {
|
|
324
|
+
var n = i.getBoundingClientRect(), a = n.left, h = n.top;
|
|
325
|
+
return { left: o.left - a - s.left, top: o.top - h - s.top };
|
|
326
|
+
}
|
|
327
|
+
return { left: 0, top: 0 };
|
|
328
|
+
}, t;
|
|
329
|
+
}(), kt = { name: "DraggableElement", props: { classname: { type: String } }, beforeMount: function() {
|
|
330
|
+
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
331
|
+
}, beforeUnmount: function() {
|
|
332
|
+
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
333
|
+
}, mounted: function() {
|
|
334
|
+
if (!this.$refs.draggable) throw new Error('You should add ref "draggable" to your root element to use draggable mixin');
|
|
335
|
+
this.touches = [], this.hovered = !1;
|
|
336
|
+
}, methods: { onMouseOver: function() {
|
|
337
|
+
this.hovered || (this.hovered = !0, this.$emit("enter"));
|
|
338
|
+
}, onMouseLeave: function() {
|
|
339
|
+
this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
|
|
340
|
+
}, onTouchStart: function(t) {
|
|
341
|
+
t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = V(t.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
|
|
342
|
+
return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };
|
|
343
|
+
}, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());
|
|
344
|
+
}, onTouchEnd: function() {
|
|
345
|
+
this.processEnd();
|
|
346
|
+
}, onTouchMove: function(t) {
|
|
347
|
+
this.touches.length && (this.processMove(t, t.touches), t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation());
|
|
348
|
+
}, onMouseDown: function(t) {
|
|
349
|
+
if (!this.disabled) {
|
|
350
|
+
var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };
|
|
351
|
+
this.touches = [e], this.initAnchor(e), t.stopPropagation();
|
|
352
|
+
}
|
|
353
|
+
}, onMouseMove: function(t) {
|
|
354
|
+
this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.preventDefault());
|
|
355
|
+
}, onMouseUp: function() {
|
|
356
|
+
this.processEnd();
|
|
357
|
+
}, initAnchor: function(t) {
|
|
358
|
+
var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, s = e.right, o = e.bottom, n = e.top;
|
|
359
|
+
this.anchor = { left: t.clientX - i, top: t.clientY - n, bottom: o - t.clientY, right: s - t.clientX };
|
|
360
|
+
}, processMove: function(t, e) {
|
|
361
|
+
var i = V(e);
|
|
362
|
+
if (this.touches.length) {
|
|
363
|
+
if (this.touches.length === 1 && i.length === 1) {
|
|
364
|
+
var s = this.$refs.draggable;
|
|
365
|
+
this.$emit("drag", new _e(t, s, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
|
|
366
|
+
}
|
|
367
|
+
this.touches = i;
|
|
368
|
+
}
|
|
369
|
+
}, processEnd: function() {
|
|
370
|
+
this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
|
|
371
|
+
} }, emits: ["drag", "drag-end", "leave", "enter"] };
|
|
372
|
+
kt.render = function(t, e, i, s, o, n) {
|
|
373
|
+
return y(), x("div", { ref: "draggable", class: i.classname, onTouchstart: e[1] || (e[1] = function() {
|
|
374
|
+
return n.onTouchStart && n.onTouchStart.apply(n, arguments);
|
|
375
|
+
}), onMousedown: e[2] || (e[2] = function() {
|
|
376
|
+
return n.onMouseDown && n.onMouseDown.apply(n, arguments);
|
|
377
|
+
}), onMouseover: e[3] || (e[3] = function() {
|
|
378
|
+
return n.onMouseOver && n.onMouseOver.apply(n, arguments);
|
|
379
|
+
}), onMouseleave: e[4] || (e[4] = function() {
|
|
380
|
+
return n.onMouseLeave && n.onMouseLeave.apply(n, arguments);
|
|
381
|
+
}) }, [q(t.$slots, "default")], 34);
|
|
382
|
+
};
|
|
383
|
+
var bt = L("vue-handler-wrapper"), ae = { name: "HandlerWrapper", components: { DraggableElement: kt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
|
|
384
|
+
var t;
|
|
385
|
+
if (this.horizontalPosition || this.verticalPosition) {
|
|
386
|
+
var e, i = ne(this.horizontalPosition, this.verticalPosition);
|
|
387
|
+
t = bt((j(e = {}, i.classname, !0), j(e, "disabled", this.disabled), e));
|
|
388
|
+
} else t = bt({ disabled: this.disabled });
|
|
389
|
+
return { root: t, draggable: bt("draggable") };
|
|
390
|
+
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
391
|
+
ae.render = function(t, e, i, s, o, n) {
|
|
392
|
+
var a = D("DraggableElement");
|
|
393
|
+
return y(), x("div", { class: n.classes.root }, [f(a, { class: n.classes.draggable, onDrag: e[1] || (e[1] = function(h) {
|
|
394
|
+
return t.$emit("drag", h);
|
|
395
|
+
}), onDragEnd: e[2] || (e[2] = function(h) {
|
|
396
|
+
return t.$emit("drag-end");
|
|
397
|
+
}), onLeave: e[3] || (e[3] = function(h) {
|
|
398
|
+
return t.$emit("leave");
|
|
399
|
+
}), onEnter: e[4] || (e[4] = function(h) {
|
|
400
|
+
return t.$emit("enter");
|
|
401
|
+
}) }, { default: A(function() {
|
|
402
|
+
return [q(t.$slots, "default")];
|
|
403
|
+
}), _: 3 }, 8, ["class"])], 2);
|
|
404
|
+
};
|
|
405
|
+
var Ye = L("vue-line-wrapper"), he = { name: "LineWrapper", components: { DraggableElement: kt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
406
|
+
var t;
|
|
407
|
+
return Ye((j(t = {}, this.position, !0), j(t, "disabled", this.disabled), t));
|
|
408
|
+
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
409
|
+
he.render = function(t, e, i, s, o, n) {
|
|
410
|
+
var a = D("DraggableElement");
|
|
411
|
+
return y(), x(a, { class: n.classname, onDrag: e[1] || (e[1] = function(h) {
|
|
412
|
+
return t.$emit("drag", h);
|
|
413
|
+
}), onDragEnd: e[2] || (e[2] = function(h) {
|
|
414
|
+
return t.$emit("drag-end");
|
|
415
|
+
}), onLeave: e[3] || (e[3] = function(h) {
|
|
416
|
+
return t.$emit("leave");
|
|
417
|
+
}), onEnter: e[4] || (e[4] = function(h) {
|
|
418
|
+
return t.$emit("enter");
|
|
419
|
+
}) }, { default: A(function() {
|
|
420
|
+
return [q(t.$slots, "default")];
|
|
421
|
+
}), _: 3 }, 8, ["class"]);
|
|
422
|
+
};
|
|
423
|
+
var B = ["left", "right", "top", "bottom"], Xe = ["left", "right"], Fe = ["top", "bottom"], Ue = ["left", "top"], Ne = ["fill-area", "fit-area", "stencil", "none"], Zt = { left: 0, top: 0, width: 0, height: 0 };
|
|
424
|
+
function qt(t, e, i) {
|
|
425
|
+
return !(i = i || ["width", "height", "left", "top"]).some(function(s) {
|
|
426
|
+
return t[s] !== e[s];
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function I(t) {
|
|
430
|
+
return { left: t.left, top: t.top, right: t.left + t.width, bottom: t.top + t.height };
|
|
431
|
+
}
|
|
432
|
+
function Q(t, e) {
|
|
433
|
+
return { left: t.left - e.left, top: t.top - e.top };
|
|
434
|
+
}
|
|
435
|
+
function C(t) {
|
|
436
|
+
return { left: t.left + t.width / 2, top: t.top + t.height / 2 };
|
|
437
|
+
}
|
|
438
|
+
function et(t, e) {
|
|
439
|
+
var i = { left: 0, top: 0, right: 0, bottom: 0 };
|
|
440
|
+
return B.forEach(function(s) {
|
|
441
|
+
var o = e[s], n = I(t)[s];
|
|
442
|
+
i[s] = o !== void 0 && n !== void 0 ? s === "left" || s === "top" ? Math.max(0, o - n) : Math.max(0, n - o) : 0;
|
|
443
|
+
}), i;
|
|
444
|
+
}
|
|
445
|
+
function P(t, e) {
|
|
446
|
+
return { left: t.left - e.left, top: t.top - e.top, width: t.width + e.left + e.right, height: t.height + e.top + e.bottom };
|
|
447
|
+
}
|
|
448
|
+
function ct(t) {
|
|
449
|
+
return { left: -t.left, top: -t.top };
|
|
450
|
+
}
|
|
451
|
+
function W(t, e) {
|
|
452
|
+
return g(g({}, t), { left: t.left + e.left, top: t.top + e.top });
|
|
453
|
+
}
|
|
454
|
+
function H(t, e, i, s) {
|
|
455
|
+
if (e !== 1) {
|
|
456
|
+
if (i) {
|
|
457
|
+
var o = C(t);
|
|
458
|
+
return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - o.left) * (1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - o.top) * (1 - e) };
|
|
459
|
+
}
|
|
460
|
+
return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2, top: t.top + t.height * (1 - e) / 2 };
|
|
461
|
+
}
|
|
462
|
+
return t;
|
|
463
|
+
}
|
|
464
|
+
function w(t) {
|
|
465
|
+
return t.width / t.height;
|
|
466
|
+
}
|
|
467
|
+
function K(t, e) {
|
|
468
|
+
return Math.min(e.right !== void 0 && e.left !== void 0 ? (e.right - e.left) / t.width : 1 / 0, e.bottom !== void 0 && e.top !== void 0 ? (e.bottom - e.top) / t.height : 1 / 0);
|
|
469
|
+
}
|
|
470
|
+
function J(t, e) {
|
|
471
|
+
var i = { left: 0, top: 0 }, s = et(t, e);
|
|
472
|
+
return s.left && s.left > 0 ? i.left = s.left : s.right && s.right > 0 && (i.left = -s.right), s.top && s.top > 0 ? i.top = s.top : s.bottom && s.bottom > 0 && (i.top = -s.bottom), i;
|
|
473
|
+
}
|
|
474
|
+
function wt(t, e) {
|
|
475
|
+
var i;
|
|
476
|
+
return e.minimum && t < e.minimum ? i = e.minimum : e.maximum && t > e.maximum && (i = e.maximum), i;
|
|
477
|
+
}
|
|
478
|
+
function le(t, e) {
|
|
479
|
+
var i = w(t), s = w(e);
|
|
480
|
+
return e.width < 1 / 0 && e.height < 1 / 0 ? i > s ? { width: e.width, height: e.width / i } : { width: e.height * i, height: e.height } : e.width < 1 / 0 ? { width: e.width, height: e.width / i } : e.height < 1 / 0 ? { width: e.height * i, height: e.height } : t;
|
|
481
|
+
}
|
|
482
|
+
function ce(t, e) {
|
|
483
|
+
var i = e * Math.PI / 180;
|
|
484
|
+
return { width: Math.abs(t.width * Math.cos(i)) + Math.abs(t.height * Math.sin(i)), height: Math.abs(t.width * Math.sin(i)) + Math.abs(t.height * Math.cos(i)) };
|
|
485
|
+
}
|
|
486
|
+
function F(t, e) {
|
|
487
|
+
var i = e * Math.PI / 180;
|
|
488
|
+
return { left: t.left * Math.cos(i) - t.top * Math.sin(i), top: t.left * Math.sin(i) + t.top * Math.cos(i) };
|
|
489
|
+
}
|
|
490
|
+
function ut(t, e) {
|
|
491
|
+
var i = et(E(t, e), e);
|
|
492
|
+
return i.left + i.right + i.top + i.bottom ? i.left + i.right > i.top + i.bottom ? Math.min((t.width + i.left + i.right) / t.width, K(t, e)) : Math.min((t.height + i.top + i.bottom) / t.height, K(t, e)) : 1;
|
|
493
|
+
}
|
|
494
|
+
function E(t, e, i) {
|
|
495
|
+
i === void 0 && (i = !1);
|
|
496
|
+
var s = J(t, e);
|
|
497
|
+
return W(t, i ? ct(s) : s);
|
|
498
|
+
}
|
|
499
|
+
function Ct(t) {
|
|
500
|
+
return { width: t.right !== void 0 && t.left !== void 0 ? t.right - t.left : 1 / 0, height: t.bottom !== void 0 && t.top !== void 0 ? t.bottom - t.top : 1 / 0 };
|
|
501
|
+
}
|
|
502
|
+
function Ve(t, e) {
|
|
503
|
+
return g(g({}, t), { minWidth: Math.min(e.width, t.minWidth), minHeight: Math.min(e.height, t.minHeight), maxWidth: Math.min(e.width, t.maxWidth), maxHeight: Math.min(e.height, t.maxHeight) });
|
|
504
|
+
}
|
|
505
|
+
function ue(t, e, i) {
|
|
506
|
+
i === void 0 && (i = !0);
|
|
507
|
+
var s = {};
|
|
508
|
+
return B.forEach(function(o) {
|
|
509
|
+
var n = t[o], a = e[o];
|
|
510
|
+
n !== void 0 && a !== void 0 ? s[o] = o === "left" || o === "top" ? i ? Math.max(n, a) : Math.min(n, a) : i ? Math.min(n, a) : Math.max(n, a) : a !== void 0 ? s[o] = a : n !== void 0 && (s[o] = n);
|
|
511
|
+
}), s;
|
|
512
|
+
}
|
|
513
|
+
function dt(t, e) {
|
|
514
|
+
return ue(t, e, !0);
|
|
515
|
+
}
|
|
516
|
+
function Gt(t) {
|
|
517
|
+
var e = t.size, i = t.aspectRatio, s = t.ignoreMinimum, o = t.sizeRestrictions;
|
|
518
|
+
return !!((e.correctRatio || w(e) >= i.minimum && w(e) <= i.maximum) && e.height <= o.maxHeight && e.width <= o.maxWidth && e.width && e.height && (s || e.height >= o.minHeight && e.width >= o.minWidth));
|
|
519
|
+
}
|
|
520
|
+
function Qt(t, e) {
|
|
521
|
+
return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);
|
|
522
|
+
}
|
|
523
|
+
function Y(t) {
|
|
524
|
+
var e = t.width, i = t.height, s = t.sizeRestrictions, o = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, n = { width: Math.max(s.minWidth, Math.min(s.maxWidth, e)), height: Math.max(s.minHeight, Math.min(s.maxHeight, i)) };
|
|
525
|
+
function a(l, c) {
|
|
526
|
+
return c === void 0 && (c = !1), l.reduce(function(u, d) {
|
|
527
|
+
return Gt({ size: d, aspectRatio: o, sizeRestrictions: s, ignoreMinimum: c }) && (!u || Qt(d, { width: e, height: i }) < Qt(u, { width: e, height: i })) ? d : u;
|
|
528
|
+
}, null);
|
|
529
|
+
}
|
|
530
|
+
var h = [];
|
|
531
|
+
o && [o.minimum, o.maximum].forEach(function(l) {
|
|
532
|
+
l && h.push({ width: n.width, height: n.width / l, correctRatio: !0 }, { width: n.height * l, height: n.height, correctRatio: !0 });
|
|
533
|
+
}), Gt({ size: n, aspectRatio: o, sizeRestrictions: s }) && h.push(n);
|
|
534
|
+
var r = a(h) || a(h, !0);
|
|
535
|
+
return r && { width: r.width, height: r.height };
|
|
536
|
+
}
|
|
537
|
+
function Et(t) {
|
|
538
|
+
var e = t.event, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = W(i, e.directions);
|
|
539
|
+
return W(n, J(n, o));
|
|
540
|
+
}
|
|
541
|
+
function Ze(t) {
|
|
542
|
+
var e = t.coordinates, i = t.transform, s = t.imageSize, o = t.sizeRestrictions, n = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(c, u) {
|
|
543
|
+
return Et({ coordinates: c, positionRestrictions: n, event: new Wt({ left: u.left - c.left, top: u.top - c.top }) });
|
|
544
|
+
}, l = g({}, e);
|
|
545
|
+
return (Array.isArray(i) ? i : [i]).forEach(function(c) {
|
|
546
|
+
var u = {};
|
|
547
|
+
M((u = typeof c == "function" ? c({ coordinates: l, imageSize: s, visibleArea: h }) : c).width) && M(u.height) || (l = function(d, m) {
|
|
548
|
+
var p = g(g(g({}, d), Y({ width: m.width, height: m.height, sizeRestrictions: o, aspectRatio: a })), { left: 0, top: 0 });
|
|
549
|
+
return r(p, { left: d.left, top: d.top });
|
|
550
|
+
}(l, g(g({}, l), u))), M(u.left) && M(u.top) || (l = r(l, g(g({}, l), u)));
|
|
551
|
+
}), l;
|
|
552
|
+
}
|
|
553
|
+
function qe(t) {
|
|
554
|
+
t.event;
|
|
555
|
+
var e = t.getAreaRestrictions, i = t.boundaries, s = t.coordinates, o = t.visibleArea;
|
|
556
|
+
t.aspectRatio;
|
|
557
|
+
var n = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;
|
|
558
|
+
t.stencilReference;
|
|
559
|
+
var r, l, c, u = g({}, s), d = g({}, o), m = g({}, n);
|
|
560
|
+
r = w(m), l = w(u), c === void 0 && (c = 1e-3), (r === 0 || l === 0 ? Math.abs(l - r) < c : Math.abs(l / r) < 1 + c && Math.abs(l / r) > 1 - c) || (u = g(g({}, u), Y({ sizeRestrictions: a, width: u.width, height: u.height, aspectRatio: { minimum: w(m), maximum: w(m) } })));
|
|
561
|
+
var p = ut(d = H(d, u.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: "resize" }));
|
|
562
|
+
return p !== 1 && (d = H(d, p), u = H(u, p)), d = E(d = W(d, Q(C(u), C(d))), e({ visibleArea: d, type: "move" })), { coordinates: u = E(u, dt(I(d), h)), visibleArea: d };
|
|
563
|
+
}
|
|
564
|
+
function Ge(t) {
|
|
565
|
+
var e = t.event, i = t.getAreaRestrictions, s = t.boundaries, o = t.coordinates, n = t.visibleArea;
|
|
566
|
+
t.aspectRatio, t.stencilSize, t.sizeRestrictions;
|
|
567
|
+
var a = t.positionRestrictions;
|
|
568
|
+
t.stencilReference;
|
|
569
|
+
var h = g({}, o), r = g({}, n);
|
|
570
|
+
if (o && n && e.type !== "manipulateImage") {
|
|
571
|
+
var l = { width: 0, height: 0 };
|
|
572
|
+
r.width, s.width, w(s) > w(h) ? (l.height = 0.8 * s.height, l.width = l.height * w(h)) : (l.width = 0.8 * s.width, l.height = l.width * w(h));
|
|
573
|
+
var c = ut(r = H(r, h.width * s.width / (r.width * l.width)), i({ visibleArea: r, type: "resize" }));
|
|
574
|
+
r = H(r, c), c !== 1 && (l.height /= c, l.width /= c), r = E(r = W(r, Q(C(h), C(r))), i({ visibleArea: r, type: "move" })), h = E(h, dt(I(r), a));
|
|
575
|
+
}
|
|
576
|
+
return { coordinates: h, visibleArea: r };
|
|
577
|
+
}
|
|
578
|
+
function Qe(t) {
|
|
579
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.getAreaRestrictions, n = g({}, s), a = g({}, i);
|
|
580
|
+
if (e.type === "setCoordinates") {
|
|
581
|
+
var h = Math.max(0, a.width - n.width), r = Math.max(0, a.height - n.height);
|
|
582
|
+
h > r ? n = H(n, Math.min(a.width / n.width, K(n, o({ visibleArea: n, type: "resize" })))) : r > h && (n = H(n, Math.min(a.height / n.height, K(n, o({ visibleArea: n, type: "resize" }))))), n = E(n = W(n, ct(J(a, I(n)))), o({ visibleArea: n, type: "move" }));
|
|
583
|
+
}
|
|
584
|
+
return { visibleArea: n, coordinates: a };
|
|
585
|
+
}
|
|
586
|
+
function Ke(t) {
|
|
587
|
+
var e = t.imageSize, i = t.visibleArea, s = t.coordinates, o = i || e;
|
|
588
|
+
return { left: (i ? i.left : 0) + o.width / 2 - s.width / 2, top: (i ? i.top : 0) + o.height / 2 - s.height / 2 };
|
|
589
|
+
}
|
|
590
|
+
function Je(t) {
|
|
591
|
+
var e = t.imageSize, i = t.visibleArea, s = t.aspectRatio, o = t.sizeRestrictions, n = i || e, a = Math.min(s.maximum || 1 / 0, Math.max(s.minimum || 0, w(n))), h = n.width < n.height ? { width: 0.8 * n.width, height: 0.8 * n.width / a } : { height: 0.8 * n.height, width: 0.8 * n.height * a };
|
|
592
|
+
return Y(g(g({}, h), { aspectRatio: s, sizeRestrictions: o }));
|
|
593
|
+
}
|
|
594
|
+
function ti(t) {
|
|
595
|
+
var e, i, s = t.imageSize, o = t.visibleArea, n = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, l = o || s;
|
|
596
|
+
return w(l) > w(n) ? i = (e = r.height * l.height / n.height) * w(r) : e = (i = r.width * l.width / n.width) / w(r), Y({ width: i, height: e, aspectRatio: a, sizeRestrictions: h });
|
|
597
|
+
}
|
|
598
|
+
function ei(t) {
|
|
599
|
+
var e = t.getAreaRestrictions, i = t.coordinates, s = t.imageSize, o = w(t.boundaries);
|
|
600
|
+
if (i) {
|
|
601
|
+
var n = { height: Math.max(i.height, s.height), width: Math.max(i.width, s.width) }, a = le({ width: w(n) > o ? n.width : n.height * o, height: w(n) > o ? n.width / o : n.height }, Ct(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = et(i, I(g({ left: 0, top: 0 }, s))), l = {};
|
|
602
|
+
return !r.left && !r.right && h.width <= s.width && (l.left = 0, l.right = s.width), !r.top && !r.bottom && h.height <= s.height && (l.top = 0, l.bottom = s.height), E(h, l);
|
|
603
|
+
}
|
|
604
|
+
var c = w(s);
|
|
605
|
+
return a = { height: c > o ? s.height : s.width / o, width: c > o ? s.height * o : s.width }, { left: s.width / 2 - a.width / 2, top: s.height / 2 - a.height / 2, width: a.width, height: a.height };
|
|
606
|
+
}
|
|
607
|
+
function ot(t, e) {
|
|
608
|
+
return ue(t, I(e));
|
|
609
|
+
}
|
|
610
|
+
function ii(t) {
|
|
611
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, l = e.move, c = g({}, s), u = g({}, i), d = 1, m = 1, p = r.factor && Math.abs(r.factor - 1) > 1e-3;
|
|
612
|
+
c = W(c, { left: l.left || 0, top: l.top || 0 });
|
|
613
|
+
var v = { stencil: { minimum: Math.max(o.minWidth ? o.minWidth / u.width : 0, o.minHeight ? o.minHeight / u.height : 0), maximum: Math.min(o.maxWidth ? o.maxWidth / u.width : 1 / 0, o.maxHeight ? o.maxHeight / u.height : 1 / 0, K(u, a)) }, area: { maximum: K(c, n({ visibleArea: c, type: "resize" })) } };
|
|
614
|
+
r.factor && p && (r.factor < 1 ? (m = Math.max(r.factor, v.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(v.area.maximum, v.stencil.maximum))) < 1 && (m = 1)), m && (c = H(c, m, r.center));
|
|
615
|
+
var T = i.left - s.left, $ = s.width + s.left - (i.width + i.left), U = i.top - s.top, X = s.height + s.top - (i.height + i.top);
|
|
616
|
+
return c = E(c = W(c, J(c, { left: a.left !== void 0 ? a.left - T * m : void 0, top: a.top !== void 0 ? a.top - U * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + X * m : void 0, right: a.right !== void 0 ? a.right + $ * m : void 0 })), n({ visibleArea: c, type: "move" })), u.width = u.width * m, u.height = u.height * m, u.left = c.left + T * m, u.top = c.top + U * m, u = E(u, dt(I(c), a)), r.factor && p && h && (r.factor > 1 ? d = Math.min(v.area.maximum, r.factor) / m : r.factor < 1 && (d = Math.max(u.height / c.height, u.width / c.width, r.factor / m)), d !== 1 && (c = W(c = E(c = H(c, d, r.factor > 1 ? r.center : C(u)), n({ visibleArea: c, type: "move" })), ct(J(u, I(c)))))), { coordinates: u, visibleArea: c };
|
|
617
|
+
}
|
|
618
|
+
function ni(t) {
|
|
619
|
+
var e = t.aspectRatio, i = t.getAreaRestrictions, s = t.coordinates, o = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, l = t.angle, c = g({}, s), u = g({}, o), d = F(C(g({ left: 0, top: 0 }, r)), l);
|
|
620
|
+
return (c = g(g({}, Y({ sizeRestrictions: n, aspectRatio: e, width: c.width, height: c.height })), F(C(c), l))).left -= d.left - h.width / 2 + c.width / 2, c.top -= d.top - h.height / 2 + c.height / 2, u = H(u, ut(u, i({ visibleArea: u, type: "resize" }))), { coordinates: c = E(c, a), visibleArea: u = E(u = W(u, Q(C(c), C(s))), i({ visibleArea: u, type: "move" })) };
|
|
621
|
+
}
|
|
622
|
+
function si(t) {
|
|
623
|
+
var e = t.flip, i = t.previousFlip, s = t.rotate, o = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r = g({}, n), l = g({}, a), c = i.horizontal !== e.horizontal, u = i.vertical !== e.vertical;
|
|
624
|
+
if (c || u) {
|
|
625
|
+
var d = F({ left: h.width / 2, top: h.height / 2 }, -s), m = F(C(r), -s), p = F({ left: c ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s);
|
|
626
|
+
r = W(r, Q(p, C(r))), m = F(C(l), -s), l = E(l = W(l, Q(p = F({ left: c ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s), C(l))), o({ visibleArea: l, type: "move" }));
|
|
627
|
+
}
|
|
628
|
+
return { coordinates: r, visibleArea: l };
|
|
629
|
+
}
|
|
630
|
+
function Kt(t) {
|
|
631
|
+
var e = t.directions, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = g({}, e), l = P(i, r).width, c = P(i, r).height;
|
|
632
|
+
l < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - n.minWidth) / (r.left / r.right), r.right = -(i.width - n.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - n.minWidth) : r.right < 0 && (r.right = -(i.width - n.minWidth))), c < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - n.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - n.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - n.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - n.minHeight)));
|
|
633
|
+
var u = et(P(i, r), o);
|
|
634
|
+
h && (u.left && u.left > 0 && u.right === 0 ? (r.right += u.left, r.left -= u.left) : u.right && u.right > 0 && u.left === 0 && (r.left += u.right, r.right -= u.right), u.top && u.top > 0 && u.bottom === 0 ? (r.bottom += u.top, r.top -= u.top) : u.bottom && u.bottom > 0 && u.top === 0 && (r.top += u.bottom, r.bottom -= u.bottom), u = et(P(i, r), o));
|
|
635
|
+
var d = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
|
|
636
|
+
if (B.forEach(function(v) {
|
|
637
|
+
var T = u[v];
|
|
638
|
+
T && r[v] && (d[v] = Math.max(0, 1 - T / r[v]));
|
|
639
|
+
}), a) {
|
|
640
|
+
var m = Math.min.apply(null, B.map(function(v) {
|
|
641
|
+
return d[v];
|
|
642
|
+
}));
|
|
643
|
+
m !== 1 / 0 && B.forEach(function(v) {
|
|
644
|
+
r[v] *= m;
|
|
645
|
+
});
|
|
646
|
+
} else B.forEach(function(v) {
|
|
647
|
+
d[v] !== 1 / 0 && (r[v] *= d[v]);
|
|
648
|
+
});
|
|
649
|
+
if (l = P(i, r).width, c = P(i, r).height, r.right + r.left && (l > n.maxWidth ? d.width = (n.maxWidth - i.width) / (r.right + r.left) : l < n.minWidth && (d.width = (n.minWidth - i.width) / (r.right + r.left))), r.bottom + r.top && (c > n.maxHeight ? d.height = (n.maxHeight - i.height) / (r.bottom + r.top) : c < n.minHeight && (d.height = (n.minHeight - i.height) / (r.bottom + r.top))), a) {
|
|
650
|
+
var p = Math.min(d.width, d.height);
|
|
651
|
+
p !== 1 / 0 && B.forEach(function(v) {
|
|
652
|
+
r[v] *= p;
|
|
653
|
+
});
|
|
654
|
+
} else d.width !== 1 / 0 && Xe.forEach(function(v) {
|
|
655
|
+
r[v] *= d.width;
|
|
656
|
+
}), d.height !== 1 / 0 && Fe.forEach(function(v) {
|
|
657
|
+
r[v] *= d.height;
|
|
658
|
+
});
|
|
659
|
+
return r;
|
|
660
|
+
}
|
|
661
|
+
function rt(t, e, i) {
|
|
662
|
+
return e == 0 && i == 0 ? t / 2 : e == 0 ? 0 : i == 0 ? t : t * Math.abs(e / (e + i));
|
|
663
|
+
}
|
|
664
|
+
var oi = L("vue-simple-handler"), ri = L("vue-simple-handler-wrapper"), mt = { name: "SimpleHandler", components: { HandlerWrapper: ae }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
665
|
+
return { hover: !1 };
|
|
666
|
+
}, computed: { classes: function() {
|
|
667
|
+
var t, e = (j(t = {}, this.horizontalPosition, !!this.horizontalPosition), j(t, this.verticalPosition, !!this.verticalPosition), j(t, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), j(t, "hover", this.hover), t);
|
|
668
|
+
return { default: R(oi(e), this.defaultClass, this.hover && this.hoverClass), wrapper: R(ri(e), this.wrapperClass) };
|
|
669
|
+
} }, methods: { onDrag: function(t) {
|
|
670
|
+
this.$emit("drag", t);
|
|
671
|
+
}, onEnter: function() {
|
|
672
|
+
this.hover = !0;
|
|
673
|
+
}, onLeave: function() {
|
|
674
|
+
this.hover = !1;
|
|
675
|
+
}, onDragEnd: function() {
|
|
676
|
+
this.$emit("drag-end");
|
|
677
|
+
} }, emits: ["drag", "drag-end"] };
|
|
678
|
+
mt.render = function(t, e, i, s, o, n) {
|
|
679
|
+
var a = D("HandlerWrapper");
|
|
680
|
+
return y(), x(a, { class: n.classes.wrapper, "vertical-position": i.verticalPosition, "horizontal-position": i.horizontalPosition, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: A(function() {
|
|
681
|
+
return [f("div", { class: n.classes.default }, null, 2)];
|
|
682
|
+
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
683
|
+
};
|
|
684
|
+
var ai = L("vue-simple-line"), hi = L("vue-simple-line-wrapper"), gt = { name: "SimpleLine", components: { LineWrapper: he }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
685
|
+
return { hover: !1 };
|
|
686
|
+
}, computed: { classes: function() {
|
|
687
|
+
return { root: R(ai(j({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: R(hi(j({}, this.position, !0)), this.wrapperClass) };
|
|
688
|
+
} }, methods: { onDrag: function(t) {
|
|
689
|
+
this.$emit("drag", t);
|
|
690
|
+
}, onEnter: function() {
|
|
691
|
+
this.hover = !0;
|
|
692
|
+
}, onLeave: function() {
|
|
693
|
+
this.hover = !1;
|
|
694
|
+
}, onDragEnd: function() {
|
|
695
|
+
this.$emit("drag-end");
|
|
696
|
+
} }, emits: ["drag", "drag-end"] };
|
|
697
|
+
gt.render = function(t, e, i, s, o, n) {
|
|
698
|
+
var a = D("LineWrapper");
|
|
699
|
+
return y(), x(a, { class: n.classes.wrapper, position: i.position, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: A(function() {
|
|
700
|
+
return [f("div", { class: n.classes.root }, null, 2)];
|
|
701
|
+
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
702
|
+
};
|
|
703
|
+
var yt = L("vue-bounding-box"), li = ["east", "west", null], ci = ["south", "north", null], Ot = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
704
|
+
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
705
|
+
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
706
|
+
return mt;
|
|
707
|
+
} }, handlersClasses: { type: Object, default: function() {
|
|
708
|
+
return {};
|
|
709
|
+
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
710
|
+
return {};
|
|
711
|
+
} }, lines: { type: Object, default: function() {
|
|
712
|
+
return { west: !0, north: !0, east: !0, south: !0 };
|
|
713
|
+
} }, linesComponent: { type: [Object, String], default: function() {
|
|
714
|
+
return gt;
|
|
715
|
+
} }, linesClasses: { type: Object, default: function() {
|
|
716
|
+
return {};
|
|
717
|
+
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
718
|
+
return {};
|
|
719
|
+
} }, resizable: { type: Boolean, default: !0 } }, data: function() {
|
|
720
|
+
var t = [];
|
|
721
|
+
return li.forEach(function(e) {
|
|
722
|
+
ci.forEach(function(i) {
|
|
723
|
+
if (e !== i) {
|
|
724
|
+
var s = ne(e, i), o = s.name, n = s.classname;
|
|
725
|
+
t.push({ name: o, classname: n, verticalDirection: i, horizontalDirection: e });
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}), { points: t };
|
|
729
|
+
}, computed: { style: function() {
|
|
730
|
+
var t = {};
|
|
731
|
+
return this.width && this.height && (t.width = "".concat(this.width, "px"), t.height = "".concat(this.height, "px"), this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction))), t;
|
|
732
|
+
}, classes: function() {
|
|
733
|
+
var t = this.handlersClasses, e = this.handlersWrappersClasses, i = this.linesClasses, s = this.linesWrappersClasses;
|
|
734
|
+
return { root: yt(), handlers: t, handlersWrappers: e, lines: i, linesWrappers: s };
|
|
735
|
+
}, lineNodes: function() {
|
|
736
|
+
var t = this, e = [];
|
|
737
|
+
return this.points.forEach(function(i) {
|
|
738
|
+
i.horizontalDirection && i.verticalDirection || !t.lines[i.name] || e.push({ name: i.name, component: t.linesComponent, class: R(t.classes.lines.default, t.classes.lines[i.name], !t.resizable && t.classes.lines.disabled), wrapperClass: R(t.classes.linesWrappers.default, t.classes.linesWrappers[i.name], !t.resizable && t.classes.linesWrappers.disabled), hoverClass: t.classes.lines.hover, verticalDirection: i.verticalDirection, horizontalDirection: i.horizontalDirection, disabled: !t.resizable });
|
|
739
|
+
}), e;
|
|
740
|
+
}, handlerNodes: function() {
|
|
741
|
+
var t = this, e = [], i = this.width, s = this.height;
|
|
742
|
+
return this.points.forEach(function(o) {
|
|
743
|
+
if (t.handlers[o.name]) {
|
|
744
|
+
var n = { name: o.name, component: t.handlersComponent, class: R(t.classes.handlers.default, t.classes.handlers[o.name]), wrapperClass: R(t.classes.handlersWrappers.default, t.classes.handlersWrappers[o.name]), hoverClass: t.classes.handlers.hover, verticalDirection: o.verticalDirection, horizontalDirection: o.horizontalDirection, disabled: !t.resizable };
|
|
745
|
+
if (i && s) {
|
|
746
|
+
var a = o.horizontalDirection, h = o.verticalDirection, r = a === "east" ? i : a === "west" ? 0 : i / 2, l = h === "south" ? s : h === "north" ? 0 : s / 2;
|
|
747
|
+
n.wrapperClass = yt("handler"), n.wrapperStyle = { transform: "translate(".concat(r, "px, ").concat(l, "px)") }, t.transitions && t.transitions.enabled && (n.wrapperStyle.transition = "".concat(t.transitions.time, "ms ").concat(t.transitions.timingFunction));
|
|
748
|
+
} else n.wrapperClass = yt("handler", j({}, o.classname, !0));
|
|
749
|
+
e.push(n);
|
|
750
|
+
}
|
|
751
|
+
}), e;
|
|
752
|
+
} }, beforeMount: function() {
|
|
753
|
+
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
754
|
+
}, beforeUnmount: function() {
|
|
755
|
+
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
756
|
+
}, mounted: function() {
|
|
757
|
+
this.touches = [];
|
|
758
|
+
}, methods: { onEnd: function() {
|
|
759
|
+
this.$emit("resize-end");
|
|
760
|
+
}, onHandlerDrag: function(t, e, i) {
|
|
761
|
+
var s, o = t.shift(), n = o.left, a = o.top, h = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
762
|
+
e === "west" ? h.left -= n : e === "east" && (h.right += n), i === "north" ? h.top -= a : i === "south" && (h.bottom += a), !i && e ? s = "width" : i && !e && (s = "height"), this.resizable && this.$emit("resize", new Ie(h, { allowedDirections: { left: e === "west" || !e, right: e === "east" || !e, bottom: i === "south" || !i, top: i === "north" || !i }, preserveAspectRatio: t.nativeEvent && t.nativeEvent.shiftKey, respectDirection: s }));
|
|
763
|
+
} }, emits: ["resize", "resize-end"] };
|
|
764
|
+
Ot.render = function(t, e, i, s, o, n) {
|
|
765
|
+
return y(), x("div", { ref: "box", class: n.classes.root, style: n.style }, [q(t.$slots, "default"), f("div", null, [(y(!0), x($t, null, Pt(n.lineNodes, function(a) {
|
|
766
|
+
return y(), x(lt(a.component), { key: a.name, "default-class": a.class, "hover-class": a.hoverClass, "wrapper-class": a.wrapperClass, position: a.name, disabled: a.disabled, onDrag: function(h) {
|
|
767
|
+
return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);
|
|
768
|
+
}, onDragEnd: e[1] || (e[1] = function(h) {
|
|
769
|
+
return n.onEnd();
|
|
770
|
+
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
|
|
771
|
+
}), 128))]), (y(!0), x($t, null, Pt(n.handlerNodes, function(a) {
|
|
772
|
+
return y(), x("div", { key: a.name, style: a.wrapperStyle, class: a.wrapperClass }, [(y(), x(lt(a.component), { "default-class": a.class, "hover-class": a.hoverClass, "wrapper-class": a.wrapperClass, "horizontal-position": a.horizontalDirection, "vertical-position": a.verticalDirection, disabled: a.disabled, onDrag: function(h) {
|
|
773
|
+
return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);
|
|
774
|
+
}, onDragEnd: e[2] || (e[2] = function(h) {
|
|
775
|
+
return n.onEnd();
|
|
776
|
+
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
777
|
+
}), 128))], 6);
|
|
778
|
+
};
|
|
779
|
+
var ui = L("vue-draggable-area"), jt = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
780
|
+
return { default: ui() };
|
|
781
|
+
} }, beforeMount: function() {
|
|
782
|
+
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
783
|
+
}, beforeUnmount: function() {
|
|
784
|
+
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
785
|
+
}, mounted: function() {
|
|
786
|
+
this.touches = [], this.touchStarted = !1;
|
|
787
|
+
}, methods: { onTouchStart: function(t) {
|
|
788
|
+
if (t.cancelable) {
|
|
789
|
+
var e = this.movable && t.touches.length === 1;
|
|
790
|
+
e && (this.touches = V(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
|
|
791
|
+
}
|
|
792
|
+
}, onTouchEnd: function() {
|
|
793
|
+
this.touchStarted = !1, this.processEnd();
|
|
794
|
+
}, onTouchMove: function(t) {
|
|
795
|
+
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : re({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: t.touches[0].clientX, y: t.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }), this.touchStarted = !0));
|
|
796
|
+
}, onMouseDown: function(t) {
|
|
797
|
+
if (this.movable && t.button === 0) {
|
|
798
|
+
var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };
|
|
799
|
+
this.touches = [e], this.initAnchor(e), t.stopPropagation();
|
|
800
|
+
}
|
|
801
|
+
}, onMouseMove: function(t) {
|
|
802
|
+
this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.cancelable && t.preventDefault(), t.stopPropagation());
|
|
803
|
+
}, onMouseUp: function() {
|
|
804
|
+
this.processEnd();
|
|
805
|
+
}, initAnchor: function(t) {
|
|
806
|
+
var e = this.$refs.container.getBoundingClientRect(), i = e.left, s = e.top;
|
|
807
|
+
this.anchor = { x: t.clientX - i, y: t.clientY - s };
|
|
808
|
+
}, processMove: function(t, e) {
|
|
809
|
+
var i = V(e);
|
|
810
|
+
if (this.touches.length) {
|
|
811
|
+
var s = this.$refs.container.getBoundingClientRect(), o = s.left, n = s.top;
|
|
812
|
+
this.touches.length === 1 && i.length === 1 && this.$emit("move", new Wt({ left: i[0].clientX - (o + this.anchor.x), top: i[0].clientY - (n + this.anchor.y) }));
|
|
813
|
+
}
|
|
814
|
+
}, processEnd: function() {
|
|
815
|
+
this.touches.length && this.$emit("move-end"), this.touches = [];
|
|
816
|
+
} }, emits: ["move", "move-end"] };
|
|
817
|
+
jt.render = function(t, e, i, s, o, n) {
|
|
818
|
+
return y(), x("div", { ref: "container", onTouchstart: e[1] || (e[1] = function() {
|
|
819
|
+
return n.onTouchStart && n.onTouchStart.apply(n, arguments);
|
|
820
|
+
}), onMousedown: e[2] || (e[2] = function() {
|
|
821
|
+
return n.onMouseDown && n.onMouseDown.apply(n, arguments);
|
|
822
|
+
}) }, [q(t.$slots, "default")], 544);
|
|
823
|
+
};
|
|
824
|
+
function zt(t) {
|
|
825
|
+
var e, i;
|
|
826
|
+
return { rotate: t.rotate || 0, flip: { horizontal: ((e = t?.flip) === null || e === void 0 ? void 0 : e.horizontal) || !1, vertical: ((i = t?.flip) === null || i === void 0 ? void 0 : i.vertical) || !1 } };
|
|
827
|
+
}
|
|
828
|
+
function di(t) {
|
|
829
|
+
return new Promise(function(e, i) {
|
|
830
|
+
try {
|
|
831
|
+
if (t) if (/^data:/i.test(t)) e(function(r) {
|
|
832
|
+
r = r.replace(/^data:([^;]+);base64,/gim, "");
|
|
833
|
+
for (var l = atob(r), c = l.length, u = new ArrayBuffer(c), d = new Uint8Array(u), m = 0; m < c; m++) d[m] = l.charCodeAt(m);
|
|
834
|
+
return u;
|
|
835
|
+
}(t));
|
|
836
|
+
else if (/^blob:/i.test(t)) {
|
|
837
|
+
var s = new FileReader();
|
|
838
|
+
s.onload = function(r) {
|
|
839
|
+
e(r.target.result);
|
|
840
|
+
}, n = t, a = function(r) {
|
|
841
|
+
s.readAsArrayBuffer(r);
|
|
842
|
+
}, (h = new XMLHttpRequest()).open("GET", n, !0), h.responseType = "blob", h.onload = function() {
|
|
843
|
+
this.status != 200 && this.status !== 0 || a(this.response);
|
|
844
|
+
}, h.send();
|
|
845
|
+
} else {
|
|
846
|
+
var o = new XMLHttpRequest();
|
|
847
|
+
o.onreadystatechange = function() {
|
|
848
|
+
o.readyState === 4 && (o.status === 200 || o.status === 0 ? e(o.response) : i("Warning: could not load an image to parse its orientation"), o = null);
|
|
849
|
+
}, o.onprogress = function() {
|
|
850
|
+
o.getResponseHeader("content-type") !== "image/jpeg" && o.abort();
|
|
851
|
+
}, o.withCredentials = !1, o.open("GET", t, !0), o.responseType = "arraybuffer", o.send(null);
|
|
852
|
+
}
|
|
853
|
+
else i("Error: the image is empty");
|
|
854
|
+
} catch (r) {
|
|
855
|
+
i(r);
|
|
856
|
+
}
|
|
857
|
+
var n, a, h;
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
function de(t) {
|
|
861
|
+
var e = t.rotate, i = t.flip, s = t.scaleX, o = t.scaleY, n = "";
|
|
862
|
+
return n += " rotate(" + e + "deg) ", n += " scaleX(" + s * (i.horizontal ? -1 : 1) + ") ", n += " scaleY(" + o * (i.vertical ? -1 : 1) + ") ";
|
|
863
|
+
}
|
|
864
|
+
function mi(t) {
|
|
865
|
+
try {
|
|
866
|
+
var e, i = new DataView(t), s = void 0, o = void 0, n = void 0, a = void 0;
|
|
867
|
+
if (i.getUint8(0) === 255 && i.getUint8(1) === 216) for (var h = i.byteLength, r = 2; r + 1 < h; ) {
|
|
868
|
+
if (i.getUint8(r) === 255 && i.getUint8(r + 1) === 225) {
|
|
869
|
+
n = r;
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
r++;
|
|
873
|
+
}
|
|
874
|
+
if (n && (s = n + 10, function(m, p, v) {
|
|
875
|
+
var T, $ = "";
|
|
876
|
+
for (T = p, v += p; T < v; T++) $ += String.fromCharCode(m.getUint8(T));
|
|
877
|
+
return $;
|
|
878
|
+
}(i, n + 4, 4) === "Exif")) {
|
|
879
|
+
var l = i.getUint16(s);
|
|
880
|
+
if (((o = l === 18761) || l === 19789) && i.getUint16(s + 2, o) === 42) {
|
|
881
|
+
var c = i.getUint32(s + 4, o);
|
|
882
|
+
c >= 8 && (a = s + c);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
if (a) {
|
|
886
|
+
for (var u = i.getUint16(a, o), d = 0; d < u; d++)
|
|
887
|
+
if (r = a + 12 * d + 2, i.getUint16(r, o) === 274) {
|
|
888
|
+
r += 8, e = i.getUint16(r, o), i.setUint16(r, 1, o);
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
return e;
|
|
893
|
+
} catch {
|
|
894
|
+
return null;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
function Jt(t, e) {
|
|
898
|
+
var i = e.getBoundingClientRect(), s = i.left, o = i.top, n = { left: 0, top: 0 }, a = 0;
|
|
899
|
+
return t.forEach(function(h) {
|
|
900
|
+
n.left += (h.clientX - s) / t.length, n.top += (h.clientY - o) / t.length;
|
|
901
|
+
}), t.forEach(function(h) {
|
|
902
|
+
a += re({ x: n.left, y: n.top }, { x: h.clientX - s, y: h.clientY - o });
|
|
903
|
+
}), { centerMass: n, spread: a, count: t.length };
|
|
904
|
+
}
|
|
905
|
+
var me = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {
|
|
906
|
+
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
907
|
+
}, beforeUnmount: function() {
|
|
908
|
+
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
909
|
+
}, created: function() {
|
|
910
|
+
this.transforming = !1, this.debouncedProcessEnd = Mt(this.processEnd), this.touches = [];
|
|
911
|
+
}, methods: { processMove: function(t, e) {
|
|
912
|
+
if (this.touches.length) {
|
|
913
|
+
if (this.touches.length === 1 && e.length === 1) this.$emit("move", new tt({ left: this.touches[0].clientX - e[0].clientX, top: this.touches[0].clientY - e[0].clientY }));
|
|
914
|
+
else if (this.touches.length > 1 && this.touchResize) {
|
|
915
|
+
var i = Jt(e, this.$refs.container), s = this.oldGeometricProperties;
|
|
916
|
+
s.count === i.count && s.count > 1 && this.$emit("resize", new tt({ left: s.centerMass.left - i.centerMass.left, top: s.centerMass.top - i.centerMass.top }, { factor: s.spread / i.spread, center: i.centerMass })), this.oldGeometricProperties = i;
|
|
917
|
+
}
|
|
918
|
+
this.touches = e;
|
|
919
|
+
}
|
|
920
|
+
}, processEnd: function() {
|
|
921
|
+
this.transforming && (this.transforming = !1, this.$emit("transform-end"));
|
|
922
|
+
}, processStart: function() {
|
|
923
|
+
this.transforming = !0, this.debouncedProcessEnd.clear();
|
|
924
|
+
}, processEvent: function(t) {
|
|
925
|
+
return this.eventsFilter ? this.eventsFilter(t, this.transforming) !== !1 : (t.preventDefault(), t.stopPropagation(), !0);
|
|
926
|
+
}, onTouchStart: function(t) {
|
|
927
|
+
if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {
|
|
928
|
+
var e = this.$refs.container, i = e.getBoundingClientRect(), s = i.left, o = i.top, n = i.bottom, a = i.right;
|
|
929
|
+
this.touches = V(t.touches).filter(function(h) {
|
|
930
|
+
return h.clientX > s && h.clientX < a && h.clientY > o && h.clientY < n;
|
|
931
|
+
}), this.oldGeometricProperties = Jt(this.touches, e);
|
|
932
|
+
}
|
|
933
|
+
}, onTouchEnd: function(t) {
|
|
934
|
+
t.touches.length === 0 && (this.touches = [], this.processEnd());
|
|
935
|
+
}, onTouchMove: function(t) {
|
|
936
|
+
var e = this;
|
|
937
|
+
if (this.touches.length) {
|
|
938
|
+
var i = V(t.touches).filter(function(s) {
|
|
939
|
+
return !s.identifier || e.touches.find(function(o) {
|
|
940
|
+
return o.identifier === s.identifier;
|
|
941
|
+
});
|
|
942
|
+
});
|
|
943
|
+
this.processEvent(t) && (this.processMove(t, i), this.processStart());
|
|
944
|
+
}
|
|
945
|
+
}, onMouseDown: function(t) {
|
|
946
|
+
if (this.mouseMove && "buttons" in t && t.buttons === 1 && this.processEvent(t)) {
|
|
947
|
+
var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };
|
|
948
|
+
this.touches = [e], this.processStart();
|
|
949
|
+
}
|
|
950
|
+
}, onMouseMove: function(t) {
|
|
951
|
+
this.touches.length && this.processEvent(t) && this.processMove(t, [{ clientX: t.clientX, clientY: t.clientY }]);
|
|
952
|
+
}, onMouseUp: function() {
|
|
953
|
+
this.touches = [], this.processEnd();
|
|
954
|
+
}, onWheel: function(t) {
|
|
955
|
+
if (this.wheelResize && this.processEvent(t)) {
|
|
956
|
+
var e = this.$refs.container.getBoundingClientRect(), i = e.left, s = e.top, o = 1 + this.wheelResize.ratio * (a = t.deltaY || t.detail || t.wheelDelta, (h = +a) == 0 || oe(h) ? h : h > 0 ? 1 : -1), n = { left: t.clientX - i, top: t.clientY - s };
|
|
957
|
+
this.$emit("resize", new tt({}, { factor: o, center: n })), this.touches.length || this.debouncedProcessEnd();
|
|
958
|
+
}
|
|
959
|
+
var a, h;
|
|
960
|
+
} }, emits: ["resize", "move", "transform-end"] };
|
|
961
|
+
me.render = function(t, e, i, s, o, n) {
|
|
962
|
+
return y(), x("div", { ref: "container", onTouchstart: e[1] || (e[1] = function() {
|
|
963
|
+
return n.onTouchStart && n.onTouchStart.apply(n, arguments);
|
|
964
|
+
}), onMousedown: e[2] || (e[2] = function() {
|
|
965
|
+
return n.onMouseDown && n.onMouseDown.apply(n, arguments);
|
|
966
|
+
}), onWheel: e[3] || (e[3] = function() {
|
|
967
|
+
return n.onWheel && n.onWheel.apply(n, arguments);
|
|
968
|
+
}) }, [q(t.$slots, "default")], 544);
|
|
969
|
+
};
|
|
970
|
+
var Tt = { components: { TransformableImage: me }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
|
|
971
|
+
Tt.render = function(t, e, i, s, o, n) {
|
|
972
|
+
var a = D("transformable-image");
|
|
973
|
+
return y(), x(a, { "touch-move": i.touchMove, "touch-resize": i.touchResize, "mouse-move": i.mouseMove, "wheel-resize": i.wheelResize, onMove: e[1] || (e[1] = function(h) {
|
|
974
|
+
return t.$emit("move", h);
|
|
975
|
+
}), onResize: e[2] || (e[2] = function(h) {
|
|
976
|
+
return t.$emit("resize", h);
|
|
977
|
+
}) }, { default: A(function() {
|
|
978
|
+
return [q(t.$slots, "default")];
|
|
979
|
+
}), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
|
|
980
|
+
};
|
|
981
|
+
var at = L("vue-preview"), ge = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
|
|
982
|
+
return {};
|
|
983
|
+
} }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
|
|
984
|
+
return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
|
|
985
|
+
}, computed: { classes: function() {
|
|
986
|
+
return { root: at({ fill: this.fill }), wrapper: at("wrapper"), imageWrapper: at("image-wrapper"), image: R(at("image"), this.imageClass) };
|
|
987
|
+
}, style: function() {
|
|
988
|
+
if (this.fill) return {};
|
|
989
|
+
var t = {};
|
|
990
|
+
return this.width && (t.width = "".concat(this.size.width, "px")), this.height && (t.height = "".concat(this.size.height, "px")), this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
|
|
991
|
+
}, wrapperStyle: function() {
|
|
992
|
+
var t = { width: "".concat(this.size.width, "px"), height: "".concat(this.size.height, "px"), left: "calc(50% - ".concat(this.size.width / 2, "px)"), top: "calc(50% - ".concat(this.size.height / 2, "px)") };
|
|
993
|
+
return this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
|
|
994
|
+
}, imageStyle: function() {
|
|
995
|
+
if (this.coordinates && this.image) {
|
|
996
|
+
var t = this.coordinates.width / this.size.width, e = b(b({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, s = this.imageSize.height, o = ce({ width: i, height: s }, e.rotate), n = { width: "".concat(i, "px"), height: "".concat(s, "px"), left: "0px", top: "0px" }, a = { rotate: { left: (i - o.width) * e.scaleX / 2, top: (s - o.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * s / 2 } };
|
|
997
|
+
return n.transform = `translate(
|
|
998
|
+
`.concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, "px,").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, "px) ") + de(e), this.transitions && this.transitions.enabled && (n.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), n;
|
|
999
|
+
}
|
|
1000
|
+
return {};
|
|
1001
|
+
}, size: function() {
|
|
1002
|
+
return { width: this.width || this.calculatedSize.width, height: this.height || this.calculatedSize.height };
|
|
1003
|
+
}, imageSize: function() {
|
|
1004
|
+
return { width: this.image.width || this.calculatedImageSize.width, height: this.image.height || this.calculatedImageSize.height };
|
|
1005
|
+
} }, watch: { image: function(t) {
|
|
1006
|
+
(t.width || t.height) && this.onChangeImage();
|
|
1007
|
+
} }, mounted: function() {
|
|
1008
|
+
var t = this;
|
|
1009
|
+
this.onChangeImage(), this.$refs.image.addEventListener("load", function() {
|
|
1010
|
+
t.refreshImage();
|
|
1011
|
+
}), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
1012
|
+
}, unmounted: function() {
|
|
1013
|
+
window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh);
|
|
1014
|
+
}, methods: { refreshImage: function() {
|
|
1015
|
+
var t = this.$refs.image;
|
|
1016
|
+
this.calculatedImageSize.height = t.naturalHeight, this.calculatedImageSize.width = t.naturalWidth;
|
|
1017
|
+
}, refresh: function() {
|
|
1018
|
+
var t = this.$refs.root;
|
|
1019
|
+
this.width || (this.calculatedSize.width = t.clientWidth), this.height || (this.calculatedSize.height = t.clientHeight);
|
|
1020
|
+
}, onChangeImage: function() {
|
|
1021
|
+
var t = this.$refs.image;
|
|
1022
|
+
t && t.complete && this.refreshImage(), this.refresh();
|
|
1023
|
+
} } };
|
|
1024
|
+
ge.render = function(t, e, i, s, o, n) {
|
|
1025
|
+
return y(), x("div", { ref: "root", class: n.classes.root, style: n.style }, [f("div", { ref: "wrapper", class: n.classes.wrapper, style: n.wrapperStyle }, [te(f("img", { ref: "image", src: i.image && i.image.src, class: n.classes.image, style: n.imageStyle }, null, 14, ["src"]), [[ee, i.image && i.image.src]])], 6)], 6);
|
|
1026
|
+
};
|
|
1027
|
+
var Dt = { components: { Preview: ge }, inheritAttrs: !1 };
|
|
1028
|
+
Dt.render = function(t, e, i, s, o, n) {
|
|
1029
|
+
var a = D("preview");
|
|
1030
|
+
return y(), x(a, ie(t.$attrs, { fill: !0 }), null, 16);
|
|
1031
|
+
};
|
|
1032
|
+
var xt = L("vue-rectangle-stencil"), Ht = { name: "RectangleStencil", components: { StencilPreview: Dt, BoundingBox: Ot, DraggableArea: jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
1033
|
+
return mt;
|
|
1034
|
+
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
1035
|
+
return gt;
|
|
1036
|
+
} }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
|
|
1037
|
+
return {};
|
|
1038
|
+
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
1039
|
+
return {};
|
|
1040
|
+
} }, handlersClasses: { type: Object, default: function() {
|
|
1041
|
+
return {};
|
|
1042
|
+
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
1043
|
+
return {};
|
|
1044
|
+
} } }, data: function() {
|
|
1045
|
+
return { moving: !1, resizing: !1 };
|
|
1046
|
+
}, computed: { classes: function() {
|
|
1047
|
+
return { stencil: R(xt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: R(xt("preview"), this.previewClass), boundingBox: R(xt("bounding-box"), this.boundingBoxClass) };
|
|
1048
|
+
}, style: function() {
|
|
1049
|
+
var t = this.stencilCoordinates, e = t.height, i = t.width, s = t.left, o = t.top, n = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(s, "px, ").concat(o, "px)") };
|
|
1050
|
+
return this.transitions && this.transitions.enabled && (n.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), n;
|
|
1051
|
+
} }, methods: { onMove: function(t) {
|
|
1052
|
+
this.$emit("move", t), this.moving = !0;
|
|
1053
|
+
}, onMoveEnd: function() {
|
|
1054
|
+
this.$emit("move-end"), this.moving = !1;
|
|
1055
|
+
}, onResize: function(t) {
|
|
1056
|
+
this.$emit("resize", t), this.resizing = !0;
|
|
1057
|
+
}, onResizeEnd: function() {
|
|
1058
|
+
this.$emit("resize-end"), this.resizing = !1;
|
|
1059
|
+
}, aspectRatios: function() {
|
|
1060
|
+
return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
|
|
1061
|
+
} }, emits: ["resize", "resize-end", "move", "move-end"] };
|
|
1062
|
+
Ht.render = function(t, e, i, s, o, n) {
|
|
1063
|
+
var a = D("stencil-preview"), h = D("draggable-area"), r = D("bounding-box");
|
|
1064
|
+
return y(), x("div", { class: n.classes.stencil, style: n.style }, [f(r, { width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, transitions: i.transitions, class: n.classes.boundingBox, handlers: i.handlers, "handlers-component": i.handlersComponent, "handlers-classes": i.handlersClasses, "handlers-wrappers-classes": i.handlersWrappersClasses, lines: i.lines, "lines-component": i.linesComponent, "lines-classes": i.linesClasses, "lines-wrappers-classes": i.linesWrappersClasses, resizable: i.resizable, onResize: n.onResize, onResizeEnd: n.onResizeEnd }, { default: A(function() {
|
|
1065
|
+
return [f(h, { movable: i.movable, onMove: n.onMove, onMoveEnd: n.onMoveEnd }, { default: A(function() {
|
|
1066
|
+
return [f(a, { image: i.image, coordinates: i.coordinates, width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, class: n.classes.preview, transitions: i.transitions }, null, 8, ["image", "coordinates", "width", "height", "class", "transitions"])];
|
|
1067
|
+
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
1068
|
+
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
1069
|
+
};
|
|
1070
|
+
var Rt = L("vue-circle-stencil"), fe = { components: { StencilPreview: Dt, BoundingBox: Ot, DraggableArea: jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object, default: function() {
|
|
1071
|
+
return { eastNorth: !0, westNorth: !0, westSouth: !0, eastSouth: !0 };
|
|
1072
|
+
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
1073
|
+
return mt;
|
|
1074
|
+
} }, handlersClasses: { type: Object, default: function() {
|
|
1075
|
+
return {};
|
|
1076
|
+
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
1077
|
+
return {};
|
|
1078
|
+
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
1079
|
+
return gt;
|
|
1080
|
+
} }, linesClasses: { type: Object, default: function() {
|
|
1081
|
+
return {};
|
|
1082
|
+
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
1083
|
+
return {};
|
|
1084
|
+
} }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String } }, data: function() {
|
|
1085
|
+
return { moving: !1, resizing: !1 };
|
|
1086
|
+
}, computed: { classes: function() {
|
|
1087
|
+
return { stencil: R(Rt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: R(Rt("preview"), this.previewClass), boundingBox: R(Rt("bounding-box"), this.boundingBoxClass) };
|
|
1088
|
+
}, style: function() {
|
|
1089
|
+
var t = this.stencilCoordinates, e = t.height, i = t.width, s = t.left, o = t.top, n = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(s, "px, ").concat(o, "px)") };
|
|
1090
|
+
return this.transitions && this.transitions.enabled && (n.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), n;
|
|
1091
|
+
} }, methods: { onMove: function(t) {
|
|
1092
|
+
this.$emit("move", t), this.moving = !0;
|
|
1093
|
+
}, onMoveEnd: function() {
|
|
1094
|
+
this.$emit("move-end"), this.moving = !1;
|
|
1095
|
+
}, onResize: function(t) {
|
|
1096
|
+
this.$emit("resize", t), this.resizing = !0;
|
|
1097
|
+
}, onResizeEnd: function() {
|
|
1098
|
+
this.$emit("resize-end"), this.resizing = !1;
|
|
1099
|
+
}, aspectRatios: function() {
|
|
1100
|
+
return { minimum: 1, maximum: 1 };
|
|
1101
|
+
} }, emits: ["resize", "resize-end", "move", "move-end"] };
|
|
1102
|
+
fe.render = function(t, e, i, s, o, n) {
|
|
1103
|
+
var a = D("stencil-preview"), h = D("draggable-area"), r = D("bounding-box");
|
|
1104
|
+
return y(), x("div", { class: n.classes.stencil, style: n.style }, [f(r, { width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, transitions: i.transitions, class: n.classes.boundingBox, handlers: i.handlers, "handlers-component": i.handlersComponent, "handlers-classes": i.handlersClasses, "handlers-wrappers-classes": i.handlersWrappersClasses, lines: i.lines, "lines-component": i.linesComponent, "lines-classes": i.linesClasses, "lines-wrappers-classes": i.linesWrappersClasses, resizable: i.resizable, onResize: n.onResize, onResizeEnd: n.onResizeEnd }, { default: A(function() {
|
|
1105
|
+
return [f(h, { movable: i.movable, onMove: n.onMove, onMoveEnd: n.onMoveEnd }, { default: A(function() {
|
|
1106
|
+
return [f(a, { image: i.image, coordinates: i.coordinates, width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, class: n.classes.preview, transitions: i.transitions }, null, 8, ["image", "coordinates", "width", "height", "class", "transitions"])];
|
|
1107
|
+
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
1108
|
+
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
1109
|
+
};
|
|
1110
|
+
var gi = ["transitions"], _ = L("vue-advanced-cropper"), pe = { name: "Cropper", components: { BackgroundWrapper: Tt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
1111
|
+
return Ht;
|
|
1112
|
+
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
1113
|
+
return Tt;
|
|
1114
|
+
} }, stencilProps: { type: Object, default: function() {
|
|
1115
|
+
return {};
|
|
1116
|
+
} }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(t) {
|
|
1117
|
+
return Ne.indexOf(t) !== -1;
|
|
1118
|
+
} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {
|
|
1119
|
+
return !(typeof t == "string" && t !== "fill" && t !== "fit");
|
|
1120
|
+
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {
|
|
1121
|
+
var e = t.event, i = t.coordinates, s = t.aspectRatio, o = t.positionRestrictions, n = t.sizeRestrictions, a = g(g({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = g({}, e.directions), l = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
|
|
1122
|
+
n.widthFrozen && (r.left = 0, r.right = 0), n.heightFrozen && (r.top = 0, r.bottom = 0), B.forEach(function(N) {
|
|
1123
|
+
l[N] || (r[N] = 0);
|
|
1124
|
+
});
|
|
1125
|
+
var c = P(a, r = Kt({ coordinates: a, directions: r, sizeRestrictions: n, positionRestrictions: o })).width, u = P(a, r).height, d = h.preserveRatio ? w(a) : wt(c / u, s);
|
|
1126
|
+
if (d) {
|
|
1127
|
+
var m = h.respectDirection;
|
|
1128
|
+
if (m || (m = a.width >= a.height || d === 1 ? "width" : "height"), m === "width") {
|
|
1129
|
+
var p = c / d - a.height;
|
|
1130
|
+
if (l.top && l.bottom) {
|
|
1131
|
+
var v = r.top, T = r.bottom;
|
|
1132
|
+
r.bottom = rt(p, T, v), r.top = rt(p, v, T);
|
|
1133
|
+
} else l.bottom ? r.bottom = p : l.top ? r.top = p : l.right ? r.right = 0 : l.left && (r.left = 0);
|
|
1134
|
+
} else if (m === "height") {
|
|
1135
|
+
var $ = a.width - u * d;
|
|
1136
|
+
if (l.left && l.right) {
|
|
1137
|
+
var U = r.left, X = r.right;
|
|
1138
|
+
r.left = -rt($, U, X), r.right = -rt($, X, U);
|
|
1139
|
+
} else l.left ? r.left = -$ : l.right ? r.right = -$ : l.top ? r.top = 0 : l.bottom && (r.bottom = 0);
|
|
1140
|
+
}
|
|
1141
|
+
r = Kt({ directions: r, coordinates: a, sizeRestrictions: n, positionRestrictions: o, preserveRatio: !0, compensate: h.compensate });
|
|
1142
|
+
}
|
|
1143
|
+
return c = P(a, r).width, u = P(a, r).height, (d = h.preserveRatio ? w(a) : wt(c / u, s)) && Math.abs(d - c / u) > 1e-3 && B.forEach(function(N) {
|
|
1144
|
+
l[N] || (r[N] = 0);
|
|
1145
|
+
}), Et({ event: new Wt({ left: -r.left, top: -r.top }), coordinates: { width: i.width + r.right + r.left, height: i.height + r.top + r.bottom, left: i.left, top: i.top }, positionRestrictions: o });
|
|
1146
|
+
} }, moveAlgorithm: { type: Function, default: Et }, initStretcher: { type: Function, default: function(t) {
|
|
1147
|
+
var e = t.stretcher, i = t.imageSize, s = w(i);
|
|
1148
|
+
e.style.width = i.width + "px", e.style.height = e.clientWidth / s + "px", e.style.width = e.clientWidth + "px";
|
|
1149
|
+
} }, fitCoordinates: { type: Function, default: function(t) {
|
|
1150
|
+
var e = t.visibleArea, i = t.coordinates, s = t.aspectRatio, o = t.sizeRestrictions, n = t.positionRestrictions, a = g(g({}, i), Y({ width: i.width, height: i.height, aspectRatio: s, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, o.minHeight), minWidth: Math.min(e.width, o.minWidth) } }));
|
|
1151
|
+
return a = E(a = W(a, Q(C(i), C(a))), dt(I(e), n));
|
|
1152
|
+
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
1153
|
+
var e = t.visibleArea, i = t.boundaries, s = t.getAreaRestrictions, o = t.coordinates, n = g({}, e);
|
|
1154
|
+
n.height = n.width / w(i), n.top += (e.height - n.height) / 2, (o.height - n.height > 0 || o.width - n.width > 0) && (n = H(n, Math.max(o.height / n.height, o.width / n.width)));
|
|
1155
|
+
var a = ct(J(o, I(n = H(n, ut(n, s({ visibleArea: n, type: "resize" }))))));
|
|
1156
|
+
return n.width < o.width && (a.left = 0), n.height < o.height && (a.top = 0), n = E(n = W(n, a), s({ visibleArea: n, type: "move" }));
|
|
1157
|
+
} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1158
|
+
var e = t.visibleArea, i = t.boundaries, s = t.imageSize, o = t.imageRestriction, n = t.type, a = {};
|
|
1159
|
+
return o === "fill-area" ? a = { left: 0, top: 0, right: s.width, bottom: s.height } : o === "fit-area" && (w(i) > w(s) ? (a = { top: 0, bottom: s.height }, e && n === "move" && (e.width > s.width ? (a.left = -(e.width - s.width) / 2, a.right = s.width - a.left) : (a.left = 0, a.right = s.width))) : (a = { left: 0, right: s.width }, e && n === "move" && (e.height > s.height ? (a.top = -(e.height - s.height) / 2, a.bottom = s.height - a.top) : (a.top = 0, a.bottom = s.height)))), a;
|
|
1160
|
+
} }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1161
|
+
return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };
|
|
1162
|
+
} }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1163
|
+
var e = t.imageSize, i = {};
|
|
1164
|
+
return t.imageRestriction !== "none" && (i = { left: 0, top: 0, right: e.width, bottom: e.height }), i;
|
|
1165
|
+
} } }, data: function() {
|
|
1166
|
+
return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: b({}, Zt) };
|
|
1167
|
+
}, computed: { image: function() {
|
|
1168
|
+
return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
|
|
1169
|
+
}, imageTransforms: function() {
|
|
1170
|
+
return { rotate: this.appliedImageTransforms.rotate, flip: { horizontal: this.appliedImageTransforms.flip.horizontal, vertical: this.appliedImageTransforms.flip.vertical }, translateX: this.visibleArea ? this.visibleArea.left / this.coefficient : 0, translateY: this.visibleArea ? this.visibleArea.top / this.coefficient : 0, scaleX: 1 / this.coefficient, scaleY: 1 / this.coefficient };
|
|
1171
|
+
}, imageSize: function() {
|
|
1172
|
+
var t = function(e) {
|
|
1173
|
+
return e * Math.PI / 180;
|
|
1174
|
+
}(this.imageTransforms.rotate);
|
|
1175
|
+
return { width: Math.abs(this.imageAttributes.width * Math.cos(t)) + Math.abs(this.imageAttributes.height * Math.sin(t)), height: Math.abs(this.imageAttributes.width * Math.sin(t)) + Math.abs(this.imageAttributes.height * Math.cos(t)) };
|
|
1176
|
+
}, initialized: function() {
|
|
1177
|
+
return !!(this.visibleArea && this.imageLoaded);
|
|
1178
|
+
}, settings: function() {
|
|
1179
|
+
var t = St(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
|
|
1180
|
+
return { moveImage: St(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: t };
|
|
1181
|
+
}, coefficient: function() {
|
|
1182
|
+
return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
|
|
1183
|
+
}, areaRestrictions: function() {
|
|
1184
|
+
return this.imageLoaded ? this.areaRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction, boundaries: this.boundaries }) : {};
|
|
1185
|
+
}, transitionsOptions: function() {
|
|
1186
|
+
return { enabled: this.transitionsActive, timingFunction: "ease-in-out", time: 350 };
|
|
1187
|
+
}, sizeRestrictions: function() {
|
|
1188
|
+
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
1189
|
+
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: M(this.minWidth) ? 0 : st(this.minWidth), minHeight: M(this.minHeight) ? 0 : st(this.minHeight), maxWidth: M(this.maxWidth) ? 1 / 0 : st(this.maxWidth), maxHeight: M(this.maxHeight) ? 1 / 0 : st(this.maxHeight) });
|
|
1190
|
+
if (t = function(s) {
|
|
1191
|
+
var o = s.areaRestrictions, n = s.sizeRestrictions, a = s.boundaries, h = s.positionRestrictions, r = g(g({}, n), { minWidth: n.minWidth !== void 0 ? n.minWidth : 0, minHeight: n.minHeight !== void 0 ? n.minHeight : 0, maxWidth: n.maxWidth !== void 0 ? n.maxWidth : 1 / 0, maxHeight: n.maxHeight !== void 0 ? n.maxHeight : 1 / 0 });
|
|
1192
|
+
h.left !== void 0 && h.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, h.right - h.left)), h.bottom !== void 0 && h.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, h.bottom - h.top));
|
|
1193
|
+
var l = Ct(o), c = le(a, l);
|
|
1194
|
+
return l.width < 1 / 0 && (!r.maxWidth || r.maxWidth > c.width) && (r.maxWidth = Math.min(r.maxWidth, c.width)), l.height < 1 / 0 && (!r.maxHeight || r.maxHeight > c.height) && (r.maxHeight = Math.min(r.maxHeight, c.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;
|
|
1195
|
+
}({ sizeRestrictions: t, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {
|
|
1196
|
+
var e = this.getStencilSize(), i = Ct(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
|
|
1197
|
+
t.maxWidth = Math.min(t.maxWidth, i.width * e.width / this.boundaries.width), t.maxHeight = Math.min(t.maxHeight, i.height * e.height / this.boundaries.height), t.maxWidth < t.minWidth && (t.minWidth = t.maxWidth), t.maxHeight < t.minHeight && (t.minHeight = t.maxHeight);
|
|
1198
|
+
}
|
|
1199
|
+
return t;
|
|
1200
|
+
}
|
|
1201
|
+
return { minWidth: 0, minHeight: 0, maxWidth: 0, maxHeight: 0 };
|
|
1202
|
+
}, positionRestrictions: function() {
|
|
1203
|
+
return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });
|
|
1204
|
+
}, classes: function() {
|
|
1205
|
+
return { cropper: _(), image: R(_("image"), this.imageClass), stencil: _("stencil"), boundaries: R(_("boundaries"), this.boundariesClass), stretcher: R(_("stretcher")), background: R(_("background"), this.backgroundClass), foreground: R(_("foreground"), this.foregroundClass), imageWrapper: R(_("image-wrapper")), cropperWrapper: R(_("cropper-wrapper")) };
|
|
1206
|
+
}, stencilCoordinates: function() {
|
|
1207
|
+
if (this.initialized) {
|
|
1208
|
+
var t = this.coordinates, e = t.width, i = t.height, s = t.left, o = t.top;
|
|
1209
|
+
return { width: e / this.coefficient, height: i / this.coefficient, left: (s - this.visibleArea.left) / this.coefficient, top: (o - this.visibleArea.top) / this.coefficient };
|
|
1210
|
+
}
|
|
1211
|
+
return this.defaultCoordinates();
|
|
1212
|
+
}, boundariesStyle: function() {
|
|
1213
|
+
var t = { width: this.boundaries.width ? "".concat(Math.round(this.boundaries.width), "px") : "auto", height: this.boundaries.height ? "".concat(Math.round(this.boundaries.height), "px") : "auto", transition: "opacity ".concat(this.transitionTime, "ms"), pointerEvents: this.imageLoaded ? "all" : "none" };
|
|
1214
|
+
return this.imageLoaded || (t.opacity = "0"), t;
|
|
1215
|
+
}, imageStyle: function() {
|
|
1216
|
+
var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, i = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, s = b(b({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), o = { width: "".concat(t.width, "px"), height: "".concat(t.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-e.left - i.left - this.imageTransforms.translateX, "px, ").concat(-e.top - i.top - this.imageTransforms.translateY, "px)") + de(s) };
|
|
1217
|
+
return this.transitionsOptions.enabled && (o.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), o;
|
|
1218
|
+
} }, watch: { src: function() {
|
|
1219
|
+
this.onChangeImage();
|
|
1220
|
+
}, stencilComponent: function() {
|
|
1221
|
+
var t = this;
|
|
1222
|
+
this.$nextTick(function() {
|
|
1223
|
+
t.resetCoordinates(), t.runAutoZoom("setCoordinates"), t.onChange();
|
|
1224
|
+
});
|
|
1225
|
+
}, minWidth: function() {
|
|
1226
|
+
this.onPropsChange();
|
|
1227
|
+
}, maxWidth: function() {
|
|
1228
|
+
this.onPropsChange();
|
|
1229
|
+
}, minHeight: function() {
|
|
1230
|
+
this.onPropsChange();
|
|
1231
|
+
}, maxHeight: function() {
|
|
1232
|
+
this.onPropsChange();
|
|
1233
|
+
}, imageRestriction: function() {
|
|
1234
|
+
this.reset();
|
|
1235
|
+
}, stencilProps: function(t, e) {
|
|
1236
|
+
["aspectRatio", "minAspectRatio", "maxAspectRatio"].find(function(i) {
|
|
1237
|
+
return t[i] !== e[i];
|
|
1238
|
+
}) && this.$nextTick(this.onPropsChange);
|
|
1239
|
+
} }, created: function() {
|
|
1240
|
+
this.debouncedUpdate = Mt(this.update, this.debounce), this.debouncedDisableTransitions = Mt(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
|
|
1241
|
+
}, mounted: function() {
|
|
1242
|
+
this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
1243
|
+
}, unmounted: function() {
|
|
1244
|
+
window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();
|
|
1245
|
+
}, methods: { getResult: function() {
|
|
1246
|
+
var t = this.initialized ? this.prepareResult(b({}, this.coordinates)) : this.defaultCoordinates(), e = { rotate: this.imageTransforms.rotate % 360, flip: b({}, this.imageTransforms.flip) };
|
|
1247
|
+
if (this.src && this.imageLoaded) {
|
|
1248
|
+
var i = this;
|
|
1249
|
+
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? b({}, this.visibleArea) : null, imageTransforms: e, get canvas() {
|
|
1250
|
+
return i.canvas ? i.getCanvas() : void 0;
|
|
1251
|
+
} };
|
|
1252
|
+
}
|
|
1253
|
+
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? b({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };
|
|
1254
|
+
}, zoom: function(t, e) {
|
|
1255
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = i.transitions, o = s === void 0 || s;
|
|
1256
|
+
this.onManipulateImage(new tt({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: o });
|
|
1257
|
+
}, move: function(t, e) {
|
|
1258
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = i.transitions, o = s === void 0 || s;
|
|
1259
|
+
this.onManipulateImage(new tt({ left: t || 0, top: e || 0 }), { normalize: !1, transitions: o });
|
|
1260
|
+
}, setCoordinates: function(t) {
|
|
1261
|
+
var e = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = i.autoZoom, o = s === void 0 || s, n = i.transitions, a = n === void 0 || n;
|
|
1262
|
+
this.$nextTick(function() {
|
|
1263
|
+
e.imageLoaded ? (e.transitionsActive || (a && e.enableTransitions(), e.coordinates = e.applyTransform(t), o && e.runAutoZoom("setCoordinates"), a && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;
|
|
1264
|
+
});
|
|
1265
|
+
}, refresh: function() {
|
|
1266
|
+
var t = this, e = this.$refs.image;
|
|
1267
|
+
if (this.src && e) return this.initialized ? this.updateVisibleArea().then(function() {
|
|
1268
|
+
t.onChange();
|
|
1269
|
+
}) : this.resetVisibleArea().then(function() {
|
|
1270
|
+
t.onChange();
|
|
1271
|
+
});
|
|
1272
|
+
}, reset: function() {
|
|
1273
|
+
var t = this;
|
|
1274
|
+
return this.resetVisibleArea().then(function() {
|
|
1275
|
+
t.onChange(!1);
|
|
1276
|
+
});
|
|
1277
|
+
}, awaitRender: function(t) {
|
|
1278
|
+
var e = this;
|
|
1279
|
+
this.awaiting || (this.awaiting = !0, this.$nextTick(function() {
|
|
1280
|
+
t(), e.awaiting = !1;
|
|
1281
|
+
}));
|
|
1282
|
+
}, prepareResult: function(t) {
|
|
1283
|
+
return this.roundResult ? function(e) {
|
|
1284
|
+
var i = e.coordinates, s = e.sizeRestrictions, o = e.positionRestrictions, n = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };
|
|
1285
|
+
return n.width > s.maxWidth ? n.width = Math.floor(i.width) : n.width < s.minWidth && (n.width = Math.ceil(i.width)), n.height > s.maxHeight ? n.height = Math.floor(i.height) : n.height < s.minHeight && (n.height = Math.ceil(i.height)), E(n, o);
|
|
1286
|
+
}(b(b({}, this.getPublicProperties()), {}, { positionRestrictions: ot(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;
|
|
1287
|
+
}, processAutoZoom: function(t, e, i, s) {
|
|
1288
|
+
var o = this.autoZoomAlgorithm;
|
|
1289
|
+
o || (o = this.stencilSize ? qe : this.autoZoom ? Ge : Qe);
|
|
1290
|
+
var n = o({ event: { type: t, params: s }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
1291
|
+
return b(b({}, n), {}, { changed: !qt(n.visibleArea, e) || !qt(n.coordinates, i) });
|
|
1292
|
+
}, runAutoZoom: function(t) {
|
|
1293
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, s = i !== void 0 && i, o = Pe(e, gi), n = this.processAutoZoom(t, this.visibleArea, this.coordinates, o), a = n.visibleArea, h = n.coordinates, r = n.changed;
|
|
1294
|
+
s && r && this.enableTransitions(), this.visibleArea = a, this.coordinates = h, s && r && this.debouncedDisableTransitions();
|
|
1295
|
+
}, normalizeEvent: function(t) {
|
|
1296
|
+
return function(e) {
|
|
1297
|
+
var i = e.event, s = e.visibleArea, o = e.coefficient;
|
|
1298
|
+
if (i.type === "manipulateImage") return g(g({}, i), { move: { left: i.move && i.move.left ? o * i.move.left : 0, top: i.move && i.move.top ? o * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * o + s.left, top: i.scale.center.top * o + s.top } : null } });
|
|
1299
|
+
if (i.type === "resize") {
|
|
1300
|
+
var n = g(g({}, i), { directions: g({}, i.directions) });
|
|
1301
|
+
return B.forEach(function(h) {
|
|
1302
|
+
n.directions[h] *= o;
|
|
1303
|
+
}), n;
|
|
1304
|
+
}
|
|
1305
|
+
if (i.type === "move") {
|
|
1306
|
+
var a = g(g({}, i), { directions: g({}, i.directions) });
|
|
1307
|
+
return Ue.forEach(function(h) {
|
|
1308
|
+
a.directions[h] *= o;
|
|
1309
|
+
}), a;
|
|
1310
|
+
}
|
|
1311
|
+
return i;
|
|
1312
|
+
}(b(b({}, this.getPublicProperties()), {}, { event: t }));
|
|
1313
|
+
}, getCanvas: function() {
|
|
1314
|
+
if (this.$refs.canvas) {
|
|
1315
|
+
var t = this.$refs.canvas, e = this.$refs.image, i = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(h, r, l) {
|
|
1316
|
+
var c = l.rotate, u = l.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = ce(d, c), p = h.getContext("2d");
|
|
1317
|
+
h.height = m.height, h.width = m.width, p.save();
|
|
1318
|
+
var v = F(C(g({ left: 0, top: 0 }, d)), c);
|
|
1319
|
+
return p.translate(-(v.left - m.width / 2), -(v.top - m.height / 2)), p.rotate(c * Math.PI / 180), p.translate(u.horizontal ? d.width : 0, u.vertical ? d.height : 0), p.scale(u.horizontal ? -1 : 1, u.vertical ? -1 : 1), p.drawImage(r, 0, 0, d.width, d.height), p.restore(), h;
|
|
1320
|
+
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, s = b({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), o = function(h) {
|
|
1321
|
+
return h.find(function(r) {
|
|
1322
|
+
return l = r, !Number.isNaN(parseFloat(l)) && isFinite(l);
|
|
1323
|
+
var l;
|
|
1324
|
+
});
|
|
1325
|
+
}, n = Y({ sizeRestrictions: { minWidth: o([s.width, s.minWidth]) || 0, minHeight: o([s.height, s.minHeight]) || 0, maxWidth: o([s.width, s.maxWidth]) || 1 / 0, maxHeight: o([s.height, s.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
|
|
1326
|
+
if (s.maxArea && n.width * n.height > s.maxArea) {
|
|
1327
|
+
var a = Math.sqrt(s.maxArea / (n.width * n.height));
|
|
1328
|
+
n = { width: Math.round(a * n.width), height: Math.round(a * n.height) };
|
|
1329
|
+
}
|
|
1330
|
+
return function(h, r, l, c, u) {
|
|
1331
|
+
h.width = c ? c.width : l.width, h.height = c ? c.height : l.height;
|
|
1332
|
+
var d = h.getContext("2d");
|
|
1333
|
+
d.clearRect(0, 0, h.width, h.height), u && (u.imageSmoothingEnabled && (d.imageSmoothingEnabled = u.imageSmoothingEnabled), u.imageSmoothingQuality && (d.imageSmoothingQuality = u.imageSmoothingQuality), u.fillColor && (d.fillStyle = u.fillColor, d.fillRect(0, 0, h.width, h.height), d.save()));
|
|
1334
|
+
var m = l.left < 0 ? -l.left : 0, p = l.top < 0 ? -l.top : 0;
|
|
1335
|
+
d.drawImage(r, l.left + m, l.top + p, l.width, l.height, m * (h.width / l.width), p * (h.height / l.height), h.width, h.height);
|
|
1336
|
+
}(t, i, this.coordinates, n, s), t;
|
|
1337
|
+
}
|
|
1338
|
+
}, update: function() {
|
|
1339
|
+
this.$emit("change", this.getResult());
|
|
1340
|
+
}, applyTransform: function(t) {
|
|
1341
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.visibleArea && e ? Ve(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, s = this.visibleArea && e ? ot(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
|
|
1342
|
+
return Ze({ transform: t, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: i, positionRestrictions: s, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
|
|
1343
|
+
}, resetCoordinates: function() {
|
|
1344
|
+
var t = this;
|
|
1345
|
+
if (this.$refs.image) {
|
|
1346
|
+
this.$refs.cropper, this.$refs.image;
|
|
1347
|
+
var e = this.defaultSize;
|
|
1348
|
+
e || (e = this.stencilSize ? ti : Je);
|
|
1349
|
+
var i = this.sizeRestrictions;
|
|
1350
|
+
i.minWidth, i.minHeight, i.maxWidth, i.maxHeight;
|
|
1351
|
+
var s = G(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, o = this.defaultPosition || Ke, n = [s, function(a) {
|
|
1352
|
+
var h = a.coordinates;
|
|
1353
|
+
return b({}, G(o) ? o({ coordinates: h, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
|
|
1354
|
+
}];
|
|
1355
|
+
this.delayedTransforms && n.push.apply(n, V(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(n, !0), this.delayedTransforms = null;
|
|
1356
|
+
}
|
|
1357
|
+
}, clearImage: function() {
|
|
1358
|
+
var t = this;
|
|
1359
|
+
this.imageLoaded = !1, setTimeout(function() {
|
|
1360
|
+
var e = t.$refs.stretcher;
|
|
1361
|
+
e && (e.style.height = "auto", e.style.width = "auto"), t.coordinates = t.defaultCoordinates(), t.boundaries = { width: 0, height: 0 };
|
|
1362
|
+
}, this.transitionTime);
|
|
1363
|
+
}, enableTransitions: function() {
|
|
1364
|
+
this.transitions && (this.transitionsActive = !0);
|
|
1365
|
+
}, disableTransitions: function() {
|
|
1366
|
+
this.transitionsActive = !1;
|
|
1367
|
+
}, updateBoundaries: function() {
|
|
1368
|
+
var t = this, e = this.$refs.stretcher, i = this.$refs.cropper;
|
|
1369
|
+
return this.initStretcher({ cropper: i, stretcher: e, imageSize: this.imageSize }), this.$nextTick().then(function() {
|
|
1370
|
+
var s = { cropper: i, imageSize: t.imageSize };
|
|
1371
|
+
if (G(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(s) : t.defaultBoundaries === "fit" ? t.boundaries = function(o) {
|
|
1372
|
+
var n = o.cropper, a = o.imageSize, h = n.clientHeight, r = n.clientWidth, l = h, c = a.width * h / a.height;
|
|
1373
|
+
return c > r && (c = r, l = a.height * r / a.width), { width: c, height: l };
|
|
1374
|
+
}(s) : t.boundaries = function(o) {
|
|
1375
|
+
var n = o.cropper;
|
|
1376
|
+
return { width: n.clientWidth, height: n.clientHeight };
|
|
1377
|
+
}(s), !t.boundaries.width || !t.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
|
|
1378
|
+
});
|
|
1379
|
+
}, resetVisibleArea: function() {
|
|
1380
|
+
var t = this;
|
|
1381
|
+
return this.appliedImageTransforms = b(b({}, this.defaultImageTransforms), {}, { flip: b({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
1382
|
+
t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates());
|
|
1383
|
+
var e, i, s, o, n, a, h = t.defaultVisibleArea || ei;
|
|
1384
|
+
t.visibleArea = G(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, s = e.boundaries, o = e.getAreaRestrictions, n = g({}, i), a = w(s), n.width / n.height !== a && (n.height = n.width / a), E(n, o({ visibleArea: n, type: "move" }))), t.priority === "visible-area" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("resetVisibleArea");
|
|
1385
|
+
}).catch(function() {
|
|
1386
|
+
t.visibleArea = null;
|
|
1387
|
+
});
|
|
1388
|
+
}, updateVisibleArea: function() {
|
|
1389
|
+
var t = this;
|
|
1390
|
+
return this.updateBoundaries().then(function() {
|
|
1391
|
+
t.visibleArea = t.fitVisibleArea({ imageSize: t.imageSize, boundaries: t.boundaries, visibleArea: t.visibleArea, coordinates: t.coordinates, getAreaRestrictions: t.getAreaRestrictions }), t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("updateVisibleArea");
|
|
1392
|
+
}).catch(function() {
|
|
1393
|
+
t.visibleArea = null;
|
|
1394
|
+
});
|
|
1395
|
+
}, onChange: function() {
|
|
1396
|
+
var t = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
|
|
1397
|
+
t && this.debounce ? this.debouncedUpdate() : this.update();
|
|
1398
|
+
}, onChangeImage: function() {
|
|
1399
|
+
var t, e = this;
|
|
1400
|
+
if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
|
|
1401
|
+
if (function(o) {
|
|
1402
|
+
if (Nt(o)) return !1;
|
|
1403
|
+
var n = window.location, a = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(o) || [], h = { protocol: a[1] || "", host: a[2] || "", port: a[3] || "" }, r = function(l) {
|
|
1404
|
+
return l.port || ((l.protocol || n.protocol) === "http" ? 80 : 433);
|
|
1405
|
+
};
|
|
1406
|
+
return !(!h.protocol && !h.host && !h.port || h.protocol && h.protocol == n.protocol && h.host && h.host == n.host && h.host && r(h) == r(n));
|
|
1407
|
+
}(this.src)) {
|
|
1408
|
+
var i = M(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
1409
|
+
i === !0 && (i = "anonymous"), this.imageAttributes.crossOrigin = i || null;
|
|
1410
|
+
}
|
|
1411
|
+
if (this.checkOrientation) {
|
|
1412
|
+
var s = (t = this.src, new Promise(function(o) {
|
|
1413
|
+
di(t).then(function(n) {
|
|
1414
|
+
var a = mi(n);
|
|
1415
|
+
o(n ? { source: t, arrayBuffer: n, orientation: a } : { source: t, arrayBuffer: null, orientation: null });
|
|
1416
|
+
}).catch(function(n) {
|
|
1417
|
+
console.warn(n), o({ source: t, arrayBuffer: null, orientation: null });
|
|
1418
|
+
});
|
|
1419
|
+
}));
|
|
1420
|
+
setTimeout(function() {
|
|
1421
|
+
s.then(e.onParseImage);
|
|
1422
|
+
}, this.transitionTime);
|
|
1423
|
+
} else setTimeout(function() {
|
|
1424
|
+
e.onParseImage({ source: e.src });
|
|
1425
|
+
}, this.transitionTime);
|
|
1426
|
+
} else this.clearImage();
|
|
1427
|
+
}, onFailLoadImage: function() {
|
|
1428
|
+
this.imageAttributes.src && (this.clearImage(), this.$emit("error"));
|
|
1429
|
+
}, onSuccessLoadImage: function() {
|
|
1430
|
+
var t = this, e = this.$refs.image;
|
|
1431
|
+
e && !this.imageLoaded && (this.imageAttributes.height = e.naturalHeight, this.imageAttributes.width = e.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {
|
|
1432
|
+
t.$emit("ready"), t.onChange(!1);
|
|
1433
|
+
}));
|
|
1434
|
+
}, onParseImage: function(t) {
|
|
1435
|
+
var e = this, i = t.source, s = t.arrayBuffer, o = t.orientation;
|
|
1436
|
+
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, s && o && o > 1 ? se(i) || !Nt(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([s])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(n) {
|
|
1437
|
+
for (var a = [], h = new Uint8Array(n); h.length > 0; ) {
|
|
1438
|
+
var r = h.subarray(0, 8192);
|
|
1439
|
+
a.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), h = h.subarray(8192);
|
|
1440
|
+
}
|
|
1441
|
+
return "data:image/jpeg;base64," + btoa(a.join(""));
|
|
1442
|
+
}(s) : this.imageAttributes.src = i, G(this.defaultTransforms) ? this.appliedImageTransforms = zt(this.defaultTransforms()) : ht(this.defaultTransforms) ? this.appliedImageTransforms = zt(this.defaultTransforms) : this.appliedImageTransforms = function(n) {
|
|
1443
|
+
var a = zt({});
|
|
1444
|
+
if (n) switch (n) {
|
|
1445
|
+
case 2:
|
|
1446
|
+
a.flip.horizontal = !0;
|
|
1447
|
+
break;
|
|
1448
|
+
case 3:
|
|
1449
|
+
a.rotate = -180;
|
|
1450
|
+
break;
|
|
1451
|
+
case 4:
|
|
1452
|
+
a.flip.vertical = !0;
|
|
1453
|
+
break;
|
|
1454
|
+
case 5:
|
|
1455
|
+
a.rotate = 90, a.flip.vertical = !0;
|
|
1456
|
+
break;
|
|
1457
|
+
case 6:
|
|
1458
|
+
a.rotate = 90;
|
|
1459
|
+
break;
|
|
1460
|
+
case 7:
|
|
1461
|
+
a.rotate = 90, a.flip.horizontal = !0;
|
|
1462
|
+
break;
|
|
1463
|
+
case 8:
|
|
1464
|
+
a.rotate = -90;
|
|
1465
|
+
}
|
|
1466
|
+
return a;
|
|
1467
|
+
}(o), this.defaultImageTransforms = b(b({}, this.appliedImageTransforms), {}, { flip: b({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
|
|
1468
|
+
var n = e.$refs.image;
|
|
1469
|
+
n && n.complete && (function(a) {
|
|
1470
|
+
return !!a.naturalWidth;
|
|
1471
|
+
}(n) ? e.onSuccessLoadImage() : e.onFailLoadImage());
|
|
1472
|
+
});
|
|
1473
|
+
}, onResizeEnd: function() {
|
|
1474
|
+
this.runAutoZoom("resize", { transitions: !0 });
|
|
1475
|
+
}, onMoveEnd: function() {
|
|
1476
|
+
this.runAutoZoom("move", { transitions: !0 });
|
|
1477
|
+
}, onMove: function(t) {
|
|
1478
|
+
var e = this;
|
|
1479
|
+
this.transitionsOptions.enabled || this.awaitRender(function() {
|
|
1480
|
+
e.coordinates = e.moveAlgorithm(b(b({}, e.getPublicProperties()), {}, { positionRestrictions: ot(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();
|
|
1481
|
+
});
|
|
1482
|
+
}, onResize: function(t) {
|
|
1483
|
+
var e = this;
|
|
1484
|
+
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
|
|
1485
|
+
var i = e.sizeRestrictions, s = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);
|
|
1486
|
+
e.coordinates = e.resizeAlgorithm(b(b({}, e.getPublicProperties()), {}, { positionRestrictions: ot(e.positionRestrictions, e.visibleArea), sizeRestrictions: { maxWidth: Math.min(i.maxWidth, e.visibleArea.width), maxHeight: Math.min(i.maxHeight, e.visibleArea.height), minWidth: Math.max(i.minWidth, s), minHeight: Math.max(i.minHeight, s) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = !1;
|
|
1487
|
+
});
|
|
1488
|
+
}, onManipulateImage: function(t) {
|
|
1489
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1490
|
+
if (!this.transitionsOptions.enabled) {
|
|
1491
|
+
var i = e.transitions, s = i !== void 0 && i, o = e.normalize, n = o === void 0 || o;
|
|
1492
|
+
s && this.enableTransitions();
|
|
1493
|
+
var a = ii(b(b({}, this.getPublicProperties()), {}, { event: n ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), h = a.visibleArea, r = a.coordinates;
|
|
1494
|
+
this.visibleArea = h, this.coordinates = r, this.runAutoZoom("manipulateImage"), this.onChange(), s && this.debouncedDisableTransitions();
|
|
1495
|
+
}
|
|
1496
|
+
}, onPropsChange: function() {
|
|
1497
|
+
this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);
|
|
1498
|
+
}, getAreaRestrictions: function() {
|
|
1499
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.visibleArea, i = t.type, s = i === void 0 ? "move" : i;
|
|
1500
|
+
return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: e, type: s });
|
|
1501
|
+
}, getAspectRatio: function(t) {
|
|
1502
|
+
var e, i, s = this.stencilProps, o = s.aspectRatio, n = s.minAspectRatio, a = s.maxAspectRatio;
|
|
1503
|
+
if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {
|
|
1504
|
+
var h = this.$refs.stencil.aspectRatios();
|
|
1505
|
+
e = h.minimum, i = h.maximum;
|
|
1506
|
+
}
|
|
1507
|
+
if (M(e) && (e = M(o) ? n : o), M(i) && (i = M(o) ? a : o), !t && (M(e) || M(i))) {
|
|
1508
|
+
var r = this.getStencilSize(), l = r ? w(r) : null;
|
|
1509
|
+
M(e) && (e = Vt(l) ? l : void 0), M(i) && (i = Vt(l) ? l : void 0);
|
|
1510
|
+
}
|
|
1511
|
+
return { minimum: e, maximum: i };
|
|
1512
|
+
}, getStencilSize: function() {
|
|
1513
|
+
if (this.stencilSize) return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, i = t.stencilSize, s = t.aspectRatio, wt(w(o = G(i) ? i({ boundaries: e, aspectRatio: s }) : i), s) && (o = Y({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: o.width, height: o.height, aspectRatio: { minimum: s.minimum, maximum: s.maximum } })), (o.width > e.width || o.height > e.height) && (o = Y({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: o.width, height: o.height, aspectRatio: { minimum: w(o), maximum: w(o) } })), o;
|
|
1514
|
+
var t, e, i, s, o;
|
|
1515
|
+
}, getPublicProperties: function() {
|
|
1516
|
+
return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
|
|
1517
|
+
}, defaultCoordinates: function() {
|
|
1518
|
+
return b({}, Zt);
|
|
1519
|
+
}, flip: function(t, e) {
|
|
1520
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = i.transitions, o = s === void 0 || s;
|
|
1521
|
+
if (!this.transitionsActive) {
|
|
1522
|
+
o && this.enableTransitions();
|
|
1523
|
+
var n = b({}, this.imageTransforms.flip), a = si({ flip: { horizontal: t ? !n.horizontal : n.horizontal, vertical: e ? !n.vertical : n.vertical }, previousFlip: n, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), h = a.visibleArea, r = a.coordinates;
|
|
1524
|
+
t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = h, this.coordinates = r, this.onChange(), o && this.debouncedDisableTransitions();
|
|
1525
|
+
}
|
|
1526
|
+
}, rotate: function(t) {
|
|
1527
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, s = i === void 0 || i;
|
|
1528
|
+
if (!this.transitionsActive) {
|
|
1529
|
+
s && this.enableTransitions();
|
|
1530
|
+
var o = b({}, this.imageSize);
|
|
1531
|
+
this.appliedImageTransforms.rotate += t;
|
|
1532
|
+
var n = ni({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: o, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = n.visibleArea, h = n.coordinates, r = this.processAutoZoom("rotateImage", a, h);
|
|
1533
|
+
a = r.visibleArea, h = r.coordinates, this.visibleArea = a, this.coordinates = h, this.onChange(), s && this.debouncedDisableTransitions();
|
|
1534
|
+
}
|
|
1535
|
+
} }, emits: ["change", "error", "ready"] }, fi = { key: 0, ref: "canvas", style: { display: "none" } }, pi = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
1536
|
+
pe.render = function(t, e, i, s, o, n) {
|
|
1537
|
+
return y(), x("div", { ref: "cropper", class: n.classes.cropper }, [f("div", { ref: "stretcher", class: n.classes.stretcher }, null, 2), f("div", { class: n.classes.boundaries, style: n.boundariesStyle }, [(y(), x(lt(i.backgroundWrapperComponent), { class: n.classes.cropperWrapper, "wheel-resize": n.settings.resizeImage.wheel, "touch-resize": n.settings.resizeImage.touch, "touch-move": n.settings.moveImage.touch, "mouse-move": n.settings.moveImage.mouse, onMove: n.onManipulateImage, onResize: n.onManipulateImage }, { default: A(function() {
|
|
1538
|
+
return [f("div", { class: n.classes.background, style: n.boundariesStyle }, null, 6), f("div", { class: n.classes.imageWrapper }, [f("img", { ref: "image", crossorigin: o.imageAttributes.crossOrigin, src: o.imageAttributes.src, class: n.classes.image, style: n.imageStyle, onMousedown: e[1] || (e[1] = ye(function() {
|
|
1539
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), f("div", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), te((y(), x(lt(i.stencilComponent), ie({ ref: "stencil", image: n.image, coordinates: o.coordinates, "stencil-coordinates": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[ee, o.imageLoaded]]), i.canvas ? (y(), x("canvas", fi, null, 512)) : Bt("", !0), i.canvas ? (y(), x("canvas", pi, null, 512)) : Bt("", !0)];
|
|
1540
|
+
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
1541
|
+
};
|
|
1542
|
+
const vi = { class: "sl-fixed sl-inset-0 sl-z-10 sl-w-screen sl-overflow-y-auto" }, bi = { class: "sl-flex sl-min-h-full sl-items-center sl-justify-center sl-p-4" }, wi = { class: "sl-flex sl-items-center sl-justify-between sl-px-6 sl-py-4 sl-border-b sl-border-gray-200 dark:sl-border-gray-700" }, yi = { class: "sl-relative sl-bg-gray-900 dark:sl-bg-gray-950" }, zi = { class: "sl-px-6 sl-py-4 sl-bg-gray-50 dark:sl-bg-gray-900 sl-border-t sl-border-gray-200 dark:sl-border-gray-700" }, xi = { class: "sl-flex sl-items-center sl-justify-center sl-gap-4 sl-mb-4" }, Ri = { class: "sl-flex sl-items-center sl-gap-2 sl-text-sm sl-text-gray-500 dark:sl-text-gray-400" }, Ai = { class: "sl-flex sl-justify-end sl-gap-3" }, Mi = /* @__PURE__ */ ze({
|
|
1543
|
+
__name: "ImageCropperModal",
|
|
1544
|
+
props: {
|
|
1545
|
+
modelValue: { type: Boolean },
|
|
1546
|
+
image: {},
|
|
1547
|
+
aspectRatio: { default: void 0 },
|
|
1548
|
+
minWidth: { default: void 0 },
|
|
1549
|
+
minHeight: { default: void 0 },
|
|
1550
|
+
maxWidth: { default: void 0 },
|
|
1551
|
+
maxHeight: { default: void 0 },
|
|
1552
|
+
outputType: { default: "blob" },
|
|
1553
|
+
outputMimeType: { default: "image/jpeg" },
|
|
1554
|
+
outputQuality: { default: 0.9 },
|
|
1555
|
+
stencilType: { default: "rectangle" },
|
|
1556
|
+
title: { default: "Crop Image" }
|
|
1557
|
+
},
|
|
1558
|
+
emits: ["update:modelValue", "crop", "cancel"],
|
|
1559
|
+
setup(t, { emit: e }) {
|
|
1560
|
+
const i = t, s = e, o = xe(null), n = It(!1), a = It(1), h = ft(() => i.stencilType === "circle" ? fe : Ht), r = ft(() => {
|
|
1561
|
+
const k = {
|
|
1562
|
+
handlers: {},
|
|
1563
|
+
movable: !0,
|
|
1564
|
+
resizable: !0,
|
|
1565
|
+
aspectRatio: i.aspectRatio
|
|
1566
|
+
};
|
|
1567
|
+
return i.stencilType === "circle" && (k.previewClass = "sl-rounded-full"), k;
|
|
1568
|
+
}), l = ft(() => ({ imageSize: k, visibleArea: O }) => ({
|
|
1569
|
+
width: (O?.width || k.width) * 0.8,
|
|
1570
|
+
height: (O?.height || k.height) * 0.8
|
|
1571
|
+
})), c = {
|
|
1572
|
+
adjustStencil: !1
|
|
1573
|
+
}, u = () => {
|
|
1574
|
+
}, d = () => {
|
|
1575
|
+
o.value && (o.value.zoom(1.1), a.value = Math.min(a.value * 1.1, 3));
|
|
1576
|
+
}, m = () => {
|
|
1577
|
+
o.value && (o.value.zoom(0.9), a.value = Math.max(a.value * 0.9, 0.5));
|
|
1578
|
+
}, p = () => {
|
|
1579
|
+
o.value && o.value.rotate(-90);
|
|
1580
|
+
}, v = () => {
|
|
1581
|
+
o.value && o.value.rotate(90);
|
|
1582
|
+
}, T = () => {
|
|
1583
|
+
o.value && o.value.flip(!0, !1);
|
|
1584
|
+
}, $ = () => {
|
|
1585
|
+
o.value && o.value.flip(!1, !0);
|
|
1586
|
+
}, U = () => {
|
|
1587
|
+
o.value && (o.value.reset(), a.value = 1);
|
|
1588
|
+
}, X = () => {
|
|
1589
|
+
s("cancel"), s("update:modelValue", !1);
|
|
1590
|
+
}, N = async () => {
|
|
1591
|
+
if (o.value) {
|
|
1592
|
+
n.value = !0;
|
|
1593
|
+
try {
|
|
1594
|
+
const { canvas: k, coordinates: O } = o.value.getResult();
|
|
1595
|
+
if (!k)
|
|
1596
|
+
throw new Error("Failed to get canvas from cropper");
|
|
1597
|
+
const it = {
|
|
1598
|
+
coordinates: O
|
|
1599
|
+
};
|
|
1600
|
+
if (i.outputType === "canvas")
|
|
1601
|
+
it.canvas = k;
|
|
1602
|
+
else if (i.outputType === "base64")
|
|
1603
|
+
it.base64 = k.toDataURL(i.outputMimeType, i.outputQuality);
|
|
1604
|
+
else {
|
|
1605
|
+
const ve = await new Promise((be, we) => {
|
|
1606
|
+
k.toBlob(
|
|
1607
|
+
(Lt) => {
|
|
1608
|
+
Lt ? be(Lt) : we(new Error("Failed to create blob"));
|
|
1609
|
+
},
|
|
1610
|
+
i.outputMimeType,
|
|
1611
|
+
i.outputQuality
|
|
1612
|
+
);
|
|
1613
|
+
});
|
|
1614
|
+
it.blob = ve;
|
|
1615
|
+
}
|
|
1616
|
+
s("crop", it), s("update:modelValue", !1);
|
|
1617
|
+
} catch (k) {
|
|
1618
|
+
console.error("Error cropping image:", k);
|
|
1619
|
+
} finally {
|
|
1620
|
+
n.value = !1;
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
};
|
|
1624
|
+
return (k, O) => (y(), x(S(Se), {
|
|
1625
|
+
as: "template",
|
|
1626
|
+
show: i.modelValue
|
|
1627
|
+
}, {
|
|
1628
|
+
default: A(() => [
|
|
1629
|
+
f(S(Ce), {
|
|
1630
|
+
as: "div",
|
|
1631
|
+
class: "sl-relative sl-z-50",
|
|
1632
|
+
onClose: X
|
|
1633
|
+
}, {
|
|
1634
|
+
default: A(() => [
|
|
1635
|
+
f(S(Xt), {
|
|
1636
|
+
as: "template",
|
|
1637
|
+
enter: "ease-out duration-300",
|
|
1638
|
+
"enter-from": "opacity-0",
|
|
1639
|
+
"enter-to": "opacity-100",
|
|
1640
|
+
leave: "ease-in duration-200",
|
|
1641
|
+
"leave-from": "opacity-100",
|
|
1642
|
+
"leave-to": "opacity-0"
|
|
1643
|
+
}, {
|
|
1644
|
+
default: A(() => O[0] || (O[0] = [
|
|
1645
|
+
z("div", { class: "sl-fixed sl-inset-0 sl-bg-black/50 dark:sl-bg-gray-900/80 sl-transition-opacity" }, null, -1)
|
|
1646
|
+
])),
|
|
1647
|
+
_: 1,
|
|
1648
|
+
__: [0]
|
|
1649
|
+
}),
|
|
1650
|
+
z("div", vi, [
|
|
1651
|
+
z("div", bi, [
|
|
1652
|
+
f(S(Xt), {
|
|
1653
|
+
as: "template",
|
|
1654
|
+
enter: "ease-out duration-300",
|
|
1655
|
+
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
1656
|
+
"enter-to": "opacity-100 translate-y-0 sm:scale-100",
|
|
1657
|
+
leave: "ease-in duration-200",
|
|
1658
|
+
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
1659
|
+
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1660
|
+
}, {
|
|
1661
|
+
default: A(() => [
|
|
1662
|
+
f(S(Ee), {
|
|
1663
|
+
class: "sl-relative sl-transform sl-rounded-xl sl-bg-white dark:sl-bg-gray-900 sl-text-left sl-shadow-2xl sl-transition-all sl-w-full",
|
|
1664
|
+
style: { maxWidth: "56rem" }
|
|
1665
|
+
}, {
|
|
1666
|
+
default: A(() => [
|
|
1667
|
+
z("div", wi, [
|
|
1668
|
+
f(S(Te), { class: "sl-text-lg sl-font-semibold sl-text-gray-900 dark:sl-text-white" }, {
|
|
1669
|
+
default: A(() => [
|
|
1670
|
+
pt(_t(i.title), 1)
|
|
1671
|
+
]),
|
|
1672
|
+
_: 1
|
|
1673
|
+
}),
|
|
1674
|
+
z("button", {
|
|
1675
|
+
type: "button",
|
|
1676
|
+
class: "sl-rounded-lg sl-p-2 sl-text-gray-500 dark:sl-text-gray-400 hover:sl-text-gray-700 dark:hover:sl-text-white hover:sl-bg-gray-100 dark:hover:sl-bg-gray-800 sl-transition-colors",
|
|
1677
|
+
onClick: X
|
|
1678
|
+
}, [
|
|
1679
|
+
f(S(Re), { class: "sl-h-5 sl-w-5" })
|
|
1680
|
+
])
|
|
1681
|
+
]),
|
|
1682
|
+
z("div", yi, [
|
|
1683
|
+
f(S(pe), {
|
|
1684
|
+
ref_key: "cropperRef",
|
|
1685
|
+
ref: o,
|
|
1686
|
+
class: "cropper",
|
|
1687
|
+
src: i.image,
|
|
1688
|
+
"stencil-component": h.value,
|
|
1689
|
+
"stencil-props": r.value,
|
|
1690
|
+
"default-size": l.value,
|
|
1691
|
+
"resize-image": c,
|
|
1692
|
+
"min-width": i.minWidth,
|
|
1693
|
+
"min-height": i.minHeight,
|
|
1694
|
+
"max-width": i.maxWidth,
|
|
1695
|
+
"max-height": i.maxHeight,
|
|
1696
|
+
"background-class": "cropper-bg",
|
|
1697
|
+
onReady: u
|
|
1698
|
+
}, null, 8, ["src", "stencil-component", "stencil-props", "default-size", "min-width", "min-height", "max-width", "max-height"])
|
|
1699
|
+
]),
|
|
1700
|
+
z("div", zi, [
|
|
1701
|
+
z("div", xi, [
|
|
1702
|
+
z("button", {
|
|
1703
|
+
type: "button",
|
|
1704
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1705
|
+
onClick: m
|
|
1706
|
+
}, [
|
|
1707
|
+
f(S(Ae), { class: "sl-h-5 sl-w-5" })
|
|
1708
|
+
]),
|
|
1709
|
+
z("div", Ri, [
|
|
1710
|
+
f(S($e), { class: "sl-h-4 sl-w-4" }),
|
|
1711
|
+
z("span", null, _t(Math.round(a.value * 100)) + "%", 1)
|
|
1712
|
+
]),
|
|
1713
|
+
z("button", {
|
|
1714
|
+
type: "button",
|
|
1715
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1716
|
+
onClick: d
|
|
1717
|
+
}, [
|
|
1718
|
+
f(S(Me), { class: "sl-h-5 sl-w-5" })
|
|
1719
|
+
]),
|
|
1720
|
+
O[1] || (O[1] = z("div", { class: "sl-w-px sl-h-6 sl-bg-gray-300 dark:sl-bg-gray-700" }, null, -1)),
|
|
1721
|
+
z("button", {
|
|
1722
|
+
type: "button",
|
|
1723
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1724
|
+
onClick: p
|
|
1725
|
+
}, [
|
|
1726
|
+
f(S(Oe), { class: "sl-h-5 sl-w-5" })
|
|
1727
|
+
]),
|
|
1728
|
+
z("button", {
|
|
1729
|
+
type: "button",
|
|
1730
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1731
|
+
onClick: v
|
|
1732
|
+
}, [
|
|
1733
|
+
f(S(je), { class: "sl-h-5 sl-w-5" })
|
|
1734
|
+
]),
|
|
1735
|
+
z("button", {
|
|
1736
|
+
type: "button",
|
|
1737
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1738
|
+
onClick: T
|
|
1739
|
+
}, [
|
|
1740
|
+
f(S(De), { class: "sl-h-5 sl-w-5" })
|
|
1741
|
+
]),
|
|
1742
|
+
z("button", {
|
|
1743
|
+
type: "button",
|
|
1744
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1745
|
+
onClick: $
|
|
1746
|
+
}, [
|
|
1747
|
+
f(S(He), { class: "sl-h-5 sl-w-5" })
|
|
1748
|
+
]),
|
|
1749
|
+
z("button", {
|
|
1750
|
+
type: "button",
|
|
1751
|
+
class: "sl-p-2 sl-rounded-lg sl-bg-gray-200 dark:sl-bg-gray-800 sl-text-gray-600 dark:sl-text-gray-300 hover:sl-bg-gray-300 dark:hover:sl-bg-gray-700 hover:sl-text-gray-900 dark:hover:sl-text-white sl-transition-colors",
|
|
1752
|
+
onClick: U
|
|
1753
|
+
}, [
|
|
1754
|
+
f(S(ke), { class: "sl-h-5 sl-w-5" })
|
|
1755
|
+
])
|
|
1756
|
+
]),
|
|
1757
|
+
z("div", Ai, [
|
|
1758
|
+
f(Yt, {
|
|
1759
|
+
theme: "light",
|
|
1760
|
+
outlined: !0,
|
|
1761
|
+
onButtonClick: X
|
|
1762
|
+
}, {
|
|
1763
|
+
default: A(() => O[2] || (O[2] = [
|
|
1764
|
+
pt(" Cancel ", -1)
|
|
1765
|
+
])),
|
|
1766
|
+
_: 1,
|
|
1767
|
+
__: [2]
|
|
1768
|
+
}),
|
|
1769
|
+
f(Yt, {
|
|
1770
|
+
theme: "primary",
|
|
1771
|
+
loading: n.value,
|
|
1772
|
+
onButtonClick: N
|
|
1773
|
+
}, {
|
|
1774
|
+
leading: A(() => [
|
|
1775
|
+
f(S(Le), { class: "sl-h-4 sl-w-4" })
|
|
1776
|
+
]),
|
|
1777
|
+
default: A(() => [
|
|
1778
|
+
O[3] || (O[3] = pt(" Apply Crop ", -1))
|
|
1779
|
+
]),
|
|
1780
|
+
_: 1,
|
|
1781
|
+
__: [3]
|
|
1782
|
+
}, 8, ["loading"])
|
|
1783
|
+
])
|
|
1784
|
+
])
|
|
1785
|
+
]),
|
|
1786
|
+
_: 1
|
|
1787
|
+
})
|
|
1788
|
+
]),
|
|
1789
|
+
_: 1
|
|
1790
|
+
})
|
|
1791
|
+
])
|
|
1792
|
+
])
|
|
1793
|
+
]),
|
|
1794
|
+
_: 1
|
|
1795
|
+
})
|
|
1796
|
+
]),
|
|
1797
|
+
_: 1
|
|
1798
|
+
}, 8, ["show"]));
|
|
1799
|
+
}
|
|
1800
|
+
}), ji = /* @__PURE__ */ We(Mi, [["__scopeId", "data-v-78f9e0cd"]]);
|
|
1801
|
+
export {
|
|
1802
|
+
ji as default
|
|
1803
|
+
};
|
|
1804
|
+
//# sourceMappingURL=ImageCropperModal.js.map
|