comp-hub 0.25.17 → 0.25.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/website/container/assets/{index-YhvDyci9.css → index-DZmjDb-3.css} +1 -1
- package/dist/website/container/index.html +2 -2
- package/dist/website/item/assets/@chenglou-BKD48OEU.js +4 -0
- package/dist/website/item/assets/@ctrl-C4Rzlq_k.js +1 -0
- package/dist/website/item/assets/@element-plus-5HYzMPHH.js +1 -0
- package/dist/website/item/assets/@floating-ui-BOzNIQbj.js +1 -0
- package/dist/website/item/assets/@iconify-BPgeTBo_.js +1 -0
- package/dist/website/item/assets/@iconify-vue-r3R3CCwl.js +1 -0
- package/dist/website/item/assets/@intlify-Dtb6NmBn.js +3 -0
- package/dist/website/item/assets/@profoundlogic-Dbp5Yy6B.js +5 -0
- package/dist/website/item/assets/@sxzz-CUumdR8o.js +1 -0
- package/dist/website/item/assets/@vue-C9QaczuC.js +1 -0
- package/dist/website/item/assets/@vueuse-C7-4JdfM.js +1 -0
- package/dist/website/item/assets/_plugin-vue_export-helper-BvSI8h28.js +12 -0
- package/dist/website/item/assets/async-validator-Cp9QasH9.js +12 -0
- package/dist/website/item/assets/axios-B8_nURbH.js +9 -0
- package/dist/website/item/assets/birpc-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/css-tree-BLHriVLA.js +12 -0
- package/dist/website/item/assets/dayjs-Z3PInbbQ.js +1 -0
- package/dist/website/item/assets/diff-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/diff2html-DT_q3g7v.js +101 -0
- package/dist/website/item/assets/{index-C3Gu6wLz.css → element-plus-Cfuf6lH-.css} +1 -1
- package/dist/website/item/assets/element-plus-DBucBpWn.js +39 -0
- package/dist/website/item/assets/highlight.js-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/hookable-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/idb-Dob3nYDb.js +1 -0
- package/dist/website/item/assets/index-6jb9FmNT.js +1 -0
- package/dist/website/item/assets/index-BGH8m-F2.js +1 -0
- package/dist/website/item/assets/index-BI_-2dUB.js +1 -0
- package/dist/website/item/assets/index-BpT42u6b.js +1 -0
- package/dist/website/item/assets/index-BqfcJOru.js +1 -0
- package/dist/website/item/assets/index-BwZfV1A2.js +1 -0
- package/dist/website/item/assets/index-CRGAlkC4.js +1 -0
- package/dist/website/item/assets/index-CUQTn5cW.js +2 -0
- package/dist/website/item/assets/index-DMv3RrWi.js +1 -0
- package/dist/website/item/assets/index-D__3WVgB.js +1 -0
- package/dist/website/item/assets/index-DeU4xv9o.js +1 -0
- package/dist/website/item/assets/index-DjpSekiX.js +1 -0
- package/dist/website/item/assets/index-ZnytBXEa.css +1 -0
- package/dist/website/item/assets/index-jliYxAXa.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BP6wylOE.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BXDFpHny.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BpSg0Jae.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-DfVSdoBY.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-DjzNSY_4.js +1 -0
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-Na9slT-l.js +1 -0
- package/dist/website/item/assets/lodash-es-3Olcxijv.js +1 -0
- package/dist/website/item/assets/lodash-unified-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/lz-string--7IMPK6S.js +1 -0
- package/dist/website/item/assets/memoize-one-BdPwpGay.js +1 -0
- package/dist/website/item/assets/normalize-wheel-es-BikNlmlf.js +1 -0
- package/dist/website/item/assets/perfect-debounce-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/pinia-Bzt0Q3uQ.js +1 -0
- package/dist/website/item/assets/prettier-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/source-map-js-B_zWzY07.js +1 -0
- package/dist/website/item/assets/useCompAttrs-C9FX019z.js +1 -0
- package/dist/website/item/assets/useCompAttrsLocal-ThVku9Cv.js +1 -0
- package/dist/website/item/assets/vue-i18n-DuHeSxKy.js +1 -0
- package/dist/website/item/assets/vue-l0sNRNKZ.js +1 -0
- package/dist/website/item/assets/vue-router-DPdvYShe.js +1 -0
- package/dist/website/item/index.html +21 -2
- package/dist/website/main/assets/@chenglou-BKD48OEU.js +4 -0
- package/dist/website/main/assets/@ctrl-C4Rzlq_k.js +1 -0
- package/dist/website/main/assets/@element-plus-MEP8kzQo.js +1 -0
- package/dist/website/main/assets/@floating-ui-BOzNIQbj.js +1 -0
- package/dist/website/main/assets/@form-create-feqGS1Jj.js +7 -0
- package/dist/website/main/assets/@iconify-C373lf0G.js +1 -0
- package/dist/website/main/assets/@iconify-vue-CB77QM-F.css +1 -0
- package/dist/website/main/assets/@iconify-vue-sb5-HV-8.js +1 -0
- package/dist/website/main/assets/@intlify-Dtb6NmBn.js +3 -0
- package/dist/website/main/assets/@nanostores-cuv3rP3V.js +1 -0
- package/dist/website/main/assets/@profoundlogic-Dbp5Yy6B.js +5 -0
- package/dist/website/main/assets/@socket.io-Dkula2eQ.js +1 -0
- package/dist/website/main/assets/@sxzz-CUumdR8o.js +1 -0
- package/dist/website/main/assets/@tanstack-B1C-iDkv.js +1 -0
- package/dist/website/main/assets/@transloadit-C1Ht0DUJ.js +1 -0
- package/dist/website/main/assets/@uppy-CVofWm7v.js +6 -0
- package/dist/website/main/assets/@viselect-CfuubPTw.js +1 -0
- package/dist/website/main/assets/@vue-fhDHgfUd.js +1 -0
- package/dist/website/main/assets/@vueuse-BzQM40cp.js +1 -0
- package/dist/website/main/assets/{index-Bn5vi5XZ.css → @xterm-DFuMZ0ql.css} +1 -1
- package/dist/website/main/assets/@xterm-DUvcnV0i.js +9 -0
- package/dist/website/main/assets/async-validator-Cp9QasH9.js +12 -0
- package/dist/website/main/assets/axios-CGPwGRlm.js +9 -0
- package/dist/website/main/assets/birpc-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/charenc-DuOFFKym.js +1 -0
- package/dist/website/main/assets/crypt-C-Yx0DM0.js +1 -0
- package/dist/website/main/assets/css-tree-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/dayjs-CODj3Ey3.js +1 -0
- package/dist/website/main/assets/diff-Czv1d0yF.js +13 -0
- package/dist/website/main/assets/diff2html-B2pszkCz.js +107 -0
- package/dist/website/main/assets/diff2html-BgE3edmZ.css +1 -0
- package/dist/website/main/assets/disable-devtool-D3c1TvAN.js +2 -0
- package/dist/website/main/assets/eastasianwidth-BD_cvthz.js +1 -0
- package/dist/website/main/assets/element-plus-BhtJKS0K.js +39 -0
- package/dist/website/main/assets/element-plus-CGVDl28_.css +1 -0
- package/dist/website/main/assets/engine.io-client-DI6V2dVR.js +1 -0
- package/dist/website/main/assets/engine.io-parser-DPmA-eyr.js +1 -0
- package/dist/website/main/assets/highlight-ZgkIHsf0.css +1 -0
- package/dist/website/main/assets/highlight.js-Bwl2mRDt.js +3 -0
- package/dist/website/main/assets/hookable-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/idb-Dob3nYDb.js +1 -0
- package/dist/website/main/assets/index-4HcRtHFq.js +1 -0
- package/dist/website/main/assets/index-B5Bwrnd-.js +5 -0
- package/dist/website/main/assets/index-BDXZ4YLt.js +1 -0
- package/dist/website/main/assets/index-BQWQEa7O.css +1 -0
- package/dist/website/main/assets/index-B_LYOd1t.js +1 -0
- package/dist/website/main/assets/index-Bb2JsGT0.js +1 -0
- package/dist/website/main/assets/index-BhuSlCh5.js +1 -0
- package/dist/website/main/assets/index-BoRu8JTf.js +1 -0
- package/dist/website/main/assets/index-BspcDgbz.js +1 -0
- package/dist/website/main/assets/index-C3llr0fI.js +1 -0
- package/dist/website/main/assets/index-CUFPwy3j.js +1 -0
- package/dist/website/main/assets/index-CZOyLdFS.js +1 -0
- package/dist/website/main/assets/index-Cc1ww5-S.css +1 -0
- package/dist/website/main/assets/index-CeIHQ-n9.js +2 -0
- package/dist/website/main/assets/index-CeKI74UL.css +1 -0
- package/dist/website/main/assets/index-Ck53ravL.js +1 -0
- package/dist/website/main/assets/index-CvX4ROQv.js +1 -0
- package/dist/website/main/assets/index-Cy4Bopc2.js +1 -0
- package/dist/website/main/assets/index-D7gG_u1W.css +1 -0
- package/dist/website/main/assets/index-DPOCYlI9.js +1 -0
- package/dist/website/main/assets/index-DULniEhb.js +1 -0
- package/dist/website/main/assets/index-DYDRL9IM.js +1 -0
- package/dist/website/main/assets/index-DYr8op9I.js +2 -0
- package/dist/website/main/assets/index-DYzYK94h.js +1 -0
- package/dist/website/main/assets/index-DuAc5XJp.js +1 -0
- package/dist/website/main/assets/index-Dy7LCL85.js +1 -0
- package/dist/website/main/assets/index-Dztu-Acq.js +1 -0
- package/dist/website/main/assets/index-Pi6tlbT4.js +4 -0
- package/dist/website/main/assets/index-aKfjhWt0.js +1 -0
- package/dist/website/main/assets/index-bJcpxaVy.js +1 -0
- package/dist/website/main/assets/index-kfXJiyp1.js +1 -0
- package/dist/website/main/assets/index-lBMHAV8o.js +1 -0
- package/dist/website/main/assets/index-qQdfohcs.js +1 -0
- package/dist/website/main/assets/index-rbkKq4oE.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C8gdKJNc.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CCmKpzaE.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CgWidmAh.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CoufeP0j.js +2 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cpe0QxkJ.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CqPOOcKs.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-js27NZ7Q.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DPWsMIUB.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-MdS0xY-J.js +7 -0
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-y99hKbpl.js +1 -0
- package/dist/website/main/assets/is-buffer-BmA-AeVY.js +1 -0
- package/dist/website/main/assets/js-cookie-C2b7Ongr.js +1 -0
- package/dist/website/main/assets/lodash-DSEObR3Z.js +1 -0
- package/dist/website/main/assets/lodash-es-3Dei55BW.js +1 -0
- package/dist/website/main/assets/lodash-unified-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/lz-string-DrDDIr3t.js +1 -0
- package/dist/website/main/assets/marked-Ds7eXWqI.js +59 -0
- package/dist/website/main/assets/md5-BFcmaCA5.js +1 -0
- package/dist/website/main/assets/memoize-one-BdPwpGay.js +1 -0
- package/dist/website/main/assets/mime-match-DPWGxner.js +1 -0
- package/dist/website/main/assets/mitt-BN3yQH3p.js +1 -0
- package/dist/website/main/assets/namespace-emitter-D_6Athvt.js +1 -0
- package/dist/website/main/assets/nanoid-DKwX7yNB.js +1 -0
- package/dist/website/main/assets/nanostores-Bxb5zCO9.js +1 -0
- package/dist/website/main/assets/normalize-wheel-es-BikNlmlf.js +1 -0
- package/dist/website/main/assets/nprogress-BgDCIyLK.css +1 -0
- package/dist/website/main/assets/nprogress-DvYEeNZi.js +1 -0
- package/dist/website/main/assets/overlayscrollbars-B4ARb2Jg.js +1 -0
- package/dist/website/main/assets/path-browserify-VLxTPTS7.js +1 -0
- package/dist/website/main/assets/perfect-debounce-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/pinia-Dbinmd9o.js +1 -0
- package/dist/website/main/assets/preact-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/prettier-CXANtD9v.js +184 -0
- package/dist/website/main/assets/socket.io-client-6WpCnOvu.js +1 -0
- package/dist/website/main/assets/socket.io-parser-dKdiPQ_0.js +1 -0
- package/dist/website/main/assets/source-map-js-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/useCacheOssStore-B0MOdXBT.js +1 -0
- package/dist/website/main/assets/useCompEditStore-BPtseuS3.js +1 -0
- package/dist/website/main/assets/useCompEditStore-D1y6qk1p.css +1 -0
- package/dist/website/main/assets/useCompMetaLocalStore-CTrw6UOk.js +1 -0
- package/dist/website/main/assets/useCompMetaStore-CZbYI0xK.js +1 -0
- package/dist/website/main/assets/useKeyword-C1kuAWZi.js +1 -0
- package/dist/website/main/assets/useTeamHeaders-3RiOUcY_.js +1 -0
- package/dist/website/main/assets/useVscodeOpen-8UEdd_uq.js +1 -0
- package/dist/website/main/assets/vanilla-lazyload-CwDt0XVP.js +1 -0
- package/dist/website/main/assets/vue-advanced-cropper-B8N2632q.js +3 -0
- package/dist/website/main/assets/vue-demi-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/vue-i18n-Cl4PTbxU.js +1 -0
- package/dist/website/main/assets/vue-l0sNRNKZ.js +1 -0
- package/dist/website/main/assets/vue-router-Dq9LltUm.js +1 -0
- package/dist/website/main/assets/vue-sonner-tR0c75Mk.js +1 -0
- package/dist/website/main/assets/vuefinder-5wO4Y5ID.js +1 -0
- package/dist/website/main/assets/wildcard-Cd63L__x.js +1 -0
- package/dist/website/main/index.html +56 -2
- package/package.json +3 -2
- package/dist/website/item/assets/_plugin-vue_export-helper-ClmlufYy.js +0 -147
- package/dist/website/item/assets/index-A2e72bYf.js +0 -1
- package/dist/website/item/assets/index-B2r8sxRR.js +0 -1
- package/dist/website/item/assets/index-C6NEN46F.js +0 -1
- package/dist/website/item/assets/index-CXfvRuh5.js +0 -1
- package/dist/website/item/assets/index-CYfmDfPu.js +0 -13
- package/dist/website/item/assets/index-Ckv5tLxs.js +0 -1
- package/dist/website/item/assets/index-Cl6uqF-x.js +0 -1
- package/dist/website/item/assets/index-CmgpBuUf.js +0 -1
- package/dist/website/item/assets/index-CncfqGDl.js +0 -1
- package/dist/website/item/assets/index-DgLkaw9e.js +0 -1
- package/dist/website/item/assets/index-DuvgRKuL.js +0 -1
- package/dist/website/item/assets/index-IbpmdLUc.js +0 -1
- package/dist/website/item/assets/index-sGVojTNg.js +0 -1
- package/dist/website/item/assets/index-uCZVfQfS.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BLB7nimS.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BYSmp_n8.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BYzW_ITp.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BhO5mDgb.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-CFCH0Q76.js +0 -1
- package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-SpXIpkkp.js +0 -1
- package/dist/website/item/assets/useCompAttrs-BL-bjaqx.js +0 -1
- package/dist/website/item/assets/useCompAttrsLocal-Bsj1Z8J3.js +0 -1
- package/dist/website/main/assets/cloud-upload-Cs5rs0fe.js +0 -1
- package/dist/website/main/assets/cloud-upload-j3Y0taC9.css +0 -1
- package/dist/website/main/assets/el-card-BAyktVMS.css +0 -1
- package/dist/website/main/assets/el-dropdown-item-BeIfAqTO.css +0 -1
- package/dist/website/main/assets/el-empty-S7fQQ3B8.css +0 -1
- package/dist/website/main/assets/el-link-CPQZ-olG.css +0 -1
- package/dist/website/main/assets/el-link-CYRikDCA.js +0 -1
- package/dist/website/main/assets/el-loading-Dq8WDDkr.css +0 -1
- package/dist/website/main/assets/el-table-column-B3ZEEuPD.css +0 -1
- package/dist/website/main/assets/el-table-column-R6urXTXE.js +0 -1
- package/dist/website/main/assets/en-C_Tot-hO.js +0 -1
- package/dist/website/main/assets/home-rounded-B4KVwSYb.css +0 -1
- package/dist/website/main/assets/home-rounded-B6ip0c7y.js +0 -1
- package/dist/website/main/assets/index-9cW7WZJA.js +0 -1
- package/dist/website/main/assets/index-B-U892j4.js +0 -1
- package/dist/website/main/assets/index-B6mD6Kkg.js +0 -1
- package/dist/website/main/assets/index-BGMqZ6s6.js +0 -1
- package/dist/website/main/assets/index-Bud_dtZv.js +0 -1
- package/dist/website/main/assets/index-BxyUlJIo.js +0 -1
- package/dist/website/main/assets/index-C1gpYuZp.js +0 -1
- package/dist/website/main/assets/index-C2bAlTIv.js +0 -4
- package/dist/website/main/assets/index-CDNB051F.js +0 -1
- package/dist/website/main/assets/index-CNq68i9N.js +0 -1
- package/dist/website/main/assets/index-CS-qmP9q.js +0 -1
- package/dist/website/main/assets/index-CWkqV3b7.js +0 -1
- package/dist/website/main/assets/index-C_6TIEqJ.css +0 -1
- package/dist/website/main/assets/index-CaxXecF0.js +0 -1
- package/dist/website/main/assets/index-CbOuvPyn.js +0 -1
- package/dist/website/main/assets/index-CgNgaeRC.css +0 -1
- package/dist/website/main/assets/index-ChNPGeka.js +0 -1
- package/dist/website/main/assets/index-CjHODTEb.js +0 -1
- package/dist/website/main/assets/index-Cpt-ElYb.js +0 -1
- package/dist/website/main/assets/index-Cqeo6XX0.js +0 -1
- package/dist/website/main/assets/index-CrjnxYdq.js +0 -1
- package/dist/website/main/assets/index-DMmk1-uH.js +0 -2
- package/dist/website/main/assets/index-DOlF0Z_P.css +0 -1
- package/dist/website/main/assets/index-DPvzUGF_.js +0 -2
- package/dist/website/main/assets/index-Dj51p5I8.css +0 -1
- package/dist/website/main/assets/index-DvpUuDIq.js +0 -1
- package/dist/website/main/assets/index-Dwbqz_We.js +0 -1
- package/dist/website/main/assets/index-DwsxPrpM.js +0 -1
- package/dist/website/main/assets/index-IFbOrHc6.js +0 -1
- package/dist/website/main/assets/index-JZJBRbnu.js +0 -1
- package/dist/website/main/assets/index-YQrh68OP.js +0 -361
- package/dist/website/main/assets/index-d6c7G8Rn.js +0 -1
- package/dist/website/main/assets/index-q7_pRGD0.js +0 -8
- package/dist/website/main/assets/index-r4XZ4Nw3.js +0 -1
- package/dist/website/main/assets/index-ze19z7zX.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-6wuGCBaO.js +0 -2
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BHtswZUO.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Bu8jevdr.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CUQttXIa.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CqTNk_HH.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DDwXMaNL.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DOAvJ6sA.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CAzxiMOC.js +0 -59
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-Cl1itFTX.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DRm0zssd.js +0 -15
- package/dist/website/main/assets/kid-star-D1M-aC1C.css +0 -1
- package/dist/website/main/assets/kid-star-DCy2yzJb.js +0 -1
- package/dist/website/main/assets/md5-CtJDyuNs.js +0 -1
- package/dist/website/main/assets/settings-BMRZp14Y.js +0 -1
- package/dist/website/main/assets/settings-BhagQj3w.css +0 -1
- package/dist/website/main/assets/supervised-user-circle-CZYpyCV4.css +0 -1
- package/dist/website/main/assets/supervised-user-circle-v2VKksba.js +0 -1
- package/dist/website/main/assets/sync-saved-locally-rounded-BKS18Cgx.js +0 -1
- package/dist/website/main/assets/sync-saved-locally-rounded-wbwASI26.css +0 -1
- package/dist/website/main/assets/terminal-CysD-avl.js +0 -1
- package/dist/website/main/assets/terminal-DFt3N_TH.css +0 -1
- package/dist/website/main/assets/useCacheOssStore-E3m2bF9c.js +0 -1
- package/dist/website/main/assets/useCompEditStore-N2mMMlha.css +0 -1
- package/dist/website/main/assets/useCompEditStore-eTcWHaeG.js +0 -1
- package/dist/website/main/assets/useCompMetaLocalStore-BwKMTij9.js +0 -1
- package/dist/website/main/assets/useCompMetaStore-BWz1ZyX_.js +0 -1
- package/dist/website/main/assets/useKeyword-Dmz0UrKO.js +0 -1
- package/dist/website/main/assets/useTeamHeaders-kK4p3F9Z.js +0 -1
- package/dist/website/main/assets/useVscodeOpen-Bwp8Sbsw.js +0 -1
- package/dist/website/main/assets/zhCN-0_iHo67e.js +0 -1
- /package/dist/website/container/assets/{index-DY_KlG_O.js → index-C0I-xtR-.js} +0 -0
- /package/dist/website/item/assets/{_plugin-vue_export-helper-8dCw6Y2Z.css → @iconify-vue-8dCw6Y2Z.css} +0 -0
- /package/dist/website/main/assets/{v4-EwEgHOG0.js → uuid-EwEgHOG0.js} +0 -0
- /package/dist/website/main/assets/{index-m9r9dfRk.css → vuefinder-m9r9dfRk.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as k,i as b,S as v,n as E}from"./engine.io-client-DI6V2dVR.js";import"./engine.io-parser-DPmA-eyr.js";import{E as _}from"./@socket.io-Dkula2eQ.js";import{P as c,p as O}from"./socket.io-parser-dKdiPQ_0.js";function w(i,t="",e){let s=i;e=e||typeof location<"u"&&location,i==null&&(i=e.protocol+"//"+e.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=e.protocol+i:i=e.host+i),/^(https?|wss?):\/\//.test(i)||(typeof e<"u"?i=e.protocol+"//"+i:i="https://"+i),s=k(i)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const o=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port+t,s.href=s.protocol+"://"+o+(e&&e.port===s.port?"":":"+s.port),s}function a(i,t,e){return i.on(t,e),function(){i.off(t,e)}}const L=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y extends _{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[a(t,"open",this.onopen.bind(this)),a(t,"packet",this.onpacket.bind(this)),a(t,"error",this.onerror.bind(this)),a(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,n,o;if(L.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const r={type:c.EVENT,data:e};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const m=this.ids++,g=e.pop();this._registerAckCallback(m,g),r.id=m}const h=(n=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||n===void 0?void 0:n.writable,f=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!h||(f?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){var s;const n=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(n===void 0){this.acks[t]=e;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===t&&this.sendBuffer.splice(h,1);e.call(this,new Error("operation has timed out"))},n),r=(...h)=>{this.io.clearTimeoutFn(o),e.apply(this,h)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...e){return new Promise((s,n)=>{const o=(r,h)=>r?n(r):s(h);o.withError=!0,e.push(o),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((n,...o)=>(this._queue[0],n!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(n)):(this._queue.shift(),e&&e(null,...o)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:c.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case c.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case c.EVENT:case c.BINARY_EVENT:this.onevent(t);break;case c.ACK:case c.BINARY_ACK:this.onack(t);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let s=!1;return function(...n){s||(s=!0,e.packet({type:c.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:c.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const s of e)s.apply(this,t.data)}}}function u(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}u.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*i);i=(Math.floor(t*10)&1)==0?i-e:i+e}return Math.min(i,this.max)|0};u.prototype.reset=function(){this.attempts=0};u.prototype.setMin=function(i){this.ms=i};u.prototype.setMax=function(i){this.max=i};u.prototype.setJitter=function(i){this.jitter=i};class p extends _{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,b(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((s=e.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const n=e.parser||O;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new v(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const n=a(e,"open",function(){s.onopen(),t&&t()}),o=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},r=a(e,"error",o);if(this._timeout!==!1){const h=this._timeout,f=this.setTimeoutFn(()=>{n(),o(new Error("timeout")),e.close()},h);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(n),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(a(t,"ping",this.onping.bind(this)),a(t,"data",this.ondata.bind(this)),a(t,"error",this.onerror.bind(this)),a(t,"close",this.onclose.bind(this)),a(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){E(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new y(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const s of e)if(this.nsps[s].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(n=>{n?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",n)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const d={};function l(i,t){typeof i=="object"&&(t=i,i=void 0),t=t||{};const e=w(i,t.path||"/socket.io"),s=e.source,n=e.id,o=e.path,r=d[n]&&o in d[n].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||r;let f;return h?f=new p(s,t):(d[n]||(d[n]=new p(s,t)),f=d[n]),e.query&&!t.query&&(t.query=e.queryKey),f.socket(e.path,t)}Object.assign(l,{Manager:p,Socket:y,io:l,connect:l});export{l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as A}from"./@socket.io-Dkula2eQ.js";const E=typeof ArrayBuffer=="function",g=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,N=Object.prototype.toString,d=typeof Blob=="function"||typeof Blob<"u"&&N.call(Blob)==="[object BlobConstructor]",w=typeof File=="function"||typeof File<"u"&&N.call(File)==="[object FileConstructor]";function h(t){return E&&(t instanceof ArrayBuffer||g(t))||d&&t instanceof Blob||w&&t instanceof File}function f(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(f(t[e]))return!0;return!1}if(h(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return f(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&f(t[e]))return!0;return!1}function m(t){const r=[],e=t.data,n=t;return n.data=l(e,r),n.attachments=r.length,{packet:n,buffers:r}}function l(t,r){if(!t)return t;if(h(t)){const e={_placeholder:!0,num:r.length};return r.push(t),e}else if(Array.isArray(t)){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=l(t[n],r);return e}else if(typeof t=="object"&&!(t instanceof Date)){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=l(t[n],r));return e}return t}function B(t,r){return t.data=a(t.data,r),delete t.attachments,t}function a(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=a(t[e],r);else if(typeof t=="object")for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=a(t[e],r));return t}const C=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var i;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(i||(i={}));class O{constructor(r){this.replacer=r}encode(r){return(r.type===i.EVENT||r.type===i.ACK)&&f(r)?this.encodeAsBinary({type:r.type===i.EVENT?i.BINARY_EVENT:i.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let e=""+r.type;return(r.type===i.BINARY_EVENT||r.type===i.BINARY_ACK)&&(e+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(e+=r.nsp+","),r.id!=null&&(e+=r.id),r.data!=null&&(e+=JSON.stringify(r.data,this.replacer)),e}encodeAsBinary(r){const e=m(r),n=this.encodeAsString(e.packet),o=e.buffers;return o.unshift(n),o}}class p extends A{constructor(r){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof r=="function"?{reviver:r}:r)}add(r){let e;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(r);const n=e.type===i.BINARY_EVENT;n||e.type===i.BINARY_ACK?(e.type=n?i.EVENT:i.ACK,this.reconstructor=new R(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(h(r)||r.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(r),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let e=0;const n={type:Number(r.charAt(0))};if(i[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===i.BINARY_EVENT||n.type===i.BINARY_ACK){const s=e+1;for(;r.charAt(++e)!=="-"&&e!=r.length;);const c=r.substring(s,e);if(c!=Number(c)||r.charAt(e)!=="-")throw new Error("Illegal attachments");const u=Number(c);if(!_(u)||u<0)throw new Error("Illegal attachments");if(u>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=u}if(r.charAt(e+1)==="/"){const s=e+1;for(;++e&&!(r.charAt(e)===","||e===r.length););n.nsp=r.substring(s,e)}else n.nsp="/";const o=r.charAt(e+1);if(o!==""&&Number(o)==o){const s=e+1;for(;++e;){const c=r.charAt(e);if(c==null||Number(c)!=c){--e;break}if(e===r.length)break}n.id=Number(r.substring(s,e+1))}if(r.charAt(++e)){const s=this.tryParse(r.substr(e));if(p.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return n}tryParse(r){try{return JSON.parse(r,this.opts.reviver)}catch{return!1}}static isPayloadValid(r,e){switch(r){case i.CONNECT:return y(e);case i.DISCONNECT:return e===void 0;case i.CONNECT_ERROR:return typeof e=="string"||y(e);case i.EVENT:case i.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&C.indexOf(e[0])===-1);case i.ACK:case i.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class R{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const e=B(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const _=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function y(t){return Object.prototype.toString.call(t)==="[object Object]"}const V=Object.freeze(Object.defineProperty({__proto__:null,Decoder:p,Encoder:O,get PacketType(){return i}},Symbol.toStringTag,{value:"Module"}));export{i as P,V as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r}from"./pinia-Dbinmd9o.js";const a=r("cacheOssStore",{state:()=>({cacheUrl:{}}),actions:{setCacheUrl(e,t){this.$patch(c=>{c.cacheUrl[e]=t})},getCacheUrl(e){return this.cacheUrl[e]}}});export{a as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as pe,f as Ve,a as re,E as me,d as fe,L as ve,O as ee,P as Ee,r as Fe,a9 as ke,aa as $e,l as Ue,n as Ye,F as ge,M as Be,N as Ge}from"./element-plus-BhtJKS0K.js";import"./dayjs-CODj3Ey3.js";import{u as U}from"./vue-i18n-Cl4PTbxU.js";import{a as l,Q as he,h as ie,c as ce,_ as Ie,D as Te,a5 as He,W as ue,o as J,a6 as Ke,n as We,J as b,x as je,z as ze,e as qe,k as X,Y as Xe,a7 as Je,H as Qe,m as Ze,a8 as et,a9 as tt}from"./index-B5Bwrnd-.js";import{p as B,aj as Pe,O as d,P,V as n,W as w,U as p,u as c,ad as Oe,k as C,aD as ye,i as Y,aB as se,S as V,K as Q,af as ne,a2 as $,a3 as S,Y as ot,aE as De,n as de,w as Z,a as le,l as at,a1 as G,H as nt,aG as st,a0 as rt,Z as lt,d as it,m as ct}from"./@vue-fhDHgfUd.js";import{c as Se}from"./useCompMetaStore-CZbYI0xK.js";import{v as _e}from"./uuid-EwEgHOG0.js";import{d as Ae}from"./lodash-es-3Dei55BW.js";import{y as pt}from"./@vueuse-BzQM40cp.js";import{p as ut}from"./index-BoRu8JTf.js";import{_ as we,u as Me,a as dt}from"./index.vue_vue_type_style_index_0_lang-y99hKbpl.js";import{u as _t}from"./vue-router-Dq9LltUm.js";import"./marked-Ds7eXWqI.js";import{d as mt}from"./pinia-Dbinmd9o.js";const ft={class:"flex justify-between items-center w-full"},Et=B({__name:"PreviewPathItem",props:{modelValue:{},pathConfig:{},cascaderOptions:{},disabled:{type:Boolean}},emits:["change","view"],setup(T,{emit:r}){const o=T,e=r,{t}=U(),a={value:"path",label:"name"},s=C(()=>{const E=o.modelValue[o.pathConfig.pathKey];return Array.isArray(E)?E:[]}),f=C(()=>o.modelValue.activeTab===o.pathConfig.type);function u(E){e("change",E??[])}function _(){e("view")}return(E,m)=>{const h=Ve,g=Pe("Icon"),D=re,I=pe;return d(),P(I,{label:T.pathConfig.label+":",prop:T.pathConfig.prop},{default:n(()=>[w("div",ft,[p(h,{"model-value":s.value,options:T.cascaderOptions,props:a,placeholder:c(t)("comp.pleaseSelectPreviewFile"),clearable:T.pathConfig.clearable,onChange:u},null,8,["model-value","options","placeholder","clearable"]),p(D,{class:"ml-2",type:f.value?"primary":"info",circle:"",disabled:T.disabled,onClick:Oe(_,["stop"])},{default:n(()=>[p(g,{icon:"material-symbols:eye-tracking"})]),_:1},8,["type","disabled"])])]),_:1},8,["label","prop"])}}}),ht={class:"text-right"},vt=B({__name:"Item",props:De({index:{}},{modelValue:{default:()=>({id:"",desc:"",miniPath:[],fullPath:[],activeTab:l.COMP_EDIT_TAB_TYPE_MINI})},modelModifiers:{}}),emits:["update:modelValue"],setup(T,{expose:r}){const o={LOCAL_PREFIX:l.COMP_PREVIEW_PREFIX_LOCAL,VUE_EXTENSION:".vue"},e=T,t=ye(T,"modelValue"),{t:a}=U(),s=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),f=se("form"),u=C(()=>s.compCarouselIndex===E.value),_=C(()=>e.index===0),E=C(()=>s.previewList.findIndex(x=>x._id===t.value._id)),m=C(()=>s.selectedFolder?.path),h=C(()=>s.directory?he.mapTree(s.directory,N=>{const F=N.type==="file"&&N.name.endsWith(o.VUE_EXTENSION);return N.disabled=N.type==="file"&&!F,N}).children??[]:[]),g=C(()=>_.value?{miniPath:[{required:!0,validator:(x,N,F)=>{!N||N.length===0?F(new Error(a("comp.pleaseSelectPreviewFile"))):F()},trigger:"blur"}]}:{}),D=C(()=>[{type:l.COMP_EDIT_TAB_TYPE_MINI,label:a("comp.miniPreviewFile"),prop:_.value?"miniPath":"",pathKey:"miniPath",urlKey:"miniEntryUrl",clearable:!_.value},{type:l.COMP_EDIT_TAB_TYPE_FULL,label:a("comp.fullPreviewFile"),prop:"fullPath",pathKey:"fullPath",urlKey:"fullEntryUrl",clearable:!0}]);function I(x){if(!x.length)return"";const N=s.isOnlineUpdate||s.isAddComp,F=s.isOfflineUpdate&&s.editCompId;if(N){const H=ie.getPreviewUrl(m.value,x);return`${o.LOCAL_PREFIX}/${H}`}return F?L(x):""}function L(x){const F=Se(s.editCompId)().latestVersionToFileAccessPath,H=new Map(F.map(({path:te,signedUrl:y})=>[te,y])),j=ce.replaceBackslashWithSlash(x.at(-1)??"");return H.get(j)??""}function A(x){t.value={...t.value,desc:x}}function i(){s.setCompCarouselIndex(E.value)}function v(x){t.value={...t.value,activeTab:x}}async function O(x,N){const F=N??[],H=I(F),j={[l.COMP_EDIT_TAB_TYPE_MINI]:{miniPath:F,miniEntryUrl:H},[l.COMP_EDIT_TAB_TYPE_FULL]:{fullPath:F,fullEntryUrl:H}};t.value={...t.value,...j[x]},x===l.COMP_EDIT_TAB_TYPE_MINI&&_.value&&(await de(),f.value?.validateField("miniPath"))}function k(){t.value._id&&s.delPreviewCompItemById(t.value._id)}function W(){return f.value?.validate()}return r({validateForm:W}),(x,N)=>{const F=fe,H=pe,j=me,te=re,y=ve;return d(),P(y,{"body-class":"!p-0",class:ot(["cursor-pointer p-[5px] overflow-auto",{active:u.value}]),onClick:i},{default:n(()=>[p(j,{ref:"form",model:t.value,rules:g.value,"label-width":"auto"},{default:n(()=>[(d(!0),V(Q,null,ne(D.value,M=>(d(),P(Et,{key:M.type,modelValue:t.value,"onUpdate:modelValue":N[0]||(N[0]=R=>t.value=R),"path-config":M,"cascader-options":h.value,disabled:!u.value,onChange:R=>O(M.type,R),onView:()=>v(M.type)},null,8,["modelValue","path-config","cascader-options","disabled","onChange","onView"]))),128)),p(H,{label:c(a)("comp.remarkDesc")+":"},{default:n(()=>[p(F,{"model-value":t.value.desc,type:"textarea",onInput:A},null,8,["model-value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),w("div",ht,[p(te,{type:"danger",disabled:_.value,onClick:Oe(k,["stop"])},{default:n(()=>[$(S(c(a)("common.delete")),1)]),_:1},8,["disabled"])])]),_:1},8,["class"])}}}),Ct=Ie(vt,[["__scopeId","data-v-78a07d6e"]]),gt={class:"size-full overflow-auto flex flex-col gap-2 items-start"},It=B({__name:"index",setup(T){const{t:r}=U(),o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),e=Y(l.PROVIDE_KEY_CALLBACKS),t=se("items");async function a(){if(o.previewList.length>=5){Ee.error(r("comp.maxPreviewEntry",{n:5}));return}o.addPreviewCompItem({_id:_e(),miniPath:[],fullPath:[],activeTab:l.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}),await de(),o.setCompCarouselIndex(o.previewList.length-1)}function s(f){const{_id:u}=f;u&&o.updatePreviewCompItemById(u,f)}return e.set(l.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM,()=>{t.value?.forEach(f=>{f?.validateForm()})}),(f,u)=>{const _=re,E=ee;return d(),V("div",gt,[p(_,{type:"primary",onClick:a},{default:n(()=>[$(S(c(r)("comp.addPreviewEntry")),1)]),_:1}),p(E,{class:"flex-1 overflow-x-hidden size-full"},{default:n(()=>[p(c(Te),{class:"size-full",isEmpty:!c(o).previewList.length,emptyDescription:c(r)("comp.pleaseAddPreviewEntry")},{default:n(()=>[p(c(He),{"item-min-width":350},{default:n(()=>[(d(!0),V(Q,null,ne(c(o).previewList,(m,h)=>(d(),P(Ct,{ref_for:!0,ref:"items",key:m._id,index:h,"model-value":m,"onUpdate:modelValue":s},null,8,["index","model-value"]))),128))]),_:1})]),_:1},8,["isEmpty","emptyDescription"])]),_:1})])}}}),Tt=B({__name:"ExtraInfo",setup(T){const{t:r}=U(),o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),e=Y(l.PROVIDE_KEY_CALLBACKS),t=se("form"),a=le(200),s={name:[{required:!0,validator:(m,h,g)=>{if(!h)return g(new Error(r("comp.compNameRequired")));ce.validateCompName(h)?g():g(new Error(r("comp.compNameNamingRule")))},trigger:["blur"]}],description:[{required:!0,message:r("comp.remarksDescRequired"),trigger:"blur"},{min:3,max:a.value,message:r("comp.lengthBetween",{min:3,max:a.value}),trigger:"blur"}]},f=C(()=>o.selectedFolder.basename);async function u(){await t.value?.validate()}function _(m){o.setExtraInfo({...o.extraInfo,description:m.trim()})}function E(m){o.setExtraInfo({...o.extraInfo,name:m.trim()})}return Z(f,m=>{o.extraInfo.name||o.setExtraInfo({...o.extraInfo,name:m})},{immediate:!0}),e.set(l.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM,u),(m,h)=>{const g=fe,D=pe,I=ee;return d(),P(I,{class:"size-full"},{default:n(()=>[p(c(me),{ref:"form","label-width":"auto",model:c(o).extraInfo,rules:s},{default:n(()=>[p(D,{label:c(r)("comp.name")+":",prop:"name"},{default:n(()=>[p(g,{maxlength:50,"show-word-limit":"","model-value":c(o).extraInfo.name,placeholder:c(r)("comp.pleaseInputCompName"),onInput:E},null,8,["model-value","placeholder"])]),_:1},8,["label"]),p(D,{label:c(r)("comp.remarksDesc")+":",prop:"description"},{default:n(()=>[p(g,{maxlength:a.value,"show-word-limit":"","model-value":c(o).extraInfo.description,placeholder:c(r)("comp.pleaseInputRemarks"),rows:4,type:"textarea",onInput:_},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1})}}}),Pt={class:"flex items-center gap-[50px]"},Ot=B({__name:"Dir",setup(T){const r={children:"children",label:"name"},o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),e=le([]);return Z(()=>o.directory,t=>{t?.children&&(e.value=Ae(t.children))},{deep:!0,immediate:!0}),(t,a)=>{const s=Fe,f=ee;return d(),P(f,{class:"size-full tree-container"},{default:n(()=>[p(s,{data:e.value,props:r},{default:n(({node:u})=>[w("div",Pt,[w("span",null,S(u.label),1)])]),_:1},8,["data"])]),_:1})}}}),yt={class:"flex gap-[10px] items-center justify-center"},Dt={class:"inline-block"},St={key:0,class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},At={class:"inline-block"},wt={class:"size-full flex justify-center items-center"},Mt={class:"inline-block"},bt={class:"flex gap-2"},Lt={key:0},Rt={class:"ml-auto"},xt=B({__name:"Deps",setup(T){const{t:r}=U(),o=C(()=>({TITLE_LOCAL:r("comp.localDep"),TITLE_ONLINE:r("comp.onlineDep"),TITLE_FINAL:r("comp.finalDep"),LABEL_LOCAL:r("comp.localVersion"),LABEL_ONLINE:r("comp.onlineVersion"),EMPTY_ONLINE_DEPS:r("comp.onlineDepEmpty"),TAG_CONSISTENT:r("comp.versionConsistent"),TAG_CHANGE:r("comp.versionChange"),TAG_CHANGE_CONFIRMED:r("comp.versionChangeConfirmed"),TAG_ADD:r("comp.newDep"),TYPE_CONSISTENT:"consistent",TYPE_CHANGE:"change",TYPE_ADD:"add",SOURCE_LOCAL:"local",SOURCE_ONLINE:"online"})),e=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),t=le({}),a=C(()=>ie.handleDepData(e.compDep)),s=C(()=>ie.handleDepData(e.onlineCompDep)),f=C(()=>{const E={};return s.value.length===0&&e.isEditComp||a.value.forEach(m=>{const h={},g=s.value.find(D=>D.name===m.name);g?ue.isVersionEqual(m.version??"",g.version??"")?(h.selectedVersion=m.version,h.type=o.value.TYPE_CONSISTENT):(h.type=o.value.TYPE_CHANGE,h.selectedVersion=t.value[m.name]||"",h.versions=[{version:m.version,type:o.value.SOURCE_LOCAL},{version:g.version,type:o.value.SOURCE_ONLINE}]):(h.selectedVersion=m.version,h.type=o.value.TYPE_ADD),E[m.name]=h}),E}),u=C(()=>Object.keys(s.value).length===0);function _(E,m){t.value[E]=m}return Z(()=>f.value,E=>{for(const m in E){const h=E[m];h.type!==o.value.TYPE_CHANGE&&(t.value[m]=h.selectedVersion)}},{immediate:!0,deep:!0}),at(()=>{e.setAffirmCompDep(Ae(t.value))}),(E,m)=>{const h=$e,g=ke,D=ve,I=Ye,L=Ue,A=ge,i=ee;return d(),P(i,{class:"size-full"},{default:n(()=>[w("div",yt,[p(D,{"body-class":"!p-0",class:"p-[5px]"},{default:n(()=>[w("div",null,[p(g,{title:o.value.TITLE_LOCAL,column:1,border:"","label-width":"auto"},{default:n(()=>[(d(!0),V(Q,null,ne(a.value,(v,O)=>(d(),P(h,{key:O},{label:n(()=>[w("div",Dt,S(v.name),1)]),default:n(()=>[$(" "+S(v.version),1)]),_:2},1024))),128))]),_:1},8,["title"])])]),_:1}),u.value?G("",!0):(d(),V("div",St,"+")),u.value?G("",!0):(d(),P(D,{key:1,"body-class":"!p-0",class:"p-[5px]"},{default:n(()=>[p(c(Te),{isEmpty:u.value,class:"size-full"},{"empty-content":n(()=>[w("div",wt,S(o.value.EMPTY_ONLINE_DEPS),1)]),default:n(()=>[p(g,{title:o.value.TITLE_ONLINE,column:1,border:"","label-width":"auto"},{default:n(()=>[(d(!0),V(Q,null,ne(s.value,(v,O)=>(d(),P(h,{key:O},{label:n(()=>[w("div",At,S(v.name),1)]),default:n(()=>[$(" "+S(v.version),1)]),_:2},1024))),128))]),_:1},8,["title"])]),_:1},8,["isEmpty"])]),_:1})),m[0]||(m[0]=w("div",{class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},"=",-1)),p(D,{"body-class":"!p-0 !overflow-hidden",class:"p-[5px] overflow-hidden"},{default:n(()=>[p(g,{title:o.value.TITLE_FINAL,column:1,border:"","label-width":"auto"},{default:n(()=>[(d(!0),V(Q,null,ne(f.value,(v,O)=>(d(),P(h,{key:O},{label:n(()=>[w("div",Mt,S(O),1)]),default:n(()=>[w("div",bt,[w("div",null,[v.versions?.length?(d(),P(L,{key:1,"model-value":v.selectedVersion,size:"small",class:"ml-[10px]",onChange:k=>_(O,k)},{default:n(()=>[(d(!0),V(Q,null,ne(v.versions,k=>(d(),P(I,{key:k.version,value:k.version},{default:n(()=>[w("span",null,S(k.type===o.value.SOURCE_LOCAL?o.value.LABEL_LOCAL:o.value.LABEL_ONLINE)+" "+S(k.version),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["model-value","onChange"])):(d(),V("span",Lt,S(v.selectedVersion),1))]),w("div",Rt,[v.type===o.value.TYPE_CONSISTENT?(d(),P(A,{key:0,type:"info","disable-transitions":""},{default:n(()=>[$(S(o.value.TAG_CONSISTENT),1)]),_:1})):v.type===o.value.TYPE_CHANGE&&!v.selectedVersion?(d(),P(A,{key:1,type:"danger","disable-transitions":""},{default:n(()=>[$(S(o.value.TAG_CHANGE),1)]),_:1})):v.type===o.value.TYPE_CHANGE&&v.selectedVersion?(d(),P(A,{key:2,type:"success","disable-transitions":""},{default:n(()=>[$(S(o.value.TAG_CHANGE_CONFIRMED),1)]),_:1})):v.type===o.value.TYPE_ADD?(d(),P(A,{key:3,type:"success","disable-transitions":""},{default:n(()=>[$(S(o.value.TAG_ADD),1)]),_:1})):G("",!0)])])]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})])]),_:1})}}}),Nt={class:"flex items-center gap-[4px]"},Vt={key:0},Ft=B({__name:"VersionInput",props:De({disabled:{type:Boolean},latestVersion:{}},{modelValue:{default:()=>({major:"",minor:"",patch:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(T){const r=T,o=ye(T,"modelValue"),{t:e}=U(),t=["major","minor","patch"],a={width:"60px"};function s(_){return`${_.major}.${_.minor}.${_.patch}`}function f(_,E){const m={...o.value,[E]:_},h=s(m);if(u(h)){Ee.warning(e("comp.versionCannotBeLessThanLatest",{version:r.latestVersion}));return}o.value=m}function u(_){return r.latestVersion?ue.compareVersions(_,r.latestVersion)===l.VERSION_COMPARE_LESS:!1}return(_,E)=>{const m=fe;return d(),V("div",Nt,[(d(),V(Q,null,ne(t,(h,g)=>(d(),V(Q,{key:h},[p(m,{"model-value":o.value[h],style:a,min:0,size:"small",type:"number",disabled:T.disabled,onInput:D=>f(D,h)},null,8,["model-value","disabled","onInput"]),g<t.length-1?(d(),V("span",Vt,".")):G("",!0)],64))),64))])}}}),kt={class:"flex gap-2 items-center"},$t={key:0},Ut={class:"flex items-center gap-2"},Yt={key:0},Bt={class:"text-red-500"},Gt=B({__name:"index",emits:["showDiff"],setup(T){const{t:r}=U(),o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),e=Y(l.PROVIDE_KEY_CALLBACKS),t=le({major:"",minor:"",patch:""}),a=C(()=>o.selectedFolder?.path??""),s=C(()=>o.configStatus?.compJsonPath??""),f=C(()=>o.configStatus?.entryIndexPath??""),u=C(()=>o.configStatus?.errorMsg??""),_=C(()=>o.isNeedAddVersion||o.isEditCompFileChange);async function E(){const I=await J.v1Comp.compcontrollerCheck({compPath:a.value});o.setConfigStatus(I.data)}async function m(){await J.v1Comp.compcontrollerGeneratecompjson({compPath:a.value});const I=await J.v1Comp.compcontrollerDir({compPath:a.value}),{tree:L,files:A}=I.data;o.setOriginalDirectory(L),o.setOriginalDirectoryList(A),await E(),Ee.success(r("common.generateSuccess"))}function h(I){const[L="1",A="0",i="0"]=I.split(".");return{major:L,minor:A,patch:i}}function g(I){const{major:L,minor:A,patch:i}=I,v=["undefined","null"];return![L,A,i].some(O=>O===""||Ke.isType(O,v))}function D(I){return`${I.major}.${I.minor}.${I.patch}`}return Z(t,async(I,L)=>{if(!g(I))return;const A=D(I),i=L?D(L):"";A!==i&&(await J.v1Comp.compcontrollerUpdateversion({compPath:a.value,version:A}),await E(),o.setLocalCompVersion(A))},{deep:!0}),Z(()=>o.localCompVersion,I=>{I&&(t.value=h(I))},{immediate:!0}),e.set(l.COMP_METHOD_KEY_CHECK_COMP_CONFIG,E),(I,L)=>{const A=pe,i=re,v=ge,O=me,k=ee;return d(),P(k,{class:"size-full"},{default:n(()=>[p(O,{"label-width":"auto"},{default:n(()=>[p(A,{label:c(r)("comp.entryFile")+":"},{default:n(()=>[w("span",null,S(f.value),1)]),_:1},8,["label"]),p(A,{label:c(r)("comp.configFile")+":"},{default:n(()=>[w("div",kt,[s.value?(d(),V("span",$t,S(s.value),1)):(d(),P(i,{key:1,size:"small",onClick:m},{default:n(()=>[$(S(c(r)("common.generate")),1)]),_:1})),u.value&&s.value?(d(),P(i,{key:2,size:"small",onClick:m},{default:n(()=>[$(S(c(r)("common.regenerate")),1)]),_:1})):G("",!0)])]),_:1},8,["label"]),p(A,{label:c(r)("comp.version")+":"},{default:n(()=>[w("div",Ut,[p(Ft,{modelValue:t.value,"onUpdate:modelValue":L[0]||(L[0]=W=>t.value=W),"latest-version":c(o).prodCompVersion,disabled:!c(o).compFileIsChange},null,8,["modelValue","latest-version","disabled"]),_.value?(d(),V("div",Yt,[c(o).isNeedAddVersion?(d(),P(v,{key:0,type:"danger","disable-transitions":!0},{default:n(()=>[$(S(c(r)("comp.fileChangedNeedVersion")),1)]),_:1})):G("",!0),c(o).isEditCompFileChange?(d(),P(i,{key:1,size:"small",class:"ml-2",onClick:L[1]||(L[1]=W=>I.$emit("showDiff"))},{default:n(()=>[$(S(c(r)("comp.viewFileChanges")),1)]),_:1})):G("",!0)])):c(o).isVersionChangeButFileSame?(d(),P(v,{key:1,type:"danger","disable-transitions":!0},{default:n(()=>[$(S(c(r)("comp.versionChangedButFileSame")),1)]),_:1})):G("",!0)])]),_:1},8,["label"]),u.value?(d(),P(A,{key:0,label:c(r)("comp.errorMsg")+":"},{default:n(()=>[w("span",Bt,S(u.value),1)]),_:1},8,["label"])):G("",!0)]),_:1})]),_:1})}}}),Ht=B({__name:"UpgradeLog",setup(T){const{t:r}=U(),o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),e=Y(l.PROVIDE_KEY_CALLBACKS),t=le(200),a=se("form"),s=C(()=>({upgradeLog:[{required:!0,message:r("comp.pleaseInputUpgradeLog"),trigger:"blur"},{min:3,max:t.value,message:r("comp.lengthBetween",{min:3,max:t.value}),trigger:"blur"}]}));function f(_){o.setUpgradeInfo({...o.upgradeInfo,upgradeLog:_})}async function u(){await a.value?.validate()}return e.set(l.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM,u),(_,E)=>{const m=fe,h=pe,g=ee;return d(),P(g,{class:"size-full"},{default:n(()=>[p(c(me),{ref:"form","label-width":"auto",model:c(o).upgradeInfo,rules:s.value},{default:n(()=>[p(h,{label:c(r)("comp.upgradeLog")+":",prop:"upgradeLog"},{default:n(()=>[p(m,{maxlength:t.value,"show-word-limit":"","model-value":c(o).upgradeInfo.upgradeLog,placeholder:c(r)("comp.pleaseInputUpgradeLog"),rows:4,type:"textarea",onInput:f},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})}}}),Kt=T=>{const{locale:r}=U();return{src:C(()=>`/${l.WEBSITE_PATH_MAIN}/md/${T.replace(".md",`.${r.value}.md`)}`)}},Wt={class:"h-[70vh] overflow-hidden flex flex-col"},jt={key:0,class:"flex justify-end"},zt={class:"text-lg"},qt={class:"text-lg"},Xt=B({__name:"index",props:{isAction:{type:Boolean,default:!0}},setup(T,{expose:r}){const{t:o}=U(),e=le(!1),{src:t}=Kt("PUT_TREATY.md");let a;function s(_){e.value=!0,a=_}function f(){e.value=!1}function u(_){a?.(_),f()}return r({open:s,close:f}),(_,E)=>{const m=ee,h=re;return d(),P(c(We),{modelValue:e.value,"onUpdate:modelValue":E[2]||(E[2]=g=>e.value=g),title:"",width:"55%","show-close":"",top:"10vh"},{default:n(()=>[w("div",Wt,[p(m,{class:"flex-1 flex justify-center"},{default:n(()=>[p(we,{src:c(t)},null,8,["src"])]),_:1}),T.isAction?(d(),V("div",jt,[p(h,{onClick:E[0]||(E[0]=g=>u(!1))},{default:n(()=>[w("span",zt,S(c(o)("team.reject")),1)]),_:1}),p(h,{type:"primary",onClick:E[1]||(E[1]=g=>u(!0))},{default:n(()=>[w("span",qt,S(c(o)("team.agree")),1)]),_:1})])):G("",!0)])]),_:1},8,["modelValue"])}}}),Jt={class:"size-full"},Qt=["src"],Zt=B({__name:"index",props:{compType:{},iuid:{}},setup(T){const r=T,o=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),{instanceUid:e,messageListener:t,sendMessageToTargetIframe:a}=b.usePostMessage(),s=je.useLeafOrigin(!1,window.__GLOBAL_CONFIG__.subPort),{createIframeParams:f}=ze.useIframeParams(),{addListener:u}=t(),_=qe(),m=pt().value,{locale:h}=U(),g=(()=>{const i={topOrigin:window.location.origin,instanceUid:[e.value,r.iuid].join(",")??"",isSfc:!0},v={params:f(i),isDark:m.toString()},O=new URLSearchParams(v).toString();return`${s}/${l.WEBSITE_PATH_ITEM}/${r.compType}?${O}`})(),D=se("iframe"),I=se("dialogPutTreaty"),L=C(()=>o.selectedFolder?.path);async function A(){const v=ut(o.compDep,_.deps).map(W=>W.name),O=await J.v1Module.modulecontrollerPrebuild({deps:v}),{entryNameToFile:k={}}=O.data;return k}return u(b.IFRAME_POST_MESSAGE_TYPE.COMP_PREVIEW_LIST_GET,X.useIframeBroadcast(C(()=>o.previewList),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.COMP_PREVIEW_LIST_SET,o.previewList,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.COMP_EDIT_TAB_TYPE_SET,i=>{o.updatePreviewCompItemById(i._id,i)}),u(b.IFRAME_POST_MESSAGE_TYPE.COMP_RENDER_INFO_GET,X.useIframeBroadcast(C(()=>o.compDep),async()=>{const v={entryNameToFile:await A(),compDep:o.compDep,signedUrls:o.signedUrls},O=D.value?.contentWindow;O&&a(O,b.IFRAME_POST_MESSAGE_TYPE.COMP_RENDER_INFO_SET,v,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.SHOW_REFRESH_BTN_GET,X.useIframeBroadcast(C(()=>o.isShowRefreshBtn),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.SHOW_REFRESH_BTN_SET,o.isShowRefreshBtn,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.IS_ONLINE_UPDATE_GET,X.useIframeBroadcast(C(()=>o.isOnlineUpdate),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.IS_ONLINE_UPDATE_SET,o.isOnlineUpdate,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.CAROUSEL_INDEX_GET,X.useIframeBroadcast(C(()=>o.compCarouselIndex),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.CAROUSEL_INDEX_SET,o.compCarouselIndex,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.IS_ADD_GET,X.useIframeBroadcast(C(()=>o.isAddComp),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.IS_ADD_SET,o.isAddComp,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.ACTION_REFRESH,i=>{if(i.activeTab===l.COMP_EDIT_TAB_TYPE_MINI&&i.miniPath?.length){const v=ie.getPreviewUrl(L?.value||"",i.miniPath),O=v?`${l.COMP_PREVIEW_PREFIX_LOCAL}/${v}?v=${_e()}`:"";o.updatePreviewCompItemById(i._id,{...i,miniEntryUrl:O})}if(i.activeTab===l.COMP_EDIT_TAB_TYPE_FULL&&i.fullPath?.length){const v=ie.getPreviewUrl(L?.value||"",i.fullPath||[]),O=v?`${l.COMP_PREVIEW_PREFIX_LOCAL}/${v}?v=${_e()}`:"";o.updatePreviewCompItemById(i._id,{...i,fullEntryUrl:O})}}),u(b.IFRAME_POST_MESSAGE_TYPE.ACTION_UPLOAD_PROTOCOL,()=>{I.value?.open()}),u(b.IFRAME_POST_MESSAGE_TYPE.BG_COLOR_GET,X.useIframeBroadcast(C(()=>o.compBgColor),()=>{const i=D.value?.contentWindow;i&&a(i,b.IFRAME_POST_MESSAGE_TYPE.BG_COLOR_SET,o.compBgColor,s)}).triggerCallback),u(b.IFRAME_POST_MESSAGE_TYPE.BG_COLOR_SET,i=>{o.setCompBgColor(i)}),u(b.IFRAME_POST_MESSAGE_TYPE.LOCALE_GET,()=>{const{stopWatch:i,triggerCallback:v}=X.useIframeBroadcast(C(()=>h.value),()=>{const O=D.value?.contentWindow;O?a(O,b.IFRAME_POST_MESSAGE_TYPE.LOCALE_SET,h.value,s):i()});v()}),(i,v)=>(d(),V("div",Jt,[w("iframe",{ref:"iframe",class:"size-full",src:c(g),frameborder:"0"},null,8,Qt),p(Xt,{ref:"dialogPutTreaty",isAction:!1},null,512)]))}}),Ce=B({__name:"MarkdownPreview",props:{result:{}},setup(T){const{t:r}=U(),o=_t(),{markdownSrc:e}=Me();function t(){const{href:a}=o.resolve({name:"mdPreview",query:{markdownSrc:e.value}});window.open(a,"_blank")}return(a,s)=>{const f=Pe("Icon"),u=re,_=ee;return d(),P(_,{"wrap-class":"md-container",class:"relative"},{default:n(()=>[c(e)?(d(),P(u,{key:0,type:"primary",circle:"",title:c(r)("common.newPage"),class:"absolute top-0 right-3 z-100",onClick:t},{default:n(()=>[p(f,{icon:"material-symbols:screen-share-rounded"})]),_:1},8,["title"])):G("",!0),p(we,{result:T.result,src:c(e),"show-toc":!0,scrollContainer:".md-container","is-debug":!0},null,8,["result","src"])]),_:1})}}}),eo={class:"size-full"},to={class:"flex-1 overflow-hidden p-2"},oo={class:"flex justify-center p-1"},ao=B({__name:"index",emits:["confirmUpload","reload"],setup(T,{emit:r}){const o=r,{t:e}=U(),t=it(),a=Y(l.PROVIDE_KEY_COMP_EDIT_STORE),s=ct(new Map);nt(l.PROVIDE_KEY_CALLBACKS,s);const{messageListener:f}=b.usePostMessage(),{addListener:u}=f(),_=se("diffDialog"),E=le([]),m=C(()=>a.selectedFolder?.path),h=C(()=>({version:e("comp.remoteVersionPrefix")+a.prodCompVersion})),g=C(()=>({version:e("comp.localVersionPrefix")+a.localCompVersion})),{markdownSrc:D}=Me(),I=dt(D),L=C(()=>[{label:e("comp.previewConfig"),value:l.TAB_TYPE_PREVIEW,isDot:a.previewIsError,component:It,visible:()=>!0,validate:()=>a.previewIsError?{valid:!1,callbackKey:l.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM}:{valid:!0}},{label:e("comp.baseInfo"),value:l.TAB_TYPE_EXTRA,isDot:a.extraIsError,component:Tt,visible:()=>!0,validate:()=>a.extraIsError?{valid:!1,callbackKey:l.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM}:{valid:!0}},{label:e("comp.checkConfig"),value:l.TAB_TYPE_CONFIG,isDot:a.configIsError,component:Gt,visible:()=>a.isOnlineUpdate||a.isAddComp,validate:()=>a.configIsError?{valid:!1,callbackKey:l.COMP_METHOD_KEY_CHECK_COMP_CONFIG}:{valid:!0}},{label:e("comp.dep"),value:l.TAB_TYPE_DEPS,isDot:a.compDepIsError,component:xt,visible:()=>a.isOnlineUpdate||a.isAddComp,validate:()=>a.compDepIsError?{valid:!1}:{valid:!0}},{label:e("comp.upgradeLog"),value:l.TAB_TYPE_UPGRADE_LOG,isDot:a.upgradeLogIsError,component:Ht,visible:()=>a.isShowUpgradeLogTab,validate:()=>a.upgradeLogIsError?{valid:!1,callbackKey:l.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM}:{valid:!0}},{label:"README.md",value:l.TAB_TYPE_README,isDot:a.markdownIsError,component:Ce,visible:()=>!a.isOfflineUpdate,validate:()=>a.markdownIsError?{valid:!1}:{valid:!0}},{label:e("comp.dir"),value:l.TAB_TYPE_DIR,component:Ot,visible:()=>a.isOnlineUpdate||a.isAddComp}]),A=C(()=>L.value.filter(y=>y.visible?.()??!0)),i=C(()=>A.value.find(M=>M.value===a.activeName)?.component||{render:()=>null}),v=C(()=>i.value===Ce?{result:I.result.value}:{});function O(y){a.setActiveName(y)}async function k(){for(const y of s.keys())if(y.startsWith(l.COMP_METHOD_KEY_GET_COMP_ERROR)&&s.get(y)?.())return!0;return!1}async function W(y){if(y.start(),await k()&&a.isOnlineUpdate){Ee.error(e("message.error.pleaseFixCompileError")),y.end();return}for(const M of A.value){if(!M.validate)continue;const R=M.validate();if(!R.valid){a.setActiveName(""),await de(),a.setActiveName(M.value),R.callbackKey&&s.get(R.callbackKey)?.(),y.end();return}}o("confirmUpload",{end:y.end})}async function x(){const y=await J.v1Comp.compcontrollerCheck({compPath:m.value});a.setConfigStatus(y.data)}async function N(){const M=(a.originalDirectory.children||[]).find(z=>z.name===l.COMP_CONFIG_FILENAME);if(!M)return;const R=await J.v1Comp.compcontrollerFile({filePath:M.path}),{content:oe}=R.data,ae=JSON.parse(oe);a.setLocalCompVersion(ae.version)}async function F(){await te(),E.value=j(),await de(),_.value?.open()}async function H(){await te(),E.value=j()}function j(){const y=a.localDirectory?.children??[],M=a.onlineDirectory?.children??[],R=tt.mergeAndMarkTree(y,M),ae=Se(a.editCompId)().latestVersionToFileAccessPath;function z(q){for(const K of q){if(K.type==="file"){K.path=ce.replaceBackslashWithSlash(K.path);const Le={type:"old",accessPath:ae.find(Ne=>Ne.path===K.path)?.signedUrl??""},Re=`${m.value.replace(l.FILE_MANAGER_DIRNAME,"")}${K.path}`,xe={type:"new",accessPath:`${l.COMP_PREVIEW_PREFIX_LOCAL}/${Re}`};K.content=[Le,xe]}K.children?.length&&z(K.children)}}return z(R),R}async function te(){const y=await J.v1Comp.compcontrollerDir({compPath:m.value}),{tree:M,files:R}=y.data;a.setOriginalDirectory(M),a.setOriginalDirectoryList(R)}return u(b.IFRAME_POST_MESSAGE_TYPE.ACTION_RELOAD,()=>{o("reload")}),Z(()=>a.originalDirectory,async()=>{await N()},{immediate:!0,deep:!0}),Z(()=>m.value,async(y,M)=>{y===M||!y||(await te(),await x())},{immediate:!0}),Z(I.result,y=>{if(!y)return;const{headings:M=[]}=y;if(M.length){const R=M.every(oe=>{const ae=oe.tokens.map(q=>q?.text||"").join(""),{valid:z}=ce.validateHash(ae);return z});a.setMarkdownValid(R)}}),(y,M)=>{const R=ve,oe=Ge,ae=re,z=Be;return d(),V("div",eo,[p(z,{class:"size-full",layout:"vertical"},{default:n(()=>[p(oe,{class:"size-full",size:"50%",min:300},{default:n(()=>[p(R,{"body-class":"!p-0",class:"size-full"},{default:n(()=>[p(Zt,{compType:c(l).IFRAME_COMP_TYPE_EDIT_PANEL,iuid:c(t)?.uid},null,8,["compType","iuid"])]),_:1})]),_:1}),p(oe,{class:"size-full",collapsible:""},{default:n(()=>[p(R,{"body-class":"!p-0 flex flex-col",class:"size-full"},{default:n(()=>[p(R,{"body-class":"!p-0"},{default:n(()=>[p(c(Xe),{"model-value":c(a).activeName,options:A.value,onChange:O},{default:n(({item:q})=>[p(c(Je),{"is-dot":q.isDot},{default:n(()=>[$(S(q.label),1)]),_:2},1032,["is-dot"])]),_:1},8,["model-value","options"])]),_:1}),w("div",to,[p(c(Qe),null,{default:n(()=>[(d(),P(st,null,[(d(),P(rt(i.value),lt(v.value,{onShowDiff:F}),null,16))],1024))]),_:1})]),w("div",oo,[p(c(Ze),null,{default:n(({instance:q,loading:K})=>[p(ae,{loading:K,type:"primary",class:"w-[200px]",round:"",onClick:be=>W(q)},{default:n(()=>[$(S(c(a).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:1})]),_:1}),E.value.length?(d(),P(c(et),{key:0,ref:"diffDialog",resultTree:E.value,oldMeta:h.value,newMeta:g.value,onRefresh:H},null,8,["resultTree","oldMeta","newMeta"])):G("",!0)])}}}),go=Ie(ao,[["__scopeId","data-v-ba6df5e0"]]),Io=(T,r)=>{const{t:o}=U();return mt(`compEdit_${T}`,{state:()=>({scopeId:T,extraInfo:{},upgradeInfo:{},previewList:[],compDep:[],onlineCompDep:[],affirmCompDep:{},activeName:"preview",compCarouselIndex:0,selectedFolder:{},originalDirectory:{},originalDirectoryList:[],compDialogType:r??"",editCompId:"",compBgColor:"",configStatus:{},compDetail:{},localCompHash:"",remoteCompHash:"",localCompVersion:"",loading:!1,compUpdateType:"",signedUrls:[],markdownValid:!0}),getters:{isInitState:e=>e.compDialogType.trim()==="",isEditComp:e=>e.compDialogType===l.DIALOG_TYPE_EDIT,isAddComp:e=>e.compDialogType===l.DIALOG_TYPE_ADD,isOnlineUpdate:e=>e.compUpdateType===l.COMP_UPDATE_TYPE_ONLINE,isOfflineUpdate:e=>e.compUpdateType===l.COMP_UPDATE_TYPE_OFFLINE,isShowRefreshBtn(){return this.isOnlineUpdate||this.isAddComp},prodCompVersion:e=>e.compDetail?.version||"",versionCompareResult(){return!this.localCompVersion||!this.prodCompVersion?l.VERSION_COMPARE_GREATER:ue.compareVersions(this.localCompVersion,this.prodCompVersion)},isEditCompFileChange(){return this.compFileIsChange&&this.isEditComp},isNeedAddVersion(){return this.versionCompareResult!==1&&this.isEditCompFileChange},compSubmitBtnText(){return this.isEditComp?o("comp.update"):this.isAddComp?o("comp.upload"):""},previewIsError(e){if(this.isInitState||this.loading)return!1;const t=e.previewList;return t[0]?.miniPath?.length?!t.length:!0},configIsException:e=>{const{errorMsg:t}=e.configStatus;return!!t},configIsError(){return this.isInitState||this.loading||this.isOfflineUpdate?!1:!!(this.isNeedAddVersion||this.configIsException||this.isVersionChangeButFileSame)},extraIsError(e){if(this.isInitState||this.loading)return!1;const t=e.extraInfo.name?.trim()||"";return(e.extraInfo?.description||"").length<3||!ce.validateCompName(t)},compDepIsError(e){if(!e.onlineCompDep.length||this.isOfflineUpdate)return!1;let t=!1;return e.compDep.forEach(a=>{const s=e.onlineCompDep.find(_=>_.name===a.name),f=e.affirmCompDep[a.name]??e.affirmCompDep[a?.parent?.name??""];!ue.isVersionEqual(a?.version??"",s?.version??"")&&!f&&(t=!0)}),t},compFileIsChange:e=>e.localCompHash!==e.remoteCompHash,isVersionChangeButFileSame(){return this.versionCompareResult!==l.VERSION_COMPARE_SAME&&!this.compFileIsChange&&this.isEditComp},isShowUpgradeLogTab(e){return this.isInitState||this.loading?!1:!!(this.compFileIsChange&&e.editCompId)},upgradeLogIsError(e){if(this.isOfflineUpdate)return!1;const t=e.upgradeInfo?.upgradeLog||"",a=this.versionCompareResult===l.VERSION_COMPARE_GREATER;return(t.length||0)<3&&(this.compFileIsChange||a)&&this.isEditComp},markdownIsError(e){return this.hasMdFile?!e.markdownValid:!1},affirmCompDepVersion:e=>e.compDep.map(t=>{const a=e.affirmCompDep[t.name],s=e.affirmCompDep[t?.parent?.name??""],f=a??s??t.version,u=t.parent?{parent:{...t.parent,version:f}}:{};return{...t,version:f,...u}}),localDirectory:e=>{const{srcPath:t,sep:a}=window.__GLOBAL_CONFIG__,s=e.selectedFolder.path;if(!s||Object.keys(e.originalDirectory).length===0)return null;const f=s.replace(l.FILE_MANAGER_DIRNAME,"").replaceAll("/",a);return he.mapTree(e.originalDirectory,_=>(_.path=_.path.replace(`${t}${a}${f}`,""),_))},onlineDirectory:e=>e.compDetail.files?.length?he.convertFlatToTree(e.compDetail.files,{pathSeparator:"\\",createNode:(t,a,s)=>({name:a,path:s.startsWith("\\")?s:"\\"+s,type:t,children:[]})}):null,directory(){return this.localDirectory?this.localDirectory:this.onlineDirectory},hasMdFile(){return this.directory?.children?.find(e=>e.name===l.COMP_README_FILENAME)!==void 0}},actions:{setMarkdownValid(e){this.$patch(t=>{t.markdownValid=e})},setSignedUrls(e){this.$patch(t=>{t.signedUrls=e})},setCompUpdateType(e){this.$patch(t=>{t.compUpdateType=e})},setLocalCompVersion(e){this.$patch(t=>{t.localCompVersion=e})},setOriginalDirectory(e){this.$patch(t=>{t.originalDirectory=e})},setOriginalDirectoryList(e){this.$patch(t=>{t.originalDirectoryList=e})},setLoading(e){this.$patch(t=>{t.loading=e})},setLocalCompHash(e){this.$patch(t=>{t.localCompHash=e})},setRemoteCompHash(e){this.$patch(t=>{t.remoteCompHash=e})},setCompDetail(e){this.$patch(t=>{t.compDetail=e})},setUpgradeInfo(e){this.$patch(t=>{t.upgradeInfo=e})},setConfigStatus(e){this.$patch(t=>{t.configStatus=e})},setExtraInfo(e){this.$patch(t=>{t.extraInfo=e})},addPreviewCompItem(e){this.$patch(t=>{t.previewList.push(e)})},delPreviewCompItemById(e){this.$patch(t=>{t.previewList=t.previewList.filter(a=>a._id!==e)})},setPreviewCompList(e){this.$patch(t=>{t.previewList=e})},updatePreviewCompItemById(e,t){this.$patch(a=>{const s=a.previewList.findIndex(f=>f._id===e);s!==-1&&(a.previewList[s]=t)})},initPreviewCompList(){this.$patch(e=>{e.compDialogType===l.DIALOG_TYPE_ADD&&(e.previewList=[{_id:_e(),miniPath:[],fullPath:[],activeTab:l.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}])})},setCompDep(e){this.$patch(t=>{t.compDep=e})},setOnlineCompDep(e){this.$patch(t=>{t.onlineCompDep=e})},setAffirmCompDep(e){this.$patch(t=>{t.affirmCompDep=e})},setActiveName(e){this.$patch(t=>{t.activeName=e})},setCompCarouselIndex(e){this.$patch(t=>{t.compCarouselIndex=e})},setSelectedFolder(e){this.$patch(t=>{t.selectedFolder=e})},setEditCompId(e){this.$patch(t=>{t.editCompId=e})},setCompBgColor(e){this.$patch(t=>{t.compBgColor=e})},getCompSubmitParams(){const e=this.selectedFolder.path,{name:t,description:a}=this.extraInfo,s=this.previewList.map(_=>({miniPath:_.miniPath,fullPath:_.fullPath,desc:_?.desc||""})),f=this.upgradeInfo?.upgradeLog??"",u=this.isEditComp?{upgradeDesc:f}:{};return{compPath:e,dep:this.affirmCompDepVersion,name:t,desc:a,previewConfigs:s,bgColor:this.compBgColor,...u}}}})};export{go as C,Xt as _,Io as c,Kt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.active[data-v-78a07d6e]{border:1px solid #23b2c5;border-radius:8px}[data-v-ba6df5e0] .el-segmented__item-label{overflow:unset}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./pinia-Dbinmd9o.js";const i=(o="")=>{if(!o)throw new Error("createCompMetaLocalStore scopeId is required");return a(`compMetaLocal_${o}`,{state:()=>({detail:{},dep:{},depToFile:{}}),getters:{},actions:{setDetail(e){this.$patch(t=>{t.detail=e})},setDep(e){this.$patch(t=>{t.dep=e})},setDepToFile(e){this.$patch(t=>{t.depToFile=e})}}})};export{i as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./pinia-Dbinmd9o.js";const r=(s="")=>{if(!s)throw new Error("createCompMetaStore scopeId is required");return a(`compMeta_${s}`,{state:()=>({detail:{},depEntryNameToFile:{},versionToFileAccessPath:{},localCompInfo:[],latestVersion:""}),getters:{isLocalExist:e=>e.localCompInfo.length!==0,latestVersionToFileAccessPath:e=>e.versionToFileAccessPath[e.latestVersion]??[]},actions:{setLatestVersion(e){this.$patch(t=>{t.latestVersion=e})},setLocalCompInfo(e){this.$patch(t=>{t.localCompInfo=e})},setDetail(e,t){this.$patch(o=>{o.detail[e]={...o.detail[e],...t}})},setDepEntryNameToFile(e,t){this.$patch(o=>{o.depEntryNameToFile[e]=t})},setVersionToFileAccessPath(e,t){this.$patch(o=>{o.versionToFileAccessPath[e]=t})}}})};export{r as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as e,x as T,k as c}from"./index-B5Bwrnd-.js";import{k as f}from"./@vue-fhDHgfUd.js";const l=(s,o)=>{const{sendMessageToTargetIframe:r,messageListener:t}=e.usePostMessage(),{addListener:_}=t(),E=T.useLeafOrigin(!1,window.__GLOBAL_CONFIG__.subPort);_(e.IFRAME_POST_MESSAGE_TYPE.SEARCH_KEYWORD_GET,n=>{const{triggerCallback:i,stopWatch:m}=c.useIframeBroadcast(f(()=>s.value),u=>{o.value?.sendMessageToTargetIframeByCompId(u,a=>{a?r(a,e.IFRAME_POST_MESSAGE_TYPE.SEARCH_KEYWORD_SET,s.value,E):m()})});i(n)})};export{l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./vue-router-Dq9LltUm.js";function o(){const a=s(),{teamId:e}=a.params;return{headers:{"team-id":e},teamId:e}}export{o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a2 as c}from"./element-plus-BhtJKS0K.js";import"./dayjs-CODj3Ey3.js";import{v as p,o as r}from"./index-B5Bwrnd-.js";function d(){function s(n,e){const o=c.service({lock:!0,text:p.global.t("comp.openingInEditor")});r.v1Comp.compcontrollerOpencomppathinvscode({folderPath:n,relativeFilePath:e}).finally(()=>{o.close()})}function i(n,e=2){const o=window.__GLOBAL_CONFIG__.sep,t=n.split(o);return t.length>e?`...${o}${t.slice(-e).join(o)}`:n}return{handlePath:i,openCompPathInVscode:s}}export{d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _=typeof window<"u",S=_&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),J=_&&window.devicePixelRatio>1,be={elements_selector:".lazy",container:S||_?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},P=e=>Object.assign({},be,e),H=function(e,t){let n;const s="LazyLoad::Initialized",a=new e(t);try{n=new CustomEvent(s,{detail:{instance:a}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(s,!1,!1,{instance:a})}window.dispatchEvent(n)},he=(e,t)=>{if(t)if(t.length)for(let n,s=0;n=t[s];s+=1)H(e,n);else H(e,t)},r="src",O="srcset",C="sizes",U="poster",f="llOriginalAttrs",q="data",M="loading",K="loaded",Q="applied",me="entered",N="error",W="native",X="data-",Y="ll-status",o=(e,t)=>e.getAttribute(X+t),fe=(e,t,n)=>{const s=X+t;n!==null?e.setAttribute(s,n):e.removeAttribute(s)},p=e=>o(e,Y),$=(e,t)=>fe(e,Y,t),I=e=>$(e,null),z=e=>p(e)===null,pe=e=>p(e)===M,ve=e=>p(e)===N,R=e=>p(e)===W,Ee=[M,K,Q,N],Ie=e=>Ee.indexOf(p(e))>=0,u=(e,t,n,s)=>{e&&typeof e=="function"&&(s===void 0?n===void 0?e(t):e(t,n):e(t,n,s))},h=(e,t)=>{_&&t!==""&&e.classList.add(t)},c=(e,t)=>{_&&t!==""&&e.classList.remove(t)},ke=e=>{e.llTempImage=document.createElement("IMG")},Ae=e=>{delete e.llTempImage},Z=e=>e.llTempImage,k=(e,t)=>{if(!t)return;const n=t._observer;n&&n.unobserve(e)},ye=e=>{e.disconnect()},Le=(e,t,n)=>{t.unobserve_entered&&k(e,n)},T=(e,t)=>{e&&(e.loadingCount+=t)},we=e=>{e&&(e.toLoadCount-=1)},ee=(e,t)=>{e&&(e.toLoadCount=t)},xe=e=>e.loadingCount>0,Oe=e=>e.toLoadCount>0,te=e=>{let t=[];for(let n,s=0;n=e.children[s];s+=1)n.tagName==="SOURCE"&&t.push(n);return t},D=(e,t)=>{const n=e.parentNode;n&&n.tagName==="PICTURE"&&te(n).forEach(t)},ne=(e,t)=>{te(e).forEach(t)},A=[r],se=[r,U],m=[r,O,C],ae=[q],y=e=>!!e[f],le=e=>e[f],oe=e=>delete e[f],b=(e,t)=>{if(y(e))return;const n={};t.forEach((s=>{n[s]=e.getAttribute(s)})),e[f]=n},Ce=e=>{y(e)||(e[f]={backgroundImage:e.style.backgroundImage})},g=(e,t)=>{if(!y(e))return;const n=le(e);t.forEach((s=>{((a,l,i)=>{i?a.setAttribute(l,i):a.removeAttribute(l)})(e,s,n[s])}))},Me=e=>{if(!y(e))return;const t=le(e);e.style.backgroundImage=t.backgroundImage},ce=(e,t,n)=>{h(e,t.class_applied),$(e,Q),n&&(t.unobserve_completed&&k(e,t),u(t.callback_applied,e,n))},re=(e,t,n)=>{h(e,t.class_loading),$(e,M),n&&(T(n,1),u(t.callback_loading,e,n))},d=(e,t,n)=>{n&&e.setAttribute(t,n)},V=(e,t)=>{d(e,C,o(e,t.data_sizes)),d(e,O,o(e,t.data_srcset)),d(e,r,o(e,t.data_src))},Ne=(e,t)=>{D(e,(n=>{b(n,m),V(n,t)})),b(e,m),V(e,t)},ze=(e,t)=>{b(e,A),d(e,r,o(e,t.data_src))},Re=(e,t)=>{ne(e,(n=>{b(n,A),d(n,r,o(n,t.data_src))})),b(e,se),d(e,U,o(e,t.data_poster)),d(e,r,o(e,t.data_src)),e.load()},Te=(e,t)=>{b(e,ae),d(e,q,o(e,t.data_src))},De=(e,t,n)=>{const s=o(e,t.data_bg),a=o(e,t.data_bg_hidpi),l=J&&a?a:s;l&&(e.style.backgroundImage=`url("${l}")`,Z(e).setAttribute(r,l),re(e,t,n))},Ge=(e,t,n)=>{const s=o(e,t.data_bg_multi),a=o(e,t.data_bg_multi_hidpi),l=J&&a?a:s;l&&(e.style.backgroundImage=l,ce(e,t,n))},He=(e,t,n)=>{const s=o(e,t.data_bg_set);if(!s)return;let a=s.split("|").map((l=>`image-set(${l})`));e.style.backgroundImage=a.join(),ce(e,t,n)},ie={IMG:Ne,IFRAME:ze,VIDEO:Re,OBJECT:Te},Ve=(e,t)=>{const n=ie[e.tagName];n&&n(e,t)},je=(e,t,n)=>{const s=ie[e.tagName];s&&(s(e,t),re(e,t,n))},Be=["IMG","IFRAME","VIDEO","OBJECT"],Fe=e=>Be.indexOf(e.tagName)>-1,de=(e,t)=>{!t||xe(t)||Oe(t)||u(e.callback_finish,t)},j=(e,t,n)=>{e.addEventListener(t,n),e.llEvLisnrs[t]=n},Se=(e,t,n)=>{e.removeEventListener(t,n)},G=e=>!!e.llEvLisnrs,Je=(e,t,n)=>{G(e)||(e.llEvLisnrs={});const s=e.tagName==="VIDEO"?"loadeddata":"load";j(e,s,t),j(e,"error",n)},L=e=>{if(!G(e))return;const t=e.llEvLisnrs;for(let n in t){const s=t[n];Se(e,n,s)}delete e.llEvLisnrs},_e=(e,t,n)=>{Ae(e),T(n,-1),we(n),c(e,t.class_loading),t.unobserve_completed&&k(e,n)},Pe=(e,t,n,s)=>{const a=R(t);_e(t,n,s),h(t,n.class_loaded),$(t,K),u(n.callback_loaded,t,s),a||de(n,s)},Ue=(e,t,n,s)=>{const a=R(t);_e(t,n,s),h(t,n.class_error),$(t,N),u(n.callback_error,t,s),n.restore_on_error&&g(t,m),a||de(n,s)},w=(e,t,n)=>{const s=Z(e)||e;G(s)||Je(s,(a=>{Pe(0,e,t,n),L(s)}),(a=>{Ue(0,e,t,n),L(s)}))},x=(e,t,n)=>{Fe(e)?((s,a,l)=>{w(s,a,l),je(s,a,l)})(e,t,n):((s,a,l)=>{ke(s),w(s,a,l),Ce(s),De(s,a,l),Ge(s,a,l),He(s,a,l)})(e,t,n)},qe=(e,t,n)=>{e.setAttribute("loading","lazy"),w(e,t,n),Ve(e,t),$(e,W)},B=e=>{e.removeAttribute(r),e.removeAttribute(O),e.removeAttribute(C)},Ke=e=>{D(e,(t=>{B(t)})),B(e)},ue=e=>{D(e,(t=>{g(t,m)})),g(e,m)},Qe=e=>{ne(e,(t=>{g(t,A)})),g(e,se),e.load()},We=e=>{g(e,A)},Xe=e=>{g(e,ae)},Ye={IMG:ue,IFRAME:We,VIDEO:Qe,OBJECT:Xe},Ze=(e,t)=>{(n=>{const s=Ye[n.tagName];s?s(n):Me(n)})(e),((n,s)=>{z(n)||R(n)||(c(n,s.class_entered),c(n,s.class_exited),c(n,s.class_applied),c(n,s.class_loading),c(n,s.class_loaded),c(n,s.class_error))})(e,t),I(e),oe(e)},et=(e,t,n,s)=>{n.cancel_on_exit&&pe(e)&&e.tagName==="IMG"&&(L(e),Ke(e),ue(e),c(e,n.class_loading),T(s,-1),I(e),u(n.callback_cancel,e,t,s))},tt=(e,t,n,s)=>{const a=Ie(e);$(e,me),h(e,n.class_entered),c(e,n.class_exited),Le(e,n,s),u(n.callback_enter,e,t,s),a||x(e,n,s)},nt=(e,t,n,s)=>{z(e)||(h(e,n.class_exited),et(e,t,n,s),u(n.callback_exit,e,t,s))},st=["IMG","IFRAME","VIDEO"],ge=e=>e.use_native&&"loading"in HTMLImageElement.prototype,at=(e,t,n)=>{e.forEach((s=>{st.indexOf(s.tagName)!==-1&&qe(s,t,n)})),ee(n,0)},lt=e=>e.isIntersecting||e.intersectionRatio>0,ot=(e,t)=>{t.forEach((n=>{e.observe(n)}))},ct=(e,t)=>{ye(e),ot(e,t)},rt=(e,t)=>{ge(e)||(t._observer=new IntersectionObserver((n=>{((s,a,l)=>{s.forEach((i=>lt(i)?tt(i.target,i,a,l):nt(i.target,i,a,l)))})(n,e,t)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(e)))},$e=e=>Array.prototype.slice.call(e),E=e=>e.container.querySelectorAll(e.elements_selector),it=e=>$e(e).filter(z),dt=e=>ve(e),_t=e=>$e(e).filter(dt),F=(e,t)=>it(e||E(t)),ut=(e,t)=>{_t(E(e)).forEach((n=>{c(n,e.class_error),I(n)})),t.update()},gt=(e,t)=>{_&&(t._onlineHandler=()=>{ut(e,t)},window.addEventListener("online",t._onlineHandler))},$t=e=>{_&&window.removeEventListener("online",e._onlineHandler)},v=function(e,t){const n=P(e);this._settings=n,this.loadingCount=0,rt(n,this),gt(n,this),this.update(t)};v.prototype={update:function(e){const t=this._settings,n=F(e,t);ee(this,n.length),S?this.loadAll(n):ge(t)?at(n,t,this):ct(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),$t(this),E(this._settings).forEach((e=>{oe(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){const t=this._settings;F(e,t).forEach((n=>{k(n,this),x(n,t,this)}))},restoreAll:function(){const e=this._settings;E(e).forEach((t=>{Ze(t,e)}))}},v.load=(e,t)=>{const n=P(t);x(e,n)},v.resetStatus=e=>{I(e)},_&&he(v,window.lazyLoadOptions);export{v as g};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{O as w,P as y,M as X,aj as I,U as S,V as B,K as Rt,af as Mt,a0 as nt,$ as $t,a4 as It,Z as jt,ad as ee,a1 as St}from"./@vue-fhDHgfUd.js";function xt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,s)}return i}function v(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?xt(Object(i),!0).forEach((function(s){C(t,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))}))}return t}function C(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ie(t,e){if(t==null)return{};var i,s,o=(function(a,h){if(a==null)return{};var r,c,l={},u=Object.keys(a);for(c=0;c<u.length;c++)r=u[c],h.indexOf(r)>=0||(l[r]=a[r]);return l})(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(s=0;s<n.length;s++)i=n[s],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function k(t){return(function(e){if(Array.isArray(e))return at(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return at(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);if(s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set")return Array.from(e);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return at(e,i)}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function at(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}var Et,ne,Q,z=(Et=function(t){(function(){var e={}.hasOwnProperty;function i(){for(var s=[],o=0;o<arguments.length;o++){var n=arguments[o];if(n){var a=typeof n;if(a==="string"||a==="number")s.push(n);else if(Array.isArray(n)){if(n.length){var h=i.apply(null,n);h&&s.push(h)}}else if(a==="object")if(n.toString===Object.prototype.toString)for(var r in n)e.call(n,r)&&n[r]&&s.push(r);else s.push(n.toString())}}return s.join(" ")}t.exports?(i.default=i,t.exports=i):window.classNames=i})()},Et(Q={path:ne,exports:{},require:function(t,e){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(e==null&&Q.path)}},Q.exports),Q.exports),W=function(t){return function(e,i){if(!e)return t;var s;typeof e=="string"?s=e:i=e;var o=t;return s&&(o+="__"+s),o+(i?Object.keys(i).reduce((function(n,a){var h=i[a];return h&&(n+=" "+(typeof h=="boolean"?o+"--"+a:o+"--"+a+"_"+h)),n}),""):"")}};function mt(t,e,i){var s,o,n,a,h;function r(){var l=Date.now()-a;l<e&&l>=0?s=setTimeout(r,e-l):(s=null,i||(h=t.apply(n,o),n=o=null))}e==null&&(e=100);var c=function(){n=this,o=arguments,a=Date.now();var l=i&&!s;return s||(s=setTimeout(r,e)),l&&(h=t.apply(n,o),n=o=null),h};return c.clear=function(){s&&(clearTimeout(s),s=null)},c.flush=function(){s&&(h=t.apply(n,o),n=o=null,clearTimeout(s),s=null)},c}mt.debounce=mt;var ft=mt,f=function(){return f=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},f.apply(this,arguments)};function Bt(t,e){var i,s;return t&&e?(i=""+t+e[0].toUpperCase()+e.slice(1),s=t+"-"+e):(i=t||e,s=t||e),{name:i,classname:s}}function kt(t){return/^blob:/.test(t)}function Ct(t){return kt(t)||(function(e){return/^data:/.test(e)})(t)}function Y(t){return!!(t&&t.constructor&&t.call&&t.apply)}function A(t){return t===void 0}function it(t){return typeof t=="object"&&t!==null}function gt(t,e,i){var s={};return it(t)?(Object.keys(e).forEach((function(o){A(t[o])?s[o]=e[o]:it(e[o])?it(t[o])?s[o]=gt(t[o],e[o],i[o]):s[o]=t[o]?e[o]:i[o]:e[o]===!0||e[o]===!1?s[o]=!!t[o]:s[o]=t[o]})),s):t?e:i}function K(t){var e=Number(t);return Number.isNaN(e)?t:e}function Tt(t){return typeof(t=="number"||(function(e){return typeof e=="object"&&e!==null})(t)&&toString.call(t)=="[object Number]")&&!Xt(t)}function Xt(t){return t!=t}function Yt(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var q=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},se=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},wt=function(t){this.type="move",this.directions=t},oe=(function(){function t(e,i,s,o,n){this.type="drag",this.nativeEvent=e,this.position=s,this.previousPosition=o,this.element=i,this.anchor=n}return t.prototype.shift=function(){var e=this,i=e.element,s=e.anchor,o=e.position;if(i){var n=i.getBoundingClientRect(),a=n.left,h=n.top;return{left:o.left-a-s.left,top:o.top-h-s.top}}return{left:0,top:0}},t})(),yt={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=k(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce((function(e,i){return{clientX:e.clientX+i.clientX/t.touches.length,clientY:e.clientY+i.clientY/t.touches.length}}),{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),i=e.left,s=e.right,o=e.bottom,n=e.top;this.anchor={left:t.clientX-i,top:t.clientY-n,bottom:o-t.clientY,right:s-t.clientX}},processMove:function(t,e){var i=k(e);if(this.touches.length){if(this.touches.length===1&&i.length===1){var s=this.$refs.draggable;this.$emit("drag",new oe(t,s,{left:i[0].clientX,top:i[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=i}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};yt.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"draggable",class:i.classname,onTouchstart:e[1]||(e[1]=function(){return n.onTouchStart&&n.onTouchStart.apply(n,arguments)}),onMousedown:e[2]||(e[2]=function(){return n.onMouseDown&&n.onMouseDown.apply(n,arguments)}),onMouseover:e[3]||(e[3]=function(){return n.onMouseOver&&n.onMouseOver.apply(n,arguments)}),onMouseleave:e[4]||(e[4]=function(){return n.onMouseLeave&&n.onMouseLeave.apply(n,arguments)})},[X(t.$slots,"default")],34)};var ht=W("vue-handler-wrapper"),Ut={name:"HandlerWrapper",components:{DraggableElement:yt},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,i=Bt(this.horizontalPosition,this.verticalPosition);t=ht((C(e={},i.classname,!0),C(e,"disabled",this.disabled),e))}else t=ht({disabled:this.disabled});return{root:t,draggable:ht("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ut.render=function(t,e,i,s,o,n){var a=I("DraggableElement");return w(),y("div",{class:n.classes.root},[S(a,{class:n.classes.draggable,onDrag:e[1]||(e[1]=function(h){return t.$emit("drag",h)}),onDragEnd:e[2]||(e[2]=function(h){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(h){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(h){return t.$emit("enter")})},{default:B((function(){return[X(t.$slots,"default")]})),_:3},8,["class"])],2)};var re=W("vue-line-wrapper"),Ft={name:"LineWrapper",components:{DraggableElement:yt},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return re((C(t={},this.position,!0),C(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};Ft.render=function(t,e,i,s,o,n){var a=I("DraggableElement");return w(),y(a,{class:n.classname,onDrag:e[1]||(e[1]=function(h){return t.$emit("drag",h)}),onDragEnd:e[2]||(e[2]=function(h){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(h){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(h){return t.$emit("enter")})},{default:B((function(){return[X(t.$slots,"default")]})),_:3},8,["class"])};var O=["left","right","top","bottom"],ae=["left","right"],he=["top","bottom"],ce=["left","top"],le=["fill-area","fit-area","stencil","none"],Wt={left:0,top:0,width:0,height:0};function Dt(t,e,i){return!(i=i||["width","height","left","top"]).some((function(s){return t[s]!==e[s]}))}function H(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function U(t,e){return{left:t.left-e.left,top:t.top-e.top}}function R(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function _(t,e){var i={left:0,top:0,right:0,bottom:0};return O.forEach((function(s){var o=e[s],n=H(t)[s];i[s]=o!==void 0&&n!==void 0?s==="left"||s==="top"?Math.max(0,o-n):Math.max(0,n-o):0})),i}function D(t,e){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}}function st(t){return{left:-t.left,top:-t.top}}function x(t,e){return f(f({},t),{left:t.left+e.left,top:t.top+e.top})}function T(t,e,i,s){if(e!==1){if(i){var o=R(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(i.left-o.left)*(1-e),top:t.top+t.height*(1-e)/2+(i.top-o.top)*(1-e)}}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}}return t}function b(t){return t.width/t.height}function F(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function N(t,e){var i={left:0,top:0},s=_(t,e);return s.left&&s.left>0?i.left=s.left:s.right&&s.right>0&&(i.left=-s.right),s.top&&s.top>0?i.top=s.top:s.bottom&&s.bottom>0&&(i.top=-s.bottom),i}function ct(t,e){var i;return e.minimum&&t<e.minimum?i=e.minimum:e.maximum&&t>e.maximum&&(i=e.maximum),i}function Nt(t,e){var i=b(t),s=b(e);return e.width<1/0&&e.height<1/0?i>s?{width:e.width,height:e.width/i}:{width:e.height*i,height:e.height}:e.width<1/0?{width:e.width,height:e.width/i}:e.height<1/0?{width:e.height*i,height:e.height}:t}function Zt(t,e){var i=e*Math.PI/180;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))}}function j(t,e){var i=e*Math.PI/180;return{left:t.left*Math.cos(i)-t.top*Math.sin(i),top:t.left*Math.sin(i)+t.top*Math.cos(i)}}function ot(t,e){var i=_(M(t,e),e);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,F(t,e)):Math.min((t.height+i.top+i.bottom)/t.height,F(t,e)):1}function M(t,e,i){i===void 0&&(i=!1);var s=N(t,e);return x(t,i?st(s):s)}function pt(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function ue(t,e){return f(f({},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)})}function Vt(t,e,i){i===void 0&&(i=!0);var s={};return O.forEach((function(o){var n=t[o],a=e[o];n!==void 0&&a!==void 0?s[o]=o==="left"||o==="top"?i?Math.max(n,a):Math.min(n,a):i?Math.min(n,a):Math.max(n,a):a!==void 0?s[o]=a:n!==void 0&&(s[o]=n)})),s}function rt(t,e){return Vt(t,e,!0)}function Ot(t){var e=t.size,i=t.aspectRatio,s=t.ignoreMinimum,o=t.sizeRestrictions;return!!((e.correctRatio||b(e)>=i.minimum&&b(e)<=i.maximum)&&e.height<=o.maxHeight&&e.width<=o.maxWidth&&e.width&&e.height&&(s||e.height>=o.minHeight&&e.width>=o.minWidth))}function Ht(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function $(t){var e=t.width,i=t.height,s=t.sizeRestrictions,o={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},n={width:Math.max(s.minWidth,Math.min(s.maxWidth,e)),height:Math.max(s.minHeight,Math.min(s.maxHeight,i))};function a(c,l){return l===void 0&&(l=!1),c.reduce((function(u,d){return Ot({size:d,aspectRatio:o,sizeRestrictions:s,ignoreMinimum:l})&&(!u||Ht(d,{width:e,height:i})<Ht(u,{width:e,height:i}))?d:u}),null)}var h=[];o&&[o.minimum,o.maximum].forEach((function(c){c&&h.push({width:n.width,height:n.width/c,correctRatio:!0},{width:n.height*c,height:n.height,correctRatio:!0})})),Ot({size:n,aspectRatio:o,sizeRestrictions:s})&&h.push(n);var r=a(h)||a(h,!0);return r&&{width:r.width,height:r.height}}function vt(t){var e=t.event,i=t.coordinates,s=t.positionRestrictions,o=s===void 0?{}:s,n=x(i,e.directions);return x(n,N(n,o))}function de(t){var e=t.coordinates,i=t.transform,s=t.imageSize,o=t.sizeRestrictions,n=t.positionRestrictions,a=t.aspectRatio,h=t.visibleArea,r=function(l,u){return vt({coordinates:l,positionRestrictions:n,event:new wt({left:u.left-l.left,top:u.top-l.top})})},c=f({},e);return(Array.isArray(i)?i:[i]).forEach((function(l){var u={};A((u=typeof l=="function"?l({coordinates:c,imageSize:s,visibleArea:h}):l).width)&&A(u.height)||(c=(function(d,m){var g=f(f(f({},d),$({width:m.width,height:m.height,sizeRestrictions:o,aspectRatio:a})),{left:0,top:0});return r(g,{left:d.left,top:d.top})})(c,f(f({},c),u))),A(u.left)&&A(u.top)||(c=r(c,f(f({},c),u)))})),c}function me(t){t.event;var e=t.getAreaRestrictions,i=t.boundaries,s=t.coordinates,o=t.visibleArea;t.aspectRatio;var n=t.stencilSize,a=t.sizeRestrictions,h=t.positionRestrictions;t.stencilReference;var r,c,l,u=f({},s),d=f({},o),m=f({},n);r=b(m),c=b(u),l===void 0&&(l=.001),(r===0||c===0?Math.abs(c-r)<l:Math.abs(c/r)<1+l&&Math.abs(c/r)>1-l)||(u=f(f({},u),$({sizeRestrictions:a,width:u.width,height:u.height,aspectRatio:{minimum:b(m),maximum:b(m)}})));var g=ot(d=T(d,u.width*i.width/(d.width*m.width)),e({visibleArea:d,type:"resize"}));return g!==1&&(d=T(d,g),u=T(u,g)),d=M(d=x(d,U(R(u),R(d))),e({visibleArea:d,type:"move"})),{coordinates:u=M(u,rt(H(d),h)),visibleArea:d}}function fe(t){var e=t.event,i=t.getAreaRestrictions,s=t.boundaries,o=t.coordinates,n=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var h=f({},o),r=f({},n);if(o&&n&&e.type!=="manipulateImage"){var c={width:0,height:0};r.width,s.width,b(s)>b(h)?(c.height=.8*s.height,c.width=c.height*b(h)):(c.width=.8*s.width,c.height=c.width*b(h));var l=ot(r=T(r,h.width*s.width/(r.width*c.width)),i({visibleArea:r,type:"resize"}));r=T(r,l),l!==1&&(c.height/=l,c.width/=l),r=M(r=x(r,U(R(h),R(r))),i({visibleArea:r,type:"move"})),h=M(h,rt(H(r),a))}return{coordinates:h,visibleArea:r}}function ge(t){var e=t.event,i=t.coordinates,s=t.visibleArea,o=t.getAreaRestrictions,n=f({},s),a=f({},i);if(e.type==="setCoordinates"){var h=Math.max(0,a.width-n.width),r=Math.max(0,a.height-n.height);h>r?n=T(n,Math.min(a.width/n.width,F(n,o({visibleArea:n,type:"resize"})))):r>h&&(n=T(n,Math.min(a.height/n.height,F(n,o({visibleArea:n,type:"resize"}))))),n=M(n=x(n,st(N(a,H(n)))),o({visibleArea:n,type:"move"}))}return{visibleArea:n,coordinates:a}}function pe(t){var e=t.imageSize,i=t.visibleArea,s=t.coordinates,o=i||e;return{left:(i?i.left:0)+o.width/2-s.width/2,top:(i?i.top:0)+o.height/2-s.height/2}}function ve(t){var e=t.imageSize,i=t.visibleArea,s=t.aspectRatio,o=t.sizeRestrictions,n=i||e,a=Math.min(s.maximum||1/0,Math.max(s.minimum||0,b(n))),h=n.width<n.height?{width:.8*n.width,height:.8*n.width/a}:{height:.8*n.height,width:.8*n.height*a};return $(f(f({},h),{aspectRatio:s,sizeRestrictions:o}))}function be(t){var e,i,s=t.imageSize,o=t.visibleArea,n=t.boundaries,a=t.aspectRatio,h=t.sizeRestrictions,r=t.stencilSize,c=o||s;return b(c)>b(n)?i=(e=r.height*c.height/n.height)*b(r):e=(i=r.width*c.width/n.width)/b(r),$({width:i,height:e,aspectRatio:a,sizeRestrictions:h})}function we(t){var e=t.getAreaRestrictions,i=t.coordinates,s=t.imageSize,o=b(t.boundaries);if(i){var n={height:Math.max(i.height,s.height),width:Math.max(i.width,s.width)},a=Nt({width:b(n)>o?n.width:n.height*o,height:b(n)>o?n.width/o:n.height},pt(e())),h={left:i.left+i.width/2-a.width/2,top:i.top+i.height/2-a.height/2,width:a.width,height:a.height},r=_(i,H(f({left:0,top:0},s))),c={};return!r.left&&!r.right&&h.width<=s.width&&(c.left=0,c.right=s.width),!r.top&&!r.bottom&&h.height<=s.height&&(c.top=0,c.bottom=s.height),M(h,c)}var l=b(s);return a={height:l>o?s.height:s.width/o,width:l>o?s.height*o:s.width},{left:s.width/2-a.width/2,top:s.height/2-a.height/2,width:a.width,height:a.height}}function J(t,e){return Vt(t,H(e))}function ye(t){var e=t.event,i=t.coordinates,s=t.visibleArea,o=t.sizeRestrictions,n=t.getAreaRestrictions,a=t.positionRestrictions,h=t.adjustStencil,r=e.scale,c=e.move,l=f({},s),u=f({},i),d=1,m=1,g=r.factor&&Math.abs(r.factor-1)>.001;l=x(l,{left:c.left||0,top:c.top||0});var p={stencil:{minimum:Math.max(o.minWidth?o.minWidth/u.width:0,o.minHeight?o.minHeight/u.height:0),maximum:Math.min(o.maxWidth?o.maxWidth/u.width:1/0,o.maxHeight?o.maxHeight/u.height:1/0,F(u,a))},area:{maximum:F(l,n({visibleArea:l,type:"resize"}))}};r.factor&&g&&(r.factor<1?(m=Math.max(r.factor,p.stencil.minimum))>1&&(m=1):r.factor>1&&(m=Math.min(r.factor,Math.min(p.area.maximum,p.stencil.maximum)))<1&&(m=1)),m&&(l=T(l,m,r.center));var E=i.left-s.left,L=s.width+s.left-(i.width+i.left),Z=i.top-s.top,G=s.height+s.top-(i.height+i.top);return l=M(l=x(l,N(l,{left:a.left!==void 0?a.left-E*m:void 0,top:a.top!==void 0?a.top-Z*m:void 0,bottom:a.bottom!==void 0?a.bottom+G*m:void 0,right:a.right!==void 0?a.right+L*m:void 0})),n({visibleArea:l,type:"move"})),u.width=u.width*m,u.height=u.height*m,u.left=l.left+E*m,u.top=l.top+Z*m,u=M(u,rt(H(l),a)),r.factor&&g&&h&&(r.factor>1?d=Math.min(p.area.maximum,r.factor)/m:r.factor<1&&(d=Math.max(u.height/l.height,u.width/l.width,r.factor/m)),d!==1&&(l=x(l=M(l=T(l,d,r.factor>1?r.center:R(u)),n({visibleArea:l,type:"move"})),st(N(u,H(l)))))),{coordinates:u,visibleArea:l}}function ze(t){var e=t.aspectRatio,i=t.getAreaRestrictions,s=t.coordinates,o=t.visibleArea,n=t.sizeRestrictions,a=t.positionRestrictions,h=t.imageSize,r=t.previousImageSize,c=t.angle,l=f({},s),u=f({},o),d=j(R(f({left:0,top:0},r)),c);return(l=f(f({},$({sizeRestrictions:n,aspectRatio:e,width:l.width,height:l.height})),j(R(l),c))).left-=d.left-h.width/2+l.width/2,l.top-=d.top-h.height/2+l.height/2,u=T(u,ot(u,i({visibleArea:u,type:"resize"}))),{coordinates:l=M(l,a),visibleArea:u=M(u=x(u,U(R(l),R(s))),i({visibleArea:u,type:"move"}))}}function Ae(t){var e=t.flip,i=t.previousFlip,s=t.rotate,o=t.getAreaRestrictions,n=t.coordinates,a=t.visibleArea,h=t.imageSize,r=f({},n),c=f({},a),l=i.horizontal!==e.horizontal,u=i.vertical!==e.vertical;if(l||u){var d=j({left:h.width/2,top:h.height/2},-s),m=j(R(r),-s),g=j({left:l?d.left-(m.left-d.left):m.left,top:u?d.top-(m.top-d.top):m.top},s);r=x(r,U(g,R(r))),m=j(R(c),-s),c=M(c=x(c,U(g=j({left:l?d.left-(m.left-d.left):m.left,top:u?d.top-(m.top-d.top):m.top},s),R(c))),o({visibleArea:c,type:"move"}))}return{coordinates:r,visibleArea:c}}function Lt(t){var e=t.directions,i=t.coordinates,s=t.positionRestrictions,o=s===void 0?{}:s,n=t.sizeRestrictions,a=t.preserveRatio,h=t.compensate,r=f({},e),c=D(i,r).width,l=D(i,r).height;c<0&&(r.left<0&&r.right<0?(r.left=-(i.width-n.minWidth)/(r.left/r.right),r.right=-(i.width-n.minWidth)/(r.right/r.left)):r.left<0?r.left=-(i.width-n.minWidth):r.right<0&&(r.right=-(i.width-n.minWidth))),l<0&&(r.top<0&&r.bottom<0?(r.top=-(i.height-n.minHeight)/(r.top/r.bottom),r.bottom=-(i.height-n.minHeight)/(r.bottom/r.top)):r.top<0?r.top=-(i.height-n.minHeight):r.bottom<0&&(r.bottom=-(i.height-n.minHeight)));var u=_(D(i,r),o);h&&(u.left&&u.left>0&&u.right===0?(r.right+=u.left,r.left-=u.left):u.right&&u.right>0&&u.left===0&&(r.left+=u.right,r.right-=u.right),u.top&&u.top>0&&u.bottom===0?(r.bottom+=u.top,r.top-=u.top):u.bottom&&u.bottom>0&&u.top===0&&(r.top+=u.bottom,r.bottom-=u.bottom),u=_(D(i,r),o));var d={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(O.forEach((function(p){var E=u[p];E&&r[p]&&(d[p]=Math.max(0,1-E/r[p]))})),a){var m=Math.min.apply(null,O.map((function(p){return d[p]})));m!==1/0&&O.forEach((function(p){r[p]*=m}))}else O.forEach((function(p){d[p]!==1/0&&(r[p]*=d[p])}));if(c=D(i,r).width,l=D(i,r).height,r.right+r.left&&(c>n.maxWidth?d.width=(n.maxWidth-i.width)/(r.right+r.left):c<n.minWidth&&(d.width=(n.minWidth-i.width)/(r.right+r.left))),r.bottom+r.top&&(l>n.maxHeight?d.height=(n.maxHeight-i.height)/(r.bottom+r.top):l<n.minHeight&&(d.height=(n.minHeight-i.height)/(r.bottom+r.top))),a){var g=Math.min(d.width,d.height);g!==1/0&&O.forEach((function(p){r[p]*=g}))}else d.width!==1/0&&ae.forEach((function(p){r[p]*=d.width})),d.height!==1/0&&he.forEach((function(p){r[p]*=d.height}));return r}function tt(t,e,i){return e==0&&i==0?t/2:e==0?0:i==0?t:t*Math.abs(e/(e+i))}var Re=W("vue-simple-handler"),Me=W("vue-simple-handler-wrapper"),zt={name:"SimpleHandler",components:{HandlerWrapper:Ut},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(C(t={},this.horizontalPosition,!!this.horizontalPosition),C(t,this.verticalPosition,!!this.verticalPosition),C(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),C(t,"hover",this.hover),t);return{default:z(Re(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:z(Me(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};zt.render=function(t,e,i,s,o,n){var a=I("HandlerWrapper");return w(),y(a,{class:n.classes.wrapper,"vertical-position":i.verticalPosition,"horizontal-position":i.horizontalPosition,disabled:i.disabled,onDrag:n.onDrag,onDragEnd:n.onDragEnd,onEnter:n.onEnter,onLeave:n.onLeave},{default:B((function(){return[S("div",{class:n.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Se=W("vue-simple-line"),xe=W("vue-simple-line-wrapper"),At={name:"SimpleLine",components:{LineWrapper:Ft},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:z(Se(C({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:z(xe(C({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};At.render=function(t,e,i,s,o,n){var a=I("LineWrapper");return w(),y(a,{class:n.classes.wrapper,position:i.position,disabled:i.disabled,onDrag:n.onDrag,onDragEnd:n.onDragEnd,onEnter:n.onEnter,onLeave:n.onLeave},{default:B((function(){return[S("div",{class:n.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var lt=W("vue-bounding-box"),Ee=["east","west",null],Ce=["south","north",null],qt={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return zt}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return At}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return Ee.forEach((function(e){Ce.forEach((function(i){if(e!==i){var s=Bt(e,i),o=s.name,n=s.classname;t.push({name:o,classname:n,verticalDirection:i,horizontalDirection:e})}}))})),{points:t}},computed:{style:function(){var t={};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},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,i=this.linesClasses,s=this.linesWrappersClasses;return{root:lt(),handlers:t,handlersWrappers:e,lines:i,linesWrappers:s}},lineNodes:function(){var t=this,e=[];return this.points.forEach((function(i){i.horizontalDirection&&i.verticalDirection||!t.lines[i.name]||e.push({name:i.name,component:t.linesComponent,class:z(t.classes.lines.default,t.classes.lines[i.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:z(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})})),e},handlerNodes:function(){var t=this,e=[],i=this.width,s=this.height;return this.points.forEach((function(o){if(t.handlers[o.name]){var n={name:o.name,component:t.handlersComponent,class:z(t.classes.handlers.default,t.classes.handlers[o.name]),wrapperClass:z(t.classes.handlersWrappers.default,t.classes.handlersWrappers[o.name]),hoverClass:t.classes.handlers.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!t.resizable};if(i&&s){var a=o.horizontalDirection,h=o.verticalDirection,r=a==="east"?i:a==="west"?0:i/2,c=h==="south"?s:h==="north"?0:s/2;n.wrapperClass=lt("handler"),n.wrapperStyle={transform:"translate(".concat(r,"px, ").concat(c,"px)")},t.transitions&&t.transitions.enabled&&(n.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else n.wrapperClass=lt("handler",C({},o.classname,!0));e.push(n)}})),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,i){var s,o=t.shift(),n=o.left,a=o.top,h={left:0,right:0,top:0,bottom:0};e==="west"?h.left-=n:e==="east"&&(h.right+=n),i==="north"?h.top-=a:i==="south"&&(h.bottom+=a),!i&&e?s="width":i&&!e&&(s="height"),this.resizable&&this.$emit("resize",new se(h,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:i==="south"||!i,top:i==="north"||!i},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:s}))}},emits:["resize","resize-end"]};qt.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"box",class:n.classes.root,style:n.style},[X(t.$slots,"default"),S("div",null,[(w(!0),y(Rt,null,Mt(n.lineNodes,(function(a){return w(),y(nt(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(h){return n.onHandlerDrag(h,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(h){return n.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(w(!0),y(Rt,null,Mt(n.handlerNodes,(function(a){return w(),y("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(w(),y(nt(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(h){return n.onHandlerDrag(h,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(h){return n.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var Te=W("vue-draggable-area"),_t={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Te()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=k(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):Yt({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),i=e.left,s=e.top;this.anchor={x:t.clientX-i,y:t.clientY-s}},processMove:function(t,e){var i=k(e);if(this.touches.length){var s=this.$refs.container.getBoundingClientRect(),o=s.left,n=s.top;this.touches.length===1&&i.length===1&&this.$emit("move",new wt({left:i[0].clientX-(o+this.anchor.x),top:i[0].clientY-(n+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};_t.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return n.onTouchStart&&n.onTouchStart.apply(n,arguments)}),onMousedown:e[2]||(e[2]=function(){return n.onMouseDown&&n.onMouseDown.apply(n,arguments)})},[X(t.$slots,"default")],544)};function ut(t){var e,i;return{rotate:t.rotate||0,flip:{horizontal:((e=t?.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((i=t?.flip)===null||i===void 0?void 0:i.vertical)||!1}}}function We(t){return new Promise((function(e,i){try{if(t)if(/^data:/i.test(t))e((function(r){r=r.replace(/^data:([^;]+);base64,/gim,"");for(var c=atob(r),l=c.length,u=new ArrayBuffer(l),d=new Uint8Array(u),m=0;m<l;m++)d[m]=c.charCodeAt(m);return u})(t));else if(/^blob:/i.test(t)){var s=new FileReader;s.onload=function(r){e(r.target.result)},n=t,a=function(r){s.readAsArrayBuffer(r)},(h=new XMLHttpRequest).open("GET",n,!0),h.responseType="blob",h.onload=function(){this.status!=200&&this.status!==0||a(this.response)},h.send()}else{var o=new XMLHttpRequest;o.onreadystatechange=function(){o.readyState===4&&(o.status===200||o.status===0?e(o.response):i("Warning: could not load an image to parse its orientation"),o=null)},o.onprogress=function(){o.getResponseHeader("content-type")!=="image/jpeg"&&o.abort()},o.withCredentials=!1,o.open("GET",t,!0),o.responseType="arraybuffer",o.send(null)}else i("Error: the image is empty")}catch(r){i(r)}var n,a,h}))}function Gt(t){var e=t.rotate,i=t.flip,s=t.scaleX,o=t.scaleY,n="";return n+=" rotate("+e+"deg) ",n+=" scaleX("+s*(i.horizontal?-1:1)+") ",n+=" scaleY("+o*(i.vertical?-1:1)+") "}function De(t){try{var e,i=new DataView(t),s=void 0,o=void 0,n=void 0,a=void 0;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(var h=i.byteLength,r=2;r+1<h;){if(i.getUint8(r)===255&&i.getUint8(r+1)===225){n=r;break}r++}if(n&&(s=n+10,(function(m,g,p){var E,L="";for(E=g,p+=g;E<p;E++)L+=String.fromCharCode(m.getUint8(E));return L})(i,n+4,4)==="Exif")){var c=i.getUint16(s);if(((o=c===18761)||c===19789)&&i.getUint16(s+2,o)===42){var l=i.getUint32(s+4,o);l>=8&&(a=s+l)}}if(a){for(var u=i.getUint16(a,o),d=0;d<u;d++)if(r=a+12*d+2,i.getUint16(r,o)===274){r+=8,e=i.getUint16(r,o),i.setUint16(r,1,o);break}}return e}catch{return null}}function Pt(t,e){var i=e.getBoundingClientRect(),s=i.left,o=i.top,n={left:0,top:0},a=0;return t.forEach((function(h){n.left+=(h.clientX-s)/t.length,n.top+=(h.clientY-o)/t.length})),t.forEach((function(h){a+=Yt({x:n.left,y:n.top},{x:h.clientX-s,y:h.clientY-o})})),{centerMass:n,spread:a,count:t.length}}var Qt={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=ft(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new q({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var i=Pt(e,this.$refs.container),s=this.oldGeometricProperties;s.count===i.count&&s.count>1&&this.$emit("resize",new q({left:s.centerMass.left-i.centerMass.left,top:s.centerMass.top-i.centerMass.top},{factor:s.spread/i.spread,center:i.centerMass})),this.oldGeometricProperties=i}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,i=e.getBoundingClientRect(),s=i.left,o=i.top,n=i.bottom,a=i.right;this.touches=k(t.touches).filter((function(h){return h.clientX>s&&h.clientX<a&&h.clientY>o&&h.clientY<n})),this.oldGeometricProperties=Pt(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var i=k(t.touches).filter((function(s){return!s.identifier||e.touches.find((function(o){return o.identifier===s.identifier}))}));this.processEvent(t)&&(this.processMove(t,i),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),i=e.left,s=e.top,o=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(h=+a)==0||Xt(h)?h:h>0?1:-1),n={left:t.clientX-i,top:t.clientY-s};this.$emit("resize",new q({},{factor:o,center:n})),this.touches.length||this.debouncedProcessEnd()}var a,h}},emits:["resize","move","transform-end"]};Qt.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return n.onTouchStart&&n.onTouchStart.apply(n,arguments)}),onMousedown:e[2]||(e[2]=function(){return n.onMouseDown&&n.onMouseDown.apply(n,arguments)}),onWheel:e[3]||(e[3]=function(){return n.onWheel&&n.onWheel.apply(n,arguments)})},[X(t.$slots,"default")],544)};var bt={components:{TransformableImage:Qt},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};bt.render=function(t,e,i,s,o,n){var a=I("transformable-image");return w(),y(a,{"touch-move":i.touchMove,"touch-resize":i.touchResize,"mouse-move":i.mouseMove,"wheel-resize":i.wheelResize,onMove:e[1]||(e[1]=function(h){return t.$emit("move",h)}),onResize:e[2]||(e[2]=function(h){return t.$emit("resize",h)})},{default:B((function(){return[X(t.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var et=W("vue-preview"),Kt={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:et({fill:this.fill}),wrapper:et("wrapper"),imageWrapper:et("image-wrapper"),image:z(et("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};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},wrapperStyle:function(){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)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=v(v({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),i=this.imageSize.width,s=this.imageSize.height,o=Zt({width:i,height:s},e.rotate),n={width:"".concat(i,"px"),height:"".concat(s,"px"),left:"0px",top:"0px"},a={rotate:{left:(i-o.width)*e.scaleX/2,top:(s-o.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*i/2,top:(1-e.scaleY)*s/2}};return n.transform=`translate(
|
|
3
|
+
`.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+Gt(e),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){t.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Kt.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"root",class:n.classes.root,style:n.style},[S("div",{ref:"wrapper",class:n.classes.wrapper,style:n.wrapperStyle},[$t(S("img",{ref:"image",src:i.image&&i.image.src,class:n.classes.image,style:n.imageStyle},null,14,["src"]),[[It,i.image&&i.image.src]])],6)],6)};var Jt={components:{Preview:Kt},inheritAttrs:!1};Jt.render=function(t,e,i,s,o,n){var a=I("preview");return w(),y(a,jt(t.$attrs,{fill:!0}),null,16)};var dt=W("vue-rectangle-stencil"),te={name:"RectangleStencil",components:{StencilPreview:Jt,BoundingBox:qt,DraggableArea:_t},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return zt}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return At}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:z(dt({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:z(dt("preview"),this.previewClass),boundingBox:z(dt("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,i=t.width,s=t.left,o=t.top,n={width:"".concat(i,"px"),height:"".concat(e,"px"),transform:"translate(".concat(s,"px, ").concat(o,"px)")};return this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};te.render=function(t,e,i,s,o,n){var a=I("stencil-preview"),h=I("draggable-area"),r=I("bounding-box");return w(),y("div",{class:n.classes.stencil,style:n.style},[S(r,{width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,transitions:i.transitions,class:n.classes.boundingBox,handlers:i.handlers,"handlers-component":i.handlersComponent,"handlers-classes":i.handlersClasses,"handlers-wrappers-classes":i.handlersWrappersClasses,lines:i.lines,"lines-component":i.linesComponent,"lines-classes":i.linesClasses,"lines-wrappers-classes":i.linesWrappersClasses,resizable:i.resizable,onResize:n.onResize,onResizeEnd:n.onResizeEnd},{default:B((function(){return[S(h,{movable:i.movable,onMove:n.onMove,onMoveEnd:n.onMoveEnd},{default:B((function(){return[S(a,{image:i.image,coordinates:i.coordinates,width:i.stencilCoordinates.width,height:i.stencilCoordinates.height,class:n.classes.preview,transitions:i.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_: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)};var Oe=["transitions"],P=W("vue-advanced-cropper"),He={name:"Cropper",components:{BackgroundWrapper:bt},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return te}},backgroundWrapperComponent:{type:[Object,String],default:function(){return bt}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return le.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,i=t.coordinates,s=t.aspectRatio,o=t.positionRestrictions,n=t.sizeRestrictions,a=f(f({},i),{right:i.left+i.width,bottom:i.top+i.height}),h=e.params||{},r=f({},e.directions),c=h.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};n.widthFrozen&&(r.left=0,r.right=0),n.heightFrozen&&(r.top=0,r.bottom=0),O.forEach((function(V){c[V]||(r[V]=0)}));var l=D(a,r=Lt({coordinates:a,directions:r,sizeRestrictions:n,positionRestrictions:o})).width,u=D(a,r).height,d=h.preserveRatio?b(a):ct(l/u,s);if(d){var m=h.respectDirection;if(m||(m=a.width>=a.height||d===1?"width":"height"),m==="width"){var g=l/d-a.height;if(c.top&&c.bottom){var p=r.top,E=r.bottom;r.bottom=tt(g,E,p),r.top=tt(g,p,E)}else c.bottom?r.bottom=g:c.top?r.top=g:c.right?r.right=0:c.left&&(r.left=0)}else if(m==="height"){var L=a.width-u*d;if(c.left&&c.right){var Z=r.left,G=r.right;r.left=-tt(L,Z,G),r.right=-tt(L,G,Z)}else c.left?r.left=-L:c.right?r.right=-L:c.top?r.top=0:c.bottom&&(r.bottom=0)}r=Lt({directions:r,coordinates:a,sizeRestrictions:n,positionRestrictions:o,preserveRatio:!0,compensate:h.compensate})}return l=D(a,r).width,u=D(a,r).height,(d=h.preserveRatio?b(a):ct(l/u,s))&&Math.abs(d-l/u)>.001&&O.forEach((function(V){c[V]||(r[V]=0)})),vt({event:new wt({left:-r.left,top:-r.top}),coordinates:{width:i.width+r.right+r.left,height:i.height+r.top+r.bottom,left:i.left,top:i.top},positionRestrictions:o})}},moveAlgorithm:{type:Function,default:vt},initStretcher:{type:Function,default:function(t){var e=t.stretcher,i=t.imageSize,s=b(i);e.style.width=i.width+"px",e.style.height=e.clientWidth/s+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,i=t.coordinates,s=t.aspectRatio,o=t.sizeRestrictions,n=t.positionRestrictions,a=f(f({},i),$({width:i.width,height:i.height,aspectRatio:s,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,o.minHeight),minWidth:Math.min(e.width,o.minWidth)}}));return a=M(a=x(a,U(R(i),R(a))),rt(H(e),n))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,i=t.boundaries,s=t.getAreaRestrictions,o=t.coordinates,n=f({},e);n.height=n.width/b(i),n.top+=(e.height-n.height)/2,(o.height-n.height>0||o.width-n.width>0)&&(n=T(n,Math.max(o.height/n.height,o.width/n.width)));var a=st(N(o,H(n=T(n,ot(n,s({visibleArea:n,type:"resize"}))))));return n.width<o.width&&(a.left=0),n.height<o.height&&(a.top=0),n=M(n=x(n,a),s({visibleArea:n,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,i=t.boundaries,s=t.imageSize,o=t.imageRestriction,n=t.type,a={};return o==="fill-area"?a={left:0,top:0,right:s.width,bottom:s.height}:o==="fit-area"&&(b(i)>b(s)?(a={top:0,bottom:s.height},e&&n==="move"&&(e.width>s.width?(a.left=-(e.width-s.width)/2,a.right=s.width-a.left):(a.left=0,a.right=s.width))):(a={left:0,right:s.width},e&&n==="move"&&(e.height>s.height?(a.top=-(e.height-s.height)/2,a.bottom=s.height-a.top):(a.top=0,a.bottom=s.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,i={};return t.imageRestriction!=="none"&&(i={left:0,top:0,right:e.width,bottom:e.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:v({},Wt)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){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}},imageSize:function(){var t=(function(e){return e*Math.PI/180})(this.imageTransforms.rotate);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))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=gt(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:gt(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:A(this.minWidth)?0:K(this.minWidth),minHeight:A(this.minHeight)?0:K(this.minHeight),maxWidth:A(this.maxWidth)?1/0:K(this.maxWidth),maxHeight:A(this.maxHeight)?1/0:K(this.maxHeight)});if(t=(function(s){var o=s.areaRestrictions,n=s.sizeRestrictions,a=s.boundaries,h=s.positionRestrictions,r=f(f({},n),{minWidth:n.minWidth!==void 0?n.minWidth:0,minHeight:n.minHeight!==void 0?n.minHeight:0,maxWidth:n.maxWidth!==void 0?n.maxWidth:1/0,maxHeight:n.maxHeight!==void 0?n.maxHeight:1/0});h.left!==void 0&&h.right!==void 0&&(r.maxWidth=Math.min(r.maxWidth,h.right-h.left)),h.bottom!==void 0&&h.top!==void 0&&(r.maxHeight=Math.min(r.maxHeight,h.bottom-h.top));var c=pt(o),l=Nt(a,c);return c.width<1/0&&(!r.maxWidth||r.maxWidth>l.width)&&(r.maxWidth=Math.min(r.maxWidth,l.width)),c.height<1/0&&(!r.maxHeight||r.maxHeight>l.height)&&(r.maxHeight=Math.min(r.maxHeight,l.height)),r.minWidth>r.maxWidth&&(r.minWidth=r.maxWidth,r.widthFrozen=!0),r.minHeight>r.maxHeight&&(r.minHeight=r.maxHeight,r.heightFrozen=!0),r})({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){var e=this.getStencilSize(),i=pt(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));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)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:P(),image:z(P("image"),this.imageClass),stencil:P("stencil"),boundaries:z(P("boundaries"),this.boundariesClass),stretcher:z(P("stretcher")),background:z(P("background"),this.backgroundClass),foreground:z(P("foreground"),this.foregroundClass),imageWrapper:z(P("image-wrapper")),cropperWrapper:z(P("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,i=t.height,s=t.left,o=t.top;return{width:e/this.coefficient,height:i/this.coefficient,left:(s-this.visibleArea.left)/this.coefficient,top:(o-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){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"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},s=v(v({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),o={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-i.left-this.imageTransforms.translateX,"px, ").concat(-e.top-i.top-this.imageTransforms.translateY,"px)")+Gt(s)};return this.transitionsOptions.enabled&&(o.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),o}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick((function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(i){return t[i]!==e[i]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=ft(this.update,this.debounce),this.debouncedDisableTransitions=ft(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){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)},unmounted:function(){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()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(v({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:v({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?v({},this.visibleArea):null,imageTransforms:e,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?v({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.transitions,o=s===void 0||s;this.onManipulateImage(new q({},{factor:1/t,center:e}),{normalize:!1,transitions:o})},move:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.transitions,o=s===void 0||s;this.onManipulateImage(new q({left:t||0,top:e||0}),{normalize:!1,transitions:o})},setCoordinates:function(t){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.autoZoom,o=s===void 0||s,n=i.transitions,a=n===void 0||n;this.$nextTick((function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),o&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t}))},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then((function(){t.onChange()})):this.resetVisibleArea().then((function(){t.onChange()}))},reset:function(){var t=this;return this.resetVisibleArea().then((function(){t.onChange(!1)}))},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){t(),e.awaiting=!1})))},prepareResult:function(t){return this.roundResult?(function(e){var i=e.coordinates,s=e.sizeRestrictions,o=e.positionRestrictions,n={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return n.width>s.maxWidth?n.width=Math.floor(i.width):n.width<s.minWidth&&(n.width=Math.ceil(i.width)),n.height>s.maxHeight?n.height=Math.floor(i.height):n.height<s.minHeight&&(n.height=Math.ceil(i.height)),M(n,o)})(v(v({},this.getPublicProperties()),{},{positionRestrictions:J(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,i,s){var o=this.autoZoomAlgorithm;o||(o=this.stencilSize?me:this.autoZoom?fe:ge);var n=o({event:{type:t,params:s},visibleArea:e,coordinates:i,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return v(v({},n),{},{changed:!Dt(n.visibleArea,e)||!Dt(n.coordinates,i)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,s=i!==void 0&&i,o=ie(e,Oe),n=this.processAutoZoom(t,this.visibleArea,this.coordinates,o),a=n.visibleArea,h=n.coordinates,r=n.changed;s&&r&&this.enableTransitions(),this.visibleArea=a,this.coordinates=h,s&&r&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return(function(e){var i=e.event,s=e.visibleArea,o=e.coefficient;if(i.type==="manipulateImage")return f(f({},i),{move:{left:i.move&&i.move.left?o*i.move.left:0,top:i.move&&i.move.top?o*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*o+s.left,top:i.scale.center.top*o+s.top}:null}});if(i.type==="resize"){var n=f(f({},i),{directions:f({},i.directions)});return O.forEach((function(h){n.directions[h]*=o})),n}if(i.type==="move"){var a=f(f({},i),{directions:f({},i.directions)});return ce.forEach((function(h){a.directions[h]*=o})),a}return i})(v(v({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(h,r,c){var l=c.rotate,u=c.flip,d={width:r.naturalWidth,height:r.naturalHeight},m=Zt(d,l),g=h.getContext("2d");h.height=m.height,h.width=m.width,g.save();var p=j(R(f({left:0,top:0},d)),l);return g.translate(-(p.left-m.width/2),-(p.top-m.height/2)),g.rotate(l*Math.PI/180),g.translate(u.horizontal?d.width:0,u.vertical?d.height:0),g.scale(u.horizontal?-1:1,u.vertical?-1:1),g.drawImage(r,0,0,d.width,d.height),g.restore(),h})(this.$refs.sourceCanvas,e,this.imageTransforms):e,s=v({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),o=function(h){return h.find((function(r){return c=r,!Number.isNaN(parseFloat(c))&&isFinite(c);var c}))},n=$({sizeRestrictions:{minWidth:o([s.width,s.minWidth])||0,minHeight:o([s.height,s.minHeight])||0,maxWidth:o([s.width,s.maxWidth])||1/0,maxHeight:o([s.height,s.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(s.maxArea&&n.width*n.height>s.maxArea){var a=Math.sqrt(s.maxArea/(n.width*n.height));n={width:Math.round(a*n.width),height:Math.round(a*n.height)}}return(function(h,r,c,l,u){h.width=l?l.width:c.width,h.height=l?l.height:c.height;var d=h.getContext("2d");d.clearRect(0,0,h.width,h.height),u&&(u.imageSmoothingEnabled&&(d.imageSmoothingEnabled=u.imageSmoothingEnabled),u.imageSmoothingQuality&&(d.imageSmoothingQuality=u.imageSmoothingQuality),u.fillColor&&(d.fillStyle=u.fillColor,d.fillRect(0,0,h.width,h.height),d.save()));var m=c.left<0?-c.left:0,g=c.top<0?-c.top:0;d.drawImage(r,c.left+m,c.top+g,c.width,c.height,m*(h.width/c.width),g*(h.height/c.height),h.width,h.height)})(t,i,this.coordinates,n,s),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&e?ue(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,s=this.visibleArea&&e?J(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return de({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:s,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?be:ve);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var s=Y(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,o=this.defaultPosition||pe,n=[s,function(a){var h=a.coordinates;return v({},Y(o)?o({coordinates:h,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&n.push.apply(n,k(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(n,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout((function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then((function(){var s={cropper:i,imageSize:t.imageSize};if(Y(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(s):t.defaultBoundaries==="fit"?t.boundaries=(function(o){var n=o.cropper,a=o.imageSize,h=n.clientHeight,r=n.clientWidth,c=h,l=a.width*h/a.height;return l>r&&(l=r,c=a.height*r/a.width),{width:l,height:c}})(s):t.boundaries=(function(o){var n=o.cropper;return{width:n.clientWidth,height:n.clientHeight}})(s),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=v(v({},this.defaultImageTransforms),{},{flip:v({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,i,s,o,n,a,h=t.defaultVisibleArea||we;t.visibleArea=Y(h)?h({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},i=e.visibleArea,s=e.boundaries,o=e.getAreaRestrictions,n=f({},i),a=b(s),n.width/n.height!==a&&(n.height=n.width/a),M(n,o({visibleArea:n,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")})).catch((function(){t.visibleArea=null}))},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then((function(){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")})).catch((function(){t.visibleArea=null}))},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(o){if(Ct(o))return!1;var n=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(o)||[],h={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},r=function(c){return c.port||((c.protocol||n.protocol)==="http"?80:433)};return!(!h.protocol&&!h.host&&!h.port||h.protocol&&h.protocol==n.protocol&&h.host&&h.host==n.host&&h.host&&r(h)==r(n))})(this.src)){var i=A(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var s=(t=this.src,new Promise((function(o){We(t).then((function(n){var a=De(n);o(n?{source:t,arrayBuffer:n,orientation:a}:{source:t,arrayBuffer:null,orientation:null})})).catch((function(n){console.warn(n),o({source:t,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){s.then(e.onParseImage)}),this.transitionTime)}else setTimeout((function(){e.onParseImage({source:e.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){t.$emit("ready"),t.onChange(!1)})))},onParseImage:function(t){var e=this,i=t.source,s=t.arrayBuffer,o=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,s&&o&&o>1?kt(i)||!Ct(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([s])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(n){for(var a=[],h=new Uint8Array(n);h.length>0;){var r=h.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(r):r.slice())),h=h.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))})(s):this.imageAttributes.src=i,Y(this.defaultTransforms)?this.appliedImageTransforms=ut(this.defaultTransforms()):it(this.defaultTransforms)?this.appliedImageTransforms=ut(this.defaultTransforms):this.appliedImageTransforms=(function(n){var a=ut({});if(n)switch(n){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a})(o),this.defaultImageTransforms=v(v({},this.appliedImageTransforms),{},{flip:v({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var n=e.$refs.image;n&&n.complete&&((function(a){return!!a.naturalWidth})(n)?e.onSuccessLoadImage():e.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender((function(){e.coordinates=e.moveAlgorithm(v(v({},e.getPublicProperties()),{},{positionRestrictions:J(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()}))},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var i=e.sizeRestrictions,s=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(v(v({},e.getPublicProperties()),{},{positionRestrictions:J(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,e.visibleArea.width),maxHeight:Math.min(i.maxHeight,e.visibleArea.height),minWidth:Math.max(i.minWidth,s),minHeight:Math.max(i.minHeight,s)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1}))},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=e.transitions,s=i!==void 0&&i,o=e.normalize,n=o===void 0||o;s&&this.enableTransitions();var a=ye(v(v({},this.getPublicProperties()),{},{event:n?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),h=a.visibleArea,r=a.coordinates;this.visibleArea=h,this.coordinates=r,this.runAutoZoom("manipulateImage"),this.onChange(),s&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,i=t.type,s=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:s})},getAspectRatio:function(t){var e,i,s=this.stencilProps,o=s.aspectRatio,n=s.minAspectRatio,a=s.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var h=this.$refs.stencil.aspectRatios();e=h.minimum,i=h.maximum}if(A(e)&&(e=A(o)?n:o),A(i)&&(i=A(o)?a:o),!t&&(A(e)||A(i))){var r=this.getStencilSize(),c=r?b(r):null;A(e)&&(e=Tt(c)?c:void 0),A(i)&&(i=Tt(c)?c:void 0)}return{minimum:e,maximum:i}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,i=t.stencilSize,s=t.aspectRatio,ct(b(o=Y(i)?i({boundaries:e,aspectRatio:s}):i),s)&&(o=$({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:s.minimum,maximum:s.maximum}})),(o.width>e.width||o.height>e.height)&&(o=$({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:o.width,height:o.height,aspectRatio:{minimum:b(o),maximum:b(o)}})),o;var t,e,i,s,o},getPublicProperties:function(){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}},defaultCoordinates:function(){return v({},Wt)},flip:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.transitions,o=s===void 0||s;if(!this.transitionsActive){o&&this.enableTransitions();var n=v({},this.imageTransforms.flip),a=Ae({flip:{horizontal:t?!n.horizontal:n.horizontal,vertical:e?!n.vertical:n.vertical},previousFlip:n,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),h=a.visibleArea,r=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=h,this.coordinates=r,this.onChange(),o&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,s=i===void 0||i;if(!this.transitionsActive){s&&this.enableTransitions();var o=v({},this.imageSize);this.appliedImageTransforms.rotate+=t;var n=ze({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:o,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=n.visibleArea,h=n.coordinates,r=this.processAutoZoom("rotateImage",a,h);a=r.visibleArea,h=r.coordinates,this.visibleArea=a,this.coordinates=h,this.onChange(),s&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Le={key:0,ref:"canvas",style:{display:"none"}},Pe={key:1,ref:"sourceCanvas",style:{display:"none"}};He.render=function(t,e,i,s,o,n){return w(),y("div",{ref:"cropper",class:n.classes.cropper},[S("div",{ref:"stretcher",class:n.classes.stretcher},null,2),S("div",{class:n.classes.boundaries,style:n.boundariesStyle},[(w(),y(nt(i.backgroundWrapperComponent),{class:n.classes.cropperWrapper,"wheel-resize":n.settings.resizeImage.wheel,"touch-resize":n.settings.resizeImage.touch,"touch-move":n.settings.moveImage.touch,"mouse-move":n.settings.moveImage.mouse,onMove:n.onManipulateImage,onResize:n.onManipulateImage},{default:B((function(){return[S("div",{class:n.classes.background,style:n.boundariesStyle},null,6),S("div",{class:n.classes.imageWrapper},[S("img",{ref:"image",crossorigin:o.imageAttributes.crossOrigin,src:o.imageAttributes.src,class:n.classes.image,style:n.imageStyle,onMousedown:e[1]||(e[1]=ee((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),S("div",{class:n.classes.foreground,style:n.boundariesStyle},null,6),$t((w(),y(nt(i.stencilComponent),jt({ref:"stencil",image:n.image,coordinates:o.coordinates,"stencil-coordinates":n.stencilCoordinates,transitions:n.transitionsOptions},i.stencilProps,{onResize:n.onResize,onResizeEnd:n.onResizeEnd,onMove:n.onMove,onMoveEnd:n.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[It,o.imageLoaded]]),i.canvas?(w(),y("canvas",Le,null,512)):St("",!0),i.canvas?(w(),y("canvas",Pe,null,512)):St("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};export{He as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as T,a as h,b as d,D as we,c as P,d as ee,e as V,u as j,f as te,g as ht,m as S,h as y,j as p,k as Q,l as ae,n as kt,o as M,p as Ee,q as Ie,r as X,s as Z,A as Nt,t as pt,v as yt,N as Pt,w as se,x as Mt,y as Le,C as St,z as Fe,B as Te,M as Re,E as Oe,F as ve,G as he,H as ke,I as Ct,J as Dt,K as At,L as Wt,O as B,P as Ut,Q as Vt,R as xt,S as wt,T as $t}from"./@intlify-Dtb6NmBn.js";import{av as Ht,w as le,e as Yt,a as jt,j as Gt,k as G,p as _e,d as Bt,o as Xt,i as Jt,g as Kt,b as zt,a8 as qt,v as $e,U as Qt,a7 as Zt,K as He}from"./@vue-fhDHgfUd.js";const ea="11.4.0";function ta(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(B().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(B().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(B().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(B().__INTLIFY_PROD_DEVTOOLS__=!1)}const R={UNEXPECTED_RETURN_TYPE:St,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function O(e,...t){return ht(e,null,void 0)}const oe=S("__translateVNode"),ce=S("__datetimeParts"),ie=S("__numberParts"),Ye=S("__setPluralRules"),je=S("__injectWithOption"),x=S("__dispose");function J(e){if(!M(e)||Z(e))return e;for(const t in e)if(ae(e,t))if(!t.includes("."))M(e[t])&&J(e[t]);else{const c=t.split("."),s=c.length-1;let a=e,r=!1;for(let l=0;l<s;l++){if(c[l]==="__proto__")throw new Error(`unsafe key: ${c[l]}`);if(c[l]in a||(a[c[l]]=p()),!M(a[c[l]])){r=!0;break}a=a[c[l]]}if(r||(Z(a)?Nt.includes(c[s])||delete e[t]:(a[c[s]]=e[t],delete e[t])),!Z(a)){const l=a[c[s]];M(l)&&J(l)}}return e}function me(e,t){const{messages:c,__i18n:s,messageResolver:a,flatJson:r}=t,l=h(c)?c:P(s)?p():{[e]:p()};if(P(s)&&s.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:u,resource:m}=i;u?(l[u]=l[u]||p(),Q(m,l[u])):Q(m,l)}else d(i)&&Q(JSON.parse(i),l)}),a==null&&r)for(const i in l)ae(l,i)&&J(l[i]);return l}function Ge(e){return e.type}function Be(e,t,c){let s=M(t.messages)?t.messages:p();"__i18nGlobal"in c&&(s=me(e.locale.value,{messages:s,__i18n:c.__i18nGlobal}));const a=Object.keys(s);a.length&&a.forEach(r=>{e.mergeLocaleMessage(r,s[r])});{if(M(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(M(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function Ne(e){return Qt(Zt,null,e,0)}function K(){return Bt()}const pe="__INTLIFY_META__",ye=()=>[],aa=()=>!1;let Pe=0;function Me(e){return((t,c,s,a)=>e(c,s,K()||void 0,a))}const na=()=>{const e=K();let t=null;return e&&(t=Ge(e)[pe])?{[pe]:t}:null};function ne(e={}){const{__root:t,__injectWithOption:c}=e,s=t===void 0,a=e.flatJson,r=te?jt:Gt;let l=T(e.inheritLocale)?e.inheritLocale:!0;const i=r(t&&l?t.locale.value:d(e.locale)?e.locale:we),u=r(t&&l?t.fallbackLocale.value:d(e.fallbackLocale)||P(e.fallbackLocale)||h(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),m=r(me(i.value,e)),g=r(h(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),f=r(h(e.numberFormats)?e.numberFormats:{[i.value]:{}});let E=t?t.missingWarn:T(e.missingWarn)||ee(e.missingWarn)?e.missingWarn:!0,L=t?t.fallbackWarn:T(e.fallbackWarn)||ee(e.fallbackWarn)?e.fallbackWarn:!0,k=t?t.fallbackRoot:T(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,z=V(e.missing)?e.missing:null,U=V(e.missing)?Me(e.missing):null,C=V(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:T(e.warnHtmlMessage)?e.warnHtmlMessage:!0,$=!!e.escapeParameter;const H=t?t.modifiers:h(e.modifiers)?e.modifiers:{};let Y=e.pluralRules||t&&t.pluralRules,_;_=(()=>{s&&Le(null);const n={version:ea,locale:i.value,fallbackLocale:u.value,messages:m.value,modifiers:H,pluralRules:Y,missing:U===null?void 0:U,missingWarn:E,fallbackWarn:L,fallbackFormat:v,unresolving:!0,postTranslation:C===null?void 0:C,warnHtmlMessage:w,escapeParameter:$,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};n.datetimeFormats=g.value,n.numberFormats=f.value,n.__datetimeFormatters=h(_)?_.__datetimeFormatters:void 0,n.__numberFormatters=h(_)?_.__numberFormatters:void 0;const o=kt(n);return s&&Le(o),o})(),j(_,i.value,u.value);function re(){return[i.value,u.value,m.value,g.value,f.value]}const Ke=G({get:()=>i.value,set:n=>{_.locale=n,i.value=n}}),ze=G({get:()=>u.value,set:n=>{_.fallbackLocale=n,u.value=n,j(_,i.value,n)}}),qe=G(()=>m.value),Qe=G(()=>g.value),Ze=G(()=>f.value);function et(){return V(C)?C:null}function tt(n){C=n,_.postTranslation=n}function at(){return z}function nt(n){n!==null&&(U=Me(n)),z=n,_.missing=U}const D=(n,o,b,I,A,W)=>{re();let N;try{__INTLIFY_PROD_DEVTOOLS__&&pt(na()),s||(_.fallbackContext=t?yt():void 0),N=n(_)}finally{__INTLIFY_PROD_DEVTOOLS__,s||(_.fallbackContext=void 0)}if(b!=="translate exists"&&X(N)&&N===Pt||b==="translate exists"&&!N){const[vt,va]=o();return t&&k?I(t):A(vt)}else{if(W(N))return N;throw O(R.UNEXPECTED_RETURN_TYPE)}};function be(...n){return D(o=>Reflect.apply(Te,null,[o,...n]),()=>Fe(...n),"translate",o=>Reflect.apply(o.t,o,[...n]),o=>o,o=>d(o))}function rt(...n){const[o,b,I]=n;if(I&&!M(I))throw O(R.INVALID_ARGUMENT);return be(o,b,y({resolvedMessage:!0},I||{}))}function st(...n){return D(o=>Reflect.apply(ve,null,[o,...n]),()=>Oe(...n),"datetime format",o=>Reflect.apply(o.d,o,[...n]),()=>Re,o=>d(o)||P(o))}function lt(...n){return D(o=>Reflect.apply(ke,null,[o,...n]),()=>he(...n),"number format",o=>Reflect.apply(o.n,o,[...n]),()=>Re,o=>d(o)||P(o))}function ot(n){return n.map(o=>d(o)||X(o)||T(o)?Ne(String(o)):o)}const ct={normalize:ot,interpolate:n=>n,type:"vnode"};function it(...n){return D(o=>{let b;const I=o;try{I.processor=ct,b=Reflect.apply(Te,null,[I,...n])}finally{I.processor=null}return b},()=>Fe(...n),"translate",o=>o[oe](...n),o=>[Ne(o)],o=>P(o))}function ut(...n){return D(o=>Reflect.apply(ke,null,[o,...n]),()=>he(...n),"number format",o=>o[ie](...n),ye,o=>d(o)||P(o))}function _t(...n){return D(o=>Reflect.apply(ve,null,[o,...n]),()=>Oe(...n),"datetime format",o=>o[ce](...n),ye,o=>d(o)||P(o))}function mt(n){Y=n,_.pluralRules=Y}function ft(n,o){return D(()=>{if(!n)return!1;const b=d(o)?o:i.value,I=d(o)?[b]:se(_,u.value,b);for(let A=0;A<I.length;A++){const W=de(I[A]);let N=_.messageResolver(W,n);if(N===null&&(N=W[n]),Z(N)||Ct(N)||d(N))return!0}return!1},()=>[n],"translate exists",b=>Reflect.apply(b.te,b,[n,o]),aa,b=>T(b))}function gt(n){let o=null;const b=se(_,u.value,i.value);for(let I=0;I<b.length;I++){const A=m.value[b[I]]||{},W=_.messageResolver(A,n);if(W!=null){o=W;break}}return o}function bt(n){const o=gt(n);return o??(t?t.tm(n)||{}:{})}function de(n){return m.value[n]||{}}function dt(n,o){if(a){const b={[n]:o};for(const I in b)ae(b,I)&&J(b[I]);o=b[n]}m.value[n]=o,_.messages=m.value}function Et(n,o){m.value[n]=m.value[n]||{};const b={[n]:o};if(a)for(const I in b)ae(b,I)&&J(b[I]);o=b[n],Q(o,m.value[n]),_.messages=m.value}function It(n){return g.value[n]||{}}function Lt(n,o){g.value[n]=o,_.datetimeFormats=g.value,Ee(_,n,o)}function Ft(n,o){g.value[n]=y(g.value[n]||{},o),_.datetimeFormats=g.value,Ee(_,n,o)}function Tt(n){return f.value[n]||{}}function Rt(n,o){f.value[n]=o,_.numberFormats=f.value,Ie(_,n,o)}function Ot(n,o){f.value[n]=y(f.value[n]||{},o),_.numberFormats=f.value,Ie(_,n,o)}Pe++,t&&te&&(le(t.locale,n=>{l&&(i.value=n,_.locale=n,j(_,i.value,u.value))}),le(t.fallbackLocale,n=>{l&&(u.value=n,_.fallbackLocale=n,j(_,i.value,u.value))}));const F={id:Pe,locale:Ke,fallbackLocale:ze,get inheritLocale(){return l},set inheritLocale(n){l=n,n&&t&&(i.value=t.locale.value,u.value=t.fallbackLocale.value,j(_,i.value,u.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:qe,get modifiers(){return H},get pluralRules(){return Y||{}},get isGlobal(){return s},get missingWarn(){return E},set missingWarn(n){E=n,_.missingWarn=E},get fallbackWarn(){return L},set fallbackWarn(n){L=n,_.fallbackWarn=L},get fallbackRoot(){return k},set fallbackRoot(n){k=n},get fallbackFormat(){return v},set fallbackFormat(n){v=n,_.fallbackFormat=v},get warnHtmlMessage(){return w},set warnHtmlMessage(n){w=n,_.warnHtmlMessage=n},get escapeParameter(){return $},set escapeParameter(n){$=n,_.escapeParameter=n},t:be,getLocaleMessage:de,setLocaleMessage:dt,mergeLocaleMessage:Et,getPostTranslationHandler:et,setPostTranslationHandler:tt,getMissingHandler:at,setMissingHandler:nt,[Ye]:mt};return F.datetimeFormats=Qe,F.numberFormats=Ze,F.rt=rt,F.te=ft,F.tm=bt,F.d=st,F.n=lt,F.getDateTimeFormat=It,F.setDateTimeFormat=Lt,F.mergeDateTimeFormat=Ft,F.getNumberFormat=Tt,F.setNumberFormat=Rt,F.mergeNumberFormat=Ot,F[je]=c,F[oe]=it,F[ce]=_t,F[ie]=ut,F}function ra(e){const t=d(e.locale)?e.locale:we,c=d(e.fallbackLocale)||P(e.fallbackLocale)||h(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,s=V(e.missing)?e.missing:void 0,a=T(e.silentTranslationWarn)||ee(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=T(e.silentFallbackWarn)||ee(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=T(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,u=h(e.modifiers)?e.modifiers:{},m=e.pluralizationRules,g=V(e.postTranslation)?e.postTranslation:void 0,f=d(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,E=!!e.escapeParameterHtml,L=T(e.sync)?e.sync:!0;let k=e.messages;if(h(e.sharedMessages)){const H=e.sharedMessages;k=Object.keys(H).reduce((_,q)=>{const re=_[q]||(_[q]={});return y(re,H[q]),_},k||{})}const{__i18n:v,__root:z,__injectWithOption:U}=e,C=e.datetimeFormats,w=e.numberFormats,$=e.flatJson;return{locale:t,fallbackLocale:c,messages:k,flatJson:$,datetimeFormats:C,numberFormats:w,missing:s,missingWarn:a,fallbackWarn:r,fallbackRoot:l,fallbackFormat:i,modifiers:u,pluralRules:m,postTranslation:g,warnHtmlMessage:f,escapeParameter:E,messageResolver:e.messageResolver,inheritLocale:L,__i18n:v,__root:z,__injectWithOption:U}}function ue(e={}){const t=ne(ra(e)),{__extender:c}=e,s={id:t.id,get locale(){return t.locale.value},set locale(a){t.locale.value=a},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(a){t.fallbackLocale.value=a},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(a){t.setMissingHandler(a)},get silentTranslationWarn(){return T(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=T(a)?!a:a},get silentFallbackWarn(){return T(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=T(a)?!a:a},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(a){t.fallbackFormat=a},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(a){t.setPostTranslationHandler(a)},get sync(){return t.inheritLocale},set sync(a){t.inheritLocale=a},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){t.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(a){t.escapeParameter=a},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...a){return Reflect.apply(t.t,t,[...a])},rt(...a){return Reflect.apply(t.rt,t,[...a])},te(a,r){return t.te(a,r)},tm(a){return t.tm(a)},getLocaleMessage(a){return t.getLocaleMessage(a)},setLocaleMessage(a,r){t.setLocaleMessage(a,r)},mergeLocaleMessage(a,r){t.mergeLocaleMessage(a,r)},d(...a){return Reflect.apply(t.d,t,[...a])},getDateTimeFormat(a){return t.getDateTimeFormat(a)},setDateTimeFormat(a,r){t.setDateTimeFormat(a,r)},mergeDateTimeFormat(a,r){t.mergeDateTimeFormat(a,r)},n(...a){return Reflect.apply(t.n,t,[...a])},getNumberFormat(a){return t.getNumberFormat(a)},setNumberFormat(a,r){t.setNumberFormat(a,r)},mergeNumberFormat(a,r){t.mergeNumberFormat(a,r)}};return s.__extender=c,s}function sa(e,t,c){return{beforeCreate(){const s=K();if(!s)throw O(R.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const r=a.i18n;if(a.__i18n&&(r.__i18n=a.__i18n),r.__root=t,this===this.$root)this.$i18n=Se(e,r);else{r.__injectWithOption=!0,r.__extender=c.__vueI18nExtend,this.$i18n=ue(r);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Se(e,a);else{this.$i18n=ue({__i18n:a.__i18n,__injectWithOption:!0,__extender:c.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&Be(t,a,a),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,l)=>this.$i18n.te(r,l),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),c.__setInstance(s,this.$i18n)},mounted(){},unmounted(){const s=K();if(!s)throw O(R.UNEXPECTED_ERROR);const a=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),c.__deleteInstance(s),delete this.$i18n}}}function Se(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Ye](t.pluralizationRules||e.pluralizationRules);const c=me(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(c).forEach(s=>e.mergeLocaleMessage(s,c[s])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(s=>e.mergeDateTimeFormat(s,t.datetimeFormats[s])),t.numberFormats&&Object.keys(t.numberFormats).forEach(s=>e.mergeNumberFormat(s,t.numberFormats[s])),e}const fe={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function la({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,a)=>[...s,...a.type===He?a.children:[a]],[]):t.reduce((c,s)=>{const a=e[s];return a&&(c[s]=a()),c},p())}function Xe(){return He}const oa=_e({name:"i18n-t",props:y({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>X(e)||!isNaN(e)}},fe),setup(e,t){const{slots:c,attrs:s}=t,a=e.i18n||ge({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(c).filter(f=>f[0]!=="_"),l=p();e.locale&&(l.locale=e.locale),e.plural!==void 0&&(l.plural=d(e.plural)?+e.plural:e.plural);const i=la(t,r),u=a[oe](e.keypath,i,l),m=y(p(),s),g=d(e.tag)||M(e.tag)?e.tag:Xe();return $e(g,m,u)}}}),Ce=oa;function ca(e){return P(e)&&!d(e[0])}function Je(e,t,c,s){const{slots:a,attrs:r}=t;return()=>{const l={part:!0};let i=p();e.locale&&(l.locale=e.locale),d(e.format)?l.key=e.format:M(e.format)&&(d(e.format.key)&&(l.key=e.format.key),i=Object.keys(e.format).reduce((E,L)=>c.includes(L)?y(p(),E,{[L]:e.format[L]}):E,p()));const u=s(e.value,l,i);let m=[l.key];P(u)?m=u.map((E,L)=>{const k=a[E.type],v=k?k({[E.type]:E.value,index:L,parts:u}):[E.value];return ca(v)&&(v[0].key=`${E.type}-${L}`),v}):d(u)&&(m=[u]);const g=y(p(),r),f=d(e.tag)||M(e.tag)?e.tag:Xe();return $e(f,g,m)}}const ia=_e({name:"i18n-n",props:y({value:{type:Number,required:!0},format:{type:[String,Object]}},fe),setup(e,t){const c=e.i18n||ge({useScope:e.scope,__useComponent:!0});return Je(e,t,Vt,(...s)=>c[ie](...s))}}),De=ia;function ua(e,t){const c=e;if(e.mode==="composition")return c.__getInstance(t)||e.global;{const s=c.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function _a(e){const t=l=>{const{instance:i,value:u}=l;if(!i||!i.$)throw O(R.UNEXPECTED_ERROR);const m=ua(e,i.$),g=Ae(u);return[Reflect.apply(m.t,m,[...We(g)]),m]};return{created:(l,i)=>{const[u,m]=t(i);te&&(l.__i18nWatcher=le(m.locale,()=>{i.instance&&i.instance.$forceUpdate()})),l.__composer=m,l.textContent=u},unmounted:l=>{te&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:i})=>{if(l.__composer){const u=l.__composer,m=Ae(i);l.textContent=Reflect.apply(u.t,u,[...We(m)])}},getSSRProps:l=>{const[i]=t(l);return{textContent:i}}}}function Ae(e){if(d(e))return{path:e};if(h(e)){if(!("path"in e))throw O(R.REQUIRED_VALUE,"path");return e}else throw O(R.INVALID_VALUE)}function We(e){const{path:t,locale:c,args:s,choice:a,plural:r}=e,l={},i=s||{};return d(c)&&(l.locale=c),X(a)&&(l.plural=a),X(r)&&(l.plural=r),[t,i,l]}function ma(e,t,...c){const s=h(c[0])?c[0]:{};(!T(s.globalInstall)||s.globalInstall)&&([Ce.name,"I18nT"].forEach(r=>e.component(r,Ce)),[De.name,"I18nN"].forEach(r=>e.component(r,De)),[xe.name,"I18nD"].forEach(r=>e.component(r,xe))),e.directive("t",_a(t))}const fa=S("global-vue-i18n");function Na(e={}){const t=__VUE_I18N_LEGACY_API__&&T(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,c=T(e.globalInjection)?e.globalInjection:!0,s=new Map,[a,r]=ga(e,t),l=S("");function i(f){return s.get(f)||null}function u(f,E){s.set(f,E)}function m(f){s.delete(f)}const g={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(f,...E){if(f.__VUE_I18N_SYMBOL__=l,f.provide(f.__VUE_I18N_SYMBOL__,g),h(E[0])){const v=E[0];g.__composerExtend=v.__composerExtend,g.__vueI18nExtend=v.__vueI18nExtend}let L=null;!t&&c&&(L=Ta(f,g.global)),__VUE_I18N_FULL_INSTALL__&&ma(f,g,...E),__VUE_I18N_LEGACY_API__&&t&&f.mixin(sa(r,r.__composer,g));const k=f.unmount;f.unmount=()=>{L&&L(),g.dispose(),k()}},get global(){return r},dispose(){a.stop()},__instances:s,__getInstance:i,__setInstance:u,__deleteInstance:m};return g}function ge(e={}){const t=K();if(t==null)throw O(R.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw O(R.NOT_INSTALLED);const c=ba(t),s=Ea(c),a=Ge(t),r=da(e,a);if(r==="global")return Be(s,e,a),s;if(r==="parent"){let u=Ue(c,t,e.__useComponent);return u==null&&(u=s),u}if(r==="isolated"){if(c.mode!=="composition")throw O(R.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=c,m=y({},e),g=Ue(c,t);m.__root=g||s;const f=ne(m);return u.__composerExtend&&(f[x]=u.__composerExtend(f)),Kt()&&Xt(()=>{const L=f[x];L&&(L(),delete f[x])}),f}const l=c;let i=l.__getInstance(t);if(i==null){const u=y({},e);"__i18n"in a&&(u.__i18n=a.__i18n),s&&(u.__root=s),i=ne(u),l.__composerExtend&&(i[x]=l.__composerExtend(i)),La(l,t,i),l.__setInstance(t,i)}return i}function ga(e,t){const c=Ht(),s=__VUE_I18N_LEGACY_API__&&t?c.run(()=>ue(e)):c.run(()=>ne(e));if(s==null)throw O(R.UNEXPECTED_ERROR);return[c,s]}function ba(e){const t=Jt(e.isCE?fa:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw O(e.isCE?R.NOT_INSTALLED_WITH_PROVIDE:R.UNEXPECTED_ERROR);return t}function da(e,t){return Mt(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Ea(e){return e.mode==="composition"?e.global:e.global.__composer}function Ue(e,t,c=!1){let s=null;const a=t.root;let r=Ia(t,c);for(;r!=null;){const l=e;if(e.mode==="composition")s=l.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const i=l.__getInstance(r);i!=null&&(s=i.__composer,c&&s&&!s[je]&&(s=null))}if(s!=null||a===r)break;r=r.parent}return s}function Ia(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function La(e,t,c){zt(()=>{},t),qt(()=>{const s=c;e.__deleteInstance(t);const a=s[x];a&&(a(),delete s[x])},t)}const Fa=["locale","fallbackLocale","availableLocales"],Ve=["t","rt","d","n","tm","te"];function Ta(e,t){const c=Object.create(null);return Fa.forEach(a=>{const r=Object.getOwnPropertyDescriptor(t,a);if(!r)throw O(R.UNEXPECTED_ERROR);const l=Yt(r.value)?{get(){return r.value.value},set(i){r.value.value=i}}:{get(){return r.get&&r.get()}};Object.defineProperty(c,a,l)}),e.config.globalProperties.$i18n=c,Ve.forEach(a=>{const r=Object.getOwnPropertyDescriptor(t,a);if(!r||!r.value)throw O(R.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,r)}),()=>{delete e.config.globalProperties.$i18n,Ve.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const Ra=_e({name:"i18n-d",props:y({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fe),setup(e,t){const c=e.i18n||ge({useScope:e.scope,__useComponent:!0});return Je(e,t,xt,(...s)=>c[ce](...s))}}),xe=Ra;ta();Dt(wt);At($t);Wt(se);if(__INTLIFY_PROD_DEVTOOLS__){const e=B();e.__INTLIFY__=!0,Ut(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}export{Na as c,ge as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as M,a8 as lt,R as ut,Q as ft,u as Z,az as dt,j as ht,p as Fe,v as Ke,m as pt,k as L,w as mt,a as gt,n as vt,H as de}from"./@vue-fhDHgfUd.js";const K=typeof document<"u";function We(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Rt(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&We(e.default)}const O=Object.assign;function he(e,t){const n={};for(const r in t){const s=t[r];n[r]=B(s)?s.map(e):e(s)}return n}const ee=()=>{},B=Array.isArray;function Se(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}let w=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Qe=Symbol("");w.MATCHER_NOT_FOUND+"",w.NAVIGATION_GUARD_REDIRECT+"",w.NAVIGATION_ABORTED+"",w.NAVIGATION_CANCELLED+"",w.NAVIGATION_DUPLICATED+"";function W(e,t){return O(new Error,{type:e,[Qe]:!0},t)}function V(e,t){return e instanceof Error&&Qe in e&&(t==null||!!(e.type&t))}const Et=["params","query","hash"];function At(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Et)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const ye=Symbol(""),be=Symbol(""),se=Symbol(""),Ne=Symbol(""),ve=Symbol("");function On(){return M(se)}function _n(e){return M(Ne)}const ze=/#/g,yt=/&/g,Nt=/\//g,Ot=/=/g,_t=/\?/g,Ye=/\+/g,Ct=/%5B/g,Pt=/%5D/g,Je=/%5E/g,It=/%60/g,Xe=/%7B/g,wt=/%7C/g,Ze=/%7D/g,St=/%20/g;function Oe(e){return e==null?"":encodeURI(""+e).replace(wt,"|").replace(Ct,"[").replace(Pt,"]")}function bt(e){return Oe(e).replace(Xe,"{").replace(Ze,"}").replace(Je,"^")}function Re(e){return Oe(e).replace(Ye,"%2B").replace(St,"+").replace(ze,"%23").replace(yt,"%26").replace(It,"`").replace(Xe,"{").replace(Ze,"}").replace(Je,"^")}function Tt(e){return Re(e).replace(Ot,"%3D")}function Dt(e){return Oe(e).replace(ze,"%23").replace(_t,"%3F")}function xt(e){return Dt(e).replace(Nt,"%2F")}function re(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Gt=/\/$/,kt=e=>e.replace(Gt,"");function pe(e,t,n="/"){let r,s={},u="",d="";const g=t.indexOf("#");let i=t.indexOf("?");return i=g>=0&&i>g?-1:i,i>=0&&(r=t.slice(0,i),u=t.slice(i,g>0?g:t.length),s=e(u.slice(1))),g>=0&&(r=r||t.slice(0,g),d=t.slice(g,t.length)),r=Mt(r??t,n),{fullPath:r+u+d,path:r,query:s,hash:re(d)}}function Bt(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Te(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Lt(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Q(t.matched[r],n.matched[s])&&et(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Q(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function et(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Vt(e[n],t[n]))return!1;return!0}function Vt(e,t){return B(e)?De(e,t):B(t)?De(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function De(e,t){return B(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Mt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let u=n.length-1,d,g;for(d=0;d<r.length;d++)if(g=r[d],g!==".")if(g==="..")u>1&&u--;else break;return n.slice(0,u).join("/")+"/"+r.slice(d).join("/")}const $={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ee=(function(e){return e.pop="pop",e.push="push",e})({}),me=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Ut(e){if(!e)if(K){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),kt(e)}const $t=/^[^#]+#/;function Ht(e,t){return e.replace($t,"#")+t}function jt(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const oe=()=>({left:window.scrollX,top:window.scrollY});function qt(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=jt(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function xe(e,t){return(history.state?history.state.position-t:-1)+e}const Ae=new Map;function Ft(e,t){Ae.set(e,t)}function Kt(e){const t=Ae.get(e);return Ae.delete(e),t}function Wt(e){return typeof e=="string"||e&&typeof e=="object"}function tt(e){return typeof e=="string"||typeof e=="symbol"}function Qt(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Ye," "),u=s.indexOf("="),d=re(u<0?s:s.slice(0,u)),g=u<0?null:re(s.slice(u+1));if(d in t){let i=t[d];B(i)||(i=t[d]=[i]),i.push(g)}else t[d]=g}return t}function Ge(e){let t="";for(let n in e){const r=e[n];if(n=Tt(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(B(r)?r.map(s=>s&&Re(s)):[r&&Re(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function zt(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=B(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}function X(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function nt(e,t,n){const r=e.value;if(!r)return;let s=r;const u=()=>{s[t].delete(n)};lt(u),ut(u),ft(()=>{const d=e.value;d&&(s=d),s[t].add(n)}),s[t].add(n)}function Cn(e){nt(M(ye,{}),"leaveGuards",e)}function Pn(e){nt(M(ye,{}),"updateGuards",e)}function H(e,t,n,r,s,u=d=>d()){const d=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((g,i)=>{const f=c=>{c===!1?i(W(w.NAVIGATION_ABORTED,{from:n,to:t})):c instanceof Error?i(c):Wt(c)?i(W(w.NAVIGATION_GUARD_REDIRECT,{from:t,to:c})):(d&&r.enterCallbacks[s]===d&&typeof c=="function"&&d.push(c),g())},h=u(()=>e.call(r&&r.instances[s],t,n,f));let a=Promise.resolve(h);e.length<3&&(a=a.then(f)),a.catch(c=>i(c))})}function ge(e,t,n,r,s=u=>u()){const u=[];for(const d of e)for(const g in d.components){let i=d.components[g];if(!(t!=="beforeRouteEnter"&&!d.instances[g]))if(We(i)){const f=(i.__vccOpts||i)[t];f&&u.push(H(f,n,r,d,g,s))}else{let f=i();u.push(()=>f.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${g}" at "${d.path}"`);const a=Rt(h)?h.default:h;d.mods[g]=h,d.components[g]=a;const c=(a.__vccOpts||a)[t];return c&&H(c,n,r,d,g,s)()}))}}return u}function Yt(e,t){const n=[],r=[],s=[],u=Math.max(t.matched.length,e.matched.length);for(let d=0;d<u;d++){const g=t.matched[d];g&&(e.matched.find(f=>Q(f,g))?r.push(g):n.push(g));const i=e.matched[d];i&&(t.matched.find(f=>Q(f,i))||s.push(i))}return[n,r,s]}let Jt=()=>location.protocol+"//"+location.host;function rt(e,t){const{pathname:n,search:r,hash:s}=t,u=e.indexOf("#");if(u>-1){let d=s.includes(e.slice(u))?e.slice(u).length:1,g=s.slice(d);return g[0]!=="/"&&(g="/"+g),Te(g,"")}return Te(n,e)+r+s}function Xt(e,t,n,r){let s=[],u=[],d=null;const g=({state:c})=>{const l=rt(e,location),N=n.value,_=t.value;let P=0;if(c){if(n.value=l,t.value=c,d&&d===N){d=null;return}P=_?c.position-_.position:0}else r(l);s.forEach(I=>{I(n.value,N,{delta:P,type:Ee.pop,direction:P?P>0?me.forward:me.back:me.unknown})})};function i(){d=n.value}function f(c){s.push(c);const l=()=>{const N=s.indexOf(c);N>-1&&s.splice(N,1)};return u.push(l),l}function h(){if(document.visibilityState==="hidden"){const{history:c}=window;if(!c.state)return;c.replaceState(O({},c.state,{scroll:oe()}),"")}}function a(){for(const c of u)c();u=[],window.removeEventListener("popstate",g),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",g),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:i,listen:f,destroy:a}}function ke(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?oe():null}}function Zt(e){const{history:t,location:n}=window,r={value:rt(e,n)},s={value:t.state};s.value||u(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function u(i,f,h){const a=e.indexOf("#"),c=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+i:Jt()+e+i;try{t[h?"replaceState":"pushState"](f,"",c),s.value=f}catch(l){console.error(l),n[h?"replace":"assign"](c)}}function d(i,f){u(i,O({},t.state,ke(s.value.back,i,s.value.forward,!0),f,{position:s.value.position}),!0),r.value=i}function g(i,f){const h=O({},s.value,t.state,{forward:i,scroll:oe()});u(h.current,h,!0),u(i,O({},ke(r.value,i,null),{position:h.position+1},f),!1),r.value=i}return{location:r,state:s,push:g,replace:d}}function In(e){e=Ut(e);const t=Zt(e),n=Xt(e,t.state,t.location,t.replace);function r(u,d=!0){d||n.pauseListeners(),history.go(u)}const s=O({location:"",base:e,go:r,createHref:Ht.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let q=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var T=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(T||{});const en={type:q.Static,value:""},tn=/[a-zA-Z0-9_]/;function nn(e){if(!e)return[[]];if(e==="/")return[[en]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(l){throw new Error(`ERR (${n})/"${f}": ${l}`)}let n=T.Static,r=n;const s=[];let u;function d(){u&&s.push(u),u=[]}let g=0,i,f="",h="";function a(){f&&(n===T.Static?u.push({type:q.Static,value:f}):n===T.Param||n===T.ParamRegExp||n===T.ParamRegExpEnd?(u.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),u.push({type:q.Param,value:f,regexp:h,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),f="")}function c(){f+=i}for(;g<e.length;){if(i=e[g++],i==="\\"&&n!==T.ParamRegExp){r=n,n=T.EscapeNext;continue}switch(n){case T.Static:i==="/"?(f&&a(),d()):i===":"?(a(),n=T.Param):c();break;case T.EscapeNext:c(),n=r;break;case T.Param:i==="("?n=T.ParamRegExp:tn.test(i)?c():(a(),n=T.Static,i!=="*"&&i!=="?"&&i!=="+"&&g--);break;case T.ParamRegExp:i===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+i:n=T.ParamRegExpEnd:h+=i;break;case T.ParamRegExpEnd:a(),n=T.Static,i!=="*"&&i!=="?"&&i!=="+"&&g--,h="";break;default:t("Unknown state");break}}return n===T.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),a(),d(),s}const Be="[^/]+?",rn={sensitive:!1,strict:!1,start:!0,end:!0};var D=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(D||{});const sn=/[.+*?^${}()[\]/\\]/g;function on(e,t){const n=O({},rn,t),r=[];let s=n.start?"^":"";const u=[];for(const f of e){const h=f.length?[]:[D.Root];n.strict&&!f.length&&(s+="/");for(let a=0;a<f.length;a++){const c=f[a];let l=D.Segment+(n.sensitive?D.BonusCaseSensitive:0);if(c.type===q.Static)a||(s+="/"),s+=c.value.replace(sn,"\\$&"),l+=D.Static;else if(c.type===q.Param){const{value:N,repeatable:_,optional:P,regexp:I}=c;u.push({name:N,repeatable:_,optional:P});const y=I||Be;if(y!==Be){l+=D.BonusCustomRegExp;try{new RegExp(`(${y})`)}catch(k){throw new Error(`Invalid custom RegExp for param "${N}" (${y}): `+k.message)}}let C=_?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;a||(C=P&&f.length<2?`(?:/${C})`:"/"+C),P&&(C+="?"),s+=C,l+=D.Dynamic,P&&(l+=D.BonusOptional),_&&(l+=D.BonusRepeatable),y===".*"&&(l+=D.BonusWildcard)}h.push(l)}r.push(h)}if(n.strict&&n.end){const f=r.length-1;r[f][r[f].length-1]+=D.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const d=new RegExp(s,n.sensitive?"":"i");function g(f){const h=f.match(d),a={};if(!h)return null;for(let c=1;c<h.length;c++){const l=h[c]||"",N=u[c-1];a[N.name]=l&&N.repeatable?l.split("/"):l}return a}function i(f){let h="",a=!1;for(const c of e){(!a||!h.endsWith("/"))&&(h+="/"),a=!1;for(const l of c)if(l.type===q.Static)h+=l.value;else if(l.type===q.Param){const{value:N,repeatable:_,optional:P}=l,I=N in f?f[N]:"";if(B(I)&&!_)throw new Error(`Provided param "${N}" is an array but it is not repeatable (* or + modifiers)`);const y=B(I)?I.join("/"):I;if(!y)if(P)c.length<2&&(h.endsWith("/")?h=h.slice(0,-1):a=!0);else throw new Error(`Missing required param "${N}"`);h+=y}}return h||"/"}return{re:d,score:r,keys:u,parse:g,stringify:i}}function an(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===D.Static+D.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===D.Static+D.Segment?1:-1:0}function st(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const u=an(r[n],s[n]);if(u)return u;n++}if(Math.abs(s.length-r.length)===1){if(Le(r))return 1;if(Le(s))return-1}return s.length-r.length}function Le(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const cn={strict:!1,end:!0,sensitive:!1};function ln(e,t,n){const r=on(nn(e.path),n),s=O(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function un(e,t){const n=[],r=new Map;t=Se(cn,t);function s(a){return r.get(a)}function u(a,c,l){const N=!l,_=Me(a);_.aliasOf=l&&l.record;const P=Se(t,a),I=[_];if("alias"in a){const k=typeof a.alias=="string"?[a.alias]:a.alias;for(const j of k)I.push(Me(O({},_,{components:l?l.record.components:_.components,path:j,aliasOf:l?l.record:_})))}let y,C;for(const k of I){const{path:j}=k;if(c&&j[0]!=="/"){const U=c.record.path,G=U[U.length-1]==="/"?"":"/";k.path=c.record.path+(j&&G+j)}if(y=ln(k,c,P),l?l.alias.push(y):(C=C||y,C!==y&&C.alias.push(y),N&&a.name&&!Ue(y)&&d(a.name)),ot(y)&&i(y),_.children){const U=_.children;for(let G=0;G<U.length;G++)u(U[G],y,l&&l.children[G])}l=l||y}return C?()=>{d(C)}:ee}function d(a){if(tt(a)){const c=r.get(a);c&&(r.delete(a),n.splice(n.indexOf(c),1),c.children.forEach(d),c.alias.forEach(d))}else{const c=n.indexOf(a);c>-1&&(n.splice(c,1),a.record.name&&r.delete(a.record.name),a.children.forEach(d),a.alias.forEach(d))}}function g(){return n}function i(a){const c=hn(a,n);n.splice(c,0,a),a.record.name&&!Ue(a)&&r.set(a.record.name,a)}function f(a,c){let l,N={},_,P;if("name"in a&&a.name){if(l=r.get(a.name),!l)throw W(w.MATCHER_NOT_FOUND,{location:a});P=l.record.name,N=O(Ve(c.params,l.keys.filter(C=>!C.optional).concat(l.parent?l.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),a.params&&Ve(a.params,l.keys.map(C=>C.name))),_=l.stringify(N)}else if(a.path!=null)_=a.path,l=n.find(C=>C.re.test(_)),l&&(N=l.parse(_),P=l.record.name);else{if(l=c.name?r.get(c.name):n.find(C=>C.re.test(c.path)),!l)throw W(w.MATCHER_NOT_FOUND,{location:a,currentLocation:c});P=l.record.name,N=O({},c.params,a.params),_=l.stringify(N)}const I=[];let y=l;for(;y;)I.unshift(y.record),y=y.parent;return{name:P,path:_,params:N,matched:I,meta:dn(I)}}e.forEach(a=>u(a));function h(){n.length=0,r.clear()}return{addRoute:u,resolve:f,removeRoute:d,clearRoutes:h,getRoutes:g,getRecordMatcher:s}}function Ve(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Me(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:fn(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function fn(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Ue(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function dn(e){return e.reduce((t,n)=>O(t,n.meta),{})}function hn(e,t){let n=0,r=t.length;for(;n!==r;){const u=n+r>>1;st(e,t[u])<0?r=u:n=u+1}const s=pn(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function pn(e){let t=e;for(;t=t.parent;)if(ot(t)&&st(e,t)===0)return t}function ot({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function $e(e){const t=M(se),n=M(Ne),r=L(()=>{const i=Z(e.to);return t.resolve(i)}),s=L(()=>{const{matched:i}=r.value,{length:f}=i,h=i[f-1],a=n.matched;if(!h||!a.length)return-1;const c=a.findIndex(Q.bind(null,h));if(c>-1)return c;const l=He(i[f-2]);return f>1&&He(h)===l&&a[a.length-1].path!==l?a.findIndex(Q.bind(null,i[f-2])):c}),u=L(()=>s.value>-1&&En(n.params,r.value.params)),d=L(()=>s.value>-1&&s.value===n.matched.length-1&&et(n.params,r.value.params));function g(i={}){if(Rn(i)){const f=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch(ee);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:r,href:L(()=>r.value.href),isActive:u,isExactActive:d,navigate:g}}function mn(e){return e.length===1?e[0]:e}const gn=Fe({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:$e,setup(e,{slots:t}){const n=pt($e(e)),{options:r}=M(se),s=L(()=>({[je(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[je(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const u=t.default&&mn(t.default(n));return e.custom?u:Ke("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},u)}}}),vn=gn;function Rn(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function En(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!B(s)||s.length!==r.length||r.some((u,d)=>u.valueOf()!==s[d].valueOf()))return!1}return!0}function He(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const je=(e,t,n)=>e??t??n,An=Fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=M(ve),s=L(()=>e.route||r.value),u=M(be,0),d=L(()=>{let f=Z(u);const{matched:h}=s.value;let a;for(;(a=h[f])&&!a.components;)f++;return f}),g=L(()=>s.value.matched[d.value]);de(be,L(()=>d.value+1)),de(ye,g),de(ve,s);const i=gt();return mt(()=>[i.value,g.value,e.name],([f,h,a],[c,l,N])=>{h&&(h.instances[a]=f,l&&l!==h&&f&&f===c&&(h.leaveGuards.size||(h.leaveGuards=l.leaveGuards),h.updateGuards.size||(h.updateGuards=l.updateGuards))),f&&h&&(!l||!Q(h,l)||!c)&&(h.enterCallbacks[a]||[]).forEach(_=>_(f))},{flush:"post"}),()=>{const f=s.value,h=e.name,a=g.value,c=a&&a.components[h];if(!c)return qe(n.default,{Component:c,route:f});const l=a.props[h],N=l?l===!0?f.params:typeof l=="function"?l(f):l:null,P=Ke(c,O({},N,t,{onVnodeUnmounted:I=>{I.component.isUnmounted&&(a.instances[h]=null)},ref:i}));return qe(n.default,{Component:P,route:f})||P}}});function qe(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const yn=An;function wn(e){const t=un(e.routes,e),n=e.parseQuery||Qt,r=e.stringifyQuery||Ge,s=e.history,u=X(),d=X(),g=X(),i=ht($);let f=$;K&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=he.bind(null,o=>""+o),a=he.bind(null,xt),c=he.bind(null,re);function l(o,m){let p,v;return tt(o)?(p=t.getRecordMatcher(o),v=m):v=o,t.addRoute(v,p)}function N(o){const m=t.getRecordMatcher(o);m&&t.removeRoute(m)}function _(){return t.getRoutes().map(o=>o.record)}function P(o){return!!t.getRecordMatcher(o)}function I(o,m){if(m=O({},m||i.value),typeof o=="string"){const R=pe(n,o,m.path),b=t.resolve({path:R.path},m),J=s.createHref(R.fullPath);return O(R,b,{params:c(b.params),redirectedFrom:void 0,href:J})}let p;if(o.path!=null)p=O({},o,{path:pe(n,o.path,m.path).path});else{const R=O({},o.params);for(const b in R)R[b]==null&&delete R[b];p=O({},o,{params:a(R)}),m.params=a(m.params)}const v=t.resolve(p,m),A=o.hash||"";v.params=h(c(v.params));const S=Bt(r,O({},o,{hash:bt(A),path:v.path})),E=s.createHref(S);return O({fullPath:S,hash:A,query:r===Ge?zt(o.query):o.query||{}},v,{redirectedFrom:void 0,href:E})}function y(o){return typeof o=="string"?pe(n,o,i.value.path):O({},o)}function C(o,m){if(f!==o)return W(w.NAVIGATION_CANCELLED,{from:m,to:o})}function k(o){return G(o)}function j(o){return k(O(y(o),{replace:!0}))}function U(o,m){const p=o.matched[o.matched.length-1];if(p&&p.redirect){const{redirect:v}=p;let A=typeof v=="function"?v(o,m):v;return typeof A=="string"&&(A=A.includes("?")||A.includes("#")?A=y(A):{path:A},A.params={}),O({query:o.query,hash:o.hash,params:A.path!=null?{}:o.params},A)}}function G(o,m){const p=f=I(o),v=i.value,A=o.state,S=o.force,E=o.replace===!0,R=U(p,v);if(R)return G(O(y(R),{state:typeof R=="object"?O({},A,R.state):A,force:S,replace:E}),m||p);const b=p;b.redirectedFrom=m;let J;return!S&&Lt(r,v,p)&&(J=W(w.NAVIGATION_DUPLICATED,{to:b,from:v}),we(v,v,!0,!1)),(J?Promise.resolve(J):_e(b,v)).catch(x=>V(x)?V(x,w.NAVIGATION_GUARD_REDIRECT)?x:le(x):ce(x,b,v)).then(x=>{if(x){if(V(x,w.NAVIGATION_GUARD_REDIRECT))return G(O({replace:E},y(x.to),{state:typeof x.to=="object"?O({},A,x.to.state):A,force:S}),m||b)}else x=Pe(b,v,!0,E,A);return Ce(b,v,x),x})}function it(o,m){const p=C(o,m);return p?Promise.reject(p):Promise.resolve()}function ie(o){const m=ne.values().next().value;return m&&typeof m.runWithContext=="function"?m.runWithContext(o):o()}function _e(o,m){let p;const[v,A,S]=Yt(o,m);p=ge(v.reverse(),"beforeRouteLeave",o,m);for(const R of v)R.leaveGuards.forEach(b=>{p.push(H(b,o,m))});const E=it.bind(null,o,m);return p.push(E),F(p).then(()=>{p=[];for(const R of u.list())p.push(H(R,o,m));return p.push(E),F(p)}).then(()=>{p=ge(A,"beforeRouteUpdate",o,m);for(const R of A)R.updateGuards.forEach(b=>{p.push(H(b,o,m))});return p.push(E),F(p)}).then(()=>{p=[];for(const R of S)if(R.beforeEnter)if(B(R.beforeEnter))for(const b of R.beforeEnter)p.push(H(b,o,m));else p.push(H(R.beforeEnter,o,m));return p.push(E),F(p)}).then(()=>(o.matched.forEach(R=>R.enterCallbacks={}),p=ge(S,"beforeRouteEnter",o,m,ie),p.push(E),F(p))).then(()=>{p=[];for(const R of d.list())p.push(H(R,o,m));return p.push(E),F(p)}).catch(R=>V(R,w.NAVIGATION_CANCELLED)?R:Promise.reject(R))}function Ce(o,m,p){g.list().forEach(v=>ie(()=>v(o,m,p)))}function Pe(o,m,p,v,A){const S=C(o,m);if(S)return S;const E=m===$,R=K?history.state:{};p&&(v||E?s.replace(o.fullPath,O({scroll:E&&R&&R.scroll},A)):s.push(o.fullPath,A)),i.value=o,we(o,m,p,E),le()}let z;function at(){z||(z=s.listen((o,m,p)=>{if(!Y.listening)return;const v=I(o),A=U(v,Y.currentRoute.value);if(A){G(O(A,{replace:!0,force:!0}),v).catch(ee);return}f=v;const S=i.value;K&&Ft(xe(S.fullPath,p.delta),oe()),_e(v,S).catch(E=>V(E,w.NAVIGATION_ABORTED|w.NAVIGATION_CANCELLED)?E:V(E,w.NAVIGATION_GUARD_REDIRECT)?(G(O(y(E.to),{force:!0}),v).then(R=>{V(R,w.NAVIGATION_ABORTED|w.NAVIGATION_DUPLICATED)&&!p.delta&&p.type===Ee.pop&&s.go(-1,!1)}).catch(ee),Promise.reject()):(p.delta&&s.go(-p.delta,!1),ce(E,v,S))).then(E=>{E=E||Pe(v,S,!1),E&&(p.delta&&!V(E,w.NAVIGATION_CANCELLED)?s.go(-p.delta,!1):p.type===Ee.pop&&V(E,w.NAVIGATION_ABORTED|w.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),Ce(v,S,E)}).catch(ee)}))}let ae=X(),Ie=X(),te;function ce(o,m,p){le(o);const v=Ie.list();return v.length?v.forEach(A=>A(o,m,p)):console.error(o),Promise.reject(o)}function ct(){return te&&i.value!==$?Promise.resolve():new Promise((o,m)=>{ae.add([o,m])})}function le(o){return te||(te=!o,at(),ae.list().forEach(([m,p])=>o?p(o):m()),ae.reset()),o}function we(o,m,p,v){const{scrollBehavior:A}=e;if(!K||!A)return Promise.resolve();const S=!p&&Kt(xe(o.fullPath,0))||(v||!p)&&history.state&&history.state.scroll||null;return vt().then(()=>A(o,m,S)).then(E=>E&&qt(E)).catch(E=>ce(E,o,m))}const ue=o=>s.go(o);let fe;const ne=new Set,Y={currentRoute:i,listening:!0,addRoute:l,removeRoute:N,clearRoutes:t.clearRoutes,hasRoute:P,getRoutes:_,resolve:I,options:e,push:k,replace:j,go:ue,back:()=>ue(-1),forward:()=>ue(1),beforeEach:u.add,beforeResolve:d.add,afterEach:g.add,onError:Ie.add,isReady:ct,install(o){o.component("RouterLink",vn),o.component("RouterView",yn),o.config.globalProperties.$router=Y,Object.defineProperty(o.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(i)}),K&&!fe&&i.value===$&&(fe=!0,k(s.location).catch(v=>{}));const m={};for(const v in $)Object.defineProperty(m,v,{get:()=>i.value[v],enumerable:!0});o.provide(se,Y),o.provide(Ne,dt(m)),o.provide(ve,i);const p=o.unmount;ne.add(o),o.unmount=function(){ne.delete(o),ne.size<1&&(f=$,z&&z(),z=null,i.value=$,fe=!1,te=!1),p()}}};function F(o){return o.reduce((m,p)=>m.then(()=>ie(p)),Promise.resolve())}return Y}export{_n as a,In as b,wn as c,Cn as d,Pn as o,On as u};
|