ablok-components 0.3.105 → 0.3.106
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/_virtual/_plugin-vue_export-helper.js +7 -8
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ablok-components.css +2 -1
- package/dist/ablok-components.umd.js +4 -4
- package/dist/assets/img/guide.js +4 -0
- package/dist/components/atoms/base-button/base-button.js +6 -0
- package/dist/components/atoms/base-button/base-button.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/atoms/base-headline/base-headline.js +5 -0
- package/dist/components/atoms/base-headline/base-headline.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/atoms/base-image/base-image.js +6 -0
- package/dist/components/atoms/base-image/base-image.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/atoms/base-input/base-input.js +6 -0
- package/dist/components/atoms/base-input/base-input.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.js +5 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.js +6 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/atoms/check-group/check-group.js +6 -0
- package/dist/components/atoms/check-group/check-group.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/atoms/custom-html/custom-html.js +5 -0
- package/dist/components/atoms/custom-html/custom-html.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.js +6 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/atoms/input-datetime/input-datetime.js +5 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/atoms/input-file/input-file.js +5 -0
- package/dist/components/atoms/input-file/input-file.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/atoms/input-passcode/input-passcode.js +5 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/atoms/input-password/input-password.js +5 -0
- package/dist/components/atoms/input-password/input-password.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/atoms/input-textarea/input-textarea.js +5 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.js +6 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/atoms/radio-group/radio-group.js +6 -0
- package/dist/components/atoms/radio-group/radio-group.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/atoms/svg-icon/svg-icon.js +6 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.js +6 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/molecules/accordion/accordion-item.js +6 -0
- package/dist/components/molecules/accordion/accordion-item.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/molecules/accordion/accordion.js +10 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.js +6 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/molecules/base-camera/base-camera.js +6 -0
- package/dist/components/molecules/base-camera/base-camera.vue_vue_type_script_async_true_setup_true_lang.js +505 -0
- package/dist/components/molecules/base-map/base-map.js +6 -0
- package/dist/components/molecules/base-map/base-map.vue_vue_type_script_setup_true_lang.js +390 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.js +6 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.vue_vue_type_script_setup_true_lang.js +188 -0
- package/dist/components/molecules/color-palette/color-palette.js +6 -0
- package/dist/components/molecules/color-palette/color-palette.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.js +5 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/molecules/file-upload/file-upload.js +6 -0
- package/dist/components/molecules/file-upload/file-upload.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/molecules/hint-system/hint-system.js +6 -0
- package/dist/components/molecules/hint-system/hint-system.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/molecules/image-crop/image-crop.js +5 -0
- package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.js +5 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-resize/image-resize.js +5 -0
- package/dist/components/molecules/image-resize/image-resize.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/molecules/image-upload/image-upload.js +6 -0
- package/dist/components/molecules/image-upload/image-upload.vue_vue_type_script_setup_true_lang.js +264 -0
- package/dist/components/molecules/image-zoom/image-zoom.js +6 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/molecules/input-color/input-color.js +6 -0
- package/dist/components/molecules/input-color/input-color.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.js +6 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.js +6 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/molecules/link-sharing/link-sharing.js +6 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/location-list/location-list.js +6 -0
- package/dist/components/molecules/location-list/location-list.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.js +6 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.js +6 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.js +6 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/molecules/progress-steps/progress-steps.js +6 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/qr-code/qr-code.js +6 -0
- package/dist/components/molecules/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.js +6 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/molecules/rte-editor/rte-editor.js +6 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue_vue_type_script_setup_true_lang.js +384 -0
- package/dist/components/molecules/select-media/select-media.js +6 -0
- package/dist/components/molecules/select-media/select-media.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/molecules/upload-group/upload-group.js +6 -0
- package/dist/components/molecules/upload-group/upload-group.vue_vue_type_script_setup_true_lang.js +184 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.js +5 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/organisms/location-finder/location-finder.js +6 -0
- package/dist/components/organisms/location-finder/location-finder.vue_vue_type_script_setup_true_lang.js +609 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.js +6 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.vue_vue_type_script_setup_true_lang.js +592 -0
- package/dist/components/templates/base-carousel/base-carousel.js +6 -0
- package/dist/components/templates/base-carousel/base-carousel.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/templates/base-form/base-form.js +6 -0
- package/dist/components/templates/base-form/base-form.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/templates/modal-dialog/modal-dialog.js +6 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/templates/popover-dialog/popover-dialog.js +6 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/templates/sortable-list/sortable-list.js +6 -0
- package/dist/components/templates/sortable-list/sortable-list.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.js +6 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/composables/useCameraFilter.js +60 -55
- package/dist/composables/useConfetti.js +9 -11
- package/dist/composables/useDirections.js +54 -59
- package/dist/composables/useDragAndDrop.js +28 -28
- package/dist/composables/useGeocoding.js +81 -83
- package/dist/composables/useGeolocation.js +61 -70
- package/dist/composables/useLocalFileUrl.js +16 -13
- package/dist/composables/useSanitize.js +81 -21
- package/dist/composables/useUploadTransport.js +28 -27
- package/dist/index.js +60 -161
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +161 -162
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatLong.js +31 -36
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/localize.js +210 -158
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/match.js +113 -111
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de.js +18 -18
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +19 -19
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr.js +18 -18
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -16
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js +13 -14
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -21
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js +10 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js +13 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js +55 -60
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js +11 -12
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js +14 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js +24 -28
- package/dist/utilities/helpers.js +55 -70
- package/package.json +3 -2
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/debounce.js +0 -7
- package/dist/assets/img/guide.png.js +0 -4
- package/dist/components/atoms/base-button/base-button.vue.js +0 -92
- package/dist/components/atoms/base-button/base-button3.vue.js +0 -5
- package/dist/components/atoms/base-headline/base-headline.vue.js +0 -30
- package/dist/components/atoms/base-headline/base-headline2.vue.js +0 -4
- package/dist/components/atoms/base-image/base-image.vue.js +0 -75
- package/dist/components/atoms/base-image/base-image3.vue.js +0 -5
- package/dist/components/atoms/base-input/base-input.vue.js +0 -184
- package/dist/components/atoms/base-input/base-input3.vue.js +0 -5
- package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +0 -21
- package/dist/components/atoms/base-paragraph/base-paragraph2.vue.js +0 -4
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +0 -113
- package/dist/components/atoms/canvas-confetti/canvas-confetti3.vue.js +0 -5
- package/dist/components/atoms/check-group/check-group.vue.js +0 -86
- package/dist/components/atoms/check-group/check-group3.vue.js +0 -5
- package/dist/components/atoms/custom-html/custom-html.vue.js +0 -26
- package/dist/components/atoms/custom-html/custom-html2.vue.js +0 -4
- package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +0 -84
- package/dist/components/atoms/input-checkbox/input-checkbox3.vue.js +0 -5
- package/dist/components/atoms/input-datetime/input-datetime.vue.js +0 -99
- package/dist/components/atoms/input-datetime/input-datetime2.vue.js +0 -4
- package/dist/components/atoms/input-file/input-file.vue.js +0 -130
- package/dist/components/atoms/input-file/input-file2.vue.js +0 -4
- package/dist/components/atoms/input-passcode/input-passcode.vue.js +0 -149
- package/dist/components/atoms/input-passcode/input-passcode2.vue.js +0 -4
- package/dist/components/atoms/input-password/input-password.vue.js +0 -118
- package/dist/components/atoms/input-password/input-password2.vue.js +0 -4
- package/dist/components/atoms/input-textarea/input-textarea.vue.js +0 -105
- package/dist/components/atoms/input-textarea/input-textarea2.vue.js +0 -4
- package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +0 -38
- package/dist/components/atoms/loading-spinner/loading-spinner3.vue.js +0 -5
- package/dist/components/atoms/radio-group/radio-group.vue.js +0 -99
- package/dist/components/atoms/radio-group/radio-group3.vue.js +0 -5
- package/dist/components/atoms/svg-icon/svg-icon.vue.js +0 -44
- package/dist/components/atoms/svg-icon/svg-icon3.vue.js +0 -5
- package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +0 -59
- package/dist/components/atoms/zoom-slider/zoom-slider3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion-item.vue.js +0 -84
- package/dist/components/molecules/accordion/accordion-item3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion.vue.js +0 -12
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +0 -132
- package/dist/components/molecules/auto-suggest/auto-suggest3.vue.js +0 -5
- package/dist/components/molecules/base-camera/base-camera.vue.js +0 -530
- package/dist/components/molecules/base-camera/base-camera3.vue.js +0 -5
- package/dist/components/molecules/base-map/base-map.vue.js +0 -386
- package/dist/components/molecules/base-map/base-map3.vue.js +0 -5
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.js +0 -256
- package/dist/components/molecules/bulk-upload/bulk-upload3.vue.js +0 -5
- package/dist/components/molecules/color-palette/color-palette.vue.js +0 -72
- package/dist/components/molecules/color-palette/color-palette3.vue.js +0 -5
- package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +0 -102
- package/dist/components/molecules/dom-renderer/dom-renderer2.vue.js +0 -4
- package/dist/components/molecules/file-upload/file-upload.vue.js +0 -215
- package/dist/components/molecules/file-upload/file-upload3.vue.js +0 -5
- package/dist/components/molecules/hint-system/hint-system.vue.js +0 -111
- package/dist/components/molecules/hint-system/hint-system3.vue.js +0 -5
- package/dist/components/molecules/image-crop/image-crop.vue.js +0 -82
- package/dist/components/molecules/image-crop/image-crop2.vue.js +0 -4
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +0 -120
- package/dist/components/molecules/image-crop-resize/image-crop-resize2.vue.js +0 -4
- package/dist/components/molecules/image-resize/image-resize.vue.js +0 -143
- package/dist/components/molecules/image-resize/image-resize2.vue.js +0 -4
- package/dist/components/molecules/image-upload/image-upload.vue.js +0 -289
- package/dist/components/molecules/image-upload/image-upload3.vue.js +0 -5
- package/dist/components/molecules/image-zoom/image-zoom.vue.js +0 -209
- package/dist/components/molecules/image-zoom/image-zoom3.vue.js +0 -5
- package/dist/components/molecules/input-color/input-color.vue.js +0 -105
- package/dist/components/molecules/input-color/input-color3.vue.js +0 -5
- package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +0 -306
- package/dist/components/molecules/input-datepicker/input-datepicker3.vue.js +0 -5
- package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +0 -207
- package/dist/components/molecules/input-dropdown/input-dropdown3.vue.js +0 -5
- package/dist/components/molecules/link-sharing/link-sharing.vue.js +0 -177
- package/dist/components/molecules/link-sharing/link-sharing3.vue.js +0 -7
- package/dist/components/molecules/location-list/location-list.vue.js +0 -98
- package/dist/components/molecules/location-list/location-list3.vue.js +0 -5
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +0 -87
- package/dist/components/molecules/media-thumbnails/media-thumbnails3.vue.js +0 -5
- package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +0 -135
- package/dist/components/molecules/popover-notifications/popover-notifications3.vue.js +0 -5
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +0 -134
- package/dist/components/molecules/popover-tooltip/popover-tooltip3.vue.js +0 -5
- package/dist/components/molecules/progress-steps/progress-steps.vue.js +0 -84
- package/dist/components/molecules/progress-steps/progress-steps3.vue.js +0 -5
- package/dist/components/molecules/qr-code/qr-code.vue.js +0 -103
- package/dist/components/molecules/qr-code/qr-code3.vue.js +0 -5
- package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +0 -79
- package/dist/components/molecules/radio-buttons/radio-buttons3.vue.js +0 -5
- package/dist/components/molecules/rte-editor/rte-editor.vue.js +0 -478
- package/dist/components/molecules/rte-editor/rte-editor3.vue.js +0 -5
- package/dist/components/molecules/select-media/select-media.vue.js +0 -87
- package/dist/components/molecules/select-media/select-media3.vue.js +0 -5
- package/dist/components/molecules/upload-group/upload-group.vue.js +0 -193
- package/dist/components/molecules/upload-group/upload-group3.vue.js +0 -5
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +0 -160
- package/dist/components/organisms/asset-uploader/asset-uploader2.vue.js +0 -4
- package/dist/components/organisms/location-finder/location-finder.vue.js +0 -634
- package/dist/components/organisms/location-finder/location-finder3.vue.js +0 -5
- package/dist/components/organisms/preset-uploader/preset-uploader.vue.js +0 -569
- package/dist/components/organisms/preset-uploader/preset-uploader3.vue.js +0 -5
- package/dist/components/templates/base-carousel/base-carousel.vue.js +0 -93
- package/dist/components/templates/base-carousel/base-carousel3.vue.js +0 -5
- package/dist/components/templates/base-form/base-form.vue.js +0 -35
- package/dist/components/templates/base-form/base-form3.vue.js +0 -5
- package/dist/components/templates/modal-dialog/modal-dialog.vue.js +0 -123
- package/dist/components/templates/modal-dialog/modal-dialog3.vue.js +0 -5
- package/dist/components/templates/popover-dialog/popover-dialog.vue.js +0 -95
- package/dist/components/templates/popover-dialog/popover-dialog3.vue.js +0 -5
- package/dist/components/templates/sortable-list/sortable-list.vue.js +0 -204
- package/dist/components/templates/sortable-list/sortable-list3.vue.js +0 -5
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +0 -76
- package/dist/components/templates/touch-wrapper/touch-wrapper3.vue.js +0 -5
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import t from "../../atoms/svg-icon/svg-icon.js";
|
|
3
|
+
import n from "../../atoms/loading-spinner/loading-spinner.js";
|
|
4
|
+
import { dataURItoBlob as r } from "../../../utilities/helpers.js";
|
|
5
|
+
import i from "../input-dropdown/input-dropdown.js";
|
|
6
|
+
import { require_debounce as a } from "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js";
|
|
7
|
+
import { useCameraFilter as o } from "../../../composables/useCameraFilter.js";
|
|
8
|
+
import s from "../../atoms/zoom-slider/zoom-slider.js";
|
|
9
|
+
import c from "../../../assets/img/guide.js";
|
|
10
|
+
import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, nextTick as ee, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as te, onMounted as ne, openBlock as v, ref as y, toDisplayString as b, vShow as re, watch as ie, withCtx as ae, withDirectives as oe, withModifiers as se } from "vue";
|
|
11
|
+
//#region src/components/molecules/base-camera/base-camera.vue?vue&type=script&async=true&setup=true&lang.ts
|
|
12
|
+
var ce = /* @__PURE__ */ e(a(), 1), le = { class: "camera__preview" }, ue = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "camera__bg-notification"
|
|
15
|
+
}, de = ["innerHTML"], fe = ["width", "height"], pe = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "camera__countdown-overlay"
|
|
18
|
+
}, me = ["innerHTML", "data-countdown"], he = ["src"], ge = {
|
|
19
|
+
key: 3,
|
|
20
|
+
class: "camera__zoom-slider"
|
|
21
|
+
}, _e = { class: "camera__controls" }, ve = { class: "container" }, ye = { class: "row" }, be = { class: "col" }, xe = { class: "btn-group" }, Se = { key: 0 }, Ce = { key: 1 }, we = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "camera__select-device"
|
|
24
|
+
}, Te = { class: "col" }, Ee = { class: "" }, De = {
|
|
25
|
+
name: "BaseCamera",
|
|
26
|
+
inheritAttrs: !1
|
|
27
|
+
}, Oe = {
|
|
28
|
+
"1x1": {
|
|
29
|
+
width: 720,
|
|
30
|
+
height: 720
|
|
31
|
+
},
|
|
32
|
+
"2x3": {
|
|
33
|
+
width: 720,
|
|
34
|
+
height: 1080
|
|
35
|
+
},
|
|
36
|
+
"3x2": {
|
|
37
|
+
width: 1080,
|
|
38
|
+
height: 720
|
|
39
|
+
},
|
|
40
|
+
"3x4": {
|
|
41
|
+
width: 720,
|
|
42
|
+
height: 960
|
|
43
|
+
},
|
|
44
|
+
"4x3": {
|
|
45
|
+
width: 960,
|
|
46
|
+
height: 720
|
|
47
|
+
},
|
|
48
|
+
"4x5": {
|
|
49
|
+
width: 960,
|
|
50
|
+
height: 1200
|
|
51
|
+
},
|
|
52
|
+
"5x4": {
|
|
53
|
+
width: 1200,
|
|
54
|
+
height: 960
|
|
55
|
+
},
|
|
56
|
+
"16x9": {
|
|
57
|
+
width: 1280,
|
|
58
|
+
height: 720
|
|
59
|
+
},
|
|
60
|
+
"9x16": {
|
|
61
|
+
width: 720,
|
|
62
|
+
height: 1280
|
|
63
|
+
}
|
|
64
|
+
}, x = /*@__PURE__*/ h({
|
|
65
|
+
...De,
|
|
66
|
+
props: {
|
|
67
|
+
modelValue: { type: null },
|
|
68
|
+
enableSwitchCamera: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !0
|
|
71
|
+
},
|
|
72
|
+
defaultRearCamera: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
},
|
|
76
|
+
enableMirrorCamera: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !1
|
|
79
|
+
},
|
|
80
|
+
enableGuide: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !0
|
|
83
|
+
},
|
|
84
|
+
guideSrc: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: () => c
|
|
87
|
+
},
|
|
88
|
+
countdown: {
|
|
89
|
+
type: Number,
|
|
90
|
+
default: 0
|
|
91
|
+
},
|
|
92
|
+
ratio: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: ""
|
|
95
|
+
},
|
|
96
|
+
filter: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "none",
|
|
99
|
+
validator: (e) => [
|
|
100
|
+
"none",
|
|
101
|
+
"grayscale",
|
|
102
|
+
"sepia"
|
|
103
|
+
].includes(e)
|
|
104
|
+
},
|
|
105
|
+
tintColor: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: ""
|
|
108
|
+
},
|
|
109
|
+
tintIntensity: {
|
|
110
|
+
type: Number,
|
|
111
|
+
default: .3
|
|
112
|
+
},
|
|
113
|
+
enableAudio: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !1
|
|
116
|
+
},
|
|
117
|
+
enableSelectDevice: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !1
|
|
120
|
+
},
|
|
121
|
+
enableCropImage: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !0
|
|
124
|
+
},
|
|
125
|
+
resolutions: {
|
|
126
|
+
type: Object,
|
|
127
|
+
default: () => Oe
|
|
128
|
+
},
|
|
129
|
+
zoom: {
|
|
130
|
+
type: Number,
|
|
131
|
+
default: 1
|
|
132
|
+
},
|
|
133
|
+
enableZoomSlider: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: !1
|
|
136
|
+
},
|
|
137
|
+
correctOrientation: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !1
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
emits: ["update:modelValue"],
|
|
143
|
+
setup(e, { expose: a, emit: c }) {
|
|
144
|
+
let h = e, De = c, x = y(), S = y(), ke = y(!1), C = y([]), w = y(), T = y(), E = y(), D = y(!1), O = y(!1), k = y(0), A = y(0), j = y(), M = y(h.zoom || 1), Ae = y(!1), N = y(!1), P = y(null), F = y(!1), I, L, je = typeof window < "u" && "DeviceMotionEvent" in window && (window.matchMedia?.("(pointer: coarse)")?.matches || "ontouchstart" in window), Me = l(() => h.correctOrientation && je), R = l(() => ke.value && (!Me.value || F.value));
|
|
145
|
+
function z() {
|
|
146
|
+
L &&= (window.removeEventListener("pointerdown", L, !0), window.removeEventListener("touchend", L, !0), void 0);
|
|
147
|
+
}
|
|
148
|
+
function B() {
|
|
149
|
+
F.value = !0, I &&= (clearTimeout(I), void 0), z();
|
|
150
|
+
}
|
|
151
|
+
function Ne() {
|
|
152
|
+
L || (L = () => {
|
|
153
|
+
V();
|
|
154
|
+
}, window.addEventListener("pointerdown", L, !0), window.addEventListener("touchend", L, !0));
|
|
155
|
+
}
|
|
156
|
+
function Pe(e) {
|
|
157
|
+
let t = e.accelerationIncludingGravity;
|
|
158
|
+
if (!t || t.x == null || t.y == null) return;
|
|
159
|
+
let n = Math.round(Math.atan2(t.x, t.y) * 180 / Math.PI);
|
|
160
|
+
if (P.value = n, !(typeof screen < "u" && screen.orientation && screen.orientation.type || "portrait-primary").startsWith("portrait")) N.value = !1;
|
|
161
|
+
else {
|
|
162
|
+
let e = Math.abs(Math.abs(n) - 90);
|
|
163
|
+
!N.value && e < 40 ? N.value = !0 : N.value && e > 50 && (N.value = !1);
|
|
164
|
+
}
|
|
165
|
+
F.value || B();
|
|
166
|
+
}
|
|
167
|
+
async function V() {
|
|
168
|
+
if (!(!h.correctOrientation || Ae.value)) try {
|
|
169
|
+
let e = window.DeviceOrientationEvent, t = window.DeviceMotionEvent;
|
|
170
|
+
if (e && typeof e.requestPermission == "function" && await e.requestPermission() !== "granted") {
|
|
171
|
+
B();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
t && typeof t.requestPermission == "function" && await t.requestPermission().catch(() => {}), window.addEventListener("devicemotion", Pe, !0), Ae.value = !0, z();
|
|
175
|
+
} catch (e) {
|
|
176
|
+
console.error(e, "enableMotion: failed"), B();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let H = l(() => ({
|
|
180
|
+
...Oe,
|
|
181
|
+
...h.resolutions
|
|
182
|
+
})), Fe = l(() => Object.values(H.value)[0]);
|
|
183
|
+
function Ie(e) {
|
|
184
|
+
return String(e || "").trim().toLowerCase().replace(/\s+/g, "").replace(/[:/]/g, "x");
|
|
185
|
+
}
|
|
186
|
+
let U = l(() => {
|
|
187
|
+
if (H.value[h.ratio]) return h.ratio;
|
|
188
|
+
let e = Ie(h.ratio);
|
|
189
|
+
if (H.value[e]) return e;
|
|
190
|
+
}), W = l(() => U.value ? H.value[U.value] : Fe.value), Le = l(() => {
|
|
191
|
+
let e = U.value ? H.value[U.value] : void 0;
|
|
192
|
+
return e ? `${e.width} / ${e.height}` : void 0;
|
|
193
|
+
}), G = l(() => C.value.filter((e) => e.kind === "videoinput")), Re = l(() => C.value.filter((e) => e.kind === "audioinput")), K = y([]), ze = l(() => G.value.filter((e) => !K.value.includes(e.deviceId)));
|
|
194
|
+
function Be(e) {
|
|
195
|
+
e && !K.value.includes(e) && (K.value = [...K.value, e]);
|
|
196
|
+
}
|
|
197
|
+
function Ve(e) {
|
|
198
|
+
let t = G.value;
|
|
199
|
+
if (!t.length) return;
|
|
200
|
+
let n = t.findIndex((t) => t.deviceId === e);
|
|
201
|
+
for (let e = 1; e <= t.length; e++) {
|
|
202
|
+
let r = t[(Math.max(n, 0) + e) % t.length];
|
|
203
|
+
if (r && !K.value.includes(r.deviceId)) return r;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
let He = l(() => ze.value.map((e, t) => ({
|
|
207
|
+
text: e.label.slice(0, e.label.indexOf("(")) || `Camera ${t + 1}`,
|
|
208
|
+
value: e.deviceId
|
|
209
|
+
}))), Ue = l({
|
|
210
|
+
get() {
|
|
211
|
+
return w.value && w.value.deviceId;
|
|
212
|
+
},
|
|
213
|
+
set(e) {
|
|
214
|
+
w.value = G.value.find((t) => t.deviceId === e), E.value = void 0;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
l({
|
|
218
|
+
get() {
|
|
219
|
+
return T.value && T.value.deviceId;
|
|
220
|
+
},
|
|
221
|
+
set(e) {
|
|
222
|
+
T.value = Re.value.find((t) => t.deviceId === e);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
let q = l(() => {
|
|
226
|
+
let e = w.value && G.value.findIndex((e) => e.deviceId === w.value?.deviceId);
|
|
227
|
+
return h.enableMirrorCamera && e === 0 ? "mirror-cam" : "";
|
|
228
|
+
}), We = l(() => {
|
|
229
|
+
let e = w.value && C.value.findIndex((e) => e.deviceId === w.value?.deviceId);
|
|
230
|
+
return q.value ? `${q.value} mirror-device-${e}` : "";
|
|
231
|
+
}), { tintRgb: Ge, applyFilterToCanvas: Ke } = o(h);
|
|
232
|
+
function qe() {
|
|
233
|
+
if (U.value && W.value) {
|
|
234
|
+
k.value = W.value.width, A.value = W.value.height;
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
k.value = x.value.parentElement && x.value.parentElement.clientWidth, A.value = x.value.parentElement && x.value.parentElement.clientHeight;
|
|
238
|
+
}
|
|
239
|
+
let Je = (0, ce.default)(() => {
|
|
240
|
+
qe();
|
|
241
|
+
}, 300, {
|
|
242
|
+
trailing: !0,
|
|
243
|
+
leading: !1
|
|
244
|
+
});
|
|
245
|
+
function Ye(e) {
|
|
246
|
+
return new Promise((t) => setTimeout(t, e));
|
|
247
|
+
}
|
|
248
|
+
async function Xe() {
|
|
249
|
+
let e = W.value ? {
|
|
250
|
+
width: W.value.width,
|
|
251
|
+
height: W.value.height
|
|
252
|
+
} : void 0, t = e ? Math.max(e.width, e.height) : void 0, n = e ? Math.min(e.width, e.height) : void 0, r = h.enableAudio && { ...T.value ? { deviceId: T.value.deviceId } : {} }, i = w.value && w.value.deviceId, a = E.value, o = [];
|
|
253
|
+
i ? (t && n && o.push({
|
|
254
|
+
deviceId: { exact: i },
|
|
255
|
+
width: { ideal: t },
|
|
256
|
+
height: { ideal: n }
|
|
257
|
+
}), o.push({ deviceId: { exact: i } })) : a ? (t && n && o.push({
|
|
258
|
+
facingMode: { exact: a },
|
|
259
|
+
width: { ideal: t },
|
|
260
|
+
height: { ideal: n }
|
|
261
|
+
}), o.push({ facingMode: { exact: a } }), t && n && o.push({
|
|
262
|
+
width: { ideal: t },
|
|
263
|
+
height: { ideal: n }
|
|
264
|
+
}), o.push({})) : (t && n && o.push({
|
|
265
|
+
width: { ideal: t },
|
|
266
|
+
height: { ideal: n }
|
|
267
|
+
}), o.push({}));
|
|
268
|
+
for (let e of o) for (let t = 0; t < 5; t++) try {
|
|
269
|
+
return await navigator.mediaDevices.getUserMedia({
|
|
270
|
+
audio: r,
|
|
271
|
+
video: e
|
|
272
|
+
});
|
|
273
|
+
} catch (e) {
|
|
274
|
+
let t = e && e.name;
|
|
275
|
+
if (t === "NotReadableError" || t === "AbortError") {
|
|
276
|
+
await Ye(500);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function J() {
|
|
283
|
+
x.value && x.value.srcObject && (x.value.srcObject.getTracks().forEach((e) => {
|
|
284
|
+
e.stop();
|
|
285
|
+
}), x.value.srcObject = null);
|
|
286
|
+
}
|
|
287
|
+
let Y = 0, X, Ze;
|
|
288
|
+
function Z() {
|
|
289
|
+
X &&= (clearTimeout(X), void 0), Ze &&= (Ze(), void 0);
|
|
290
|
+
}
|
|
291
|
+
function Qe(e) {
|
|
292
|
+
Be(e);
|
|
293
|
+
let t = Ve(e);
|
|
294
|
+
t && t.deviceId !== e && (w.value = t);
|
|
295
|
+
}
|
|
296
|
+
function $e(e) {
|
|
297
|
+
Z();
|
|
298
|
+
let t = w.value && w.value.deviceId, n = x.value;
|
|
299
|
+
if (!t || !n) return;
|
|
300
|
+
let r = n.srcObject && n.srcObject.getVideoTracks?.()[0];
|
|
301
|
+
if (!r || typeof r.addEventListener != "function" || n.videoWidth > 0) return;
|
|
302
|
+
let i = () => {
|
|
303
|
+
if (Z(), e !== Y || !x.value) return;
|
|
304
|
+
let n = Ve(t);
|
|
305
|
+
n && n.deviceId !== t && (J(), Qe(t));
|
|
306
|
+
}, a = () => {
|
|
307
|
+
e === Y && x.value && x.value.videoWidth > 0 && Z();
|
|
308
|
+
}, o = () => {
|
|
309
|
+
i();
|
|
310
|
+
};
|
|
311
|
+
r.addEventListener("unmute", a), r.addEventListener("ended", o), Ze = () => {
|
|
312
|
+
r.removeEventListener("unmute", a), r.removeEventListener("ended", o);
|
|
313
|
+
}, X = setTimeout(() => {
|
|
314
|
+
X = void 0, !(e !== Y || !x.value) && (x.value.videoWidth === 0 ? i() : Z());
|
|
315
|
+
}, 8e3);
|
|
316
|
+
}
|
|
317
|
+
let et = 0;
|
|
318
|
+
async function Q() {
|
|
319
|
+
let e = ++Y;
|
|
320
|
+
Z();
|
|
321
|
+
let t = !!(x.value && x.value.srcObject);
|
|
322
|
+
if (J(), t && (await Ye(350), e !== Y)) return;
|
|
323
|
+
let n = await Xe();
|
|
324
|
+
if (e !== Y) {
|
|
325
|
+
n?.getTracks?.().forEach((e) => e.stop());
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (n && x.value) {
|
|
329
|
+
et = 0, x.value.srcObject = n, x.value.muted = !0;
|
|
330
|
+
try {
|
|
331
|
+
await x.value.play?.();
|
|
332
|
+
} catch {}
|
|
333
|
+
$e(e);
|
|
334
|
+
} else if (!n && w.value) {
|
|
335
|
+
et < 2 && (et++, await Ye(600), e === Y && await Q());
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
return C.value = await navigator.mediaDevices.enumerateDevices(), {
|
|
339
|
+
stream: x.value && x.value.srcObject,
|
|
340
|
+
devices: C.value
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
function tt() {
|
|
344
|
+
D.value ? (D.value = !1, O.value = !1, J()) : (D.value = !0, Q());
|
|
345
|
+
}
|
|
346
|
+
function nt() {
|
|
347
|
+
w.value = void 0, E.value = E.value === "user" ? "environment" : "user", Q();
|
|
348
|
+
}
|
|
349
|
+
async function rt(e, t) {
|
|
350
|
+
e && (!t || e.deviceId !== t.deviceId) && await Q();
|
|
351
|
+
}
|
|
352
|
+
ie(() => w.value, rt), ie(() => T.value, rt);
|
|
353
|
+
function $() {
|
|
354
|
+
h.countdown ? (j.value = j.value ? j.value - 1 : h.countdown, j.value ? setTimeout($, 1e3) : ot()) : ot();
|
|
355
|
+
}
|
|
356
|
+
a({
|
|
357
|
+
onCapture: $,
|
|
358
|
+
enableMotion: V,
|
|
359
|
+
camera: x.value,
|
|
360
|
+
zoom: M
|
|
361
|
+
});
|
|
362
|
+
function it() {
|
|
363
|
+
if (!h.correctOrientation || P.value == null) return 0;
|
|
364
|
+
let e = ((P.value - 180) % 360 + 360) % 360;
|
|
365
|
+
return (-1 * (Math.round(e / 90) * 90 % 360) % 360 + 360) % 360;
|
|
366
|
+
}
|
|
367
|
+
function at(e, t, n, r, i) {
|
|
368
|
+
let a = S.value.width, o = S.value.height;
|
|
369
|
+
e.translate(a / 2, o / 2), q.value && e.scale(-1, 1), e.rotate(n * Math.PI / 180);
|
|
370
|
+
let s = o, c = a, l = Math.max(s / r, c / i) * (M.value && M.value > 0 ? M.value : 1), u = r * l, d = i * l;
|
|
371
|
+
e.drawImage(t, -u / 2, -d / 2, u, d);
|
|
372
|
+
}
|
|
373
|
+
function ot() {
|
|
374
|
+
O.value = !0;
|
|
375
|
+
let e = S.value.getContext("2d"), t = x.value, n = t && t.srcObject && t.srcObject.getTracks(), { aspectRatio: r, width: i, height: a } = n.length && n[0].getSettings(), o = t?.videoWidth || i || k.value, s = t?.videoHeight || a || A.value, c = o && s ? o / s : r, l = W.value || {
|
|
376
|
+
width: o,
|
|
377
|
+
height: s
|
|
378
|
+
}, u = l?.width || o, d = U.value ? l?.height || s : Math.round(u / c), f = u / d;
|
|
379
|
+
if (S.value.width = u, S.value.height = d, !o || !s || !c) return;
|
|
380
|
+
let p = it();
|
|
381
|
+
if (e.save(), p === 90 || p === 270) {
|
|
382
|
+
at(e, t, p, o, s), e.restore(), Ke(e, S.value.width, S.value.height), st(S.value.toDataURL("image/png"));
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (p === 180 && (e.translate(S.value.width, S.value.height), e.scale(-1, -1)), q.value && (e.translate(S.value.width, 0), e.scale(-1, 1)), h.enableCropImage) {
|
|
386
|
+
let n = 0, r = 0, i = o, a = s;
|
|
387
|
+
if (c > f ? (i = s * f, n = (o - i) / 2) : c < f && (a = o / f, r = (s - a) / 2), M.value && M.value !== 1) {
|
|
388
|
+
let e = i / M.value, t = a / M.value;
|
|
389
|
+
n += (i - e) / 2, r += (a - t) / 2, i = e, a = t;
|
|
390
|
+
}
|
|
391
|
+
e.drawImage(t, n, r, i, a, 0, 0, S.value.width, S.value.height);
|
|
392
|
+
} else {
|
|
393
|
+
let n = S.value.width, r = S.value.height, i = 0, a = 0;
|
|
394
|
+
if (c > f ? (r = S.value.width / c, a = (S.value.height - r) / 2) : c < f && (n = S.value.height * c, i = (S.value.width - n) / 2), M.value && M.value !== 1) {
|
|
395
|
+
let c = o / M.value, l = s / M.value, u = (o - c) / 2, d = (s - l) / 2;
|
|
396
|
+
q.value && (i = S.value.width - i - n), e.drawImage(t, u, d, c, l, i, a, n, r);
|
|
397
|
+
} else q.value && (i = S.value.width - i - n), e.drawImage(t, 0, 0, o, s, i, a, n, r);
|
|
398
|
+
}
|
|
399
|
+
e.restore(), Ke(e, S.value.width, S.value.height), st(S.value.toDataURL("image/png"));
|
|
400
|
+
}
|
|
401
|
+
function st(e) {
|
|
402
|
+
let t = r(e);
|
|
403
|
+
De("update:modelValue", {
|
|
404
|
+
name: `cam-pic-${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
405
|
+
id: `cam-pic-${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
406
|
+
blob: t,
|
|
407
|
+
size: t.size
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
return ne(async () => {
|
|
411
|
+
await Q(), D.value = !0, E.value = h.defaultRearCamera ? "environment" : "user";
|
|
412
|
+
let e = h.defaultRearCamera && G.value.length > 1 ? G.value[G.value.length - 1] : G.value[0];
|
|
413
|
+
if (w.value = e, h.enableAudio && (T.value = Re.value[0]), navigator.mediaDevices.addEventListener("devicechange", async (e) => {
|
|
414
|
+
await Q();
|
|
415
|
+
}), window.addEventListener("resize", Je), qe(), Me.value) {
|
|
416
|
+
I = setTimeout(B, 3e3);
|
|
417
|
+
let e = window.DeviceOrientationEvent;
|
|
418
|
+
e && typeof e.requestPermission == "function" ? Ne() : V();
|
|
419
|
+
}
|
|
420
|
+
await ee(), ke.value = !0;
|
|
421
|
+
}), te(() => {
|
|
422
|
+
D.value = !1, O.value = !1, Z(), J(), window.removeEventListener("resize", Je), window.removeEventListener("devicemotion", Pe, !0), I && clearTimeout(I), z();
|
|
423
|
+
}), (r, a) => (v(), f("div", { class: g(["camera", We.value]) }, [
|
|
424
|
+
p("div", le, [
|
|
425
|
+
R.value ? d("", !0) : (v(), f("div", ue, [m(n, { color: "#000" }, {
|
|
426
|
+
default: ae(() => [p("span", {
|
|
427
|
+
class: g("d-block text-center"),
|
|
428
|
+
innerHTML: r.$t("camera.waitForCameraNotification")
|
|
429
|
+
}, null, 8, de)]),
|
|
430
|
+
_: 1
|
|
431
|
+
})])),
|
|
432
|
+
oe(p("div", {
|
|
433
|
+
class: g(["camera__video-wrapper", U.value ? `aspect-ratio--${U.value}` : ""]),
|
|
434
|
+
style: _({
|
|
435
|
+
aspectRatio: Le.value || void 0,
|
|
436
|
+
transform: M.value === 1 ? void 0 : `scale(${M.value})`
|
|
437
|
+
})
|
|
438
|
+
}, [p("video", {
|
|
439
|
+
ref_key: "camera",
|
|
440
|
+
ref: x,
|
|
441
|
+
class: "camera__video",
|
|
442
|
+
style: _({
|
|
443
|
+
filter: h.filter === "grayscale" ? "grayscale(100%)" : h.filter === "sepia" ? "sepia(100%)" : "none",
|
|
444
|
+
transform: e.correctOrientation && N.value ? "rotate(180deg)" : void 0
|
|
445
|
+
}),
|
|
446
|
+
autoplay: "",
|
|
447
|
+
muted: "",
|
|
448
|
+
playsinline: ""
|
|
449
|
+
}, null, 4), e.tintColor ? (v(), f("div", {
|
|
450
|
+
key: 0,
|
|
451
|
+
class: "camera__tint-overlay",
|
|
452
|
+
style: _({
|
|
453
|
+
backgroundColor: e.tintColor,
|
|
454
|
+
opacity: e.tintIntensity,
|
|
455
|
+
mixBlendMode: "multiply"
|
|
456
|
+
})
|
|
457
|
+
}, null, 4)) : d("", !0)], 6), [[re, R.value]]),
|
|
458
|
+
oe(p("canvas", {
|
|
459
|
+
ref_key: "canvas",
|
|
460
|
+
ref: S,
|
|
461
|
+
class: "camera__canvas",
|
|
462
|
+
width: k.value,
|
|
463
|
+
height: A.value
|
|
464
|
+
}, null, 8, fe), [[re, O.value]]),
|
|
465
|
+
j.value ? (v(), f("div", pe, [(v(), f("p", {
|
|
466
|
+
class: "countdown",
|
|
467
|
+
key: j.value,
|
|
468
|
+
innerHTML: j.value,
|
|
469
|
+
"data-countdown": j.value
|
|
470
|
+
}, null, 8, me))])) : d("", !0),
|
|
471
|
+
e.enableGuide && D.value && R.value ? (v(), f("img", {
|
|
472
|
+
key: 2,
|
|
473
|
+
class: "camera__guide",
|
|
474
|
+
src: e.guideSrc
|
|
475
|
+
}, null, 8, he)) : d("", !0),
|
|
476
|
+
e.enableZoomSlider ? (v(), f("div", ge, [m(s, {
|
|
477
|
+
modelValue: M.value,
|
|
478
|
+
"onUpdate:modelValue": a[0] ||= (e) => M.value = e
|
|
479
|
+
}, null, 8, ["modelValue"])])) : d("", !0)
|
|
480
|
+
]),
|
|
481
|
+
p("div", _e, [p("div", ve, [p("div", ye, [p("div", be, [p("div", xe, [p("button", {
|
|
482
|
+
type: "button",
|
|
483
|
+
class: "camera__toggle btn btn-primary",
|
|
484
|
+
onClick: tt
|
|
485
|
+
}, [D.value ? (v(), f("span", Ce, b(r.$t("common.pause")), 1)) : (v(), f("span", Se, b(r.$t("common.play")), 1))]), p("button", {
|
|
486
|
+
type: "button",
|
|
487
|
+
class: "camera__capture btn btn-primary",
|
|
488
|
+
onClick: $
|
|
489
|
+
}, b(r.$t("camera.capture")), 1)])])])])]),
|
|
490
|
+
(e.enableSwitchCamera || e.enableSelectDevice) && ze.value && ze.value.length > 1 ? (v(), f("div", we, [p("div", Te, [e.enableSelectDevice ? (v(), u(i, {
|
|
491
|
+
key: 0,
|
|
492
|
+
modelValue: Ue.value,
|
|
493
|
+
"onUpdate:modelValue": a[1] ||= (e) => Ue.value = e,
|
|
494
|
+
options: He.value,
|
|
495
|
+
class: "w-100"
|
|
496
|
+
}, null, 8, ["modelValue", "options"])) : d("", !0)]), p("div", Ee, [e.enableSwitchCamera ? (v(), f("button", {
|
|
497
|
+
key: 0,
|
|
498
|
+
class: "btn",
|
|
499
|
+
onClick: se(nt, ["prevent"])
|
|
500
|
+
}, [m(t, { symbol: "switch-camera" })])) : d("", !0)])])) : d("", !0)
|
|
501
|
+
], 2));
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
//#endregion
|
|
505
|
+
export { x as default };
|