adtec-hnyzfc-core-package 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +19 -0
- package/README.md +30 -0
- package/dist/chunks/AddOrMinusMultiDialog.vue_vue_type_script_setup_true_lang-BB_TkU5c.js +1 -0
- package/dist/chunks/App-DxNJxGeF.js +1 -0
- package/dist/chunks/ApprovalNode.vue_vue_type_script_setup_true_lang-UOTgC-LR.js +1 -0
- package/dist/chunks/AssigneePanel.vue_vue_type_script_setup_true_lang-BkXSUmTP.js +1 -0
- package/dist/chunks/CcNode.vue_vue_type_script_setup_true_lang-DC4Lfz0O.js +1 -0
- package/dist/chunks/ConditionPanel.vue_vue_type_script_setup_true_lang-Bk2Pwa9X.js +1 -0
- package/dist/chunks/ElFlex.vue_vue_type_script_setup_true_lang-D3H7QH-5.js +1 -0
- package/dist/chunks/ElScrollbars.vue_vue_type_script_setup_true_lang-0Vhrxdyr.js +1 -0
- package/dist/chunks/ElTitle.vue_vue_type_script_setup_true_lang-B0oGtxWu.js +1 -0
- package/dist/chunks/ElTotalTools.vue_vue_type_script_setup_true_lang-Dw9M4qw4.js +1 -0
- package/dist/chunks/EndPanel.vue_vue_type_script_setup_true_lang-C4iNIDO-.js +1 -0
- package/dist/chunks/JumpNode.vue_vue_type_script_setup_true_lang-CAfaLHA3.js +1 -0
- package/dist/chunks/JumpPanel.vue_vue_type_script_setup_true_lang--JoN66Kg.js +1 -0
- package/dist/chunks/NotifyNode.vue_vue_type_script_setup_true_lang-DaNOnZvd.js +1 -0
- package/dist/chunks/NotifyPanel.vue_vue_type_script_setup_true_lang-BsWhTM_2.js +1 -0
- package/dist/chunks/ProcessDetailDialog.vue_vue_type_style_index_0_lang-Bf9S1As6.js +1 -0
- package/dist/chunks/ProcessInstance.vue_vue_type_script_setup_true_lang-DuqA8amj.js +1 -0
- package/dist/chunks/TimerNode.vue_vue_type_script_setup_true_lang-xL5Q53ju.js +1 -0
- package/dist/chunks/TimerPanel.vue_vue_type_script_setup_true_lang-D-Cav33S.js +1 -0
- package/dist/chunks/TreeNode.vue_vue_type_script_setup_true_name_TreeNode_lang-DRb0aQ9n.js +1 -0
- package/dist/chunks/Trigger.vue_vue_type_script_setup_true_lang-DH_ba4a_.js +1 -0
- package/dist/chunks/VxeButton.vue_vue_type_script_setup_true_lang-s_mYx9TA.js +1 -0
- package/dist/chunks/VxeCheckbox.vue_vue_type_script_setup_true_lang-Ccr5YD1x.js +1 -0
- package/dist/chunks/VxeForm.vue_vue_type_script_setup_true_lang-DXNZ8Qzg.js +1 -0
- package/dist/chunks/VxeInput.vue_vue_type_script_setup_true_lang-v9AqGSoL.js +1 -0
- package/dist/chunks/VxeLoading.vue_vue_type_script_setup_true_lang-B253kD5t.js +1 -0
- package/dist/chunks/VxeModal.vue_vue_type_script_setup_true_lang-B4gh7jFR.js +1 -0
- package/dist/chunks/VxePager.vue_vue_type_script_setup_true_lang-DpOa3T96.js +1 -0
- package/dist/chunks/VxeSelect.vue_vue_type_script_setup_true_lang-BfVzFeBc.js +1 -0
- package/dist/chunks/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/chunks/about-DtNEP_7P.js +1 -0
- package/dist/chunks/add-column-after-CJNsJvxN.js +1 -0
- package/dist/chunks/add-column-before-CzE7aUZ_.js +1 -0
- package/dist/chunks/add-row-after-BF72OPbU.js +1 -0
- package/dist/chunks/add-row-before-CXwFDMk7.js +1 -0
- package/dist/chunks/align-center-D9p855ZM.js +1 -0
- package/dist/chunks/align-distributed-BgCc7jUK.js +1 -0
- package/dist/chunks/align-dropdown-D13C01hp.js +1 -0
- package/dist/chunks/align-justify-D2CCR-Tv.js +1 -0
- package/dist/chunks/align-left-DGoeY8M8.js +1 -0
- package/dist/chunks/align-right-cvoUZD0j.js +1 -0
- package/dist/chunks/audio-Cu_8DUAk.js +1 -0
- package/dist/chunks/background-BqaAiULF.js +1 -0
- package/dist/chunks/background-C6Fsx6fV.js +1 -0
- package/dist/chunks/background-VJOZiuR_.js +1 -0
- package/dist/chunks/background-color-D2MqN3R4.js +1 -0
- package/dist/chunks/background-slZFdhpF.js +1 -0
- package/dist/chunks/barcode-BQt9XJ1d.js +1 -0
- package/dist/chunks/bold-D9vAACcy.js +1 -0
- package/dist/chunks/bookmark-DYEjgk_G.js +1 -0
- package/dist/chunks/border-CUaBgIHA.js +1 -0
- package/dist/chunks/border-color-beMzdKg0.js +1 -0
- package/dist/chunks/break-BA7SNRJX.js +1 -0
- package/dist/chunks/break-marks-faiEoYm7.js +1 -0
- package/dist/chunks/builtin-3ftgL3GZ.js +1 -0
- package/dist/chunks/builtin-CSh-wrSS.js +1 -0
- package/dist/chunks/bullet-list-CFOOqcgF.js +1 -0
- package/dist/chunks/button-nUj48jue.js +1 -0
- package/dist/chunks/cal-service-CTPNhNPR.js +1 -0
- package/dist/chunks/callout-BT-iP5Sk.js +1 -0
- package/dist/chunks/cells-align-CN0b1sZ9.js +1 -0
- package/dist/chunks/cells-background-BOVJJDvo.js +1 -0
- package/dist/chunks/chinese-case-tmszLoqn.js +1 -0
- package/dist/chunks/chinese-date-eMPyZbXG.js +1 -0
- package/dist/chunks/classic-DNZZbcIZ.js +1 -0
- package/dist/chunks/clear-format-DvpqxlV6.js +1 -0
- package/dist/chunks/clickable-DKwLfwy9.js +1 -0
- package/dist/chunks/code-CH7OuxFw.js +1 -0
- package/dist/chunks/code-block-JF01NxEw.js +1 -0
- package/dist/chunks/color-BnK_2y7Y.js +1 -0
- package/dist/chunks/color-D8FvJD1R.js +1 -0
- package/dist/chunks/color-DlBMjYug.js +1 -0
- package/dist/chunks/columns-Dgp7WOMC.js +1 -0
- package/dist/chunks/common-C-Ic6cml.js +1 -0
- package/dist/chunks/comp.selectUser.vue_vue_type_script_setup_true_lang-BQDO393q.js +1 -0
- package/dist/chunks/convert-GZ3LS7qA.js +1 -0
- package/dist/chunks/copy-T4iFGqM8.js +1 -0
- package/dist/chunks/countdown-DbPShhbl.js +1 -0
- package/dist/chunks/delete-BF28u1QP.js +1 -0
- package/dist/chunks/delete-CIGtGv1V.js +1 -0
- package/dist/chunks/delete-Cm58IzMB.js +1 -0
- package/dist/chunks/delete-column-CHMoJvLA.js +1 -0
- package/dist/chunks/delete-row-CI3hNsZF.js +1 -0
- package/dist/chunks/details-C1d8AweL.js +1 -0
- package/dist/chunks/diagrams-BM7f8Hww.js +1 -0
- package/dist/chunks/dialog-BnThXCWu.js +1 -0
- package/dist/chunks/download-BQbssS62.js +1 -0
- package/dist/chunks/duplicate-BZnVSQFI.js +1 -0
- package/dist/chunks/echarts--CrLLrqK.js +1 -0
- package/dist/chunks/edit-BU7Znarl.js +1 -0
- package/dist/chunks/editor-scroll-CH3ZXFEC.js +1 -0
- package/dist/chunks/embed-D5OUIJIb.js +1 -0
- package/dist/chunks/emoji-CfG5eQor.js +1 -0
- package/dist/chunks/emoji-remove-D7X2J_pD.js +1 -0
- package/dist/chunks/file-BwWjS162.js +1 -0
- package/dist/chunks/file-NWFwbEfb.js +1 -0
- package/dist/chunks/fix-ZyIVHkwS.js +1 -0
- package/dist/chunks/font-family-CjRNj3c-.js +1 -0
- package/dist/chunks/font-size-CrQIO90J.js +1 -0
- package/dist/chunks/footer-BGyVHmXa.js +1 -0
- package/dist/chunks/footnote-Cn1TpCIc.js +1 -0
- package/dist/chunks/format-painter-D7T03Op2.js +1 -0
- package/dist/chunks/fullscreen-DbG5eL7F.js +1 -0
- package/dist/chunks/hard-break-lDnyWngX.js +1 -0
- package/dist/chunks/header-IhIcBDsi.js +1 -0
- package/dist/chunks/heading-CnhWTg8v.js +1 -0
- package/dist/chunks/highlight-C1-tVYwz.js +1 -0
- package/dist/chunks/history-record-BccG7Xr0.js +2 -0
- package/dist/chunks/hr-ABHyxX8G.js +1 -0
- package/dist/chunks/html-xidra7UB.js +1 -0
- package/dist/chunks/i18n-hQyxfD7_.js +5 -0
- package/dist/chunks/icon-D4BzC_KU.js +1 -0
- package/dist/chunks/image-B3BIUefa.js +1 -0
- package/dist/chunks/image-DIF0OiGH.js +1 -0
- package/dist/chunks/image-resizer-DI5dQsWL.js +1 -0
- package/dist/chunks/indent-DmZgQbne.js +1 -0
- package/dist/chunks/index-B0qeXfXM.js +1 -0
- package/dist/chunks/index-B7ezl8la.js +1 -0
- package/dist/chunks/index-DB4X4foC.js +1 -0
- package/dist/chunks/index-DDQ58xAl.js +1 -0
- package/dist/chunks/index-DSxva9gK.js +1 -0
- package/dist/chunks/index-DTsjZpBR.js +3 -0
- package/dist/chunks/index-Dl16_5Ga.js +1 -0
- package/dist/chunks/input-Cmbl9ycs.js +1 -0
- package/dist/chunks/insert-CBKLBcgd.js +1 -0
- package/dist/chunks/italic-DDov0JhD.js +1 -0
- package/dist/chunks/letter-spacing-XN7tot45.js +1 -0
- package/dist/chunks/line-height-DnkFL2Le.js +1 -0
- package/dist/chunks/line-number-Dy4fgJnc.js +1 -0
- package/dist/chunks/link-DQkXWKsV.js +1 -0
- package/dist/chunks/load-resource-DgkZV52W.js +1 -0
- package/dist/chunks/locale-C7l3TK_C.js +1 -0
- package/dist/chunks/margin-DZ6aGElI.js +1 -0
- package/dist/chunks/margin-DbGENlKn.js +1 -0
- package/dist/chunks/markdown-sCZ1k8eH.js +1 -0
- package/dist/chunks/math-C4D8Aloc.js +1 -0
- package/dist/chunks/math-DkDGgpfC.js +1 -0
- package/dist/chunks/mention-DzuNysNP.js +1 -0
- package/dist/chunks/mentions-D1AaJTuX.js +1 -0
- package/dist/chunks/menus-DkIRsvVB.js +1 -0
- package/dist/chunks/merge-cells-CdCOEOpL.js +1 -0
- package/dist/chunks/mermaid-CeJuDnTt.js +2 -0
- package/dist/chunks/mind-map-B8Ep-Bgc.js +1 -0
- package/dist/chunks/modal-C74zGRb1.js +1 -0
- package/dist/chunks/next-cell-D4oCgtpo.js +1 -0
- package/dist/chunks/node-BNsD5_pO.js +1 -0
- package/dist/chunks/node-view-BtvLsCIq.js +1 -0
- package/dist/chunks/node-view-C-z3oj0k.js +1 -0
- package/dist/chunks/node-view-CBjV65ug.js +1 -0
- package/dist/chunks/node-view-CqFhGDvz.js +1 -0
- package/dist/chunks/node-view-CsG70jor.js +1 -0
- package/dist/chunks/node-view-Cw1LtcLJ.js +1 -0
- package/dist/chunks/node-view-D8s_W1o0.js +1 -0
- package/dist/chunks/node-view-DhXzoQcA.js +1 -0
- package/dist/chunks/node-view-DsQdaAj1.js +1 -0
- package/dist/chunks/node-view-SsT-Zs6P.js +1 -0
- package/dist/chunks/node-view-j1q0uEdL.js +1 -0
- package/dist/chunks/node-view-kqpt80Cn.js +1 -0
- package/dist/chunks/open-BSrMYm2w.js +1 -0
- package/dist/chunks/open-Buzpv6If.js +1 -0
- package/dist/chunks/open-CJ09Ahsf.js +1 -0
- package/dist/chunks/operationAuth.vue_vue_type_script_setup_true_lang-Cqn1ksOr.js +1 -0
- package/dist/chunks/option-box-Dx4Qltcx.js +1 -0
- package/dist/chunks/ordered-list-C2PAaNhi.js +1 -0
- package/dist/chunks/orientation-DXuBvjLa.js +1 -0
- package/dist/chunks/outdent-CvGDlZRv.js +1 -0
- package/dist/chunks/page-BqOSF_Ak.js +1 -0
- package/dist/chunks/page-RfNV_LDj.js +1 -0
- package/dist/chunks/page-options-BtWfq-ao.js +1 -0
- package/dist/chunks/pdf-CecjYeuM.js +1 -0
- package/dist/chunks/player-CIYSGQvp.js +1 -0
- package/dist/chunks/preload-helper-BlTxHScW.js +1 -0
- package/dist/chunks/preview-CFqZ9c_6.js +1 -0
- package/dist/chunks/preview-D7pZ2aIR.js +1 -0
- package/dist/chunks/previous-cell-BkRHmNRc.js +1 -0
- package/dist/chunks/print-CTxEeqZC.js +1 -0
- package/dist/chunks/print-DLFh00TF.js +68 -0
- package/dist/chunks/proportion-LC32q4tQ.js +1 -0
- package/dist/chunks/qrcode-DgtIQ8vB.js +1 -0
- package/dist/chunks/quote-C2YmwcHS.js +1 -0
- package/dist/chunks/redo-mVLGHgiE.js +1 -0
- package/dist/chunks/render.vue_vue_type_script_setup_true_lang-sGvQddve.js +1 -0
- package/dist/chunks/ribbon-BTlruJ6o.js +1 -0
- package/dist/chunks/scrollable-NEHnK6E3.js +1 -0
- package/dist/chunks/search-replace-C-QxDYEE.js +1 -0
- package/dist/chunks/search-replace-SQZer4ug.js +1 -0
- package/dist/chunks/select-CVk2bhdF.js +1 -0
- package/dist/chunks/select-all-CUTkOIEM.js +1 -0
- package/dist/chunks/selection-BIZq2qs_.js +1 -0
- package/dist/chunks/share-CXMDbx3J.js +1 -0
- package/dist/chunks/short-id-DJZHbKNv.js +1 -0
- package/dist/chunks/shortcut-BFtk1iAo.js +1 -0
- package/dist/chunks/shortcuts-B5yodaU0.js +1 -0
- package/dist/chunks/signature-DvSI4fGK.js +1 -0
- package/dist/chunks/size-B8SkKc4o.js +1 -0
- package/dist/chunks/skin-L-I3dHbK.js +1 -0
- package/dist/chunks/split-cell-DS97AZSx.js +1 -0
- package/dist/chunks/state-X-ofkjhe.js +1 -0
- package/dist/chunks/strike-DdJ2RxDi.js +1 -0
- package/dist/chunks/subscript-BQHYftJy.js +1 -0
- package/dist/chunks/superscript-DfBvIzY8.js +1 -0
- package/dist/chunks/symbol-BzJUnQGI.js +1 -0
- package/dist/chunks/tag-ChwaeZ2Y.js +1 -0
- package/dist/chunks/task-list-CFl0tJ8C.js +1 -0
- package/dist/chunks/template-Ox_sJjLt.js +1 -0
- package/dist/chunks/text-BXh5YX5W.js +1 -0
- package/dist/chunks/text-box-NtGpVrop.js +1 -0
- package/dist/chunks/theme-D-xn-kuC.js +1 -0
- package/dist/chunks/toc-Bl4owmo_.js +1 -0
- package/dist/chunks/toc-DfYsz5xN.js +1 -0
- package/dist/chunks/toc-vdoyuw4L.js +1 -0
- package/dist/chunks/tofile-D7Co0CFi.js +1 -0
- package/dist/chunks/toggle-header-cell-DJZAj_HV.js +1 -0
- package/dist/chunks/toggle-header-column-B3piodU4.js +1 -0
- package/dist/chunks/toggle-header-row-Ck912FG0.js +1 -0
- package/dist/chunks/toolbarSelection-IfVwbuDC.js +1 -0
- package/dist/chunks/tooltip-Hk3wzOqG.js +1 -0
- package/dist/chunks/underline--__ksgwM.js +1 -0
- package/dist/chunks/undo-D36oEvmQ.js +1 -0
- package/dist/chunks/unlink-bDvFzxUO.js +1 -0
- package/dist/chunks/video-C3kIrKeJ.js +1 -0
- package/dist/chunks/watermark-BOQfqt_F.js +1 -0
- package/dist/chunks/web-Dy0LCxPV.js +1 -0
- package/dist/chunks/web-page-Bu52V8Ux.js +1 -0
- package/dist/chunks/width-CREo8g06.js +1 -0
- package/dist/chunks/word-wrap-CgEAjND5.js +1 -0
- package/dist/chunks/writing-mode-QdAtr1Oa.js +1 -0
- package/dist/chunks/zoom-CRQJ0GZw.js +1 -0
- package/dist/chunks/zoom-auto-B3OA0TRG.js +1 -0
- package/dist/chunks/zoom-original-B5-bu5K8.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/prebuilt/umo-editor/favicon.ico +0 -0
- package/dist/prebuilt/umo-editor/umo-editor.css +1 -0
- package/dist/prebuilt/umo-editor/umo-editor.d.ts +9 -0
- package/dist/prebuilt/umo-editor/umo-editor.js +564 -0
- package/dist/src/api/BasicApi.d.ts +20 -0
- package/dist/src/api/BasicApi.js +1 -0
- package/dist/src/api/DeptInfoApi.d.ts +15 -0
- package/dist/src/api/DeptInfoApi.js +1 -0
- package/dist/src/api/DocumentApi.d.ts +14 -0
- package/dist/src/api/DocumentApi.js +1 -0
- package/dist/src/api/EmployeeInfoApi.d.ts +7 -0
- package/dist/src/api/EmployeeInfoApi.js +1 -0
- package/dist/src/api/SysDictCacheApi.d.ts +13 -0
- package/dist/src/api/SysDictCacheApi.js +1 -0
- package/dist/src/api/SysUserApi.d.ts +22 -0
- package/dist/src/api/SysUserApi.js +1 -0
- package/dist/src/api/framework.d.ts +10 -0
- package/dist/src/api/framework.js +1 -0
- package/dist/src/api/workflow/workflow.d.ts +13 -0
- package/dist/src/api/workflow/workflow.js +1 -0
- package/dist/src/api/workflow/workflowCommentApi.d.ts +14 -0
- package/dist/src/api/workflow/workflowCommentApi.js +1 -0
- package/dist/src/api/workflow/workflowInstApi.d.ts +26 -0
- package/dist/src/api/workflow/workflowInstApi.js +1 -0
- package/dist/src/components/ElCardList.vue.d.ts +32 -0
- package/dist/src/components/ElCardList.vue.js +1 -0
- package/dist/src/components/ElFlex/ElFlex.vue.d.ts +12 -0
- package/dist/src/components/ElFlex/ElFlex.vue.js +1 -0
- package/dist/src/components/ElTotalTools.vue.d.ts +65 -0
- package/dist/src/components/ElTotalTools.vue.js +1 -0
- package/dist/src/components/OperationAuth/operationAuth.vue.d.ts +16 -0
- package/dist/src/components/OperationAuth/operationAuth.vue.js +1 -0
- package/dist/src/components/RichTextEditor/RichTextEditor.vue.d.ts +53 -0
- package/dist/src/components/RichTextEditor/RichTextEditor.vue.js +1 -0
- package/dist/src/components/RichTextEditor/installUmoEditorApp.d.ts +3 -0
- package/dist/src/components/RichTextEditor/installUmoEditorApp.js +24 -0
- package/dist/src/components/RichTextEditor/richTextHtmlUtils.d.ts +17 -0
- package/dist/src/components/RichTextEditor/richTextHtmlUtils.js +1 -0
- package/dist/src/components/Scrollbars/ElScrollbars.vue.d.ts +12 -0
- package/dist/src/components/Scrollbars/ElScrollbars.vue.js +1 -0
- package/dist/src/components/Search/ElIconSearch.vue.d.ts +170 -0
- package/dist/src/components/Search/ElIconSearch.vue.js +1 -0
- package/dist/src/components/Search/ElSearch.vue.d.ts +18 -0
- package/dist/src/components/Search/ElSearch.vue.js +1 -0
- package/dist/src/components/SelectInDicators/SelectInDicators.vue.d.ts +17 -0
- package/dist/src/components/SelectInDicators/SelectInDicators.vue.js +1 -0
- package/dist/src/components/SelectInDicators/api/DataIndicatorsApi.d.ts +16 -0
- package/dist/src/components/SelectInDicators/api/DataIndicatorsApi.js +1 -0
- package/dist/src/components/SelectInDicators/interface/IComIndex.d.ts +25 -0
- package/dist/src/components/SelectInDicators/interface/IComIndex.js +1 -0
- package/dist/src/components/SelectInDicators/interface/IComIndexAttri.d.ts +18 -0
- package/dist/src/components/SelectInDicators/interface/IComIndexAttri.js +1 -0
- package/dist/src/components/Title/ElTitle.vue.d.ts +49 -0
- package/dist/src/components/Title/ElTitle.vue.js +1 -0
- package/dist/src/components/autoToolTip/ElAutoToolTip.vue.d.ts +25 -0
- package/dist/src/components/autoToolTip/ElAutoToolTip.vue.js +1 -0
- package/dist/src/components/baseEcharts/index.vue.d.ts +46 -0
- package/dist/src/components/baseEcharts/index.vue.js +1 -0
- package/dist/src/components/bpmntree/api/modules/role.d.ts +17 -0
- package/dist/src/components/bpmntree/api/modules/role.js +1 -0
- package/dist/src/components/bpmntree/api/modules/user.d.ts +12 -0
- package/dist/src/components/bpmntree/api/modules/user.js +1 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/Operator.vue.d.ts +10 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/Operator.vue.js +1 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/Trigger.vue.d.ts +13 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/Trigger.vue.js +1 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/index.vue.d.ts +28 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/index.vue.js +1 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/type.d.ts +16 -0
- package/dist/src/components/bpmntree/components/AdvancedFilter/type.js +1 -0
- package/dist/src/components/bpmntree/components/FlowIcon/index.d.ts +47 -0
- package/dist/src/components/bpmntree/components/FlowIcon/index.js +1 -0
- package/dist/src/components/bpmntree/components/Render/render.vue.d.ts +10 -0
- package/dist/src/components/bpmntree/components/Render/render.vue.js +1 -0
- package/dist/src/components/bpmntree/components/Render/type.d.ts +12 -0
- package/dist/src/components/bpmntree/components/Render/type.js +1 -0
- package/dist/src/components/bpmntree/components/RoleSelector/RolePicker.vue.d.ts +19 -0
- package/dist/src/components/bpmntree/components/RoleSelector/RolePicker.vue.js +1 -0
- package/dist/src/components/bpmntree/components/RoleSelector/RoleTag.vue.d.ts +15 -0
- package/dist/src/components/bpmntree/components/RoleSelector/RoleTag.vue.js +1 -0
- package/dist/src/components/bpmntree/components/RoleSelector/index.vue.d.ts +19 -0
- package/dist/src/components/bpmntree/components/RoleSelector/index.vue.js +1 -0
- package/dist/src/components/bpmntree/components/UserSelector/UserTag.vue.d.ts +15 -0
- package/dist/src/components/bpmntree/components/UserSelector/UserTag.vue.js +1 -0
- package/dist/src/components/bpmntree/components/UserSelector/index.vue.d.ts +19 -0
- package/dist/src/components/bpmntree/components/UserSelector/index.vue.js +1 -0
- package/dist/src/components/bpmntree/hooks/useDraggableScroll.d.ts +4 -0
- package/dist/src/components/bpmntree/hooks/useDraggableScroll.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/index.vue.d.ts +33 -0
- package/dist/src/components/bpmntree/views/flowDesign/index.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/Add.vue.d.ts +7 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/Add.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ApprovalNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ApprovalNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/CcNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/CcNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ConcurrentNode.vue.d.ts +9 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ConcurrentNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ConditionNode.vue.d.ts +16 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ConditionNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/EndNode.vue.d.ts +13 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/EndNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ExclusiveNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ExclusiveNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/GatewayNode.vue.d.ts +23 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/GatewayNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/InclusiveNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/InclusiveNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/JumpNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/JumpNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/Node.vue.d.ts +35 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/Node.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/NotifyNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/NotifyNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ParallelNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/ParallelNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/PopoverView.vue.d.ts +8 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/PopoverView.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/StartNode.vue.d.ts +12 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/StartNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/TimerNode.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/TimerNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/TreeNode.vue.d.ts +18 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/TreeNode.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/type.d.ts +119 -0
- package/dist/src/components/bpmntree/views/flowDesign/nodes/type.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ApprovalPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ApprovalPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/AssigneePanel.vue.d.ts +19 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/AssigneePanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/CcPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/CcPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ConditionPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ConditionPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/EndPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/EndPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ExecutionListeners.vue.d.ts +16 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ExecutionListeners.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/JumpPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/JumpPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/NotifyPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/NotifyPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ParaPanel.vue.d.ts +12 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/ParaPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/StartPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/StartPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/TaskListeners.vue.d.ts +16 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/TaskListeners.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/TimerPanel.vue.d.ts +6 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/TimerPanel.vue.js +1 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/index.vue.d.ts +13 -0
- package/dist/src/components/bpmntree/views/flowDesign/panels/index.vue.js +1 -0
- package/dist/src/components/bpmntree/views/view.index.vue.d.ts +11 -0
- package/dist/src/components/bpmntree/views/view.index.vue.js +1 -0
- package/dist/src/components/business/comp.selectUser.vue.d.ts +28 -0
- package/dist/src/components/business/comp.selectUser.vue.js +1 -0
- package/dist/src/components/business/comp.userForm.vue.d.ts +24 -0
- package/dist/src/components/business/comp.userForm.vue.js +1 -0
- package/dist/src/components/business/userSelect.vue.d.ts +110 -0
- package/dist/src/components/business/userSelect.vue.js +1 -0
- package/dist/src/components/icon/ElIconBtn.vue.d.ts +119 -0
- package/dist/src/components/icon/ElIconBtn.vue.js +1 -0
- package/dist/src/components/icon/ElIcons.vue.d.ts +10 -0
- package/dist/src/components/icon/ElIcons.vue.js +1 -0
- package/dist/src/components/kFrame/IframeOptions.d.ts +36 -0
- package/dist/src/components/kFrame/IframeOptions.js +1 -0
- package/dist/src/components/kFrame/KFrame.vue.d.ts +32 -0
- package/dist/src/components/kFrame/KFrame.vue.js +1 -0
- package/dist/src/components/tooltip/index.d.ts +4 -0
- package/dist/src/components/tooltip/index.js +1 -0
- package/dist/src/components/tooltip/src/tooltip.d.ts +55 -0
- package/dist/src/components/tooltip/src/tooltip.js +1 -0
- package/dist/src/components/upload/CustomElUpload.vue.d.ts +247 -0
- package/dist/src/components/upload/CustomElUpload.vue.js +1 -0
- package/dist/src/components/upload/DocxJsViewer.vue.d.ts +32 -0
- package/dist/src/components/upload/DocxJsViewer.vue.js +1 -0
- package/dist/src/components/upload/ElUploads.vue.d.ts +212 -0
- package/dist/src/components/upload/ElUploads.vue.js +1 -0
- package/dist/src/components/upload/ExcelJsViewer.vue.d.ts +33 -0
- package/dist/src/components/upload/ExcelJsViewer.vue.js +1 -0
- package/dist/src/components/upload/FileView.vue.d.ts +59 -0
- package/dist/src/components/upload/FileView.vue.js +1 -0
- package/dist/src/components/upload/FileViewComponents.vue.d.ts +5 -0
- package/dist/src/components/upload/FileViewComponents.vue.js +1 -0
- package/dist/src/components/upload/OfficePreview.vue.d.ts +62 -0
- package/dist/src/components/upload/OfficePreview.vue.js +1 -0
- package/dist/src/components/upload/OfficePreviewHeaderBar.vue.d.ts +73 -0
- package/dist/src/components/upload/OfficePreviewHeaderBar.vue.js +1 -0
- package/dist/src/components/upload/OfficePreviewToolbar.vue.d.ts +41 -0
- package/dist/src/components/upload/OfficePreviewToolbar.vue.js +1 -0
- package/dist/src/components/upload/PdfJsViewer.vue.d.ts +49 -0
- package/dist/src/components/upload/PdfJsViewer.vue.js +1 -0
- package/dist/src/components/vxeGrid/index.vue.d.ts +9 -0
- package/dist/src/components/vxeGrid/index.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeButton.vue.d.ts +27 -0
- package/dist/src/components/vxeReplace/VxeButton.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeCheckbox.vue.d.ts +22 -0
- package/dist/src/components/vxeReplace/VxeCheckbox.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeForm.vue.d.ts +17 -0
- package/dist/src/components/vxeReplace/VxeForm.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeInput.vue.d.ts +16 -0
- package/dist/src/components/vxeReplace/VxeInput.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeLoading.vue.d.ts +17 -0
- package/dist/src/components/vxeReplace/VxeLoading.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeModal.vue.d.ts +37 -0
- package/dist/src/components/vxeReplace/VxeModal.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxePager.vue.d.ts +24 -0
- package/dist/src/components/vxeReplace/VxePager.vue.js +1 -0
- package/dist/src/components/vxeReplace/VxeSelect.vue.d.ts +17 -0
- package/dist/src/components/vxeReplace/VxeSelect.vue.js +1 -0
- package/dist/src/components/vxeReplace/index.d.ts +11 -0
- package/dist/src/components/vxeReplace/index.js +1 -0
- package/dist/src/components/workflow/TaskOperation.vue.d.ts +91 -0
- package/dist/src/components/workflow/TaskOperation.vue.js +1 -0
- package/dist/src/components/workflow/WorkflowTodoDialog.vue.d.ts +2 -0
- package/dist/src/components/workflow/WorkflowTodoDialog.vue.js +1 -0
- package/dist/src/components/workflow/components/AddOrMinusMultiDialog.vue.d.ts +8 -0
- package/dist/src/components/workflow/components/AddOrMinusMultiDialog.vue.js +1 -0
- package/dist/src/components/workflow/components/CheckDialog.vue.d.ts +12 -0
- package/dist/src/components/workflow/components/CheckDialog.vue.js +1 -0
- package/dist/src/components/workflow/components/ProcessDetailComp.vue.d.ts +22 -0
- package/dist/src/components/workflow/components/ProcessDetailComp.vue.js +1 -0
- package/dist/src/components/workflow/components/ProcessDetailDialog.vue.d.ts +15 -0
- package/dist/src/components/workflow/components/ProcessDetailDialog.vue.js +1 -0
- package/dist/src/components/workflow/components/ProcessInstance.vue.d.ts +13 -0
- package/dist/src/components/workflow/components/ProcessInstance.vue.js +1 -0
- package/dist/src/components/workflow/components/ProcessInstanceStep.vue.d.ts +17 -0
- package/dist/src/components/workflow/components/ProcessInstanceStep.vue.js +2 -0
- package/dist/src/components/workflow/components/SelectAssigneeDialog.vue.d.ts +8 -0
- package/dist/src/components/workflow/components/SelectAssigneeDialog.vue.js +1 -0
- package/dist/src/components/workflow/components/SelectReturnActivityDialog.vue.d.ts +8 -0
- package/dist/src/components/workflow/components/SelectReturnActivityDialog.vue.js +1 -0
- package/dist/src/config/ElementPlusConfig.d.ts +14 -0
- package/dist/src/config/ElementPlusConfig.js +1 -0
- package/dist/src/config/VxeTableConfig.d.ts +14 -0
- package/dist/src/config/VxeTableConfig.js +1 -0
- package/dist/src/directives/vTrack.d.ts +9 -0
- package/dist/src/directives/vTrack.js +1 -0
- package/dist/src/hooks/createDialogHooks.d.ts +38 -0
- package/dist/src/hooks/createDialogHooks.js +24 -0
- package/dist/src/hooks/useComputed.d.ts +5 -0
- package/dist/src/hooks/useComputed.js +1 -0
- package/dist/src/hooks/useDictHooks.d.ts +14 -0
- package/dist/src/hooks/useDictHooks.js +1 -0
- package/dist/src/hooks/useEcharts.d.ts +15 -0
- package/dist/src/hooks/useEcharts.js +1 -0
- package/dist/src/hooks/useFileView.d.ts +4 -0
- package/dist/src/hooks/useFileView.js +1 -0
- package/dist/src/hooks/useListenerHooks.d.ts +5 -0
- package/dist/src/hooks/useListenerHooks.js +1 -0
- package/dist/src/hooks/useMessageHooks.d.ts +10 -0
- package/dist/src/hooks/useMessageHooks.js +1 -0
- package/dist/src/hooks/useOpenNewMenu.d.ts +5 -0
- package/dist/src/hooks/useOpenNewMenu.js +1 -0
- package/dist/src/hooks/usePermissionHooks.d.ts +11 -0
- package/dist/src/hooks/usePermissionHooks.js +1 -0
- package/dist/src/hooks/usePermissionToolHooks.d.ts +9 -0
- package/dist/src/hooks/usePermissionToolHooks.js +1 -0
- package/dist/src/hooks/useResetRefHooks.d.ts +8 -0
- package/dist/src/hooks/useResetRefHooks.js +1 -0
- package/dist/src/hooks/userWorkflowHooks.d.ts +109 -0
- package/dist/src/hooks/userWorkflowHooks.js +1 -0
- package/dist/src/hooks/workflowTodo.d.ts +9 -0
- package/dist/src/hooks/workflowTodo.js +1 -0
- package/dist/src/hooks/workflowTodo2.d.ts +3 -0
- package/dist/src/hooks/workflowTodo2.js +1 -0
- package/dist/src/interface/BaseEntity.d.ts +16 -0
- package/dist/src/interface/BaseEntity.js +1 -0
- package/dist/src/interface/IMdmDept.d.ts +58 -0
- package/dist/src/interface/IMdmDept.js +1 -0
- package/dist/src/interface/IMdmEmployee.d.ts +129 -0
- package/dist/src/interface/IMdmEmployee.js +1 -0
- package/dist/src/interface/IMdmEmployeeQuery.d.ts +20 -0
- package/dist/src/interface/IMdmEmployeeQuery.js +1 -0
- package/dist/src/interface/IMdmOrg.d.ts +16 -0
- package/dist/src/interface/IMdmOrg.js +1 -0
- package/dist/src/interface/IMdmOrgQuery.d.ts +12 -0
- package/dist/src/interface/IMdmOrgQuery.js +1 -0
- package/dist/src/interface/IOrgDeptInfo.d.ts +11 -0
- package/dist/src/interface/IOrgDeptInfo.js +1 -0
- package/dist/src/interface/ISortList.d.ts +5 -0
- package/dist/src/interface/ISortList.js +1 -0
- package/dist/src/interface/ISysDictDataCacheVo.d.ts +28 -0
- package/dist/src/interface/ISysDictDataCacheVo.js +1 -0
- package/dist/src/interface/ISysDictType.d.ts +19 -0
- package/dist/src/interface/ISysDictType.js +1 -0
- package/dist/src/interface/ISysMenuDataVo.d.ts +22 -0
- package/dist/src/interface/ISysMenuDataVo.js +1 -0
- package/dist/src/interface/ISysMenuInfoVo.d.ts +82 -0
- package/dist/src/interface/ISysMenuInfoVo.js +1 -0
- package/dist/src/interface/ISysMenuOperationVo.d.ts +21 -0
- package/dist/src/interface/ISysMenuOperationVo.js +1 -0
- package/dist/src/interface/ISysUploadFiles.d.ts +18 -0
- package/dist/src/interface/ISysUploadFiles.js +1 -0
- package/dist/src/interface/ISysUserInfo.d.ts +41 -0
- package/dist/src/interface/ISysUserInfo.js +1 -0
- package/dist/src/interface/ITpReviewBatch.d.ts +41 -0
- package/dist/src/interface/ITpReviewBatch.js +1 -0
- package/dist/src/interface/IUserBaseInfo.d.ts +72 -0
- package/dist/src/interface/IUserBaseInfo.js +1 -0
- package/dist/src/interface/IUserPermissionVo.d.ts +44 -0
- package/dist/src/interface/IUserPermissionVo.js +1 -0
- package/dist/src/interface/IVxeTable.d.ts +6 -0
- package/dist/src/interface/IVxeTable.js +1 -0
- package/dist/src/interface/Message.d.ts +71 -0
- package/dist/src/interface/Message.js +1 -0
- package/dist/src/interface/PageData.d.ts +17 -0
- package/dist/src/interface/PageData.js +1 -0
- package/dist/src/interface/ResponseData.d.ts +16 -0
- package/dist/src/interface/ResponseData.js +1 -0
- package/dist/src/interface/dictMapType.d.ts +10 -0
- package/dist/src/interface/dictMapType.js +1 -0
- package/dist/src/interface/enum/FlexEnum.d.ts +84 -0
- package/dist/src/interface/enum/FlexEnum.js +1 -0
- package/dist/src/interface/enum/MessageEnum.d.ts +40 -0
- package/dist/src/interface/enum/MessageEnum.js +1 -0
- package/dist/src/interface/workflow/IWfNodeLastApprovalVo.d.ts +22 -0
- package/dist/src/interface/workflow/IWfNodeLastApprovalVo.js +1 -0
- package/dist/src/interface/workflow/IWfProcessDefVo.d.ts +16 -0
- package/dist/src/interface/workflow/IWfProcessDefVo.js +1 -0
- package/dist/src/interface/workflow/IWfReturnNodeVo.d.ts +15 -0
- package/dist/src/interface/workflow/IWfReturnNodeVo.js +1 -0
- package/dist/src/interface/workflow/IWfTaskAskVo.d.ts +64 -0
- package/dist/src/interface/workflow/IWfTaskAskVo.js +1 -0
- package/dist/src/interface/workflow/IWfTaskQueryVo.d.ts +32 -0
- package/dist/src/interface/workflow/IWfTaskQueryVo.js +1 -0
- package/dist/src/interface/workflow/IWfTaskUsersVo.d.ts +20 -0
- package/dist/src/interface/workflow/IWfTaskUsersVo.js +1 -0
- package/dist/src/interface/workflow/IWfTaskVo.d.ts +163 -0
- package/dist/src/interface/workflow/IWfTaskVo.js +1 -0
- package/dist/src/interface/workflow/workflow.d.ts +20 -0
- package/dist/src/interface/workflow/workflow.js +1 -0
- package/dist/src/mixin/globalMixin.d.ts +8 -0
- package/dist/src/mixin/globalMixin.js +1 -0
- package/dist/src/packages/index.d.ts +336 -0
- package/dist/src/packages/index.js +1 -0
- package/dist/src/packages/text.vue.d.ts +2 -0
- package/dist/src/packages/text.vue.js +1 -0
- package/dist/src/plugins/echartsConfig.d.ts +8 -0
- package/dist/src/plugins/echartsConfig.js +1 -0
- package/dist/src/plugins/plugins.d.ts +4 -0
- package/dist/src/plugins/plugins.js +1 -0
- package/dist/src/plugins/renderDialog.d.ts +8 -0
- package/dist/src/plugins/renderDialog.js +1 -0
- package/dist/src/stores/dictStore.d.ts +62 -0
- package/dist/src/stores/dictStore.js +1 -0
- package/dist/src/stores/messageStore.d.ts +30 -0
- package/dist/src/stores/messageStore.js +1 -0
- package/dist/src/stores/permissionStore.d.ts +56 -0
- package/dist/src/stores/permissionStore.js +1 -0
- package/dist/src/stores/storeConfig.d.ts +2 -0
- package/dist/src/stores/storeConfig.js +1 -0
- package/dist/src/stores/userInfoStore.d.ts +13 -0
- package/dist/src/stores/userInfoStore.js +1 -0
- package/dist/src/types/vxe-pc-ui/all.d.ts +540 -0
- package/dist/src/types/vxe-pc-ui/components/alert.d.ts +87 -0
- package/dist/src/types/vxe-pc-ui/components/anchor-link.d.ts +91 -0
- package/dist/src/types/vxe-pc-ui/components/anchor.d.ts +104 -0
- package/dist/src/types/vxe-pc-ui/components/avatar.d.ts +88 -0
- package/dist/src/types/vxe-pc-ui/components/backtop.d.ts +122 -0
- package/dist/src/types/vxe-pc-ui/components/badge.d.ts +76 -0
- package/dist/src/types/vxe-pc-ui/components/breadcrumb-item.d.ts +80 -0
- package/dist/src/types/vxe-pc-ui/components/breadcrumb.d.ts +87 -0
- package/dist/src/types/vxe-pc-ui/components/button-group.d.ts +120 -0
- package/dist/src/types/vxe-pc-ui/components/button.d.ts +330 -0
- package/dist/src/types/vxe-pc-ui/components/calendar.d.ts +264 -0
- package/dist/src/types/vxe-pc-ui/components/card.d.ts +93 -0
- package/dist/src/types/vxe-pc-ui/components/carousel-item.d.ts +75 -0
- package/dist/src/types/vxe-pc-ui/components/carousel.d.ts +134 -0
- package/dist/src/types/vxe-pc-ui/components/cascader.d.ts +382 -0
- package/dist/src/types/vxe-pc-ui/components/checkbox-button.d.ts +114 -0
- package/dist/src/types/vxe-pc-ui/components/checkbox-group.d.ts +154 -0
- package/dist/src/types/vxe-pc-ui/components/checkbox.d.ts +128 -0
- package/dist/src/types/vxe-pc-ui/components/col.d.ts +80 -0
- package/dist/src/types/vxe-pc-ui/components/colgroup.d.ts +69 -0
- package/dist/src/types/vxe-pc-ui/components/collapse-pane.d.ts +89 -0
- package/dist/src/types/vxe-pc-ui/components/collapse.d.ts +133 -0
- package/dist/src/types/vxe-pc-ui/components/color-picker.d.ts +276 -0
- package/dist/src/types/vxe-pc-ui/components/column.d.ts +850 -0
- package/dist/src/types/vxe-pc-ui/components/context-menu.d.ts +289 -0
- package/dist/src/types/vxe-pc-ui/components/countdown.d.ts +112 -0
- package/dist/src/types/vxe-pc-ui/components/date-panel.d.ts +331 -0
- package/dist/src/types/vxe-pc-ui/components/date-picker.d.ts +370 -0
- package/dist/src/types/vxe-pc-ui/components/date-range-picker.d.ts +367 -0
- package/dist/src/types/vxe-pc-ui/components/drawer.d.ts +311 -0
- package/dist/src/types/vxe-pc-ui/components/empty.d.ts +78 -0
- package/dist/src/types/vxe-pc-ui/components/flow-design.d.ts +85 -0
- package/dist/src/types/vxe-pc-ui/components/flow-view.d.ts +85 -0
- package/dist/src/types/vxe-pc-ui/components/form-design.d.ts +376 -0
- package/dist/src/types/vxe-pc-ui/components/form-gather.d.ts +124 -0
- package/dist/src/types/vxe-pc-ui/components/form-group.d.ts +77 -0
- package/dist/src/types/vxe-pc-ui/components/form-item.d.ts +411 -0
- package/dist/src/types/vxe-pc-ui/components/form-view.d.ts +183 -0
- package/dist/src/types/vxe-pc-ui/components/form.d.ts +487 -0
- package/dist/src/types/vxe-pc-ui/components/gantt-module/gantt-view.d.ts +177 -0
- package/dist/src/types/vxe-pc-ui/components/gantt-module/index.d.ts +1 -0
- package/dist/src/types/vxe-pc-ui/components/gantt-plugins/extend-gantt-chart.d.ts +131 -0
- package/dist/src/types/vxe-pc-ui/components/gantt-plugins/index.d.ts +1 -0
- package/dist/src/types/vxe-pc-ui/components/gantt.d.ts +1240 -0
- package/dist/src/types/vxe-pc-ui/components/grid.d.ts +1248 -0
- package/dist/src/types/vxe-pc-ui/components/icon-picker.d.ts +231 -0
- package/dist/src/types/vxe-pc-ui/components/icon.d.ts +87 -0
- package/dist/src/types/vxe-pc-ui/components/image-group.d.ts +127 -0
- package/dist/src/types/vxe-pc-ui/components/image-preview.d.ts +167 -0
- package/dist/src/types/vxe-pc-ui/components/image.d.ts +173 -0
- package/dist/src/types/vxe-pc-ui/components/input.d.ts +435 -0
- package/dist/src/types/vxe-pc-ui/components/layout-aside.d.ts +88 -0
- package/dist/src/types/vxe-pc-ui/components/layout-body.d.ts +91 -0
- package/dist/src/types/vxe-pc-ui/components/layout-container.d.ts +73 -0
- package/dist/src/types/vxe-pc-ui/components/layout-footer.d.ts +73 -0
- package/dist/src/types/vxe-pc-ui/components/layout-header.d.ts +69 -0
- package/dist/src/types/vxe-pc-ui/components/link.d.ts +111 -0
- package/dist/src/types/vxe-pc-ui/components/list-design.d.ts +190 -0
- package/dist/src/types/vxe-pc-ui/components/list-view.d.ts +199 -0
- package/dist/src/types/vxe-pc-ui/components/list.d.ts +663 -0
- package/dist/src/types/vxe-pc-ui/components/loading.d.ts +103 -0
- package/dist/src/types/vxe-pc-ui/components/mention.d.ts +77 -0
- package/dist/src/types/vxe-pc-ui/components/menu.d.ts +275 -0
- package/dist/src/types/vxe-pc-ui/components/modal.d.ts +554 -0
- package/dist/src/types/vxe-pc-ui/components/notice-bar.d.ts +106 -0
- package/dist/src/types/vxe-pc-ui/components/number-input.d.ts +320 -0
- package/dist/src/types/vxe-pc-ui/components/optgroup.d.ts +88 -0
- package/dist/src/types/vxe-pc-ui/components/option.d.ts +103 -0
- package/dist/src/types/vxe-pc-ui/components/pager.d.ts +335 -0
- package/dist/src/types/vxe-pc-ui/components/password-input.d.ts +142 -0
- package/dist/src/types/vxe-pc-ui/components/print-page-break.d.ts +69 -0
- package/dist/src/types/vxe-pc-ui/components/print.d.ts +206 -0
- package/dist/src/types/vxe-pc-ui/components/pulldown.d.ts +239 -0
- package/dist/src/types/vxe-pc-ui/components/radio-button.d.ts +118 -0
- package/dist/src/types/vxe-pc-ui/components/radio-group.d.ts +153 -0
- package/dist/src/types/vxe-pc-ui/components/radio.d.ts +134 -0
- package/dist/src/types/vxe-pc-ui/components/rate.d.ts +88 -0
- package/dist/src/types/vxe-pc-ui/components/result.d.ts +84 -0
- package/dist/src/types/vxe-pc-ui/components/row.d.ts +79 -0
- package/dist/src/types/vxe-pc-ui/components/segmented.d.ts +123 -0
- package/dist/src/types/vxe-pc-ui/components/select.d.ts +556 -0
- package/dist/src/types/vxe-pc-ui/components/slider.d.ts +126 -0
- package/dist/src/types/vxe-pc-ui/components/split-pane.d.ts +133 -0
- package/dist/src/types/vxe-pc-ui/components/split.d.ts +312 -0
- package/dist/src/types/vxe-pc-ui/components/splitter-panel.d.ts +105 -0
- package/dist/src/types/vxe-pc-ui/components/splitter.d.ts +293 -0
- package/dist/src/types/vxe-pc-ui/components/steps.d.ts +68 -0
- package/dist/src/types/vxe-pc-ui/components/switch.d.ts +133 -0
- package/dist/src/types/vxe-pc-ui/components/tab-pane.d.ts +114 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/custom.d.ts +123 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/edit.d.ts +243 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/export.d.ts +96 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/filter.d.ts +140 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/index.d.ts +7 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/keyboard.d.ts +26 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/menu.d.ts +28 -0
- package/dist/src/types/vxe-pc-ui/components/table-module/validator.d.ts +53 -0
- package/dist/src/types/vxe-pc-ui/components/table-plugins/extend-cell-area.d.ts +781 -0
- package/dist/src/types/vxe-pc-ui/components/table-plugins/extend-pivot-table.d.ts +58 -0
- package/dist/src/types/vxe-pc-ui/components/table-plugins/filters-combination.d.ts +15 -0
- package/dist/src/types/vxe-pc-ui/components/table-plugins/filters-complex-input.d.ts +9 -0
- package/dist/src/types/vxe-pc-ui/components/table-plugins/index.d.ts +4 -0
- package/dist/src/types/vxe-pc-ui/components/table-select.d.ts +226 -0
- package/dist/src/types/vxe-pc-ui/components/table-transfer.d.ts +84 -0
- package/dist/src/types/vxe-pc-ui/components/table.d.ts +7688 -0
- package/dist/src/types/vxe-pc-ui/components/tabs.d.ts +332 -0
- package/dist/src/types/vxe-pc-ui/components/tag.d.ts +114 -0
- package/dist/src/types/vxe-pc-ui/components/text-ellipsis.d.ts +112 -0
- package/dist/src/types/vxe-pc-ui/components/text.d.ts +122 -0
- package/dist/src/types/vxe-pc-ui/components/textarea.d.ts +268 -0
- package/dist/src/types/vxe-pc-ui/components/timeline-item.d.ts +75 -0
- package/dist/src/types/vxe-pc-ui/components/timeline.d.ts +77 -0
- package/dist/src/types/vxe-pc-ui/components/tip.d.ts +83 -0
- package/dist/src/types/vxe-pc-ui/components/toolbar.d.ts +336 -0
- package/dist/src/types/vxe-pc-ui/components/tooltip.d.ts +196 -0
- package/dist/src/types/vxe-pc-ui/components/tour.d.ts +77 -0
- package/dist/src/types/vxe-pc-ui/components/transfer.d.ts +84 -0
- package/dist/src/types/vxe-pc-ui/components/tree-select.d.ts +376 -0
- package/dist/src/types/vxe-pc-ui/components/tree.d.ts +1000 -0
- package/dist/src/types/vxe-pc-ui/components/upload.d.ts +518 -0
- package/dist/src/types/vxe-pc-ui/components/watermark.d.ts +120 -0
- package/dist/src/types/vxe-pc-ui/handles/form-design.d.ts +50 -0
- package/dist/src/types/vxe-pc-ui/handles/index.d.ts +3 -0
- package/dist/src/types/vxe-pc-ui/handles/list-design.d.ts +2 -0
- package/dist/src/types/vxe-pc-ui/handles/table.d.ts +15 -0
- package/dist/src/types/vxe-pc-ui/index.d.ts +8 -0
- package/dist/src/types/vxe-pc-ui/ui/commands.d.ts +57 -0
- package/dist/src/types/vxe-pc-ui/ui/formats.d.ts +62 -0
- package/dist/src/types/vxe-pc-ui/ui/global-config.d.ts +258 -0
- package/dist/src/types/vxe-pc-ui/ui/global-icon.d.ts +311 -0
- package/dist/src/types/vxe-pc-ui/ui/hooks.d.ts +13 -0
- package/dist/src/types/vxe-pc-ui/ui/index.d.ts +98 -0
- package/dist/src/types/vxe-pc-ui/ui/interceptor.d.ts +52 -0
- package/dist/src/types/vxe-pc-ui/ui/menus.d.ts +89 -0
- package/dist/src/types/vxe-pc-ui/ui/renderer.d.ts +1041 -0
- package/dist/src/types/vxe-pc-ui/ui/validators.d.ts +38 -0
- package/dist/src/types/vxe-pc-ui-shim.d.ts +43 -0
- package/dist/src/utils/AxiosConfig.d.ts +2 -0
- package/dist/src/utils/AxiosConfig.js +1 -0
- package/dist/src/utils/FrameworkUtils.d.ts +58 -0
- package/dist/src/utils/FrameworkUtils.js +1 -0
- package/dist/src/utils/applyObjectHasOwnPolyfill.d.ts +2 -0
- package/dist/src/utils/applyObjectHasOwnPolyfill.js +1 -0
- package/dist/src/utils/buildUploadHeaders.d.ts +23 -0
- package/dist/src/utils/buildUploadHeaders.js +1 -0
- package/dist/src/utils/commonUtils.d.ts +71 -0
- package/dist/src/utils/commonUtils.js +1 -0
- package/dist/src/utils/docxPreviewUtil.d.ts +10 -0
- package/dist/src/utils/docxPreviewUtil.js +1 -0
- package/dist/src/utils/encrypt.d.ts +5 -0
- package/dist/src/utils/encrypt.js +1 -0
- package/dist/src/utils/excelPreviewUtil.d.ts +41 -0
- package/dist/src/utils/excelPreviewUtil.js +1 -0
- package/dist/src/utils/modules.d.ts +8 -0
- package/dist/src/utils/modules.js +2 -0
- package/dist/src/utils/officePreviewUtil.d.ts +52 -0
- package/dist/src/utils/officePreviewUtil.js +1 -0
- package/dist/src/utils/patchWujiePopperCoordinates.d.ts +2 -0
- package/dist/src/utils/patchWujiePopperCoordinates.js +13 -0
- package/dist/src/utils/pdfSearchUtil.d.ts +30 -0
- package/dist/src/utils/pdfSearchUtil.js +1 -0
- package/dist/src/utils/request.d.ts +27 -0
- package/dist/src/utils/request.js +1 -0
- package/dist/src/utils/routeMetaParams.d.ts +16 -0
- package/dist/src/utils/routeMetaParams.js +1 -0
- package/dist/src/utils/toSameOriginFileUrl.d.ts +5 -0
- package/dist/src/utils/toSameOriginFileUrl.js +1 -0
- package/dist/src/utils/tree.d.ts +8 -0
- package/dist/src/utils/tree.js +1 -0
- package/dist/src/utils/uploadAccept.d.ts +11 -0
- package/dist/src/utils/uploadAccept.js +1 -0
- package/dist/src/utils/userSessionStorage.d.ts +5 -0
- package/dist/src/utils/userSessionStorage.js +1 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/element-ui.css +1 -0
- package/dist/vite/highlightJsLibVirtual.d.ts +2 -0
- package/dist/vite/highlightJsLibVirtual.js +1 -0
- package/dist/vite/nodeModulesResolve.d.ts +13 -0
- package/dist/vite/nodeModulesResolve.js +1 -0
- package/dist/vite/projectRoot.d.ts +3 -0
- package/dist/vite/projectRoot.js +1 -0
- package/dist/vite/tiptapUmoResolve.d.ts +4 -0
- package/dist/vite/tiptapUmoResolve.js +1 -0
- package/dist/vite/tiptapVueRendererFix.d.ts +4 -0
- package/dist/vite/tiptapVueRendererFix.js +9 -0
- package/dist/vite/umoCjsVirtual.d.ts +2 -0
- package/dist/vite/umoCjsVirtual.js +5 -0
- package/dist/vite/umoIntegration.d.ts +18 -0
- package/dist/vite/umoIntegration.js +1 -0
- package/dist/vite/yjsPeerResolve.d.ts +3 -0
- package/dist/vite/yjsPeerResolve.js +1 -0
- package/package.json +222 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as v}from"./i18n-hQyxfD7_.js";import{a as j}from"./dialog-BnThXCWu.js";import{Node as L,mergeAttributes as B}from"@tiptap/core";import{nodeViewProps as D,NodeViewWrapper as H,VueNodeViewRenderer as E}from"@tiptap/vue-3";import{s as O}from"./short-id-DJZHbKNv.js";import{computed as M,inject as N,ref as z,onMounted as q,onBeforeUnmount as G,resolveComponent as S,openBlock as F,createBlock as J,unref as n,normalizeStyle as R,withCtx as I,createElementVNode as d,toDisplayString as P,createElementBlock as T,createVNode as k,Fragment as K,withModifiers as Q,createCommentVNode as V,isRef as X}from"vue";import{isFunction as Y,isAsyncFunction as Z}from"@tool-belt/type-predicates";import ee from"pretty-bytes";import{g as te,a as oe}from"./file-BwWjS162.js";import{useFileDialog as ie}from"@vueuse/core";const ne={class:"umo-file-icon"},le=["src"],ae={class:"umo-file-info"},se=["title"],re={class:"umo-file-meta"},ue={class:"umo-file-action"},de=["title"],ce=["title","data-preview-url","data-file-icon","data-file-name"],me=["href","download","title"],fe={class:"umo-file-preview-modal-header"},ve=["src"],pe={key:0,class:"umo-file-preview-modal-body"},ge=["src"],U={__name:"node-view",props:D,setup(t){const i=t,e=M(()=>i.node.attrs),{getPos:a}=i,c=N("editor"),s=N("options"),m=N("container"),r=N("uploadFileMap"),b=z(null),_=M(()=>{const{nodeAlign:l,margin:o}=e.value,h=o?.top&&o?.top!==""?`${o.top}px`:void 0,y=o?.bottom&&o?.bottom!==""?`${o.bottom}px`:void 0;return{"justify-content":l,marginTop:h,marginBottom:y}}),p=M(()=>`${s.value.cdnUrl}/icons/file/${te(e.value.name)}.svg`);let u=z(!1),g=z(null);const f=()=>{const{preview:l}=s.value.file,o=oe(e.value.name);return l.find(y=>o&&y.extensions.includes(o))},C=()=>{const l=f();l?.url.includes("{url}")&&(g.value=l.url.replace(/{{url}}/g,encodeURIComponent(e.value.url)).replace(/{url}/g,e.value.url))};q(async()=>{if(!e.value.uploaded&&r.value.has(e.value.id))try{const l=r.value.get(e.value.id),o=await s.value?.onFileUpload?.(l),{id:h,url:y}=o;b.value&&we(c.value,{id:h,url:y,uploaded:!0},a()),r.value.delete(e.value.id)}catch(l){useMessage("error",{attach:m,content:l.message})}C()}),G(()=>{setTimeout(()=>{c.value.isDestroyed||s.value.onFileDelete(e.value.id,e.value.src,`image:${e.value.type}`)},500)});const w=M(()=>["image","video","audio"].includes(e.value.previewType)||g.value!==null),A=()=>{const o=f(e.value.name)?.onPreview;if(Y(o)||Z(o))try{o(e.value);return}catch{}if(g.value!==null){u.value=!0;return}c.value.commands.insertContent({type:e.value.previewType,attrs:{...e.value,src:e.value.url}})};return(l,o)=>{const h=S("icon"),y=S("t-button"),W=S("modal");return F(),J(n(H),{id:e.value.id,ref_key:"containerRef",ref:b,class:"umo-node-view",style:R(_.value),onClickCapture:o[1]||(o[1]=$=>n(c)?.commands.setNodeSelection(n(a)()))},{default:I(()=>[d("div",{class:"umo-node-container hover-shadow umo-select-outline umo-node-file",style:R({width:e.value.fitWidth?"100%":w.value?"260px":"220px"})},[d("div",ne,[d("img",{src:p.value,class:"icon-file"},null,8,le)]),d("div",ae,[d("div",{class:"umo-file-name",title:e.value.name||n(v)("file.unknownName")},P(e.value.name||n(v)("file.unknownName")),9,se),d("div",re,P(e.value.size?n(ee)(e.value.size):n(v)("file.unknownSize")),1)]),d("div",ue,[e.value.uploaded?(F(),T(K,{key:1},[w.value?(F(),T("div",{key:0,class:"umo-action-item",title:n(v)("file.preview"),"data-preview-url":n(g),"data-file-icon":p.value,"data-file-name":e.value.name,onClick:Q(A,["stop"])},[k(h,{name:"view"})],8,ce)):V("v-if",!0),d("a",{href:e.value.url,download:e.value.name,target:"_blank",class:"umo-action-item",title:n(v)("file.download")},[k(h,{name:"download"})],8,me)],64)):(F(),T("div",{key:0,class:"umo-action-item",title:n(v)("file.uploading")},[k(h,{class:"loading",name:"loading"})],8,de))])],4),k(W,{"dialog-class-name":"umo-file-preview-modal",visible:n(u),header:!1,footer:!1,width:"90vw"},{default:I(()=>[d("div",fe,[d("img",{src:p.value,class:"file-icon"},null,8,ve),d("h3",null,P(e.value.name||n(v)("file.unknownName")),1),k(y,{class:"close-btn",size:"small",shape:"square",variant:"text",onClick:o[0]||(o[0]=$=>X(u)?u.value=!1:u=!1)},{default:I(()=>[k(h,{name:"close",size:"18"})]),_:1})]),n(u)?(F(),T("div",pe,[d("iframe",{src:n(g)},null,8,ge)])):V("v-if",!0)]),_:1},8,["visible"])]),_:1},8,["id","style"])}}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"})),x={image:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/apng"],inlineImage:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/apng"],video:["video/mp4","video/mpeg","video/webm","video/ogg"],audio:["audio/mp3","audio/mpeg","audio/wav","audio/ogg","audio/aac","audio/flac"]},he=(t,i)=>{if(t==="file"&&i.length===0)return"";if(!t||!["image","video","audio","inlineImage"].includes(t))return i.toString();let e=[...i];return e.includes(`${t}/*`)||i.length===0?e=x[t]:e.filter(a=>a.startsWith(t)).length>0?e=i.filter(a=>x[t].includes(a)):e=["notAllow"],e.length===0?"":e.toString()},ze=L.create({name:"file",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},file:{default:null},id:{default:null},url:{default:null},name:{default:null},type:{default:null},size:{default:null},uploaded:{default:!1},previewType:{default:null},width:{default:null},height:{default:200},fitWidth:{default:!1}}},parseHTML(){return[{tag:"file"}]},renderHTML({HTMLAttributes:t}){return["file",B(this.options.HTMLAttributes,t)]},addNodeView(){return E(U)},addCommands(){return{setFile:t=>({commands:i,editor:e})=>i.insertContentAt(e.state.selection.anchor,{type:this.name,attrs:t}),insertFile:({file:t,uploadFileMap:i,autoType:e,pos:a,dimensions:c})=>({editor:s,commands:m})=>{const{type:r,name:b,size:_}=t,{options:p}=s.storage,{maxSize:u}=p.file;if(u!==0&&_>u)return useMessage("error",{attach:s.storage.container,content:v("file.limit",{filename:t.name,size:u/1024/1024})}),!1;const g=a||s.state.selection.anchor;let f="file";r.startsWith("image/")&&x.image.includes(r)&&(f="image"),r.startsWith("video/")&&x.video.includes(r)&&(f="video"),r.startsWith("audio/")&&x.audio.includes(r)&&(f="audio");const C=O(10);i.set(C,t);let w={id:C,[f==="file"?"url":"src"]:URL.createObjectURL(t),name:b,type:r||"unknown",size:_,previewType:f};if(f==="image"){const{width:A,height:l,inline:o}=c;A&&A>0&&(w={...w,width:A}),o&&(f="inlineImage",w={...w,inline:!0})}return m.insertContentAt(g,{type:e?f:"file",attrs:w})},selectFiles:(t,i="body",e,a=!0)=>({editor:c})=>{const{options:s}=c.storage,m=he(t,s.file.allowedMimeTypes);if(!m&&m!==""||m==="notAllow"){const p=j({attach:i,theme:"danger",header:v("file.notAllow.title"),body:v("file.notAllow.message"),onConfirm(){p.destroy()}});return!1}const{open:r,onChange:b}=ie({accept:m,reset:!0});r();let _=!1;return b(p=>{const u=Array.from(p);for(const g of u)_=c.chain().focus().insertFile({file:g,uploadFileMap:e,autoType:a,dimensions:{inline:t==="inlineImage"}}).run()}),_}}}}),we=(t,i,e)=>{const{state:a,view:c}=t;if(typeof e!="number")return;const s=a.doc.nodeAt(e);if(!s)return;const m=a.tr.setNodeMarkup(e,void 0,{...s.attrs,...i});m.setMeta("addToHistory",!1),c.dispatch(m)};export{ze as F,Te as n,we as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as f,inject as wt,provide as d,watch as m,nextTick as ke,onMounted as yt,onBeforeUnmount as St,getCurrentInstance as Ne,resolveComponent as V,openBlock as W,createBlock as oe,unref as C,withCtx as le,Teleport as Et,createElementVNode as ne,normalizeStyle as Ct,normalizeClass as _t,createElementBlock as zt,createSlots as kt,renderList as Nt,renderSlot as Ke,normalizeProps as Fe,guardReactiveProps as qe,createCommentVNode as Kt,createVNode as Ae}from"vue";import{u as Ue,a as Ft}from"./dialog-BnThXCWu.js";import{isFunction as Z,isAsyncFunction as Me,isNumber as B,isString as w,isRecord as z,isBoolean as Te}from"@tool-belt/type-predicates";import qt from"dom-to-image-more";import At from"tdesign-vue-next/esm/locale/en_US";import Ut from"tdesign-vue-next/esm/locale/zh_CN";import{g as Mt,a as q,u as Tt,r as Bt,c as Be}from"./history-record-BccG7Xr0.js";import{l as ie,i as xt}from"./i18n-hQyxfD7_.js";import{ObjectSchema as Dt}from"@eslint/object-schema";import{g as Lt,a as jt}from"./selection-BIZq2qs_.js";import{h as Ht,s as Ot}from"./toolbarSelection-IfVwbuDC.js";import{s as se}from"./short-id-DJZHbKNv.js";import{useStorage as T,useTimestamp as $t,isDefined as xe}from"@vueuse/core";import{u as ue}from"./state-X-ofkjhe.js";import"tdesign-vue-next";import"@tiptap/core";import"vue-i18n";import"@tiptap/pm/state";const Pt=[{label:{en_US:"Default Font",zh_CN:"默认字体"},value:null},{label:{en_US:"Noto Sans SC",zh_CN:"思源黑体"},value:"Noto Sans SC",url:"https://fonts.gstatic.com/s/notosanssc/v40/k3kXo84MPvpLmixcA63oeALhLIiP-Q-87KaAaH7rzeAODp22mF0qmF4CSjmPC6A0Rg5g1igg1w.4.woff2",format:"woff2"},{label:{en_US:"Noto Serif SC",zh_CN:"思源宋体"},value:"Noto Serif SC",url:"https://fonts.gstatic.com/s/notoserifsc/v35/H4cyBXePl9DZ0Xe7gG9cyOj7uK2-n-D2rd4FY7SCqyWv.ttf",format:"truetype"},{label:{en_US:"Songti",zh_CN:"宋体"},value:"SimSun"},{label:{en_US:"Heiti",zh_CN:"黑体"},value:"SimHei"},{label:{en_US:"Kaiti",zh_CN:"楷体"},value:"KaiTi"},{label:{en_US:"Kaiti GB2312",zh_CN:"楷体_GB2312"},value:"KaiTi_GB2312"},{label:{en_US:"Fangsong",zh_CN:"仿宋"},value:"FangSong"},{label:{en_US:"Fangsong GB2312",zh_CN:"仿宋_GB2312"},value:"FangSong_GB2312"},{label:{en_US:"STSong",zh_CN:"华文宋体"},value:"STSong"},{label:{en_US:"STFangsong",zh_CN:"华文仿宋"},value:"STFangsong"},{label:{en_US:"FZ Fangsong Simplified",zh_CN:"方正仿宋简体"},value:"FZFangSong-Z02S"},{label:{en_US:"FZ Xiaobiao Song",zh_CN:"方正小标宋"},value:"FZXiaoBiaoSong-B05S"},{label:{en_US:"Microsoft Yahei",zh_CN:"微软雅黑"},value:"Microsoft Yahei"},{label:{en_US:"PingFang SC",zh_CN:"苹方"},value:"PingFang SC"},{label:{en_US:"Hiragino Sans GB",zh_CN:"冬青黑体简体中文"},value:"Hiragino Sans GB"},{label:{en_US:"DengXian",zh_CN:"等线"},value:"DengXian"},{label:{en_US:"DengXian Light",zh_CN:"等线 Light"},value:"DengXian Light"},{label:{en_US:"YouYuan",zh_CN:"幼圆"},value:"YouYuan"},{label:{en_US:"LiSu",zh_CN:"隶书"},value:"LiSu"},{label:{en_US:"NSimSun",zh_CN:"新宋体"},value:"NSimSun"},{label:"Arial",value:"Arial"},{label:"Times New Roman",value:"Times New Roman"},{label:"Verdana",value:"Verdana"},{label:"Helvetica",value:"Helvetica"},{label:"Calibri",value:"Calibri"},{label:"Cambria",value:"Cambria"},{label:"Tahoma",value:"Tahoma"},{label:"Georgia",value:"Georgia"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"}],It=["#FFF","#000","#4A5366","#3B74EC","#45A2EF","#529867","#CD4A3F","#EA8D40","#EEC543","#8E45D0","#F2F2F2","#7F7F7F","#F4F5F7","#CBDCFC","#E8F6FE","#EDFAF2","#FCEAE9","#FDF3EC","#FEF9E5","#FAECFE","#EEE","#595959","#C6CAD2","#CEEBFD","#CBDCFC","#CBE9D7","#F7CBC9","#FADDC7","#FDEEB5","#EBCAFC","#BFBFBF","#3F3F3F","#828B9D","#A0BEFA","#A7DCFC","#A6D5B8","#F2A19C","#F5BC8C","#FBE281","#CB94F9","#A5A5A5","#262626","#363B44","#2452B2","#3473A1","#417A53","#922B22","#AD642A","#9E8329","#57297D","#939393","#0D0D0D","#25272E","#15316A","#1C415A","#284D34","#511712","#573213","#635217","#36194E"],Rt=[{label:{en_US:"Single",zh_CN:"单倍行距"},value:1},{label:{en_US:"1.5 Line Spacing",zh_CN:"1.5 倍行距"},value:1.5},{label:{en_US:"1.75 Line Spacing",zh_CN:"1.75 倍行距"},value:1.75,default:!0},{label:{en_US:"Double",zh_CN:"2 倍行距"},value:2},{label:{en_US:"2.5 Line Spacing",zh_CN:"2.5 倍行距"},value:2.5},{label:{en_US:"Triple",zh_CN:"3 倍行距"},value:3}],Vt=[{label:{en_US:"Plain Text",zh_CN:"普通文本"},items:"‹›«»‘’“”‚„¡¿‥…‡‰‱‼⁈⁉⁇©®™§¶⁋"},{label:{en_US:"Currency Symbols",zh_CN:"货币符号"},items:"$€¥£¢₠₡₢₣₤¤₿₥₦₧₨₩₪₫₭₮₯₰₱₲₳₴₵₶₷₸₹₺₻₼₽"},{label:{en_US:"Mathematical Symbols",zh_CN:"数学符号"},items:"<>≤≥–—¯‾°−±÷⁄׃∫∑∞√∼≅≈≠≡∈∉∋∏∧∨¬∩∪∂∀∃∅∇∗∝∠¼½¾"},{label:{en_US:"Arrows",zh_CN:"箭头"},items:"←→↑↓⇐⇒⇑⇓⇠⇢⇡⇣⇤⇥⤒⤓↨"},{label:{en_US:"Latin Script",zh_CN:"拉丁语"},items:"ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ"}],Wt=[{label:{en_US:"Emotions & People",zh_CN:"表情与角色"},items:"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😶 😏 😒 🙄 😬 😮 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵💫 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻"},{label:{en_US:"Animals & Nature",zh_CN:"动物与自然"},items:"🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦔 🦇 🐻 🐻❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🐌 🦋 🐛 🐜 🐝 🐞 🦗 🕷️ 🕸️ 🦂 🦟 🦠 💐 🌸 💮 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 ☀️ 🌝 🌞 🪐 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊"},{label:{en_US:"Food & Drink",zh_CN:"食物与食品"},items:"🍇 🍉 🍊 🍋 🍌 🍍 🥭 🍎 🍏 🍐 🍑 🍒 🍓 🥝 🍅 🥥 🥑 🍆 🥔 🥕 🌽 🌶️ 🥬 🥦 🧄 🧅 🍄 🥜 🌰 🍞 🥐 🥖 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🥙 🧆 🥚 🍳 🥘 🍲 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🥤 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🏺"},{label:{en_US:"Activities",zh_CN:"活动"},items:"🧧 🎁 🎄 🧨 ✨ 🎈 🎉 🏮 🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🧿 🎮 🕹️ 🎰 🎲 🧩 🧸 ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🧶"},{label:{en_US:"Travel & Places",zh_CN:"旅行与景点"},items:"🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🚏 🛣️ 🛤️ 🛢️ ⛽ 🚨 🚥 🚦 🛑 🚧 ⚓ ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 🧭 ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦"},{label:{en_US:"Objects",zh_CN:"物品"},items:"📔 📕 📖 📗 📘 📙 📚 📒 📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🔍 🔎 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🏹 🛡️ 🔧 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🧰 🧲 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩺 🚪 🛏️ 🛋️ 🪑 🚽 🚿 🛁 🪒 🧴 🧷 🧹 🧺 🧻 🧼 🧽 🧯 🛒 🚬 ⚰️ ⚱️ 💎 🔇 🔈 🔉 🔊 🔔 🔕 🔋 🔌 💻 🖥️ 🖨️ ⌨️ 🖱️ 🖲️ 📷 🧱"},{label:{en_US:"Symbols",zh_CN:"符号"},items:"💡 ✅ ☑️ ✔️ ❌ ❎ ❓ ❗ ❔ ❕ ⌛ ⏳ 💰 🆒 🆕 🆖 🅾️ 🆗 🆘 🈲 🉑 🈸 ⛔ 🚫 📵 ✳️ ✴️ ❇️ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲 💌 💘 💝 💖 💗 💓 💞 💕 💟 ❣️ 💔 🤍 💯 💢 💥 💬 💤 ➰ ➿ 🔅 📴 ➡️ 🔃 🔄 🔙 🔚 🔛 🔝 🔀 🔁 🔂"},{label:{en_US:"Flags",zh_CN:"旗帜"},items:"🏁 🚩 🏴 🏳️ 🏳️🌈"}],Zt=[{label:"A4",width:21,height:29.7,default:!0},{label:"A3",width:29.7,height:42},{label:"A5",width:14.8,height:21},{label:"B5",width:17.6,height:25},{label:{en_US:"No. 5 Envelope",zh_CN:"5号信封"},width:10.9,height:12.9},{label:{en_US:"No. 6 Envelope",zh_CN:"6号信封"},width:11.9,height:22.9},{label:{en_US:"No. 7 Envelope",zh_CN:"7号信封"},width:16.1,height:22.8},{label:{en_US:"No. 9 Envelope",zh_CN:"9号信封"},width:22.8,height:32.3},{label:{en_US:"Legal Paper",zh_CN:"法律用纸"},width:21.5,height:33.5},{label:{en_US:"Letter Paper",zh_CN:"信纸"},width:21.5,height:27.9}],Gt={fonts:Pt,colors:It,lineHeights:Rt,symbols:Vt,emojis:Wt,pageSizes:Zt},G={editorKey:"default",locale:"zh-CN",theme:"light",skin:"default",height:"100%",fullscreenZIndex:2500,dicts:Gt,toolbar:{showSaveLabel:!0,defaultMode:"ribbon",menus:["base","insert","table","tools","page","view","export"]},page:{layouts:["page","web"],defaultMargin:{left:3.18,right:3.18,top:2.54,bottom:2.54},defaultOrientation:"portrait",defaultBackground:"#fff",showBreakMarks:!0,showLineNumber:!1,showBookmark:!1,showToc:!1,watermark:{type:"compact",alpha:.2,fontColor:"#000",fontSize:16,fontFamily:"SimSun",fontWeight:"normal",text:""}},document:{title:"",content:"",placeholder:{en_US:"Please enter the document content...",zh_CN:"请输入文档内容..."},structure:"block+",enableSpellcheck:!0,enableMarkdown:!0,enableBubbleMenu:!0,enableBlockMenu:!0,enableNodeId:!1,readOnly:!1,autofocus:!1,characterLimit:0,typographyRules:{},editorProps:{},parseOptions:{preserveWhitespace:"full"},autoSave:{enabled:!0,interval:3e5}},echarts:{mode:1,renderImage:!1,onCustomSettings(){return null}},webPages:[{label:{zh_CN:"哔哩哔哩",en_US:"Bilibili"},icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.39 3.714h.5c.88.032 1.614.337 2.2.918.586.58.889 1.312.91 2.194v4.293c-.021.88-.324 1.615-.91 2.201-.586.586-.132.889-2.2.91H4.11c-.88-.021-1.614-.324-2.2-.91-.586-.586-.889-1.32-.91-2.2V6.825c.021-.882.324-1.613.91-2.194.586-.58 1.32-.886 2.2-.918h.452l-.684-.653a.72.72 0 0 1-.218-.529.72.72 0 0 1 .218-.529l.015-.015a.763.763 0 0 1 .537-.218c.202 0 .38.072.537.218L6.63 3.59c.041.041.078.083.109.124h2.49a.487.487 0 0 1 .092-.124l1.665-1.602a.763.763 0 0 1 .536-.218c.203 0 .386.088.542.233a.691.691 0 0 1 .228.53.72.72 0 0 1-.217.528l-.685.653zm-7.28 1.51c-.434.01-.8.16-1.096.45-.295.29-.448.66-.458 1.105v4.387c.01.445.163.813.458 1.104.296.29.662.441 1.097.45h7.778c.435-.009.801-.16 1.097-.45.295-.29.448-.659.458-1.104V6.779c-.01-.446-.163-.814-.458-1.105a1.563 1.563 0 0 0-1.097-.45H4.111zm1.557 2.255c.217 0 .399.072.544.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.736.736 0 0 1-.544.218.739.739 0 0 1-.545-.218.809.809 0 0 1-.233-.56v-.684c0-.218.075-.402.225-.553a.753.753 0 0 1 .553-.225zm4.666 0c.218 0 .4.072.545.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.737.737 0 0 1-.545.218.739.739 0 0 1-.544-.218.809.809 0 0 1-.233-.56v-.684a.809.809 0 0 1 .233-.56.738.738 0 0 1 .544-.218z" fill="#07A3D7"/></svg>',validate(a){return/^https?:\/\/(www\.)?bilibili\.com\/video\/[a-zA-Z0-9]+/.test(a)},transformURL(a){const r=a.match(/\/video\/([a-zA-Z0-9]+)/)?.[1];return r?`https://player.bilibili.com/player.html?bvid=${r}`:""}},{label:{zh_CN:"优酷",en_US:"Youku"},icon:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M270.528 902.592c-82.688-45.952-104.576-161.984-43.072-232 26.688-30.208 214.592-142.784 229.632-137.344 17.088 5.504 7.488-.64-112.768-71.36-105.92-62.464-129.152-83.776-144.896-129.792-34.816-105.664 58.112-218.944 166.08-202.496 24.576 4.096 102.528 42.56 175.616 87.168 13.696 8.32 70.4 41.216 125.76 73.472 119.616 69.376 153.792 97.472 178.368 148.288 20.48 41.856 24.576 100.928 10.24 151.68-8.896 32.32-41.664 78.976-71.04 100.992l-19.2 14.4-33.408-19.2c-19.2-11.008-34.176-17.92-34.176-15.808 0 1.344 12.288 10.24 27.328 18.56 15.04 8.896 27.328 17.152 27.328 19.2 0 4.8-281.6 168.832-334.208 194.24-51.904 26.112-100.48 26.112-147.584 0z" fill="#018EFF"/><path d="M665.984 654.4c0-1.088-6.912-5.888-15.936-10.624-20.16-10.112-21.248-5.888-1.088 4.736 16.512 9.024 17.024 9.6 17.024 5.888zm-50.56 5.952c-8.448-7.424-55.744-33.408-55.744-30.72 0 2.56 53.632 35.008 58.432 35.52 1.024 0 0-2.112-2.688-4.8z" fill="#018EFF"/><path d="M673.472 653.44a4171.008 4171.008 0 0 0-126.336-72.768c-43.712-24.064-92.224-52.864-233.6-137.344C238.4 398.72 213.76 374.016 199.424 332.16c-34.816-105.664 58.048-218.944 166.016-202.496 24.576 4.096 102.4 42.56 175.552 87.168 13.632 8.32 70.336 41.216 125.632 73.472 114.112 65.92 146.88 92.032 170.752 133.184 47.872 81.728 29.44 195.008-40.96 257.472-13.632 11.648-27.968 21.248-32.768 21.248-4.8-.64-45.12-21.952-90.176-48.704z" fill="#FF396E"/><path d="M270.464 902.592A152.32 152.32 0 0 1 193.28 781.76c-6.144-76.8 21.184-115.328 130.496-179.84l75.136-44.608L568.96 630.08c93.568 39.808 172.8 72.064 176.256 72.064 4.096 0 6.784 2.048 6.784 5.504 0 5.504-273.216 165.44-334.016 194.944-51.84 26.112-100.352 26.112-147.52 0z" fill="#00BEFF"/></svg>',validate(a){return/^https?:\/\/v\.youku\.com\/v_show\/id_[a-zA-Z0-9]+/.test(a)},transformURL(a){const r=a.match(/\/id_([a-zA-Z0-9]+)/)?.[1];return r?`https://player.youku.com/embed/${r}`:""}},{label:{zh_CN:"Figma",en_US:"Figma"},icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.324 8c0-1.475 1.2-2.675 2.675-2.675 1.475 0 2.675 1.2 2.675 2.675 0 1.475-1.2 2.675-2.675 2.675A2.678 2.678 0 0 1 8.324 8z" fill="#1ABCFE"/><path d="M3 13.325c0-1.475 1.2-2.675 2.675-2.675h2.65v2.675C8.325 14.8 7.125 16 5.65 16 4.175 16 3 14.8 3 13.325z" fill="#0ACF83"/><path d="M8.324 0v5.325H11c1.475 0 2.675-1.2 2.675-2.675C13.674 1.175 12.474 0 11 0H8.324z" fill="#FF7262"/><path d="M3 2.675C3 4.15 4.2 5.35 5.675 5.35h2.65V0H5.65C4.175 0 3 1.2 3 2.675z" fill="#F24E1E"/><path d="M3 8c0 1.475 1.2 2.675 2.675 2.675h2.65v-5.35H5.65C4.175 5.325 3 6.525 3 8z" fill="#A259FF"/></svg>',validate(a){return/^https?:\/\/www\.figma\.com\/file\/[a-zA-Z0-9]+/.test(a)},transformURL(a){const r=a.match(/\/file\/([a-zA-Z0-9]+)/)?.[1];return r?`https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/${r}`:""}},{label:{zh_CN:"墨刀",en_US:"MockingBot"},icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 3h2.715v4.752H2V3zm6.958 0H6.242v4.752h2.716V3zm4.582 0h-2.716v4.752h2.716V3zM9.107 14l-1.096-2.5a3.905 3.905 0 0 0 2.812-3.748h2.716A6.621 6.621 0 0 1 9.107 14z" fill="#F33"/></svg>',validate(a){return/^https?:\/\/modao\.cc\/app\/[a-zA-Z0-9]+/.test(a)},transformURL(a){return a}},{label:{zh_CN:"腾讯视频",en_US:"Tencent Video"},icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.314 14.541c-1.416-.025-1.71-1.416-1.964-3.16-.155-1.06-.182-2.155-.182-3.23 0-1.074.027-2.169.182-3.23.31-2.14.685-3.75 3.123-2.95 2.336.768 4.586 2.126 6.56 3.67.1.085.209.177.324.272.705.59 1.62 1.355 1.642 2.239-.021.882-.936 1.647-1.641 2.237-.115.096-.225.187-.324.274-1.975 1.543-4.225 2.901-6.561 3.67-.418.136-.774.203-1.08.208h-.08z" fill="#4396F7"/><path d="M2.98 13.143c-1.202-.029-1.527-.954-1.755-2.162l-.02-.1-.036-.206C1.025 9.847 1 8.991 1 8.152c0-.84.025-1.694.17-2.523l.036-.205.019-.1c.267-1.418.668-2.447 2.464-2.094-.151.487-.247 1.067-.339 1.692-.154 1.061-.181 2.156-.181 3.23 0 1.074.027 2.169.181 3.23.092.624.188 1.204.34 1.692a3.501 3.501 0 0 1-.592.07H2.98z" fill="#EF8E34"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.689 3.229c.125.025.256.055.395.094 2.181.6 4.28 1.66 6.124 2.866.66.483 1.812 1.16 1.834 1.962-.023.803-1.175 1.48-1.834 1.963-1.843 1.205-3.943 2.266-6.124 2.866-.139.038-.27.069-.395.094-.151-.488-.248-1.068-.338-1.693-.155-1.06-.182-2.156-.182-3.23 0-1.074.027-2.169.182-3.23.09-.62.185-1.197.335-1.683l.003-.009z" fill="#78E445"/><path d="M4.845 8.156c0-1.82.13-2.04.13-2.04.053-.234.18-.298.378-.241 0 0 .587.124 2.006.87 1.435.754 1.875 1.168 1.875 1.168.217.188.172.305 0 .483 0 0-.269.308-1.875 1.14-1.606.83-2.006.894-2.006.894-.239.056-.332-.015-.377-.24 0 0-.13-.21-.13-2.034z" fill="#fff"/></svg>',validate(a){return a.startsWith("https://modao.cc/proto/")},transformURL(a){const r=a.match(/\/cover\/[a-zA-Z0-9]+\/([a-zA-Z0-9]+)/)?.[1];return r?`https://v.qq.com/iframe/player.html?vid=${r}`:""}}],templates:[],cdnUrl:"https://unpkg.com/@umoteam/editor-external@latest",shareUrl:location.href||"",diagrams:{domain:"https://embed.diagrams.net",params:{}},file:{allowedMimeTypes:[],maxSize:1024*1024*100,preview:[{extensions:["pdf"],url:"{url}"},{extensions:["doc","docx","xls","xlsx","ppt","pptx"],url:"https://view.officeapps.live.com/op/embed.aspx?src={{url}}&wdStartOn=1&wdPrint=0&wdEmbedCode=0"}]},user:{},users:[],extensions:[],disableExtensions:[],translations:{en_US:{},zh_CN:{}},async onSave(){return await new Promise((a,r)=>{r(new Error('Key "onSave": Please set the save method'))})},async onFileUpload(a){return await new Promise((r,s)=>{if(!a){s(new Error("File not found"));return}s(new Error('Key "onFileUpload": Please set the upload method'))})},onFileDelete(){console.error("The file has been deleted. Please configure the onFileDelete to completely delete the file from the server.")}},x=a=>{if(w(a)&&a.length>0)return!0;if(z(a)){for(const r of Object.keys(a))if(!["en_US","zh_CN"].includes(r))return!1;return!0}return!1},Xt=new Dt({editorKey:{merge:"replace",validate:"string!",required:!1},locale:{merge:"replace",validate(a){if(a&&!["en-US","zh-CN"].includes(a))throw new Error('Key "locale": must be one of "zh-CN" or "en-US".')},required:!1},theme:{merge:"replace",validate(a){if(a&&!["dark","light","auto"].includes(a))throw new Error('Key "theme": must be one of "dark", "light" or "auto".')},required:!1},skin:{merge:"replace",validate(a){if(a&&!["default","modern"].includes(a))throw new Error('Key "skin": must be one of "default" or "modern".')},required:!1},height:{merge:"replace",validate:"string!",required:!1},fullscreenZIndex:{merge:"replace",validate:"number",required:!1},dicts:{required:!1,merge:"replace",validate:"object",schema:{fonts:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "dicts": Key "fonts" must be a array.');for(const r of a)if(!r.label||!r.value&&r.value!==null)throw new Error('Key "dicts": Key "fonts" must be a array of objects with "label" and "value" properties.')},required:!1},colors:{merge:"replace",validate:"array",required:!1},lineHeights:{merge:"replace",validate(a){if(!Array.isArray(a))throw new Error('Key "dicts": Key "lineHeights": must be a array.');if(!a.find(r=>r.default))throw new Error('Key "dicts": Key "lineHeights": please set a default value.');a.forEach((r,s)=>{if(!r.label||!r.value&&r.value!==null)throw new Error(`Key "dicts": Key "lineHeights[${s}]": must be a array of objects with "label" and "value" properties.`);if(!x(r.label))throw new Error(`Key "dicts": Key "lineHeights[${s}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)})},required:!1},symbols:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "dicts": Key "symbols" must be a array.');a.forEach((r,s)=>{if(!r.label||typeof r.items!="string")throw new Error(`Key "dicts": Key "symbols[${s}]": must be a array of objects with "label" and "items" properties.`);if(!x(r.label))throw new Error(`Key "dicts": Key "symbols[${s}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)})},required:!1},emojis:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "dicts": Key "emojis" must be a array.');a.forEach((r,s)=>{if(!r.label||typeof r.items!="string")throw new Error(`Key "dicts": Key "emojis[${s}]": must be a array of objects with "label" and "value" properties.`);if(!x(r.label))throw new Error(`Key "dicts": Key "emojis[${s}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)})},required:!1},pageSizes:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "dicts": Key "pageSizes": must be a array.');if(!a.find(r=>r.default))throw new Error('Key "dicts": Key "pageSizes": please set a default value.');a.forEach((r,s)=>{if(!r.label||r.label==="")throw new Error(`Key "dicts": Key "pageSizes[${s}]" Key: "label" cannot be empty.`);if(!x(r.label))throw new Error(`Key "dicts": Key "pageSizes[${s}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`);if(!B(r.width))throw new Error(`Key "dicts": Key "pageSizes[${s}]" Key: "width" must be a number.`);if(!B(r.height))throw new Error(`Key "dicts": Key "pageSizes[${s}]" Key: "height" must be a number.`)})},required:!1}}},toolbar:{required:!1,merge:"replace",validate:"object",schema:{showSaveLabel:{merge:"replace",validate:"boolean",required:!1},defaultMode:{merge:"replace",validate(a){if(a&&!["classic","ribbon"].includes(a))throw new Error('Key "toolbar": Key "defaultMode" must be one of "classic" or "ribbon".')},required:!1},menus:{merge:"replace",validate(a){const r=G?.toolbar?.menus;if(a&&!Array.isArray(a))throw new Error('Key "toolbar": Key "menus" must be a array.');if(!a.includes("base"))throw new Error('Key "toolbar": Key "menus" should at least contain "base".');if(!a.every(s=>r?.includes(s)))throw new Error(`Key "toolbar": Key "menus" the array items of toolbar.menus must contain only one or multiple of ${JSON.stringify(r)}.`)},required:!1}}},page:{merge:"replace",validate:"object",required:!1,schema:{layouts:{merge:"replace",validate(a){const r=G?.page?.layouts;if(a&&!Array.isArray(a))throw new Error('Key "page": Key "layouts" must be a array.');if(!a.every(s=>r?.includes(s)))throw new Error(`Key "page": Key "layouts" the array items of page.layouts must contain only one or multiple of ${JSON.stringify(r)}.`)},required:!1},defaultMargin:{required:!1,merge:"replace",validate:"object",schema:{left:{merge:"replace",validate:"number",required:!1},right:{merge:"replace",validate:"number",required:!1},top:{merge:"replace",validate:"number",required:!1},bottom:{merge:"replace",validate:"number",required:!1}}},defaultOrientation:{merge:"replace",validate(a){if(a&&!["portrait","landscape"].includes(a))throw new Error('Key "page": Key "defaultOrientation" must be one of "portrait" or "landscape".')},required:!1},defaultBackground:{merge:"replace",validate:"string",required:!1},showBreakMarks:{merge:"replace",validate:"boolean",required:!1},showBookmark:{merge:"replace",validate:"boolean",required:!1},showLineNumber:{merge:"replace",validate:"boolean",required:!1},showToc:{merge:"replace",validate:"boolean",required:!1},showBackTop:{merge:"replace",validate:"boolean",required:!1},watermark:{required:!1,merge:"replace",validate:"object",schema:{type:{merge:"replace",validate(a){if(a&&!["compact","spacious"].includes(a))throw new Error('Key "watermark": Key "type" must be one of "compact" or "spacious".')},required:!1},alpha:{merge:"replace",validate:"number",required:!1},fontColor:{merge:"replace",validate:"string",required:!1},fontFamily:{merge:"replace",validate(a){if(a!==null&&typeof a!="string")throw new Error('Key "watermark": Key "fontFamily" must be a string.')},required:!1},fontSize:{merge:"replace",validate:"number",required:!1},fontWeight:{merge:"replace",validate:"string",required:!1},text:{merge:"replace",validate:"string",required:!1}}},size:{required:!1,merge:"replace",validate:"object",schema:{width:{merge:"replace",validate:"number",required:!1},height:{merge:"replace",validate:"number",required:!1},label:{merge:"replace",validate:"string",required:!1}}}}},document:{merge:"replace",validate:"object",required:!1,schema:{title:{merge:"replace",validate:"string",required:!1},content:{merge:"replace",validate(){},required:!1},placeholder:{merge:"replace",validate(a){if(!x(a))throw new Error('Key "document": Key "title": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.')},required:!1},structure:{merge:"replace",validate:"string",required:!1},enableSpellcheck:{merge:"replace",validate:"boolean",required:!1},enableMarkdown:{merge:"replace",validate:"boolean",required:!1},enableBubbleMenu:{merge:"replace",validate:"boolean",required:!1},enableBlockMenu:{merge:"replace",validate:"boolean",required:!1},enableNodeId:{merge:"replace",validate:"boolean",required:!1},readOnly:{merge:"replace",validate:"boolean",required:!1},autofocus:{merge:"replace",validate(a){if(!["start","end","all",!0,!1,null].includes(a)&&!B(a))throw new Error('Key "document": Key "autofocus" must be one of "start", "end", "all", Number, true, false, null.')},required:!1},characterLimit:{merge:"replace",validate:"number",required:!1},typographyRules:{merge:"replace",validate:"object",required:!1},editorProps:{merge:"replace",validate:"object",required:!1},parseOptions:{merge:"replace",validate:"object",required:!1},autoSave:{required:!1,merge:"replace",validate:"object",schema:{enabled:{merge:"replace",validate:"boolean",required:!1},interval:{merge:"replace",validate:"number",required:!1}}}}},echarts:{merge:"replace",validate:"object",required:!1,schema:{mode:{merge:"replace",validate:"number",required:!1},renderImage:{merge:"replace",validate:"boolean",required:!1},onCustomSettings:{merge:"replace",validate(a){if(!Z(a))throw new Error('Key "onCustomSettings" must be a function.')},required:!1}}},webPages:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "webPages": must be a array.');a.forEach((r,s)=>{if(!r.label||r.label==="")throw new Error(`Key "webPages[${s}]": Key "label" cannot be empty.`);if(!r.icon||r.icon==="")throw new Error(`Key "webPages[${s}]": Key "icon" cannot be empty.`);if(!r.validate||!Z(r.validate))throw new Error(`Key "webPages[${s}]": Key "validate" must be a function.`);if(!r.transformURL||!Z(r.transformURL))throw new Error(`Key "webPages[${s}]": Key "transformURL" must be a function.`)})},required:!1},shareUrl:{merge:"replace",validate:"string",required:!1},templates:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "templates": must be a array.');a.forEach((r,s)=>{if(!r.title||r.title==="")throw new Error(`Key "templates[${s}]": Key "title" cannot be empty.`);if(!r.content||r.content==="")throw new Error(`Key "templates[${s}]": Key "content" cannot be empty.`)})},required:!1},cdnUrl:{merge:"replace",validate:"string",required:!1},diagrams:{merge:"assign",validate:"object",required:!1},file:{required:!1,merge:"replace",validate:"object",schema:{allowedMimeTypes:{merge:"replace",validate:"array",required:!1},maxSize:{merge:"replace",validate:"number",required:!1},preview:{merge:"replace",validate(a){a.forEach(r=>{if(typeof r!="object")throw new Error('Key "file": Key "preview" must be an array of objects.');if(!Array.isArray(r.extensions))throw new Error('Key "file": Key "preview": Key "extensions" must be an array of strings.');if(!r.url?.includes("{url}"))throw new Error('Key "file": Key "preview": Key "url" must include "{url}".')})},required:!1}}},user:{merge:"assign",validate:"object",required:!1},users:{merge:"replace",validate(a){a.forEach(r=>{if(typeof r!="object")throw new Error('Key "users": Key "item" must be an array of objects.');if(!r.id)throw new Error('Key "users": Key "item": Key "id" cannot be empty.');if(!r.label)throw new Error('Key "users": Key "item": Key "label" cannot be empty.')})},required:!1},extensions:{merge:"replace",validate:"array",required:!1},disableExtensions:{merge:"replace",validate(a){if(a&&!Array.isArray(a))throw new Error('Key "disableExtensions" must be a array.')},required:!1},translations:{merge:"replace",validate:"object",required:!1},onSave:{merge:"replace",validate(a){if(!Me(a))throw new Error('Key "onSave" must be a async function.')},required:!1},onFileUpload:{merge:"replace",validate(a){if(!Me(a))throw new Error('Key "onFileUpload" must be a async function.')},required:!1},onFileDelete:{merge:"replace",validate(a){if(!Z(a))throw new Error('Key "onFileDelete" must be a function.')},required:!1}}),Jt=Object.keys(G),De=(a,r)=>{const s=z(a)&&Object.keys(a).includes("value")?a.value:a,X=Object.keys(s).reduce((D,N)=>(s[N]!==void 0&&(D[N]=s[N]),D),{});return Xt.merge(G,r,X)},Yt=["id"],Qt={key:0,class:"umo-toolbar"},ea={class:"umo-main"},ta={class:"umo-footer"},Ea=Object.assign({name:"UmoEditor"},{__name:"index",props:Jt,emits:["beforeCreate","created","changed","changed:selection","changed:transaction","changed:menu","changed:toolbar","changed:pageLayout","changed:pageSize","changed:pageOrientation","changed:pageMargin","changed:pageBackground","changed:pageShowToc","changed:pagePreview","changed:pageZoom","changed:pageWatermark","changed:locale","changed:theme","changed:skin","print","focus","blur","paste","drop","delete","saved","destroy"],setup(a,{expose:r,emit:s}){const{toBlob:X,toJpeg:ce,toPng:D}=qt,N=a,u=s,y=f({done:[],undone:[],isUndoRedo:!1,editorCount:0}),p=f(`#umo-editor-${se(4)}`),Le=wt("defaultOptions",{}),n=f(De(N,Le)),o=f(null),de=f(null),i=f({}),je=f(!1),He=f({visible:!1,current:null}),me=f(!1),J=f(!1),S=f(!1),Oe=f({pdf:!1,image:!1}),$e=f(new Map),Y=f(!1),L=f(!1),K=ue("toolbar",n),j=ue("document",n),fe=ue("layout",n);d("container",p.value),d("options",n),d("editor",o),d("savedAt",de),d("page",i),d("blockMenu",je),d("imageViewer",He),d("searchReplace",me),d("printing",J),d("fullscreen",S),d("exportFile",Oe),d("uploadFileMap",$e),d("destroyed",Y),d("historyRecords",y),d("typeWriterIsRunning",L),m(S,e=>{typeof document>"u"||(document.body.style.overflow=e?"hidden":"")}),m(()=>n.value.page,({layouts:e,defaultBackground:t,defaultMargin:l,defaultOrientation:c,watermark:v,showBreakMarks:E,showBookmark:b,showLineNumber:k,showToc:I})=>{i.value={layout:fe.value||e[0],size:n.value.dicts?.pageSizes.find(R=>R.default),margin:l,background:t,orientation:c,watermark:v,showBreakMarks:E,showBookmark:b,showLineNumber:k,showToc:I,zoomLevel:100,autoWidth:!1,preview:{enabled:!1,scale:1,zoom:100}},o.value?.commands.showInvisibleCharacters(E)},{immediate:!0,deep:!0}),m(()=>n.value.document?.readOnly,e=>{o.value?.setEditable(!e)});let he=f(se()),Pe=f(null);d("toolbarActive",Pe),m(()=>[n.value.document?.readOnly,o.value?.isEditable],async()=>{await ke(),he.value=se()}),yt(()=>{const e=T("umo-editor:theme",n.value.theme),t=T("umo-editor:skin",n.value.skin);U(e.value),O(t.value),window.addEventListener("beforeunload",pe)}),St(()=>{window.removeEventListener("beforeunload",pe),typeof document<"u"&&(document.body.style.overflow=""),ee(),Se()}),m(()=>N,()=>be(N),{deep:!0}),m(()=>n.value.theme,e=>{U(e)}),m(()=>n.value.document,e=>{j.value=e}),m(()=>Mt(),e=>{L.value=e,console.log("typeWriterIsRunning",L)});let A=f(!1),ge=f(!0),H=f(null),Q=f(!1);const Ie=()=>Q.value||A.value,pe=e=>{Ie()&&(e.preventDefault(),e.returnValue="")},ee=()=>{H.value!==null&&(clearInterval(H.value),H.value=null)};m(()=>A.value,e=>{const{autoSave:t}=n.value.document;if(t?.enabled){if(ge.value){ge.value=!1,setTimeout(()=>{A.value=!1});return}if(!e){ee();return}H.value=setInterval(()=>{P(),A.value=!1,ee()},t.interval)}}),m(()=>o.value,()=>{o.value&&(o.value.on("create",({editor:e})=>{Y.value=!1,u("created",{editor:e})}),o.value.on("update",({editor:e})=>{u("changed",{editor:e}),A.value=!0,Ht()}),o.value.on("selectionUpdate",({editor:e})=>{Ot(e),u("changed:selection",{editor:e})}),o.value.on("transaction",({editor:e,transaction:t})=>{u("changed:transaction",{editor:e,transaction:t})}),o.value.on("focus",({editor:e,event:t})=>{u("focus",{editor:e,event:t})}),o.value.on("blur",({editor:e,event:t})=>{u("blur",{editor:e,event:t})}),o.value.on("paste",({event:e,slice:t})=>{u("paste",{event:e,slice:t})}),o.value.on("drop",({event:e,slice:t,moved:l})=>{u("drop",{event:e,slice:t,moved:l})}),o.value.on("delete",({type:e,deletedRange:t,newRange:l,partial:c,node:v,mark:E,from:b,to:k,newFrom:I,newTo:R})=>{u("delete",{type:e,deletedRange:t,newRange:l,partial:c,node:v,mark:E,from:b,to:k,newFrom:I,newTo:R})}),o.value.on("destroy",()=>{u("destroy")}))}),m(()=>K.value,(e,t)=>{u("changed:toolbar",{toolbar:e,oldToolbar:t})},{deep:!0}),m(()=>i.value.layout,(e,t)=>{e!==t&&(u("changed:pageLayout",{pageLayout:e,oldPageLayout:t}),q(y,"page",{proType:"layout",newData:e,oldData:t}),e==="web"&&O("default"),fe.value=e)}),m(()=>i.value.size,(e,t)=>{u("changed:pageSize",{pageSize:e,oldPageSize:t}),q(y,"page",{proType:"size",newData:e,oldData:t})},{deep:!0}),m(()=>i.value.margin,(e,t)=>{u("changed:pageMargin",{pageMargin:e,oldPageMargin:t}),q(y,"page",{proType:"margin",newData:e,oldData:t})},{deep:!0}),m(()=>i.value.background,(e,t)=>{u("changed:pageBackground",{pageBackground:e,oldPageBackground:t}),q(y,"page",{proType:"background",newData:e,oldData:t})}),m(()=>i.value.orientation,(e,t)=>{u("changed:pageOrientation",{pageOrientation:e,oldPageOrientation:t}),q(y,"page",{proType:"orientation",newData:e,oldData:t})}),m(()=>i.value.showToc,e=>{u("changed:pageShowToc",e)}),m(()=>i.value.zoomLevel,(e,t)=>{u("changed:pageZoom",{zoomLevel:e,oldZoomLevel:t}),q(y,"page",{proType:"zoomLevel",newData:e,oldData:t})}),m(()=>i.value.preview?.enabled,e=>{u("changed:pagePreview",e);try{setTimeout(()=>{const t=document.querySelector(`${p.value} .umo-zoomable-container`);t&&(t.scrollTop=0)},200)}catch{}}),m(()=>i.value.watermark,(e,t)=>{u("changed:pageWatermark",{pageWatermark:e,oldPageWatermark:t}),q(y,"page",{proType:"watermark",newData:e,oldData:t})},{deep:!0}),m(()=>J.value,()=>{u("print")},{deep:!0});const{t:_,locale:F,mergeLocaleMessage:Re}=useI18n(),ve=T("umo-editor:locale",n.value.locale);F.value=ve.value;const Ve=e=>{const t=n.value.translations?.[e.replaceAll("-","_")];return z(t)?t:{}};Re(F.value,Ve(F.value));const{appContext:te}=Ne();te&&(te.config.globalProperties.t=_,te.config.globalProperties.l=ie),m(()=>F.value,(e,t)=>{u("changed:locale",{locale:e,oldLocale:t})});const We=f({"zh-CN":Ut,"en-US":At}),be=e=>{try{n.value=De(e);const t=T("umo-editor:locale",n.value.locale);t.value||(t.value=n.value.locale)}catch{}return n.value},U=e=>{if(!w(e)||!["light","dark","auto"].includes(e))throw new Error('"theme" must be one of "light", "dark" or "auto".');if(e!=="auto"){document.querySelector("html")?.setAttribute("theme-mode",e);const c=T("umo-editor:theme",n.value.theme);c.value=e,u("changed:theme",e);return}const t="(prefers-color-scheme: dark)",l=window.matchMedia(t).matches;U(l?"dark":"light"),window.matchMedia(t).addEventListener("change",c=>{U(c.matches?"dark":"light")})},O=e=>{if(!w(e)||!["modern","default"].includes(e))throw new Error('"skin" must be one of "modern" or "default".');const t=T("umo-editor:skin",n.value.skin);t.value=e,n.value.skin=e,u("changed:skin",e)},Ze=e=>{if(!z(e))throw new Error("params must be an object.");if(e.mode){if(!w(e.mode))throw new Error('"params.mode" must be a string.');if(!["classic","ribbon"].includes(e.mode))throw new Error('"params.mode" must be one of "classic" or "ribbon".');K.value.mode=e.mode}if(xe(e.show)){if(!Te(e.show))throw new Error('"params.show" must be a boolean.');K.value.show=e.show}},Ge=e=>{if(!n.value.page.layouts.includes(e))throw new Error(`"params.layout" must be one of ${JSON.stringify(n.value.page.layouts)}.`);i.value.layout=e},Xe=e=>{if(!z(e))throw new Error("params must be an object.");if(e.size){if(!w(e.size))throw new Error('"params.size" must be a string.');const t=n.value.dicts?.pageSizes.find(l=>l.label===e.size||ie(l.label)===e.size);if(!t)throw new Error(`"params.size" must be one of ${n.value.dicts?.pageSizes.map(l=>ie(l.label))}.`);i.value.size=t}if(e.orientation){if(!w(e.orientation))throw new Error('"params.orientation" must be a string.');if(!["portrait","landscape"].includes(e.orientation))throw new Error('"params.orientation" must be one of "portrait" or "landscape".');i.value.orientation=e.orientation}if(e.background){if(!w(e.background))throw new Error('"params.background" must be a string.');i.value.background=e.background}if(e.layout){if(!n.value.page.layouts.includes(e.layout))throw new Error(`"params.layout" must be one of ${JSON.stringify(n.value.page.layouts)}.`);i.value.layout=e.layout}if(e.margin){const t=["left","right","top","bottom"],l={...i.value.margin};for(const c of t)if(e.margin[c]!==void 0){if(!B(e.margin[c]))throw new Error(`"params.margin.${c}" must be a number.`);l[c]=e.margin[c]}i.value.margin=l}},Je=e=>{if(!z(e))throw new Error("params must be an object.");if(i.value.watermark={},xe(e.alpha)){if(!B(e.alpha))throw new Error('"params.alpha" must be a number.');i.value.watermark.alpha=e.alpha}if(e.text){if(!w(e.text))throw new Error('"params.text" must be a string.');if(e.text.length>30)throw new Error('"params.text" must be less than 30 characters.');i.value.watermark.text=e.text}if(e.type){if(!w(e.type))throw new Error('"params.type" must be a string.');if(!["compact","spacious"].includes(e.type))throw new Error('"params.type" must be one of "compact" or "spacious".');i.value.watermark.type=e.type}if(e.fontColor){if(!w(e.fontColor))throw new Error('"params.fontColor" must be a string.');i.value.watermark.fontColor=e.fontColor}if(e.fontSize){if(!B(e.fontSize))throw new Error('"params.fontSize" must be a number.');i.value.watermark.fontSize=e.fontSize}if(e.fontFamily||e.fontFamily===null){if(e.fontFamily!==null&&!w(e.fontFamily))throw new Error('"params.fontFamily" must be a string.');i.value.watermark.fontFamily=e.fontFamily}if(e.fontWeight){if(!w(e.fontWeight))throw new Error('"params.fontWeight" must be a string.');if(!["normal","bold","bolder"].includes(e.fontWeight))throw new Error('"params.fontWeight" must be one of "normal", "bold" or "bolder".');i.value.watermark.fontWeight=e.fontWeight}},Ye=e=>{if(!z(e))throw new Error("params must be an object.");Object.keys(e).forEach(t=>{n.value.document[t]=e[t],j.value[t]=e[t]})},Qe=(e,t={emitUpdate:!0,focusPosition:"start",focusOptions:{scrollIntoView:!0}})=>{if(!o.value)throw new Error("editor is not ready!");const l=Be(e);o.value.chain().setContent(l,{emitUpdate:t.emitUpdate}).focus(t.focusPosition,t.focusOptions).run()},et=(e,t={updateSelection:!0,focusPosition:"start",focusOptions:{scrollIntoView:!0}})=>{if(!o.value)throw new Error("editor is not ready!");const l=Be(e);o.value.chain().insertContent(l,{updateSelection:t.updateSelection}).focus(t.focusPosition,t.focusOptions).run()},tt=(e,t)=>{if(!o.value)throw new Error("editor is not ready!");if(typeof e!="object")throw new Error("content is not object!");setTimeout(()=>{o?.value?.commands.focus("end"),o?.value?.commands.startTypewriter(e,t)},100)},at=()=>{o?.value?.commands.stopTypewriter()},rt=()=>o?.value?.commands.getTypewriterState(),$=(e="html")=>{if(!o.value)throw new Error("editor is not ready!");if(e==="html")return o.value.getHTML();if(e==="text")return o.value.getText();if(e==="json")return o.value.getJSON();throw new Error("format must be html, text or json")},ae=(e,t=!0)=>{if(!["zh-CN","en-US"].includes(e))throw new Error('"params" must be one of "zh-CN" or "en-US".');if(F.value===e)return;if(t){ve.value=e,location.reload();return}const l=Ue({attach:p.value,theme:"warning",header:_("changeLocale.title"),body:_("changeLocale.message"),confirmBtn:{theme:"warning",content:_("changeLocale.confirm")},onConfirm(){l.destroy(),setTimeout(()=>ae(e),300)}})},ot=()=>F.value,lt=()=>xt,nt=async(e="blob")=>{const{zoomLevel:t}=i.value;try{i.value.zoomLevel=100;const l=document.querySelector(`${p.value} .umo-page-content`);if(e==="blob")return await X(l);if(e==="jpeg")return await ce(l);if(e==="png")return await D(l)}catch{throw new Error(_("export.image.error.message"))}finally{i.value.zoomLevel=t}},it=()=>$("text"),st=()=>$("html"),ut=()=>$("json"),we=async()=>{if(!o.value)throw new Error("editor is not ready!");const{readOnly:e}=n.value.document,{isEditable:t}=o.value;e||(n.value.document.readOnly=!0),await ke();const l=document.querySelector(`${p.value} .umo-page-content`)?.cloneNode(!0);e||(n.value.document.readOnly=!1);const c=(h,g="1em")=>{const ze=document.querySelector("#umo-icons");h.forEach(re=>{re.querySelectorAll(".umo-icon").forEach(M=>{const bt=M.childNodes[0].getAttribute("xlink:href");M.setAttribute("viewBox","0 0 48 48"),M.setAttribute("fill","none"),M.setAttribute("width",g),M.setAttribute("height",g),M.innerHTML=ze?.querySelector(bt)?.innerHTML||""})})};l.querySelectorAll(".tiptap-invisible-character, .ProseMirror-separator").forEach(h=>h.remove()),l.querySelectorAll(".umo-node-video, .umo-node-audio").forEach(h=>{const g=h.querySelector("video, audio");g&&h.querySelector(".plyr")?.replaceWith(g)});const b=l.querySelectorAll(".umo-node-file");c(b);const k=l.querySelectorAll(".umo-code-block");if(k.forEach(h=>{const g=h.querySelector(".umo-word-wrap-button");g&&g.remove(),h.querySelectorAll(".umo-button-text").forEach(re=>re.remove())}),c(k,"16px"),l.querySelectorAll(".umo-node-echarts").forEach(h=>{const g=h.querySelector(".umo-node-echarts-body");g&&(g.removeAttribute("_echarts_instance_"),g.innerHTML="")}),l.querySelectorAll(".tiptap-mathematics-render").forEach(h=>{const g=h.querySelector(".katex");g&&(g.innerHTML=g.querySelector(".katex-html")?.innerHTML||"")}),i.value.watermark.text===""){const h=l.lastElementChild;h&&!h?.classList?.contains("umo-page-node-footer")&&h.remove()}const _e=l.querySelector(".umo-block-menu-drag-handle");return _e&&_e.remove(),l.outerHTML.replace(/<!--[\s\S]*?-->/g,"")},ct=(e="start",t={scrollIntoView:!0})=>o.value?.commands.focus(e,t),dt=()=>o.value?.chain().blur().run(),ye=()=>{n.value.disableExtensions.includes("print")||o.value?.isEmpty||n.value?.readOnly||(J.value=!0)},mt=e=>{if(e!==void 0){if(!Te(e))throw new Error('"isFullscreen" must be a boolean.');S.value=e;return}S.value=!S.value},Se=()=>{o.value?.unmount(),removeAllHotkeys(),Y.value=!0},P=async(e=!0)=>{if(n.value.document?.readOnly)return;o.value&&(j.value.content=o.value.getHTML());const t={status:"",message:"",showMessage:!0};try{Q.value=!0,useMessage("loading",{attach:p.value,content:_("save.saving"),placement:"bottom",closeBtn:!0,duration:0,offset:[0,-20]},Ne());const l=await n.value?.onSave?.({html:o.value?.getHTML(),json:o.value?.getJSON(),text:o.value?.getText()},i.value,j.value);if(!l)throw new Error("`onSave` callback must return a value.");if(typeof l=="string")l?(t.status="success",t.message=l):(t.status="error",t.message=l);else{for(const v in l)t[v]=l[v];l.showMessage===void 0&&(t.showMessage=e)}if(MessagePlugin.closeAll(),t.status==="error"){t.showMessage&&useMessage("error",{attach:p.value,content:t.message||_("save.failed"),placement:"bottom",offset:[0,-20]});return}u("saved"),A.value=!1,t.showMessage&&useMessage("success",{attach:p.value,content:t.message||_("save.success"),placement:"bottom",offset:[0,-20]});const c=$t({offset:0});de.value=c.value}catch(l){MessagePlugin.closeAll(),t.showMessage&&useMessage("error",{attach:p.value,content:l?.message?l.message:_("save.error"),placement:"bottom",offset:[0,-20]}),console.error(l?.message)}finally{Q.value=!1}},ft=()=>{let e;return o.value?.commands.getAllBookmarks(function(t){e=t}),e},ht=e=>o.value?.commands.focusBookmark(e),gt=e=>o.value?.commands.setBookmark({bookmarkName:e}),pt=e=>{if(!e)return!1;const t=o.value?.view.dom.querySelector(`bookmark[bookmarkName="${e}"]`);if(!t)return!1;const l=o.value?.view.posAtDOM(t,0),{tr:c}=o.value?.view.state||{};if(!c)return!1;const v=o.value?.view.state.doc.resolve(l+1)?.marks();if(v!==null&&v.length>0)for(const E of v)E.type.name==="bookmark"&&o.value?.view.dispatch(c.removeMark(l,l+t.outerText.length,E));else o.value?.view.dispatch(c.removeMark(l,l+t.outerText.length));return!0},vt=(e=100,t=" ...")=>{const l=o.value?.getText();return l?.length===0?"":l?.substring(0,e)+t},Ee=()=>{Tt(y,function(e){e?.type==="editor"?o?.value?.chain().focus().undo().run():e?.type==="page"&&e?.proType&&i?.value&&e.oldData!==void 0&&(i.value[e.proType]=e.oldData)})},Ce=()=>{Bt(y,function(e){e?.type==="editor"?o?.value?.chain().focus().redo().run():e?.type==="page"&&e?.proType&&i?.value&&e.newData!==void 0&&(i.value[e.proType]=e.newData)})};return m(()=>o.value,()=>{const e=()=>o.value?.commands.unsetFormatPainter(),t=()=>{useHotkeys("esc",()=>{i.value.preview&&(i.value.preview.enabled=!1),S.value&&(S.value=!1)})},l=()=>{useHotkeys("ctrl+z, command+z",()=>{Ee()}),useHotkeys("ctrl+y, command+y",()=>{Ce()})};o.value?.on("focus",()=>{useHotkeys("esc",e),useHotkeys("ctrl+s,command+s",()=>{n?.value?.toolbar?.showSaveLabel&&(P(),e())}),useHotkeys("ctrl+p,command+p",()=>{ye(),e()}),useHotkeys("ctrl+f, command+f",()=>{me.value=!0})}),t(),l(),o.value?.on("blur",()=>{removeAllHotkeys(),t(),l()})}),d("saveContent",P),d("setTheme",U),d("setSkin",O),d("setLocale",ae),d("getVanillaHTML",we),d("undoHistory",Ee),d("redoHistory",Ce),r({getOptions:()=>n.value,setOptions:be,setToolbar:Ze,setLayout:Ge,setPage:Xe,setWatermark:Je,setDocument:Ye,setContent:Qe,insertContent:et,startTypewriter:tt,stopTypewriter:at,getTypewriterState:rt,setLocale:ae,setTheme:U,setSkin:O,getPage:()=>i.value,getContent:$,getImage:nt,getText:it,getHTML:st,getJSON:ut,getVanillaHTML:we,saveContent:P,getContentExcerpt:vt,getEditor:()=>o,useEditor:()=>o.value,getTableOfContents:()=>o.value?.storage.tableOfContents.content,getSelectionText:()=>o.value?jt(o.value):"",getSelectionNode:()=>o.value?Lt(o.value):null,deleteSelectionNode:()=>o.value?.commands.deleteSelectionNode(),setCurrentNodeSelection:()=>o.value?.commands.setCurrentNodeSelection(),getLocale:ot,getI18n:lt,setReadOnly(e=!0){n.value.document&&(n.value.document.readOnly=e)},print:ye,focus:ct,blur:dt,toggleFullscreen:mt,destroy:Se,focusBookmark:ht,getAllBookmarks:ft,setBookmark:gt,deleteBookmark:pt,useAlert(e){return Ft({attach:p.value,...e})},useConfirm(e){return Ue({attach:p.value,...e})},useMessage(e,t){return useMessage(e,{attach:p.value,...t})}}),(e,t)=>{const l=V("toolbar"),c=V("container-page"),v=V("statusbar"),E=V("t-config-provider");return W(),oe(E,{key:n.value.editorKey,"global-config":{...C(We)[C(F)],classPrefix:"umo"}},{default:le(()=>[(W(),oe(Et,{to:"body",disabled:!S.value},[ne("div",{id:C(p).substr(1),class:_t(["umo-editor-container",{"toolbar-classic":C(z)(C(K))&&C(K).mode==="classic","toolbar-ribbon":C(z)(C(K))&&C(K).mode==="ribbon","preview-mode":i.value.preview?.enabled,"laser-pointer":i.value.preview?.enabled&&i.value.preview?.laserPointer,"umo-editor-is-fullscreen":S.value,"umo-editor-is-typerwriter-runing":L.value,"umo-skin-default":n.value.skin==="default","umo-skin-modern":n.value.skin==="modern"}]),style:Ct({height:n.value.height,zIndex:S.value?n.value.fullscreenZIndex:"unset"})},[n.value.document?.readOnly?Kt("v-if",!0):(W(),zt("header",Qt,[(W(),oe(l,{key:C(he),onMenuChange:t[0]||(t[0]=b=>u("changed:menu",b))},kt({_:2},[Nt(n.value.toolbar?.menus,b=>({name:`toolbar_${b}`,fn:le(k=>[Ke(e.$slots,`toolbar_${b}`,Fe(qe(k)))])}))]),1024))])),ne("main",ea,[Ae(c,null,{bubble_menu:le(b=>[Ke(e.$slots,"bubble_menu",Fe(qe(b)))]),_:3})]),ne("footer",ta,[Ae(v)])],14,Yt)],8,["disabled"]))]),_:3},8,["global-config"])}}});export{Ea as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as t,resolveComponent as c,unref as e,openBlock as n,createBlock as r,withCtx as u,renderSlot as _,normalizeProps as a,guardReactiveProps as p,createCommentVNode as s}from"vue";import{BubbleMenu as d}from"@tiptap/vue-3/menus";const x={__name:"index",setup(f){const o=t("editor"),b=t("options");return(m,k)=>{const i=c("menus-bubble-menus");return e(o)?(n(),r(e(d),{key:0,class:"umo-editor-bubble-menu",editor:e(o)},{default:u(()=>[e(b)?.document?.enableBubbleMenu?(n(),r(i,{key:0},{bubble_menu:u(l=>[_(m.$slots,"bubble_menu",a(p(l)))]),_:3})):s("v-if",!0)]),_:3},8,["editor"])):s("v-if",!0)}}};export{x as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{inject as R,computed as Oe,getCurrentInstance as De,watch as Be,onMounted as Fe,onBeforeUnmount as _e,resolveComponent as Q,openBlock as z,createElementBlock as ee,Fragment as te,createVNode as ze,unref as h,normalizeStyle as We,normalizeClass as Ve,withDirectives as ne,createBlock as re,vShow as oe,createCommentVNode as K,withCtx as Ue,renderSlot as je,normalizeProps as qe,guardReactiveProps as Ke,nextTick as se}from"vue";import{u as ke}from"./state-X-ofkjhe.js";import Le,{migrateMathStrings as Xe}from"@tiptap/extension-mathematics";import{VueNodeViewRenderer as T,VueRenderer as Ge,posToDOMRect as Je,Editor as Ye,EditorContent as Ze}from"@tiptap/vue-3";import{t as P,l as Qe}from"./i18n-hQyxfD7_.js";import et from"@tiptap/extension-bold";import{Details as tt,DetailsContent as nt,DetailsSummary as rt}from"@tiptap/extension-details";import ot from"@tiptap/extension-document";import st from"@tiptap/extension-link";import{BulletList as at,ListItem as it,OrderedList as Te,TaskList as lt,TaskItem as ut}from"@tiptap/extension-list";import ct from"@tiptap/extension-node-range";import dt from"@tiptap/extension-subscript";import ft from"@tiptap/extension-superscript";import{TableOfContents as mt,getHierarchicalIndexes as pt}from"@tiptap/extension-table-of-contents";import{TextStyleKit as gt}from"@tiptap/extension-text-style";import xe from"@tiptap/extension-typography";import ht from"@tiptap/extension-unique-id";import{Selection as yt,UndoRedo as bt,Focus as Mt,TrailingNode as kt,Placeholder as Lt,CharacterCount as Tt,Dropcursor as xt}from"@tiptap/extensions";import At from"@tiptap/starter-kit";import{b as ae}from"./file-BwWjS162.js";import{s as $}from"./short-id-DJZHbKNv.js";import{Node as k,mergeAttributes as y,Mark as Ae,wrappingInputRule as Ct,Extension as C,nodeInputRule as Ce,nodePasteRule as wt}from"@tiptap/core";import St from"./node-view-DsQdaAj1.js";import{TextSelection as O,PluginKey as S,Plugin as H,NodeSelection as E,AllSelection as Ht}from"@tiptap/pm/state";import vt,{HardBreakNode as Nt,ParagraphNode as It,InvisibleNode as Rt}from"@tiptap/extension-invisible-characters";import $t from"./node-view-j1q0uEdL.js";import Pt from"@tiptap/extension-code-block-lowlight";import{createLowlight as Et,common as Ot}from"lowlight";import Dt from"./node-view-SsT-Zs6P.js";import{chainCommands as Bt,newlineInCode as Ft,createParagraphNear as _t,splitBlock as zt}from"@tiptap/pm/commands";import{keymap as Wt}from"@tiptap/pm/keymap";import{canSplit as Vt,liftTarget as Ut,ReplaceStep as jt}from"@tiptap/pm/transform";import{Decoration as we,DecorationSet as F}from"@tiptap/pm/view";import qt from"./node-view-CqFhGDvz.js";import Kt from"./node-view-CBjV65ug.js";import{F as Xt}from"./index-DB4X4foC.js";import{Fragment as B,Slice as Gt,DOMParser as Jt}from"@tiptap/pm/model";import Yt from"@tiptap/extension-horizontal-rule";import Zt from"./node-view-kqpt80Cn.js";import Qt from"@tiptap/extension-image";import Se from"./node-view-DhXzoQcA.js";import en from"@tiptap/extension-mention";import{computePosition as tn,shift as nn,flip as rn}from"@floating-ui/dom";import on from"./mentions-D1AaJTuX.js";import{u as sn}from"./dialog-BnThXCWu.js";import an from"./node-view-C-z3oj0k.js";import{g as ln}from"./selection-BIZq2qs_.js";import{Table as un}from"@tiptap/extension-table";import{TableCell as cn}from"@tiptap/extension-table/cell";import{TableHeader as dn}from"@tiptap/extension-table/header";import{TableRow as fn}from"@tiptap/extension-table/row";import mn from"./node-view-CsG70jor.js";import pn from"@tiptap/extension-text-align";import gn from"./node-view-D8s_W1o0.js";import hn from"./node-view-Cw1LtcLJ.js";import{T as yn,c as bn,a as Mn}from"./history-record-BccG7Xr0.js";import kn from"./node-view-BtvLsCIq.js";import{l as ie}from"./load-resource-DgkZV52W.js";import"@vueuse/core";import"@tool-belt/type-predicates";import"vue-i18n";import"./player-CIYSGQvp.js";import"tdesign-vue-next";import"pretty-bytes";import"es-drager";import"./cal-service-CTPNhNPR.js";import"./image-resizer-DI5dQsWL.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const Ln=k.create({name:"audio",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},file:{default:null},id:{default:null},name:{default:null},size:{default:null},src:{default:null},uploaded:{default:!1},previewType:{default:"audio"}}},parseHTML(){return[{tag:"audio"}]},renderHTML({HTMLAttributes:e}){return["audio",y(e)]},addNodeView(){return T(St)},addCommands(){return{setAudio:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),Tn=Ae.create({name:"bookmark",priority:1e3,keepOnSplit:!1,exitable:!0,addOptions(){return{bookmarkName:"",class:"umo-editor-bookmark"}},addAttributes(){return{bookmarkName:{default:"bookmarkName"},class:{default:this.options.class}}},parseHTML(){return[{tag:"bookmark"}]},renderHTML({HTMLAttributes:e}){return["bookmark",y(this.options,e),0]},addCommands(){return{setBookmark:e=>({chain:t,editor:n})=>{try{t().setMark(this.name,e).run();const{empty:r}=n.state.selection;return r&&e.bookmarkName&&t().focus().insertContent(e.bookmarkName).run(),!0}catch{return!1}},focusBookmark:e=>({editor:t,tr:n})=>{if(e){const r=t.view.dom.querySelector(`bookmark[bookmarkName="${e}"]`);if(r){r.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});const o=t.view.posAtDOM(r,0);n&&(n.setSelection(new O(n.doc.resolve(o))),t.view.dispatch(n),t.view.focus())}return!0}else return!1},getAllBookmarks:e=>({editor:t})=>{const n=[];try{const r=t.getHTML(),a=new DOMParser().parseFromString(r,"text/html").body.querySelectorAll(this.name),i=[];Array.from(a).forEach(l=>{if(l!==null){const u=l.getAttribute("bookmarkName");u&&!i.includes(u)&&(i.push(u),n.push({bookmarkRowId:$(),bookmarkRowName:u}))}})}catch{}return e(n),!0}}}});class xn extends Rt{constructor(){super({type:"paragraph",predicate:t=>["heading"].includes(t.type.name)})}}const An=vt.configure({injectCSS:!1,builders:[new Nt,new It,new xn]}),Cn=at.extend({content:"listItem*",addAttributes(){return{...this.parent?.(),listType:{default:"disc",parseHTML:e=>e.style.getPropertyValue("list-style-type")||"disc",renderHTML:({listType:e})=>({style:`list-style-type: ${e}`,"data-type":e})}}}}),wn=k.create({name:"callout",group:"block",content:"paragraph+",defining:!0,exitable:!0,selectable:!1,addAttributes(){return{type:{default:"primary"},icon:{default:"⭐️"},backgroundColor:{default:"rgb(217, 231, 255)"}}},parseHTML(){return[{tag:'div[data-type="callout"]'}]},renderHTML({HTMLAttributes:e}){return["div",y(e,{"data-type":"callout"}),0]},addNodeView(){return T($t)},addCommands(){return{insertCallout:e=>({chain:t,editor:n,tr:r,dispatch:o})=>{const{selection:s,schema:a}=n.state;if(!s.empty){let u=s.content().content;if(!this.type.validContent(u)){const f=n.state.doc.textBetween(s.from,s.to,`
|
|
2
|
+
`);u=a.nodes.paragraph.create(null,f?a.text(f):null).content}const c=this.type.create(e,u);return r.replaceSelectionWith(c,!1).scrollIntoView(),o&&o(r),!0}return t().insertContent({type:this.name,attrs:e,content:[{type:"paragraph",content:[]}]}).run()}}},addInputRules(){return[Ct({find:/^:::callout $/,type:this.type,getAttributes:e=>({type:e[1]})})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const{state:t,view:n}=e,{dispatch:r}=n,{selection:o}=t,{$from:s}=o,a=s.node(-1);if(a?.type.name==="callout"&&a.content.size<=2){const i=o.from+1,l=t.tr.insert(i,t.schema.nodes.paragraph.create());return l.setSelection(t.selection.constructor.near(l.doc.resolve(i))),r(l),!0}return!1}}}}),Sn=Pt.extend({addAttributes(){return{...this.parent?.(),language:{default:"plaintext"},theme:{default:"light"},textWrap:{default:!0}}},addNodeView(){return T(Dt)}}),Hn=Sn.configure({lowlight:Et(Ot),enableTabIndentation:!0,tabSize:2,defaultLanguage:"plaintext"}),vn=e=>{for(let{depth:t}=e;t>0;t--){const n=e.node(t);if(n.type.name==="column")return{node:n,depth:t}}return null},Nn=(e,t)=>{const{$cursor:n}=e.selection;if(!n||n.parent.content.size||n.node(n.depth-1).type.name==="column")return!1;if(n.depth>1&&n.after()!==n.end(-1)){const s=n.before();if(Vt(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}const r=n.blockRange(),o=r&&Ut(r);return o===null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},In=Wt({Enter:Bt(Ft,_t,Nn,zt),"Mod-a":(e,t,n)=>{const{selection:r}=e,{$from:o}=r,s=vn(o);if(s){const{depth:a}=s,i=o.start(a),l=o.end(a),u=e.tr.setSelection(O.create(e.doc,i,l));return t&&t(u),!0}return!1}}),A=new S("gridResizingPlugin");class W{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=t.getMeta(A);return n?typeof n.setHandle=="number"?new W(n.setHandle,!1):n.setDragging!==void 0?new W(this.activeHandle,n.setDragging):(this.activeHandle>-1&&t.docChanged,this):this}}const Rn=(e,t,n)=>{const r=t.composedPath().find(s=>s.classList?.contains("umo-node-column-container"));if(!r)return-1;const o=Array.from(r.children).filter(s=>s.classList.contains("umo-node-column"));for(let s=0;s<o.length;s++){const a=o[s],i=a.getBoundingClientRect();if(t.clientX>=i.right-n-2&&t.clientX<=i.right+10+n){const l=e.posAtDOM(a,0);if(l!==null)return l}}return-1},le=(e,t,n)=>{const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)},X=(e,t,n,r)=>{e.dispatch(e.state.tr.setNodeMarkup(t,void 0,{...n,colWidth:r-24}))},$n=(e,t)=>{const n=e.state.doc.resolve(t),r=n.parent;if(!r||r.type.name!=="column")return null;const o=e.domAtPos(n.pos);if(!o.node)return null;const s=o.node instanceof HTMLElement?o.node:o.node.childNodes[o.offset],a=s.offsetWidth;return{$pos:n,node:r,columnEl:s,domWidth:a}},He=(e,t)=>{e.dispatch(e.state.tr.setMeta(A,{setHandle:t}))},Pn=(e,t,n)=>{const r=A.getState(e.state);if(!r||r.dragging)return!1;const o=Rn(e,t,n);return o!==r.activeHandle&&He(e,o),!1},En=e=>{const t=A.getState(e.state);return t&&t.activeHandle>-1&&!t.dragging&&He(e,-1),!1},On=(e,t,n)=>{const r=A.getState(e.state);if(!r||r.activeHandle===-1||r.dragging)return!1;const o=$n(e,r.activeHandle);if(!o)return!1;const{domWidth:s,$pos:a,node:i}=o,l={...i.attrs||{}},u=a.before();e.dispatch(e.state.tr.setMeta(A,{setDragging:{startX:t.clientX,startWidth:s}}));const c=e.dom.ownerDocument.defaultView||window,f=d=>{c.removeEventListener("mouseup",f),c.removeEventListener("mousemove",m);const p=A.getState(e.state);if(!p?.dragging)return;const g=le(p.dragging,d,n);X(e,u,l,g),e.dispatch(e.state.tr.setMeta(A,{setDragging:null}))},m=d=>{if(!d.buttons){f(d);return}const p=A.getState(e.state);if(!p?.dragging)return;const g=le(p.dragging,d,n);X(e,u,l,g)};return c.addEventListener("mouseup",f),c.addEventListener("mousemove",m),X(e,u,l,s),t.preventDefault(),!0},Dn=(e,t)=>{const n=[];if(e.doc.resolve(t).nodeAfter!==null){const o=document.createElement("div");o.className="grid-resize-handle";const s=document.createElement("div");s.className="grid-resize-handle-circle-btn",o.appendChild(s);const a=document.createElement("div");a.className="grid-resize-handle-icon",s.appendChild(a),n.push(we.widget(t,o))}return F.create(e.doc,n)},Bn=(e,t)=>{const n=t.target;if(!n||n.className!=="grid-resize-handle-circle-btn"&&n.className!=="grid-resize-handle-icon")return!1;const r=n.closest(".umo-node-column");if(!r)return!1;const o=e.posAtDOM(r,0);if(!o)return!1;const s=e.state.doc.resolve(o),{state:a}=e;return e.dispatch(a.tr.insert(s.pos+s.parent.nodeSize-1,a.schema.nodes.column.create({colWidth:100},a.schema.nodes.paragraph.create()))),!0},Fn=e=>{const t=e?.handleWidth,n=e?.columnMinWidth;return new H({key:A,state:{init:()=>new W(-1,!1),apply:(r,o)=>o.apply(r)},props:{attributes:r=>{const o=A.getState(r);return o&&o.activeHandle>-1?{class:"umo-node-column-resize-cursor"}:{}},handleDOMEvents:{mousemove:(r,o)=>Pn(r,o,t),mouseleave:r=>En(r),mousedown:(r,o)=>On(r,o,n),mouseup:(r,o)=>Bn(r,o)},decorations:r=>{const o=A.getState(r);return!o||o.activeHandle===-1?null:Dn(r,o.activeHandle)}}})},_n=k.create({name:"column",group:"block",content:"block+",addAttributes(){return{colWidth:{default:200,parseHTML:e=>{const t=e.style.width.replace("px","");return Number(t)||200},renderHTML:e=>({style:e.colWidth?`width: ${e.colWidth}px;`:""})}}},parseHTML(){return[{tag:"div.umo-node-column"}]},renderHTML({HTMLAttributes:e}){return["div",y(e,{class:"umo-node-column"}),0]}}),zn=k.create({name:"columnContainer",group:"block",content:"column+",parseHTML(){return[{tag:"div.umo-node-column-container"}]},renderHTML({HTMLAttributes:e}){return["div",y(e,{class:"umo-node-column-container"}),0]}}),Wn=C.create({name:"columns",addExtensions(){return[_n,zn]},addCommands(){},addProseMirrorPlugins(){return[Fn({handleWidth:2,columnMinWidth:50}),In]}}),Vn=k.create({name:"datetime",group:"inline",inline:!0,atom:!0,selectable:!1,addAttributes(){return{type:{default:"datetime"},date:{default:null},text:{default:`[${P("insert.date")}]`},format:{default:null},withTime:{default:!1},capitalize:{default:!1}}},parseHTML(){return[{tag:'span[data-type="datetime"]'}]},renderHTML({HTMLAttributes:e}){return["span",y(e,{"data-type":"datetime"}),e.text]},addNodeView(){return T(qt)},addCommands(){return{insertDatetime:e=>({chain:t})=>t().insertContent({type:this.name,attrs:e}).run()}}}),Un=k.create({name:"echarts",inline:!1,group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},id:{default:null},name:{default:null},width:{default:null},height:{default:300},mode:{default:1},chartOptions:{default:null,parseHTML:e=>{const t=e.hasAttribute("chart-options")?e.getAttribute("chart-options"):null;return t?JSON.parse(t):null},renderHTML:e=>({"chart-options":e.chartOptions?JSON.stringify(e.chartOptions):null})},chartConfig:{default:null,parseHTML:e=>{const t=e.hasAttribute("chart-config")?e.getAttribute("chart-config"):null;return t?JSON.parse(t):null},renderHTML:e=>({"chart-config":e.chartConfig?JSON.stringify(e.chartConfig):null})},src:"",describe:{default:null}}},parseHTML(){return[{tag:"echarts"}]},renderHTML({HTMLAttributes:e}){return["echarts",y(e)]},addNodeView(){return T(Kt)},addCommands(){return{setEcharts:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e}),updateEcharts:e=>({commands:t,editor:n,tr:r})=>{n.commands.selectParentNode();const{selection:o}=n.state;r.setSelection(o);const{doc:s}=r,{from:a,to:i}=o;return s.nodesBetween(a,i,(l,u)=>l.type.name===this.name?(t.updateAttributes(this.name,e),!1):!0),!0}}}});function ue(e){e=e.toUpperCase();let t=0;const n={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3};let r=e.length,o=0;for(;r--;)n[e.charAt(r)]>=o?t+=n[e.charAt(r)]:t-=n[e.charAt(r)],o=n[e.charAt(r)];return t}function ce(e){const t=o=>o.toLowerCase().charCodeAt(0)-97+1;let n=0,r=e.length;for(;r--;){const o=Math.pow(26,e.length-r-1);n+=t(e.charAt(r))*o}return n}function Y(e){const t=e.parentNode;for(;e.firstChild;)t?.insertBefore(e.firstChild,e);t?.removeChild(e)}function Z(e){const t=e?.attributes.style?.value||"";return Object.fromEntries(t.split(";").map(n=>n.split(":").map(r=>r.trim())))}function ve(e){if(!e)return!1;const t=e.toLowerCase(),n=t.includes("microsoft-com")&&t.includes("office")||t.includes("urn:schemas-microsoft-com:office")||t.includes("class=mso")||t.includes('class="mso')||t.includes("mso-")||t.includes("w:worddocument"),r=t.includes("wps office")||t.includes("kingsoft")||t.includes("xmlns:wps")||t.includes('name="generator" content="wps');return n||r}function jn(e,t){const n=e.some(o=>o.type?.startsWith("image/")),r=/<(img\b|v:imagedata\b)/i.test(t||"");return n||r}function qn(e,t="[图片]"){if(!e)return e;let n=e;return n=n.replace(/<v:shape\b[^>]*>[\s\S]*?<v:imagedata[\s\S]*?<\/v:shape>/gi,t),n=n.replace(/<v:imagedata\b[^>]*\/?>/gi,t),n=n.replace(/<img\b[^>]*>/gi,t),n}function Ne(e){if(!e)return!1;const t=e.getData("text/html")||"";if(ve(t))return!0;const n=Array.from(e.types||[]);return n.includes("text/rtf")||n.includes("application/rtf")}const Kn=e=>{const{key:t,editor:n,onPaste:r,onDrop:o,allowedMimeTypes:s}=e;return new H({key:t||new S("file-handler"),props:{handleDrop(a,i){const{dataTransfer:l}=i;if(!o||!l?.files.length)return!1;const u=a.posAtCoords({left:i.clientX,top:i.clientY});let c=Array.from(l.files);return s.length>0&&(c=c.filter(f=>s.includes(f.type)?!0:s.includes(`${f.type.split("/")[0]}/*`))),c.length!==0?(o(n,c,u===null?void 0:u.pos),i.preventDefault(),i.stopPropagation(),!0):!1},handlePaste(a,i){const{clipboardData:l}=i;if(i.skipFileHandler||Ne(l)||!r||!l?.files.length)return!1;let u=Array.from(l.files);const c=l.getData("text/html");return s.length>0&&(u=u.filter(f=>s.includes(f.type)?!0:s.includes(`${f.type.split("/")[0]}/*`))),u.length!==0?(r(n,u,c),i.preventDefault(),i.stopPropagation(),!0):!1}}})},Xn=C.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:[]}),addProseMirrorPlugins(){return[Kn({key:new S(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}}),Gn=it.extend({name:"footnote",content(){return this.options.content},isolating:!0,defining:!0,draggable:!1,addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList",...this.parent?.(),content:"paragraph+"}},addAttributes(){return{id:{isRequired:!0},"data-fn-id":{isRequired:!0}}},parseHTML(){return[{tag:"li",getAttrs(e){return e.getAttribute("data-fn-id")?{"data-fn-id":e.getAttribute("data-fn-id")}:!1},priority:1e3}]},renderHTML({HTMLAttributes:e}){return["li",y(this.options.HTMLAttributes,e),0]},addCommands(){return{focusFootnote:e=>({editor:t,chain:n})=>{const r=t.$node("footnote",{"data-fn-id":e});return r?(n().focus().setTextSelection(r.from+r.content.size).run(),r.element.scrollIntoView(),!0):!1}}},addKeyboardShortcuts(){return{"Mod-a":({editor:e})=>{try{const{selection:t}=e.state,{$from:n}=t;for(let{depth:r}=n;r>=0;r--)if(n.node(r).type.name==="footnote"){const s=n.start(r),a=n.end(r);return e.commands.setTextSelection({from:s+1,to:a-1}),!0}return!1}catch{return!1}},Tab:({editor:e})=>{try{const{selection:t}=e.state,n=e.$pos(t.anchor);if(!n.after)return!1;if(n.after.node.type.name==="footnotes"){const r=n.after.node.child(0);return e.chain().setTextSelection(n.after.from+r.content.size).scrollIntoView().run(),!0}else{const r=t.$from.start(2);if(Number.isNaN(r))return!1;const o=e.$pos(r);return o.node.type.name!=="footnote"||!o.after?!1:(e.chain().setTextSelection(o.after.to-1).scrollIntoView().run(),!0)}}catch{return!1}},"Shift-Tab":({editor:e})=>{const{selection:t}=e.state,n=t.$from.start(2);if(Number.isNaN(n))return!1;const r=e.$pos(n);return r.node.type.name!=="footnote"||!r.before?!1:(e.chain().setTextSelection(r.before.to-1).scrollIntoView().run(),!0)}}}}),Jn=e=>{let t=1;const n=[];return e.doc.descendants((r,o)=>{if(r.type.name==="footnoteReference"){const s=`${t}`;r.attrs.referenceNumber!==s&&e.setNodeAttribute(o,"referenceNumber",s),n.push(r),t+=1}}),n},V=e=>String(e||"").replace(/\s+/g," ").trim(),Yn=e=>{const t=[];return e.content.descendants(n=>{if(n.type.name!=="paragraph")return;const r=V(n.textContent);r&&t.push(r)}),V(t.join(" "))},de=e=>{const t={};e.doc.descendants(r=>{if(r.type.name!=="footnote")return;const o=r.attrs?.["data-fn-id"];if(!o)return;const s=Yn(r);s&&(t[o]=s)});let n=!1;return e.doc.descendants((r,o)=>{if(r.type.name!=="footnoteReference")return;const s=r.attrs?.["data-fn-id"];if(!s)return;const a=t[s];a&&V(r.attrs?.caption)!==a&&(e.setNodeAttribute(o,"caption",a),n=!0)}),n},Zn=e=>{let t;const n=[];return e.doc.descendants((r,o)=>{if(r.type.name==="footnote")n.push(r);else if(r.type.name==="footnotes")t={from:o,to:o+r.nodeSize};else return!1}),{footnotesRange:t,footnotes:n}},Qn=e=>{if(!e||e.childCount!==1)return!1;const t=e.firstChild;return!t||t.type.name!=="paragraph"?!1:t.content.size===0},er=(e,t)=>{const n=Jn(e),r=t.schema.nodes.footnote,o=t.schema.nodes.footnotes,s=t.schema.nodes.paragraph,a=t.schema.nodeFromJSON({type:"paragraph",content:[]}),{footnotesRange:i,footnotes:l}=Zn(e),u=l.reduce((d,p)=>(d[p.attrs["data-fn-id"]]=p,d),{}),c=[],f=new Set(n.map(d=>d.attrs["data-fn-id"])),m=new Set;for(const d of l){const p=d.attrs["data-fn-id"];(!f.has(p)||m.has(p))&&(m.add(p),d.content.descendants(g=>{g.type.name==="footnoteReference"&&m.add(g.attrs["data-fn-id"])}))}for(let d=0;d<n.length;d++){const p=n[d],g=p.attrs["data-fn-id"];if(m.has(g))continue;const v=V(p.attrs?.caption);if(g in u){const N=u[g],L=v&&Qn(N)?B.from([s.create(void 0,t.schema.text(v))]):N.content;c.push(r.create({...N.attrs,id:`fn:${d+1}`},L))}else{const N=v?[s.create(void 0,t.schema.text(v))]:[a],L=r.create({"data-fn-id":g,id:`fn:${d+1}`},N);c.push(L)}}c.length===0?i&&e.delete(i.from,i.to):i?e.replaceWith(i.from+1,i.to-1,B.from(c)):e.insert(e.doc.content.size,o.create(void 0,B.from(c)))},tr=C.create({name:"footnoteRules",priority:1e3,addCommands(){return{syncFootnoteCaptions:()=>({state:e,dispatch:t})=>{const{tr:n}=e;return de(n)?(n.setMeta("addToHistory",!1),n.setMeta("footnoteAutoSync",!0),t?.(n),!0):!1}}},addProseMirrorPlugins(){return[new H({key:new S("footnoteRules"),filterTransaction(e){const{from:t,to:n}=e.selection;if(t===0&&n===e.doc.content.size)return!0;let r=!1,o=!1,s=0;return e.doc.nodesBetween(t,n,(i,l,u)=>{u?.type.name==="doc"&&i.type.name!=="footnotes"?o=!0:i.type.name==="footnote"?s+=1:i.type.name==="footnotes"&&(r=!0)}),!(o&&r)&&s<=1},appendTransaction(e,t,n){if(e.some(i=>i.getMeta("footnoteAutoSync"))||!e.some(i=>i.docChanged))return null;const r=n.tr;let o=!1;for(const i of e)if(i.docChanged)for(const l of i.steps){if(!(l instanceof jt))continue;const u=l.from!==l.to;l.slice.size>0&&l.slice.content.descendants(f=>{if(f?.type.name==="footnoteReference")return o=!0,!1}),u&&!o&&i.before.nodesBetween(l.from,Math.min(i.before.content.size,l.to),f=>{if(f.type.name==="footnoteReference")return o=!0,!1})}let s=!1;return o&&(er(r,n),s=!0),de(r)&&(s=!0),s?(r.setMeta("footnoteAutoSync",!0),r):null}})]}}),nr=Te.extend({name:"footnotes",group:"",isolating:!0,defining:!0,draggable:!1,content(){return"footnote*"},addAttributes(){return{class:{default:"umo-node-footnotes"}}},parseHTML(){return[{tag:"ol.umo-node-footnotes",priority:1e3}]},addKeyboardShortcuts(){return{}},addCommands(){return{}},addInputRules(){return[]},addExtensions(){return[tr]}}),fe="data-ref-num",G="umo-node-footnote-ref",rr=e=>String(e||"").replace(/\s+/g," ").trim(),or=k.create({name:"footnoteReference",inline:!0,content:"text*",group:"inline",atom:!0,draggable:!0,parseHTML(){return[{tag:"sup",priority:1e3,getAttrs(e){const t=e.querySelector(`a.${G}:first-child`);if(!t)return!1;const n=t.getAttribute("data-fn-id"),r=t.getAttribute(fe);return{"data-fn-id":n||$(10),referenceNumber:r||t.innerText}},contentElement(e){return e.firstChild}}]},addAttributes(){return{class:{default:G},"data-fn-id":{renderHTML(e){return{"data-fn-id":e["data-fn-id"]||$(10)}}},referenceNumber:{},caption:{default:""},href:{renderHTML(e){return{href:`#fn:${e.referenceNumber}`}}}}},renderHTML({HTMLAttributes:e}){const{referenceNumber:t,...n}=e,r=y(this.options.HTMLAttributes,n);return r[fe]=t,["sup",{id:`fnref:${t}`},["a",r,`[${e.referenceNumber}]`]]},addProseMirrorPlugins(){const{editor:e}=this,t=n=>{if(n.type.name===this.name){const r={...n.attrs,"data-fn-id":$(10)};return n.type.create(r,n.content,n.marks)}if(n.content&&n.content.size>0){const r=[];let o=!1;if(n.content.forEach(s=>{const a=t(s);a!==s&&(o=!0),r.push(a)}),o)return n.copy(B.from(r))}return n};return[new H({key:new S("footnotePasteHandler"),props:{transformPasted(n){const r=[];let o=!1;return n.content.forEach(s=>{const a=t(s);a!==s&&(o=!0),r.push(a)}),o?new Gt(B.from(r),n.openStart,n.openEnd):n}}}),new H({key:new S("footnoteRefClick"),props:{handleDoubleClickOn(n,r,o,s,a){if(o.type.name!=="footnoteReference")return!1;a.preventDefault();const i=o.attrs["data-fn-id"];return e.commands.focusFootnote(i)},handleClickOn(n,r,o,s,a){if(o.type.name!=="footnoteReference")return!1;a.preventDefault();const{selection:i}=e.state.tr;if(i instanceof E&&i.node.eq(o)){const l=o.attrs["data-fn-id"];return e.commands.focusFootnote(l)}else return e.chain().setNodeSelection(s).run(),!0}}}),new H({key:new S("footnoteRefHoverTitle"),props:{handleDOMEvents:{mouseover(n,r){const o=r?.target;if(!(o instanceof Element))return!1;const s=o.closest(`a.${G}`);if(!s)return!1;const a=s.getAttribute("data-fn-id");if(!a)return!1;const i=e.$node("footnote",{"data-fn-id":a}),l=rr(i?.node?.textContent);return l&&s.setAttribute("caption",l),!1}}}})]},addCommands(){return{addFootnote:()=>({state:e,tr:t})=>{const n=this.type.create({"data-fn-id":$(10)});return t.insert(e.selection.anchor,n),!0}}},addInputRules(){return[{find:/\[\^(.*?)\]/,type:this.type,undoable:!0,handler({range:e,match:t,chain:n}){const r=e.from,o=e.to;t[1]&&n().deleteRange({from:r,to:o}).addFootnote().run()}}]}}),sr=C.create({name:"painter",addCommands(){return{setFormatPainter:e=>({editor:t,view:n})=>{const{tr:r}=n.state,o=t.state.selection.$head.marks();return n.painter={enabled:!0,once:e,marks:o},n.dispatch(r.setMeta("painterAction",{type:"start",marks:o})),!0},unsetFormatPainter:()=>({view:e})=>{const{tr:t}=e.state;return e.painter={enabled:!1,once:!0,marks:[]},e.dispatch(t.setMeta("painterAction",{type:"end"})),!0}}},addProseMirrorPlugins(){return[new H({key:new S("format-painter"),state:{init:()=>[],apply(e,t){const n=e.getMeta("painterAction");return n?.type==="start"?n.marks:n?.type==="end"?[]:t}},props:{handleDOMEvents:{mousedown(e){const t=this.getState(e.state),{painter:n}=e;if(!t||t.length===0)return!1;const r=()=>{if(document.removeEventListener("mouseup",r),!n.enabled)return;const{dispatch:o}=e;let{tr:s,selection:a}=e.state;s=s.removeMark(a.from,a.to);for(const i of t)i.type.name!=="link"&&(s=s.addMark(a.from,a.to,i));n.once?(n.enabled=!1,n.marks=[],o(s.setMeta("painterAction",{type:"end"}))):o(s.setMeta("painterAction",{type:"start",marks:n.marks}))};return document.addEventListener("mouseup",r),!0}}}})]}}),ar=Yt.extend({addOptions(){return{HTMLAttributes:{class:"umo-page-divider","data-line-number":!1}}},parseHTML(){return[{tag:"hr"}]},addAttributes(){return{"data-type":{parseHTML:e=>e.getAttribute("data-type")||"single"},color:{parseHTML:e=>e.getAttribute("data-color"),renderHTML:e=>({"data-color":e.color,style:`color: ${e.color||"inherit"}`})}}},addCommands(){return{setHorizontalRule:({type:e,color:t})=>({chain:n,state:r})=>{const{$to:o}=r.selection,s=n();return o.parentOffset===0?s.insertContentAt(Math.max(o.pos-2,0),{type:this.name,attrs:{"data-type":e,color:t}}):s.insertContent({type:this.name,attrs:{"data-type":e,color:t}}),s.command(({tr:a,dispatch:i})=>{if(i){const{$to:l}=a.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?a.setSelection(O.create(a.doc,l.pos+1)):l.nodeAfter.isBlock?a.setSelection(E.create(a.doc,l.pos)):a.setSelection(O.create(a.doc,l.pos));else{const c=l.parent.type.contentMatch.defaultType?.create();c&&(a.insert(u,c),a.setSelection(O.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Ce({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),ir=k.create({name:"iframe",inline:!1,group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},type:{default:0},src:{default:null},width:{default:null},height:{default:200},clickable:{default:!1}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",y(e)]},addNodeView(){return T(Zt)},addCommands(){return{setIframe:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),me=(e,t)=>{const n=e.style?.[t],r=e.getAttribute(t),o=n||r;if(!o)return null;const s=String(o).trim();return/^\d+(\.\d+)?px$/i.test(s)||/^\d+(\.\d+)?$/.test(s)?Number.parseFloat(s):null},Ie=Qt.extend({atom:!0,selectable:!0,addAttributes(){return{vnode:{default:!0},type:{default:"image"},name:{default:null},size:{default:null},id:{default:null},src:{default:null},config:{default:null},content:{default:null},width:{default:null,parseHTML:e=>me(e,"width"),renderHTML:e=>e.width?{width:e.width}:{}},height:{default:null,parseHTML:e=>me(e,"height"),renderHTML:e=>e.height?{height:e.height}:{}},left:{default:0},top:{default:0},angle:{default:null},draggable:{default:!1},rotatable:{default:!1},equalProportion:{default:!0},flipX:{default:!1},flipY:{default:!1},uploaded:{default:!1},error:{default:!1},previewType:{default:"image"},inline:{default:!1}}},parseHTML(){return[{tag:"img"}]},addPasteRules(){return[...this.parent?.()||[],wt({find:/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"([^"]+)"?)?\)/g,type:this.type,getAttributes:e=>{const[,t,n,r]=e;return{src:n,alt:t,title:r}}})]},addInputRules(){return[...this.parent?.()||[],Ce({find:/!\[([\S]+)\]\(([^)\s]+)(?:\s+"([\S]+)"?)?\)/g,type:this.type,getAttributes:e=>{const[,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),Re=Ie.extend({addNodeView(){return T(Se)},addCommands(){return{setImage:(e,t)=>({commands:n,editor:r})=>t?n.insertContent({type:this.name,attrs:{...e,inline:!1}}):n.insertContentAt(r.state.selection.anchor,{type:this.name,attrs:{...e,inline:!1}})}}}),lr=Ie.extend({name:"inlineImage",inline:!0,group:"inline",addAttributes(){return{...this.parent?.(),inline:{default:!0},equalProportion:{default:!1},width:{default:150},height:{default:80}}},parseHTML(){return[{tag:"inline-img"}]},renderHTML({HTMLAttributes:e}){return["inline-img",y(e)]},addNodeView(){return T(Se)},addCommands(){return{setInlineImage:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:{...e,inline:!0}})}}}),U="em",pe=(e,t=U)=>{if(typeof e=="number")return Number.isFinite(e)?{value:e,unit:t}:null;if(typeof e!="string")return null;const n=e.trim().match(/^(-?[\d.]+)\s*([a-z%]*)$/i);if(!n)return null;const r=Number.parseFloat(n[1]);return Number.isFinite(r)?{value:r,unit:n[2]||t}:null},ur=(e,t=U)=>{if(typeof e!="string")return null;const n=e.trim().match(/^(-?[\d.]+)\s*([a-z%]*)$/i);if(!n)return null;const r=Number.parseFloat(n[1]);return Number.isFinite(r)?{value:r,unit:n[2]||t}:null},cr=C.create({name:"indent",addOptions(){return{types:["heading","listItem","taskItem","paragraph"],minLevel:0,maxLevel:20,indentSize:2,defaultUnit:U}},addGlobalAttributes(){const e=()=>pe(this.options.indentSize,this.options.defaultUnit),t=n=>{const r=e();return r?ur(n.style.textIndent,r.unit):null};return[{types:this.options.types,attributes:{indent:{default:null,renderHTML:n=>{const{indent:r,indentUnit:o}=n,{minLevel:s}=this.options;if(!r||r<=s)return{};const a=e();return a?{style:`text-indent: ${r*a.value}${o||a.unit};`}:{}},parseHTML:n=>{const r=t(n),o=e();if(!r||!o?.value)return null;const s=Math.round(r.value/o.value);return s>this.options.minLevel?s:null}},indentUnit:{default:null,renderHTML:()=>({}),parseHTML:n=>{const r=t(n),o=e();return!r||!o?.value?null:Math.round(r.value/o.value)>this.options.minLevel?r.unit:null}}}}]},addCommands(){const e=()=>pe(this.options.indentSize,this.options.defaultUnit),t=s=>{const a=e();return a?!s||s===a.unit:!0},n=(s,a,i)=>{const l=s.doc.nodeAt(a);if(!l)return s;const u=(l.attrs.indent||0)+i,{minLevel:c,maxLevel:f}=this.options;let m=u;if(u<c&&(m=c),u>f&&t(l.attrs.indentUnit)&&(m=f),m!==l.attrs.indent){const d={...l.attrs};delete d.indent,delete d.indentUnit;const p=e(),g=m>c?{...d,indent:m,indentUnit:l.attrs.indentUnit||p?.unit||U}:d;return s.setNodeMarkup(a,l.type,g,l.marks)}return s},r=(s,a)=>{const{doc:i,selection:l}=s;if(l instanceof O||l instanceof Ht){const{from:u,to:c}=l;i.nodesBetween(u,c,(f,m)=>this.options.types.includes(f.type.name)?(s=n(s,m,a),!1):!0)}return s},o=s=>()=>({tr:a,state:i,dispatch:l})=>(a.setSelection(i.selection),a=r(a,s),a.docChanged?(l&&l(a),!0):!1);return{setIndent:o(1),setOutdent:o(-1)}},addKeyboardShortcuts(){return{Tab:()=>this.editor.isActive("bulletList")||this.editor.isActive("orderedList")?this.editor.commands.sinkListItem("listItem"):this.editor.isActive("taskList")?this.editor.commands.sinkListItem("taskItem"):this.editor.commands.setIndent(),"Shift-Tab":()=>this.editor.isActive("bulletList")||this.editor.isActive("orderedList")?this.editor.commands.liftListItem("listItem"):this.editor.isActive("taskList")?this.editor.commands.liftListItem("taskItem"):this.editor.commands.setOutdent()}}}),dr=Ae.create({name:"letterSpacing",addOptions(){return{types:["textStyle"]}},addAttributes(){return{spacing:{default:null,parseHTML:e=>e.style.letterSpacing?.replace(/['"]+/g,""),renderHTML:e=>e.spacing?{style:`letter-spacing: ${e.spacing}`}:{}}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.style.letterSpacing?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",y(this.options.HTMLAttributes,e),0]},addCommands(){return{setLetterSpacing:e=>({chain:t})=>t().setMark(this.name,{spacing:e}).run(),unsetLetterSpacing:()=>({chain:e})=>e().unsetMark(this.name).run()}}}),fr=C.create({name:"lineHeight",addOptions(){return{types:["heading","paragraph"],defaultLineHeight:1.75}},findClosestTargetNode(e,t){const{selection:n}=e;if(n instanceof E){const{node:o}=n;if(o&&t.includes(o.type.name))return{node:o,pos:n.from}}const{$from:r}=n;for(let{depth:o}=r;o>0;o-=1){const s=r.node(o);if(t.includes(s.type.name))return{node:s,pos:r.before(o)}}return null},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultLineHeight,parseHTML:e=>e.style.lineHeight||this.options.defaultLineHeight,renderHTML:e=>e.lineHeight===this.options.defaultLineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>({editor:t,state:n,dispatch:r})=>{const o=this.options.types.filter(i=>t.schema.nodes[i]);let{tr:s}=n,a=!1;if(n.doc.nodesBetween(n.selection.from,n.selection.to,(i,l)=>{if(o.includes(i.type.name)){if(i.attrs.lineHeight===e){a=!0;return}s=s.setNodeMarkup(l,void 0,{...i.attrs,lineHeight:e}),a=!0}}),!a){const i=this.findClosestTargetNode(n,o);if(!i)return!1;if(i.node.attrs.lineHeight===e)return!0;s=s.setNodeMarkup(i.pos,void 0,{...i.node.attrs,lineHeight:e}),a=!0}return r&&s.docChanged&&r(s),a},unsetLineHeight:()=>({editor:e,state:t,dispatch:n})=>{const{defaultLineHeight:r}=this.options,o=this.options.types.filter(i=>e.schema.nodes[i]);let{tr:s}=t,a=!1;if(t.doc.nodesBetween(t.selection.from,t.selection.to,(i,l)=>{if(o.includes(i.type.name)){if(i.attrs.lineHeight===r){a=!0;return}s=s.setNodeMarkup(l,void 0,{...i.attrs,lineHeight:r}),a=!0}}),!a){const i=this.findClosestTargetNode(t,o);if(!i)return!1;if(i.node.attrs.lineHeight===r)return!0;s=s.setNodeMarkup(i.pos,void 0,{...i.node.attrs,lineHeight:r}),a=!0}return n&&s.docChanged&&n(s),a}}}}),j=e=>{if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?String(e):null;if(typeof e!="string")return null;const t=e.trim().replace(/px$/i,"");if(!t)return null;const n=Number.parseFloat(t);return Number.isFinite(n)?String(n):null},J=e=>{if(!e||typeof e!="object")return null;const t=j(e.top),n=j(e.bottom),r={};return t!==null&&t!==""&&t!=="0"&&(r.top=t),n!==null&&n!==""&&n!=="0"&&(r.bottom=n),Object.keys(r).length?r:null},ge=(e,t)=>{if(!e&&!t)return!0;if(!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=e.top||null,r=t.top||null,o=e.bottom||null,s=t.bottom||null;return n===r&&o===s},he=(e,t)=>{const{selection:n}=e;if(n instanceof E){const{node:o}=n;if(o&&t.includes(o.type.name))return{node:o,pos:n.from}}const{$from:r}=n;for(let{depth:o}=r;o>0;o-=1){const s=r.node(o);if(t.includes(s.type.name))return{node:s,pos:r.before(o)}}return null},mr=C.create({name:"margin",addOptions(){return{types:["heading","paragraph","audio","codeBlock","file","iframe","image","toc","video","horizontalRule","table","bulletList","orderedList","taskList","echarts","callout","columns","blockMath","codeBlock"],margin:{top:0,bottom:0}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{margin:{default:null,parseHTML:e=>{const{marginTop:t,marginBottom:n}=e.style;if(t===""&&n===""||t==="0px"&&n==="0px")return null;const r={};if(t&&t!=="0px"){const o=j(t.replace(/px/g,""));o!==null&&o!==""&&o!=="0"&&(r.top=o)}if(n&&n!=="0px"){const o=j(n.replace(/px/g,""));o!==null&&o!==""&&o!=="0"&&(r.bottom=o)}return Object.keys(r).length?r:null},renderHTML:e=>{const{margin:t}=e;if(!t||typeof t!="object")return{};const{top:n,bottom:r}=t;let o="";return n!=null&&n!==""&&(o+=`margin-top: ${n}px;`),r!=null&&r!==""&&(o+=`margin-bottom: ${r}px;`),o?{style:o}:{}}}}}]},addCommands(){return{setMargin:e=>({editor:t,state:n,dispatch:r})=>{const o=this.options.types.filter(l=>t.schema.nodes[l]),s=J(e);if(!s)return t.commands.unsetMargin();let{tr:a}=n,i=!1;if(n.doc.nodesBetween(n.selection.from,n.selection.to,(l,u)=>{if(!o.includes(l.type.name))return;const c=l.attrs.margin&&typeof l.attrs.margin=="object"?l.attrs.margin:null,f=J({...c,...s});if(ge(c,f)){i=!0;return}a=a.setNodeMarkup(u,void 0,{...l.attrs,margin:f}),i=!0}),!i){const l=he(n,o);if(!l)return!1;const u=l.node.attrs.margin&&typeof l.node.attrs.margin=="object"?l.node.attrs.margin:null,c=J({...u,...s});if(ge(u,c))return!0;a=a.setNodeMarkup(l.pos,void 0,{...l.node.attrs,margin:c}),i=!0}return r&&a.docChanged&&r(a),i},unsetMargin:()=>({editor:e,state:t,dispatch:n})=>{const r=this.options.types.filter(a=>e.schema.nodes[a]);let{tr:o}=t,s=!1;if(t.doc.nodesBetween(t.selection.from,t.selection.to,(a,i)=>{if(!r.includes(a.type.name))return;const l=a.attrs.margin;if(!l||typeof l=="object"&&!Object.keys(l).length){s=!0;return}o=o.setNodeMarkup(i,void 0,{...a.attrs,margin:null}),s=!0}),!s){const a=he(t,r);if(!a)return!1;const i=a.node.attrs.margin;if(!i||typeof i=="object"&&!Object.keys(i).length)return!0;o=o.setNodeMarkup(a.pos,void 0,{...a.node.attrs,margin:null}),s=!0}return n&&o.docChanged&&n(o),s}}}}),pr=en.extend({addOptions(){return{...this.parent?.(),HTMLAttributes:{class:"umo-node-mention"}}},addAttributes(){return{id:{default:null},label:{default:null}}},addCommands(){return{insertMention:()=>({commands:e})=>e.insertContent(` ${this.options?.suggestion?.char||"@"}`)}}}),ye=(e,t)=>{tn({getBoundingClientRect:()=>Je(e.view,e.state.selection.from,e.state.selection.to)},t,{placement:"bottom-start",strategy:"absolute",middleware:[nn(),rn()]}).then(({x:r,y:o,strategy:s})=>{t.style.width="max-content",t.style.position=s,t.style.left=`${r}px`,t.style.top=`${o}px`})},gr=(e,t)=>({items:({query:n})=>e.filter(r=>r.label.includes(n)).slice(0,10),command:({editor:n,range:r,props:o})=>{n.chain().focus().deleteRange(r).insertContent({type:"mention",attrs:{id:o.id,label:o.label}}).run()},render:()=>{let n;return{onStart:r=>{n=new Ge(on,{props:r,editor:r.editor}),r.clientRect&&(n.element.style.position="absolute",document.body.appendChild(n.element),ye(r.editor,n.element))},onUpdate(r){n.updateProps(r),r.clientRect&&ye(r.editor,n.element)},onKeyDown(r){return r.event.key==="Escape"?(n.destroy(),!0):n.ref?.onKeyDown(r)},onExit(){n.element.remove(),n.destroy()}}}}),be=(e,t)=>{const{selection:n}=e;if(n instanceof E){const{node:o}=n;if(o&&t.includes(o.type.name))return{node:o,pos:n.from}}const{$from:r}=n;for(let{depth:o}=r;o>0;o-=1){const s=r.node(o);if(t.includes(s.type.name))return{node:s,pos:r.before(o)}}return null},hr=C.create({name:"nodeAlign",addOptions(){return{defaultAlignment:"center",alignments:["flex-start","center","flex-end"],types:["image","video","audio","iframe","file","echarts"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{nodeAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.justifyContent||this.options.defaultAlignment,renderHTML:e=>({style:`justify-content: ${e.nodeAlign}`})}}}]},addCommands(){return{setNodeAlign:e=>({editor:t,state:n,dispatch:r})=>{if(!this.options.alignments.includes(e))return!1;const o=this.options.types.filter(i=>t.schema.nodes[i]);let{tr:s}=n,a=!1;if(n.doc.nodesBetween(n.selection.from,n.selection.to,(i,l)=>{if(o.includes(i.type.name)){if(i.attrs.nodeAlign===e){a=!0;return}s=s.setNodeMarkup(l,void 0,{...i.attrs,nodeAlign:e}),a=!0}}),!a){const i=be(n,o);if(!i)return!1;if(i.node.attrs.nodeAlign===e)return!0;s=s.setNodeMarkup(i.pos,void 0,{...i.node.attrs,nodeAlign:e}),a=!0}return r&&s.docChanged&&r(s),a},unsetNodeAlign:()=>({editor:e,state:t,dispatch:n})=>{const{defaultAlignment:r}=this.options,o=this.options.types.filter(i=>e.schema.nodes[i]);let{tr:s}=t,a=!1;if(t.doc.nodesBetween(t.selection.from,t.selection.to,(i,l)=>{if(o.includes(i.type.name)){if(i.attrs.nodeAlign===r){a=!0;return}s=s.setNodeMarkup(l,void 0,{...i.attrs,nodeAlign:r}),a=!0}}),!a){const i=be(t,o);if(!i)return!1;if(i.node.attrs.nodeAlign===r)return!0;s=s.setNodeMarkup(i.pos,void 0,{...i.node.attrs,nodeAlign:r}),a=!0}return n&&s.docChanged&&n(s),a}}}}),yr=C.create({name:"selectNode",addOptions(){return{types:["horizontalRule","pageBreak","blockMath","inlineMath"]}},addProseMirrorPlugins(){const{types:e}=this.options;return[new H({key:new S("select-node"),props:{handleDOMEvents:{click(t,n){const{state:r,dispatch:o}=t,s=t.posAtCoords({left:n.clientX,top:n.clientY});if(!s)return!1;const a=s.inside>=0?s.inside:s.pos,i=r.doc.nodeAt(a);if(!i||!e.includes(i.type.name))return!1;const l=E.create(r.doc,a);return o(r.tr.setSelection(l)),t.focus(),!0}}}})]}}),br=e=>{const n=new DOMParser().parseFromString(e,"text/html");return n.querySelectorAll('[style*="mso-bookmark:"]').forEach(o=>{const s=Z(o)["mso-bookmark"],a=n.querySelector(`a[name="${s}"]`);a&&Y(a),Y(o)}),n.documentElement.outerHTML},Mr=e=>{const t={};return e.split(";").map(r=>r.trim()).filter(Boolean).forEach(r=>{const[o,s]=r.split(":").map(a=>a.trim());o&&s&&(t[o]=s)}),t},kr=e=>{const t=/\.(\w+)\s*\{([^}]+)\}/g;let n;const r={};for(;(n=t.exec(e))!==null;){const[,o,s]=n,a=Mr(s);r[o]=a}return r},Lr=(e,t)=>{if(!t)return!1;const{clipboardData:n}=t;if(!n)return!1;const r=n.getData("text/html");if(!r)return!1;const s=new DOMParser().parseFromString(r,"text/html");if(!s?.querySelector("html")?.getAttribute("xmlns:x")?.includes("office:excel"))return!1;const i=s.querySelector("table");if(!i)return!1;const l=Array.from(s.head.querySelectorAll("style")).map(d=>d.textContent).join(`
|
|
3
|
+
`),u=kr(l);i.querySelectorAll("td, th").forEach(d=>{const p=u[d.getAttribute("class")];p?.background&&(d.style.background=p.background),p?.color&&(d.style.color=p.color),p?.["text-align"]&&d.setAttribute("align",p["text-align"])});const{schema:c}=e.state,f=Jt.fromSchema(c).parse(i),m=e.state.tr.replaceSelectionWith(f);return e.dispatch(m),!0},Tr=e=>{const n=new DOMParser().parseFromString(e,"text/html");return n.querySelectorAll('p[class*="MsoNormal"]').forEach(r=>{r.classList.remove("MsoNormal")}),n.documentElement.outerHTML},xr=e=>{const n=new DOMParser().parseFromString(e,"text/html");return n.querySelectorAll('[class*="MsoLineNumber"]').forEach(o=>Y(o)),n.documentElement.outerHTML},Ar=e=>{if(e.indexOf("mso-list:")===-1)return e;const n=new DOMParser().parseFromString(e,"text/html");let r=[],o;return n.querySelectorAll('p[style*="mso-list:"]').forEach(a=>{const i=a,[l,u]=Sr(Z(i)["mso-list"]);for(o!==l&&(Cr(i)||u===1)&&(o=l,r=[]);u>r.length;){const c=vr(i);r.length>0?r[r.length-1].appendChild(c):i.before(c),r.push(c)}for(;u<r.length;)r.pop();r[r.length-1].appendChild(wr(i)),i.remove()}),n.documentElement.outerHTML},Cr=e=>!e.previousElementSibling||!(e.previousElementSibling.nodeName==="OL"||e.previousElementSibling.nodeName==="UL"),wr=e=>{const t=document.createElement("li");return t.innerHTML=e.innerHTML.replace($e,""),t},Sr=e=>{const n=e.split(" "),r=n.find(s=>/l[0-9]+/.test(s))||"",o=+(n.find(s=>s.startsWith("level"))?.substring(5)||1);return[r,o]},$e=/<!--\[if \!supportLists\]-->((.|\n)*)<!--\[endif\]-->/m,Hr=e=>{const t=e.innerHTML.match($e);return t?.length&&new DOMParser().parseFromString(t[0],"text/html").body.querySelector("span")?.textContent||""},vr=e=>{const t=Nr(Hr(e)),n=document.createElement(t.type);return t.countType&&n.setAttribute("type",t.countType),t.start>1&&n.setAttribute("start",t.start.toString()),n},D={number:/[0-9]+\./,romanLower:/(?=[mdclxvi])m*(c[md]|d?c*)(x[cl]|l?x*)(i[xv]|v?i*)\./,romanUpper:/(?=[MDCLXVI])M*(C[MD]|D?C*)(X[CL]|L?X*)(I[XV]|V?I*)\./,letterLower:/[a-z]+\./,letterUpper:/[A-Z]+\./},Nr=e=>{let t="ul",n=null,r=1,o;return(o=e.match(D.number))?(t="ol",r=+o[0].replace(".","")):(o=e.match(D.romanLower))?(t="ol",n="i",r=+ue(o[0].replace(".",""))):(o=e.match(D.romanUpper))?(t="ol",n="I",r=+ue(o[0].replace(".",""))):(o=e.match(D.letterLower))?(t="ol",n="a",r=+ce(o[0].replace(".",""))):(o=e.match(D.letterUpper))&&(t="ol",n="A",r=+ce(o[0].replace(".",""))),{type:t,start:r,countType:n}},Ir=e=>{e=e.replace(/<o:p>(.*?)<\/o:p>/g,"");const n=new DOMParser().parseFromString(e,"text/html");return n.querySelectorAll('[style*="mso-"]').forEach(r=>{const o=Z(r),s=[];for(const a of Object.keys(o))a&&!a.startsWith("mso-")&&s.push(`${a}: ${o[a]}`);r.setAttribute("style",s.join(";"))}),n.querySelectorAll('[style*="color: black"]').forEach(r=>{r.style.removeProperty("color")}),n.documentElement.outerHTML},Rr=()=>new H({key:new S("office-paste"),props:{transformPastedHTML(e){if(ve(e)){const t=`<span style="color: var(--umo-error-color, #e34d59);">${P("officePaste.imagePlaceholder")}</span>`;e=Ar(e),e=br(e),e=Ir(e),e=Tr(e),e=xr(e),e=qn(e,t)}return e},handlePaste(e,t){const n=t?.clipboardData,r=n?.getData("text/html")||"",o=Array.from(n?.files||[]),s=Ne(n),a=jn(o,r);if(t&&s){if(a){const i=sn({width:400,theme:"warning",header:P("officePaste.dialog.title"),body:P("officePaste.dialog.body"),onConfirm:()=>{i.destroy()}})}t.skipFileHandler=!0}return Lr(e,t)}}}),$r=C.create({priority:99999,name:"officePaste",addProseMirrorPlugins(){return[Rr()]}}),Pr=k.create({name:"optionBox",group:"inline",inline:!0,atom:!0,addAttributes(){return{target:{default:"checkbox"},items:{default:[],parseHTML:e=>{const t=e.hasAttribute("items")?e.getAttribute("items"):null;return t?JSON.parse(t):null},renderHTML:e=>({items:e.items?JSON.stringify(e.items):null})},checkAll:{default:!1},checked:{default:!0},updated:{default:!1}}},parseHTML(){return[{tag:'span[data-type="option-box"]'}]},renderHTML({HTMLAttributes:e}){const t=e.items||"";return["span",y(e,{"data-type":"option-box"}),t]},addNodeView(){return T(an)},addCommands(){return{insertOptionBox:e=>({chain:t,editor:n})=>{const{to:r}=n?.state?.selection||{};return t().insertContentAt(r-1,{type:this.name,attrs:e}).run()},updateOptionBox:e=>({commands:t})=>t.updateAttributes(this.name,e)}}}),Er=Te.extend({content:"listItem*",addAttributes(){return{...this.parent?.(),listType:{default:"decimal",parseHTML:e=>e.style.getPropertyValue("list-style-type")||"decimal",renderHTML:({listType:e})=>({style:`list-style-type: ${e}`,"data-type":e})},start:{default:1,parseHTML:e=>{const t=e.getAttribute("data-start");return t?Number(t):1},renderHTML:e=>e["data-start"]===1?{}:{"data-start":e.start}}}}}),Or=k.create({name:"pageBreak",group:"block",addOptions(){return{HTMLAttributes:{class:"umo-page-break","data-line-number":!1},getContentLabel:()=>P("page.break")}},parseHTML(){return[{tag:'div[class*="umo-page-break"]'}]},renderHTML({HTMLAttributes:e}){return["div",y(this.options.HTMLAttributes,e,{"data-content":this.options.getContentLabel()})]},addCommands(){return{setPageBreak:()=>({commands:e})=>e.insertContent({type:this.name})}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setPageBreak()}}}),Dr=(e,t,n)=>RegExp(t?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e,n?"gu":"gui"),Br=(e,t,n,r)=>{const o=[],s=[];let a=[],i=0;if(!t)return{decorationsToReturn:F.empty,results:[]};e?.descendants((l,u)=>{l.isText?a[i]?a[i]={text:a[i].text+l.text,pos:a[i].pos}:a[i]={text:`${l.text}`,pos:u}:i+=1}),a=a.filter(Boolean);for(const l of a){const{text:u,pos:c}=l,f=Array.from(u.matchAll(t)).filter(([m])=>m.trim());for(const m of f){if(m[0]==="")break;m.index!==void 0&&s.push({from:c+m.index,to:c+m.index+m[0].length})}}for(let l=0;l<s.length;l+=1){const u=s[l],c=l===r?`${n} ${n}-current`:n,f=we.inline(u.from,u.to,{class:c});o.push(f)}return{decorationsToReturn:F.create(e,o),results:s}},Fr=(e,t,{state:n,dispatch:r})=>{const[o]=t;if(!o)return;const{from:s,to:a}=o;r&&r(n.tr.insertText(e,s,a))},_r=(e,t,n,r)=>{const o=t+1;if(!r[o])return null;const{from:s,to:a}=r[t],i=a-s-e.length+n,{from:l,to:u}=r[o];return r[o]={to:u-i,from:l-i},[i,r]},zr=(e,t,{tr:n,dispatch:r})=>{let o=0,s=t.slice();if(s.length){for(let a=0;a<s.length;a+=1){const{from:i,to:l}=s[a];n.insertText(e,i,l);const u=_r(e,a,o,s);u&&([o,s]=u)}r(n)}},Wr=C.create({name:"searchAndReplace",addOptions(){return{searchResultClass:"umo-search-result",disableRegex:!0}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:e=>({editor:t})=>(t.storage.searchAndReplace.searchTerm=e,!1),setReplaceTerm:e=>({editor:t})=>(t.storage.searchAndReplace.replaceTerm=e,!1),setCaseSensitive:e=>({editor:t})=>(t.storage.searchAndReplace.caseSensitive=e,!1),resetIndex:()=>({editor:e})=>(e.storage.searchAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n+1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n-1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=t.length-1,!1},replace:()=>({editor:e,state:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return Fr(r,o,{state:t,dispatch:n}),!1},replaceAll:()=>({editor:e,tr:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return zr(r,o,{tr:t,dispatch:n}),!1}}},addProseMirrorPlugins(){const{editor:e}=this,{searchResultClass:t,disableRegex:n}=this.options,r=a=>e.storage.searchAndReplace.lastSearchTerm=a,o=a=>e.storage.searchAndReplace.lastCaseSensitive=a,s=a=>e.storage.searchAndReplace.lastResultIndex=a;return[new H({key:"search-replace",state:{init:()=>F.empty,apply({doc:a,docChanged:i},l){const{searchTerm:u,lastSearchTerm:c,caseSensitive:f,lastCaseSensitive:m,resultIndex:d,lastResultIndex:p}=e.storage.searchAndReplace;if(!i&&c===u&&m===f&&p===d)return l;if(r(u),o(f),s(d),!u)return e.storage.searchAndReplace.results=[],F.empty;const{decorationsToReturn:g,results:v}=Br(a,Dr(u,n,f),t,d);return e.storage.searchAndReplace.results=v,g}},props:{decorations(a){return this.getState(a)}}})]}}),Vr=yt.extend({addOptions(){return{...this.parent?.(),className:"umo-selection"}},addCommands(){return{...this.parent?.(),setCurrentNodeSelection:()=>({editor:e,chain:t})=>{e.commands.selectParentNode();const{$anchor:n}=e.state.selection;return t().setNodeSelection(n.pos-n.depth).run()},deleteSelectionNode:()=>({editor:e,commands:t})=>{const n=ln(e);return n?t.deleteSelection()?!0:t.deleteNode(n.type.name):!1}}}}),Ur=un.extend({addOptions(){return{...this.parent?.(),HTMLAttributes:{class:"umo-node-table"},allowTableNodeSelection:!0,resizable:!0}}}),Pe={addAttributes(){return{...this.parent?.(),align:{default:null,parseHTML:e=>e.getAttribute("align")||null,renderHTML:({align:e})=>({align:e})},background:{default:null,parseHTML:e=>{const n=(e.getAttribute("style")||"").match(/background(?:-color)?:\s*([^;]+)/i);return n?n[1].trim():null},renderHTML:({background:e})=>e?{style:`background-color: ${e}`}:{}},color:{default:null,parseHTML:e=>{const t=e.getAttribute("style")||"",n=t.match(/(?<!background-)color:\s*([^;]+)/i);return t.includes("background-color")?null:n?n[1].trim():null},renderHTML:({color:e})=>e?{style:`color: ${e}`}:{}}}}},jr=dn.extend(Pe),qr=cn.extend(Pe),Kr=k.create({name:"tag",group:"inline",inline:!0,atom:!0,addAttributes(){return{type:{default:"default"},text:{default:P("bubbleMenu.tag.content")},color:{default:"#999"},backgroundColor:{default:"rgba(0, 0, 0, 0.05)"}}},parseHTML(){return[{tag:'span[data-type="tag"]'}]},renderHTML({HTMLAttributes:e}){return["span",y(e,{"data-type":"tag"}),e.text]},addNodeView(){return T(mn)},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:this.name,attrs:e}).run()}}}),Xr=pn.extend({addOptions(){return{...this.parent?.(),types:["heading","paragraph"],alignments:["left","center","right","justify","distributed"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlignLast?"distributed":e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:e.textAlign==="distributed"?{style:"text-align-last: justify"}:{style:`text-align: ${e.textAlign}`}}}}]},addKeyboardShortcuts(){return{...this.parent?.(),"Mod-Shift-d":()=>this.editor.commands.setTextAlign("distributed")}}}),Gr=k.create({name:"textBox",group:"block",content:"inline*",draggable:!1,addAttributes(){return{vnode:{default:!0},width:{default:200},height:{default:30},angle:{default:null},left:{default:0},top:{default:0},rotatable:{default:!0},borderWidth:{default:1},borderColor:{default:"#000"},borderStyle:{default:"solid"},backgroundColor:{default:"transparent"},writingMode:{default:"horizontal-tb",parseHTML:e=>e.style.writingMode||this.options.writingMode,renderHTML:({writingMode:e})=>({style:`writing-mode: ${e}`})}}},parseHTML(){return[{tag:"text-box"}]},renderHTML({HTMLAttributes:e}){return["text-box",y(e),0]},addNodeView(){return T(gn)},addCommands(){return{setTextBox:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),Jr=k.create({name:"toc",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0}}},parseHTML(){return[{tag:"toc"}]},renderHTML({HTMLAttributes:e}){return["toc",y(this.options.HTMLAttributes,e)]},addNodeView(){return T(hn)},addGlobalAttributes(){return[{types:["heading"],attributes:{}}]},addCommands(){return{addTableOfContents:e=>({chain:t})=>t().insertContent({type:this.name,attrs:e}).run()}}}),Yr=k.create({name:"video",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},file:{default:null},id:{default:null},name:{default:null},size:{default:null},src:{default:null},width:{default:null},height:{default:200},uploaded:{default:!1},previewType:{default:"video"}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:e}){return["video",y(e)]},addNodeView(){return T(kn)},addCommands(){return{setVideo:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),Zr=e=>{switch(e){case"break-all":return"word-break: break-all;";case"break-word":return"word-break: break-word;";case"normal":default:return"word-break: normal;"}},Qr=C.create({name:"wordWrap",addOptions(){return{types:["paragraph","heading"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{wordWrap:{default:"normal",parseHTML:e=>e.style.wordWrap||e.getAttribute("data-word-wrap")||"normal",renderHTML:e=>!e.wordWrap||e.wordWrap==="normal"?{}:{"data-word-wrap":e.wordWrap,style:Zr(e.wordWrap)}}}}]},addCommands(){return{setWordWrap:e=>({state:t,commands:n})=>{const{selection:r}=t;return r instanceof E?n.updateAttributes(r.node.type.name,{wordWrap:e}):this.options.types.some(o=>n.updateAttributes(o,{wordWrap:e}))},unsetWordWrap:()=>({commands:e})=>this.options.types.some(t=>e.updateAttributes(t,{wordWrap:"normal"})),canSetWordWrap:()=>({state:e})=>{const{from:t,to:n}=e.selection;let r=!1;return e.doc.nodesBetween(t,n,o=>{if(this.options.types.includes(o.type.name))return r=!0,!1}),r}}}}),eo=["paragraph","heading","blockquote","codeBlock","hardBreak","horizontalRule","bulletList","orderedList","listItem","taskList","taskItem","details","detailsSummary","detailsContent","table","tableRow","tableHeader","tableCell","image","inlineImage","video","audio","file","callout","column","columnBlock","textBox","datetime","optionBox","iframe","echarts","toc","tag","pageBreak","mention","blockMath","inlineMath"],to=({container:e,options:t,uploadFileMap:n})=>{const{page:r,document:o,users:s,file:a,disableExtensions:i}=t.value,l={"ordered-list":Er,"bullet-list":Cn,"task-list":lt.configure({HTMLAttributes:{class:"umo-task-list"}}),margin:mr,link:st.configure({openOnClick:!1,enableClickSelection:!0}),image:Re,inlineImage:lr,video:Yr,audio:Ln,"code-block":Hn,symbol:Symbol,math:Le.configure({katex:{throwOnError:!1}}),tag:Kr,columns:Wn,callout:wn,mention:pr.configure({suggestion:gr(s)}),"date-time":Vn,"option-box":Pr,bookmark:Tn,footnote:[nr,or,Gn],"hard-break":An.configure({visible:r?.showBreakMarks}),"horizontal-rule":ar,toc:Jr,"text-box":Gr,"web-page":ir},u=[At.configure({document:!1,bold:!1,codeBlock:!1,horizontalRule:!1,undoRedo:!1,link:!1,placeholder:!1,dropcursor:!1,selection:!1,bulletList:!1,orderedList:!1,trailingNode:!1,listKeymap:!0}),ot.extend({content:i.includes("footnote")?o.structure:`${o.structure} footnotes?`}),gt.configure({lineHeight:!1}),bt.extend({addKeyboardShortcuts(){return{}}}),Mt.configure({className:"umo-node-focused",mode:"all"}),kt.configure({node:"paragraph"}),Lt.configure({showOnlyCurrent:!1,placeholder:({node:c,pos:f})=>c.type.name==="heading"?f===0?P("document.headingPlaceholder"):"":String(Qe(o?.placeholder||""))}),sr,Qr,et.extend({renderHTML:({HTMLAttributes:c})=>["b",c,0]}),dt,ft,cr,Xr,hr,dr,ut.configure({nested:!0}),fr,Wr,Xt,tt.configure({HTMLAttributes:{class:"umo-node-details"}}),nt.configure({HTMLAttributes:{class:"umo-node-details-content"}}),rt.configure({HTMLAttributes:{class:"umo-node-details-summary"}}),Ur,fn,qr,jr,Un,Or,Vr,ct,yr,mt.configure({getIndex:pt,scrollParent:()=>document.querySelector(`${e} .umo-zoomable-container`),getId:()=>$(10)}),xe.configure(o?.typographyRules),Tt.configure({limit:o?.characterLimit!==0?o?.characterLimit:void 0}),Xn.configure({allowedMimeTypes:a?.allowedMimeTypes,async onPaste(c,f){const m=document.querySelector(`${e} .umo-zoomable-container`),d=m?.scrollTop||0;for(const p of f){const g=await ae(p);c.commands.insertFile({file:p,uploadFileMap:n.value,autoType:!0,dimensions:g})}m&&setTimeout(()=>{m.scrollTop=d},0)},async onDrop(c,f,m){for(const d of f){const p=await ae(d);c.commands.insertFile({file:d,uploadFileMap:n.value,autoType:!0,pos:m,dimensions:p})}}}),xt.configure({color:"var(--umo-primary-color)"}),yn,$r];return Object.values(l).forEach(c=>{if(!i?.includes(c.name)){if(Array.isArray(c)){u.push(...c);return}u.push(c)}}),o?.enableNodeId&&u.push(ht.configure({types:eo,generateID:()=>$(10)})),u},Me=e=>{let t=!0;const n=ke("document",e);return(!e.value.document?.enableMarkdown||!n.value?.enableMarkdown)&&(t=[Le,xe,Re]),t},ys={__name:"index",setup(e){const t=R("destroyed"),n=R("page"),r=R("options"),o=R("uploadFileMap"),s=R("historyRecords"),a=ke("document",r),i=Oe(()=>r.value.dicts?.lineHeights?.find(b=>b.default)?.value),l=R("container"),u=to({container:l,options:r,uploadFileMap:o});let c=null;const f=(b=L)=>{!a.value||!b||(a.value.content=b.getHTML())},m=()=>{c!==null&&clearTimeout(c),c=setTimeout(()=>{c=null,f(L)},800)},d=()=>{c!==null&&(clearTimeout(c),c=null),f(L)},p=b=>{const{$from:M}=b,{depth:I}=M;for(let w=I;w>0;w-=1){const q=M.node(w)?.type?.name;if(q==="listItem"||q==="taskItem")return q}return null},g=(b,M)=>{const I=r.value.document?.editorProps?.handleKeyDown;if(M.key==="Enter"&&!M.shiftKey&&!M.altKey&&!M.ctrlKey&&!M.metaKey&&!M.isComposing){const w=p(b.state.selection);if(w&&L.commands.splitListItem(w))return M.preventDefault(),!0}return I?.(b,M)||!1},v=bn(r.value.document?.content),N=De()?.appContext,L=new Ye({editable:!r.value.document?.readOnly,autofocus:r.value.document?.autofocus,content:"",enableInputRules:Me(r),enablePasteRules:Me(r),editorProps:{attributes:{class:"umo-editor"},...r.value.document?.editorProps,handleKeyDown:g},parseOptions:r.value.document?.parseOptions,extensions:[...u,...r.value.extensions],onCreate({editor:b}){r.value.disableExtensions.includes("math")&&Xe(b)},onUpdate({editor:b}){Mn(s,"editor",b?.state?.history$),m()},onBlur(){d()}});N&&(L.appContext=N);const x=R("editor");x.value=L,x.value.storage.container=l,Be(()=>r.value,()=>{x.value.storage.options=r.value},{immediate:!0,deep:!0});async function Ee(){await se(),await se(),!(!v||L.isDestroyed)&&L.commands.setContent(v,{emitUpdate:!1})}return Fe(async()=>{await Ee();const{disableExtensions:b,cdnUrl:M}=r.value,I=_=>!b.includes(_),w=`${M}/libs`;I("math")&&ie(`${w}/katex/katex.min.css`,"css","katex-style"),I("mermaid")&&ie(`${w}/mermaid/mermaid.min.js`,"script","mermaid-script"),window.addEventListener("beforeunload",d),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d)}),_e(()=>{window.removeEventListener("beforeunload",d),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d),d(),L.unmount()}),(b,M)=>{const I=Q("menus-block"),w=Q("menus-bubble");return z(),ee(te,null,[ze(h(Ze),{class:Ve(["umo-editor-content",{"show-bookmark":h(n).showBookmark,"show-line-number":h(n).showLineNumber,"format-painter":h(x)?.view?.painter?.enabled,"is-empty":h(x)?.isEmpty&&h(x)?.state.doc.childCount<=1,"is-readonly":!h(x)?.isEditable}]),editor:h(x),style:We({lineHeight:i.value}),spellcheck:h(r).document?.enableSpellcheck&&h(a).enableSpellcheck},null,8,["class","editor","style","spellcheck"]),h(x)&&!h(t)?(z(),ee(te,{key:0},[h(r).document?.enableBlockMenu?ne((z(),re(I,{key:0},null,512)),[[oe,h(n).zoomLevel===100&&!h(n).preview?.enabled&&h(x).isEditable]]):K("v-if",!0),h(r).document?.enableBubbleMenu?ne((z(),re(w,{key:1},{bubble_menu:Ue(_=>[je(b.$slots,"bubble_menu",qe(Ke(_)))]),_:3},512)),[[oe,!h(x)?.view?.painter?.enabled&&!h(x)?.isEmpty]]):K("v-if",!0)],64)):K("v-if",!0)],64)}}};export{ys as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as V,ref as y,watch as z,computed as X,onMounted as de,resolveComponent as f,openBlock as d,createElementBlock as w,Fragment as Y,unref as e,createElementVNode as i,createVNode as o,withCtx as a,normalizeClass as C,createBlock as $,createCommentVNode as b,createTextVNode as h,toDisplayString as v,normalizeStyle as Z,renderList as ve}from"vue";import{t as s}from"./i18n-hQyxfD7_.js";import{u as me}from"./state-X-ofkjhe.js";import{g as _}from"./shortcut-BFtk1iAo.js";import{useDebounceFn as ee,useFullscreen as pe}from"@vueuse/core";import{_ as fe}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";const be={key:0,class:"umo-status-bar"},we={class:"umo-status-bar-left"},he={class:"umo-layout-dropdown-item"},_e={key:0},ye={class:"umo-word-count"},ze={key:0,class:"umo-word-count-detail"},Ce={class:"umo-word-count-title"},ke={key:0},ge={class:"umo-status-bar-right"},$e={key:0,class:"umo-zoom-level-bar"},xe={key:1,class:"umo-preview-bar"},Le={key:0,class:"umo-preview-countdown"},Se={class:"umo-shortcuts-drawer-header"},We={__name:"index",setup(Ve){const k=V("container"),p=V("editor"),t=V("page"),g=V("options"),x=me("document",g),N=y(!1),T=y(!1);let F=y(0),L=y(0);const O=()=>{if(!p.value){F.value=0;return}const n=p.value.storage?.characterCount?.characters?.();F.value=typeof n=="number"?n:0},U=()=>{if(!p.value){L.value=0;return}const{selection:n}=p.value.state,l=p.value.state.doc.textBetween(n.from,n.to,"");L.value=l.length},j=ee(O,200),A=ee(U,120),R=()=>{O(),U()};z(()=>p.value,(n,l)=>{l&&(l.off("update",j),l.off("selectionUpdate",A),l.off("create",R)),n&&(n.on("update",j),n.on("selectionUpdate",A),n.on("create",R),O(),U())},{immediate:!0});const G=y(!1),q=X(()=>g.value.page.layouts.map(n=>({content:s(`layout.${n}`),value:n}))),te=X(()=>q.value.find(n=>n.value===t.value.layout)||q.value[0]);z(()=>t.value.layout,()=>{S()});const P=V("fullscreen"),J=()=>{P.value=!P.value};let E=y(null);de(()=>{E.value=pe(document.querySelector(k))});const K=()=>{t.value.showToc=!1,t.value.preview=t.value.preview||{},t.value.preview.enabled=!t.value.preview.enabled;const n=document.querySelector(`${k} .umo-zoomable-container`);n&&t.value.preview.enabled&&(n.scrollTop=0)},Q=()=>{t.value.preview.enabled&&(t.value.preview=t.value.preview||{},t.value.preview.enabled=!1)};z(()=>t.value.preview?.enabled,n=>{p.value&&(n?(t.value.preview.isEditable=p.value.isEditable,p.value.setEditable(!1)):p.value.setEditable(!g.value.document?.readOnly))});const H=y(!1);let B=y("");const oe=n=>{B.value=n};z(()=>t.value.preview?.enabled,async n=>{if(n){try{await E.value?.enter?.()}catch{}t.value.layout==="page"&&W(!1,10)}else{try{await E.value?.exit?.()}catch{}S()}}),z(()=>E.value?.isFullscreen,n=>{n||Q()});const D=()=>{t.value?.zoomLevel&&t.value.zoomLevel<500&&(t.value.zoomLevel+=10,t.value.autoWidth=!1)},I=()=>{t.value?.zoomLevel&&t.value.zoomLevel>20&&(t.value.zoomLevel-=10,t.value.autoWidth=!1)},S=()=>{t.value.zoomLevel=100,t.value.autoWidth=!1},W=(n=!0,l=50)=>{if(n&&t.value.autoWidth){S();return}try{const u=document.querySelector(`${k} .umo-zoomable-container`),m=u?.querySelector(".umo-zoomable-content"),c=u?.clientWidth||0,M=m?.clientWidth||0;t.value.zoomLevel=Math.floor(Number((c-l*2)/M)*100),t.value.autoWidth=!0}catch(u){t.value.autoWidth=!1,useMessage("error",{attach:k,content:s("zoom.autoWidthError")}),console.warn("Page auto width calculation error",u)}};z(()=>t.value.showToc,()=>{t.value.autoWidth&&W()});const le=()=>{x.value&&(x.value.enableSpellcheck=!x.value.enableSpellcheck)};return z(()=>p.value,()=>{p.value?.on("focus",()=>{useHotkeys("ctrl+f11, command+f11",J),useHotkeys("ctrl+0,command+0",W),useHotkeys("ctrl+-,command+-",I),useHotkeys("ctrl+=,command+=",D),useHotkeys("ctrl+1,command+1",S)})},{immediate:!0}),(n,l)=>{const u=f("icon"),m=f("t-button"),c=f("tooltip"),M=f("t-dropdown-item"),ae=f("t-dropdown-menu"),ne=f("t-dropdown"),se=f("t-popup"),ue=f("t-slider"),re=f("statusbar-countdown"),ie=f("statusbar-shortcuts"),ce=f("t-drawer");return d(),w(Y,null,[e(t).preview?.enabled?(d(),w("div",xe,[e(B)!==""?(d(),w("div",Le,v(e(B)),1)):b("v-if",!0),o(re,{visible:H.value,onVisibleChange:l[5]||(l[5]=r=>H.value=r),onCountdownChange:oe,onExitPreivew:Q,onClose:l[6]||(l[6]=r=>H.value=!1)},{default:a(()=>[o(c,{content:e(s)("preview.countdown.title")},{default:a(()=>[i("div",{class:C(["item",{active:H.value}])},[o(u,{name:"time"})],2)]),_:1},8,["content"])]),_:1},8,["visible"]),o(c,{content:e(s)("preview.laserPointer")},{default:a(()=>[i("div",{class:C(["item",{active:e(t).preview?.laserPointer}]),onClick:l[7]||(l[7]=r=>e(t).preview&&(e(t).preview.laserPointer=!e(t).preview.laserPointer))},[o(u,{name:"laser-pointer"})],2)]),_:1},8,["content"]),e(t).layout==="page"?(d(),$(c,{key:1,content:`${e(s)("zoom.zoomOut")} (${e(_)("Ctrl-")})`},{default:a(()=>[i("div",{class:"item",onClick:I},[o(u,{name:"minus"})])]),_:1},8,["content"])):b("v-if",!0),e(t).layout==="page"?(d(),$(c,{key:2,content:`${e(s)("zoom.autoWidth")} (${e(_)("Ctrl0")})`},{default:a(()=>[i("div",{class:C(["item",{active:e(t).autoWidth}]),onClick:l[8]||(l[8]=r=>W(!0))},[o(u,{name:"auto-width"})],2)]),_:1},8,["content"])):b("v-if",!0),e(t).layout==="page"?(d(),$(c,{key:3,content:`${e(s)("zoom.zoomIn")} (${e(_)("Ctrl+")})`},{default:a(()=>[i("div",{class:"item",onClick:D},[o(u,{name:"plus"})])]),_:1},8,["content"])):b("v-if",!0),o(c,{content:`${e(s)("preview.disable")} (${e(_)("Esc")})`},{default:a(()=>[i("div",{class:"item",onClick:K},[o(u,{name:"exit"})])]),_:1},8,["content"])])):(d(),w("div",be,[i("div",we,[o(c,{content:e(t).showToc?e(s)("toc.hide"):e(s)("toc.show")},{default:a(()=>[o(m,{class:C(["umo-status-bar-button",{active:e(t).showToc}]),variant:"text",size:"small",onClick:l[0]||(l[0]=r=>e(t).showToc=!e(t).showToc)},{default:a(()=>[o(u,{name:"toc",color:"red"})]),_:1},8,["class"])]),_:1},8,["content"]),e(g).document?.enableSpellcheck?(d(),$(c,{key:0,content:e(x)?.enableSpellcheck?e(s)("spellcheck.disable"):e(s)("spellcheck.enable")},{default:a(()=>[o(m,{class:C(["umo-status-bar-button",{active:e(x).enableSpellcheck}]),variant:"text",size:"small",onClick:le},{default:a(()=>[o(u,{name:"spellcheck",color:"red"})]),_:1},8,["class"])]),_:1},8,["content"])):b("v-if",!0),o(c,{content:e(s)("shortcut.title")},{default:a(()=>[o(m,{class:"umo-status-bar-button umo-status-bar-shortcut-btn",variant:"text",size:"small",onClick:l[1]||(l[1]=r=>N.value=!0)},{default:a(()=>[o(u,{name:"shortcut"})]),_:1})]),_:1},8,["content"]),l[10]||(l[10]=i("div",{class:"umo-status-bar-split"},null,-1)),o(ne,{attach:e(k),"popup-props":{onVisibleChange(r){G.value=r}},placement:"top-left",trigger:"click"},{default:a(()=>[o(m,{class:"umo-status-bar-button auto-width",variant:"text",size:"small"},{default:a(()=>[o(u,{name:`layout-${e(t).layout}`},null,8,["name"]),h(" "+v(te.value?.content??"")+" ",1),o(u,{name:"arrow-down",style:Z({transform:`rotate(${G.value?"180deg":0})`})},null,8,["style"])]),_:1}),o(ae,null,{default:a(()=>[(d(!0),w(Y,null,ve(q.value,r=>(d(),$(M,{key:r.value,value:r.value,active:r.value===e(t).layout,onClick:Te=>e(t).layout=r.value},{default:a(()=>[i("div",he,[o(u,{name:`layout-${r.value}`,size:"16"},null,8,["name"]),h(" "+v(r.content),1)])]),_:2},1032,["value","active","onClick"]))),128))]),_:1})]),_:1},8,["attach","popup-props"]),l[11]||(l[11]=i("div",{class:"umo-status-bar-split"},null,-1)),e(p)?(d(),$(se,{key:1,modelValue:T.value,"onUpdate:modelValue":l[2]||(l[2]=r=>T.value=r),trigger:"click",placement:"top-left"},{content:a(()=>[T.value?(d(),w("div",ze,[i("div",Ce,v(e(s)("wordCount.title")),1),i("ul",null,[i("li",null,[h(v(e(s)("wordCount.input"))+" ",1),i("span",null,v(e(F)),1)]),i("li",null,[h(v(e(s)("wordCount.selection"))+" ",1),i("span",null,v(e(L)),1)]),e(g).document?.characterLimit>0?(d(),w("li",ke,[h(v(e(s)("wordCount.limit"))+" ",1),i("span",null,v(e(g).document?.characterLimit),1)])):b("v-if",!0)])])):b("v-if",!0)]),default:a(()=>[o(m,{class:"umo-status-bar-button auto-width word-count",variant:"text",size:"small"},{default:a(()=>[e(L)>0?(d(),w("span",_e,v(e(L))+"/ ",1)):b("v-if",!0),i("span",ye,v(e(F)),1),h(" "+v(e(s)("wordCount.characters"))+" ",1),o(u,{name:"arrow-down",style:Z({transform:`rotate(${T.value?"180deg":0})`})},null,8,["style"])]),_:1})]),_:1},8,["modelValue"])):b("v-if",!0)]),i("div",ge,[o(c,{content:`${e(P)?.isFullscreen?e(s)("fullscreen.disable"):e(s)("fullscreen.title")} (${e(_)("Ctrl+F11")})`},{default:a(()=>[o(m,{class:"umo-status-bar-button",variant:"text",size:"small",onClick:J},{default:a(()=>[o(u,{name:e(P)?"full-screen-exit":"full-screen"},null,8,["name"])]),_:1})]),_:1},8,["content"]),o(c,{content:e(t).preview?.enabled?e(s)("preview.disable"):e(s)("preview.title")},{default:a(()=>[o(m,{class:C(["umo-status-bar-button",{active:e(t).preview?.enabled}]),variant:"text",size:"small",onClick:K},{default:a(()=>[o(u,{name:"preview"})]),_:1},8,["class"])]),_:1},8,["content"]),l[13]||(l[13]=i("div",{class:"umo-status-bar-split"},null,-1)),e(t).layout==="page"?(d(),w("div",$e,[o(c,{content:`${e(s)("zoom.zoomOut")} (${e(_)("Ctrl-")})`},{default:a(()=>[o(m,{class:"umo-status-bar-button",variant:"text",size:"small",disabled:e(t).zoomLevel<=20,onClick:I},{default:a(()=>[o(u,{name:"minus"})]),_:1},8,["disabled"])]),_:1},8,["content"]),o(ue,{modelValue:e(t).zoomLevel,"onUpdate:modelValue":l[3]||(l[3]=r=>e(t).zoomLevel=r),class:"umo-zoom-level-slider",min:20,max:500,step:10,"tooltip-props":{showArrow:!1,theme:"light",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,2]}}]}},label:e(s)("zoom.level")+"${value}%%"},null,8,["modelValue","label"]),o(c,{content:`${e(s)("zoom.zoomIn")} (${e(_)("Ctrl+")})`},{default:a(()=>[o(m,{class:"umo-status-bar-button",variant:"text",size:"small",disabled:!!(e(t).zoomLevel&&e(t).zoomLevel>=500),onClick:D},{default:a(()=>[o(u,{name:"plus"})]),_:1},8,["disabled"])]),_:1},8,["content"]),o(c,{content:`${e(s)("zoom.autoWidth")} (${e(_)("Ctrl0")})`},{default:a(()=>[o(m,{class:C(["umo-status-bar-button umo-auto-width-button",{active:e(t).autoWidth}]),variant:"text",size:"small",onClick:l[4]||(l[4]=r=>W(!0))},{default:a(()=>[o(u,{name:"auto-width"})]),_:1},8,["class"])]),_:1},8,["content"]),o(c,{content:`${e(s)("zoom.reset")} (${e(_)("Ctrl1")})`},{default:a(()=>[o(m,{class:"umo-status-bar-button auto-width",variant:"text",style:{width:"80px"},size:"small",onClick:S},{default:a(()=>[h(v(e(t).zoomLevel)+"% ",1)]),_:1})]),_:1},8,["content"])])):b("v-if",!0),o(m,{class:"umo-status-bar-button auto-width umo-lang-button",variant:"text",size:"small",disabled:""},{default:a(()=>[...l[12]||(l[12]=[h(" 🇨🇳 简体中文 ",-1)])]),_:1})])])),o(ce,{visible:N.value,"onUpdate:visible":l[9]||(l[9]=r=>N.value=r),attach:e(k),size:"320px",footer:!1,"close-btn":!0,"destroy-on-close":"","show-overlay":!1},{header:a(()=>[i("div",Se,[o(u,{name:"shortcut"}),h(" "+v(e(s)("shortcut.title")),1)])]),default:a(()=>[o(ie)]),_:1},8,["visible","attach"])],64)}}},Be=fe(We,[["__scopeId","data-v-7cc4c548"]]);export{Be as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as m,ref as d,onMounted as f,onBeforeUnmount as _,resolveComponent as u,openBlock as v,createElementBlock as b,createVNode as i,unref as s,isRef as x,withCtx as g}from"vue";import{t as V}from"./i18n-hQyxfD7_.js";import{_ as U}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";const h={class:"umo-bubble-tag-input"},k={__name:"input",setup(B){const o=m("editor");let t=d("");const a=()=>{const e=o.value?.getAttributes("tag");e?.text&&(t.value=e.text)};f(()=>{a(),o.value?.on("selectionUpdate",a)}),_(()=>{o.value?.off("selectionUpdate",a)});const l=e=>{if(e==="")return;o.value?.state?.selection?.$from?.node()&&o.value?.commands.updateAttributes("tag",{text:e})};return(e,n)=>{const p=u("icon"),c=u("t-input");return v(),b("div",h,[i(c,{modelValue:s(t),"onUpdate:modelValue":n[1]||(n[1]=r=>x(t)?t.value=r:t=r),modelModifiers:{trim:!0},type:"search",size:"small",placeholder:s(V)("bubbleMenu.tag.placeholder"),status:s(t)===""?"error":"default",onEnter:l},{suffixIcon:g(()=>[i(p,{name:"plus",size:"14",onClick:n[0]||(n[0]=r=>l(s(t)))})]),_:1},8,["modelValue","placeholder","status"])])}}},E=U(k,[["__scopeId","data-v-05010f60"]]);export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as N,ref as f,resolveComponent as r,openBlock as a,createBlock as U,unref as o,withCtx as w,createElementVNode as b,createElementBlock as u,Fragment as h,renderList as V,normalizeClass as A,toDisplayString as d,createVNode as i,createTextVNode as E}from"vue";import{t as s}from"./i18n-hQyxfD7_.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";const S=["onMouseover"],j={class:"umo-table-custom"},z=["textContent"],D={__name:"insert",setup(F){const{popupVisible:v,togglePopup:x}=usePopup(),k=N("editor"),C=Array.from({length:8},()=>Array.from({length:10},()=>"")),t=f({rows:0,cols:0}),c=f(!0),y=(l,e)=>t.value.rows&&t.value.rows>l&&t.value.cols&&t.value.cols>e,T=(l,e)=>{t.value.rows=l+1,t.value.cols=e+1},P=()=>{t.value.rows=0,t.value.cols=0},_=()=>{const{rows:l,cols:e}=t.value;l===0||l>1e3||e===0||e>30||(k.value?.chain().focus().insertTable({rows:l,cols:e,withHeaderRow:c.value}).run(),v.value=!1)};return(l,e)=>{const g=r("t-input-number"),B=r("t-checkbox"),H=r("t-button"),M=r("menus-button");return a(),U(M,{ico:"table",text:o(s)("table.insert.text"),tooltip:o(s)("table.insert.tip"),"menu-type":"popup",huge:"","popup-visible":o(v),onTogglePopup:o(x)},{content:w(()=>[b("div",{class:"umo-table-grid",onMouseleave:P},[(a(!0),u(h,null,V(o(C),(n,m)=>(a(),u("div",{key:m,class:"row"},[(a(!0),u(h,null,V(n,(L,p)=>(a(),u("div",{key:p,class:A(["cell",{selected:y(m,p)}]),onMouseover:$=>T(m,p),onClick:_},null,42,S))),128))]))),128))],32),b("div",j,[b("div",{class:"umo-table-custom-title",textContent:d(o(s)("table.insert.property"))},null,8,z),i(g,{modelValue:t.value.rows,"onUpdate:modelValue":e[0]||(e[0]=n=>t.value.rows=n),theme:"column",align:"right",max:1e3,min:0,label:o(s)("table.insert.rows")},null,8,["modelValue","label"]),i(g,{modelValue:t.value.cols,"onUpdate:modelValue":e[1]||(e[1]=n=>t.value.cols=n),theme:"column",align:"right",max:30,min:0,label:o(s)("table.insert.cols")},null,8,["modelValue","label"]),i(B,{modelValue:c.value,"onUpdate:modelValue":e[2]||(e[2]=n=>c.value=n)},{default:w(()=>[E(d(o(s)("table.insert.withHeader")),1)]),_:1},8,["modelValue"]),i(H,{class:"umo-insert-button",block:"",theme:"primary",variant:"base",onClick:_,textContent:d(o(s)("table.insert.create"))},null,8,["textContent"])])]),_:1},8,["text","tooltip","popup-visible","onTogglePopup"])}}},Q=R(D,[["__scopeId","data-v-a95ab86a"]]);export{Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as n,resolveComponent as c,openBlock as r,createBlock as a,unref as t}from"vue";import{t as l}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const b={__name:"italic",setup(u){const e=n("editor");return(s,o)=>{const i=c("menus-button");return r(),a(i,{text:t(l)("base.italic"),ico:"italic",shortcut:"Ctrl+I","hide-text":"","menu-active":t(e)?.isActive("italic"),disabled:!t(e)?.can().chain().focus().toggleItalic().run(),onMenuClick:o[0]||(o[0]=m=>t(e)?.chain().focus().toggleItalic().run())},null,8,["text","menu-active","disabled"])}}};export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as V,ref as k,watch as _,resolveComponent as a,openBlock as C,createBlock as z,unref as t,withCtx as s,createElementVNode as v,createTextVNode as L,toDisplayString as M,createVNode as n,isRef as d}from"vue";import{t as m}from"./i18n-hQyxfD7_.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";const N={class:"umo-letter-spacing-tile"},T={class:"umo-letter-spacing-menu"},w={__name:"letter-spacing",setup(y){const{popupVisible:p,togglePopup:g}=usePopup(),i=V("editor");let e=k(0);_(()=>p.value,c=>{c||(e.value=0);const o=i.value?.getAttributes("letterSpacing");e.value=o?.spacing?parseFloat(o.spacing.replace("em","")):0}),_(()=>e.value,c=>{f()});const f=()=>{i.value?.chain().focus().setLetterSpacing(`${e.value}em`).run()},b=()=>{e.value=0,p.value=!1};return(c,o)=>{const r=a("icon"),u=a("t-button"),x=a("tooltip"),S=a("t-slider"),h=a("menus-button");return C(),z(h,{text:t(m)("base.letterSpacing.text"),ico:"letter-spacing","hide-text":"","menu-type":"popup","menu-active":t(i)?.isActive("spacing"),"popup-visible":t(p),disabled:!t(i)?.can().chain().focus().setLetterSpacing().run(),onTogglePopup:t(g)},{content:s(()=>[v("div",N,[L(M(t(m)("base.letterSpacing.tip",{value:t(e)}))+" ",1),n(x,{content:t(m)("base.letterSpacing.reset")},{default:s(()=>[n(u,{variant:"text",size:"small",shape:"square",onClick:b},{default:s(()=>[n(r,{name:"node-clear-format",size:"16"})]),_:1})]),_:1},8,["content"])]),v("div",T,[n(u,{variant:"text",size:"small",disabled:t(e)<=-1,onClick:o[0]||(o[0]=l=>d(e)?e.value=Math.round((t(e)-.1)*10)/10:e=Math.round((t(e)-.1)*10)/10)},{default:s(()=>[n(r,{name:"minus"})]),_:1},8,["disabled"]),n(S,{modelValue:t(e),"onUpdate:modelValue":o[1]||(o[1]=l=>d(e)?e.value=l:e=l),min:-2,max:20,step:.1,"tooltip-props":{visible:!1}},null,8,["modelValue"]),n(u,{variant:"text",size:"small",disabled:t(e)>=10,onClick:o[2]||(o[2]=l=>d(e)?e.value=Math.round((t(e)+.1)*10)/10:e=Math.round((t(e)+.1)*10)/10)},{default:s(()=>[n(r,{name:"plus"})]),_:1},8,["disabled"])])]),_:1},8,["text","menu-active","popup-visible","disabled","onTogglePopup"])}}},D=P(w,[["__scopeId","data-v-39a80950"]]);export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as o,computed as p,resolveComponent as h,openBlock as d,createBlock as g,unref as n}from"vue";import{t as a}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const H={__name:"line-height",setup(v){const t=o("editor"),s=o("options"),r=p(()=>s.value.dicts?.lineHeights.map(e=>({content:e.default?l(e.label)+a("base.lineHeight.default"):l(e.label),value:e.value,active:t.value?.isActive("paragraph",{lineHeight:e.value})||t.value?.isActive("heading",{lineHeight:e.value})}))),c=({content:e,value:i})=>{e&&t.value?.chain().focus().setLineHeight(i).run()};return(e,i)=>{const u=h("menus-button");return d(),g(u,{text:n(a)("base.lineHeight.text"),ico:"line-height","menu-type":"dropdown","hide-text":"","select-options":r.value,disabled:!n(t)?.isActive("paragraph")&&!n(t)?.isActive("heading"),onChange:c},null,8,["text","select-options","disabled"])}}};export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as r,resolveComponent as m,openBlock as u,createBlock as i,unref as e}from"vue";import{t as p}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const g={__name:"line-number",setup(s){const n=r("page");return(c,t)=>{const o=m("menus-button");return u(),i(o,{ico:"line-number",text:e(p)("page.lineNumber"),"menu-active":e(n).showLineNumber,huge:"",onMenuClick:t[0]||(t[0]=l=>e(n).showLineNumber=!e(n).showLineNumber)},null,8,["text","menu-active"])}}};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as C,ref as c,watch as W,resolveComponent as s,openBlock as L,createBlock as P,unref as e,withCtx as n,createElementVNode as N,createVNode as o,isRef as h,createTextVNode as b,toDisplayString as k}from"vue";import{t as r}from"./i18n-hQyxfD7_.js";import{a as w}from"./selection-BIZq2qs_.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";import"@tiptap/pm/state";const S={class:"umo-link-container"},U={__name:"link",setup(j){const{popupVisible:p,togglePopup:x}=usePopup(),u=C("editor");let l=c(""),t=c("");const a=c({text:!1,href:!1}),g=()=>{if(l.value===""){a.value.text=!0;return}if(!t.value.startsWith("http://")&&!t.value.startsWith("https://")&&!t.value.startsWith("ftp://")&&!t.value.startsWith("ftps://")&&!t.value.startsWith("mailto://")){a.value.href=!0;return}a.value.text=!1,a.value.href=!1,u.value?.commands.setLink({href:t.value,target:"_blank"}),u.value?.chain().focus().insertContent(l.value).run(),p.value=!1},V=()=>{u.value?.chain().focus().unsetLink().run(),p.value=!1};return W(()=>p.value,d=>{d?(l.value=u.value?w(u.value):"",t.value=u?.value?.getAttributes("link").href||""):(l.value="",t.value="",a.value.text=!1,a.value.href=!1)}),(d,f)=>{const v=s("t-input"),m=s("t-form-item"),_=s("t-button"),T=s("t-form"),y=s("menus-button");return L(),P(y,{ico:"link",text:e(r)("insert.link.text"),"menu-type":"popup",huge:"","popup-visible":e(p),onTogglePopup:e(x)},{content:n(()=>[N("div",S,[o(T,{"label-align":"top"},{default:n(()=>[o(m,{label:e(r)("insert.link.hrefText")},{default:n(()=>[o(v,{modelValue:e(l),"onUpdate:modelValue":f[0]||(f[0]=i=>h(l)?l.value=i:l=i),modelModifiers:{trim:!0},status:a.value.text?"error":"default",placeholder:e(r)("insert.link.hrefTextTip"),clearable:""},null,8,["modelValue","status","placeholder"])]),_:1},8,["label"]),o(m,{label:e(r)("insert.link.href")},{default:n(()=>[o(v,{modelValue:e(t),"onUpdate:modelValue":f[1]||(f[1]=i=>h(t)?t.value=i:t=i),status:a.value.href?"error":"default",type:"url",clearable:"",placeholder:e(r)("insert.link.hrefTip")},null,8,["modelValue","status","placeholder"])]),_:1},8,["label"]),o(m,null,{default:n(()=>[o(_,{theme:"primary",type:"submit",disabled:e(t)===""||e(l)==="",onClick:g},{default:n(()=>[b(k(e(r)("insert.link.confirm")),1)]),_:1},8,["disabled"]),o(_,{theme:"default",variant:"text",style:{"margin-left":"10px"},disabled:e(t)===""||e(l)==="",onClick:V},{default:n(()=>[b(k(e(r)("insert.link.remove")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})])]),_:1},8,["text","popup-visible","onTogglePopup"])}}},z=B(U,[["__scopeId","data-v-0be3ee93"]]);export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const d=(r,n="script",c="")=>{const i=r.split("/").pop(),t=c===""?`${n||"script"}-${i}`:c;return new Promise((o,s)=>{if(document.getElementById(t)){o();return}let e;if(n==="script")e=document.createElement("script"),e.src=r,e.id=t,e.type="text/javascript",e.onload=()=>o(),e.onerror=()=>s(new Error(`JS 脚本加载失败: ${r}`));else if(n==="css")e=document.createElement("link"),e.rel="stylesheet",e.href=r,e.id=t,e.onload=()=>o(),e.onerror=()=>s(new Error(`CSS 样式加载失败: ${r}`));else{s(new Error(`不支持的类型: ${n}`));return}document.head.appendChild(e)})};export{d as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as s,computed as a,resolveComponent as u,openBlock as r,createBlock as p,unref as i}from"vue";import{t as m}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const C={__name:"locale",setup(_){const o=s("setLocale"),{locale:t}=useI18n(),n=a(()=>[{content:"🇨🇳 简体中文",value:"zh-CN",active:t.value==="zh-CN"},{content:"🇱🇷 English",value:"en-US",active:t.value==="en-US"}]),c=({value:e})=>{e&&o(e,!1)};return(e,v)=>{const l=u("menus-button");return r(),p(l,{text:i(m)("view.locale"),ico:"locale","menu-type":"dropdown",huge:"","select-options":n.value,onClick:c},null,8,["text","select-options"])}}};export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as h,ref as g,watch as C,resolveComponent as m,openBlock as M,createBlock as k,unref as t,withCtx as f,createElementVNode as N,createVNode as p,isRef as b,createTextVNode as P,toDisplayString as S}from"vue";import{t as r}from"./i18n-hQyxfD7_.js";import{g as T}from"./selection-BIZq2qs_.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";import"@tiptap/pm/state";const z={class:"umo-node-margin-input"},B={__name:"margin",setup(y){const{popupVisible:i,togglePopup:v}=usePopup(),n=h("editor");let o=g(""),a=g("");const _=()=>{if(i.value){const l=n.value?T(n.value):null;if(!l?.attrs?.margin)return;const{margin:e}=l.attrs;e?.top&&(o.value=e.top.replace(/px/g,"")),e?.bottom&&(a.value=e.bottom.replace(/px/g,""))}else o.value="",a.value=""},s=()=>{n.value?.commands.setMargin({top:o.value&&o.value!==""?o.value?.toString():void 0,bottom:a.value&&a.value!==""?a.value?.toString():void 0})};C(()=>i.value,l=>{l&&(_(),!l&&n.value&&n.value.commands.focus())},{immediate:!0});const c=()=>{n.value?.commands.unsetMargin(),i.value=!1};return(l,e)=>{const d=m("t-input-number"),x=m("t-button"),V=m("menus-button");return M(),k(V,{ico:"margin",text:t(r)("base.margin.text"),"menu-type":"popup","popup-handle":"arrow","hide-text":"","popup-visible":t(i),onTogglePopup:t(v),onMenuClick:e[2]||(e[2]=u=>c())},{content:f(()=>[N("div",z,[p(d,{modelValue:t(o),"onUpdate:modelValue":e[0]||(e[0]=u=>b(o)?o.value=u:o=u),theme:"column",align:"left",size:"small",label:`↥${t(r)("base.margin.top")}:`,placeholder:t(r)("base.margin.default"),"input-props":{clearable:!0},max:500,min:0,onChange:s},null,8,["modelValue","label","placeholder"]),p(d,{modelValue:t(a),"onUpdate:modelValue":e[1]||(e[1]=u=>b(a)?a.value=u:a=u),theme:"column",align:"left",size:"small",label:`↧${t(r)("base.margin.bottom")}:`,placeholder:t(r)("base.margin.default"),"input-props":{clearable:!0},max:500,min:0,onChange:s},null,8,["modelValue","label","placeholder"]),p(x,{variant:"outline",size:"small",onClick:c},{default:f(()=>[P(S(t(r)("base.margin.reset")),1)]),_:1})])]),_:1},8,["text","popup-visible","onTogglePopup"])}}},q=w(B,[["__scopeId","data-v-b4ac1f4e"]]);export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as s,resolveComponent as o,openBlock as l,createBlock as p,unref as a,withCtx as u,createVNode as m}from"vue";import{t as _}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const d={__name:"margin",setup(f){const t=s(!1);return(g,e)=>{const n=o("page-options"),r=o("menus-button");return l(),p(r,{ico:"page-margin",text:a(_)("page.margin"),huge:"",onMenuClick:e[1]||(e[1]=i=>t.value=!0)},{default:u(()=>[m(n,{visible:t.value,onClose:e[0]||(e[0]=i=>t.value=!1)},null,8,["visible"])]),_:1},8,["text"])}}};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as t,resolveComponent as c,unref as o,openBlock as d,createBlock as l,createCommentVNode as u,nextTick as k}from"vue";import{t as e}from"./i18n-hQyxfD7_.js";import{u as w}from"./dialog-BnThXCWu.js";import{u as b}from"./state-X-ofkjhe.js";import"@tool-belt/type-predicates";import"vue-i18n";import"tdesign-vue-next";import"@vueuse/core";const B={__name:"markdown",setup(p){const m=t("container");t("destroyed");const a=t("options"),n=b("document",a),s=()=>{const r=w({attach:m,theme:"warning",header:n.value.enableMarkdown?e("base.markdown.disable"):e("base.markdown.enable"),body:e("base.markdown.message"),confirmBtn:{theme:"warning",content:e("base.markdown.toggle")},async onConfirm(){n.value.enableMarkdown=!n.value.enableMarkdown,r.destroy(),await k(),window.location.reload()}})};return(r,f)=>{const i=c("menus-button");return o(a).document?.enableMarkdown?(d(),l(i,{key:0,text:o(e)("base.markdown.text"),ico:"markdown",tooltip:o(n).enableMarkdown?o(e)("base.markdown.disable"):o(e)("base.markdown.enable"),"menu-active":o(n).enableMarkdown,huge:"",onMenuClick:s},null,8,["text","tooltip","menu-active"])):u("v-if",!0)}}};export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as a,computed as o,resolveComponent as r,openBlock as u,createBlock as c,unref as s}from"vue";import{t as m}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const d={__name:"math",setup(p){const t=a("editor"),l=o(()=>t.value?.isActive("blockMath")?"block":t.value?.isActive("inlineMath")?"inline":null),i=o(()=>{let e=null;return t.value?.isActive("blockMath")&&(e=t.value?.getAttributes("blockMath")),t.value?.isActive("inlineMath")&&(e=t.value?.getAttributes("inlineMath")),e?.latex||""});return(e,v)=>{const n=r("menus-toolbar-tools-math");return u(),c(n,{ico:"edit",tooltip:s(m)("tools.math.edit"),latex:i.value,type:l.value},null,8,["tooltip","latex","type"])}}};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as $,ref as f,watch as A,nextTick as S,resolveComponent as d,openBlock as c,createBlock as C,isRef as h,unref as e,withCtx as r,createVNode as v,createElementVNode as p,createElementBlock as b,toDisplayString as m,Fragment as F,renderList as K,withDirectives as O,vShow as G,createCommentVNode as H,createTextVNode as _}from"vue";import{t as s}from"./i18n-hQyxfD7_.js";import{l as R}from"./load-resource-DgkZV52W.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";const P={class:"umo-math-input"},Q={class:"umo-math-input-preview umo-scrollbar"},W={key:0,class:"umo-math-input-render"},X={key:1,class:"umo-math-input-preview-empty"},Y={class:"umo-math-select"},Z=["onClick"],ee={key:0,class:"umo-math-select-loading"},te={class:"umo-math-footer"},oe={__name:"math",props:{type:{type:String,default:null},latex:{type:String,default:""}},setup(N){const u=N,x=$("editor"),B=$("options"),E=["\\times","\\div","\\pm","\\mp","\\cdot","\\star","\\neq","\\leq","\\sim","\\approx","\\cong","\\equiv","\\propto","\\ll","\\gg","\\in","\\subset","\\subseteq","\\prec","\\preceq","\\simeq","\\asymp","\\doteq","\\succ","\\succeq","\\sqsubseteq","\\sqsupseteq","\\ni","\\models","\\vdash","\\dashv","\\perp","\\mid","\\parallel","\\smile","\\frown","\\bowtie","\\unlhd","\\unrhd","\\sqrt{ab}","\\sqrt[n]{ab}","\\widetilde{ab}","\\widehat{ab}","a^{b}","c_a^b ","\\overleftarrow{ab}","\\overrightarrow{ab}","\\overbrace{ab}","\\underbrace{ab}","\\overline{ab}","\\underline{ab}","a_{b}","\\log_{a}{b}","\\lg{ab}","\\left(\\begin{array}{c}a\\\\ b\\end{array}\\right)","\\begin{bmatrix}a & b \\\\c & d \\end{bmatrix}","\\begin{cases}a & x = 0\\\\b & x > 0\\end{cases}","\\sin","\\cot","\\cos","\\csc","\\sec","\\tan","\\cosh","\\coth","\\sinh","\\tanh","\\arcsin","\\arctan","\\arccos","\\log","\\ln","\\inf","\\lim","\\det","\\ker","\\bmod","\\hom","\\gcd","\\min","\\max","\\exp","\\sup"];let o=f(!1);const k=f();let w=f(!1),t=f("");const T=async()=>{const{cdnUrl:n}=B.value;await R(`${n}/libs/katex/katex.min.js`,"script","katex-script"),await R(`${n}/libs/katex/katex.min.css`,"css","katex-style"),setTimeout(()=>{w.value=!0},100)};A(()=>o.value,async n=>{if(n){if(await T(),setTimeout(()=>{M("templates")},100),u.latex!==""){const{latex:a}=u;t.value=a,g()}}else t.value=""});const M=async n=>{await S();const a=(i,y)=>katex.render(i,y,{throwOnError:!1,output:"mathml"});if(n==="templates"&&k.value.querySelectorAll(".umo-math-select-item").forEach(i=>{a(i.textContent,i)}),n==="preview"&&t.value!==""){await S();const i=k.value.querySelector(".umo-math-input-render");a(t.value,i)}},j=n=>{t.value=t.value===""?n:`${t.value} ${n}`,g()},g=()=>{M("preview")},V=({value:n})=>{n==="inline"&&x.value?.chain().focus().insertInlineMath({latex:t.value}).run(),n==="block"&&x.value?.chain().focus().insertBlockMath({latex:t.value}).run(),o.value=!1},D=()=>{u.latex!==""&&x.value?.chain().focus().deleteSelectionNode().run(),V({value:u.type})};return(n,a)=>{const i=d("icon"),y=d("t-textarea"),q=d("t-button"),I=d("t-dropdown"),L=d("modal"),U=d("menus-button");return c(),C(U,{ico:"math",text:e(s)("tools.math.text"),huge:"",onMenuClick:a[4]||(a[4]=l=>h(o)?o.value=!0:o=!0)},{default:r(()=>[v(L,{visible:e(o),icon:"math",width:"734px","confirm-btn":{disabled:e(t)===""},"destroy-on-close":"",onCancel:a[2]||(a[2]=l=>h(o)?o.value=!1:o=!1),onClose:a[3]||(a[3]=l=>h(o)?o.value=!1:o=!1)},{header:r(()=>[v(i,{name:"math"}),_(" "+m(u.latex===""?e(s)("tools.math.insert"):e(s)("tools.math.edit")),1)]),footer:r(()=>[p("div",te,[v(q,{theme:"default",variant:"base",onClick:a[1]||(a[1]=l=>h(o)?o.value=!1:o=!1)},{default:r(()=>[_(m(e(s)("tools.math.cancel")),1)]),_:1}),u.latex===""?(c(),C(I,{key:0,trigger:"click",options:[{content:e(s)("tools.math.inline"),value:"inline"},{content:e(s)("tools.math.block"),value:"block"}],onClick:V},{default:r(()=>[v(q,{disabled:e(t)===""},{default:r(()=>[_(m(e(s)("tools.math.confirm")),1)]),_:1},8,["disabled"])]),_:1},8,["options"])):(c(),C(q,{key:1,disabled:e(t)==="",onClick:D},{default:r(()=>[_(m(e(s)("tools.math.update")),1)]),_:1},8,["disabled"]))])]),default:r(()=>[p("div",{ref_key:"containerRef",ref:k,class:"umo-math-container"},[p("div",P,[v(y,{modelValue:e(t),"onUpdate:modelValue":a[0]||(a[0]=l=>h(t)?t.value=l:t=l),modelModifiers:{trim:!0},autosize:{minRows:3,maxRows:6},placeholder:e(s)("tools.math.placeholder"),onChange:g},null,8,["modelValue","placeholder"]),p("div",Q,[e(t)!==""?(c(),b("div",W)):(c(),b("div",X,m(e(s)("tools.math.preview")),1))])]),p("div",Y,[(c(),b(F,null,K(E,(l,z)=>O(p("div",{key:z,class:"umo-math-select-item",onClick:ae=>j(l)},m(l),9,Z),[[G,e(w)]])),64)),e(w)?H("v-if",!0):(c(),b("div",ee,m(e(s)("tools.math.template")),1))])],512)]),_:1},8,["visible","confirm-btn"])]),_:1},8,["text"])}}},me=J(oe,[["__scopeId","data-v-34609a9b"]]);export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as r,resolveComponent as i,openBlock as m,createBlock as u,unref as n}from"vue";import{t as s}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const d={__name:"mention",setup(c){const e=r("editor");return(p,t)=>{const o=i("menus-button");return m(),u(o,{ico:"mention",text:n(s)("insert.mention"),huge:"",onMenuClick:t[0]||(t[0]=_=>n(e)?.chain().focus().insertMention().run())},null,8,["text"])}}};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as w,watch as g,resolveComponent as k,openBlock as s,createElementBlock as a,createElementVNode as r,Fragment as x,renderList as b,normalizeClass as C,unref as N,createVNode as V,normalizeStyle as z,withCtx as A,createTextVNode as D,toDisplayString as u,createCommentVNode as c}from"vue";const E={key:0,ref:"popupRef",class:"umo-popup umo-mention-popup"},H={class:"umo-popup__content umo-dropdown"},q={class:"umo-dropdown__menu",style:{padding:"5px","max-height":"320px"}},B=["onClick"],F={class:"umo-mention-popup-item-content"},I={class:"umo-mention-popup-item-name"},S={key:0,class:"umo-mention-popup-item-bio"},R={__name:"mentions",props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},setup(i,{expose:d}){const t=i;let o=w(0);g(()=>t.items,()=>{o.value=0});const _=({event:n})=>n.key==="ArrowUp"?(h(),!0):n.key==="ArrowDown"?(f(),!0):n.key==="Enter"?t.items.length===0?!1:(v(),!0):!1,h=()=>{o.value=(o.value+t.items.length-1)%t.items.length},f=()=>{o.value=(o.value+1)%t.items.length},v=()=>{p(o.value)},p=n=>{const l=t.items[n];l&&t.command(l)};return d({onKeyDown:_}),(n,l)=>{const y=k("t-avatar");return i.items.length>0?(s(),a("div",E,[r("div",H,[r("div",q,[r("div",null,[(s(!0),a(x,null,b(i.items,(e,m)=>(s(),a("li",{key:e.id||e.label||m,class:C(["umo-dropdown__item umo-dropdown__item--theme-default umo-dropdown__item umo-mention-popup-item",{"umo-dropdown__item--active":m===N(o)}]),onClick:K=>p(m)},[r("div",F,[V(y,{class:"umo-mention-popup-item-avatar",shape:"circle",size:"20px",style:z({borderColor:e.color||"transparent"}),image:e.avatar},{default:A(()=>[D(u(e.label?.slice(0,1)),1)]),_:2},1032,["style","image"]),r("span",I,u(e.label),1)]),e.bio?(s(),a("span",S,u(e.bio),1)):c("v-if",!0)],10,B))),128))])])])],512)):c("v-if",!0)}}};export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as I,resolveComponent as o,openBlock as b,createElementBlock as s,Fragment as u,createVNode as e,createElementVNode as l,unref as A,createBlock as a,createCommentVNode as m,renderSlot as ae}from"vue";import{t as de}from"./i18n-hQyxfD7_.js";import{CellSelection as ce}from"@tiptap/pm/tables";import"@tool-belt/type-predicates";import"vue-i18n";const pe={key:0,class:"umo-bubble-menu-divider"},xe={__name:"menus",setup(ge){const p=I("editor"),E=I("options"),c=_=>E.value.disableExtensions.includes(_),t=_=>{const n=p.value;if(!n)return!1;if(_==="table"){const{selection:d}=n.state;return d instanceof ce}return n.isActive(_)},i=_=>p.value.getAttributes(_),w=_=>{const{state:n}=p.value,{selection:d}=n,{$from:g}=d,v=d.node||g.parent;if(_==="name")return v.type.name;if(_==="attrs")return v.type.attrs};return(_,n)=>{const d=o("menus-bubble-link-open"),g=o("menus-toolbar-insert-link"),v=o("menus-bubble-link-copy"),V=o("menus-bubble-link-unlink"),r=o("menus-bubble-node-delete"),k=o("menus-toolbar-base-align-left"),f=o("menus-toolbar-base-align-center"),y=o("menus-toolbar-base-align-right"),M=o("menus-bubble-image-proportion"),S=o("menus-bubble-image-preview"),W=o("menus-bubble-image-open"),$=o("menus-bubble-image-convert"),j=o("menus-bubble-file-width"),F=o("menus-bubble-webpage-clickable"),R=o("menus-toolbar-insert-web-page"),T=o("menus-bubble-webpage-open"),q=o("menus-bubble-file-download"),D=o("menus-bubble-node-tofile"),G=o("menus-toolbar-table-cells-align"),H=o("menus-toolbar-table-cells-background"),J=o("menus-toolbar-table-add-row-before"),K=o("menus-toolbar-table-add-row-after"),L=o("menus-toolbar-table-add-column-before"),O=o("menus-toolbar-table-add-column-after"),P=o("menus-toolbar-table-delete-row"),Q=o("menus-toolbar-table-delete-column"),U=o("menus-toolbar-table-merge-cells"),X=o("menus-toolbar-table-split-cell"),Y=o("menus-bubble-tag-input"),Z=o("menus-bubble-tag-builtin"),h=o("menus-bubble-tag-color"),ee=o("menus-bubble-tag-background"),oe=o("menus-bubble-tag-delete"),ne=o("menus-toolbar-tools-echarts"),x=o("menus-toolbar-base-font-size"),B=o("menus-toolbar-base-bold"),z=o("menus-toolbar-base-italic"),N=o("menus-toolbar-base-color"),C=o("menus-toolbar-base-background-color"),te=o("menus-toolbar-insert-option-box"),be=o("menus-bubble-math"),le=o("menus-toolbar-base-underline"),se=o("menus-toolbar-base-strike"),ue=o("menus-toolbar-base-align-dropdown"),me=o("menus-toolbar-base-highlight"),_e=o("menus-bubble-text-box-border"),ie=o("menus-bubble-text-box-background"),re=o("menus-bubble-text-box-writing-mode");return b(),s(u,null,[t("link")&&i("link").href?(b(),s(u,{key:0},[e(d),n[0]||(n[0]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(g,{ico:"edit",text:A(de)("insert.link.edit")},null,8,["text"]),e(v),e(V),n[1]||(n[1]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(r)],64)):t("image")&&!i("image").error||t("inlineImage")&&!i("inlineImage").error?(b(),s(u,{key:1},[e(k),e(f),e(y),n[2]||(n[2]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(M),n[3]||(n[3]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),i("image")?.type?.startsWith("image")||i("inlineImage")?.type?.startsWith("image")?(b(),a(S,{key:0})):m("v-if",!0),e(W),e($),n[4]||(n[4]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(r)],64)):t("video")||t("audio")||t("file")||t("iframe")?(b(),s(u,{key:2},[e(k),e(f),e(y),t("file")?(b(),a(j,{key:0})):m("v-if",!0),n[6]||(n[6]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),t("iframe")?(b(),s(u,{key:1},[e(F),c("web-page")?m("v-if",!0):(b(),a(R,{key:0,ico:"edit","page-type":i("iframe")?.type,"page-url":i("iframe")?.src},null,8,["page-type","page-url"])),e(T),n[5]||(n[5]=l("div",{class:"umo-bubble-menu-divider"},null,-1))],64)):m("v-if",!0),t("file")||t("video")||t("audio")?(b(),a(q,{key:2})):m("v-if",!0),t("video")||t("audio")?(b(),a(D,{key:3})):m("v-if",!0),e(r)],64)):t("table")?(b(),s(u,{key:3},[e(G),e(H),m(" <menus-toolbar-table-border-color /> "),n[7]||(n[7]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(J),e(K),e(L),e(O),n[8]||(n[8]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(P),e(Q),n[9]||(n[9]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(U),e(X)],64)):t("tag")?(b(),s(u,{key:4},[e(Y),e(Z),n[10]||(n[10]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(h),e(ee),n[11]||(n[11]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(oe)],64)):t("echarts")?(b(),s(u,{key:5},[e(k),e(f),e(y),n[12]||(n[12]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(ne,{ico:"setting"}),e(r)],64)):t("optionBox")?(b(),s(u,{key:6},[e(x,{select:!1}),e(B),e(z),n[13]||(n[13]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(N),e(C),n[14]||(n[14]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(te,{edit:""}),n[15]||(n[15]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(r)],64)):t("blockMath")||t("inlineMath")?(b(),s(u,{key:7},[e(be),e(r)],64)):t("toc")||t("pageBreak")||t("horizontalRule")||t("codeBlock")||i("image").error?(b(),s(u,{key:8},[m(" <menus-bubble-node-delete /> ")],64)):(b(),s(u,{key:9},[e(x,{select:!1}),!c("font-size-increase")||!c("font-size-decrease")?(b(),s("div",pe)):m("v-if",!0),e(B),e(z),e(le),e(se),n[17]||(n[17]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(ue),c("link")?m("v-if",!0):(b(),a(g,{key:1})),n[18]||(n[18]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(N),t("textBox")?(b(),s(u,{key:3},[e(_e),e(ie),e(re),n[16]||(n[16]=l("div",{class:"umo-bubble-menu-divider"},null,-1)),e(r)],64)):(b(),s(u,{key:2},[e(C),c("highlight")?m("v-if",!0):(b(),a(me,{key:0}))],64))],64)),A(p)?.state?.selection?ae(_.$slots,"bubble_menu",{key:10,nodeType:w("name"),nodeAttrs:w("attrs")}):m("v-if",!0)],64)}}};export{xe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as n,resolveComponent as m,openBlock as i,createBlock as c,unref as e}from"vue";import{t as a}from"./i18n-hQyxfD7_.js";import{u as p}from"./state-X-ofkjhe.js";import"@tool-belt/type-predicates";import"vue-i18n";import"@vueuse/core";const h={__name:"merge-cells",setup(u){const t=n("editor"),r=n("options"),s=p("toolbar",r);return(d,o)=>{const l=m("menus-button");return i(),c(l,{ico:"table-merge-cell",text:e(a)("table.mergeCells"),"hide-text":e(s).mode==="classic",disabled:!e(t)?.can().mergeCells(),onMenuClick:o[0]||(o[0]=_=>e(t)?.chain().focus().mergeCells().run())},null,8,["text","hide-text","disabled"])}}};export{h as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{inject as E,ref as u,watch as L,nextTick as N,resolveComponent as h,openBlock as y,createBlock as z,isRef as k,unref as a,withCtx as _,createVNode as p,createElementVNode as g,toDisplayString as b,createElementBlock as B,createTextVNode as I,createCommentVNode as D}from"vue";import{t as e}from"./i18n-hQyxfD7_.js";import{g as H}from"./selection-BIZq2qs_.js";import{s as R}from"./short-id-DJZHbKNv.js";import{s as J}from"./file-BwWjS162.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"@tool-belt/type-predicates";import"vue-i18n";import"@tiptap/pm/state";const A={class:"umo-mermaid-container"},F={class:"umo-mermaid-editor"},G={class:"umo-mermaid-toolbar"},K={class:"umo-mermaid-render"},Q=["textContent"],W={key:0,class:"umo-mermaid-error"},X=["innerHTML"],Y={__name:"mermaid",props:{config:{type:Object,default:()=>({theme:"default"})},content:{type:String,default:void 0}},setup(c){const r=c,M=E("editor"),C=E("container");let n=u(!1);const O=[{label:e("tools.mermaid.themes.default"),value:"default"},{label:e("tools.mermaid.themes.base"),value:"base"},{label:e("tools.mermaid.themes.dark"),value:"dark"},{label:e("tools.mermaid.themes.forest"),value:"forest"},{label:e("tools.mermaid.themes.neutral"),value:"neutral"}];let v=u({});const U=()=>{useCopy(t.value,e("tools.mermaid.copied"),C)},V=()=>{const{mermaid:l}=window;l&&l.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,securityLevel:"loose",...v.value})};let t=u(r.content||""),f=u(""),m=u("");const S=u(null),T=async()=>{const{mermaid:l}=window;if(!l){f.value="",m.value=e("tools.mermaid.notLoaded");return}if(!t.value||t.value.trim()===""){f.value="",m.value=e("tools.mermaid.codeEmpty");return}const o=`mermaid-svg-${R(8)}`;try{const{svg:s}=await l.render(o,t.value);f.value=s,m.value=""}catch{f.value="",m.value=e("tools.mermaid.renderError")}};L(()=>n.value,async l=>{l&&(v.value={...r.config},t.value=r.content||`graph TB
|
|
2
|
+
a-->b`,await N(),V(),T())},{immediate:!0}),L(()=>[v.value.theme,t.value],async()=>{!n.value||!t.value||t.value===""||(await N(),V(),T())});const x=u(!1),$=()=>{if(t.value===""){useMessage("error",{attach:C,content:e("tools.mermaid.notEmpty")});return}if(!r.content||r.content&&r.content!==t.value){const l=S.value?.querySelector("svg");if(!l)return;if(m.value){useMessage("error",{attach:C,content:e("tools.mermaid.renderError")});return}const{width:o,height:s}=l.getBoundingClientRect(),{attrs:d}=H(M.value)||{},w={id:R(10),type:"mermaid",src:J(f.value),config:JSON.stringify(v.value),content:t.value,width:x.value&&d?.width||o,height:x.value&&d?.height||s,equalProportion:!1};M.value?.chain().focus().setImage(w,!!r.content).run()}n.value=!1};return(l,o)=>{const s=h("icon"),d=h("menus-button"),w=h("t-textarea"),j=h("t-checkbox"),q=h("modal");return y(),z(d,{ico:c.content?"edit":"mermaid",text:c.content?a(e)("tools.mermaid.edit"):a(e)("tools.mermaid.text"),huge:"",onMenuClick:o[5]||(o[5]=i=>k(n)?n.value=!0:n=!0)},{default:_(()=>[p(q,{visible:a(n),icon:"mermaid",width:"960px",onConfirm:$,onClose:o[4]||(o[4]=i=>k(n)?n.value=!1:n=!1)},{header:_(()=>[p(s,{name:"mermaid"}),I(" "+b(c.content?a(e)("tools.mermaid.edit"):a(e)("tools.mermaid.text")),1)]),default:_(()=>[g("div",A,[g("div",F,[g("div",G,[p(d,{style:{width:"100px"},"menu-type":"select",text:a(e)("tools.mermaid.theme"),"select-options":O,"select-value":a(v).theme,onMenuClick:o[0]||(o[0]=i=>a(v).theme=i)},null,8,["text","select-value"]),p(d,{ico:"copy",tooltip:a(e)("tools.mermaid.copy"),"hide-text":"",onMenuClick:U},null,8,["tooltip"]),p(d,{ico:"node-delete",tooltip:a(e)("tools.mermaid.clear"),"hide-text":"",onMenuClick:o[1]||(o[1]=i=>k(t)?t.value="":t="")},null,8,["tooltip"])]),p(w,{modelValue:a(t),"onUpdate:modelValue":o[2]||(o[2]=i=>k(t)?t.value=i:t=i),class:"umo-mermaid-code",autofocus:"",placeholder:a(e)("tools.mermaid.placeholder")},null,8,["modelValue","placeholder"])]),g("div",K,[g("div",{class:"umo-mermaid-title",textContent:b(a(e)("tools.mermaid.preview"))},null,8,Q),a(m)?(y(),B("div",W,b(a(m)),1)):(y(),B("div",{key:1,ref_key:"mermaidRef",ref:S,class:"umo-mermaid-svg umo-scrollbar",innerHTML:a(f)},null,8,X))])]),c.content&&c.content!==""?(y(),z(j,{key:0,class:"umo-mermaid-keep-size",modelValue:x.value,"onUpdate:modelValue":o[3]||(o[3]=i=>x.value=i)},{default:_(()=>[I(b(a(e)("tools.mermaid.keepSize")),1)]),_:1},8,["modelValue"])):D("v-if",!0)]),_:1},8,["visible"])]),_:1},8,["ico","text"])}}},me=P(Y,[["__scopeId","data-v-77b0ca74"]]);export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveComponent as o,openBlock as e,createBlock as n,unref as m}from"vue";import{t as r}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const l={__name:"mind-map",setup(p){return(c,u)=>{const t=o("menus-button");return e(),n(t,{ico:"mind-map",text:m(r)("tools.mindMap"),huge:""},null,8,["text"])}}};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as c,getCurrentInstance as a,openBlock as s,createBlock as m,resolveDynamicComponent as p,h as i,unref as t}from"vue";import{Dialog as l}from"tdesign-vue-next";const d={__name:"modal",setup(f){const n=c("container","body"),o=a(),r=e=>o.expose=e;return(e,u)=>(s(),m(p(i(t(l),{placement:"center",attach:t(n),...e.$attrs,ref:r},e.$slots))))}};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as n,resolveComponent as c,openBlock as i,createBlock as a,unref as t}from"vue";import{t as m}from"./i18n-hQyxfD7_.js";import{u}from"./state-X-ofkjhe.js";import"@tool-belt/type-predicates";import"vue-i18n";import"@vueuse/core";const T={__name:"next-cell",setup(p){const o=n("editor"),l=n("options"),r=u("toolbar",l);return(x,e)=>{const s=c("menus-button");return i(),a(s,{ico:"table-next-cell",text:t(m)("table.nextCell"),shortcut:"Tab","hide-text":t(r).mode==="classic",disabled:!t(o)?.can().goToNextCell(),onMenuClick:e[0]||(e[0]=d=>t(o)?.chain().focus().goToNextCell().run())},null,8,["text","hide-text","disabled"])}}};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as d,ref as J,resolveComponent as s,openBlock as n,createBlock as l,withCtx as e,createVNode as t,unref as r,createTextVNode as K,toDisplayString as h,createCommentVNode as a,createElementBlock as Q,Fragment as U,renderList as W,createElementVNode as X}from"vue";import{t as f}from"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";const Y={class:"umo-dropdown-item-label"},le={__name:"node",props:{node:{type:Object,default:null},pos:{type:Number,default:null}},emits:["dropdown-visible"],setup(y,{emit:x}){const w=y,C=x,v=d("container"),b=d("options"),_=d("editor"),M=d("uploadFileMap"),N=d("blockMenu");let g=J(!1);const F={attach:`${v} .umo-main-container`,popperOptions:{modifiers:[{name:"offset",options:{offset:[2,0]}}]},onVisibleChange(i){N.value=i,g.value=i,_.value?.chain().selectTextblockEnd().selectNodeForward().focus(w.pos).run(),C("dropdown-visible",i)}},u=i=>b.value.disableExtensions.includes(i),V=()=>{_.value?.chain().focus().selectFiles("image",v,M.value).run()},E=({content:i})=>{!i||!_.value||_.value.commands.insertContent(i)};return(i,p)=>{const m=s("menus-button"),o=s("t-dropdown-item"),T=s("menus-toolbar-insert-video"),$=s("menus-toolbar-insert-audio"),q=s("menus-toolbar-insert-file"),B=s("menus-toolbar-insert-details"),j=s("menus-toolbar-insert-callout"),O=s("menus-toolbar-insert-toc"),z=s("menus-toolbar-insert-text-box"),A=s("menus-toolbar-insert-web-page"),D=s("menus-toolbar-tools-qrcode"),H=s("menus-toolbar-tools-barcode"),I=s("menus-toolbar-tools-signature"),L=s("menus-toolbar-tools-diagrams"),P=s("menus-toolbar-tools-math"),R=s("menus-toolbar-tools-echarts"),S=s("menus-toolbar-tools-mermaid"),k=s("t-dropdown-menu"),G=s("t-dropdown");return n(),l(G,{placement:"bottom-right","overlay-class-name":"umo-block-menu-dropdown","max-height":320,trigger:"click","destroy-on-close":!1,"popup-props":F},{default:e(()=>[t(m,{class:"umo-block-menu-button","menu-active":r(g),ico:"block-add","hide-text":""},null,8,["menu-active"]),t(k,null,{default:e(()=>[t(o,{class:"umo-block-menu-group-name",disabled:""},{default:e(()=>[K(h(r(f)("blockMenu.insert")),1)]),_:1}),t(o,null,{default:e(()=>[t(m,{ico:"table",text:r(f)("table.insert.text"),tooltip:!1,onMenuClick:p[0]||(p[0]=c=>r(_)?.chain().focus().insertTable().run())},null,8,["text"])]),_:1}),u("image")?a("v-if",!0):(n(),l(o,{key:0},{default:e(()=>[t(m,{ico:"image",text:r(f)("insert.image.text"),tooltip:!1,onMenuClick:V},null,8,["text"])]),_:1})),u("video")?a("v-if",!0):(n(),l(o,{key:1},{default:e(()=>[t(T,{huge:!1,tooltip:!1})]),_:1})),u("audio")?a("v-if",!0):(n(),l(o,{key:2},{default:e(()=>[t($,{huge:!1,tooltip:!1})]),_:1})),u("file")?a("v-if",!0):(n(),l(o,{key:3},{default:e(()=>[t(q,{huge:!1,tooltip:!1})]),_:1})),u("details")?a("v-if",!0):(n(),l(o,{key:4},{default:e(()=>[t(B,{huge:!1,tooltip:!1})]),_:1})),u("callout")?a("v-if",!0):(n(),l(o,{key:5},{default:e(()=>[t(j,{huge:!1,tooltip:!1})]),_:1})),u("hr")?a("v-if",!0):(n(),l(o,{key:6},{default:e(()=>[t(m,{ico:"hr",text:r(f)("insert.hr.text"),tooltip:!1,onMenuClick:p[1]||(p[1]=c=>r(_)?.chain().focus().setHorizontalRule({type:"signle"}).run())},null,8,["text"])]),_:1})),u("toc")?a("v-if",!0):(n(),l(o,{key:7},{default:e(()=>[t(O,{huge:!1,tooltip:!1})]),_:1})),u("text-box")?a("v-if",!0):(n(),l(o,{key:8},{default:e(()=>[t(z,{huge:!1,tooltip:!1})]),_:1})),u("web-page")?a("v-if",!0):(n(),l(o,{key:9},{default:e(()=>[t(A,{huge:!1,tooltip:!1})]),_:1})),u("qrcode")?a("v-if",!0):(n(),l(o,{key:10},{default:e(()=>[t(D,{huge:!1,tooltip:!1})]),_:1})),u("barcode")?a("v-if",!0):(n(),l(o,{key:11},{default:e(()=>[t(H,{huge:!1,tooltip:!1})]),_:1})),u("signature")?a("v-if",!0):(n(),l(o,{key:12},{default:e(()=>[t(I,{huge:!1,tooltip:!1})]),_:1})),u("diagrams")?a("v-if",!0):(n(),l(o,{key:13},{default:e(()=>[t(L,{huge:!1,tooltip:!1})]),_:1})),u("math")?a("v-if",!0):(n(),l(o,{key:14},{default:e(()=>[t(P,{huge:!1,tooltip:!1})]),_:1})),u("echarts")?a("v-if",!0):(n(),l(o,{key:15},{default:e(()=>[t(R,{huge:!1,tooltip:!1,mode:"add"})]),_:1})),u("mermaid")?a("v-if",!0):(n(),l(o,{key:16},{default:e(()=>[t(S,{huge:!1,tooltip:!1})]),_:1})),r(b).templates.length>0?(n(),l(o,{key:17},{default:e(()=>[t(m,{ico:"template",text:r(f)("blockMenu.template"),tooltip:!1},null,8,["text"]),t(k,{"overlay-class-name":"umo-block-menu-dropdown",placement:"right"},{default:e(()=>[(n(!0),Q(U,null,W(r(b).templates,c=>(n(),l(o,{key:c.value,value:c.value,divider:c.divider,onClick:Z=>E(c)},{default:e(()=>[X("div",Y,h(c.title),1)]),_:2},1032,["value","divider","onClick"]))),128))]),_:1})]),_:1})):a("v-if",!0)]),_:1})]),_:1})}}};export{le as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computed as b,inject as s,ref as l,onMounted as B,nextTick as S,onBeforeUnmount as V,openBlock as _,createBlock as z,unref as i,normalizeStyle as D,withCtx as k,createElementVNode as $,normalizeClass as H,createVNode as M,isRef as T,withDirectives as A,vShow as O,createElementBlock as U,createCommentVNode as j}from"vue";import{nodeViewProps as E,NodeViewWrapper as P}from"@tiptap/vue-3";import q from"es-drager";import{p as I}from"./player-CIYSGQvp.js";import{u as L}from"./index-DB4X4foC.js";import{onClickOutside as G}from"@vueuse/core";import"./i18n-hQyxfD7_.js";import"@tool-belt/type-predicates";import"vue-i18n";import"./load-resource-DgkZV52W.js";import"./dialog-BnThXCWu.js";import"tdesign-vue-next";import"@tiptap/core";import"./short-id-DJZHbKNv.js";import"pretty-bytes";import"./file-BwWjS162.js";const J=["src"],K={key:0,class:"uploading"},me={__name:"node-view",props:E,setup(C){const f=C,t=b(()=>f.node.attrs),{updateAttributes:d,getPos:y}=f,r=s("options"),c=s("editor"),N=s("container"),m=s("uploadFileMap"),n=l(null);let u=l(!1);const p=l(null);let v=l(null),g=l(!1),w=l(0),x=l(0);const R=b(()=>{const{nodeAlign:o,margin:e}=t.value,a=e?.top&&e?.top!==""?`${e.top}px`:void 0,h=e?.bottom&&e?.bottom!==""?`${e.bottom}px`:void 0;return{"justify-content":o,marginTop:a,marginBottom:h}});B(async()=>{if(await S(),v.value=await I(p.value,r.value.cdnUrl),v.value.on("ready",()=>g.value=!0),!(t.value.uploaded||!t.value.id)&&m.value.has(t.value.id))try{const o=m.value.get(t.value.id),e=await r.value?.onFileUpload?.(o),{id:a,url:h}=e;n.value&&L(c.value,{id:a,src:h,uploaded:!0},y()),m.value.delete(t.value.id)}catch(o){useMessage("error",{attach:N,content:o.message})}});const F=()=>{if(t.value.width===null){const{clientWidth:o=0,clientHeight:e=0}=p.value;w.value=n.value?.$el.clientWidth;const a=o/e;x.value=n.value?.$el.clientWidth/a,d({width:(200*a).toFixed(2)}),setTimeout(()=>{d({height:n.value?.$el.clientHeight})},200)}},W=({width:o,height:e})=>{d({width:o,height:e})};return V(()=>{v.value?.destroy?.(),setTimeout(()=>{c.value.isDestroyed||r.value.onFileDelete(t.value.id,t.value.src,`image:${t.value.type}`)},500)}),G(n,()=>{u.value=!1}),(o,e)=>(_(),z(i(P),{id:t.value.id,ref_key:"containerRef",ref:n,class:"umo-node-view",style:D(R.value),onClickCapture:e[1]||(e[1]=a=>i(c)?.commands.setNodeSelection(i(y)()))},{default:k(()=>[$("div",{class:H(["umo-node-container umo-node-video",{"umo-hover-shadow":!i(r).document?.readOnly}])},[M(i(q),{selected:i(u),rotatable:!1,boundary:!1,width:Number(t.value.width),height:Number(t.value.height),"min-width":300,"min-height":200,"max-width":i(w),"max-height":i(x),"equal-proportion":!0,disabled:i(r).document?.readOnly,onResize:W,onFocus:e[0]||(e[0]=a=>T(u)?u.value=!0:u=!0)},{default:k(()=>[A($("video",{ref_key:"videoRef",ref:p,src:t.value.src,preload:"metadata",controls:"",crossorigin:"anonymous",onCanplay:F},null,40,J),[[O,i(g)]]),!t.value.uploaded&&t.value.id!==null?(_(),U("div",K)):j("v-if",!0)]),_:1},8,["selected","width","height","max-width","max-height","disabled"])],2)]),_:1},8,["id","style"]))}};export{me as default};
|