@voicenter-team/voicenter-ui-plus 1.1.21 → 2.0.2
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/library/{entry-EvdwF4XL.mjs → core/index.mjs} +18563 -10397
- package/library/core/index.mjs.br +0 -0
- package/library/core/index.mjs.gz +0 -0
- package/library/core/index.umd.js +15 -0
- package/library/core/index.umd.js.br +0 -0
- package/library/core/index.umd.js.gz +0 -0
- package/library/core/style.css +1 -0
- package/library/core/style.css.br +0 -0
- package/library/core/style.css.gz +0 -0
- package/library/{types → core/types}/components/VcButton/index.d.ts +78 -78
- package/library/{types → core/types}/components/VcDropdown/VcDropdown.vue.d.ts +8 -8
- package/library/{types → core/types}/components/VcMeterGroup/VcMeterGroup.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcMeterGroup/VcMeterGroupLabel.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcSparkline/VcBarLine.vue.d.ts +25 -1
- package/library/{types → core/types}/components/VcSparkline/VcSparkline.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcSparkline/VcTrendLine.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcSparkline/helper.d.ts +1 -1
- package/library/{types → core/types}/components/VcTransfer/VcTransfer.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcTree/VcTreeSelect.vue.d.ts +20 -19
- package/library/{types/components/index.d.ts → core/types/components/exports.d.ts} +92 -105
- package/library/{types/entity/composable → core/types/composables}/useConfirmPopup.d.ts +5 -5
- package/library/core/types/entry.d.ts +32 -0
- package/library/core/types/localization/locales/en.json.d.ts +165 -0
- package/library/{types → core/types}/services/index.d.ts +2 -2
- package/library/core/types/theme/themes.json.d.ts +185 -0
- package/library/core/types/tokens/tokens.d.ts +6 -0
- package/library/{types → core/types}/types/VcDropdown.types.d.ts +2 -1
- package/library/{types → core/types}/types/VcTabs.types.d.ts +0 -4
- package/library/{types → core/types}/types/VcTree.types.d.ts +2 -2
- package/library/core/types/types/basic.types.d.ts +20 -0
- package/library/{types → core/types}/types/index.d.ts +2 -8
- package/package.json +33 -26
- package/src/{theme → core/theme}/themes.json +8 -0
- package/tailwind.config.js +1 -1
- package/library/VcExcelFileUploader-DdT4JMP3.mjs +0 -28203
- package/library/VcExcelFileUploader-DdT4JMP3.mjs.br +0 -0
- package/library/VcExcelFileUploader-DdT4JMP3.mjs.gz +0 -0
- package/library/VcHtmlEditor-C3zXhk2H.mjs +0 -691
- package/library/VcHtmlEditor-C3zXhk2H.mjs.br +0 -0
- package/library/VcHtmlEditor-C3zXhk2H.mjs.gz +0 -0
- package/library/VcImageUploader-Db8XF_ZV.mjs +0 -1772
- package/library/VcImageUploader-Db8XF_ZV.mjs.br +0 -0
- package/library/VcImageUploader-Db8XF_ZV.mjs.gz +0 -0
- package/library/VcJsonSchema-B4EM6LcW.mjs +0 -2216
- package/library/VcJsonSchema-B4EM6LcW.mjs.br +0 -0
- package/library/VcJsonSchema-B4EM6LcW.mjs.gz +0 -0
- package/library/VcMdEditor-CMlNJcLY.mjs +0 -4
- package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs +0 -27376
- package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs.br +0 -0
- package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs.gz +0 -0
- package/library/VcPdfDocument-Cf7CB2iK.mjs +0 -33131
- package/library/VcPdfDocument-Cf7CB2iK.mjs.br +0 -0
- package/library/VcPdfDocument-Cf7CB2iK.mjs.gz +0 -0
- package/library/VcSoundPlayer-Bc4GDrHh.mjs +0 -258
- package/library/VcSoundPlayer-Bc4GDrHh.mjs.br +0 -0
- package/library/VcSoundPlayer-Bc4GDrHh.mjs.gz +0 -0
- package/library/VcSparkline-CwjaA-i6.mjs +0 -561
- package/library/VcSparkline-CwjaA-i6.mjs.br +0 -0
- package/library/VcSparkline-CwjaA-i6.mjs.gz +0 -0
- package/library/VcSystemUserPrompt-WxIPI7kS.mjs +0 -145
- package/library/VcSystemUserPrompt-WxIPI7kS.mjs.br +0 -0
- package/library/VcSystemUserPrompt-WxIPI7kS.mjs.gz +0 -0
- package/library/VcTour-DE5ioKMo.mjs +0 -1068
- package/library/VcTour-DE5ioKMo.mjs.br +0 -0
- package/library/VcTour-DE5ioKMo.mjs.gz +0 -0
- package/library/VcTransfer-CG4j9PzS.mjs +0 -567
- package/library/VcTransfer-CG4j9PzS.mjs.br +0 -0
- package/library/VcTransfer-CG4j9PzS.mjs.gz +0 -0
- package/library/VcTree-C2VshYQH.mjs +0 -4
- package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs +0 -2219
- package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs.br +0 -0
- package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs.gz +0 -0
- package/library/VcTreeSelect-CwsiIyeG.mjs +0 -339
- package/library/VcTreeSelect-CwsiIyeG.mjs.br +0 -0
- package/library/VcTreeSelect-CwsiIyeG.mjs.gz +0 -0
- package/library/_isIterateeCall-jrkoht6u.mjs +0 -16
- package/library/apl-fqmucPXA.mjs +0 -140
- package/library/apl-fqmucPXA.mjs.br +0 -0
- package/library/apl-fqmucPXA.mjs.gz +0 -0
- package/library/asciiarmor-DucZyvP0.mjs +0 -56
- package/library/asciiarmor-DucZyvP0.mjs.br +0 -0
- package/library/asciiarmor-DucZyvP0.mjs.gz +0 -0
- package/library/asn1-BnOEsgAm.mjs +0 -144
- package/library/asn1-BnOEsgAm.mjs.br +0 -0
- package/library/asn1-BnOEsgAm.mjs.gz +0 -0
- package/library/asterisk-QAlztEwS.mjs +0 -345
- package/library/asterisk-QAlztEwS.mjs.br +0 -0
- package/library/asterisk-QAlztEwS.mjs.gz +0 -0
- package/library/brainfuck-DZVCuF_t.mjs +0 -53
- package/library/brainfuck-DZVCuF_t.mjs.br +0 -0
- package/library/brainfuck-DZVCuF_t.mjs.gz +0 -0
- package/library/clike-DaICHkS3.mjs +0 -805
- package/library/clike-DaICHkS3.mjs.br +0 -0
- package/library/clike-DaICHkS3.mjs.gz +0 -0
- package/library/clojure-BhXMqnxz.mjs +0 -849
- package/library/clojure-BhXMqnxz.mjs.br +0 -0
- package/library/clojure-BhXMqnxz.mjs.gz +0 -0
- package/library/cmake-BGaNd9E7.mjs +0 -71
- package/library/cmake-BGaNd9E7.mjs.br +0 -0
- package/library/cmake-BGaNd9E7.mjs.gz +0 -0
- package/library/cobol-4yqQntpt.mjs +0 -120
- package/library/cobol-4yqQntpt.mjs.br +0 -0
- package/library/cobol-4yqQntpt.mjs.gz +0 -0
- package/library/coffeescript-D2dXvhEc.mjs +0 -308
- package/library/coffeescript-D2dXvhEc.mjs.br +0 -0
- package/library/coffeescript-D2dXvhEc.mjs.gz +0 -0
- package/library/commonlisp-CF_VNHQR.mjs +0 -130
- package/library/commonlisp-CF_VNHQR.mjs.br +0 -0
- package/library/commonlisp-CF_VNHQR.mjs.gz +0 -0
- package/library/crystal-DyuLTqLs.mjs +0 -398
- package/library/crystal-DyuLTqLs.mjs.br +0 -0
- package/library/crystal-DyuLTqLs.mjs.gz +0 -0
- package/library/css-c-jst79C.mjs +0 -1783
- package/library/css-c-jst79C.mjs.br +0 -0
- package/library/css-c-jst79C.mjs.gz +0 -0
- package/library/cypher-Dlu_3r4V.mjs +0 -121
- package/library/cypher-Dlu_3r4V.mjs.br +0 -0
- package/library/cypher-Dlu_3r4V.mjs.gz +0 -0
- package/library/d-UURgV0Ux.mjs +0 -179
- package/library/d-UURgV0Ux.mjs.br +0 -0
- package/library/d-UURgV0Ux.mjs.gz +0 -0
- package/library/diff-B_Bi2Crb.mjs +0 -25
- package/library/dockerfile-D1TIj5jA.mjs +0 -201
- package/library/dockerfile-D1TIj5jA.mjs.br +0 -0
- package/library/dockerfile-D1TIj5jA.mjs.gz +0 -0
- package/library/dtd-Dy74G54E.mjs +0 -114
- package/library/dtd-Dy74G54E.mjs.br +0 -0
- package/library/dtd-Dy74G54E.mjs.gz +0 -0
- package/library/dylan-TSb-Nfix.mjs +0 -314
- package/library/dylan-TSb-Nfix.mjs.br +0 -0
- package/library/dylan-TSb-Nfix.mjs.gz +0 -0
- package/library/ebnf-DAomQUbD.mjs +0 -139
- package/library/ebnf-DAomQUbD.mjs.br +0 -0
- package/library/ebnf-DAomQUbD.mjs.gz +0 -0
- package/library/ecl-B59qGGVg.mjs +0 -178
- package/library/ecl-B59qGGVg.mjs.br +0 -0
- package/library/ecl-B59qGGVg.mjs.gz +0 -0
- package/library/eiffel-Dze7nlu3.mjs +0 -134
- package/library/eiffel-Dze7nlu3.mjs.br +0 -0
- package/library/eiffel-Dze7nlu3.mjs.gz +0 -0
- package/library/elm-DG7jkhNZ.mjs +0 -176
- package/library/elm-DG7jkhNZ.mjs.br +0 -0
- package/library/elm-DG7jkhNZ.mjs.gz +0 -0
- package/library/entry-EvdwF4XL.mjs.br +0 -0
- package/library/entry-EvdwF4XL.mjs.gz +0 -0
- package/library/erlang-BO6gOnGA.mjs +0 -674
- package/library/erlang-BO6gOnGA.mjs.br +0 -0
- package/library/erlang-BO6gOnGA.mjs.gz +0 -0
- package/library/factor-ne7PWKF0.mjs +0 -65
- package/library/factor-ne7PWKF0.mjs.br +0 -0
- package/library/factor-ne7PWKF0.mjs.gz +0 -0
- package/library/fcl-CDDUNjTj.mjs +0 -141
- package/library/fcl-CDDUNjTj.mjs.br +0 -0
- package/library/fcl-CDDUNjTj.mjs.gz +0 -0
- package/library/floating-ui.dom-CfpJisRd.mjs +0 -1401
- package/library/floating-ui.dom-CfpJisRd.mjs.br +0 -0
- package/library/floating-ui.dom-CfpJisRd.mjs.gz +0 -0
- package/library/forth-B9D2JCeE.mjs +0 -116
- package/library/forth-B9D2JCeE.mjs.br +0 -0
- package/library/forth-B9D2JCeE.mjs.gz +0 -0
- package/library/fortran-CAG2BFbe.mjs +0 -467
- package/library/fortran-CAG2BFbe.mjs.br +0 -0
- package/library/fortran-CAG2BFbe.mjs.gz +0 -0
- package/library/gas-d3KEcW3x.mjs +0 -294
- package/library/gas-d3KEcW3x.mjs.br +0 -0
- package/library/gas-d3KEcW3x.mjs.gz +0 -0
- package/library/gherkin-DhZlEZiy.mjs +0 -115
- package/library/gherkin-DhZlEZiy.mjs.br +0 -0
- package/library/gherkin-DhZlEZiy.mjs.gz +0 -0
- package/library/groovy-CpwJiBl7.mjs +0 -223
- package/library/groovy-CpwJiBl7.mjs.br +0 -0
- package/library/groovy-CpwJiBl7.mjs.gz +0 -0
- package/library/haskell-BlGBCCe3.mjs +0 -459
- package/library/haskell-BlGBCCe3.mjs.br +0 -0
- package/library/haskell-BlGBCCe3.mjs.gz +0 -0
- package/library/haxe-7MlzfeYV.mjs +0 -514
- package/library/haxe-7MlzfeYV.mjs.br +0 -0
- package/library/haxe-7MlzfeYV.mjs.gz +0 -0
- package/library/http-BqypyemW.mjs +0 -79
- package/library/http-BqypyemW.mjs.br +0 -0
- package/library/http-BqypyemW.mjs.gz +0 -0
- package/library/idl-4HIGJlDI.mjs +0 -985
- package/library/idl-4HIGJlDI.mjs.br +0 -0
- package/library/idl-4HIGJlDI.mjs.gz +0 -0
- package/library/index-4jX79S-P.mjs +0 -150
- package/library/index-4jX79S-P.mjs.br +0 -0
- package/library/index-4jX79S-P.mjs.gz +0 -0
- package/library/index-9LYQtr4h.mjs +0 -328
- package/library/index-9LYQtr4h.mjs.br +0 -0
- package/library/index-9LYQtr4h.mjs.gz +0 -0
- package/library/index-BAAqkdMI.mjs +0 -96
- package/library/index-BAAqkdMI.mjs.br +0 -0
- package/library/index-BAAqkdMI.mjs.gz +0 -0
- package/library/index-Ba4OKxCw.mjs +0 -323
- package/library/index-Ba4OKxCw.mjs.br +0 -0
- package/library/index-Ba4OKxCw.mjs.gz +0 -0
- package/library/index-Bs6_pkvd.mjs +0 -688
- package/library/index-Bs6_pkvd.mjs.br +0 -0
- package/library/index-Bs6_pkvd.mjs.gz +0 -0
- package/library/index-BulKMlHH.mjs +0 -79
- package/library/index-BulKMlHH.mjs.br +0 -0
- package/library/index-BulKMlHH.mjs.gz +0 -0
- package/library/index-CWRhvk2r.mjs +0 -156
- package/library/index-CWRhvk2r.mjs.br +0 -0
- package/library/index-CWRhvk2r.mjs.gz +0 -0
- package/library/index-CkrjnzoC.mjs +0 -384
- package/library/index-CkrjnzoC.mjs.br +0 -0
- package/library/index-CkrjnzoC.mjs.gz +0 -0
- package/library/index-DLB9KgZi.mjs +0 -301
- package/library/index-DLB9KgZi.mjs.br +0 -0
- package/library/index-DLB9KgZi.mjs.gz +0 -0
- package/library/index-DQ5kp4Rw.mjs +0 -114
- package/library/index-DQ5kp4Rw.mjs.br +0 -0
- package/library/index-DQ5kp4Rw.mjs.gz +0 -0
- package/library/index-DZkxoGn3.mjs +0 -81
- package/library/index-DZkxoGn3.mjs.br +0 -0
- package/library/index-DZkxoGn3.mjs.gz +0 -0
- package/library/index-EVu8jdcY.mjs +0 -405
- package/library/index-EVu8jdcY.mjs.br +0 -0
- package/library/index-EVu8jdcY.mjs.gz +0 -0
- package/library/index-Ftvywh65.mjs +0 -177
- package/library/index-Ftvywh65.mjs.br +0 -0
- package/library/index-Ftvywh65.mjs.gz +0 -0
- package/library/index-PFn9GZaw.mjs +0 -60
- package/library/index-PFn9GZaw.mjs.br +0 -0
- package/library/index-PFn9GZaw.mjs.gz +0 -0
- package/library/index-ef4WGzk3.mjs +0 -678
- package/library/index-ef4WGzk3.mjs.br +0 -0
- package/library/index-ef4WGzk3.mjs.gz +0 -0
- package/library/index-emKs9XKV.mjs +0 -35242
- package/library/index-emKs9XKV.mjs.br +0 -0
- package/library/index-emKs9XKV.mjs.gz +0 -0
- package/library/index-kYmjso4n.mjs +0 -311
- package/library/index-kYmjso4n.mjs.br +0 -0
- package/library/index-kYmjso4n.mjs.gz +0 -0
- package/library/index.es-DQ0tvEe9.mjs +0 -25486
- package/library/index.es-DQ0tvEe9.mjs.br +0 -0
- package/library/index.es-DQ0tvEe9.mjs.gz +0 -0
- package/library/javascript-C3MnDRiU.mjs +0 -994
- package/library/javascript-C3MnDRiU.mjs.br +0 -0
- package/library/javascript-C3MnDRiU.mjs.gz +0 -0
- package/library/jinja2-2Vo2sGef.mjs +0 -208
- package/library/jinja2-2Vo2sGef.mjs.br +0 -0
- package/library/jinja2-2Vo2sGef.mjs.gz +0 -0
- package/library/julia-Bs6JJhYG.mjs +0 -407
- package/library/julia-Bs6JJhYG.mjs.br +0 -0
- package/library/julia-Bs6JJhYG.mjs.gz +0 -0
- package/library/livescript-DmzgM3Yt.mjs +0 -296
- package/library/livescript-DmzgM3Yt.mjs.br +0 -0
- package/library/livescript-DmzgM3Yt.mjs.gz +0 -0
- package/library/lua-8cJgIlqe.mjs +0 -256
- package/library/lua-8cJgIlqe.mjs.br +0 -0
- package/library/lua-8cJgIlqe.mjs.gz +0 -0
- package/library/mathematica-DNLOL9PQ.mjs +0 -110
- package/library/mathematica-DNLOL9PQ.mjs.br +0 -0
- package/library/mathematica-DNLOL9PQ.mjs.gz +0 -0
- package/library/mbox-Ga7d4MMN.mjs +0 -117
- package/library/mbox-Ga7d4MMN.mjs.br +0 -0
- package/library/mbox-Ga7d4MMN.mjs.gz +0 -0
- package/library/mirc-Dma3B8rS.mjs +0 -107
- package/library/mirc-Dma3B8rS.mjs.br +0 -0
- package/library/mirc-Dma3B8rS.mjs.gz +0 -0
- package/library/mllike-DHn7xckP.mjs +0 -334
- package/library/mllike-DHn7xckP.mjs.br +0 -0
- package/library/mllike-DHn7xckP.mjs.gz +0 -0
- package/library/modelica-0d55jYY0.mjs +0 -147
- package/library/modelica-0d55jYY0.mjs.br +0 -0
- package/library/modelica-0d55jYY0.mjs.gz +0 -0
- package/library/mscgen-DdqZYINH.mjs +0 -135
- package/library/mscgen-DdqZYINH.mjs.br +0 -0
- package/library/mscgen-DdqZYINH.mjs.gz +0 -0
- package/library/mumps-Btr8VblO.mjs +0 -93
- package/library/mumps-Btr8VblO.mjs.br +0 -0
- package/library/mumps-Btr8VblO.mjs.gz +0 -0
- package/library/nginx-DTDtBDVN.mjs +0 -141
- package/library/nginx-DTDtBDVN.mjs.br +0 -0
- package/library/nginx-DTDtBDVN.mjs.gz +0 -0
- package/library/nsis-BnYeX9pP.mjs +0 -62
- package/library/nsis-BnYeX9pP.mjs.br +0 -0
- package/library/nsis-BnYeX9pP.mjs.gz +0 -0
- package/library/ntriples-CvgOYMpL.mjs +0 -153
- package/library/ntriples-CvgOYMpL.mjs.br +0 -0
- package/library/ntriples-CvgOYMpL.mjs.gz +0 -0
- package/library/octave-DYBj3-tl.mjs +0 -200
- package/library/octave-DYBj3-tl.mjs.br +0 -0
- package/library/octave-DYBj3-tl.mjs.gz +0 -0
- package/library/oz-R_e8WMIi.mjs +0 -231
- package/library/oz-R_e8WMIi.mjs.br +0 -0
- package/library/oz-R_e8WMIi.mjs.gz +0 -0
- package/library/pascal-GD8iposT.mjs +0 -105
- package/library/pascal-GD8iposT.mjs.br +0 -0
- package/library/pascal-GD8iposT.mjs.gz +0 -0
- package/library/perl-DL9mHpoi.mjs +0 -1105
- package/library/perl-DL9mHpoi.mjs.br +0 -0
- package/library/perl-DL9mHpoi.mjs.gz +0 -0
- package/library/pig-C_4T4YIV.mjs +0 -101
- package/library/pig-C_4T4YIV.mjs.br +0 -0
- package/library/pig-C_4T4YIV.mjs.gz +0 -0
- package/library/powershell-B0suO7Vd.mjs +0 -328
- package/library/powershell-B0suO7Vd.mjs.br +0 -0
- package/library/powershell-B0suO7Vd.mjs.gz +0 -0
- package/library/properties-BR-vP1aU.mjs +0 -58
- package/library/properties-BR-vP1aU.mjs.br +0 -0
- package/library/properties-BR-vP1aU.mjs.gz +0 -0
- package/library/protobuf-BxgpyhoW.mjs +0 -77
- package/library/protobuf-BxgpyhoW.mjs.br +0 -0
- package/library/protobuf-BxgpyhoW.mjs.gz +0 -0
- package/library/pug-DGCLwxp4.mjs +0 -405
- package/library/pug-DGCLwxp4.mjs.br +0 -0
- package/library/pug-DGCLwxp4.mjs.gz +0 -0
- package/library/puppet-Bdao66PW.mjs +0 -137
- package/library/puppet-Bdao66PW.mjs.br +0 -0
- package/library/puppet-Bdao66PW.mjs.gz +0 -0
- package/library/python-CvWbmiX4.mjs +0 -427
- package/library/python-CvWbmiX4.mjs.br +0 -0
- package/library/python-CvWbmiX4.mjs.gz +0 -0
- package/library/q-819KmTeu.mjs +0 -128
- package/library/q-819KmTeu.mjs.br +0 -0
- package/library/q-819KmTeu.mjs.gz +0 -0
- package/library/r-V7nswm59.mjs +0 -170
- package/library/r-V7nswm59.mjs.br +0 -0
- package/library/r-V7nswm59.mjs.gz +0 -0
- package/library/rpm-C-DLY-If.mjs +0 -109
- package/library/rpm-C-DLY-If.mjs.br +0 -0
- package/library/rpm-C-DLY-If.mjs.gz +0 -0
- package/library/ruby-JDKLJNK0.mjs +0 -330
- package/library/ruby-JDKLJNK0.mjs.br +0 -0
- package/library/ruby-JDKLJNK0.mjs.gz +0 -0
- package/library/sas-D2UG-yhZ.mjs +0 -207
- package/library/sas-D2UG-yhZ.mjs.br +0 -0
- package/library/sas-D2UG-yhZ.mjs.gz +0 -0
- package/library/scheme-BKzrkGJD.mjs +0 -222
- package/library/scheme-BKzrkGJD.mjs.br +0 -0
- package/library/scheme-BKzrkGJD.mjs.gz +0 -0
- package/library/shell-BlsXDxCn.mjs +0 -222
- package/library/shell-BlsXDxCn.mjs.br +0 -0
- package/library/shell-BlsXDxCn.mjs.gz +0 -0
- package/library/sieve-CjwBwOY5.mjs +0 -135
- package/library/sieve-CjwBwOY5.mjs.br +0 -0
- package/library/sieve-CjwBwOY5.mjs.gz +0 -0
- package/library/simple-mode-zrLq6ojR.mjs +0 -129
- package/library/simple-mode-zrLq6ojR.mjs.br +0 -0
- package/library/simple-mode-zrLq6ojR.mjs.gz +0 -0
- package/library/smalltalk-BOIGQuhN.mjs +0 -121
- package/library/smalltalk-BOIGQuhN.mjs.br +0 -0
- package/library/smalltalk-BOIGQuhN.mjs.gz +0 -0
- package/library/solr-CwD7U71z.mjs +0 -69
- package/library/solr-CwD7U71z.mjs.br +0 -0
- package/library/solr-CwD7U71z.mjs.gz +0 -0
- package/library/sparql-DYskk2vE.mjs +0 -249
- package/library/sparql-DYskk2vE.mjs.br +0 -0
- package/library/sparql-DYskk2vE.mjs.gz +0 -0
- package/library/spreadsheet-Bgtt3oLP.mjs +0 -87
- package/library/spreadsheet-Bgtt3oLP.mjs.br +0 -0
- package/library/spreadsheet-Bgtt3oLP.mjs.gz +0 -0
- package/library/sql-BSrOzCRI.mjs +0 -354
- package/library/sql-BSrOzCRI.mjs.br +0 -0
- package/library/sql-BSrOzCRI.mjs.gz +0 -0
- package/library/stex-B6LNC55o.mjs +0 -231
- package/library/stex-B6LNC55o.mjs.br +0 -0
- package/library/stex-B6LNC55o.mjs.gz +0 -0
- package/library/style.css +0 -1
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/stylus-BkS-boTH.mjs +0 -565
- package/library/stylus-BkS-boTH.mjs.br +0 -0
- package/library/stylus-BkS-boTH.mjs.gz +0 -0
- package/library/super.mjs +0 -168
- package/library/super.mjs.br +0 -0
- package/library/super.mjs.gz +0 -0
- package/library/super.umd.js +0 -48
- package/library/super.umd.js.br +0 -0
- package/library/super.umd.js.gz +0 -0
- package/library/swift-FRZi1uvB.mjs +0 -291
- package/library/swift-FRZi1uvB.mjs.br +0 -0
- package/library/swift-FRZi1uvB.mjs.gz +0 -0
- package/library/tcl-CUcaCdmq.mjs +0 -114
- package/library/tcl-CUcaCdmq.mjs.br +0 -0
- package/library/tcl-CUcaCdmq.mjs.gz +0 -0
- package/library/textile-BnFpjsrl.mjs +0 -414
- package/library/textile-BnFpjsrl.mjs.br +0 -0
- package/library/textile-BnFpjsrl.mjs.gz +0 -0
- package/library/tiddlywiki-CjprD-Qp.mjs +0 -218
- package/library/tiddlywiki-CjprD-Qp.mjs.br +0 -0
- package/library/tiddlywiki-CjprD-Qp.mjs.gz +0 -0
- package/library/tiki-B4EPSQ1G.mjs +0 -265
- package/library/tiki-B4EPSQ1G.mjs.br +0 -0
- package/library/tiki-B4EPSQ1G.mjs.gz +0 -0
- package/library/toml-CrLTxh7K.mjs +0 -75
- package/library/toml-CrLTxh7K.mjs.br +0 -0
- package/library/toml-CrLTxh7K.mjs.gz +0 -0
- package/library/troff-E1bJ0PPL.mjs +0 -61
- package/library/troff-E1bJ0PPL.mjs.br +0 -0
- package/library/troff-E1bJ0PPL.mjs.gz +0 -0
- package/library/ttcn-cfg-Dc39-fIP.mjs +0 -133
- package/library/ttcn-cfg-Dc39-fIP.mjs.br +0 -0
- package/library/ttcn-cfg-Dc39-fIP.mjs.gz +0 -0
- package/library/ttcn-tKd4HLu4.mjs +0 -192
- package/library/ttcn-tKd4HLu4.mjs.br +0 -0
- package/library/ttcn-tKd4HLu4.mjs.gz +0 -0
- package/library/turtle-Dq7-1WAf.mjs +0 -124
- package/library/turtle-Dq7-1WAf.mjs.br +0 -0
- package/library/turtle-Dq7-1WAf.mjs.gz +0 -0
- package/library/types/components/VcExcelUploader/VcExcelFileProcessLoader.vue.d.ts +0 -68
- package/library/types/components/VcExcelUploader/VcExcelFileUploadBlock.vue.d.ts +0 -70
- package/library/types/components/VcExcelUploader/VcExcelFileUploader.vue.d.ts +0 -179
- package/library/types/components/VcExcelUploader/VcFileImportErrorsCard.vue.d.ts +0 -31
- package/library/types/components/VcExcelUploader/VcFileImportParseResultBlock.vue.d.ts +0 -69
- package/library/types/components/VcExcelUploader/VcFileImportResultBindData.vue.d.ts +0 -60
- package/library/types/components/VcExcelUploader/VcFileImportResultBindDataTable.vue.d.ts +0 -40
- package/library/types/components/VcHtmlEditor/VcHtmlEditor.vue.d.ts +0 -63
- package/library/types/components/VcHtmlEditor/VcHtmlEditorToolbar.vue.d.ts +0 -43
- package/library/types/components/VcHtmlEditor/htmlEditor.config.d.ts +0 -19
- package/library/types/components/VcImageUploader/VcImageUploader.vue.d.ts +0 -74
- package/library/types/components/VcImageUploader/index.d.ts +0 -2
- package/library/types/components/VcJsonSchema/Components/ImportJsonSchemaModal.vue.d.ts +0 -25
- package/library/types/components/VcJsonSchema/Components/JsonCodeMirror.vue.d.ts +0 -24
- package/library/types/components/VcJsonSchema/Components/JsonSchemaEditor.vue.d.ts +0 -86
- package/library/types/components/VcJsonSchema/Components/JsonSchemaManageModal.vue.d.ts +0 -28
- package/library/types/components/VcJsonSchema/PropertySetup/JsonSchemaPropertyModal.vue.d.ts +0 -39
- package/library/types/components/VcJsonSchema/VcJsonSchema.vue.d.ts +0 -49
- package/library/types/components/VcJsonSchema/helpers/jsonSchema.enum.d.ts +0 -9
- package/library/types/components/VcJsonSchema/helpers/jsonSchema.helper.d.ts +0 -3
- package/library/types/components/VcMdEditor/ParameterNode.vue.d.ts +0 -6
- package/library/types/components/VcMdEditor/VcMdEditor.vue.d.ts +0 -30
- package/library/types/components/VcMdEditor/VcMdEditorContent.vue.d.ts +0 -82
- package/library/types/components/VcMdEditor/VcMdEditorToolbar.vue.d.ts +0 -27
- package/library/types/components/VcMdEditor/mdEditor.config.d.ts +0 -91
- package/library/types/components/VcMdEditor/rtlCursorPlugin.d.ts +0 -8
- package/library/types/components/VcPdfViewer/VcPdfDocument.vue.d.ts +0 -40
- package/library/types/components/VcPdfViewer/VcPdfDocumentCard.vue.d.ts +0 -47
- package/library/types/components/VcPdfViewer/VcPdfDocumentPage.vue.d.ts +0 -55
- package/library/types/components/VcPdfViewer/VcPdfDocumentViewerFooter.vue.d.ts +0 -63
- package/library/types/components/VcPdfViewer/VcPdfDocumentViewerToolbar.vue.d.ts +0 -28
- package/library/types/components/VcPdfViewer/pdfjslib.d.ts +0 -4
- package/library/types/components/VcPdfViewer/utils.d.ts +0 -7
- package/library/types/components/VcSipFlow/VcSipFlow.vue.d.ts +0 -97
- package/library/types/components/VcSipFlow/index.d.ts +0 -3
- package/library/types/components/VcSipFlow/sip-flow.options.d.ts +0 -77
- package/library/types/components/VcSoundplayer/VcPlayerPlayStopButton.vue.d.ts +0 -55
- package/library/types/components/VcSoundplayer/VcPlayerPlaybackRate.vue.d.ts +0 -35
- package/library/types/components/VcSoundplayer/VcPlayerPlaybackRatePopup.vue.d.ts +0 -40
- package/library/types/components/VcSoundplayer/VcPlayerSkipButtons.vue.d.ts +0 -52
- package/library/types/components/VcSoundplayer/VcSoundCurrentTime.vue.d.ts +0 -2
- package/library/types/components/VcSoundplayer/VcSoundDuration.vue.d.ts +0 -2
- package/library/types/components/VcSoundplayer/VcSoundPlayer.vue.d.ts +0 -96
- package/library/types/components/VcSoundplayer/VcSoundPlayerError.vue.d.ts +0 -21
- package/library/types/components/VcSoundplayer/VcSoundPlayerProgress.vue.d.ts +0 -15
- package/library/types/components/VcSoundplayer/VcSoundPlayerWrapper.vue.d.ts +0 -208
- package/library/types/components/VcSoundplayer/VcSoundVolume.vue.d.ts +0 -44
- package/library/types/components/VcSoundplayer/player.options.d.ts +0 -10
- package/library/types/components/VcSoundplayer/soundPlayerParts.d.ts +0 -11
- package/library/types/components/VcSoundplayer/useSoundPlayerProvideInject.d.ts +0 -3
- package/library/types/components/VcSystemUserPrompt/VcSystemUserPrompt.vue.d.ts +0 -41
- package/library/types/components/VcSystemUserPrompt/enum.d.ts +0 -13
- package/library/types/components/VcTour/VcTour.vue.d.ts +0 -70
- package/library/types/components/exports.d.ts +0 -64
- package/library/types/components/heavy-components.d.ts +0 -41
- package/library/types/composables/useCopyButton.d.ts +0 -5
- package/library/types/composables/useVModel.d.ts +0 -1
- package/library/types/entity/components/Button/VcEntityAddButton.vue.d.ts +0 -41
- package/library/types/entity/components/Button/VcEntityCancelButton.vue.d.ts +0 -54
- package/library/types/entity/components/Button/VcEntityDeleteIconButton.vue.d.ts +0 -48
- package/library/types/entity/components/Button/VcEntityEditIconButton.vue.d.ts +0 -36
- package/library/types/entity/components/Button/VcEntityRestoreButton.vue.d.ts +0 -54
- package/library/types/entity/components/Button/VcEntityStatusButton.vue.d.ts +0 -48
- package/library/types/entity/components/Form/VcBaseVerticalForm.vue.d.ts +0 -55
- package/library/types/entity/components/Form/VcEntityEditPageForm.vue.d.ts +0 -59
- package/library/types/entity/components/Form/VcEntityVerticalCreateForm.vue.d.ts +0 -50
- package/library/types/entity/components/Form/VcEntityVerticalEditForm.vue.d.ts +0 -62
- package/library/types/entity/components/Table/VcEntityListTable.vue.d.ts +0 -146
- package/library/types/entity/components/Tabs/VcEntityEditableTabs.vue.d.ts +0 -165
- package/library/types/entity/components/index.d.ts +0 -29
- package/library/types/entity/composable/useEditableTabs.d.ts +0 -12
- package/library/types/entity/composable/useEntityListTableExternalPaginate.d.ts +0 -17
- package/library/types/entity/composable/useEntityProvideInject.d.ts +0 -24
- package/library/types/entity/composable/useEntityTabsProviseInject.d.ts +0 -3
- package/library/types/entity/index.d.ts +0 -1
- package/library/types/entity/services/BaseEntityService.d.ts +0 -105
- package/library/types/entity/services/index.d.ts +0 -1
- package/library/types/entry.d.ts +0 -27
- package/library/types/tokens/tokens.d.ts +0 -13
- package/library/types/types/Entity.types.d.ts +0 -5
- package/library/types/types/Tabs.d.ts +0 -23
- package/library/types/types/VcSipFlow.types.d.ts +0 -85
- package/library/types/types/VcSoundPlayer.types.d.ts +0 -34
- package/library/types/types/VcSystemUserPrompt.types.d.ts +0 -4
- package/library/types/types/VcTour.types.d.ts +0 -53
- package/library/types/types/basic.types.d.ts +0 -49
- package/library/types/types/heavy-components.types.d.ts +0 -54
- package/library/types/utils/excelParser/configs.d.ts +0 -5
- package/library/types/utils/excelParser/helper.d.ts +0 -20
- package/library/types/utils/excelParser/parser.d.ts +0 -244
- package/library/types/utils/excelParser/validations.d.ts +0 -27
- package/library/types/utils/isValidTime.d.ts +0 -2
- package/library/types/utils/mime-types.d.ts +0 -12
- package/library/vb-Dp90gtsv.mjs +0 -196
- package/library/vb-Dp90gtsv.mjs.br +0 -0
- package/library/vb-Dp90gtsv.mjs.gz +0 -0
- package/library/vbscript-CI6_mxxU.mjs +0 -479
- package/library/vbscript-CI6_mxxU.mjs.br +0 -0
- package/library/vbscript-CI6_mxxU.mjs.gz +0 -0
- package/library/velocity-BwIZK1TH.mjs +0 -149
- package/library/velocity-BwIZK1TH.mjs.br +0 -0
- package/library/velocity-BwIZK1TH.mjs.gz +0 -0
- package/library/verilog-DDCYnHN8.mjs +0 -430
- package/library/verilog-DDCYnHN8.mjs.br +0 -0
- package/library/verilog-DDCYnHN8.mjs.gz +0 -0
- package/library/vhdl-DCkMIyT9.mjs +0 -158
- package/library/vhdl-DCkMIyT9.mjs.br +0 -0
- package/library/vhdl-DCkMIyT9.mjs.gz +0 -0
- package/library/webidl-BTLTThCm.mjs +0 -204
- package/library/webidl-BTLTThCm.mjs.br +0 -0
- package/library/webidl-BTLTThCm.mjs.gz +0 -0
- package/library/xquery-BgiOC5Ce.mjs +0 -525
- package/library/xquery-BgiOC5Ce.mjs.br +0 -0
- package/library/xquery-BgiOC5Ce.mjs.gz +0 -0
- package/library/yacas-b5lAVEIl.mjs +0 -130
- package/library/yacas-b5lAVEIl.mjs.br +0 -0
- package/library/yacas-b5lAVEIl.mjs.gz +0 -0
- package/library/z80-BZV19vqv.mjs +0 -93
- package/library/z80-BZV19vqv.mjs.br +0 -0
- package/library/z80-BZV19vqv.mjs.gz +0 -0
- package/src/assets/sass/main/_icons.scss +0 -36
- package/src/components/VcButton/VcButton.scss +0 -191
- package/src/components/VcButton/VcButtonIcon.scss +0 -179
- package/src/components/VcInput/VcInput.scss +0 -100
- package/src/components/VcModal/VcModal.scss +0 -232
- package/src/components/VcPopover/VcPopover.scss +0 -10
- package/src/components/VcSelect/VcSelect.scss +0 -96
- package/src/components/VcSelect/VcSelectMixin.scss +0 -39
- package/src/components/VcSelect/VcSelectOption.scss +0 -29
- package/src/components/VcSelect/VcSelectVariables.scss +0 -1
- package/src/enum/constants.ts +0 -50
- package/src/enum/countries.ts +0 -1277
- package/src/enum/dataTestAttributes.ts +0 -9
- package/src/enum/icons.ts +0 -8919
- package/src/enum/inputDefaults.ts +0 -8
- package/src/utils/makeDataTestAttributeValue.ts +0 -5
- package/library/{types → core/types}/components/VcAutocomplete/VcAutocomplete.vue.d.ts +77 -77
- package/library/{types → core/types}/components/VcButton/VcButton.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcButton/VcButtonIcon.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcButton/VcToggleButton.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcCard/VcCard.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcCheckbox/VcCheckbox.vue.d.ts +15 -15
- package/library/{types → core/types}/components/VcCheckbox/VcCheckboxGroupEl.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcCheckboxGroup/VcCheckboxGroup.vue.d.ts +9 -9
- package/library/{types → core/types}/components/VcCollapse/VcCollapse.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcCollapse/VcCollapseItem.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcCollapse/VcCollapseTransition.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcColorPicker/VcColorPicker.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcDatePicker/VcDatePicker.vue.d.ts +18 -18
- package/library/{types → core/types}/components/VcDatePickerPanel/VcDatePickerPanel.vue.d.ts +6 -6
- package/library/{types → core/types}/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcDelimitedList/VcDelimitedList.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcDropdown/VcDropdownItem.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.d.ts +4 -4
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/composable.d.ts +0 -0
- package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/enum.d.ts +0 -0
- package/library/{types → core/types}/components/VcFileUploader/VcFileUploader.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcForm/UiComponents/VcInputError.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcForm/UiComponents/VcInputLabel.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcForm/VcForm.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcForm/VcFormItem.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcHyperLink/VcHyperLink.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcIconPicker/VcIconPicker.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcInput/VcInput.vue.d.ts +5 -5
- package/library/{types → core/types}/components/VcInputNumber/VcInputNumber.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcLoading/Loaders/Circles.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/Loaders/DotSpinner.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/Loaders/LdsSpinner.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/Loaders/LoadIcon.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/Loaders/Stretch.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/Loaders/index.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/VcLoading.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcLoading/enum.d.ts +0 -0
- package/library/{types → core/types}/components/VcModal/VcConfirmModal.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcModal/VcModal.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcNotification/VcNotification.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcNotification/VcNotificationMessage.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcOtpInput/VcOtpInput.vue.d.ts +6 -6
- package/library/{types → core/types}/components/VcPagination/VcPagination.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcPagination/VcPaginationButton.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcPhoneInput/VcFlagLabel.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcPhoneInput/VcPhoneInput.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcPopover/VcConfirmPopover.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcPopover/VcPopover.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcPopover/VcSelectPopover.vue.d.ts +6 -6
- package/library/{types → core/types}/components/VcProgress/VcProgress.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcProgress/VcProgressCircular.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcProgress/progress.options.d.ts +0 -0
- package/library/{types → core/types}/components/VcRadio/VcRadio.vue.d.ts +6 -6
- package/library/{types → core/types}/components/VcRadioButtons/VcRadioButtonsGroup.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcRadioGroup/VcRadioGroup.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcSegmented/VcSegmented.vue.d.ts +9 -9
- package/library/{types → core/types}/components/VcSelect/VcInfiniteScrollSelect.vue.d.ts +18 -18
- package/library/{types → core/types}/components/VcSelect/VcSelect.vue.d.ts +30 -30
- package/library/{types → core/types}/components/VcSelect/VcSelectGrouped.vue.d.ts +27 -27
- package/library/{types → core/types}/components/VcSelect/VcSelectOption.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Card.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Circle.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Row.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Square.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Text.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSkeletonLoader/VcSkeletonLoader.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSlider/VcSlider.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcSplitButton/VcSplitButton.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcSwitch/VcSwitch.vue.d.ts +18 -18
- package/library/{types → core/types}/components/VcTable/VcTable.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcTable/tableOptions.d.ts +0 -0
- package/library/{types → core/types}/components/VcTabs/VcTabNav.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcTabs/VcTabPane.vue.d.ts +1 -1
- package/library/{types → core/types}/components/VcTabs/VcTabs.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcTag/VcTag.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcTagInput/VcTagInput.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcTimeInput/VcTimeInput.vue.d.ts +2 -2
- package/library/{types → core/types}/components/VcTree/VcTree.vue.d.ts +3 -3
- package/library/{types → core/types}/components/VcVerticalTabs/VcVerticalTabs.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcVerticalTabs/VerticalTabNav.vue.d.ts +0 -0
- package/library/{types → core/types}/components/VcViewSwitcher/VcViewSwitcher.vue.d.ts +6 -6
- /package/library/{types → core/types}/components/VcWizard/VcSummaryProgress.vue.d.ts +0 -0
- /package/library/{types → core/types}/components/VcWizard/VcSummaryStep.vue.d.ts +0 -0
- /package/library/{types → core/types}/components/VcWizard/VcWizard.vue.d.ts +0 -0
- /package/library/{types → core/types}/components/VcWizard/VcWizardNavigation.vue.d.ts +0 -0
- /package/library/{types → core/types}/components/VcWizard/VcWizardSummary.vue.d.ts +0 -0
- /package/library/{types → core/types}/composables/input/useInputBase.d.ts +0 -0
- /package/library/{types → core/types}/composables/input/useInputColor.d.ts +0 -0
- /package/library/{types → core/types}/composables/input/useInputError.d.ts +0 -0
- /package/library/{types → core/types}/composables/input/useInputLabel.d.ts +0 -0
- /package/library/{types → core/types}/composables/option/useOptionMethods.d.ts +0 -0
- /package/library/{types/entity/composable → core/types/composables}/useConfirmModal.d.ts +0 -0
- /package/library/{types → core/types}/composables/useRTL.d.ts +0 -0
- /package/library/{types → core/types}/directives/click-outside.d.ts +0 -0
- /package/library/{types → core/types}/directives/index.d.ts +0 -0
- /package/library/{types → core/types}/directives/input-mask.d.ts +0 -0
- /package/library/{types → core/types}/directives/long-press.d.ts +0 -0
- /package/library/{types → core/types}/directives/resize.d.ts +0 -0
- /package/library/{types → core/types}/enum/constants.d.ts +0 -0
- /package/library/{types → core/types}/enum/countries.d.ts +0 -0
- /package/library/{types → core/types}/enum/dataTestAttributes.d.ts +0 -0
- /package/library/{types → core/types}/enum/icons.d.ts +0 -0
- /package/library/{types → core/types}/enum/inputDefaults.d.ts +0 -0
- /package/library/{types → core/types}/font/FontLoader.d.ts +0 -0
- /package/library/{types → core/types}/font/index.d.ts +0 -0
- /package/library/{types → core/types}/localization/Localization.types.d.ts +0 -0
- /package/library/{types → core/types}/localization/index.d.ts +0 -0
- /package/library/{types/utils → core/types/services}/VcNotifyService.d.ts +0 -0
- /package/library/{types → core/types}/theme/index.d.ts +0 -0
- /package/library/{types → core/types}/theme/theme.types.d.ts +0 -0
- /package/library/{types → core/types}/tokens/element-plus.tokens.d.ts +0 -0
- /package/library/{types → core/types}/tokens/index.d.ts +0 -0
- /package/library/{types → core/types}/types/AppendToTarget.types.d.ts +0 -0
- /package/library/{types → core/types}/types/Dropdown.types.d.ts +0 -0
- /package/library/{types → core/types}/types/Entry.types.d.ts +0 -0
- /package/library/{types → core/types}/types/ExcelParser.types.d.ts +0 -0
- /package/library/{types → core/types}/types/OptionAndConfig.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcButton.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcCollapse.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcDatePicker.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcDatetimeRangePicker.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcDelimitedList.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcExtendedDatetimeRangePicker.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcFileUploader.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcForm.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcHyperLink.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcIconPicker.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcInput.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcLoading.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcMeterGroup.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcModal.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcNotification.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcOtpInput.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcPagination.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcPopover.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcProgress.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcRTL.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcRadioTabs.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcSelect.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcSkeletonLoader.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcSparkline.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcSplitButton.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcSwitch.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcTable.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcTag.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcTagInput.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VcWizard.types.d.ts +0 -0
- /package/library/{types → core/types}/types/VueGeneric.types.d.ts +0 -0
- /package/library/{types → core/types}/types/generic.types.d.ts +0 -0
- /package/library/{types → core/types}/types/icons.types.d.ts +0 -0
- /package/library/{types → core/types}/utils/DomHandler.d.ts +0 -0
- /package/library/{types → core/types}/utils/ToastEventBus.d.ts +0 -0
- /package/library/{types → core/types}/utils/UniqueComponentId.d.ts +0 -0
- /package/library/{types → core/types}/utils/ZIndexUtils.d.ts +0 -0
- /package/library/{types → core/types}/utils/dateTime.d.ts +0 -0
- /package/library/{types → core/types}/utils/element-plus-imports.d.ts +0 -0
- /package/library/{types → core/types}/utils/helpers.d.ts +0 -0
- /package/library/{types → core/types}/utils/makeDataTestAttributeValue.d.ts +0 -0
- /package/src/{theme → core/theme}/index.ts +0 -0
- /package/src/{theme → core/theme}/tailwindScheme.js +0 -0
- /package/src/{theme → core/theme}/theme.types.ts +0 -0
|
@@ -1,1772 +0,0 @@
|
|
|
1
|
-
import { createBlock, openBlock, renderSlot, resolveComponent, createVNode, withCtx, Fragment, renderList, resolveDynamicComponent, withDirectives, vShow, mergeProps, createCommentVNode, withModifiers, defineComponent, ref, computed, createElementBlock, createElementVNode, createTextVNode, toDisplayString, TransitionGroup, unref } from "vue";
|
|
2
|
-
import { t as tVU, T as _sfc_main$1 } from "./entry-EvdwF4XL.mjs";
|
|
3
|
-
function getMimeTypeFromBuffer(file, fallback) {
|
|
4
|
-
const byteArray = new Uint8Array(file).subarray(0, 4);
|
|
5
|
-
let header = "";
|
|
6
|
-
for (let i = 0; i < byteArray.length; i++) {
|
|
7
|
-
header += byteArray[i].toString(16);
|
|
8
|
-
}
|
|
9
|
-
switch (header) {
|
|
10
|
-
case "89504e47":
|
|
11
|
-
return "image/png";
|
|
12
|
-
case "47494638":
|
|
13
|
-
return "image/gif";
|
|
14
|
-
case "ffd8ffe0":
|
|
15
|
-
case "ffd8ffe1":
|
|
16
|
-
case "ffd8ffe2":
|
|
17
|
-
case "ffd8ffe3":
|
|
18
|
-
case "ffd8ffe8":
|
|
19
|
-
return "image/jpeg";
|
|
20
|
-
default:
|
|
21
|
-
return fallback;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function p(t, e) {
|
|
25
|
-
var i = Object.keys(t);
|
|
26
|
-
if (Object.getOwnPropertySymbols) {
|
|
27
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
28
|
-
e && (n = n.filter(function(e2) {
|
|
29
|
-
return Object.getOwnPropertyDescriptor(t, e2).enumerable;
|
|
30
|
-
})), i.push.apply(i, n);
|
|
31
|
-
}
|
|
32
|
-
return i;
|
|
33
|
-
}
|
|
34
|
-
function g(t) {
|
|
35
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
36
|
-
var i = null != arguments[e] ? arguments[e] : {};
|
|
37
|
-
e % 2 ? p(Object(i), true).forEach(function(e2) {
|
|
38
|
-
f(t, e2, i[e2]);
|
|
39
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : p(Object(i)).forEach(function(e2) {
|
|
40
|
-
Object.defineProperty(t, e2, Object.getOwnPropertyDescriptor(i, e2));
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
}
|
|
45
|
-
function f(t, e, i) {
|
|
46
|
-
return e in t ? Object.defineProperty(t, e, { value: i, enumerable: true, configurable: true, writable: true }) : t[e] = i, t;
|
|
47
|
-
}
|
|
48
|
-
function v(t, e) {
|
|
49
|
-
if (null == t) return {};
|
|
50
|
-
var i, n, s = function(t2, e2) {
|
|
51
|
-
if (null == t2) return {};
|
|
52
|
-
var i2, n2, s2 = {}, o2 = Object.keys(t2);
|
|
53
|
-
for (n2 = 0; n2 < o2.length; n2++) i2 = o2[n2], e2.indexOf(i2) >= 0 || (s2[i2] = t2[i2]);
|
|
54
|
-
return s2;
|
|
55
|
-
}(t, e);
|
|
56
|
-
if (Object.getOwnPropertySymbols) {
|
|
57
|
-
var o = Object.getOwnPropertySymbols(t);
|
|
58
|
-
for (n = 0; n < o.length; n++) i = o[n], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (s[i] = t[i]);
|
|
59
|
-
}
|
|
60
|
-
return s;
|
|
61
|
-
}
|
|
62
|
-
function b(t) {
|
|
63
|
-
return function(t2) {
|
|
64
|
-
if (Array.isArray(t2)) return w(t2);
|
|
65
|
-
}(t) || function(t2) {
|
|
66
|
-
if ("undefined" != typeof Symbol && null != t2[Symbol.iterator] || null != t2["@@iterator"]) return Array.from(t2);
|
|
67
|
-
}(t) || function(t2, e) {
|
|
68
|
-
if (!t2) return;
|
|
69
|
-
if ("string" == typeof t2) return w(t2, e);
|
|
70
|
-
var i = Object.prototype.toString.call(t2).slice(8, -1);
|
|
71
|
-
"Object" === i && t2.constructor && (i = t2.constructor.name);
|
|
72
|
-
if ("Map" === i || "Set" === i) return Array.from(t2);
|
|
73
|
-
if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return w(t2, e);
|
|
74
|
-
}(t) || function() {
|
|
75
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
76
|
-
}();
|
|
77
|
-
}
|
|
78
|
-
function w(t, e) {
|
|
79
|
-
(null == e || e > t.length) && (e = t.length);
|
|
80
|
-
for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
|
|
81
|
-
return n;
|
|
82
|
-
}
|
|
83
|
-
var y, z, R, A = (y = function(t) {
|
|
84
|
-
/*!
|
|
85
|
-
Copyright (c) 2018 Jed Watson.
|
|
86
|
-
Licensed under the MIT License (MIT), see
|
|
87
|
-
http://jedwatson.github.io/classnames
|
|
88
|
-
*/
|
|
89
|
-
!function() {
|
|
90
|
-
var e = {}.hasOwnProperty;
|
|
91
|
-
function i() {
|
|
92
|
-
for (var t2 = [], n = 0; n < arguments.length; n++) {
|
|
93
|
-
var s = arguments[n];
|
|
94
|
-
if (s) {
|
|
95
|
-
var o = typeof s;
|
|
96
|
-
if ("string" === o || "number" === o) t2.push(s);
|
|
97
|
-
else if (Array.isArray(s)) {
|
|
98
|
-
if (s.length) {
|
|
99
|
-
var r = i.apply(null, s);
|
|
100
|
-
r && t2.push(r);
|
|
101
|
-
}
|
|
102
|
-
} else if ("object" === o) if (s.toString === Object.prototype.toString) for (var a in s) e.call(s, a) && s[a] && t2.push(a);
|
|
103
|
-
else t2.push(s.toString());
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return t2.join(" ");
|
|
107
|
-
}
|
|
108
|
-
t.exports ? (i.default = i, t.exports = i) : window.classNames = i;
|
|
109
|
-
}();
|
|
110
|
-
}, y(R = { path: z, exports: {}, require: function(t, e) {
|
|
111
|
-
return function() {
|
|
112
|
-
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
113
|
-
}(null == e && R.path);
|
|
114
|
-
} }, R.exports), R.exports), M = function(t) {
|
|
115
|
-
return function(e, i) {
|
|
116
|
-
if (!e) return t;
|
|
117
|
-
var n;
|
|
118
|
-
"string" == typeof e ? n = e : i = e;
|
|
119
|
-
var s = t;
|
|
120
|
-
return n && (s += "__" + n), s + (i ? Object.keys(i).reduce(function(t2, e2) {
|
|
121
|
-
var n2 = i[e2];
|
|
122
|
-
return n2 && (t2 += " " + ("boolean" == typeof n2 ? s + "--" + e2 : s + "--" + e2 + "_" + n2)), t2;
|
|
123
|
-
}, "") : "");
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
function S(t, e, i) {
|
|
127
|
-
var n, s, o, r, a;
|
|
128
|
-
function h() {
|
|
129
|
-
var c2 = Date.now() - r;
|
|
130
|
-
c2 < e && c2 >= 0 ? n = setTimeout(h, e - c2) : (n = null, i || (a = t.apply(o, s), o = s = null));
|
|
131
|
-
}
|
|
132
|
-
null == e && (e = 100);
|
|
133
|
-
var c = function() {
|
|
134
|
-
o = this, s = arguments, r = Date.now();
|
|
135
|
-
var c2 = i && !n;
|
|
136
|
-
return n || (n = setTimeout(h, e)), c2 && (a = t.apply(o, s), o = s = null), a;
|
|
137
|
-
};
|
|
138
|
-
return c.clear = function() {
|
|
139
|
-
n && (clearTimeout(n), n = null);
|
|
140
|
-
}, c.flush = function() {
|
|
141
|
-
n && (a = t.apply(o, s), o = s = null, clearTimeout(n), n = null);
|
|
142
|
-
}, c;
|
|
143
|
-
}
|
|
144
|
-
S.debounce = S;
|
|
145
|
-
var x = S, C = function() {
|
|
146
|
-
return C = Object.assign || function(t) {
|
|
147
|
-
for (var e, i = 1, n = arguments.length; i < n; i++) for (var s in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);
|
|
148
|
-
return t;
|
|
149
|
-
}, C.apply(this, arguments);
|
|
150
|
-
};
|
|
151
|
-
/*! *****************************************************************************
|
|
152
|
-
Copyright (c) Microsoft Corporation.
|
|
153
|
-
|
|
154
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
155
|
-
purpose with or without fee is hereby granted.
|
|
156
|
-
|
|
157
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
158
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
159
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
160
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
161
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
162
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
163
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
164
|
-
***************************************************************************** */
|
|
165
|
-
function E(t, e) {
|
|
166
|
-
var i, n;
|
|
167
|
-
return t && e ? (i = "" + t + e[0].toUpperCase() + e.slice(1), n = t + "-" + e) : (i = t || e, n = t || e), { name: i, classname: n };
|
|
168
|
-
}
|
|
169
|
-
function W(t) {
|
|
170
|
-
return /^blob:/.test(t);
|
|
171
|
-
}
|
|
172
|
-
function T(t) {
|
|
173
|
-
return W(t) || function(t2) {
|
|
174
|
-
return /^data:/.test(t2);
|
|
175
|
-
}(t);
|
|
176
|
-
}
|
|
177
|
-
function O(t) {
|
|
178
|
-
return !!(t && t.constructor && t.call && t.apply);
|
|
179
|
-
}
|
|
180
|
-
function D(t) {
|
|
181
|
-
return void 0 === t;
|
|
182
|
-
}
|
|
183
|
-
function H(t) {
|
|
184
|
-
return "object" == typeof t && null !== t;
|
|
185
|
-
}
|
|
186
|
-
function j(t, e, i) {
|
|
187
|
-
var n = {};
|
|
188
|
-
return H(t) ? (Object.keys(e).forEach(function(s) {
|
|
189
|
-
D(t[s]) ? n[s] = e[s] : H(e[s]) ? H(t[s]) ? n[s] = j(t[s], e[s], i[s]) : n[s] = t[s] ? e[s] : i[s] : true === e[s] || false === e[s] ? n[s] = Boolean(t[s]) : n[s] = t[s];
|
|
190
|
-
}), n) : t ? e : i;
|
|
191
|
-
}
|
|
192
|
-
function L(t) {
|
|
193
|
-
var e = Number(t);
|
|
194
|
-
return Number.isNaN(e) ? t : e;
|
|
195
|
-
}
|
|
196
|
-
function P(t) {
|
|
197
|
-
return typeof ("number" == t || /* @__PURE__ */ function(t2) {
|
|
198
|
-
return "object" == typeof t2 && null !== t2;
|
|
199
|
-
}(t) && "[object Number]" == toString.call(t)) && !$(t);
|
|
200
|
-
}
|
|
201
|
-
function $(t) {
|
|
202
|
-
return t != t;
|
|
203
|
-
}
|
|
204
|
-
function I(t, e) {
|
|
205
|
-
return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
|
|
206
|
-
}
|
|
207
|
-
var B = function(t, e) {
|
|
208
|
-
void 0 === t && (t = {}), void 0 === e && (e = {}), this.type = "manipulateImage", this.move = t, this.scale = e;
|
|
209
|
-
}, X = function(t, e) {
|
|
210
|
-
void 0 === e && (e = {}), this.type = "resize", this.directions = t, this.params = e;
|
|
211
|
-
}, Y = function(t) {
|
|
212
|
-
this.type = "move", this.directions = t;
|
|
213
|
-
}, k = function() {
|
|
214
|
-
function t(t2, e, i, n, s) {
|
|
215
|
-
this.type = "drag", this.nativeEvent = t2, this.position = i, this.previousPosition = n, this.element = e, this.anchor = s;
|
|
216
|
-
}
|
|
217
|
-
return t.prototype.shift = function() {
|
|
218
|
-
var t2 = this, e = t2.element, i = t2.anchor, n = t2.position;
|
|
219
|
-
if (e) {
|
|
220
|
-
var s = e.getBoundingClientRect(), o = s.left, r = s.top;
|
|
221
|
-
return { left: n.left - o - i.left, top: n.top - r - i.top };
|
|
222
|
-
}
|
|
223
|
-
return { left: 0, top: 0 };
|
|
224
|
-
}, t;
|
|
225
|
-
}(), F = { name: "DraggableElement", props: { classname: { type: String } }, beforeMount: function() {
|
|
226
|
-
window.addEventListener("mouseup", this.onMouseUp, { passive: false }), window.addEventListener("mousemove", this.onMouseMove, { passive: false }), window.addEventListener("touchmove", this.onTouchMove, { passive: false }), window.addEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
227
|
-
}, beforeUnmount: function() {
|
|
228
|
-
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
229
|
-
}, mounted: function() {
|
|
230
|
-
if (!this.$refs.draggable) throw new Error('You should add ref "draggable" to your root element to use draggable mixin');
|
|
231
|
-
this.touches = [], this.hovered = false;
|
|
232
|
-
}, methods: { onMouseOver: function() {
|
|
233
|
-
this.hovered || (this.hovered = true, this.$emit("enter"));
|
|
234
|
-
}, onMouseLeave: function() {
|
|
235
|
-
this.hovered && !this.touches.length && (this.hovered = false, this.$emit("leave"));
|
|
236
|
-
}, onTouchStart: function(t) {
|
|
237
|
-
t.cancelable && !this.disabled && 1 === t.touches.length && (this.touches = b(t.touches), this.hovered || (this.$emit("enter"), this.hovered = true), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
|
|
238
|
-
return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };
|
|
239
|
-
}, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());
|
|
240
|
-
}, onTouchEnd: function() {
|
|
241
|
-
this.processEnd();
|
|
242
|
-
}, onTouchMove: function(t) {
|
|
243
|
-
this.touches.length && (this.processMove(t, t.touches), t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation());
|
|
244
|
-
}, onMouseDown: function(t) {
|
|
245
|
-
if (!this.disabled) {
|
|
246
|
-
var e = { fake: true, clientX: t.clientX, clientY: t.clientY };
|
|
247
|
-
this.touches = [e], this.initAnchor(e), t.stopPropagation();
|
|
248
|
-
}
|
|
249
|
-
}, onMouseMove: function(t) {
|
|
250
|
-
this.touches.length && (this.processMove(t, [{ fake: true, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.preventDefault());
|
|
251
|
-
}, onMouseUp: function() {
|
|
252
|
-
this.processEnd();
|
|
253
|
-
}, initAnchor: function(t) {
|
|
254
|
-
var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, n = e.right, s = e.bottom, o = e.top;
|
|
255
|
-
this.anchor = { left: t.clientX - i, top: t.clientY - o, bottom: s - t.clientY, right: n - t.clientX };
|
|
256
|
-
}, processMove: function(t, e) {
|
|
257
|
-
var i = b(e);
|
|
258
|
-
if (this.touches.length) {
|
|
259
|
-
if (1 === this.touches.length && 1 === i.length) {
|
|
260
|
-
var n = this.$refs.draggable;
|
|
261
|
-
this.$emit("drag", new k(t, n, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
|
|
262
|
-
}
|
|
263
|
-
this.touches = i;
|
|
264
|
-
}
|
|
265
|
-
}, processEnd: function() {
|
|
266
|
-
this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = false), this.touches = [];
|
|
267
|
-
} }, emits: ["drag", "drag-end", "leave", "enter"] };
|
|
268
|
-
F.render = function(n, s, o, r, a, h) {
|
|
269
|
-
return openBlock(), createBlock("div", { ref: "draggable", class: o.classname, onTouchstart: s[1] || (s[1] = function() {
|
|
270
|
-
return h.onTouchStart && h.onTouchStart.apply(h, arguments);
|
|
271
|
-
}), onMousedown: s[2] || (s[2] = function() {
|
|
272
|
-
return h.onMouseDown && h.onMouseDown.apply(h, arguments);
|
|
273
|
-
}), onMouseover: s[3] || (s[3] = function() {
|
|
274
|
-
return h.onMouseOver && h.onMouseOver.apply(h, arguments);
|
|
275
|
-
}), onMouseleave: s[4] || (s[4] = function() {
|
|
276
|
-
return h.onMouseLeave && h.onMouseLeave.apply(h, arguments);
|
|
277
|
-
}) }, [renderSlot(n.$slots, "default")], 34);
|
|
278
|
-
};
|
|
279
|
-
var U = M("vue-handler-wrapper"), N = { name: "HandlerWrapper", components: { DraggableElement: F }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: false } }, computed: { classes: function() {
|
|
280
|
-
var t;
|
|
281
|
-
if (this.horizontalPosition || this.verticalPosition) {
|
|
282
|
-
var e, i = E(this.horizontalPosition, this.verticalPosition);
|
|
283
|
-
t = U((f(e = {}, i.classname, true), f(e, "disabled", this.disabled), e));
|
|
284
|
-
} else t = U({ disabled: this.disabled });
|
|
285
|
-
return { root: t, draggable: U("draggable") };
|
|
286
|
-
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
287
|
-
N.render = function(r, a, h, c, l, u) {
|
|
288
|
-
var d = resolveComponent("DraggableElement");
|
|
289
|
-
return openBlock(), createBlock("div", { class: u.classes.root }, [createVNode(d, { class: u.classes.draggable, onDrag: a[1] || (a[1] = function(t) {
|
|
290
|
-
return r.$emit("drag", t);
|
|
291
|
-
}), onDragEnd: a[2] || (a[2] = function(t) {
|
|
292
|
-
return r.$emit("drag-end");
|
|
293
|
-
}), onLeave: a[3] || (a[3] = function(t) {
|
|
294
|
-
return r.$emit("leave");
|
|
295
|
-
}), onEnter: a[4] || (a[4] = function(t) {
|
|
296
|
-
return r.$emit("enter");
|
|
297
|
-
}) }, { default: withCtx(function() {
|
|
298
|
-
return [renderSlot(r.$slots, "default")];
|
|
299
|
-
}), _: 3 }, 8, ["class"])], 2);
|
|
300
|
-
};
|
|
301
|
-
var Z = M("vue-line-wrapper"), q = { name: "LineWrapper", components: { DraggableElement: F }, props: { position: { type: String, required: true }, disabled: { type: Boolean, default: false } }, computed: { classname: function() {
|
|
302
|
-
var t;
|
|
303
|
-
return Z((f(t = {}, this.position, true), f(t, "disabled", this.disabled), t));
|
|
304
|
-
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
305
|
-
q.render = function(s, r, a, h, c, l) {
|
|
306
|
-
var u = resolveComponent("DraggableElement");
|
|
307
|
-
return openBlock(), createBlock(u, { class: l.classname, onDrag: r[1] || (r[1] = function(t) {
|
|
308
|
-
return s.$emit("drag", t);
|
|
309
|
-
}), onDragEnd: r[2] || (r[2] = function(t) {
|
|
310
|
-
return s.$emit("drag-end");
|
|
311
|
-
}), onLeave: r[3] || (r[3] = function(t) {
|
|
312
|
-
return s.$emit("leave");
|
|
313
|
-
}), onEnter: r[4] || (r[4] = function(t) {
|
|
314
|
-
return s.$emit("enter");
|
|
315
|
-
}) }, { default: withCtx(function() {
|
|
316
|
-
return [renderSlot(s.$slots, "default")];
|
|
317
|
-
}), _: 3 }, 8, ["class"]);
|
|
318
|
-
};
|
|
319
|
-
var V = ["left", "right", "top", "bottom"], _ = ["left", "right"], G = ["top", "bottom"], Q = ["left", "top"], K = ["fill-area", "fit-area", "stencil", "none"], J = { left: 0, top: 0, width: 0, height: 0 };
|
|
320
|
-
function tt(t, e, i) {
|
|
321
|
-
return !(i = i || ["width", "height", "left", "top"]).some(function(i2) {
|
|
322
|
-
return t[i2] !== e[i2];
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
function et(t) {
|
|
326
|
-
return { left: t.left, top: t.top, right: t.left + t.width, bottom: t.top + t.height };
|
|
327
|
-
}
|
|
328
|
-
function it(t, e) {
|
|
329
|
-
return { left: t.left - e.left, top: t.top - e.top };
|
|
330
|
-
}
|
|
331
|
-
function nt(t) {
|
|
332
|
-
return { left: t.left + t.width / 2, top: t.top + t.height / 2 };
|
|
333
|
-
}
|
|
334
|
-
function st(t, e) {
|
|
335
|
-
var i = { left: 0, top: 0, right: 0, bottom: 0 };
|
|
336
|
-
return V.forEach(function(n) {
|
|
337
|
-
var s = e[n], o = et(t)[n];
|
|
338
|
-
i[n] = void 0 !== s && void 0 !== o ? "left" === n || "top" === n ? Math.max(0, s - o) : Math.max(0, o - s) : 0;
|
|
339
|
-
}), i;
|
|
340
|
-
}
|
|
341
|
-
function ot(t, e) {
|
|
342
|
-
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 };
|
|
343
|
-
}
|
|
344
|
-
function rt(t) {
|
|
345
|
-
return { left: -t.left, top: -t.top };
|
|
346
|
-
}
|
|
347
|
-
function at(t, e) {
|
|
348
|
-
return C(C({}, t), { left: t.left + e.left, top: t.top + e.top });
|
|
349
|
-
}
|
|
350
|
-
function ht(t, e, i, n) {
|
|
351
|
-
if (1 !== e) {
|
|
352
|
-
if (i) {
|
|
353
|
-
var s = nt(t);
|
|
354
|
-
return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - s.left) * (1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - s.top) * (1 - e) };
|
|
355
|
-
}
|
|
356
|
-
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 };
|
|
357
|
-
}
|
|
358
|
-
return t;
|
|
359
|
-
}
|
|
360
|
-
function ct(t) {
|
|
361
|
-
return t.width / t.height;
|
|
362
|
-
}
|
|
363
|
-
function lt(t, e) {
|
|
364
|
-
return Math.min(void 0 !== e.right && void 0 !== e.left ? (e.right - e.left) / t.width : 1 / 0, void 0 !== e.bottom && void 0 !== e.top ? (e.bottom - e.top) / t.height : 1 / 0);
|
|
365
|
-
}
|
|
366
|
-
function ut(t, e) {
|
|
367
|
-
var i = { left: 0, top: 0 }, n = st(t, e);
|
|
368
|
-
return n.left && n.left > 0 ? i.left = n.left : n.right && n.right > 0 && (i.left = -n.right), n.top && n.top > 0 ? i.top = n.top : n.bottom && n.bottom > 0 && (i.top = -n.bottom), i;
|
|
369
|
-
}
|
|
370
|
-
function dt(t, e) {
|
|
371
|
-
var i;
|
|
372
|
-
return e.minimum && t < e.minimum ? i = e.minimum : e.maximum && t > e.maximum && (i = e.maximum), i;
|
|
373
|
-
}
|
|
374
|
-
function mt(t, e) {
|
|
375
|
-
var i = ct(t), n = ct(e);
|
|
376
|
-
return e.width < 1 / 0 && e.height < 1 / 0 ? i > n ? { 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;
|
|
377
|
-
}
|
|
378
|
-
function pt(t, e) {
|
|
379
|
-
var i = e * Math.PI / 180;
|
|
380
|
-
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)) };
|
|
381
|
-
}
|
|
382
|
-
function gt(t, e) {
|
|
383
|
-
var i = e * Math.PI / 180;
|
|
384
|
-
return { left: t.left * Math.cos(i) - t.top * Math.sin(i), top: t.left * Math.sin(i) + t.top * Math.cos(i) };
|
|
385
|
-
}
|
|
386
|
-
function ft(t, e) {
|
|
387
|
-
var i = st(vt(t, e), e);
|
|
388
|
-
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, lt(t, e)) : Math.min((t.height + i.top + i.bottom) / t.height, lt(t, e)) : 1;
|
|
389
|
-
}
|
|
390
|
-
function vt(t, e, i) {
|
|
391
|
-
void 0 === i && (i = false);
|
|
392
|
-
var n = ut(t, e);
|
|
393
|
-
return at(t, i ? rt(n) : n);
|
|
394
|
-
}
|
|
395
|
-
function bt(t) {
|
|
396
|
-
return { width: void 0 !== t.right && void 0 !== t.left ? t.right - t.left : 1 / 0, height: void 0 !== t.bottom && void 0 !== t.top ? t.bottom - t.top : 1 / 0 };
|
|
397
|
-
}
|
|
398
|
-
function wt(t, e) {
|
|
399
|
-
return C(C({}, 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) });
|
|
400
|
-
}
|
|
401
|
-
function yt(t, e, i) {
|
|
402
|
-
void 0 === i && (i = true);
|
|
403
|
-
var n = {};
|
|
404
|
-
return V.forEach(function(s) {
|
|
405
|
-
var o = t[s], r = e[s];
|
|
406
|
-
void 0 !== o && void 0 !== r ? n[s] = "left" === s || "top" === s ? i ? Math.max(o, r) : Math.min(o, r) : i ? Math.min(o, r) : Math.max(o, r) : void 0 !== r ? n[s] = r : void 0 !== o && (n[s] = o);
|
|
407
|
-
}), n;
|
|
408
|
-
}
|
|
409
|
-
function zt(t, e) {
|
|
410
|
-
return yt(t, e, true);
|
|
411
|
-
}
|
|
412
|
-
function Rt(t) {
|
|
413
|
-
var e = t.size, i = t.aspectRatio, n = t.ignoreMinimum, s = t.sizeRestrictions;
|
|
414
|
-
return Boolean((e.correctRatio || ct(e) >= i.minimum && ct(e) <= i.maximum) && e.height <= s.maxHeight && e.width <= s.maxWidth && e.width && e.height && (n || e.height >= s.minHeight && e.width >= s.minWidth));
|
|
415
|
-
}
|
|
416
|
-
function At(t, e) {
|
|
417
|
-
return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);
|
|
418
|
-
}
|
|
419
|
-
function Mt(t) {
|
|
420
|
-
var e = t.width, i = t.height, n = t.sizeRestrictions, s = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(n.minWidth, Math.min(n.maxWidth, e)), height: Math.max(n.minHeight, Math.min(n.maxHeight, i)) };
|
|
421
|
-
function r(t2, o2) {
|
|
422
|
-
return void 0 === o2 && (o2 = false), t2.reduce(function(t3, r2) {
|
|
423
|
-
return Rt({ size: r2, aspectRatio: s, sizeRestrictions: n, ignoreMinimum: o2 }) && (!t3 || At(r2, { width: e, height: i }) < At(t3, { width: e, height: i })) ? r2 : t3;
|
|
424
|
-
}, null);
|
|
425
|
-
}
|
|
426
|
-
var a = [];
|
|
427
|
-
s && [s.minimum, s.maximum].forEach(function(t2) {
|
|
428
|
-
t2 && a.push({ width: o.width, height: o.width / t2, correctRatio: true }, { width: o.height * t2, height: o.height, correctRatio: true });
|
|
429
|
-
}), Rt({ size: o, aspectRatio: s, sizeRestrictions: n }) && a.push(o);
|
|
430
|
-
var h = r(a) || r(a, true);
|
|
431
|
-
return h && { width: h.width, height: h.height };
|
|
432
|
-
}
|
|
433
|
-
function St(t) {
|
|
434
|
-
var e = t.event, i = t.coordinates, n = t.positionRestrictions, s = void 0 === n ? {} : n, o = at(i, e.directions);
|
|
435
|
-
return at(o, ut(o, s));
|
|
436
|
-
}
|
|
437
|
-
function xt(t) {
|
|
438
|
-
var e = t.coordinates, i = t.transform, n = t.imageSize, s = t.sizeRestrictions, o = t.positionRestrictions, r = t.aspectRatio, a = t.visibleArea, h = function(t2, e2) {
|
|
439
|
-
return St({ coordinates: t2, positionRestrictions: o, event: new Y({ left: e2.left - t2.left, top: e2.top - t2.top }) });
|
|
440
|
-
}, c = C({}, e);
|
|
441
|
-
return (Array.isArray(i) ? i : [i]).forEach(function(t2) {
|
|
442
|
-
var e2 = {};
|
|
443
|
-
D((e2 = "function" == typeof t2 ? t2({ coordinates: c, imageSize: n, visibleArea: a }) : t2).width) && D(e2.height) || (c = function(t3, e3) {
|
|
444
|
-
var i2 = C(C(C({}, t3), Mt({ width: e3.width, height: e3.height, sizeRestrictions: s, aspectRatio: r })), { left: 0, top: 0 });
|
|
445
|
-
return h(i2, { left: t3.left, top: t3.top });
|
|
446
|
-
}(c, C(C({}, c), e2))), D(e2.left) && D(e2.top) || (c = h(c, C(C({}, c), e2)));
|
|
447
|
-
}), c;
|
|
448
|
-
}
|
|
449
|
-
function Ct(t) {
|
|
450
|
-
t.event;
|
|
451
|
-
var e = t.getAreaRestrictions, i = t.boundaries, n = t.coordinates, s = t.visibleArea;
|
|
452
|
-
t.aspectRatio;
|
|
453
|
-
var o = t.stencilSize, r = t.sizeRestrictions, a = t.positionRestrictions;
|
|
454
|
-
t.stencilReference;
|
|
455
|
-
var h, c, l, u = C({}, n), d = C({}, s), m = C({}, o);
|
|
456
|
-
h = ct(m), c = ct(u), void 0 === l && (l = 1e-3), (0 === h || 0 === c ? Math.abs(c - h) < l : Math.abs(c / h) < 1 + l && Math.abs(c / h) > 1 - l) || (u = C(C({}, u), Mt({ sizeRestrictions: r, width: u.width, height: u.height, aspectRatio: { minimum: ct(m), maximum: ct(m) } })));
|
|
457
|
-
var p2 = ft(d = ht(d, u.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: "resize" }));
|
|
458
|
-
return 1 !== p2 && (d = ht(d, p2), u = ht(u, p2)), d = vt(d = at(d, it(nt(u), nt(d))), e({ visibleArea: d, type: "move" })), { coordinates: u = vt(u, zt(et(d), a)), visibleArea: d };
|
|
459
|
-
}
|
|
460
|
-
function Et(t) {
|
|
461
|
-
var e = t.event, i = t.getAreaRestrictions, n = t.boundaries, s = t.coordinates, o = t.visibleArea;
|
|
462
|
-
t.aspectRatio, t.stencilSize, t.sizeRestrictions;
|
|
463
|
-
var r = t.positionRestrictions;
|
|
464
|
-
t.stencilReference;
|
|
465
|
-
var a = C({}, s), h = C({}, o);
|
|
466
|
-
if (s && o && "manipulateImage" !== e.type) {
|
|
467
|
-
var c = { width: 0, height: 0 };
|
|
468
|
-
h.width, n.width, ct(n) > ct(a) ? (c.height = 0.8 * n.height, c.width = c.height * ct(a)) : (c.width = 0.8 * n.width, c.height = c.width * ct(a));
|
|
469
|
-
var l = ft(h = ht(h, a.width * n.width / (h.width * c.width)), i({ visibleArea: h, type: "resize" }));
|
|
470
|
-
h = ht(h, l), 1 !== l && (c.height /= l, c.width /= l), h = vt(h = at(h, it(nt(a), nt(h))), i({ visibleArea: h, type: "move" })), a = vt(a, zt(et(h), r));
|
|
471
|
-
}
|
|
472
|
-
return { coordinates: a, visibleArea: h };
|
|
473
|
-
}
|
|
474
|
-
function Wt(t) {
|
|
475
|
-
var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.getAreaRestrictions, o = C({}, n), r = C({}, i);
|
|
476
|
-
if ("setCoordinates" === e.type) {
|
|
477
|
-
var a = Math.max(0, r.width - o.width), h = Math.max(0, r.height - o.height);
|
|
478
|
-
a > h ? o = ht(o, Math.min(r.width / o.width, lt(o, s({ visibleArea: o, type: "resize" })))) : h > a && (o = ht(o, Math.min(r.height / o.height, lt(o, s({ visibleArea: o, type: "resize" }))))), o = vt(o = at(o, rt(ut(r, et(o)))), s({ visibleArea: o, type: "move" }));
|
|
479
|
-
}
|
|
480
|
-
return { visibleArea: o, coordinates: r };
|
|
481
|
-
}
|
|
482
|
-
function Tt(t) {
|
|
483
|
-
var e = t.imageSize, i = t.visibleArea, n = t.coordinates, s = i || e;
|
|
484
|
-
return { left: (i ? i.left : 0) + s.width / 2 - n.width / 2, top: (i ? i.top : 0) + s.height / 2 - n.height / 2 };
|
|
485
|
-
}
|
|
486
|
-
function Ot(t) {
|
|
487
|
-
var e = t.imageSize, i = t.visibleArea, n = t.aspectRatio, s = t.sizeRestrictions, o = i || e, r = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, ct(o))), a = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
|
|
488
|
-
return Mt(C(C({}, a), { aspectRatio: n, sizeRestrictions: s }));
|
|
489
|
-
}
|
|
490
|
-
function Dt(t) {
|
|
491
|
-
var e, i, n = t.imageSize, s = t.visibleArea, o = t.boundaries, r = t.aspectRatio, a = t.sizeRestrictions, h = t.stencilSize, c = s || n;
|
|
492
|
-
return ct(c) > ct(o) ? i = (e = h.height * c.height / o.height) * ct(h) : e = (i = h.width * c.width / o.width) / ct(h), Mt({ width: i, height: e, aspectRatio: r, sizeRestrictions: a });
|
|
493
|
-
}
|
|
494
|
-
function Ht(t) {
|
|
495
|
-
var e = t.getAreaRestrictions, i = t.coordinates, n = t.imageSize, s = ct(t.boundaries);
|
|
496
|
-
if (i) {
|
|
497
|
-
var o = { height: Math.max(i.height, n.height), width: Math.max(i.width, n.width) }, r = mt({ width: ct(o) > s ? o.width : o.height * s, height: ct(o) > s ? o.width / s : o.height }, bt(e())), a = { left: i.left + i.width / 2 - r.width / 2, top: i.top + i.height / 2 - r.height / 2, width: r.width, height: r.height }, h = st(i, et(C({ left: 0, top: 0 }, n))), c = {};
|
|
498
|
-
return !h.left && !h.right && a.width <= n.width && (c.left = 0, c.right = n.width), !h.top && !h.bottom && a.height <= n.height && (c.top = 0, c.bottom = n.height), vt(a, c);
|
|
499
|
-
}
|
|
500
|
-
var l = ct(n);
|
|
501
|
-
r = { height: l > s ? n.height : n.width / s, width: l > s ? n.height * s : n.width };
|
|
502
|
-
return { left: n.width / 2 - r.width / 2, top: n.height / 2 - r.height / 2, width: r.width, height: r.height };
|
|
503
|
-
}
|
|
504
|
-
function jt(t, e) {
|
|
505
|
-
return yt(t, et(e));
|
|
506
|
-
}
|
|
507
|
-
function Lt(t) {
|
|
508
|
-
var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.sizeRestrictions, o = t.getAreaRestrictions, r = t.positionRestrictions, a = t.adjustStencil, h = e.scale, c = e.move, l = C({}, n), u = C({}, i), d = 1, m = 1, p2 = h.factor && Math.abs(h.factor - 1) > 1e-3;
|
|
509
|
-
l = at(l, { left: c.left || 0, top: c.top || 0 });
|
|
510
|
-
var g2 = { stencil: { minimum: Math.max(s.minWidth ? s.minWidth / u.width : 0, s.minHeight ? s.minHeight / u.height : 0), maximum: Math.min(s.maxWidth ? s.maxWidth / u.width : 1 / 0, s.maxHeight ? s.maxHeight / u.height : 1 / 0, lt(u, r)) }, area: { maximum: lt(l, o({ visibleArea: l, type: "resize" })) } };
|
|
511
|
-
h.factor && p2 && (h.factor < 1 ? (m = Math.max(h.factor, g2.stencil.minimum)) > 1 && (m = 1) : h.factor > 1 && (m = Math.min(h.factor, Math.min(g2.area.maximum, g2.stencil.maximum))) < 1 && (m = 1)), m && (l = ht(l, m, h.center));
|
|
512
|
-
var f2 = i.left - n.left, v2 = n.width + n.left - (i.width + i.left), b2 = i.top - n.top, w2 = n.height + n.top - (i.height + i.top);
|
|
513
|
-
return l = vt(l = at(l, ut(l, { left: void 0 !== r.left ? r.left - f2 * m : void 0, top: void 0 !== r.top ? r.top - b2 * m : void 0, bottom: void 0 !== r.bottom ? r.bottom + w2 * m : void 0, right: void 0 !== r.right ? r.right + v2 * m : void 0 })), o({ visibleArea: l, type: "move" })), u.width = u.width * m, u.height = u.height * m, u.left = l.left + f2 * m, u.top = l.top + b2 * m, u = vt(u, zt(et(l), r)), h.factor && p2 && a && (h.factor > 1 ? d = Math.min(g2.area.maximum, h.factor) / m : h.factor < 1 && (d = Math.max(u.height / l.height, u.width / l.width, h.factor / m)), 1 !== d && (l = at(l = vt(l = ht(l, d, h.factor > 1 ? h.center : nt(u)), o({ visibleArea: l, type: "move" })), rt(ut(u, et(l)))))), { coordinates: u, visibleArea: l };
|
|
514
|
-
}
|
|
515
|
-
function Pt(t) {
|
|
516
|
-
var e = t.aspectRatio, i = t.getAreaRestrictions, n = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, r = t.positionRestrictions, a = t.imageSize, h = t.previousImageSize, c = t.angle, l = C({}, n), u = C({}, s), d = gt(nt(C({ left: 0, top: 0 }, h)), c);
|
|
517
|
-
return (l = C(C({}, Mt({ sizeRestrictions: o, aspectRatio: e, width: l.width, height: l.height })), gt(nt(l), c))).left -= d.left - a.width / 2 + l.width / 2, l.top -= d.top - a.height / 2 + l.height / 2, u = ht(u, ft(u, i({ visibleArea: u, type: "resize" }))), { coordinates: l = vt(l, r), visibleArea: u = vt(u = at(u, it(nt(l), nt(n))), i({ visibleArea: u, type: "move" })) };
|
|
518
|
-
}
|
|
519
|
-
function $t(t) {
|
|
520
|
-
var e = t.flip, i = t.previousFlip, n = t.rotate;
|
|
521
|
-
var s = t.getAreaRestrictions, o = t.coordinates, r = t.visibleArea, a = t.imageSize, h = C({}, o), c = C({}, r), l = i.horizontal !== e.horizontal, u = i.vertical !== e.vertical;
|
|
522
|
-
if (l || u) {
|
|
523
|
-
var d = gt({ left: a.width / 2, top: a.height / 2 }, -n), m = gt(nt(h), -n), p2 = gt({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, n);
|
|
524
|
-
h = at(h, it(p2, nt(h))), m = gt(nt(c), -n), c = vt(c = at(c, it(p2 = gt({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, n), nt(c))), s({ visibleArea: c, type: "move" }));
|
|
525
|
-
}
|
|
526
|
-
return { coordinates: h, visibleArea: c };
|
|
527
|
-
}
|
|
528
|
-
function It(t) {
|
|
529
|
-
var e = t.directions, i = t.coordinates, n = t.positionRestrictions, s = void 0 === n ? {} : n, o = t.sizeRestrictions, r = t.preserveRatio, a = t.compensate, h = C({}, e), c = ot(i, h).width, l = ot(i, h).height;
|
|
530
|
-
c < 0 && (h.left < 0 && h.right < 0 ? (h.left = -(i.width - o.minWidth) / (h.left / h.right), h.right = -(i.width - o.minWidth) / (h.right / h.left)) : h.left < 0 ? h.left = -(i.width - o.minWidth) : h.right < 0 && (h.right = -(i.width - o.minWidth))), l < 0 && (h.top < 0 && h.bottom < 0 ? (h.top = -(i.height - o.minHeight) / (h.top / h.bottom), h.bottom = -(i.height - o.minHeight) / (h.bottom / h.top)) : h.top < 0 ? h.top = -(i.height - o.minHeight) : h.bottom < 0 && (h.bottom = -(i.height - o.minHeight)));
|
|
531
|
-
var u = st(ot(i, h), s);
|
|
532
|
-
a && (u.left && u.left > 0 && 0 === u.right ? (h.right += u.left, h.left -= u.left) : u.right && u.right > 0 && 0 === u.left && (h.left += u.right, h.right -= u.right), u.top && u.top > 0 && 0 === u.bottom ? (h.bottom += u.top, h.top -= u.top) : u.bottom && u.bottom > 0 && 0 === u.top && (h.top += u.bottom, h.bottom -= u.bottom), u = st(ot(i, h), s));
|
|
533
|
-
var d = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
|
|
534
|
-
if (V.forEach(function(t2) {
|
|
535
|
-
var e2 = u[t2];
|
|
536
|
-
e2 && h[t2] && (d[t2] = Math.max(0, 1 - e2 / h[t2]));
|
|
537
|
-
}), r) {
|
|
538
|
-
var m = Math.min.apply(null, V.map(function(t2) {
|
|
539
|
-
return d[t2];
|
|
540
|
-
}));
|
|
541
|
-
m !== 1 / 0 && V.forEach(function(t2) {
|
|
542
|
-
h[t2] *= m;
|
|
543
|
-
});
|
|
544
|
-
} else V.forEach(function(t2) {
|
|
545
|
-
d[t2] !== 1 / 0 && (h[t2] *= d[t2]);
|
|
546
|
-
});
|
|
547
|
-
if (c = ot(i, h).width, l = ot(i, h).height, h.right + h.left && (c > o.maxWidth ? d.width = (o.maxWidth - i.width) / (h.right + h.left) : c < o.minWidth && (d.width = (o.minWidth - i.width) / (h.right + h.left))), h.bottom + h.top && (l > o.maxHeight ? d.height = (o.maxHeight - i.height) / (h.bottom + h.top) : l < o.minHeight && (d.height = (o.minHeight - i.height) / (h.bottom + h.top))), r) {
|
|
548
|
-
var p2 = Math.min(d.width, d.height);
|
|
549
|
-
p2 !== 1 / 0 && V.forEach(function(t2) {
|
|
550
|
-
h[t2] *= p2;
|
|
551
|
-
});
|
|
552
|
-
} else d.width !== 1 / 0 && _.forEach(function(t2) {
|
|
553
|
-
h[t2] *= d.width;
|
|
554
|
-
}), d.height !== 1 / 0 && G.forEach(function(t2) {
|
|
555
|
-
h[t2] *= d.height;
|
|
556
|
-
});
|
|
557
|
-
return h;
|
|
558
|
-
}
|
|
559
|
-
function Bt(t, e, i) {
|
|
560
|
-
return 0 == e && 0 == i ? t / 2 : 0 == e ? 0 : 0 == i ? t : t * Math.abs(e / (e + i));
|
|
561
|
-
}
|
|
562
|
-
var Xt = M("vue-simple-handler"), Yt = M("vue-simple-handler-wrapper"), kt = { name: "SimpleHandler", components: { HandlerWrapper: N }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: false } }, data: function() {
|
|
563
|
-
return { hover: false };
|
|
564
|
-
}, computed: { classes: function() {
|
|
565
|
-
var t, e = (f(t = {}, this.horizontalPosition, Boolean(this.horizontalPosition)), f(t, this.verticalPosition, Boolean(this.verticalPosition)), f(t, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), Boolean(this.verticalPosition && this.horizontalPosition)), f(t, "hover", this.hover), t);
|
|
566
|
-
return { default: A(Xt(e), this.defaultClass, this.hover && this.hoverClass), wrapper: A(Yt(e), this.wrapperClass) };
|
|
567
|
-
} }, methods: { onDrag: function(t) {
|
|
568
|
-
this.$emit("drag", t);
|
|
569
|
-
}, onEnter: function() {
|
|
570
|
-
this.hover = true;
|
|
571
|
-
}, onLeave: function() {
|
|
572
|
-
this.hover = false;
|
|
573
|
-
}, onDragEnd: function() {
|
|
574
|
-
this.$emit("drag-end");
|
|
575
|
-
} }, emits: ["drag", "drag-end"] };
|
|
576
|
-
kt.render = function(i, r, a, h, c, l) {
|
|
577
|
-
var u = resolveComponent("HandlerWrapper");
|
|
578
|
-
return openBlock(), createBlock(u, { class: l.classes.wrapper, "vertical-position": a.verticalPosition, "horizontal-position": a.horizontalPosition, disabled: a.disabled, onDrag: l.onDrag, onDragEnd: l.onDragEnd, onEnter: l.onEnter, onLeave: l.onLeave }, { default: withCtx(function() {
|
|
579
|
-
return [createVNode("div", { class: l.classes.default }, null, 2)];
|
|
580
|
-
}), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
581
|
-
};
|
|
582
|
-
var Ft = M("vue-simple-line"), Ut = M("vue-simple-line-wrapper"), Nt = { name: "SimpleLine", components: { LineWrapper: q }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: false } }, data: function() {
|
|
583
|
-
return { hover: false };
|
|
584
|
-
}, computed: { classes: function() {
|
|
585
|
-
return { root: A(Ft(f({}, this.position, true)), this.defaultClass, this.hover && this.hoverClass), wrapper: A(Ut(f({}, this.position, true)), this.wrapperClass) };
|
|
586
|
-
} }, methods: { onDrag: function(t) {
|
|
587
|
-
this.$emit("drag", t);
|
|
588
|
-
}, onEnter: function() {
|
|
589
|
-
this.hover = true;
|
|
590
|
-
}, onLeave: function() {
|
|
591
|
-
this.hover = false;
|
|
592
|
-
}, onDragEnd: function() {
|
|
593
|
-
this.$emit("drag-end");
|
|
594
|
-
} }, emits: ["drag", "drag-end"] };
|
|
595
|
-
Nt.render = function(i, r, a, h, c, l) {
|
|
596
|
-
var u = resolveComponent("LineWrapper");
|
|
597
|
-
return openBlock(), createBlock(u, { class: l.classes.wrapper, position: a.position, disabled: a.disabled, onDrag: l.onDrag, onDragEnd: l.onDragEnd, onEnter: l.onEnter, onLeave: l.onLeave }, { default: withCtx(function() {
|
|
598
|
-
return [createVNode("div", { class: l.classes.root }, null, 2)];
|
|
599
|
-
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
600
|
-
};
|
|
601
|
-
var Zt = M("vue-bounding-box"), qt = ["east", "west", null], Vt = ["south", "north", null], _t = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
602
|
-
return { eastNorth: true, north: true, westNorth: true, west: true, westSouth: true, south: true, eastSouth: true, east: true };
|
|
603
|
-
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
604
|
-
return kt;
|
|
605
|
-
} }, handlersClasses: { type: Object, default: function() {
|
|
606
|
-
return {};
|
|
607
|
-
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
608
|
-
return {};
|
|
609
|
-
} }, lines: { type: Object, default: function() {
|
|
610
|
-
return { west: true, north: true, east: true, south: true };
|
|
611
|
-
} }, linesComponent: { type: [Object, String], default: function() {
|
|
612
|
-
return Nt;
|
|
613
|
-
} }, linesClasses: { type: Object, default: function() {
|
|
614
|
-
return {};
|
|
615
|
-
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
616
|
-
return {};
|
|
617
|
-
} }, resizable: { type: Boolean, default: true } }, data: function() {
|
|
618
|
-
var t = [];
|
|
619
|
-
return qt.forEach(function(e) {
|
|
620
|
-
Vt.forEach(function(i) {
|
|
621
|
-
if (e !== i) {
|
|
622
|
-
var n = E(e, i), s = n.name, o = n.classname;
|
|
623
|
-
t.push({ name: s, classname: o, verticalDirection: i, horizontalDirection: e });
|
|
624
|
-
}
|
|
625
|
-
});
|
|
626
|
-
}), { points: t };
|
|
627
|
-
}, computed: { style: function() {
|
|
628
|
-
var t = {};
|
|
629
|
-
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;
|
|
630
|
-
}, classes: function() {
|
|
631
|
-
var t = this.handlersClasses, e = this.handlersWrappersClasses, i = this.linesClasses, n = this.linesWrappersClasses;
|
|
632
|
-
return { root: Zt(), handlers: t, handlersWrappers: e, lines: i, linesWrappers: n };
|
|
633
|
-
}, lineNodes: function() {
|
|
634
|
-
var t = this, e = [];
|
|
635
|
-
return this.points.forEach(function(i) {
|
|
636
|
-
i.horizontalDirection && i.verticalDirection || !t.lines[i.name] || e.push({ name: i.name, component: t.linesComponent, class: A(t.classes.lines.default, t.classes.lines[i.name], !t.resizable && t.classes.lines.disabled), wrapperClass: A(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 });
|
|
637
|
-
}), e;
|
|
638
|
-
}, handlerNodes: function() {
|
|
639
|
-
var t = this, e = [], i = this.width, n = this.height;
|
|
640
|
-
return this.points.forEach(function(s) {
|
|
641
|
-
if (t.handlers[s.name]) {
|
|
642
|
-
var o = { name: s.name, component: t.handlersComponent, class: A(t.classes.handlers.default, t.classes.handlers[s.name]), wrapperClass: A(t.classes.handlersWrappers.default, t.classes.handlersWrappers[s.name]), hoverClass: t.classes.handlers.hover, verticalDirection: s.verticalDirection, horizontalDirection: s.horizontalDirection, disabled: !t.resizable };
|
|
643
|
-
if (i && n) {
|
|
644
|
-
var r = s.horizontalDirection, a = s.verticalDirection, h = "east" === r ? i : "west" === r ? 0 : i / 2, c = "south" === a ? n : "north" === a ? 0 : n / 2;
|
|
645
|
-
o.wrapperClass = Zt("handler"), o.wrapperStyle = { transform: "translate(".concat(h, "px, ").concat(c, "px)") }, t.transitions && t.transitions.enabled && (o.wrapperStyle.transition = "".concat(t.transitions.time, "ms ").concat(t.transitions.timingFunction));
|
|
646
|
-
} else o.wrapperClass = Zt("handler", f({}, s.classname, true));
|
|
647
|
-
e.push(o);
|
|
648
|
-
}
|
|
649
|
-
}), e;
|
|
650
|
-
} }, beforeMount: function() {
|
|
651
|
-
window.addEventListener("mouseup", this.onMouseUp, { passive: false }), window.addEventListener("mousemove", this.onMouseMove, { passive: false }), window.addEventListener("touchmove", this.onTouchMove, { passive: false }), window.addEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
652
|
-
}, beforeUnmount: function() {
|
|
653
|
-
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
654
|
-
}, mounted: function() {
|
|
655
|
-
this.touches = [];
|
|
656
|
-
}, methods: { onEnd: function() {
|
|
657
|
-
this.$emit("resize-end");
|
|
658
|
-
}, onHandlerDrag: function(t, e, i) {
|
|
659
|
-
var n, s = t.shift(), o = s.left, r = s.top, a = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
660
|
-
"west" === e ? a.left -= o : "east" === e && (a.right += o), "north" === i ? a.top -= r : "south" === i && (a.bottom += r), !i && e ? n = "width" : i && !e && (n = "height"), this.resizable && this.$emit("resize", new X(a, { allowedDirections: { left: "west" === e || !e, right: "east" === e || !e, bottom: "south" === i || !i, top: "north" === i || !i }, preserveAspectRatio: t.nativeEvent && t.nativeEvent.shiftKey, respectDirection: n }));
|
|
661
|
-
} }, emits: ["resize", "resize-end"] };
|
|
662
|
-
_t.render = function(n, o, c, l, u, d) {
|
|
663
|
-
return openBlock(), createBlock("div", { ref: "box", class: d.classes.root, style: d.style }, [renderSlot(n.$slots, "default"), createVNode("div", null, [(openBlock(true), createBlock(Fragment, null, renderList(d.lineNodes, function(i) {
|
|
664
|
-
return openBlock(), createBlock(resolveDynamicComponent(i.component), { key: i.name, "default-class": i.class, "hover-class": i.hoverClass, "wrapper-class": i.wrapperClass, position: i.name, disabled: i.disabled, onDrag: function(t) {
|
|
665
|
-
return d.onHandlerDrag(t, i.horizontalDirection, i.verticalDirection);
|
|
666
|
-
}, onDragEnd: o[1] || (o[1] = function(t) {
|
|
667
|
-
return d.onEnd();
|
|
668
|
-
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
|
|
669
|
-
}), 128))]), (openBlock(true), createBlock(Fragment, null, renderList(d.handlerNodes, function(i) {
|
|
670
|
-
return openBlock(), createBlock("div", { key: i.name, style: i.wrapperStyle, class: i.wrapperClass }, [(openBlock(), createBlock(resolveDynamicComponent(i.component), { "default-class": i.class, "hover-class": i.hoverClass, "wrapper-class": i.wrapperClass, "horizontal-position": i.horizontalDirection, "vertical-position": i.verticalDirection, disabled: i.disabled, onDrag: function(t) {
|
|
671
|
-
return d.onHandlerDrag(t, i.horizontalDirection, i.verticalDirection);
|
|
672
|
-
}, onDragEnd: o[2] || (o[2] = function(t) {
|
|
673
|
-
return d.onEnd();
|
|
674
|
-
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
675
|
-
}), 128))], 6);
|
|
676
|
-
};
|
|
677
|
-
var Gt = M("vue-draggable-area"), Qt = { name: "DraggableArea", props: { movable: { type: Boolean, default: true }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
678
|
-
return { default: Gt() };
|
|
679
|
-
} }, beforeMount: function() {
|
|
680
|
-
window.addEventListener("mouseup", this.onMouseUp, { passive: false }), window.addEventListener("mousemove", this.onMouseMove, { passive: false }), window.addEventListener("touchmove", this.onTouchMove, { passive: false }), window.addEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
681
|
-
}, beforeUnmount: function() {
|
|
682
|
-
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
683
|
-
}, mounted: function() {
|
|
684
|
-
this.touches = [], this.touchStarted = false;
|
|
685
|
-
}, methods: { onTouchStart: function(t) {
|
|
686
|
-
if (t.cancelable) {
|
|
687
|
-
var e = this.movable && 1 === t.touches.length;
|
|
688
|
-
e && (this.touches = b(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
|
|
689
|
-
}
|
|
690
|
-
}, onTouchEnd: function() {
|
|
691
|
-
this.touchStarted = false, this.processEnd();
|
|
692
|
-
}, onTouchMove: function(t) {
|
|
693
|
-
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : I({ 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 = true));
|
|
694
|
-
}, onMouseDown: function(t) {
|
|
695
|
-
if (this.movable && 0 === t.button) {
|
|
696
|
-
var e = { fake: true, clientX: t.clientX, clientY: t.clientY };
|
|
697
|
-
this.touches = [e], this.initAnchor(e), t.stopPropagation();
|
|
698
|
-
}
|
|
699
|
-
}, onMouseMove: function(t) {
|
|
700
|
-
this.touches.length && (this.processMove(t, [{ fake: true, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.cancelable && t.preventDefault(), t.stopPropagation());
|
|
701
|
-
}, onMouseUp: function() {
|
|
702
|
-
this.processEnd();
|
|
703
|
-
}, initAnchor: function(t) {
|
|
704
|
-
var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top;
|
|
705
|
-
this.anchor = { x: t.clientX - i, y: t.clientY - n };
|
|
706
|
-
}, processMove: function(t, e) {
|
|
707
|
-
var i = b(e);
|
|
708
|
-
if (this.touches.length) {
|
|
709
|
-
var n = this.$refs.container.getBoundingClientRect(), s = n.left, o = n.top;
|
|
710
|
-
1 === this.touches.length && 1 === i.length && this.$emit("move", new Y({ left: i[0].clientX - (s + this.anchor.x), top: i[0].clientY - (o + this.anchor.y) }));
|
|
711
|
-
}
|
|
712
|
-
}, processEnd: function() {
|
|
713
|
-
this.touches.length && this.$emit("move-end"), this.touches = [];
|
|
714
|
-
} }, emits: ["move", "move-end"] };
|
|
715
|
-
Qt.render = function(n, s, o, r, a, h) {
|
|
716
|
-
return openBlock(), createBlock("div", { ref: "container", onTouchstart: s[1] || (s[1] = function() {
|
|
717
|
-
return h.onTouchStart && h.onTouchStart.apply(h, arguments);
|
|
718
|
-
}), onMousedown: s[2] || (s[2] = function() {
|
|
719
|
-
return h.onMouseDown && h.onMouseDown.apply(h, arguments);
|
|
720
|
-
}) }, [renderSlot(n.$slots, "default")], 544);
|
|
721
|
-
};
|
|
722
|
-
function Kt(t) {
|
|
723
|
-
var e, i;
|
|
724
|
-
return { rotate: t.rotate || 0, flip: { horizontal: (null === (e = null == t ? void 0 : t.flip) || void 0 === e ? void 0 : e.horizontal) || false, vertical: (null === (i = null == t ? void 0 : t.flip) || void 0 === i ? void 0 : i.vertical) || false } };
|
|
725
|
-
}
|
|
726
|
-
function Jt(t) {
|
|
727
|
-
return new Promise(function(e, i) {
|
|
728
|
-
try {
|
|
729
|
-
if (t) if (/^data:/i.test(t)) e(function(t2) {
|
|
730
|
-
t2 = t2.replace(/^data:([^;]+);base64,/gim, "");
|
|
731
|
-
for (var e2 = atob(t2), i2 = e2.length, n2 = new ArrayBuffer(i2), s2 = new Uint8Array(n2), o2 = 0; o2 < i2; o2++) s2[o2] = e2.charCodeAt(o2);
|
|
732
|
-
return n2;
|
|
733
|
-
}(t));
|
|
734
|
-
else if (/^blob:/i.test(t)) {
|
|
735
|
-
var n = new FileReader();
|
|
736
|
-
n.onload = function(t2) {
|
|
737
|
-
e(t2.target.result);
|
|
738
|
-
}, o = t, r = function(t2) {
|
|
739
|
-
n.readAsArrayBuffer(t2);
|
|
740
|
-
}, (a = new XMLHttpRequest()).open("GET", o, true), a.responseType = "blob", a.onload = function() {
|
|
741
|
-
200 != this.status && 0 !== this.status || r(this.response);
|
|
742
|
-
}, a.send();
|
|
743
|
-
} else {
|
|
744
|
-
var s = new XMLHttpRequest();
|
|
745
|
-
s.onreadystatechange = function() {
|
|
746
|
-
4 === s.readyState && (200 === s.status || 0 === s.status ? e(s.response) : i("Warning: could not load an image to parse its orientation"), s = null);
|
|
747
|
-
}, s.onprogress = function() {
|
|
748
|
-
"image/jpeg" !== s.getResponseHeader("content-type") && s.abort();
|
|
749
|
-
}, s.withCredentials = false, s.open("GET", t, true), s.responseType = "arraybuffer", s.send(null);
|
|
750
|
-
}
|
|
751
|
-
else i("Error: the image is empty");
|
|
752
|
-
} catch (t2) {
|
|
753
|
-
i(t2);
|
|
754
|
-
}
|
|
755
|
-
var o, r, a;
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
function te(t) {
|
|
759
|
-
var e = t.rotate, i = t.flip, n = t.scaleX, s = t.scaleY, o = "";
|
|
760
|
-
return o += " rotate(" + e + "deg) ", o += " scaleX(" + n * (i.horizontal ? -1 : 1) + ") ", o += " scaleY(" + s * (i.vertical ? -1 : 1) + ") ";
|
|
761
|
-
}
|
|
762
|
-
function ee(t) {
|
|
763
|
-
try {
|
|
764
|
-
var e, i = new DataView(t), n = void 0, s = void 0, o = void 0, r = void 0;
|
|
765
|
-
if (255 === i.getUint8(0) && 216 === i.getUint8(1)) for (var a = i.byteLength, h = 2; h + 1 < a; ) {
|
|
766
|
-
if (255 === i.getUint8(h) && 225 === i.getUint8(h + 1)) {
|
|
767
|
-
o = h;
|
|
768
|
-
break;
|
|
769
|
-
}
|
|
770
|
-
h++;
|
|
771
|
-
}
|
|
772
|
-
if (o && (n = o + 10, "Exif" === function(t2, e2, i2) {
|
|
773
|
-
var n2, s2 = "";
|
|
774
|
-
for (n2 = e2, i2 += e2; n2 < i2; n2++) s2 += String.fromCharCode(t2.getUint8(n2));
|
|
775
|
-
return s2;
|
|
776
|
-
}(i, o + 4, 4))) {
|
|
777
|
-
var c = i.getUint16(n);
|
|
778
|
-
if (((s = 18761 === c) || 19789 === c) && 42 === i.getUint16(n + 2, s)) {
|
|
779
|
-
var l = i.getUint32(n + 4, s);
|
|
780
|
-
l >= 8 && (r = n + l);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
if (r) for (var u = i.getUint16(r, s), d = 0; d < u; d++) {
|
|
784
|
-
h = r + 12 * d + 2;
|
|
785
|
-
if (274 === i.getUint16(h, s)) {
|
|
786
|
-
h += 8, e = i.getUint16(h, s), i.setUint16(h, 1, s);
|
|
787
|
-
break;
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
return e;
|
|
791
|
-
} catch (t2) {
|
|
792
|
-
return null;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
function se(t, e) {
|
|
796
|
-
var i = e.getBoundingClientRect(), n = i.left, s = i.top, o = { left: 0, top: 0 }, r = 0;
|
|
797
|
-
return t.forEach(function(e2) {
|
|
798
|
-
o.left += (e2.clientX - n) / t.length, o.top += (e2.clientY - s) / t.length;
|
|
799
|
-
}), t.forEach(function(t2) {
|
|
800
|
-
r += I({ x: o.left, y: o.top }, { x: t2.clientX - n, y: t2.clientY - s });
|
|
801
|
-
}), { centerMass: o, spread: r, count: t.length };
|
|
802
|
-
}
|
|
803
|
-
var oe = { props: { touchMove: { type: Boolean, required: true }, mouseMove: { type: Boolean, required: true }, touchResize: { type: Boolean, required: true }, wheelResize: { type: [Boolean, Object], required: true }, eventsFilter: { type: Function, required: false } }, beforeMount: function() {
|
|
804
|
-
window.addEventListener("mouseup", this.onMouseUp, { passive: false }), window.addEventListener("mousemove", this.onMouseMove, { passive: false }), window.addEventListener("touchmove", this.onTouchMove, { passive: false }), window.addEventListener("touchend", this.onTouchEnd, { passive: false });
|
|
805
|
-
}, beforeUnmount: function() {
|
|
806
|
-
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
807
|
-
}, created: function() {
|
|
808
|
-
this.transforming = false, this.debouncedProcessEnd = x(this.processEnd), this.touches = [];
|
|
809
|
-
}, methods: { processMove: function(t, e) {
|
|
810
|
-
if (this.touches.length) {
|
|
811
|
-
if (1 === this.touches.length && 1 === e.length) this.$emit("move", new B({ left: this.touches[0].clientX - e[0].clientX, top: this.touches[0].clientY - e[0].clientY }));
|
|
812
|
-
else if (this.touches.length > 1 && this.touchResize) {
|
|
813
|
-
var i = se(e, this.$refs.container), n = this.oldGeometricProperties;
|
|
814
|
-
n.count === i.count && n.count > 1 && this.$emit("resize", new B({ left: n.centerMass.left - i.centerMass.left, top: n.centerMass.top - i.centerMass.top }, { factor: n.spread / i.spread, center: i.centerMass })), this.oldGeometricProperties = i;
|
|
815
|
-
}
|
|
816
|
-
this.touches = e;
|
|
817
|
-
}
|
|
818
|
-
}, processEnd: function() {
|
|
819
|
-
this.transforming && (this.transforming = false, this.$emit("transform-end"));
|
|
820
|
-
}, processStart: function() {
|
|
821
|
-
this.transforming = true, this.debouncedProcessEnd.clear();
|
|
822
|
-
}, processEvent: function(t) {
|
|
823
|
-
return this.eventsFilter ? false !== this.eventsFilter(t, this.transforming) : (t.preventDefault(), t.stopPropagation(), true);
|
|
824
|
-
}, onTouchStart: function(t) {
|
|
825
|
-
if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {
|
|
826
|
-
var e = this.$refs.container, i = e.getBoundingClientRect(), n = i.left, s = i.top, o = i.bottom, r = i.right;
|
|
827
|
-
this.touches = b(t.touches).filter(function(t2) {
|
|
828
|
-
return t2.clientX > n && t2.clientX < r && t2.clientY > s && t2.clientY < o;
|
|
829
|
-
}), this.oldGeometricProperties = se(this.touches, e);
|
|
830
|
-
}
|
|
831
|
-
}, onTouchEnd: function(t) {
|
|
832
|
-
0 === t.touches.length && (this.touches = [], this.processEnd());
|
|
833
|
-
}, onTouchMove: function(t) {
|
|
834
|
-
var e = this;
|
|
835
|
-
if (this.touches.length) {
|
|
836
|
-
var i = b(t.touches).filter(function(t2) {
|
|
837
|
-
return !t2.identifier || e.touches.find(function(e2) {
|
|
838
|
-
return e2.identifier === t2.identifier;
|
|
839
|
-
});
|
|
840
|
-
});
|
|
841
|
-
this.processEvent(t) && (this.processMove(t, i), this.processStart());
|
|
842
|
-
}
|
|
843
|
-
}, onMouseDown: function(t) {
|
|
844
|
-
if (this.mouseMove && "buttons" in t && 1 === t.buttons && this.processEvent(t)) {
|
|
845
|
-
var e = { fake: true, clientX: t.clientX, clientY: t.clientY };
|
|
846
|
-
this.touches = [e], this.processStart();
|
|
847
|
-
}
|
|
848
|
-
}, onMouseMove: function(t) {
|
|
849
|
-
this.touches.length && this.processEvent(t) && this.processMove(t, [{ clientX: t.clientX, clientY: t.clientY }]);
|
|
850
|
-
}, onMouseUp: function() {
|
|
851
|
-
this.touches = [], this.processEnd();
|
|
852
|
-
}, onWheel: function(t) {
|
|
853
|
-
if (this.wheelResize && this.processEvent(t)) {
|
|
854
|
-
var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top, s = 1 + this.wheelResize.ratio * (r = t.deltaY || t.detail || t.wheelDelta, 0 === (a = +r) || $(a) ? a : a > 0 ? 1 : -1), o = { left: t.clientX - i, top: t.clientY - n };
|
|
855
|
-
this.$emit("resize", new B({}, { factor: s, center: o })), this.touches.length || this.debouncedProcessEnd();
|
|
856
|
-
}
|
|
857
|
-
var r, a;
|
|
858
|
-
} }, emits: ["resize", "move", "transform-end"] };
|
|
859
|
-
oe.render = function(n, s, o, r, a, h) {
|
|
860
|
-
return openBlock(), createBlock("div", { ref: "container", onTouchstart: s[1] || (s[1] = function() {
|
|
861
|
-
return h.onTouchStart && h.onTouchStart.apply(h, arguments);
|
|
862
|
-
}), onMousedown: s[2] || (s[2] = function() {
|
|
863
|
-
return h.onMouseDown && h.onMouseDown.apply(h, arguments);
|
|
864
|
-
}), onWheel: s[3] || (s[3] = function() {
|
|
865
|
-
return h.onWheel && h.onWheel.apply(h, arguments);
|
|
866
|
-
}) }, [renderSlot(n.$slots, "default")], 544);
|
|
867
|
-
};
|
|
868
|
-
var re = { components: { TransformableImage: oe }, props: { touchMove: { type: Boolean, required: true }, mouseMove: { type: Boolean, required: true }, touchResize: { type: Boolean, required: true }, wheelResize: { type: [Boolean, Object], required: true } }, emits: ["resize", "move"] };
|
|
869
|
-
re.render = function(s, r, a, h, c, l) {
|
|
870
|
-
var u = resolveComponent("transformable-image");
|
|
871
|
-
return openBlock(), createBlock(u, { "touch-move": a.touchMove, "touch-resize": a.touchResize, "mouse-move": a.mouseMove, "wheel-resize": a.wheelResize, onMove: r[1] || (r[1] = function(t) {
|
|
872
|
-
return s.$emit("move", t);
|
|
873
|
-
}), onResize: r[2] || (r[2] = function(t) {
|
|
874
|
-
return s.$emit("resize", t);
|
|
875
|
-
}) }, { default: withCtx(function() {
|
|
876
|
-
return [renderSlot(s.$slots, "default")];
|
|
877
|
-
}), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
|
|
878
|
-
};
|
|
879
|
-
var ae = M("vue-preview"), he = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
|
|
880
|
-
return {};
|
|
881
|
-
} }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
|
|
882
|
-
return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
|
|
883
|
-
}, computed: { classes: function() {
|
|
884
|
-
return { root: ae({ fill: this.fill }), wrapper: ae("wrapper"), imageWrapper: ae("image-wrapper"), image: A(ae("image"), this.imageClass) };
|
|
885
|
-
}, style: function() {
|
|
886
|
-
if (this.fill) return {};
|
|
887
|
-
var t = {};
|
|
888
|
-
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;
|
|
889
|
-
}, wrapperStyle: function() {
|
|
890
|
-
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)") };
|
|
891
|
-
return this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
|
|
892
|
-
}, imageStyle: function() {
|
|
893
|
-
if (this.coordinates && this.image) {
|
|
894
|
-
var t = this.coordinates.width / this.size.width, e = g(g({ rotate: 0, flip: { horizontal: false, vertical: false } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, n = this.imageSize.height, s = pt({ width: i, height: n }, e.rotate), o = { width: "".concat(i, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (i - s.width) * e.scaleX / 2, top: (n - s.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * n / 2 } };
|
|
895
|
-
return o.transform = "translate(\n ".concat(-this.coordinates.left / t - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / t - r.rotate.top - r.scale.top, "px) ") + te(e), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
|
|
896
|
-
}
|
|
897
|
-
return {};
|
|
898
|
-
}, size: function() {
|
|
899
|
-
return { width: this.width || this.calculatedSize.width, height: this.height || this.calculatedSize.height };
|
|
900
|
-
}, imageSize: function() {
|
|
901
|
-
return { width: this.image.width || this.calculatedImageSize.width, height: this.image.height || this.calculatedImageSize.height };
|
|
902
|
-
} }, watch: { image: function(t) {
|
|
903
|
-
(t.width || t.height) && this.onChangeImage();
|
|
904
|
-
} }, mounted: function() {
|
|
905
|
-
var t = this;
|
|
906
|
-
this.onChangeImage(), this.$refs.image.addEventListener("load", function() {
|
|
907
|
-
t.refreshImage();
|
|
908
|
-
}), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
909
|
-
}, unmounted: function() {
|
|
910
|
-
window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh);
|
|
911
|
-
}, methods: { refreshImage: function() {
|
|
912
|
-
var t = this.$refs.image;
|
|
913
|
-
this.calculatedImageSize.height = t.naturalHeight, this.calculatedImageSize.width = t.naturalWidth;
|
|
914
|
-
}, refresh: function() {
|
|
915
|
-
var t = this.$refs.root;
|
|
916
|
-
this.width || (this.calculatedSize.width = t.clientWidth), this.height || (this.calculatedSize.height = t.clientHeight);
|
|
917
|
-
}, onChangeImage: function() {
|
|
918
|
-
var t = this.$refs.image;
|
|
919
|
-
t && t.complete && this.refreshImage(), this.refresh();
|
|
920
|
-
} } };
|
|
921
|
-
he.render = function(i, n, o, r, a, h) {
|
|
922
|
-
return openBlock(), createBlock("div", { ref: "root", class: h.classes.root, style: h.style }, [createVNode("div", { ref: "wrapper", class: h.classes.wrapper, style: h.wrapperStyle }, [withDirectives(createVNode("img", { ref: "image", src: o.image && o.image.src, class: h.classes.image, style: h.imageStyle }, null, 14, ["src"]), [[vShow, o.image && o.image.src]])], 6)], 6);
|
|
923
|
-
};
|
|
924
|
-
var ce = { components: { Preview: he }, inheritAttrs: false };
|
|
925
|
-
ce.render = function(i, s, o, r, a, h) {
|
|
926
|
-
var c = resolveComponent("preview");
|
|
927
|
-
return openBlock(), createBlock(c, mergeProps(i.$attrs, { fill: true }), null, 16);
|
|
928
|
-
};
|
|
929
|
-
var le = M("vue-rectangle-stencil"), ue = { name: "RectangleStencil", components: { StencilPreview: ce, BoundingBox: _t, DraggableArea: Qt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
930
|
-
return kt;
|
|
931
|
-
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
932
|
-
return Nt;
|
|
933
|
-
} }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: true }, resizable: { type: Boolean, default: true }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
|
|
934
|
-
return {};
|
|
935
|
-
} }, linesWrappersClasses: { type: Object, default: function() {
|
|
936
|
-
return {};
|
|
937
|
-
} }, handlersClasses: { type: Object, default: function() {
|
|
938
|
-
return {};
|
|
939
|
-
} }, handlersWrappersClasses: { type: Object, default: function() {
|
|
940
|
-
return {};
|
|
941
|
-
} } }, data: function() {
|
|
942
|
-
return { moving: false, resizing: false };
|
|
943
|
-
}, computed: { classes: function() {
|
|
944
|
-
return { stencil: A(le({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: A(le("preview"), this.previewClass), boundingBox: A(le("bounding-box"), this.boundingBoxClass) };
|
|
945
|
-
}, style: function() {
|
|
946
|
-
var t = this.stencilCoordinates, e = t.height, i = t.width, n = t.left, s = t.top, o = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(n, "px, ").concat(s, "px)") };
|
|
947
|
-
return this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
|
|
948
|
-
} }, methods: { onMove: function(t) {
|
|
949
|
-
this.$emit("move", t), this.moving = true;
|
|
950
|
-
}, onMoveEnd: function() {
|
|
951
|
-
this.$emit("move-end"), this.moving = false;
|
|
952
|
-
}, onResize: function(t) {
|
|
953
|
-
this.$emit("resize", t), this.resizing = true;
|
|
954
|
-
}, onResizeEnd: function() {
|
|
955
|
-
this.$emit("resize-end"), this.resizing = false;
|
|
956
|
-
}, aspectRatios: function() {
|
|
957
|
-
return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
|
|
958
|
-
} }, emits: ["resize", "resize-end", "move", "move-end"] };
|
|
959
|
-
ue.render = function(i, r, a, h, c, l) {
|
|
960
|
-
var u = resolveComponent("stencil-preview"), d = resolveComponent("draggable-area"), m = resolveComponent("bounding-box");
|
|
961
|
-
return openBlock(), createBlock("div", { class: l.classes.stencil, style: l.style }, [createVNode(m, { width: a.stencilCoordinates.width, height: a.stencilCoordinates.height, transitions: a.transitions, class: l.classes.boundingBox, handlers: a.handlers, "handlers-component": a.handlersComponent, "handlers-classes": a.handlersClasses, "handlers-wrappers-classes": a.handlersWrappersClasses, lines: a.lines, "lines-component": a.linesComponent, "lines-classes": a.linesClasses, "lines-wrappers-classes": a.linesWrappersClasses, resizable: a.resizable, onResize: l.onResize, onResizeEnd: l.onResizeEnd }, { default: withCtx(function() {
|
|
962
|
-
return [createVNode(d, { movable: a.movable, onMove: l.onMove, onMoveEnd: l.onMoveEnd }, { default: withCtx(function() {
|
|
963
|
-
return [createVNode(u, { image: a.image, coordinates: a.coordinates, width: a.stencilCoordinates.width, height: a.stencilCoordinates.height, class: l.classes.preview, transitions: a.transitions }, null, 8, ["image", "coordinates", "width", "height", "class", "transitions"])];
|
|
964
|
-
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
965
|
-
}), _: 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);
|
|
966
|
-
};
|
|
967
|
-
var pe = ["transitions"], ge = M("vue-advanced-cropper"), fe = { name: "Cropper", components: { BackgroundWrapper: re }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
968
|
-
return ue;
|
|
969
|
-
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
970
|
-
return re;
|
|
971
|
-
} }, stencilProps: { type: Object, default: function() {
|
|
972
|
-
return {};
|
|
973
|
-
} }, autoZoom: { type: Boolean, default: false }, 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: true }, checkOrientation: { type: Boolean, default: true }, canvas: { type: [Object, Boolean], default: true }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(t) {
|
|
974
|
-
return -1 !== K.indexOf(t);
|
|
975
|
-
} }, roundResult: { type: Boolean, default: true }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {
|
|
976
|
-
return !("string" == typeof t && "fill" !== t && "fit" !== t);
|
|
977
|
-
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: true }, moveImage: { type: [Boolean, Object], default: true }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {
|
|
978
|
-
var e = t.event, i = t.coordinates, n = t.aspectRatio, s = t.positionRestrictions, o = t.sizeRestrictions, r = C(C({}, i), { right: i.left + i.width, bottom: i.top + i.height }), a = e.params || {}, h = C({}, e.directions), c = a.allowedDirections || { left: true, right: true, bottom: true, top: true };
|
|
979
|
-
o.widthFrozen && (h.left = 0, h.right = 0), o.heightFrozen && (h.top = 0, h.bottom = 0), V.forEach(function(t2) {
|
|
980
|
-
c[t2] || (h[t2] = 0);
|
|
981
|
-
});
|
|
982
|
-
var l = ot(r, h = It({ coordinates: r, directions: h, sizeRestrictions: o, positionRestrictions: s })).width, u = ot(r, h).height, d = a.preserveRatio ? ct(r) : dt(l / u, n);
|
|
983
|
-
if (d) {
|
|
984
|
-
var m = a.respectDirection;
|
|
985
|
-
if (m || (m = r.width >= r.height || 1 === d ? "width" : "height"), "width" === m) {
|
|
986
|
-
var p2 = l / d - r.height;
|
|
987
|
-
if (c.top && c.bottom) {
|
|
988
|
-
var g2 = h.top, f2 = h.bottom;
|
|
989
|
-
h.bottom = Bt(p2, f2, g2), h.top = Bt(p2, g2, f2);
|
|
990
|
-
} else c.bottom ? h.bottom = p2 : c.top ? h.top = p2 : c.right ? h.right = 0 : c.left && (h.left = 0);
|
|
991
|
-
} else if ("height" === m) {
|
|
992
|
-
var v2 = r.width - u * d;
|
|
993
|
-
if (c.left && c.right) {
|
|
994
|
-
var b2 = h.left, w2 = h.right;
|
|
995
|
-
h.left = -Bt(v2, b2, w2), h.right = -Bt(v2, w2, b2);
|
|
996
|
-
} else c.left ? h.left = -v2 : c.right ? h.right = -v2 : c.top ? h.top = 0 : c.bottom && (h.bottom = 0);
|
|
997
|
-
}
|
|
998
|
-
h = It({ directions: h, coordinates: r, sizeRestrictions: o, positionRestrictions: s, preserveRatio: true, compensate: a.compensate });
|
|
999
|
-
}
|
|
1000
|
-
return l = ot(r, h).width, u = ot(r, h).height, (d = a.preserveRatio ? ct(r) : dt(l / u, n)) && Math.abs(d - l / u) > 1e-3 && V.forEach(function(t2) {
|
|
1001
|
-
c[t2] || (h[t2] = 0);
|
|
1002
|
-
}), St({ event: new Y({ left: -h.left, top: -h.top }), coordinates: { width: i.width + h.right + h.left, height: i.height + h.top + h.bottom, left: i.left, top: i.top }, positionRestrictions: s });
|
|
1003
|
-
} }, moveAlgorithm: { type: Function, default: St }, initStretcher: { type: Function, default: function(t) {
|
|
1004
|
-
var e = t.stretcher, i = t.imageSize, n = ct(i);
|
|
1005
|
-
e.style.width = i.width + "px", e.style.height = e.clientWidth / n + "px", e.style.width = e.clientWidth + "px";
|
|
1006
|
-
} }, fitCoordinates: { type: Function, default: function(t) {
|
|
1007
|
-
var e = t.visibleArea, i = t.coordinates, n = t.aspectRatio, s = t.sizeRestrictions, o = t.positionRestrictions, r = C(C({}, i), Mt({ width: i.width, height: i.height, aspectRatio: n, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, s.minHeight), minWidth: Math.min(e.width, s.minWidth) } }));
|
|
1008
|
-
return r = vt(r = at(r, it(nt(i), nt(r))), zt(et(e), o));
|
|
1009
|
-
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
1010
|
-
var e = t.visibleArea, i = t.boundaries, n = t.getAreaRestrictions, s = t.coordinates, o = C({}, e);
|
|
1011
|
-
o.height = o.width / ct(i), o.top += (e.height - o.height) / 2, (s.height - o.height > 0 || s.width - o.width > 0) && (o = ht(o, Math.max(s.height / o.height, s.width / o.width)));
|
|
1012
|
-
var r = rt(ut(s, et(o = ht(o, ft(o, n({ visibleArea: o, type: "resize" }))))));
|
|
1013
|
-
return o.width < s.width && (r.left = 0), o.height < s.height && (r.top = 0), o = vt(o = at(o, r), n({ visibleArea: o, type: "move" }));
|
|
1014
|
-
} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1015
|
-
var e = t.visibleArea, i = t.boundaries, n = t.imageSize, s = t.imageRestriction, o = t.type, r = {};
|
|
1016
|
-
return "fill-area" === s ? r = { left: 0, top: 0, right: n.width, bottom: n.height } : "fit-area" === s && (ct(i) > ct(n) ? (r = { top: 0, bottom: n.height }, e && "move" === o && (e.width > n.width ? (r.left = -(e.width - n.width) / 2, r.right = n.width - r.left) : (r.left = 0, r.right = n.width))) : (r = { left: 0, right: n.width }, e && "move" === o && (e.height > n.height ? (r.top = -(e.height - n.height) / 2, r.bottom = n.height - r.top) : (r.top = 0, r.bottom = n.height)))), r;
|
|
1017
|
-
} }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1018
|
-
return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };
|
|
1019
|
-
} }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {
|
|
1020
|
-
var e = t.imageSize, i = {};
|
|
1021
|
-
return "none" !== t.imageRestriction && (i = { left: 0, top: 0, right: e.width, bottom: e.height }), i;
|
|
1022
|
-
} } }, data: function() {
|
|
1023
|
-
return { transitionsActive: false, imageLoaded: false, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: false, vertical: false } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: false, vertical: false } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: g({}, J) };
|
|
1024
|
-
}, computed: { image: function() {
|
|
1025
|
-
return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
|
|
1026
|
-
}, imageTransforms: function() {
|
|
1027
|
-
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 };
|
|
1028
|
-
}, imageSize: function() {
|
|
1029
|
-
var t = function(t2) {
|
|
1030
|
-
return t2 * Math.PI / 180;
|
|
1031
|
-
}(this.imageTransforms.rotate);
|
|
1032
|
-
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)) };
|
|
1033
|
-
}, initialized: function() {
|
|
1034
|
-
return Boolean(this.visibleArea && this.imageLoaded);
|
|
1035
|
-
}, settings: function() {
|
|
1036
|
-
var t = j(this.resizeImage, { touch: true, wheel: { ratio: 0.1 }, adjustStencil: true }, { touch: false, wheel: false, adjustStencil: false });
|
|
1037
|
-
return { moveImage: j(this.moveImage, { touch: true, mouse: true }, { touch: false, mouse: false }), resizeImage: t };
|
|
1038
|
-
}, coefficient: function() {
|
|
1039
|
-
return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
|
|
1040
|
-
}, areaRestrictions: function() {
|
|
1041
|
-
return this.imageLoaded ? this.areaRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction, boundaries: this.boundaries }) : {};
|
|
1042
|
-
}, transitionsOptions: function() {
|
|
1043
|
-
return { enabled: this.transitionsActive, timingFunction: "ease-in-out", time: 350 };
|
|
1044
|
-
}, sizeRestrictions: function() {
|
|
1045
|
-
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
1046
|
-
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: D(this.minWidth) ? 0 : L(this.minWidth), minHeight: D(this.minHeight) ? 0 : L(this.minHeight), maxWidth: D(this.maxWidth) ? 1 / 0 : L(this.maxWidth), maxHeight: D(this.maxHeight) ? 1 / 0 : L(this.maxHeight) });
|
|
1047
|
-
if (t = function(t2) {
|
|
1048
|
-
var e2 = t2.areaRestrictions, i2 = t2.sizeRestrictions;
|
|
1049
|
-
var n = t2.boundaries, s = t2.positionRestrictions;
|
|
1050
|
-
var o = C(C({}, i2), { minWidth: void 0 !== i2.minWidth ? i2.minWidth : 0, minHeight: void 0 !== i2.minHeight ? i2.minHeight : 0, maxWidth: void 0 !== i2.maxWidth ? i2.maxWidth : 1 / 0, maxHeight: void 0 !== i2.maxHeight ? i2.maxHeight : 1 / 0 });
|
|
1051
|
-
void 0 !== s.left && void 0 !== s.right && (o.maxWidth = Math.min(o.maxWidth, s.right - s.left)), void 0 !== s.bottom && void 0 !== s.top && (o.maxHeight = Math.min(o.maxHeight, s.bottom - s.top));
|
|
1052
|
-
var r = bt(e2), a = mt(n, r);
|
|
1053
|
-
return r.width < 1 / 0 && (!o.maxWidth || o.maxWidth > a.width) && (o.maxWidth = Math.min(o.maxWidth, a.width)), r.height < 1 / 0 && (!o.maxHeight || o.maxHeight > a.height) && (o.maxHeight = Math.min(o.maxHeight, a.height)), o.minWidth > o.maxWidth && (o.minWidth = o.maxWidth, o.widthFrozen = true), o.minHeight > o.maxHeight && (o.minHeight = o.maxHeight, o.heightFrozen = true), o;
|
|
1054
|
-
}({ 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) {
|
|
1055
|
-
var e = this.getStencilSize(), i = bt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
|
|
1056
|
-
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);
|
|
1057
|
-
}
|
|
1058
|
-
return t;
|
|
1059
|
-
}
|
|
1060
|
-
return { minWidth: 0, minHeight: 0, maxWidth: 0, maxHeight: 0 };
|
|
1061
|
-
}, positionRestrictions: function() {
|
|
1062
|
-
return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });
|
|
1063
|
-
}, classes: function() {
|
|
1064
|
-
return { cropper: ge(), image: A(ge("image"), this.imageClass), stencil: ge("stencil"), boundaries: A(ge("boundaries"), this.boundariesClass), stretcher: A(ge("stretcher")), background: A(ge("background"), this.backgroundClass), foreground: A(ge("foreground"), this.foregroundClass), imageWrapper: A(ge("image-wrapper")), cropperWrapper: A(ge("cropper-wrapper")) };
|
|
1065
|
-
}, stencilCoordinates: function() {
|
|
1066
|
-
if (this.initialized) {
|
|
1067
|
-
var t = this.coordinates, e = t.width, i = t.height, n = t.left, s = t.top;
|
|
1068
|
-
return { width: e / this.coefficient, height: i / this.coefficient, left: (n - this.visibleArea.left) / this.coefficient, top: (s - this.visibleArea.top) / this.coefficient };
|
|
1069
|
-
}
|
|
1070
|
-
return this.defaultCoordinates();
|
|
1071
|
-
}, boundariesStyle: function() {
|
|
1072
|
-
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" };
|
|
1073
|
-
return this.imageLoaded || (t.opacity = "0"), t;
|
|
1074
|
-
}, imageStyle: function() {
|
|
1075
|
-
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 }, n = g(g({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), s = { 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)") + te(n) };
|
|
1076
|
-
return this.transitionsOptions.enabled && (s.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), s;
|
|
1077
|
-
} }, watch: { src: function() {
|
|
1078
|
-
this.onChangeImage();
|
|
1079
|
-
}, stencilComponent: function() {
|
|
1080
|
-
var t = this;
|
|
1081
|
-
this.$nextTick(function() {
|
|
1082
|
-
t.resetCoordinates(), t.runAutoZoom("setCoordinates"), t.onChange();
|
|
1083
|
-
});
|
|
1084
|
-
}, minWidth: function() {
|
|
1085
|
-
this.onPropsChange();
|
|
1086
|
-
}, maxWidth: function() {
|
|
1087
|
-
this.onPropsChange();
|
|
1088
|
-
}, minHeight: function() {
|
|
1089
|
-
this.onPropsChange();
|
|
1090
|
-
}, maxHeight: function() {
|
|
1091
|
-
this.onPropsChange();
|
|
1092
|
-
}, imageRestriction: function() {
|
|
1093
|
-
this.reset();
|
|
1094
|
-
}, stencilProps: function(t, e) {
|
|
1095
|
-
["aspectRatio", "minAspectRatio", "maxAspectRatio"].find(function(i) {
|
|
1096
|
-
return t[i] !== e[i];
|
|
1097
|
-
}) && this.$nextTick(this.onPropsChange);
|
|
1098
|
-
} }, created: function() {
|
|
1099
|
-
this.debouncedUpdate = x(this.update, this.debounce), this.debouncedDisableTransitions = x(this.disableTransitions, this.transitionsOptions.time), this.awaiting = false;
|
|
1100
|
-
}, mounted: function() {
|
|
1101
|
-
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);
|
|
1102
|
-
}, unmounted: function() {
|
|
1103
|
-
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();
|
|
1104
|
-
}, methods: { getResult: function() {
|
|
1105
|
-
var t = this.initialized ? this.prepareResult(g({}, this.coordinates)) : this.defaultCoordinates(), e = { rotate: this.imageTransforms.rotate % 360, flip: g({}, this.imageTransforms.flip) };
|
|
1106
|
-
if (this.src && this.imageLoaded) {
|
|
1107
|
-
var i = this;
|
|
1108
|
-
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? g({}, this.visibleArea) : null, imageTransforms: e, get canvas() {
|
|
1109
|
-
return i.canvas ? i.getCanvas() : void 0;
|
|
1110
|
-
} };
|
|
1111
|
-
}
|
|
1112
|
-
return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? g({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };
|
|
1113
|
-
}, zoom: function(t, e) {
|
|
1114
|
-
var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = i.transitions, s = void 0 === n || n;
|
|
1115
|
-
this.onManipulateImage(new B({}, { factor: 1 / t, center: e }), { normalize: false, transitions: s });
|
|
1116
|
-
}, move: function(t, e) {
|
|
1117
|
-
var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = i.transitions, s = void 0 === n || n;
|
|
1118
|
-
this.onManipulateImage(new B({ left: t || 0, top: e || 0 }), { normalize: false, transitions: s });
|
|
1119
|
-
}, setCoordinates: function(t) {
|
|
1120
|
-
var e = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = i.autoZoom, s = void 0 === n || n, o = i.transitions, r = void 0 === o || o;
|
|
1121
|
-
this.$nextTick(function() {
|
|
1122
|
-
e.imageLoaded ? (e.transitionsActive || (r && e.enableTransitions(), e.coordinates = e.applyTransform(t), s && e.runAutoZoom("setCoordinates"), r && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;
|
|
1123
|
-
});
|
|
1124
|
-
}, refresh: function() {
|
|
1125
|
-
var t = this, e = this.$refs.image;
|
|
1126
|
-
if (this.src && e) return this.initialized ? this.updateVisibleArea().then(function() {
|
|
1127
|
-
t.onChange();
|
|
1128
|
-
}) : this.resetVisibleArea().then(function() {
|
|
1129
|
-
t.onChange();
|
|
1130
|
-
});
|
|
1131
|
-
}, reset: function() {
|
|
1132
|
-
var t = this;
|
|
1133
|
-
return this.resetVisibleArea().then(function() {
|
|
1134
|
-
t.onChange(false);
|
|
1135
|
-
});
|
|
1136
|
-
}, awaitRender: function(t) {
|
|
1137
|
-
var e = this;
|
|
1138
|
-
this.awaiting || (this.awaiting = true, this.$nextTick(function() {
|
|
1139
|
-
t(), e.awaiting = false;
|
|
1140
|
-
}));
|
|
1141
|
-
}, prepareResult: function(t) {
|
|
1142
|
-
return this.roundResult ? function(t2) {
|
|
1143
|
-
var e = t2.coordinates, i = t2.sizeRestrictions, n = t2.positionRestrictions, s = { width: Math.round(e.width), height: Math.round(e.height), left: Math.round(e.left), top: Math.round(e.top) };
|
|
1144
|
-
return s.width > i.maxWidth ? s.width = Math.floor(e.width) : s.width < i.minWidth && (s.width = Math.ceil(e.width)), s.height > i.maxHeight ? s.height = Math.floor(e.height) : s.height < i.minHeight && (s.height = Math.ceil(e.height)), vt(s, n);
|
|
1145
|
-
}(g(g({}, this.getPublicProperties()), {}, { positionRestrictions: jt(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;
|
|
1146
|
-
}, processAutoZoom: function(t, e, i, n) {
|
|
1147
|
-
var s = this.autoZoomAlgorithm;
|
|
1148
|
-
s || (s = this.stencilSize ? Ct : this.autoZoom ? Et : Wt);
|
|
1149
|
-
var o = s({ event: { type: t, params: n }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
1150
|
-
return g(g({}, o), {}, { changed: !tt(o.visibleArea, e) || !tt(o.coordinates, i) });
|
|
1151
|
-
}, runAutoZoom: function(t) {
|
|
1152
|
-
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = e.transitions, n = void 0 !== i && i, s = v(e, pe), o = this.processAutoZoom(t, this.visibleArea, this.coordinates, s), r = o.visibleArea, a = o.coordinates, h = o.changed;
|
|
1153
|
-
n && h && this.enableTransitions(), this.visibleArea = r, this.coordinates = a, n && h && this.debouncedDisableTransitions();
|
|
1154
|
-
}, normalizeEvent: function(t) {
|
|
1155
|
-
return function(t2) {
|
|
1156
|
-
var e = t2.event, i = t2.visibleArea, n = t2.coefficient;
|
|
1157
|
-
if ("manipulateImage" === e.type) return C(C({}, e), { move: { left: e.move && e.move.left ? n * e.move.left : 0, top: e.move && e.move.top ? n * e.move.top : 0 }, scale: { factor: e.scale && e.scale.factor ? e.scale.factor : 1, center: e.scale && e.scale.center ? { left: e.scale.center.left * n + i.left, top: e.scale.center.top * n + i.top } : null } });
|
|
1158
|
-
if ("resize" === e.type) {
|
|
1159
|
-
var s = C(C({}, e), { directions: C({}, e.directions) });
|
|
1160
|
-
return V.forEach(function(t3) {
|
|
1161
|
-
s.directions[t3] *= n;
|
|
1162
|
-
}), s;
|
|
1163
|
-
}
|
|
1164
|
-
if ("move" === e.type) {
|
|
1165
|
-
var o = C(C({}, e), { directions: C({}, e.directions) });
|
|
1166
|
-
return Q.forEach(function(t3) {
|
|
1167
|
-
o.directions[t3] *= n;
|
|
1168
|
-
}), o;
|
|
1169
|
-
}
|
|
1170
|
-
return e;
|
|
1171
|
-
}(g(g({}, this.getPublicProperties()), {}, { event: t }));
|
|
1172
|
-
}, getCanvas: function() {
|
|
1173
|
-
if (this.$refs.canvas) {
|
|
1174
|
-
var t = this.$refs.canvas, e = this.$refs.image, i = 0 !== this.imageTransforms.rotate || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(t2, e2, i2) {
|
|
1175
|
-
var n2 = i2.rotate, s2 = i2.flip, o2 = { width: e2.naturalWidth, height: e2.naturalHeight }, r2 = pt(o2, n2), a = t2.getContext("2d");
|
|
1176
|
-
t2.height = r2.height, t2.width = r2.width, a.save();
|
|
1177
|
-
var h = gt(nt(C({ left: 0, top: 0 }, o2)), n2);
|
|
1178
|
-
return a.translate(-(h.left - r2.width / 2), -(h.top - r2.height / 2)), a.rotate(n2 * Math.PI / 180), a.translate(s2.horizontal ? o2.width : 0, s2.vertical ? o2.height : 0), a.scale(s2.horizontal ? -1 : 1, s2.vertical ? -1 : 1), a.drawImage(e2, 0, 0, o2.width, o2.height), a.restore(), t2;
|
|
1179
|
-
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, n = g({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: true, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), s = function(t2) {
|
|
1180
|
-
return t2.find(function(t3) {
|
|
1181
|
-
return e2 = t3, !Number.isNaN(parseFloat(e2)) && isFinite(e2);
|
|
1182
|
-
var e2;
|
|
1183
|
-
});
|
|
1184
|
-
}, o = Mt({ sizeRestrictions: { minWidth: s([n.width, n.minWidth]) || 0, minHeight: s([n.height, n.minHeight]) || 0, maxWidth: s([n.width, n.maxWidth]) || 1 / 0, maxHeight: s([n.height, n.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 } });
|
|
1185
|
-
if (n.maxArea && o.width * o.height > n.maxArea) {
|
|
1186
|
-
var r = Math.sqrt(n.maxArea / (o.width * o.height));
|
|
1187
|
-
o = { width: Math.round(r * o.width), height: Math.round(r * o.height) };
|
|
1188
|
-
}
|
|
1189
|
-
return function(t2, e2, i2, n2, s2) {
|
|
1190
|
-
t2.width = n2 ? n2.width : i2.width, t2.height = n2 ? n2.height : i2.height;
|
|
1191
|
-
var o2 = t2.getContext("2d");
|
|
1192
|
-
o2.clearRect(0, 0, t2.width, t2.height), s2 && (s2.imageSmoothingEnabled && (o2.imageSmoothingEnabled = s2.imageSmoothingEnabled), s2.imageSmoothingQuality && (o2.imageSmoothingQuality = s2.imageSmoothingQuality), s2.fillColor && (o2.fillStyle = s2.fillColor, o2.fillRect(0, 0, t2.width, t2.height), o2.save()));
|
|
1193
|
-
var r2 = i2.left < 0 ? -i2.left : 0, a = i2.top < 0 ? -i2.top : 0;
|
|
1194
|
-
o2.drawImage(e2, i2.left + r2, i2.top + a, i2.width, i2.height, r2 * (t2.width / i2.width), a * (t2.height / i2.height), t2.width, t2.height);
|
|
1195
|
-
}(t, i, this.coordinates, o, n), t;
|
|
1196
|
-
}
|
|
1197
|
-
}, update: function() {
|
|
1198
|
-
this.$emit("change", this.getResult());
|
|
1199
|
-
}, applyTransform: function(t) {
|
|
1200
|
-
var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], i = this.visibleArea && e ? wt(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, n = this.visibleArea && e ? jt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
|
|
1201
|
-
return xt({ transform: t, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: i, positionRestrictions: n, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
|
|
1202
|
-
}, resetCoordinates: function() {
|
|
1203
|
-
var t = this;
|
|
1204
|
-
if (this.$refs.image) {
|
|
1205
|
-
this.$refs.cropper, this.$refs.image;
|
|
1206
|
-
var e = this.defaultSize;
|
|
1207
|
-
e || (e = this.stencilSize ? Dt : Ot);
|
|
1208
|
-
var i = this.sizeRestrictions;
|
|
1209
|
-
i.minWidth, i.minHeight, i.maxWidth, i.maxHeight;
|
|
1210
|
-
var n = O(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, s = this.defaultPosition || Tt, o = [n, function(e2) {
|
|
1211
|
-
var i2 = e2.coordinates;
|
|
1212
|
-
return g({}, O(s) ? s({ coordinates: i2, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
|
|
1213
|
-
}];
|
|
1214
|
-
this.delayedTransforms && o.push.apply(o, b(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(o, true), this.delayedTransforms = null;
|
|
1215
|
-
}
|
|
1216
|
-
}, clearImage: function() {
|
|
1217
|
-
var t = this;
|
|
1218
|
-
this.imageLoaded = false, setTimeout(function() {
|
|
1219
|
-
var e = t.$refs.stretcher;
|
|
1220
|
-
e && (e.style.height = "auto", e.style.width = "auto"), t.coordinates = t.defaultCoordinates(), t.boundaries = { width: 0, height: 0 };
|
|
1221
|
-
}, this.transitionTime);
|
|
1222
|
-
}, enableTransitions: function() {
|
|
1223
|
-
this.transitions && (this.transitionsActive = true);
|
|
1224
|
-
}, disableTransitions: function() {
|
|
1225
|
-
this.transitionsActive = false;
|
|
1226
|
-
}, updateBoundaries: function() {
|
|
1227
|
-
var t = this, e = this.$refs.stretcher, i = this.$refs.cropper;
|
|
1228
|
-
return this.initStretcher({ cropper: i, stretcher: e, imageSize: this.imageSize }), this.$nextTick().then(function() {
|
|
1229
|
-
var e2 = { cropper: i, imageSize: t.imageSize };
|
|
1230
|
-
if (O(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(e2) : "fit" === t.defaultBoundaries ? t.boundaries = function(t2) {
|
|
1231
|
-
var e3 = t2.cropper, i2 = t2.imageSize, n = e3.clientHeight, s = e3.clientWidth, o = n, r = i2.width * n / i2.height;
|
|
1232
|
-
return r > s && (r = s, o = i2.height * s / i2.width), { width: r, height: o };
|
|
1233
|
-
}(e2) : t.boundaries = function(t2) {
|
|
1234
|
-
var e3 = t2.cropper;
|
|
1235
|
-
return { width: e3.clientWidth, height: e3.clientHeight };
|
|
1236
|
-
}(e2), !t.boundaries.width || !t.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
|
|
1237
|
-
});
|
|
1238
|
-
}, resetVisibleArea: function() {
|
|
1239
|
-
var t = this;
|
|
1240
|
-
return this.appliedImageTransforms = g(g({}, this.defaultImageTransforms), {}, { flip: g({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
1241
|
-
"visible-area" !== t.priority && (t.visibleArea = null, t.resetCoordinates());
|
|
1242
|
-
var e, i, n, s, o, r, a = t.defaultVisibleArea || Ht;
|
|
1243
|
-
t.visibleArea = O(a) ? a({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: "visible-area" !== t.priority ? 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, n = e.boundaries, s = e.getAreaRestrictions, o = C({}, i), r = ct(n), o.width / o.height !== r && (o.height = o.width / r), vt(o, s({ visibleArea: o, type: "move" }))), "visible-area" === t.priority ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("resetVisibleArea");
|
|
1244
|
-
}).catch(function() {
|
|
1245
|
-
t.visibleArea = null;
|
|
1246
|
-
});
|
|
1247
|
-
}, updateVisibleArea: function() {
|
|
1248
|
-
var t = this;
|
|
1249
|
-
return this.updateBoundaries().then(function() {
|
|
1250
|
-
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");
|
|
1251
|
-
}).catch(function() {
|
|
1252
|
-
t.visibleArea = null;
|
|
1253
|
-
});
|
|
1254
|
-
}, onChange: function() {
|
|
1255
|
-
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
|
|
1256
|
-
t && this.debounce ? this.debouncedUpdate() : this.update();
|
|
1257
|
-
}, onChangeImage: function() {
|
|
1258
|
-
var t, e = this;
|
|
1259
|
-
if (this.imageLoaded = false, this.delayedTransforms = null, this.src) {
|
|
1260
|
-
if (function(t2) {
|
|
1261
|
-
if (T(t2)) return false;
|
|
1262
|
-
var e2 = window.location, i2 = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(t2) || [], n2 = { protocol: i2[1] || "", host: i2[2] || "", port: i2[3] || "" }, s = function(t3) {
|
|
1263
|
-
return t3.port || ("http" === (t3.protocol || e2.protocol) ? 80 : 433);
|
|
1264
|
-
};
|
|
1265
|
-
return !(!n2.protocol && !n2.host && !n2.port || Boolean(n2.protocol && n2.protocol == e2.protocol && n2.host && n2.host == e2.host && n2.host && s(n2) == s(e2)));
|
|
1266
|
-
}(this.src)) {
|
|
1267
|
-
var i = D(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
1268
|
-
true === i && (i = "anonymous"), this.imageAttributes.crossOrigin = i || null;
|
|
1269
|
-
}
|
|
1270
|
-
if (this.checkOrientation) {
|
|
1271
|
-
var n = (t = this.src, new Promise(function(e2) {
|
|
1272
|
-
Jt(t).then(function(i2) {
|
|
1273
|
-
var n2 = ee(i2);
|
|
1274
|
-
e2(i2 ? { source: t, arrayBuffer: i2, orientation: n2 } : { source: t, arrayBuffer: null, orientation: null });
|
|
1275
|
-
}).catch(function(i2) {
|
|
1276
|
-
void 0, e2({ source: t, arrayBuffer: null, orientation: null });
|
|
1277
|
-
});
|
|
1278
|
-
}));
|
|
1279
|
-
setTimeout(function() {
|
|
1280
|
-
n.then(e.onParseImage);
|
|
1281
|
-
}, this.transitionTime);
|
|
1282
|
-
} else setTimeout(function() {
|
|
1283
|
-
e.onParseImage({ source: e.src });
|
|
1284
|
-
}, this.transitionTime);
|
|
1285
|
-
} else this.clearImage();
|
|
1286
|
-
}, onFailLoadImage: function() {
|
|
1287
|
-
this.imageAttributes.src && (this.clearImage(), this.$emit("error"));
|
|
1288
|
-
}, onSuccessLoadImage: function() {
|
|
1289
|
-
var t = this, e = this.$refs.image;
|
|
1290
|
-
e && !this.imageLoaded && (this.imageAttributes.height = e.naturalHeight, this.imageAttributes.width = e.naturalWidth, this.imageLoaded = true, this.resetVisibleArea().then(function() {
|
|
1291
|
-
t.$emit("ready"), t.onChange(false);
|
|
1292
|
-
}));
|
|
1293
|
-
}, onParseImage: function(t) {
|
|
1294
|
-
var e = this, i = t.source, n = t.arrayBuffer, s = t.orientation;
|
|
1295
|
-
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = false, n && s && s > 1 ? W(i) || !T(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([n])), this.imageAttributes.revoke = true) : this.imageAttributes.src = function(t2) {
|
|
1296
|
-
for (var e2 = [], i2 = new Uint8Array(t2); i2.length > 0; ) {
|
|
1297
|
-
var n2 = i2.subarray(0, 8192);
|
|
1298
|
-
e2.push(String.fromCharCode.apply(null, Array.from ? Array.from(n2) : n2.slice())), i2 = i2.subarray(8192);
|
|
1299
|
-
}
|
|
1300
|
-
return "data:image/jpeg;base64," + btoa(e2.join(""));
|
|
1301
|
-
}(n) : this.imageAttributes.src = i, O(this.defaultTransforms) ? this.appliedImageTransforms = Kt(this.defaultTransforms()) : H(this.defaultTransforms) ? this.appliedImageTransforms = Kt(this.defaultTransforms) : this.appliedImageTransforms = function(t2) {
|
|
1302
|
-
var e2 = Kt({});
|
|
1303
|
-
if (t2) switch (t2) {
|
|
1304
|
-
case 2:
|
|
1305
|
-
e2.flip.horizontal = true;
|
|
1306
|
-
break;
|
|
1307
|
-
case 3:
|
|
1308
|
-
e2.rotate = -180;
|
|
1309
|
-
break;
|
|
1310
|
-
case 4:
|
|
1311
|
-
e2.flip.vertical = true;
|
|
1312
|
-
break;
|
|
1313
|
-
case 5:
|
|
1314
|
-
e2.rotate = 90, e2.flip.vertical = true;
|
|
1315
|
-
break;
|
|
1316
|
-
case 6:
|
|
1317
|
-
e2.rotate = 90;
|
|
1318
|
-
break;
|
|
1319
|
-
case 7:
|
|
1320
|
-
e2.rotate = 90, e2.flip.horizontal = true;
|
|
1321
|
-
break;
|
|
1322
|
-
case 8:
|
|
1323
|
-
e2.rotate = -90;
|
|
1324
|
-
}
|
|
1325
|
-
return e2;
|
|
1326
|
-
}(s), this.defaultImageTransforms = g(g({}, this.appliedImageTransforms), {}, { flip: g({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
|
|
1327
|
-
var t2 = e.$refs.image;
|
|
1328
|
-
t2 && t2.complete && (!function(t3) {
|
|
1329
|
-
return Boolean(t3.naturalWidth);
|
|
1330
|
-
}(t2) ? e.onFailLoadImage() : e.onSuccessLoadImage());
|
|
1331
|
-
});
|
|
1332
|
-
}, onResizeEnd: function() {
|
|
1333
|
-
this.runAutoZoom("resize", { transitions: true });
|
|
1334
|
-
}, onMoveEnd: function() {
|
|
1335
|
-
this.runAutoZoom("move", { transitions: true });
|
|
1336
|
-
}, onMove: function(t) {
|
|
1337
|
-
var e = this;
|
|
1338
|
-
this.transitionsOptions.enabled || this.awaitRender(function() {
|
|
1339
|
-
e.coordinates = e.moveAlgorithm(g(g({}, e.getPublicProperties()), {}, { positionRestrictions: jt(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();
|
|
1340
|
-
});
|
|
1341
|
-
}, onResize: function(t) {
|
|
1342
|
-
var e = this;
|
|
1343
|
-
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
|
|
1344
|
-
var i = e.sizeRestrictions, n = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);
|
|
1345
|
-
e.coordinates = e.resizeAlgorithm(g(g({}, e.getPublicProperties()), {}, { positionRestrictions: jt(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, n), minHeight: Math.max(i.minHeight, n) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = false;
|
|
1346
|
-
});
|
|
1347
|
-
}, onManipulateImage: function(t) {
|
|
1348
|
-
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
1349
|
-
if (!this.transitionsOptions.enabled) {
|
|
1350
|
-
var i = e.transitions, n = void 0 !== i && i, s = e.normalize, o = void 0 === s || s;
|
|
1351
|
-
n && this.enableTransitions();
|
|
1352
|
-
var r = Lt(g(g({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), a = r.visibleArea, h = r.coordinates;
|
|
1353
|
-
this.visibleArea = a, this.coordinates = h, this.runAutoZoom("manipulateImage"), this.onChange(), n && this.debouncedDisableTransitions();
|
|
1354
|
-
}
|
|
1355
|
-
}, onPropsChange: function() {
|
|
1356
|
-
this.coordinates = this.applyTransform(this.coordinates, true), this.onChange(false);
|
|
1357
|
-
}, getAreaRestrictions: function() {
|
|
1358
|
-
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.visibleArea, i = t.type, n = void 0 === i ? "move" : i;
|
|
1359
|
-
return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: e, type: n });
|
|
1360
|
-
}, getAspectRatio: function(t) {
|
|
1361
|
-
var e, i, n = this.stencilProps, s = n.aspectRatio, o = n.minAspectRatio, r = n.maxAspectRatio;
|
|
1362
|
-
if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {
|
|
1363
|
-
var a = this.$refs.stencil.aspectRatios();
|
|
1364
|
-
e = a.minimum, i = a.maximum;
|
|
1365
|
-
}
|
|
1366
|
-
if (D(e) && (e = D(s) ? o : s), D(i) && (i = D(s) ? r : s), !t && (D(e) || D(i))) {
|
|
1367
|
-
var h = this.getStencilSize(), c = h ? ct(h) : null;
|
|
1368
|
-
D(e) && (e = P(c) ? c : void 0), D(i) && (i = P(c) ? c : void 0);
|
|
1369
|
-
}
|
|
1370
|
-
return { minimum: e, maximum: i };
|
|
1371
|
-
}, getStencilSize: function() {
|
|
1372
|
-
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(true) }, e = t.boundaries, i = t.stencilSize, n = t.aspectRatio, dt(ct(s = O(i) ? i({ boundaries: e, aspectRatio: n }) : i), n) && (s = Mt({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (s.width > e.width || s.height > e.height) && (s = Mt({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: ct(s), maximum: ct(s) } })), s;
|
|
1373
|
-
var t, e, i, n, s;
|
|
1374
|
-
}, getPublicProperties: function() {
|
|
1375
|
-
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 };
|
|
1376
|
-
}, defaultCoordinates: function() {
|
|
1377
|
-
return g({}, J);
|
|
1378
|
-
}, flip: function(t, e) {
|
|
1379
|
-
var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, n = i.transitions, s = void 0 === n || n;
|
|
1380
|
-
if (!this.transitionsActive) {
|
|
1381
|
-
s && this.enableTransitions();
|
|
1382
|
-
var o = g({}, this.imageTransforms.flip), r = $t({ flip: { horizontal: t ? !o.horizontal : o.horizontal, vertical: e ? !o.vertical : o.vertical }, previousFlip: o, 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() }), a = r.visibleArea, h = r.coordinates;
|
|
1383
|
-
t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = a, this.coordinates = h, this.onChange(), s && this.debouncedDisableTransitions();
|
|
1384
|
-
}
|
|
1385
|
-
}, rotate: function(t) {
|
|
1386
|
-
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = e.transitions, n = void 0 === i || i;
|
|
1387
|
-
if (!this.transitionsActive) {
|
|
1388
|
-
n && this.enableTransitions();
|
|
1389
|
-
var s = g({}, this.imageSize);
|
|
1390
|
-
this.appliedImageTransforms.rotate += t;
|
|
1391
|
-
var o = Pt({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: s, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), r = o.visibleArea, a = o.coordinates, h = this.processAutoZoom("rotateImage", r, a);
|
|
1392
|
-
r = h.visibleArea, a = h.coordinates, this.visibleArea = r, this.coordinates = a, this.onChange(), n && this.debouncedDisableTransitions();
|
|
1393
|
-
}
|
|
1394
|
-
} }, emits: ["change", "error", "ready"] }, ve = { key: 0, ref: "canvas", style: { display: "none" } }, be = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
1395
|
-
fe.render = function(i, n, r, a, p2, g2) {
|
|
1396
|
-
return openBlock(), createBlock("div", { ref: "cropper", class: g2.classes.cropper }, [createVNode("div", { ref: "stretcher", class: g2.classes.stretcher }, null, 2), createVNode("div", { class: g2.classes.boundaries, style: g2.boundariesStyle }, [(openBlock(), createBlock(resolveDynamicComponent(r.backgroundWrapperComponent), { class: g2.classes.cropperWrapper, "wheel-resize": g2.settings.resizeImage.wheel, "touch-resize": g2.settings.resizeImage.touch, "touch-move": g2.settings.moveImage.touch, "mouse-move": g2.settings.moveImage.mouse, onMove: g2.onManipulateImage, onResize: g2.onManipulateImage }, { default: withCtx(function() {
|
|
1397
|
-
return [createVNode("div", { class: g2.classes.background, style: g2.boundariesStyle }, null, 6), createVNode("div", { class: g2.classes.imageWrapper }, [createVNode("img", { ref: "image", crossorigin: p2.imageAttributes.crossOrigin, src: p2.imageAttributes.src, class: g2.classes.image, style: g2.imageStyle, onMousedown: n[1] || (n[1] = withModifiers(function() {
|
|
1398
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), createVNode("div", { class: g2.classes.foreground, style: g2.boundariesStyle }, null, 6), withDirectives((openBlock(), createBlock(resolveDynamicComponent(r.stencilComponent), mergeProps({ ref: "stencil", image: g2.image, coordinates: p2.coordinates, "stencil-coordinates": g2.stencilCoordinates, transitions: g2.transitionsOptions }, r.stencilProps, { onResize: g2.onResize, onResizeEnd: g2.onResizeEnd, onMove: g2.onMove, onMoveEnd: g2.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[vShow, p2.imageLoaded]]), r.canvas ? (openBlock(), createBlock("canvas", ve, null, 512)) : createCommentVNode("", true), r.canvas ? (openBlock(), createBlock("canvas", be, null, 512)) : createCommentVNode("", true)];
|
|
1399
|
-
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
1400
|
-
};
|
|
1401
|
-
const _hoisted_1 = { class: "vc-image-uploader" };
|
|
1402
|
-
const _hoisted_2 = { class: "vc-image-uploader__upload-action" };
|
|
1403
|
-
const _hoisted_3 = { class: "vc-image-uploader__content" };
|
|
1404
|
-
const _hoisted_4 = { class: "vc-image-uploader__content-header" };
|
|
1405
|
-
const _hoisted_5 = { class: "vc-image-uploader__cropper-content" };
|
|
1406
|
-
const _hoisted_6 = { class: "cropper-block relative" };
|
|
1407
|
-
const _hoisted_7 = { key: 1 };
|
|
1408
|
-
const _hoisted_8 = { class: "overflow-hidden relative rounded-md" };
|
|
1409
|
-
const _hoisted_9 = { class: "cropper-block__actions" };
|
|
1410
|
-
const _hoisted_10 = { class: "flex items-center py-3" };
|
|
1411
|
-
const _hoisted_11 = { class: "flex items-center py-3" };
|
|
1412
|
-
const _hoisted_12 = { class: "preview-block" };
|
|
1413
|
-
const _hoisted_13 = { class: "font-semibold text-sm" };
|
|
1414
|
-
const _hoisted_14 = {
|
|
1415
|
-
class: "flex items-end flex-wrap my-2 relative",
|
|
1416
|
-
style: { "min-height": "36px" }
|
|
1417
|
-
};
|
|
1418
|
-
const _hoisted_15 = { class: "flex items-center justify-center px-2 min-h-10" };
|
|
1419
|
-
const _hoisted_16 = { class: "flex items-center justify-center px-2" };
|
|
1420
|
-
const _hoisted_17 = { class: "mt-10" };
|
|
1421
|
-
const _hoisted_18 = { class: "vc-image-uploader__modal-footer" };
|
|
1422
|
-
const _hoisted_19 = { class: "px-3 w-full sm:w-auto" };
|
|
1423
|
-
const _hoisted_20 = { class: "px-3 w-full sm:w-auto" };
|
|
1424
|
-
const DEFAULT_UPLOAD_TYPE = "default";
|
|
1425
|
-
const DEFAULT_UPLOAD_COLOR = "primary";
|
|
1426
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1427
|
-
__name: "VcImageUploader",
|
|
1428
|
-
props: {
|
|
1429
|
-
buttonType: { default: DEFAULT_UPLOAD_TYPE },
|
|
1430
|
-
buttonColor: { default: DEFAULT_UPLOAD_COLOR },
|
|
1431
|
-
icon: { default: "vc-icon-upload" },
|
|
1432
|
-
contentTitle: { default: "" },
|
|
1433
|
-
previewTitle: { default: "" }
|
|
1434
|
-
},
|
|
1435
|
-
emits: ["upload:file", "save"],
|
|
1436
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1437
|
-
const props = __props;
|
|
1438
|
-
const emit = __emit;
|
|
1439
|
-
const settings = {
|
|
1440
|
-
aspectRatio: 1,
|
|
1441
|
-
handlers: {},
|
|
1442
|
-
movable: false,
|
|
1443
|
-
scalable: false
|
|
1444
|
-
};
|
|
1445
|
-
const dialog = ref(false);
|
|
1446
|
-
const loading = ref(false);
|
|
1447
|
-
const imageState = ref(null);
|
|
1448
|
-
const result = ref({
|
|
1449
|
-
coordinates: null,
|
|
1450
|
-
image: null
|
|
1451
|
-
});
|
|
1452
|
-
const cropElementRef = ref();
|
|
1453
|
-
const inputUploaderRef = ref();
|
|
1454
|
-
const contentTitleText = computed(() => {
|
|
1455
|
-
return props.contentTitle || tVU.t("voicenterUi.uploader.image.contentTitle");
|
|
1456
|
-
});
|
|
1457
|
-
const previewTitleText = computed(() => {
|
|
1458
|
-
return props.contentTitle || tVU.t("voicenterUi.uploader.image.previewTitle");
|
|
1459
|
-
});
|
|
1460
|
-
function zoom(factor) {
|
|
1461
|
-
var _a;
|
|
1462
|
-
if (loading.value) {
|
|
1463
|
-
return;
|
|
1464
|
-
}
|
|
1465
|
-
(_a = cropElementRef.value) == null ? void 0 : _a.zoom(factor);
|
|
1466
|
-
}
|
|
1467
|
-
function rotate(angle) {
|
|
1468
|
-
var _a;
|
|
1469
|
-
if (loading.value) {
|
|
1470
|
-
return;
|
|
1471
|
-
}
|
|
1472
|
-
(_a = cropElementRef.value) == null ? void 0 : _a.rotate(angle);
|
|
1473
|
-
}
|
|
1474
|
-
function openExplorer() {
|
|
1475
|
-
var _a;
|
|
1476
|
-
(_a = inputUploaderRef.value) == null ? void 0 : _a.click();
|
|
1477
|
-
}
|
|
1478
|
-
async function onFileInput(event) {
|
|
1479
|
-
var _a;
|
|
1480
|
-
const target = event.target;
|
|
1481
|
-
const file = (_a = target.files) == null ? void 0 : _a.item(0);
|
|
1482
|
-
if (!file) {
|
|
1483
|
-
return;
|
|
1484
|
-
}
|
|
1485
|
-
loading.value = true;
|
|
1486
|
-
await loadFile(file);
|
|
1487
|
-
setTimeout(() => {
|
|
1488
|
-
loading.value = false;
|
|
1489
|
-
}, 500);
|
|
1490
|
-
target.value = "";
|
|
1491
|
-
}
|
|
1492
|
-
function resetUrlData() {
|
|
1493
|
-
var _a, _b;
|
|
1494
|
-
if ((_a = imageState.value) == null ? void 0 : _a.url) {
|
|
1495
|
-
URL.revokeObjectURL(imageState.value.url);
|
|
1496
|
-
}
|
|
1497
|
-
if ((_b = result.value.image) == null ? void 0 : _b.src) {
|
|
1498
|
-
URL.revokeObjectURL(result.value.image.src);
|
|
1499
|
-
resetResult();
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
async function loadFile(file) {
|
|
1503
|
-
if (!file) {
|
|
1504
|
-
return;
|
|
1505
|
-
}
|
|
1506
|
-
resetUrlData();
|
|
1507
|
-
const url = URL.createObjectURL(file);
|
|
1508
|
-
const reader = new FileReader();
|
|
1509
|
-
try {
|
|
1510
|
-
return await new Promise((resolve, reject) => {
|
|
1511
|
-
reader.addEventListener("load", () => {
|
|
1512
|
-
if (!reader.result) {
|
|
1513
|
-
return reject(new Error("Could not read the file."));
|
|
1514
|
-
}
|
|
1515
|
-
const type = getMimeTypeFromBuffer(reader.result, file.type);
|
|
1516
|
-
if (!(type == null ? void 0 : type.startsWith("image"))) {
|
|
1517
|
-
return reject(new Error(`Unsupported mime type: ${type}`));
|
|
1518
|
-
}
|
|
1519
|
-
imageState.value = {
|
|
1520
|
-
url,
|
|
1521
|
-
type,
|
|
1522
|
-
name: file.name,
|
|
1523
|
-
size: file.size
|
|
1524
|
-
};
|
|
1525
|
-
emit("upload:file", imageState.value);
|
|
1526
|
-
dialog.value = true;
|
|
1527
|
-
resolve(imageState.value);
|
|
1528
|
-
});
|
|
1529
|
-
reader.readAsArrayBuffer(file);
|
|
1530
|
-
});
|
|
1531
|
-
} catch (error2) {
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
function change({ coordinates, image }) {
|
|
1535
|
-
result.value = {
|
|
1536
|
-
coordinates,
|
|
1537
|
-
image
|
|
1538
|
-
};
|
|
1539
|
-
}
|
|
1540
|
-
function resetResult() {
|
|
1541
|
-
result.value = {
|
|
1542
|
-
coordinates: null,
|
|
1543
|
-
image: null
|
|
1544
|
-
};
|
|
1545
|
-
}
|
|
1546
|
-
function error(error2) {
|
|
1547
|
-
}
|
|
1548
|
-
function closeDialog() {
|
|
1549
|
-
dialog.value = false;
|
|
1550
|
-
resetUrlData();
|
|
1551
|
-
}
|
|
1552
|
-
function onSaveHandler() {
|
|
1553
|
-
var _a;
|
|
1554
|
-
const originalData = (_a = cropElementRef.value) == null ? void 0 : _a.getResult();
|
|
1555
|
-
const croppedImage = originalData.canvas.toDataURL();
|
|
1556
|
-
emit("save", croppedImage, originalData);
|
|
1557
|
-
closeDialog();
|
|
1558
|
-
}
|
|
1559
|
-
__expose({
|
|
1560
|
-
open: openExplorer,
|
|
1561
|
-
close: closeDialog
|
|
1562
|
-
});
|
|
1563
|
-
return (_ctx, _cache) => {
|
|
1564
|
-
const _component_VcSkeletonLoader = resolveComponent("VcSkeletonLoader");
|
|
1565
|
-
const _component_VcModal = resolveComponent("VcModal");
|
|
1566
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1567
|
-
createElementVNode("div", _hoisted_2, [
|
|
1568
|
-
renderSlot(_ctx.$slots, "upload-action", {
|
|
1569
|
-
loading: loading.value,
|
|
1570
|
-
handler: openExplorer
|
|
1571
|
-
}, () => [
|
|
1572
|
-
createVNode(_sfc_main$1, {
|
|
1573
|
-
type: _ctx.buttonType,
|
|
1574
|
-
loading: loading.value,
|
|
1575
|
-
color: _ctx.buttonColor,
|
|
1576
|
-
icon: _ctx.icon,
|
|
1577
|
-
onClick: openExplorer
|
|
1578
|
-
}, {
|
|
1579
|
-
default: withCtx(() => [
|
|
1580
|
-
createTextVNode(toDisplayString(_ctx.$tVU.t("voicenterUi.general.upload")), 1)
|
|
1581
|
-
]),
|
|
1582
|
-
_: 1
|
|
1583
|
-
}, 8, ["type", "loading", "color", "icon"])
|
|
1584
|
-
]),
|
|
1585
|
-
createElementVNode("input", {
|
|
1586
|
-
ref_key: "inputUploaderRef",
|
|
1587
|
-
ref: inputUploaderRef,
|
|
1588
|
-
hidden: "",
|
|
1589
|
-
name: "file-upload-input",
|
|
1590
|
-
accept: "image/*",
|
|
1591
|
-
type: "file",
|
|
1592
|
-
class: "sr-only",
|
|
1593
|
-
onChange: onFileInput
|
|
1594
|
-
}, null, 544)
|
|
1595
|
-
]),
|
|
1596
|
-
createVNode(_component_VcModal, {
|
|
1597
|
-
visible: dialog.value,
|
|
1598
|
-
header: "Image Editor",
|
|
1599
|
-
width: "760px",
|
|
1600
|
-
onClose: closeDialog
|
|
1601
|
-
}, {
|
|
1602
|
-
footer: withCtx(() => [
|
|
1603
|
-
createElementVNode("div", _hoisted_18, [
|
|
1604
|
-
createElementVNode("div", _hoisted_19, [
|
|
1605
|
-
createVNode(_sfc_main$1, {
|
|
1606
|
-
block: "",
|
|
1607
|
-
size: "large",
|
|
1608
|
-
color: "secondary",
|
|
1609
|
-
type: "outline",
|
|
1610
|
-
icon: "vc-icon-cancel",
|
|
1611
|
-
onClick: closeDialog
|
|
1612
|
-
}, {
|
|
1613
|
-
default: withCtx(() => [
|
|
1614
|
-
createTextVNode(toDisplayString(_ctx.$tVU.t("voicenterUi.general.cancel")), 1)
|
|
1615
|
-
]),
|
|
1616
|
-
_: 1
|
|
1617
|
-
})
|
|
1618
|
-
]),
|
|
1619
|
-
createElementVNode("div", _hoisted_20, [
|
|
1620
|
-
createVNode(_sfc_main$1, {
|
|
1621
|
-
size: "large",
|
|
1622
|
-
icon: "vc-icon-save",
|
|
1623
|
-
block: "",
|
|
1624
|
-
onClick: onSaveHandler
|
|
1625
|
-
}, {
|
|
1626
|
-
default: withCtx(() => [
|
|
1627
|
-
createTextVNode(toDisplayString(_ctx.$tVU.t("voicenterUi.general.save")), 1)
|
|
1628
|
-
]),
|
|
1629
|
-
_: 1
|
|
1630
|
-
})
|
|
1631
|
-
])
|
|
1632
|
-
])
|
|
1633
|
-
]),
|
|
1634
|
-
default: withCtx(() => [
|
|
1635
|
-
createElementVNode("div", _hoisted_3, [
|
|
1636
|
-
createElementVNode("div", _hoisted_4, toDisplayString(contentTitleText.value), 1),
|
|
1637
|
-
createElementVNode("div", _hoisted_5, [
|
|
1638
|
-
createElementVNode("div", _hoisted_6, [
|
|
1639
|
-
createVNode(TransitionGroup, {
|
|
1640
|
-
name: "fade-image",
|
|
1641
|
-
mode: "in-out"
|
|
1642
|
-
}, {
|
|
1643
|
-
default: withCtx(() => [
|
|
1644
|
-
loading.value ? (openBlock(), createBlock(_component_VcSkeletonLoader, {
|
|
1645
|
-
key: 0,
|
|
1646
|
-
height: "320",
|
|
1647
|
-
width: "320",
|
|
1648
|
-
"row-height": "320",
|
|
1649
|
-
class: "absolute left-0 top-0"
|
|
1650
|
-
})) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1651
|
-
createElementVNode("div", _hoisted_8, [
|
|
1652
|
-
!!imageState.value && !loading.value ? (openBlock(), createBlock(unref(fe), {
|
|
1653
|
-
key: 0,
|
|
1654
|
-
ref_key: "cropElementRef",
|
|
1655
|
-
ref: cropElementRef,
|
|
1656
|
-
class: "cropper w-full h-full",
|
|
1657
|
-
src: imageState.value.url,
|
|
1658
|
-
debounce: false,
|
|
1659
|
-
"stencil-props": settings,
|
|
1660
|
-
"stencil-size": {
|
|
1661
|
-
width: 280,
|
|
1662
|
-
height: 280
|
|
1663
|
-
},
|
|
1664
|
-
"resize-image": {
|
|
1665
|
-
adjustStencil: false
|
|
1666
|
-
},
|
|
1667
|
-
"image-restriction": "stencil",
|
|
1668
|
-
onChange: change,
|
|
1669
|
-
onError: error
|
|
1670
|
-
}, null, 8, ["src"])) : createCommentVNode("", true)
|
|
1671
|
-
]),
|
|
1672
|
-
createElementVNode("div", _hoisted_9, [
|
|
1673
|
-
createElementVNode("div", _hoisted_10, [
|
|
1674
|
-
createElementVNode("span", {
|
|
1675
|
-
class: "px-1 cursor-pointer",
|
|
1676
|
-
onClick: _cache[0] || (_cache[0] = ($event) => zoom(0.5))
|
|
1677
|
-
}, [..._cache[4] || (_cache[4] = [
|
|
1678
|
-
createElementVNode("i", { class: "vc-icon-minus-linear icon-lg text-active" }, null, -1)
|
|
1679
|
-
])]),
|
|
1680
|
-
createElementVNode("span", {
|
|
1681
|
-
class: "px-1 cursor-pointer",
|
|
1682
|
-
onClick: _cache[1] || (_cache[1] = ($event) => zoom(1.5))
|
|
1683
|
-
}, [..._cache[5] || (_cache[5] = [
|
|
1684
|
-
createElementVNode("i", { class: "vc-icon-plus-linear icon-lg text-active" }, null, -1)
|
|
1685
|
-
])])
|
|
1686
|
-
]),
|
|
1687
|
-
createElementVNode("div", _hoisted_11, [
|
|
1688
|
-
createElementVNode("span", {
|
|
1689
|
-
class: "px-1 cursor-pointer",
|
|
1690
|
-
onClick: _cache[2] || (_cache[2] = ($event) => rotate(90))
|
|
1691
|
-
}, [..._cache[6] || (_cache[6] = [
|
|
1692
|
-
createElementVNode("i", { class: "vc-icon-transfer icon-lg text-active" }, null, -1)
|
|
1693
|
-
])]),
|
|
1694
|
-
createElementVNode("span", {
|
|
1695
|
-
class: "px-1 cursor-pointer",
|
|
1696
|
-
onClick: _cache[3] || (_cache[3] = ($event) => rotate(-90))
|
|
1697
|
-
}, [..._cache[7] || (_cache[7] = [
|
|
1698
|
-
createElementVNode("i", { class: "vc-icon-cancel icon-lg text-active" }, null, -1)
|
|
1699
|
-
])])
|
|
1700
|
-
])
|
|
1701
|
-
])
|
|
1702
|
-
]))
|
|
1703
|
-
]),
|
|
1704
|
-
_: 1
|
|
1705
|
-
})
|
|
1706
|
-
]),
|
|
1707
|
-
createElementVNode("div", _hoisted_12, [
|
|
1708
|
-
createElementVNode("div", _hoisted_13, toDisplayString(previewTitleText.value), 1),
|
|
1709
|
-
createElementVNode("div", _hoisted_14, [
|
|
1710
|
-
createVNode(TransitionGroup, {
|
|
1711
|
-
name: "fade-image",
|
|
1712
|
-
mode: "out-in"
|
|
1713
|
-
}, {
|
|
1714
|
-
default: withCtx(() => [
|
|
1715
|
-
loading.value ? (openBlock(), createBlock(_component_VcSkeletonLoader, {
|
|
1716
|
-
key: 0,
|
|
1717
|
-
height: "36",
|
|
1718
|
-
width: "120",
|
|
1719
|
-
"row-height": "36",
|
|
1720
|
-
type: "square@2",
|
|
1721
|
-
class: "absolute left-0 top-0 flex gap-4"
|
|
1722
|
-
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1723
|
-
createElementVNode("div", _hoisted_15, [
|
|
1724
|
-
createVNode(unref(he), {
|
|
1725
|
-
width: 36,
|
|
1726
|
-
height: 36,
|
|
1727
|
-
image: result.value.image,
|
|
1728
|
-
coordinates: result.value.coordinates,
|
|
1729
|
-
class: "rounded-md transition-all duration-300"
|
|
1730
|
-
}, null, 8, ["image", "coordinates"])
|
|
1731
|
-
]),
|
|
1732
|
-
createElementVNode("div", _hoisted_16, [
|
|
1733
|
-
createVNode(unref(he), {
|
|
1734
|
-
width: 36,
|
|
1735
|
-
height: 36,
|
|
1736
|
-
image: result.value.image,
|
|
1737
|
-
coordinates: result.value.coordinates,
|
|
1738
|
-
class: "rounded-full transition-all duration-300"
|
|
1739
|
-
}, null, 8, ["image", "coordinates"])
|
|
1740
|
-
])
|
|
1741
|
-
], 64))
|
|
1742
|
-
]),
|
|
1743
|
-
_: 1
|
|
1744
|
-
})
|
|
1745
|
-
]),
|
|
1746
|
-
createElementVNode("div", _hoisted_17, [
|
|
1747
|
-
createVNode(_sfc_main$1, {
|
|
1748
|
-
type: "outline",
|
|
1749
|
-
loading: loading.value,
|
|
1750
|
-
color: _ctx.buttonColor,
|
|
1751
|
-
icon: "vc-icon-restart",
|
|
1752
|
-
onClick: openExplorer
|
|
1753
|
-
}, {
|
|
1754
|
-
default: withCtx(() => [
|
|
1755
|
-
createTextVNode(toDisplayString(_ctx.$tVU.t("voicenterUi.uploader.change.image")), 1)
|
|
1756
|
-
]),
|
|
1757
|
-
_: 1
|
|
1758
|
-
}, 8, ["loading", "color"])
|
|
1759
|
-
])
|
|
1760
|
-
])
|
|
1761
|
-
])
|
|
1762
|
-
])
|
|
1763
|
-
]),
|
|
1764
|
-
_: 1
|
|
1765
|
-
}, 8, ["visible"])
|
|
1766
|
-
]);
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
});
|
|
1770
|
-
export {
|
|
1771
|
-
_sfc_main as default
|
|
1772
|
-
};
|